From f07567201ff3123291523298fbbe4076503eb688 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Sat, 25 Sep 2010 16:37:39 +0000 Subject: [PATCH] Remove some unused variables Tweak php doc, "One" is not a type, so insert string in there --- includes/api/ApiBase.php | 3 +-- includes/api/ApiDelete.php | 1 - includes/api/ApiImport.php | 1 - includes/api/ApiMain.php | 2 +- includes/api/ApiQueryUsers.php | 1 - 5 files changed, 2 insertions(+), 6 deletions(-) diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index 5e8025fb7f..600dd508b6 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -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()]['*']; diff --git a/includes/api/ApiDelete.php b/includes/api/ApiDelete.php index 52f09299fb..0c9acb017c 100644 --- a/includes/api/ApiDelete.php +++ b/includes/api/ApiDelete.php @@ -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'; diff --git a/includes/api/ApiImport.php b/includes/api/ApiImport.php index d2f300ad5b..8045cea09f 100644 --- a/includes/api/ApiImport.php +++ b/includes/api/ApiImport.php @@ -47,7 +47,6 @@ class ApiImport extends ApiBase { } $params = $this->extractRequestParams(); - $source = null; $isUpload = false; if ( isset( $params['interwikisource'] ) ) { if ( !isset( $params['interwikipage'] ) ) { diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index d837f454e0..a6d44a3e34 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -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. diff --git a/includes/api/ApiQueryUsers.php b/includes/api/ApiQueryUsers.php index 01b90fc268..757f4ebf15 100644 --- a/includes/api/ApiQueryUsers.php +++ b/includes/api/ApiQueryUsers.php @@ -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'] ); -- 2.20.1