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

Revision: 89267
Author:   reedy
Date:     2011-06-01 15:36:07 +0000 (Wed, 01 Jun 2011)
Log Message:
-----------
Kill freeResult() calls

Add some member variable documentation, add a few braces

Modified Paths:
--------------
    trunk/extensions/CentralAuth/CentralAuthUser.php
    trunk/extensions/CentralAuth/migratePass0.php
    trunk/extensions/CentralAuth/migratePass1.php
    trunk/extensions/CentralAuth/specials/SpecialCentralAuth.php

Modified: trunk/extensions/CentralAuth/CentralAuthUser.php
===================================================================
--- trunk/extensions/CentralAuth/CentralAuthUser.php    2011-06-01 15:34:12 UTC 
(rev 89266)
+++ trunk/extensions/CentralAuth/CentralAuthUser.php    2011-06-01 15:36:07 UTC 
(rev 89267)
@@ -145,7 +145,6 @@
                        "WHERE gu_name=?";
                $result = $dbr->safeQuery( $sql, wfWikiID(), $this->mName );
                $row = $dbr->fetchObject( $result );
-               $dbr->freeResult( $result );
 
                $this->loadFromRow( $row, true );
                $this->saveToCache();
@@ -1338,7 +1337,6 @@
                foreach ( $result as $row ) {
                        $dbs[] = $row->ln_wiki;
                }
-               $dbw->freeResult( $result );
 
                return $dbs;
        }
@@ -1467,7 +1465,6 @@
                foreach ( $result as $row ) {
                        $wikis[] = $row->lu_wiki;
                }
-               $dbw->freeResult( $result );
 
                $this->mAttachedArray = $wikis;
                $this->mAttachedList = implode( "\n", $wikis );
@@ -1520,7 +1517,6 @@
                        $wikis[$row->lu_wiki] = array_merge( 
$wikis[$row->lu_wiki],
                                                                                
                $this->localUserData( $row->lu_wiki ) );
                }
-               $dbw->freeResult( $result );
 
                return $wikis;
        }

Modified: trunk/extensions/CentralAuth/migratePass0.php
===================================================================
--- trunk/extensions/CentralAuth/migratePass0.php       2011-06-01 15:34:12 UTC 
(rev 89266)
+++ trunk/extensions/CentralAuth/migratePass0.php       2011-06-01 15:36:07 UTC 
(rev 89267)
@@ -33,7 +33,6 @@
                        $users[intval( $row->user_id )] = $row->user_name;
                        ++$migrated;
                }
-               $dbr->freeResult( $result );
 
                CentralAuthUser::storeMigrationData( $wgDBname, $users );
 

Modified: trunk/extensions/CentralAuth/migratePass1.php
===================================================================
--- trunk/extensions/CentralAuth/migratePass1.php       2011-06-01 15:34:12 UTC 
(rev 89266)
+++ trunk/extensions/CentralAuth/migratePass1.php       2011-06-01 15:36:07 UTC 
(rev 89267)
@@ -28,7 +28,6 @@
                        migratePassOneReport( $migrated, $total, $start );
                }
        }
-       $dbBackground->freeResult( $result );
        migratePassOneReport( $migrated, $total, $start );
        echo "DONE\n";
 }

Modified: trunk/extensions/CentralAuth/specials/SpecialCentralAuth.php
===================================================================
--- trunk/extensions/CentralAuth/specials/SpecialCentralAuth.php        
2011-06-01 15:34:12 UTC (rev 89266)
+++ trunk/extensions/CentralAuth/specials/SpecialCentralAuth.php        
2011-06-01 15:36:07 UTC (rev 89267)
@@ -1,8 +1,14 @@
 <?php
 class SpecialCentralAuth extends SpecialPage {
        var $mUserName, $mCanUnmerge, $mCanLock, $mCanOversight, $mCanEdit;
-       var $mGlobalUser, $mAttachedLocalAccounts, $mUnattachedLocalAccounts;
 
+       /**
+        * @var CentralAuthUser
+        */
+       var $mGlobalUser;
+
+       var $mAttachedLocalAccounts, $mUnattachedLocalAccounts;
+
        function __construct() {
                parent::__construct( 'CentralAuth' );
        }
@@ -73,12 +79,15 @@
                $this->showUsernameForm();
                if ( $continue ) {
                        $this->showInfo();
-                       if ( $this->mCanLock )
+                       if ( $this->mCanLock ) {
                                $this->showStatusForm();
-                       if ( $this->mCanUnmerge )
+                       }
+                       if ( $this->mCanUnmerge ) {
                                $this->showActionForm( 'delete' );
-                       if ( $this->mCanEdit )
+                       }
+                       if ( $this->mCanEdit ) {
                                $this->showLogExtract();
+                       }
                        $this->showWikiLists();
                }
        }


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

Reply via email to