Merge "Export::dumpFrom() doesn't return any values, and hence neither do any of...
authorAaron Schulz <aschulz@wikimedia.org>
Mon, 9 Apr 2012 17:37:05 +0000 (17:37 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 9 Apr 2012 17:37:06 +0000 (17:37 +0000)
32 files changed:
RELEASE-NOTES-1.20
includes/Action.php
includes/Export.php
includes/GlobalFunctions.php
includes/PathRouter.php
includes/SpecialPage.php
includes/StringUtils.php
includes/WebRequest.php
includes/actions/HistoryAction.php
includes/api/ApiEditPage.php
includes/api/ApiProtect.php
includes/api/ApiUpload.php
includes/filerepo/file/LocalFile.php
includes/media/IPTC.php
includes/resourceloader/ResourceLoaderUserModule.php
includes/specials/SpecialListusers.php
includes/specials/SpecialVersion.php
languages/Language.php
languages/classes/LanguageKk.php
languages/classes/LanguageKu.php
languages/messages/MessagesEn.php
languages/messages/MessagesKk_cyrl.php
languages/messages/MessagesKk_latn.php
languages/messages/MessagesKw.php
languages/messages/MessagesLad.php
languages/messages/MessagesMwl.php
languages/messages/MessagesNds_nl.php
languages/messages/MessagesTe.php
maintenance/Maintenance.php
maintenance/backup.inc
maintenance/backupTextPass.inc
maintenance/storage/checkStorage.php

index c6b2756..12a0f92 100644 (file)
@@ -76,6 +76,8 @@ production.
 * (bug 35705) QUnit upgraded from 1.2.0 to 1.5.0
 * (bug 35749) Updated maintenance/checkSyntax.php to use Git instead of
   Subversion when invoked with the --modified option.
+* (bug 35069) On history pages, the " . . " separator after the number of
+  characters changed in a revision is now suppressed if no text would follow.
 
 === API changes in 1.20 ===
 * (bug 34316) Add ability to retrieve maximum upload size from MediaWiki API.
@@ -84,6 +86,7 @@ production.
 * (bug 32384) Allow descending order for list=watchlistraw.
 * (bug 31883) Limit of bkusers of list=blocks and titles of action=query is not documented in API help.
 * (bug 32492) API now allows editing using pageid
+* (bug 32497) API now allows changing of protection level using pageid
 
 === Languages updated in 1.20 ===
 
index 84c0f80..a25e8aa 100644 (file)
@@ -266,6 +266,7 @@ abstract class Action {
         *
         * @param $user User: the user to check, or null to use the context user
         * @throws ErrorPageError
+        * @return bool True on success
         */
        protected function checkCanExecute( User $user ) {
                $right = $this->getRestriction();
@@ -287,6 +288,7 @@ abstract class Action {
                if ( $this->requiresWrite() && wfReadOnly() ) {
                        throw new ReadOnlyError();
                }
+               return true;
        }
 
        /**
index b97615b..73b07c3 100644 (file)
@@ -910,7 +910,7 @@ class DumpFileOutput extends DumpOutput {
  */
 class DumpPipeOutput extends DumpFileOutput {
        protected $command, $filename;
-       private $procOpenResource = false;
+       protected $procOpenResource = false;
 
        function __construct( $command, $file = null ) {
                if ( !is_null( $file ) ) {
index 517f70d..7237b53 100644 (file)
@@ -3603,7 +3603,7 @@ function wfFindFile( $title, $options = array() ) {
  * Returns a valid placeholder object if the file does not exist.
  *
  * @param $title Title|String
- * @return File|null A File, or null if passed an invalid Title
+ * @return LocalFile|null A File, or null if passed an invalid Title
  */
 function wfLocalFile( $title ) {
        return RepoGroup::singleton()->getLocalRepo()->newFile( $title );
index 29df4b4..9700b90 100644 (file)
@@ -123,7 +123,7 @@ class PathRouter {
        /**
         * Add a new path pattern to the path router
         *
-        * @param $path string The path pattern to add
+        * @param $path string|array The path pattern to add
         * @param $params array The params for this path pattern
         * @param $options array The options for this path pattern
         */
@@ -348,4 +348,4 @@ class PathRouterPatternReplacer {
                }
        }
 
-}
\ No newline at end of file
+}
index 411d5e4..b529f86 100644 (file)
@@ -124,19 +124,18 @@ class SpecialPage {
         *
         * @param $page Mixed: SpecialPage or string
         * @param $group String
-        * @return null
         * @deprecated since 1.18 call SpecialPageFactory method directly
         */
        static function setGroup( $page, $group ) {
                wfDeprecated( __METHOD__, '1.18' );
-               return SpecialPageFactory::setGroup( $page, $group );
+               SpecialPageFactory::setGroup( $page, $group );
        }
 
        /**
         * Get the group that the special page belongs in on Special:SpecialPage
         *
         * @param $page SpecialPage
-        * @return null
+        * @return string
         * @deprecated since 1.18 call SpecialPageFactory method directly
         */
        static function getGroup( &$page ) {
index f20c548..582c6cd 100644 (file)
@@ -54,6 +54,7 @@ class StringUtils {
         * @param $callback Callback: function to call on each match
         * @param $subject String
         * @param $flags String: regular expression flags
+        * @throws MWException
         * @return string
         */
        static function delimiterReplaceCallback( $startDelim, $endDelim, $callback, $subject, $flags = '' ) {
@@ -207,6 +208,10 @@ class StringUtils {
  * StringUtils::delimiterReplaceCallback()
  */
 class Replacer {
+
+       /**
+        * @return array
+        */
        function cb() {
                return array( &$this, 'replace' );
        }
@@ -217,10 +222,18 @@ class Replacer {
  */
 class RegexlikeReplacer extends Replacer {
        var $r;
+
+       /**
+        * @param $r string
+        */
        function __construct( $r ) {
                $this->r = $r;
        }
 
+       /**
+        * @param $matches array
+        * @return string
+        */
        function replace( $matches ) {
                $pairs = array();
                foreach ( $matches as $i => $match ) {
@@ -235,12 +248,22 @@ class RegexlikeReplacer extends Replacer {
  * Class to perform secondary replacement within each replacement string
  */
 class DoubleReplacer extends Replacer {
+
+       /**
+        * @param $from
+        * @param $to
+        * @param $index int
+        */
        function __construct( $from, $to, $index = 0 ) {
                $this->from = $from;
                $this->to = $to;
                $this->index = $index;
        }
 
+       /**
+        * @param $matches array
+        * @return mixed
+        */
        function replace( $matches ) {
                return str_replace( $this->from, $this->to, $matches[$this->index] );
        }
@@ -252,11 +275,19 @@ class DoubleReplacer extends Replacer {
 class HashtableReplacer extends Replacer {
        var $table, $index;
 
+       /**
+        * @param $table
+        * @param $index int
+        */
        function __construct( $table, $index = 0 ) {
                $this->table = $table;
                $this->index = $index;
        }
 
+       /**
+        * @param $matches array
+        * @return mixed
+        */
        function replace( $matches ) {
                return $this->table[$matches[$this->index]];
        }
@@ -273,11 +304,15 @@ class ReplacementArray {
        /**
         * Create an object with the specified replacement array
         * The array should have the same form as the replacement array for strtr()
+        * @param array $data
         */
        function __construct( $data = array() ) {
                $this->data = $data;
        }
 
+       /**
+        * @return array
+        */
        function __sleep() {
                return array( 'data' );
        }
@@ -294,39 +329,61 @@ class ReplacementArray {
                $this->fss = false;
        }
 
+       /**
+        * @return array|bool
+        */
        function getArray() {
                return $this->data;
        }
 
        /**
         * Set an element of the replacement array
+        * @param $from string
+        * @param $to stromg
         */
        function setPair( $from, $to ) {
                $this->data[$from] = $to;
                $this->fss = false;
        }
 
+       /**
+        * @param $data array
+        */
        function mergeArray( $data ) {
                $this->data = array_merge( $this->data, $data );
                $this->fss = false;
        }
 
+       /**
+        * @param $other
+        */
        function merge( $other ) {
                $this->data = array_merge( $this->data, $other->data );
                $this->fss = false;
        }
 
+       /**
+        * @param $from string
+        */
        function removePair( $from ) {
                unset($this->data[$from]);
                $this->fss = false;
        }
 
+       /**
+        * @param $data array
+        */
        function removeArray( $data ) {
-               foreach( $data as $from => $to )
+               foreach( $data as $from => $to ) {
                        $this->removePair( $from );
+               }
                $this->fss = false;
        }
 
+       /**
+        * @param $subject string
+        * @return string
+        */
        function replace( $subject ) {
                if ( function_exists( 'fss_prep_replace' ) ) {
                        wfProfileIn( __METHOD__.'-fss' );
@@ -369,8 +426,10 @@ class ExplodeIterator implements Iterator {
        // The current token
        var $current;
 
-       /** 
+       /**
         * Construct a DelimIterator
+        * @param $delim string
+        * @param $s string
         */
        function __construct( $delim, $s ) {
                $this->subject = $s;
@@ -389,7 +448,6 @@ class ExplodeIterator implements Iterator {
                $this->refreshCurrent();
        }
 
-
        function refreshCurrent() {
                if ( $this->curPos === false ) {
                        $this->current = false;
@@ -410,6 +468,9 @@ class ExplodeIterator implements Iterator {
                return $this->curPos;
        }
 
+       /**
+        * @return string
+        */
        function next() {
                if ( $this->endPos === false ) {
                        $this->curPos = false;
@@ -425,8 +486,10 @@ class ExplodeIterator implements Iterator {
                return $this->current;
        }
 
+       /**
+        * @return bool
+        */
        function valid() {
                return $this->curPos !== false;
        }
 }
-
index 81f42dc..9d0e579 100644 (file)
@@ -1383,7 +1383,7 @@ class DerivativeRequest extends FauxRequest {
        }
 
        public function setSessionData( $key, $data ) {
-               return $this->base->setSessionData( $key, $data );
+               $this->base->setSessionData( $key, $data );
        }
 
        public function getAcceptLang() {
index dbc1ac0..c49d232 100644 (file)
@@ -611,12 +611,13 @@ class HistoryPager extends ReverseChronologicalPager {
                        : 0;
                $sDiff = ChangesList::showCharacterDifference( $prevSize, $rev->getSize() );
                $fSize = Linker::formatRevisionSize($rev->getSize());
-               $s .= " . . $fSize $sDiff . . ";
+               $s .= " . . $fSize $sDiff";
 
-               $s .= Linker::revComment( $rev, false, true );
+               # Text following the character difference is added just before running hooks
+               $s2 = Linker::revComment( $rev, false, true );
 
                if ( $notificationtimestamp && ( $row->rev_timestamp >= $notificationtimestamp ) ) {
-                       $s .= ' <span class="updatedmarker">' .  $this->msg( 'updatedmarker' )->escaped() . '</span>';
+                       $s2 .= ' <span class="updatedmarker">' .  $this->msg( 'updatedmarker' )->escaped() . '</span>';
                }
 
                $tools = array();
@@ -653,13 +654,20 @@ class HistoryPager extends ReverseChronologicalPager {
                }
 
                if ( $tools ) {
-                       $s .= ' '. $this->msg( 'parentheses' )->rawParams( $lang->pipeList( $tools ) )->escaped();
+                       $s2 .= ' '. $this->msg( 'parentheses' )->rawParams( $lang->pipeList( $tools ) )->escaped();
                }
 
                # Tags
                list( $tagSummary, $newClasses ) = ChangeTags::formatSummaryRow( $row->ts_tags, 'history' );
                $classes = array_merge( $classes, $newClasses );
-               $s .= " $tagSummary";
+               if ( $tagSummary !== '' ) {
+                       $s2 .= " $tagSummary";
+               }
+
+               # Include separator between character difference and following text
+               if ( $s2 !== '' ) {
+                       $s .= " . . $s2";
+               }
 
                wfRunHooks( 'PageHistoryLineEnding', array( $this, &$row , &$s, &$classes ) );
 
index 229afde..796b049 100644 (file)
@@ -1,4 +1,4 @@
-<?php
+<?php
 /**
  *
  *
@@ -381,7 +381,7 @@ class ApiEditPage extends ApiBase {
                global $wgMaxArticleSize;
 
                return array_merge( parent::getPossibleErrors(),
-                       $this->getRequireOnlyOneParameterErrorMessages( 'title', 'pageid' ),
+                       $this->getRequireOnlyOneParameterErrorMessages( array( 'title', 'pageid' ) ),
                        array(
                                array( 'nosuchpageid', 'pageid' ),
                                array( 'missingtext' ),
@@ -479,7 +479,7 @@ class ApiEditPage extends ApiBase {
                $p = $this->getModulePrefix();
                return array(
                        'title' => "Title of the page you want to edit. Cannot be used together with {$p}pageid",
-                       'pageid' => "Page ID of the page you want to edit. Cannot be used together with {$p}title,
+                       'pageid' => "Page ID of the page you want to edit. Cannot be used together with {$p}title",
                        'section' => 'Section number. 0 for the top section, \'new\' for a new section',
                        'sectiontitle' => 'The title for a new section',
                        'text' => 'Page content',
index fb225d8..ec7b560 100644 (file)
@@ -37,9 +37,18 @@ class ApiProtect extends ApiBase {
                global $wgRestrictionLevels;
                $params = $this->extractRequestParams();
 
-               $titleObj = Title::newFromText( $params['title'] );
-               if ( !$titleObj ) {
-                       $this->dieUsageMsg( array( 'invalidtitle', $params['title'] ) );
+               $this->requireOnlyOneParameter( $params, 'title', 'pageid' );
+
+               if ( isset( $params['title'] ) ) {
+                       $titleObj = Title::newFromText( $params['title'] );
+                       if ( !$titleObj ) {
+                               $this->dieUsageMsg( array( 'invalidtitle', $params['title'] ) );
+                       }
+               } elseif ( isset( $params['pageid'] ) ) {
+                       $titleObj = Title::newFromID( $params['pageid'] );
+                       if ( !$titleObj ) {
+                               $this->dieUsageMsg( array( 'nosuchpageid', $params['pageid'] ) );
+                       }
                }
 
                $errors = $titleObj->getUserPermissionsErrors( 'protect', $this->getUser() );
@@ -138,7 +147,9 @@ class ApiProtect extends ApiBase {
                return array(
                        'title' => array(
                                ApiBase::PARAM_TYPE => 'string',
-                               ApiBase::PARAM_REQUIRED => true
+                       ),
+                       'pageid' => array(
+                               ApiBase::PARAM_TYPE => 'integer',
                        ),
                        'token' => null,
                        'protections' => array(
@@ -169,8 +180,10 @@ class ApiProtect extends ApiBase {
        }
 
        public function getParamDescription() {
+               $p = $this->getModulePrefix();
                return array(
-                       'title' => 'Title of the page you want to (un)protect',
+                       'title' => "Title of the page you want to (un)protect. Cannot be used together with {$p}pageid",
+                       'pageid' => "ID of the page you want to (un)protect. Cannot be used together with {$p}title",
                        'token' => 'A protect token previously retrieved through prop=info',
                        'protections' => 'Pipe-separated list of protection levels, formatted action=group (e.g. edit=sysop)',
                        'expiry' => array( 'Expiry timestamps. If only one timestamp is set, it\'ll be used for all protections.',
@@ -188,16 +201,20 @@ class ApiProtect extends ApiBase {
        }
 
        public function getPossibleErrors() {
-               return array_merge( parent::getPossibleErrors(), array(
-                       array( 'invalidtitle', 'title' ),
-                       array( 'toofewexpiries', 'noofexpiries', 'noofprotections' ),
-                       array( 'create-titleexists' ),
-                       array( 'missingtitle-createonly' ),
-                       array( 'protect-invalidaction', 'action' ),
-                       array( 'protect-invalidlevel', 'level' ),
-                       array( 'invalidexpiry', 'expiry' ),
-                       array( 'pastexpiry', 'expiry' ),
-               ) );
+               return array_merge( parent::getPossibleErrors(),
+                       $this->getRequireOnlyOneParameterErrorMessages( array( 'title', 'pageid' ) ),
+                       array(
+                               array( 'invalidtitle', 'title' ),
+                               array( 'nosuchpageid', 'pageid' ),
+                               array( 'toofewexpiries', 'noofexpiries', 'noofprotections' ),
+                               array( 'create-titleexists' ),
+                               array( 'missingtitle-createonly' ),
+                               array( 'protect-invalidaction', 'action' ),
+                               array( 'protect-invalidlevel', 'level' ),
+                               array( 'invalidexpiry', 'expiry' ),
+                               array( 'pastexpiry', 'expiry' ),
+                       )
+               );
        }
 
        public function needsToken() {
index 67165b9..5040c70 100644 (file)
@@ -187,15 +187,28 @@ class ApiUpload extends ApiBase {
                                $this->dieUsage( $status->getWikiText(), 'stashfailed' );
                                return ;
                        }
-                       $result['filekey'] = $this->mParams['filekey'];
+
                        // Check we added the last chunk: 
                        if( $this->mParams['offset'] + $chunkSize == $this->mParams['filesize'] ) {
                                $status = $this->mUpload->concatenateChunks();
+
                                if ( !$status->isGood() ) {
                                        $this->dieUsage( $status->getWikiText(), 'stashfailed' );
                                        return ;
                                }
+
+                               // We have a new filekey for the fully concatenated file.
+                               $result['filekey'] =  $this->mUpload->getLocalFile()->getFileKey();
+
+                               // Remove chunk from stash. (Checks against user ownership of chunks.)
+                               $this->mUpload->stash->removeFile( $this->mParams['filekey'] );
+
                                $result['result'] = 'Success';
+
+                       } else {
+
+                               // Continue passing through the filekey for adding further chunks.
+                               $result['filekey'] = $this->mParams['filekey'];
                        }
                }
                $result['offset'] = $this->mParams['offset'] + $chunkSize;
index 40ee0fa..04d7a47 100644 (file)
@@ -60,6 +60,11 @@ class LocalFile extends File {
 
        /**#@-*/
 
+       /**
+        * @var LocalRepo
+        */
+       var $repo;
+
        protected $repoClass = 'LocalRepo';
 
        /**
@@ -1653,7 +1658,7 @@ class LocalFileDeleteBatch {
                                        'fa_deleted_user'      => $encUserId,
                                        'fa_deleted_timestamp' => $encTimestamp,
                                        'fa_deleted_reason'    => $encReason,
-                                       'fa_deleted'               => $this->suppress ? $bitfield : 'oi_deleted',
+                                       'fa_deleted'           => $this->suppress ? $bitfield : 'oi_deleted',
 
                                        'fa_name'         => 'oi_name',
                                        'fa_archive_name' => 'oi_archive_name',
@@ -1669,7 +1674,6 @@ class LocalFileDeleteBatch {
                                        'fa_user'         => 'oi_user',
                                        'fa_user_text'    => 'oi_user_text',
                                        'fa_timestamp'    => 'oi_timestamp',
-                                       'fa_deleted'      => $bitfield
                                ), $where, __METHOD__ );
                }
        }
index 1d19791..666ce40 100644 (file)
@@ -395,10 +395,10 @@ class IPTC {
 
        /**
        * Helper function to convert charset for iptc values.
-       * @param $data Mixed String or Array: The iptc string
+       * @param $data string|array The iptc string
        * @param $charset String: The charset
         *
-        * @return string
+        * @return string|array
        */
        private static function convIPTC ( $data, $charset ) {
                if ( is_array( $data ) ) {
index 338b632..9fa9bce 100644 (file)
@@ -33,33 +33,40 @@ class ResourceLoaderUserModule extends ResourceLoaderWikiModule {
         * @return array
         */
        protected function getPages( ResourceLoaderContext $context ) {
-               if ( $context->getUser() ) {
-                       // Get the normalized title of the user's user page
-                       $username = $context->getUser();
-                       $userpageTitle = Title::makeTitleSafe( NS_USER, $username );
-                       $userpage = $userpageTitle->getPrefixedDBkey(); // Needed so $excludepages works
+               $username = $context->getUser();
 
-                       $pages = array(
-                               "$userpage/common.js" => array( 'type' => 'script' ),
-                               "$userpage/" . $context->getSkin() . '.js' =>
-                                       array( 'type' => 'script' ),
-                               "$userpage/common.css" => array( 'type' => 'style' ),
-                               "$userpage/" . $context->getSkin() . '.css' =>
-                                       array( 'type' => 'style' ),
-                       );
+               if ( !$username ) {
+                       return array();
+               }
+
+               // Get the normalized title of the user's user page
+               $userpageTitle = Title::makeTitleSafe( NS_USER, $username );
+
+               if ( !$userpageTitle instanceof Title ) {
+                       return array();
+               }
+
+               $userpage = $userpageTitle->getPrefixedDBkey(); // Needed so $excludepages works
+
+               $pages = array(
+                       "$userpage/common.js" => array( 'type' => 'script' ),
+                       "$userpage/" . $context->getSkin() . '.js' =>
+                               array( 'type' => 'script' ),
+                       "$userpage/common.css" => array( 'type' => 'style' ),
+                       "$userpage/" . $context->getSkin() . '.css' =>
+                               array( 'type' => 'style' ),
+               );
 
-                       // Hack for bug 26283: if we're on a preview page for a CSS/JS page,
-                       // we need to exclude that page from this module. In that case, the excludepage
-                       // parameter will be set to the name of the page we need to exclude.
-                       $excludepage = $context->getRequest()->getVal( 'excludepage' );
-                       if ( isset( $pages[$excludepage] ) ) {
-                               // This works because $excludepage is generated with getPrefixedDBkey(),
-                               // just like the keys in $pages[] above
-                               unset( $pages[$excludepage] );
-                       }
-                       return $pages;
+               // Hack for bug 26283: if we're on a preview page for a CSS/JS page,
+               // we need to exclude that page from this module. In that case, the excludepage
+               // parameter will be set to the name of the page we need to exclude.
+               $excludepage = $context->getRequest()->getVal( 'excludepage' );
+               if ( isset( $pages[$excludepage] ) ) {
+                       // This works because $excludepage is generated with getPrefixedDBkey(),
+                       // just like the keys in $pages[] above
+                       unset( $pages[$excludepage] );
                }
-               return array();
+               return $pages;
        }
 
        /* Methods */
index 0b8959e..75be397 100644 (file)
@@ -129,6 +129,11 @@ class UsersPager extends AlphabeticPager {
                if ($row->user_id == 0) #Bug 16487
                        return '';
 
+               $userName = $row->user_name;
+
+               $ulinks = Linker::userLink( $row->user_id, $userName );
+               $ulinks .= Linker::userToolLinks( $row->user_id, $userName );
+
                $userPage = Title::makeTitle( NS_USER, $row->user_name );
                $name = Linker::link( $userPage, htmlspecialchars( $userPage->getText() ) );
 
@@ -138,13 +143,13 @@ class UsersPager extends AlphabeticPager {
                if( count( $groups_list ) > 0 ) {
                        $list = array();
                        foreach( $groups_list as $group )
-                               $list[] = self::buildGroupLink( $group, $userPage->getText() );
+                               $list[] = self::buildGroupLink( $group, $userName );
                        $groups = $lang->commaList( $list );
                } else {
                        $groups = '';
                }
 
-               $item = $lang->specialList( $name, $groups );
+               $item = $lang->specialList( $ulinks, $groups );
                if( $row->ipb_deleted ) {
                        $item = "<span class=\"deleted\">$item</span>";
                }
@@ -156,10 +161,6 @@ class UsersPager extends AlphabeticPager {
                        $edits = '';
                }
 
-               $userTalkPage = $userPage->getTalkPage();
-               $talk = Linker::link( $userTalkPage, $this->msg( 'talkpagelinktext' )->escaped() );
-               $talk = ' ' . $this->msg( 'parentheses' )->rawParams( $talk )->escaped();
-
                $created = '';
                # Some rows may be NULL
                if( $row->creation ) {
@@ -171,21 +172,18 @@ class UsersPager extends AlphabeticPager {
                }
 
                wfRunHooks( 'SpecialListusersFormatRow', array( &$item, $row ) );
-               return "<li>{$item}{$edits}{$talk}{$created}</li>";
+               return "<li>{$item}{$edits}{$created}</li>";
        }
 
-       function getBody() {
-               if( !$this->mQueryDone ) {
-                       $this->doQuery();
-               }
-               $this->mResult->rewind();
-               $batch = new LinkBatch;
+       function doBatchLookups() {
+               $batch = new LinkBatch();
+               # Give some pointers to make user links
                foreach ( $this->mResult as $row ) {
-                       $batch->addObj( Title::makeTitleSafe( NS_USER, $row->user_name ) );
+                       $batch->add( NS_USER, $row->user_name );
+                       $batch->add( NS_USER_TALK, $row->user_name );
                }
                $batch->execute();
                $this->mResult->rewind();
-               return parent::getBody();
        }
 
        function getPageHeader( ) {
index 777af41..2e2b003 100644 (file)
@@ -194,12 +194,16 @@ class SpecialVersion extends SpecialPage {
                global $wgVersion;
                wfProfileIn( __METHOD__ );
 
-               if( $gitVersion = self::getVersionLinkedGit() ) {
+               $gitVersion = self::getVersionLinkedGit();
+               if( $gitVersion ) {
                        $v = $gitVersion;
-               } elseif( $svnVersion = self::getVersionLinkedSvn() ) {
-                       $v = $svnVersion;
                } else {
-                       $v = $wgVersion; // fallback
+                       $svnVersion = self::getVersionLinkedSvn();
+                       if( $svnVersion ) {
+                               $v = $svnVersion;
+                       } else {
+                               $v = $wgVersion; // fallback
+                       }
                }
 
                wfProfileOut( __METHOD__ );
@@ -207,7 +211,7 @@ class SpecialVersion extends SpecialPage {
        }
 
        /**
-        * @return string wgVersion + a link to subversion revision of svn BASE 
+        * @return string wgVersion + a link to subversion revision of svn BASE
         */
        private static function getVersionLinkedSvn() {
                global $wgVersion, $IP;
index 1ef5a74..8db7e84 100644 (file)
@@ -556,7 +556,6 @@ class Language {
         */
        function getVariantname( $code, $usemsg = true ) {
                $msg = "variantname-$code";
-               list( $rootCode ) = explode( '-', $code );
                if ( $usemsg && wfMessage( $msg )->exists() ) {
                        return $this->getMessageFromDB( $msg );
                }
index 953a3f9..c2a3d24 100644 (file)
@@ -113,7 +113,7 @@ class KkConverter extends LanguageConverter {
                        # # Punctuation
                        '/#|No\./' => '№',
                        # # Şç
-                       '/ŞÇʹ/u' => 'ЩЬ', '/Şçʹ/u' => 'Щь', '/Şçʹ/u' => 'Щь',
+                       '/ŞÇʹ/u' => 'ЩЬ', '/Şçʹ/u' => 'Щь',
                        '/Ş[Çç]/u' => 'Щ', '/şç/u' => 'щ',
                        # # soft and hard signs
                        '/([' . KK_L_UC . '])ʺ([' . KK_L_UC . '])/u' => '$1Ъ$2',
index 8f8ea31..81bf6ee 100644 (file)
@@ -55,8 +55,7 @@ class KuConverter extends LanguageConverter {
                'h' => 'ه', 'j' => 'ژ', 'k' => 'ک', 'l' => 'ل',
                'm' => 'م', 'n' => 'ن', 'p' => 'پ', 'q' => 'ق', 'r' => 'ر', 's' => 'س', 'ş' => 'ش',
                't' => 'ت', 'v' => 'ڤ',
-                'x' => 'خ', 'y' => 'ی', 'z' => 'ز',
-
+               'x' => 'خ', 'y' => 'ی', 'z' => 'ز',
 
                'B' => 'ب', 'C' => 'ج', 'Ç' => 'چ', 'D' => 'د', 'F' => 'ف', 'G' => 'گ', 'H' => 'ھ',
                'H' => 'ہ', 'H' => 'ه', 'H' => 'ح', 'J' => 'ژ', 'K' => 'ك', 'K' => 'ک', 'L' => 'ل',
index 8006df5..62065dd 100644 (file)
@@ -1039,9 +1039,6 @@ $2',
 'ns-specialprotected'  => 'Special pages cannot be edited.',
 'titleprotected'       => 'This title has been protected from creation by [[User:$1|$1]].
 The reason given is "\'\'$2\'\'".',
-'filereadonlyerror'    => 'Unable to modify the file "$1" because the file repository "$2" is in read-only mode.
-
-The reason given is "\'\'$3\'\'".',
 
 # Virus scanner
 'virus-badscanner'     => "Bad configuration: Unknown virus scanner: ''$1''",
index 415f226..9e3f92a 100644 (file)
@@ -91,10 +91,6 @@ $namespaceAliases = array(
        '$1_تالقىلاۋى'        => NS_PROJECT_TALK,
        'سۋرەت'              => NS_FILE,
        'سۋرەت_تالقىلاۋى'    => NS_FILE_TALK,
-       'مەدياۋيكي'           => NS_MEDIAWIKI,
-       'مەدياۋيكي_تالقىلاۋى' => NS_MEDIAWIKI_TALK,
-       'ٷلگٸ'              => NS_TEMPLATE,
-       'ٷلگٸ_تالقىلاۋى'    => NS_TEMPLATE_TALK,
        'انىقتاما'            => NS_HELP,
        'انىقتاما_تالقىلاۋى'  => NS_HELP_TALK,
        'سانات'              => NS_CATEGORY,
index dcdf756..24aa511 100644 (file)
@@ -92,10 +92,6 @@ $namespaceAliases = array(
        '$1_تالقىلاۋى'        => NS_PROJECT_TALK,
        'سۋرەت'              => NS_FILE,
        'سۋرەت_تالقىلاۋى'    => NS_FILE_TALK,
-       'مەدياۋيكي'           => NS_MEDIAWIKI,
-       'مەدياۋيكي_تالقىلاۋى' => NS_MEDIAWIKI_TALK,
-       'ٷلگٸ'              => NS_TEMPLATE,
-       'ٷلگٸ_تالقىلاۋى'    => NS_TEMPLATE_TALK,
        'انىقتاما'            => NS_HELP,
        'انىقتاما_تالقىلاۋى'  => NS_HELP_TALK,
        'سانات'              => NS_CATEGORY,
index 603914a..02b26f5 100644 (file)
@@ -47,7 +47,6 @@ $namespaceAliases = array(
        'Cows_Restren'       => NS_FILE_TALK,
        'Keskows_Restren'    => NS_FILE_TALK,
        'Cows_MediaWiki'     => NS_MEDIAWIKI_TALK,
-       'Cows_MediaWiki'     => NS_MEDIAWIKI_TALK,
        'Keskows_MediaWiki'  => NS_MEDIAWIKI_TALK,
        'Cows_Scantlyn'      => NS_TEMPLATE_TALK,
        'Skantlyn'           => NS_TEMPLATE,
index cbc3b9b..884162e 100644 (file)
@@ -63,7 +63,6 @@ $namespaceAliases = array(
        'Diskussión_de_Xabblón'    => NS_MEDIAWIKI_TALK,
        'Xabblón'                  => NS_TEMPLATE,
        'Diskusyón_de_Xabblón'     => NS_TEMPLATE_TALK,
-       'Plantilla_Discusión'      => NS_TEMPLATE_TALK,
        'Diskussión_de_Ayudo'      => NS_HELP_TALK,
        'Kateggoría'               => NS_CATEGORY,
        'Diskussión_de_Kateggoría' => NS_CATEGORY_TALK,
index 2fc9aba..990892b 100644 (file)
@@ -44,7 +44,7 @@ $namespaceAliases = array(
        '$1_Discussão' => NS_PROJECT_TALK,
        'Ficheiro' => NS_FILE,
        'Ficheiro_Discussão' => NS_FILE_TALK,
-       'Imagem_Discussão' => NS_FILE,
+       'Imagem' => NS_FILE,
        'Imagem_Discussão' => NS_FILE_TALK,
        'MediaWiki_Discussão' => NS_MEDIAWIKI_TALK,
        'Predefinição' => NS_TEMPLATE,
index 4b8dd80..73e87c9 100644 (file)
@@ -50,7 +50,6 @@ $namespaceAliases = array(
        'Categorie'          => NS_CATEGORY,
        'Overleg_categorie'  => NS_CATEGORY_TALK,
        'Kattegerie'         => NS_CATEGORY,
-       'Overleg_categorie'  => NS_CATEGORY_TALK,
        'Overleg_kattegerie' => NS_HELP_TALK,
 );
 
index 54ecae8..68af6ea 100644 (file)
@@ -53,7 +53,6 @@ $namespaceAliases = array(
        'బొమ్మపై_చర్చ' => NS_FILE_TALK,
        'ఫైలు' => NS_FILE,
        'ఫైలుపై_చర్చ' => NS_FILE_TALK,
-       'బొమ్మపై_చర్చ' => NS_FILE_TALK,
        'సహాయము' => NS_HELP,
        'సహాయము_చర్చ' => NS_HELP_TALK,
 );
index fda12f9..5d76cdf 100644 (file)
@@ -101,7 +101,10 @@ abstract class Maintenance {
        // Generic options which might or not be supported by the script
        private $mDependantParameters = array();
 
-       // Used by getDD() / setDB()
+       /**
+        * Used by getDD() / setDB()
+        * @var DatabaseBase
+        */
        private $mDb = null;
 
        /**
index 6eccb26..04c65ba 100644 (file)
@@ -28,7 +28,7 @@
  * @ingroup Dump Maintenance
  */
 class DumpDBZip2Output extends DumpPipeOutput {
-       function DumpDBZip2Output( $file ) {
+       function __construct( $file ) {
                parent::__construct( "dbzip2", $file );
        }
 }
index 2b533ec..6752166 100644 (file)
@@ -43,9 +43,25 @@ class TextPassDumper extends BackupDumper {
 
        var $php = "php";
        var $spawn = false;
+
+       /**
+        * @var bool|resource
+        */
        var $spawnProc = false;
+
+       /**
+        * @var bool|resource
+        */
        var $spawnWrite = false;
+
+       /**
+        * @var bool|resource
+        */
        var $spawnRead = false;
+
+       /**
+        * @var bool|resource
+        */
        var $spawnErr = false;
 
        var $xmlwriterobj = false;
index af1f9ee..5887a75 100644 (file)
@@ -381,8 +381,8 @@ class CheckStorage {
                        $extDb->freeResult( $res );
 
                        // Print errors for missing blobs rows
-                       foreach ( $oldIds as $blobId => $oldIds ) {
-                               $this->error( 'restore text', "Error: missing target $cluster/$blobId for two-part ES URL", $oldIds );
+                       foreach ( $oldIds as $blobId => $oldIds2 ) {
+                               $this->error( 'restore text', "Error: missing target $cluster/$blobId for two-part ES URL", $oldIds2 );
                        }
                }
        }