Bit of documentation, explicitness, variable definition
authorSam Reed <reedy@users.mediawiki.org>
Thu, 24 Feb 2011 23:03:00 +0000 (23:03 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Thu, 24 Feb 2011 23:03:00 +0000 (23:03 +0000)
includes/api/ApiQueryCategories.php
includes/api/ApiQueryProtectedTitles.php
includes/api/ApiQueryRandom.php
includes/api/ApiQueryStashImageInfo.php
includes/specials/SpecialBlockip.php

index ba7e592..b8f4a25 100644 (file)
@@ -136,8 +136,8 @@ class ApiQueryCategories extends ApiQueryGeneratorBase {
 
                $res = $this->select( __METHOD__ );
 
+               $count = 0;
                if ( is_null( $resultPageSet ) ) {
-                       $count = 0;
                        foreach ( $res as $row ) {
                                if ( ++$count > $params['limit'] ) {
                                        // We've reached the one extra which shows that
index 14f4e6c..a3f0119 100644 (file)
@@ -81,6 +81,9 @@ class ApiQueryProtectedTitles extends ApiQueryGeneratorBase {
 
                $count = 0;
                $result = $this->getResult();
+
+               $titles = array();
+
                foreach ( $res as $row ) {
                        if ( ++ $count > $params['limit'] ) {
                                // We've reached the one extra which shows that there are additional pages to be had. Stop here...
index 9c1f9ed..51ae0e2 100644 (file)
@@ -100,6 +100,10 @@ class ApiQueryRandom extends ApiQueryGeneratorBase {
                return $count;
        }
 
+       /**
+        * @param $resultPageSet ApiPageSet
+        * @return void
+        */
        public function run( $resultPageSet = null ) {
                $params = $this->extractRequestParams();
                $result = $this->getResult();
index e3fdbea..e829326 100644 (file)
@@ -47,7 +47,7 @@ class ApiQueryStashImageInfo extends ApiQueryImageInfo {
                        foreach ( $params['sessionkey'] as $sessionkey ) {
                                $file = $stash->getFile( $sessionkey );
                                $finalThumbParam = $this->mergeThumbParams( $file, $scale, $params['urlparam'] );
-                               $imageInfo = self::getInfo( $file, $prop, $result, $finalThumbParam );
+                               $imageInfo = ApiQueryImageInfo::getInfo( $file, $prop, $result, $finalThumbParam );
                                $result->addValue( array( 'query', $this->getModuleName() ), null, $imageInfo );
                                $result->setIndexedTagName_internal( array( 'query', $this->getModuleName() ), $modulePrefix );
                        }
index 1148d30..690d3bc 100644 (file)
@@ -29,7 +29,7 @@
  */
 class IPBlockForm extends SpecialPage {
        var $BlockAddress, $BlockExpiry, $BlockReason, $BlockReasonList, $BlockOther, $BlockAnonOnly, $BlockCreateAccount,
-               $BlockEnableAutoblock, $BlockEmail, $BlockHideName, $BlockAllowUsertalk, $BlockReblock;
+               $BlockEnableAutoblock, $BlockEmail, $BlockHideName, $BlockAllowUsertalk, $BlockReblock, $BlockWatchUser;
        // The maximum number of edits a user can have and still be hidden
        const HIDEUSER_CONTRIBLIMIT = 1000;