Remove some unused variables
authorSam Reed <reedy@users.mediawiki.org>
Sat, 25 Sep 2010 16:37:39 +0000 (16:37 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Sat, 25 Sep 2010 16:37:39 +0000 (16:37 +0000)
Tweak php doc, "One" is not a type, so insert string in there

includes/api/ApiBase.php
includes/api/ApiDelete.php
includes/api/ApiImport.php
includes/api/ApiMain.php
includes/api/ApiQueryUsers.php

index 5e8025f..600dd50 100644 (file)
@@ -181,8 +181,7 @@ abstract class ApiBase {
                if ( isset( $data['warnings'][$this->getModuleName()] ) ) {
                        // Don't add duplicate warnings
                        $warn_regex = preg_quote( $warning, '/' );
-                       if ( preg_match( "/{$warn_regex}(\\n|$)/", $data['warnings'][$this->getModuleName()]['*'] ) )
-                       {
+                       if ( preg_match( "/{$warn_regex}(\\n|$)/", $data['warnings'][$this->getModuleName()]['*'] ) ) {
                                return;
                        }
                        $oldwarning = $data['warnings'][$this->getModuleName()]['*'];
index 52f0929..0c9acb0 100644 (file)
@@ -82,7 +82,6 @@ class ApiDelete extends ApiBase {
                                $this->dieUsageMsg( reset( $retval ) ); // We don't care about multiple errors, just report one of them
                        }
 
-                       $watch = 'nochange';
                        // Deprecated parameters
                        if ( $params['watch'] ) {
                                $watch = 'watch';
index d2f300a..8045cea 100644 (file)
@@ -47,7 +47,6 @@ class ApiImport extends ApiBase {
                }
                $params = $this->extractRequestParams();
 
-               $source = null;
                $isUpload = false;
                if ( isset( $params['interwikisource'] ) ) {
                        if ( !isset( $params['interwikipage'] ) ) {
index d837f45..a6d44a3 100644 (file)
@@ -220,7 +220,7 @@ class ApiMain extends ApiBase {
        /**
         * Set the type of caching headers which will be sent.
         *
-        * @param $mode One of:
+        * @param $mode String One of:
         *    - 'public':     Cache this object in public caches, if the maxage or smaxage
         *         parameter is set, or if setCacheMaxAge() was called. If a maximum age is
         *         not provided by any of these means, the object will be private.
index 01b90fc..757f4eb 100644 (file)
@@ -73,7 +73,6 @@ if ( !defined( 'MEDIAWIKI' ) ) {
 
        public function execute() {
                $params = $this->extractRequestParams();
-               $result = $this->getResult();
 
                if ( !is_null( $params['prop'] ) ) {
                        $this->prop = array_flip( $params['prop'] );