http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97813

Revision: 97813
Author:   ashley
Date:     2011-09-22 13:56:48 +0000 (Thu, 22 Sep 2011)
Log Message:
-----------
SportsTeams: remove some dead code now that this extension is under version 
control; follow-up to r97812

Modified Paths:
--------------
    trunk/extensions/SportsTeams/SpecialTopNetworks.php
    trunk/extensions/SportsTeams/SportsTeamsClass.php

Modified: trunk/extensions/SportsTeams/SpecialTopNetworks.php
===================================================================
--- trunk/extensions/SportsTeams/SpecialTopNetworks.php 2011-09-22 13:23:04 UTC 
(rev 97812)
+++ trunk/extensions/SportsTeams/SpecialTopNetworks.php 2011-09-22 13:56:48 UTC 
(rev 97813)
@@ -50,7 +50,6 @@
                $where = array();
                if ( $sport ) {
                        $where['team_sport_id'] = $sport;
-                       //$sport_where = "WHERE 
sport_team.team_sport_id={$sport}";
                }
 
                // Set the page title
@@ -71,16 +70,6 @@
                $dbr = wfGetDB( DB_MASTER );
 
                // Teams
-               /*
-               $sql = "SELECT COUNT(sport_favorite.sf_team_id) AS 
network_user_count,
-                               sport_favorite.sf_team_id, sport_team.team_name,
-                               sport_team.team_sport_id
-                       FROM sport_favorite
-                       INNER JOIN sport_team ON 
sport_favorite.sf_team_id=sport_team.team_id {$sport_where}
-                       GROUP BY sport_team.team_id
-                       ORDER BY network_user_count {$order} LIMIT 0,50";
-               $res = $dbr->query( $sql, __METHOD__ );
-               */
                $res = $dbr->select(
                        array( 'sport_favorite', 'sport_team' ),
                        array(
@@ -100,14 +89,6 @@
                );
 
                // Sports
-               /*
-               $sql_sport = "SELECT COUNT(sf_sport_id) AS sport_count, 
sf_sport_id, sport_name
-                       FROM sport_favorite
-                       INNER JOIN sport ON sf_sport_id = sport_id
-                       GROUP BY sf_sport_id
-                       ORDER BY sport_count {$order} LIMIT 0,50";
-               $res_sport = $dbr->query( $sql_sport, __METHOD__ );
-               */
                $res_sport = $dbr->select(
                        array( 'sport_favorite', 'sport' ),
                        array(
@@ -125,14 +106,6 @@
                );
 
                // Navigation
-               /*
-               $sql_sport_nav = "SELECT sport_id, sport_name, team_sport_id
-                       FROM sport
-                       INNER JOIN sport_team ON sport_id = team_sport_id
-                       GROUP BY sport_name
-                       ORDER BY sport_id";
-               $res_sport_nav = $dbr->query( $sql_sport_nav, __METHOD__ );
-               */
                $res_sport_nav = $dbr->select(
                        array( 'sport', 'sport_team' ),
                        array( 'sport_id', 'sport_name', 'team_sport_id' ),

Modified: trunk/extensions/SportsTeams/SportsTeamsClass.php
===================================================================
--- trunk/extensions/SportsTeams/SportsTeamsClass.php   2011-09-22 13:23:04 UTC 
(rev 97812)
+++ trunk/extensions/SportsTeams/SportsTeamsClass.php   2011-09-22 13:56:48 UTC 
(rev 97813)
@@ -387,7 +387,6 @@
                        }
                        $options['OFFSET'] = intval( $limitvalue );
                        $options['LIMIT'] = intval( $limit );
-                       //$limit_sql = " LIMIT {$limitvalue},{$limit} ";
                }
 
                if( !$team_id ) {
@@ -496,14 +495,8 @@
                } else {
                        $count = 0;
                }
-               /*
-               $sql = "SELECT COUNT(*) AS the_count FROM {$dbr->tableName( 
'sport_favorite' )} WHERE {$where_sql} AND sf_user_id IN
-                       (SELECT r_user_id_relation FROM {$dbr->tableName( 
'user_relationship' )} WHERE r_user_id = {$user_id} AND r_type = 1)";
-               $res = $dbr->query( $sql, __METHOD__ );
-               $row = $dbr->fetchObject( $res );
-               */
 
-               return $count;//$row->the_count;
+               return $count;
        }
 
        static function getSimilarUserCount( $user_id ) {
@@ -536,15 +529,7 @@
                        $count = 0;
                }
 
-               /*
-               $sql = "SELECT COUNT(*) AS the_count FROM {$dbr->tableName( 
'sport_favorite' )} WHERE sf_team_id IN
-                       (SELECT sf_team_id FROM {$dbr->tableName( 
'sport_favorite' )} WHERE sf_user_id ={$user_id})
-                       AND sf_team_id <> 0 AND sf_user_id <> {$user_id}";
-               $res = $dbr->query( $sql, __METHOD__ );
-               $row = $dbr->fetchObject( $res );
-               */
-
-               return $count;//$row->the_count;
+               return $count;
        }
 
        /**
@@ -572,11 +557,6 @@
                        $where,
                        __METHOD__
                );
-               /*
-               $sql = "SELECT sf_id FROM {$dbr->tableName( 'sport_favorite' )} 
WHERE sf_user_id={$user_id} AND {$where_sql}";
-               $res = $dbr->query( $sql, __METHOD__ );
-               $row = $dbr->fetchObject( $res );
-               */
 
                if( !$row ) {
                        return false;


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to