Merge "Split mocks/media/MockBitmaphandler file"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sat, 16 Nov 2013 12:13:36 +0000 (12:13 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sat, 16 Nov 2013 12:13:36 +0000 (12:13 +0000)
82 files changed:
RELEASE-NOTES-1.23
docs/README
docs/maintenance.txt
extensions/README
includes/DefaultSettings.php
includes/Hooks.php
includes/Skin.php
includes/UserMailer.php
includes/WikiPage.php
includes/api/ApiPageSet.php
includes/api/ApiParamInfo.php
includes/api/ApiParse.php
includes/api/ApiProtect.php
includes/api/ApiPurge.php
includes/api/ApiQuery.php
includes/api/ApiQueryAllCategories.php
includes/api/ApiQueryAllImages.php
includes/api/ApiQueryAllLinks.php
includes/api/ApiQueryAllPages.php
includes/api/ApiQueryAllUsers.php
includes/api/ApiQueryBacklinks.php
includes/api/ApiQueryBase.php
includes/api/ApiQueryBlocks.php
includes/api/ApiQueryCategories.php
includes/api/ApiQueryCategoryInfo.php
includes/api/ApiQueryCategoryMembers.php
includes/api/ApiQueryDeletedrevs.php
includes/api/ApiQueryDuplicateFiles.php
includes/api/ApiQueryExtLinksUsage.php
includes/api/ApiQueryExternalLinks.php
includes/api/ApiQueryFileRepoInfo.php
includes/api/ApiQueryFilearchive.php
includes/api/ApiQueryIWBacklinks.php
includes/api/ApiQueryIWLinks.php
includes/api/ApiQueryImageInfo.php
includes/api/ApiQueryImages.php
includes/api/ApiQueryInfo.php
includes/api/ApiQueryLangBacklinks.php
includes/api/ApiQueryLangLinks.php
includes/api/ApiQueryLinks.php
includes/api/ApiQueryLogEvents.php
includes/api/ApiQueryPagePropNames.php
includes/api/ApiQueryPageProps.php
includes/changes/RecentChange.php
includes/content/ContentHandler.php
includes/db/DatabaseMysqlBase.php
includes/db/DatabasePostgres.php
includes/installer/WebInstaller.php
includes/profiler/ProfilerSimpleUDP.php
includes/specials/SpecialUserlogin.php
languages/Language.php
languages/messages/MessagesAr.php
languages/messages/MessagesAz.php
languages/messages/MessagesBcl.php
languages/messages/MessagesCs.php
languages/messages/MessagesDe.php
languages/messages/MessagesEn.php
languages/messages/MessagesFr.php
languages/messages/MessagesHy.php
languages/messages/MessagesIt.php
languages/messages/MessagesJa.php
languages/messages/MessagesKo.php
languages/messages/MessagesLb.php
languages/messages/MessagesPms.php
languages/messages/MessagesQqq.php
languages/messages/MessagesRo.php
languages/messages/MessagesRu.php
languages/messages/MessagesSr_ec.php
languages/messages/MessagesTl.php
languages/messages/MessagesUk.php
languages/messages/MessagesVi.php
languages/messages/MessagesYi.php
languages/messages/MessagesZh_hans.php
languages/messages/MessagesZh_hant.php
maintenance/archives/patch-val_ip.sql [deleted file]
maintenance/archives/patch-validate.sql [deleted file]
maintenance/postgres/mediawiki_mysql2postgres.pl
maintenance/rebuildrecentchanges.php
maintenance/tables.sql
resources/mediawiki.action/mediawiki.action.edit.js
tests/phpunit/includes/ArticleTablesTest.php
tests/phpunit/languages/LanguageTest.php

index 8ef5acd..d7c252a 100644 (file)
@@ -73,6 +73,8 @@ changes to languages because of Bugzilla reports.
 ** The rc_type field of recentchanges will be deprecated in a future point
    release.
 * The global variable $wgArticle has been removed after a lengthy deprecation.
+* The global functions addButton and insertTags (for mw.toolbar.addButton and
+  mw.toolbar.insertTags) now emits mw.log.warn when accessed.
 
 == Compatibility ==
 
index 6917076..5bc8bfc 100644 (file)
@@ -1,16 +1,19 @@
-[July 22nd 2008]
+/docs Directory README
+======================
 
 The 'docs' directory contain various text files that should help you understand
 the most important parts of the code of MediaWiki. More in-depth documentation
-can be found at http://www.mediawiki.org/wiki/Manual:Code.
+can be found at:
+  https://www.mediawiki.org/wiki/Manual:Code
 
 API documentation is automatically generated and updated daily at:
-  http://svn.wikimedia.org/doc/
+  https://doc.wikimedia.org/mediawiki-core/master/php/html/
 
 You can get a fresh version using 'make doc' or mwdocgen.php in the
 ../maintenance/ directory.
 
 
-For end user / administrators, most of the documentation is located online at:
-  http://www.mediawiki.org/wiki/Help:Contents
-  http://www.mediawiki.org/wiki/Manual:Contents
+For end users, most of the documentation is located online at:
+  https://www.mediawiki.org/wiki/Help:Contents
+Documentation for MediaWiki site administrators is at:
+  https://www.mediawiki.org/wiki/Manual:Contents
index 87a32a8..87071f2 100644 (file)
@@ -54,4 +54,4 @@ require_once RUN_MAINTENANCE_IF_MAIN;
 That's it. In the execute() method, you have access to all of the normal
 MediaWiki functions, so you can get a DB connection, use the cache, etc.
 For full docs on the Maintenance class, see the auto-generated docs at
-http://svn.wikimedia.org/doc/classMaintenance.html
+https://doc.wikimedia.org/mediawiki-core/master/php/html/classMaintenance.html
index e815062..b665001 100644 (file)
@@ -2,20 +2,22 @@ Extensions (such as the hieroglyphic module WikiHiero) are distributed
 separately. Drop them into this extensions directory and enable as
 per the extension's directions.
 
+You can find a list of extensions and documentation on the MediaWiki website:
+    https://www.mediawiki.org/wiki/Category:Extensions
+
+
 If you are a developer, you want to fetch the extension tree in another
 directory and make a symbolic link:
 
  mediawiki/extensions$ ln -s ../../extensions-trunk/FooBarExt
 
-The extensions are available through Git:
+Most extensions are available through Git:
     https://gerrit.wikimedia.org/r/#/admin/projects/
+    https://git.wikimedia.org/project/mediawiki
 
-or Subversion:
+Old extensions are on Subversion:
     https://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/
 
-You can find documentation and additional extensions on MediaWiki website:
-    https://www.mediawiki.org/wiki/Category:Extensions
-
 
 Please note that under POSIX systems (Linux...), parent of a symbolic path
 refers to the link source, NOT to the target! You should check the env
index 5a1e82f..d428910 100644 (file)
@@ -5032,7 +5032,8 @@ $wgProfilePerHost = false;
  * Host for UDP profiler.
  *
  * The host should be running a daemon which can be obtained from MediaWiki
- * Subversion at: http://svn.wikimedia.org/svnroot/mediawiki/trunk/udpprofile
+ * Git at: 
+ * http://git.wikimedia.org/tree/operations%2Fsoftware.git/master/udpprofile
  */
 $wgUDPProfilerHost = '127.0.0.1';
 
index 396e360..db47d31 100644 (file)
@@ -199,6 +199,9 @@ class Hooks {
                                $retval = call_user_func_array( $callback, $hook_args );
                        } catch ( MWHookException $e ) {
                                $badhookmsg = $e->getMessage();
+                       } catch ( Exception $e ) {
+                               restore_error_handler();
+                               throw $e;
                        }
                        restore_error_handler();
                        wfProfileOut( $func );
index 170e96f..a71bafc 100644 (file)
@@ -1559,7 +1559,7 @@ abstract class Skin extends ContextSource {
         * editSectionLinkForOther().
         *
         * @param $nt      Title  The title being linked to (may not be the same as
-        *   $wgTitle, if the section is included from a template)
+        *   the current page, if the section is included from a template)
         * @param string $section The designation of the section being pointed to,
         *   to be included in the link, like "&section=$section"
         * @param string $tooltip The tooltip to use for the link: will be escaped
index 8ab10b2..6157f78 100644 (file)
@@ -352,14 +352,19 @@ class UserMailer {
                        ini_set( 'html_errors', '0' );
                        set_error_handler( 'UserMailer::errorHandler' );
 
-                       $safeMode = wfIniGetBool( 'safe_mode' );
-
-                       foreach ( $to as $recip ) {
-                               if ( $safeMode ) {
-                                       $sent = mail( $recip, self::quotedPrintable( $subject ), $body, $headers );
-                               } else {
-                                       $sent = mail( $recip, self::quotedPrintable( $subject ), $body, $headers, $wgAdditionalMailParams );
+                       try {
+                               $safeMode = wfIniGetBool( 'safe_mode' );
+
+                               foreach ( $to as $recip ) {
+                                       if ( $safeMode ) {
+                                               $sent = mail( $recip, self::quotedPrintable( $subject ), $body, $headers );
+                                       } else {
+                                               $sent = mail( $recip, self::quotedPrintable( $subject ), $body, $headers, $wgAdditionalMailParams );
+                                       }
                                }
+                       } catch ( Exception $e ) {
+                               restore_error_handler();
+                               throw $e;
                        }
 
                        restore_error_handler();
index 576979c..5fc01cc 100644 (file)
@@ -48,9 +48,11 @@ class WikiPage implements Page, IDBAccessObject {
        public $mDataLoaded = false;         // !< Boolean
        public $mIsRedirect = false;         // !< Boolean
        public $mLatest = false;             // !< Integer (false means "not loaded")
-       public $mPreparedEdit = false;       // !< Array
        /**@}}*/
 
+       /** @var stdclass Map of cache fields (text, parser output, ect) for a proposed/new edit */
+       protected $mPreparedEdit = false;
+
        /**
         * @var int
         */
@@ -242,7 +244,9 @@ class WikiPage implements Page, IDBAccessObject {
                $this->mTimestamp = '';
                $this->mIsRedirect = false;
                $this->mLatest = false;
-               $this->mPreparedEdit = false;
+               // Bug 57026: do not clear mPreparedEdit since prepareTextForEdit() already checks
+               // the requested rev ID and immutable content against the cached one.
+               // Clearing it can cause extra parses on edit for no reason.
        }
 
        /**
index cfbc095..6c4bb08 100644 (file)
@@ -112,7 +112,8 @@ class ApiPageSet extends ApiBase {
 
        /**
         * Populate the PageSet from the request parameters.
-        * @param bool $isDryRun If true, instantiates generator, but only to mark relevant parameters as used
+        * @param bool $isDryRun If true, instantiates generator, but only to mark
+        *    relevant parameters as used
         */
        private function executeInternal( $isDryRun ) {
                $this->profileIn();
@@ -200,8 +201,9 @@ class ApiPageSet extends ApiBase {
                                                break;
                                        case 'revids':
                                                if ( $this->mResolveRedirects ) {
-                                                       $this->setWarning( 'Redirect resolution cannot be used together with the revids= parameter. ' .
-                                                               'Any redirects the revids= point to have not been resolved.' );
+                                                       $this->setWarning( 'Redirect resolution cannot be used ' .
+                                                               'together with the revids= parameter. Any redirects ' .
+                                                               'the revids= point to have not been resolved.' );
                                                }
                                                $this->mResolveRedirects = false;
                                                $this->initFromRevIDs( $this->mParams['revids'] );
@@ -870,7 +872,12 @@ class ApiPageSet extends ApiBase {
                foreach ( $res as $row ) {
                        $rdfrom = intval( $row->rd_from );
                        $from = $this->mPendingRedirectIDs[$rdfrom]->getPrefixedText();
-                       $to = Title::makeTitle( $row->rd_namespace, $row->rd_title, $row->rd_fragment, $row->rd_interwiki );
+                       $to = Title::makeTitle(
+                               $row->rd_namespace,
+                               $row->rd_title,
+                               $row->rd_fragment,
+                               $row->rd_interwiki
+                       );
                        unset( $this->mPendingRedirectIDs[$rdfrom] );
                        if ( !$to->isExternal() && !isset( $this->mAllPages[$row->rd_namespace][$row->rd_title] ) ) {
                                $lb->add( $row->rd_namespace, $row->rd_title );
@@ -1086,19 +1093,34 @@ class ApiPageSet extends ApiBase {
                        'titles' => 'A list of titles to work on',
                        'pageids' => 'A list of page IDs to work on',
                        'revids' => 'A list of revision IDs to work on',
-                       'generator' => array( 'Get the list of pages to work on by executing the specified query module.',
-                               'NOTE: generator parameter names must be prefixed with a \'g\', see examples' ),
+                       'generator' => array(
+                               'Get the list of pages to work on by executing the specified query module.',
+                               'NOTE: generator parameter names must be prefixed with a \'g\', see examples'
+                       ),
                        'redirects' => 'Automatically resolve redirects',
-                       'converttitles' => array( 'Convert titles to other variants if necessary. Only works if the wiki\'s content language supports variant conversion.',
-                               'Languages that support variant conversion include ' . implode( ', ', LanguageConverter::$languagesWithVariants ) ),
+                       'converttitles' => array(
+                               'Convert titles to other variants if necessary. Only works if ' .
+                                       'the wiki\'s content language supports variant conversion.',
+                               'Languages that support variant conversion include ' .
+                                       implode( ', ', LanguageConverter::$languagesWithVariants )
+                       ),
                );
        }
 
        public function getPossibleErrors() {
                return array_merge( parent::getPossibleErrors(), array(
-                       array( 'code' => 'multisource', 'info' => "Cannot use 'pageids' at the same time as 'dataSource'" ),
-                       array( 'code' => 'multisource', 'info' => "Cannot use 'revids' at the same time as 'dataSource'" ),
-                       array( 'code' => 'badgenerator', 'info' => 'Module $generatorName cannot be used as a generator' ),
+                       array(
+                               'code' => 'multisource',
+                               'info' => "Cannot use 'pageids' at the same time as 'dataSource'"
+                       ),
+                       array(
+                               'code' => 'multisource',
+                               'info' => "Cannot use 'revids' at the same time as 'dataSource'"
+                       ),
+                       array(
+                               'code' => 'badgenerator',
+                               'info' => 'Module $generatorName cannot be used as a generator'
+                       ),
                ) );
        }
 }
index 7ecf71f..2b4710a 100644 (file)
@@ -226,7 +226,8 @@ class ApiParamInfo extends ApiBase {
                        if ( isset( $p[ApiBase::PARAM_TYPE] ) ) {
                                $a['type'] = $p[ApiBase::PARAM_TYPE];
                                if ( is_array( $a['type'] ) ) {
-                                       $a['type'] = array_values( $a['type'] ); // to prevent sparse arrays from being serialized to JSON as objects
+                                       // To prevent sparse arrays from being serialized to JSON as objects
+                                       $a['type'] = array_values( $a['type'] );
                                        $result->setIndexedTagName( $a['type'], 't' );
                                }
                        }
@@ -341,7 +342,8 @@ class ApiParamInfo extends ApiBase {
                        'modules' => 'List of module names (value of the action= parameter)',
                        'querymodules' => 'List of query module names (value of prop=, meta= or list= parameter)',
                        'mainmodule' => 'Get information about the main (top-level) module as well',
-                       'pagesetmodule' => 'Get information about the pageset module (providing titles= and friends) as well',
+                       'pagesetmodule' => 'Get information about the pageset module ' .
+                               '(providing titles= and friends) as well',
                        'formatmodules' => 'List of format module names (value of format= parameter)',
                );
        }
index 91a3a99..3e2e5a8 100644 (file)
@@ -60,7 +60,10 @@ class ApiParse extends ApiBase {
                $format = $params['contentformat'];
 
                if ( !is_null( $page ) && ( !is_null( $text ) || $titleProvided ) ) {
-                       $this->dieUsage( 'The page parameter cannot be used together with the text and title parameters', 'params' );
+                       $this->dieUsage(
+                               'The page parameter cannot be used together with the text and title parameters',
+                               'params'
+                       );
                }
 
                $prop = array_flip( $params['prop'] );
@@ -76,9 +79,12 @@ class ApiParse extends ApiBase {
                // TODO: Does this still need $wgTitle?
                global $wgParser, $wgTitle;
 
-               // Currently unnecessary, code to act as a safeguard against any change in current behavior of uselang
+               // Currently unnecessary, code to act as a safeguard against any change
+               // in current behavior of uselang
                $oldLang = null;
-               if ( isset( $params['uselang'] ) && $params['uselang'] != $this->getContext()->getLanguage()->getCode() ) {
+               if ( isset( $params['uselang'] )
+                       && $params['uselang'] != $this->getContext()->getLanguage()->getCode()
+               ) {
                        $oldLang = $this->getContext()->getLanguage(); // Backup language
                        $this->getContext()->setLanguage( Language::factory( $params['uselang'] ) );
                }
@@ -250,7 +256,10 @@ class ApiParse extends ApiBase {
 
                if ( !is_null( $params['summary'] ) ) {
                        $result_array['parsedsummary'] = array();
-                       ApiResult::setContent( $result_array['parsedsummary'], Linker::formatComment( $params['summary'], $titleObj ) );
+                       ApiResult::setContent(
+                               $result_array['parsedsummary'],
+                               Linker::formatComment( $params['summary'], $titleObj )
+                       );
                }
 
                if ( isset( $prop['langlinks'] ) || isset( $prop['languageshtml'] ) ) {
@@ -322,7 +331,10 @@ class ApiParse extends ApiBase {
 
                        if ( isset( $prop['headhtml'] ) ) {
                                $result_array['headhtml'] = array();
-                               ApiResult::setContent( $result_array['headhtml'], $context->getOutput()->headElement( $context->getSkin() ) );
+                               ApiResult::setContent(
+                                       $result_array['headhtml'],
+                                       $context->getOutput()->headElement( $context->getSkin() )
+                               );
                        }
                }
 
@@ -512,7 +524,8 @@ class ApiParse extends ApiBase {
        }
 
        /**
-        * @deprecated since 1.18 No modern skin generates language links this way, please use language links
+        * @deprecated since 1.18 No modern skin generates language links this way,
+        * please use language links
         *                        data to generate your own HTML.
         * @param $languages array
         * @return string
@@ -526,7 +539,8 @@ class ApiParse extends ApiBase {
                        return '';
                }
 
-               $s = htmlspecialchars( wfMessage( 'otherlanguages' )->text() . wfMessage( 'colon-separator' )->text() );
+               $s = htmlspecialchars( wfMessage( 'otherlanguages' )->text() .
+                       wfMessage( 'colon-separator' )->text() );
 
                $langs = array();
                foreach ( $languages as $l ) {
@@ -642,7 +656,8 @@ class ApiParse extends ApiBase {
                                ApiBase::PARAM_TYPE => 'integer',
                        ),
                        'prop' => array(
-                               ApiBase::PARAM_DFLT => 'text|langlinks|categories|links|templates|images|externallinks|sections|revid|displaytitle|iwlinks|properties',
+                               ApiBase::PARAM_DFLT => 'text|langlinks|categories|links|templates|' .
+                                       'images|externallinks|sections|revid|displaytitle|iwlinks|properties',
                                ApiBase::PARAM_ISMULTI => true,
                                ApiBase::PARAM_TYPE => array(
                                        'text',
@@ -751,7 +766,8 @@ class ApiParse extends ApiBase {
 
                return array(
                        'Parses content and returns parser output',
-                       'See the various prop-Modules of action=query to get information from the current version of a page',
+                       'See the various prop-Modules of action=query to get information from the current' .
+                               'version of a page',
                        'There are several ways to specify the text to parse:',
                        "1) Specify a page or revision, using {$p}page, {$p}pageid, or {$p}oldid.",
                        "2) Specify content explicitly, using {$p}text, {$p}title, and {$p}contentmodel.",
@@ -761,15 +777,24 @@ class ApiParse extends ApiBase {
 
        public function getPossibleErrors() {
                return array_merge( parent::getPossibleErrors(), array(
-                       array( 'code' => 'params', 'info' => 'The page parameter cannot be used together with the text and title parameters' ),
+                       array(
+                               'code' => 'params',
+                               'info' => 'The page parameter cannot be used together with the text and title parameters'
+                       ),
                        array( 'code' => 'missingrev', 'info' => 'There is no revision ID oldid' ),
-                       array( 'code' => 'permissiondenied', 'info' => 'You don\'t have permission to view deleted revisions' ),
+                       array(
+                               'code' => 'permissiondenied',
+                               'info' => 'You don\'t have permission to view deleted revisions'
+                       ),
                        array( 'code' => 'missingtitle', 'info' => 'The page you specified doesn\'t exist' ),
                        array( 'code' => 'nosuchsection', 'info' => 'There is no section sectionnumber in page' ),
                        array( 'nosuchpageid' ),
                        array( 'invalidtitle', 'title' ),
                        array( 'code' => 'parseerror', 'info' => 'Failed to parse the given text.' ),
-                       array( 'code' => 'notwikitext', 'info' => 'The requested operation is only supported on wikitext content.' ),
+                       array(
+                               'code' => 'notwikitext',
+                               'info' => 'The requested operation is only supported on wikitext content.'
+                       ),
                        array( 'code' => 'pagecannotexist', 'info' => "Namespace doesn't allow actual pages" ),
                ) );
        }
@@ -778,7 +803,8 @@ class ApiParse extends ApiBase {
                return array(
                        'api.php?action=parse&page=Project:Sandbox' => 'Parse a page',
                        'api.php?action=parse&text={{Project:Sandbox}}' => 'Parse wikitext',
-                       'api.php?action=parse&text={{PAGENAME}}&title=Test' => 'Parse wikitext, specifying the page title',
+                       'api.php?action=parse&text={{PAGENAME}}&title=Test'
+                               => 'Parse wikitext, specifying the page title',
                        'api.php?action=parse&summary=Some+[[link]]&prop=' => 'Parse a summary',
                );
        }
index 25727d0..80c76b3 100644 (file)
@@ -28,7 +28,6 @@
  * @ingroup API
  */
 class ApiProtect extends ApiBase {
-
        public function execute() {
                global $wgRestrictionLevels;
                $params = $this->extractRequestParams();
@@ -47,7 +46,11 @@ class ApiProtect extends ApiBase {
                        if ( count( $expiry ) == 1 ) {
                                $expiry = array_fill( 0, count( $params['protections'] ), $expiry[0] );
                        } else {
-                               $this->dieUsageMsg( array( 'toofewexpiries', count( $expiry ), count( $params['protections'] ) ) );
+                               $this->dieUsageMsg( array(
+                                       'toofewexpiries',
+                                       count( $expiry ),
+                                       count( $params['protections'] )
+                               ) );
                        }
                }
 
@@ -100,7 +103,13 @@ class ApiProtect extends ApiBase {
                $watch = $params['watch'] ? 'watch' : $params['watchlist'];
                $this->setWatch( $watch, $titleObj, 'watchdefault' );
 
-               $status = $pageObj->doUpdateRestrictions( $protections, $expiryarray, $cascade, $params['reason'], $this->getUser() );
+               $status = $pageObj->doUpdateRestrictions(
+                       $protections,
+                       $expiryarray,
+                       $cascade,
+                       $params['reason'],
+                       $this->getUser()
+               );
 
                if ( !$status->isOK() ) {
                        $this->dieStatus( $status );
@@ -173,13 +182,19 @@ class ApiProtect extends ApiBase {
                        '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' => '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.',
-                               'Use \'infinite\', \'indefinite\' or \'never\', for a never-expiring protection.' ),
+                       'expiry' => array(
+                               'Expiry timestamps. If only one timestamp is ' .
+                                       'set, it\'ll be used for all protections.',
+                               'Use \'infinite\', \'indefinite\' or \'never\', for a never-expiring protection.'
+                       ),
                        'reason' => 'Reason for (un)protecting',
-                       'cascade' => array( 'Enable cascading protection (i.e. protect pages included in this page)',
-                               'Ignored if not all protection levels are \'sysop\' or \'protect\'' ),
+                       'cascade' => array(
+                               'Enable cascading protection (i.e. protect pages included in this page)',
+                               'Ignored if not all protection levels are \'sysop\' or \'protect\''
+                       ),
                        'watch' => 'If set, add the page being (un)protected to your watchlist',
-                       'watchlist' => 'Unconditionally add or remove the page from your watchlist, use preferences or do not change watch',
+                       'watchlist' => 'Unconditionally add or remove the page from your ' .
+                               'watchlist, use preferences or do not change watch',
                );
        }
 
@@ -222,8 +237,10 @@ class ApiProtect extends ApiBase {
 
        public function getExamples() {
                return array(
-                       'api.php?action=protect&title=Main%20Page&token=123ABC&protections=edit=sysop|move=sysop&cascade=&expiry=20070901163000|never',
-                       'api.php?action=protect&title=Main%20Page&token=123ABC&protections=edit=all|move=all&reason=Lifting%20restrictions'
+                       'api.php?action=protect&title=Main%20Page&token=123ABC&' .
+                               'protections=edit=sysop|move=sysop&cascade=&expiry=20070901163000|never',
+                       'api.php?action=protect&title=Main%20Page&token=123ABC&' .
+                               'protections=edit=all|move=all&reason=Lifting%20restrictions'
                );
        }
 
index 4c7981e..c0dd808 100644 (file)
@@ -30,7 +30,6 @@
  * @ingroup API
  */
 class ApiPurge extends ApiBase {
-
        private $mPageSet;
 
        /**
@@ -91,7 +90,12 @@ class ApiPurge extends ApiBase {
 
                                        # Parse content; note that HTML generation is only needed if we want to cache the result.
                                        $content = $page->getContent( Revision::RAW );
-                                       $p_result = $content->getParserOutput( $title, $page->getLatest(), $popts, $wgEnableParserCache );
+                                       $p_result = $content->getParserOutput(
+                                               $title,
+                                               $page->getLatest(),
+                                               $popts,
+                                               $wgEnableParserCache
+                                       );
 
                                        # Update the links tables
                                        $updates = $content->getSecondaryDataUpdates(
index ea57196..79a3b05 100644 (file)
@@ -708,25 +708,32 @@ class ApiQuery extends ApiBase {
 
        public function getParamDescription() {
                return $this->getPageSet()->getFinalParamDescription() + array(
-                       'prop' => 'Which properties to get for the titles/revisions/pageids. Module help is available below',
+                       'prop' => 'Which properties to get for the titles/revisions/pageids. ' .
+                               'Module help is available below',
                        'list' => 'Which lists to get. Module help is available below',
                        'meta' => 'Which metadata to get about the site. Module help is available below',
                        'indexpageids' => 'Include an additional pageids section listing all returned page IDs',
                        'export' => 'Export the current revisions of all given or generated pages',
-                       'exportnowrap' => 'Return the export XML without wrapping it in an XML result (same format as Special:Export). Can only be used with export',
+                       'exportnowrap' => 'Return the export XML without wrapping it in an '.
+                               'XML result (same format as Special:Export). Can only be used with export',
                        'iwurl' => 'Whether to get the full URL if the title is an interwiki link',
                        'continue' => array(
-                               'When present, formats query-continue as key-value pairs that should simply be merged into the original request.',
+                               'When present, formats query-continue as key-value pairs that ' .
+                                       'should simply be merged into the original request.',
                                'This parameter must be set to an empty string in the initial query.',
-                               'This parameter is recommended for all new development, and will be made default in the next API version.' ),
+                               'This parameter is recommended for all new development, and ' .
+                                       'will be made default in the next API version.'
+                       ),
                );
        }
 
        public function getDescription() {
                return array(
-                       'Query API module allows applications to get needed pieces of data from the MediaWiki databases,',
+                       'Query API module allows applications to get needed pieces of data ' .
+                               'from the MediaWiki databases,',
                        'and is loosely based on the old query.php interface.',
-                       'All data modifications will first have to use query to acquire a token to prevent abuse from malicious sites'
+                       'All data modifications will first have to use query to acquire a ' .
+                               'token to prevent abuse from malicious sites'
                );
        }
 
@@ -739,7 +746,8 @@ class ApiQuery extends ApiBase {
 
        public function getExamples() {
                return array(
-                       'api.php?action=query&prop=revisions&meta=siteinfo&titles=Main%20Page&rvprop=user|comment&continue=',
+                       'api.php?action=query&prop=revisions&meta=siteinfo&' .
+                               'titles=Main%20Page&rvprop=user|comment&continue=',
                        'api.php?action=query&generator=allpages&gapprefix=API/&prop=revisions&continue=',
                );
        }
index 5ef71f0..d0ab59e 100644 (file)
@@ -80,7 +80,8 @@ class ApiQueryAllCategories extends ApiQueryGeneratorBase {
                }
 
                if ( isset( $params['prefix'] ) ) {
-                       $this->addWhere( 'cat_title' . $db->buildLike( $this->titlePartToKey( $params['prefix'] ), $db->anyString() ) );
+                       $this->addWhere( 'cat_title' .
+                               $db->buildLike( $this->titlePartToKey( $params['prefix'] ), $db->anyString() ) );
                }
 
                $this->addOption( 'LIMIT', $params['limit'] + 1 );
@@ -110,7 +111,8 @@ class ApiQueryAllCategories extends ApiQueryGeneratorBase {
                $count = 0;
                foreach ( $res as $row ) {
                        if ( ++$count > $params['limit'] ) {
-                               // We've reached the one extra which shows that there are additional cats to be had. Stop here...
+                               // We've reached the one extra which shows that there are
+                               // additional cats to be had. Stop here...
                                $this->setContinueEnumParameter( 'continue', $row->cat_title );
                                break;
                        }
index 5baee8d..9f97cac 100644 (file)
@@ -32,7 +32,6 @@
  * @ingroup API
  */
 class ApiQueryAllImages extends ApiQueryGeneratorBase {
-
        protected $mRepo;
 
        public function __construct( $query, $moduleName ) {
@@ -65,7 +64,11 @@ class ApiQueryAllImages extends ApiQueryGeneratorBase {
         */
        public function executeGenerator( $resultPageSet ) {
                if ( $resultPageSet->isResolvingRedirects() ) {
-                       $this->dieUsage( 'Use "gaifilterredir=nonredirects" option instead of "redirects" when using allimages as a generator', 'params' );
+                       $this->dieUsage(
+                               'Use "gaifilterredir=nonredirects" option instead of "redirects" ' .
+                                       'when using allimages as a generator',
+                               'params'
+                       );
                }
 
                $this->run( $resultPageSet );
@@ -78,7 +81,10 @@ class ApiQueryAllImages extends ApiQueryGeneratorBase {
        private function run( $resultPageSet = null ) {
                $repo = $this->mRepo;
                if ( !$repo instanceof LocalRepo ) {
-                       $this->dieUsage( 'Local file repository does not support querying all images', 'unsupportedrepo' );
+                       $this->dieUsage(
+                               'Local file repository does not support querying all images',
+                               'unsupportedrepo'
+                       );
                }
 
                $prefix = $this->getModulePrefix();
@@ -103,11 +109,17 @@ class ApiQueryAllImages extends ApiQueryGeneratorBase {
                        $disallowed = array( 'start', 'end', 'user' );
                        foreach ( $disallowed as $pname ) {
                                if ( isset( $params[$pname] ) ) {
-                                       $this->dieUsage( "Parameter '{$prefix}{$pname}' can only be used with {$prefix}sort=timestamp", 'badparams' );
+                                       $this->dieUsage(
+                                               "Parameter '{$prefix}{$pname}' can only be used with {$prefix}sort=timestamp",
+                                               'badparams'
+                                       );
                                }
                        }
                        if ( $params['filterbots'] != 'all' ) {
-                               $this->dieUsage( "Parameter '{$prefix}filterbots' can only be used with {$prefix}sort=timestamp", 'badparams' );
+                               $this->dieUsage(
+                                       "Parameter '{$prefix}filterbots' can only be used with {$prefix}sort=timestamp",
+                                       'badparams'
+                               );
                        }
 
                        // Pagination
@@ -125,23 +137,36 @@ class ApiQueryAllImages extends ApiQueryGeneratorBase {
                        $this->addWhereRange( 'img_name', ( $ascendingOrder ? 'newer' : 'older' ), $from, $to );
 
                        if ( isset( $params['prefix'] ) ) {
-                               $this->addWhere( 'img_name' . $db->buildLike( $this->titlePartToKey( $params['prefix'] ), $db->anyString() ) );
+                               $this->addWhere( 'img_name' .
+                                       $db->buildLike( $this->titlePartToKey( $params['prefix'] ), $db->anyString() ) );
                        }
                } else {
                        // Check mutually exclusive params
                        $disallowed = array( 'from', 'to', 'prefix' );
                        foreach ( $disallowed as $pname ) {
                                if ( isset( $params[$pname] ) ) {
-                                       $this->dieUsage( "Parameter '{$prefix}{$pname}' can only be used with {$prefix}sort=name", 'badparams' );
+                                       $this->dieUsage(
+                                               "Parameter '{$prefix}{$pname}' can only be used with {$prefix}sort=name",
+                                               'badparams'
+                                       );
                                }
                        }
                        if ( !is_null( $params['user'] ) && $params['filterbots'] != 'all' ) {
-                               // Since filterbots checks if each user has the bot right, it doesn't make sense to use it with user
-                               $this->dieUsage( "Parameters '{$prefix}user' and '{$prefix}filterbots' cannot be used together", 'badparams' );
+                               // Since filterbots checks if each user has the bot right, it
+                               // doesn't make sense to use it with user
+                               $this->dieUsage(
+                                       "Parameters '{$prefix}user' and '{$prefix}filterbots' cannot be used together",
+                                       'badparams'
+                               );
                        }
 
                        // Pagination
-                       $this->addTimestampWhereRange( 'img_timestamp', ( $ascendingOrder ? 'newer' : 'older' ), $params['start'], $params['end'] );
+                       $this->addTimestampWhereRange(
+                               'img_timestamp',
+                               $ascendingOrder ? 'newer' : 'older',
+                               $params['start'],
+                               $params['end']
+                       );
 
                        // Image filters
                        if ( !is_null( $params['user'] ) ) {
@@ -223,7 +248,8 @@ class ApiQueryAllImages extends ApiQueryGeneratorBase {
                $result = $this->getResult();
                foreach ( $res as $row ) {
                        if ( ++$count > $limit ) {
-                               // We've reached the one extra which shows that there are additional pages to be had. Stop here...
+                               // We've reached the one extra which shows that there are
+                               // additional pages to be had. Stop here...
                                if ( $params['sort'] == 'name' ) {
                                        $this->setContinueEnumParameter( 'continue', $row->img_name );
                                } else {
@@ -336,13 +362,16 @@ class ApiQueryAllImages extends ApiQueryGeneratorBase {
                        'start' => "The timestamp to start enumerating from. Can only be used with {$p}sort=timestamp",
                        'end' => "The timestamp to end enumerating. Can only be used with {$p}sort=timestamp",
                        'prop' => ApiQueryImageInfo::getPropertyDescriptions( $this->propertyFilter ),
-                       'prefix' => "Search for all image titles that begin with this value. Can only be used with {$p}sort=name",
+                       'prefix' => "Search for all image titles that begin with this " .
+                               "value. Can only be used with {$p}sort=name",
                        'minsize' => 'Limit to images with at least this many bytes',
                        'maxsize' => 'Limit to images with at most this many bytes',
                        'sha1' => "SHA1 hash of image. Overrides {$p}sha1base36",
                        'sha1base36' => 'SHA1 hash of image in base 36 (used in MediaWiki)',
-                       'user' => "Only return files uploaded by this user. Can only be used with {$p}sort=timestamp. Cannot be used together with {$p}filterbots",
-                       'filterbots' => "How to filter files uploaded by bots. Can only be used with {$p}sort=timestamp. Cannot be used together with {$p}user",
+                       'user' => "Only return files uploaded by this user. Can only be used " .
+                               "with {$p}sort=timestamp. Cannot be used together with {$p}filterbots",
+                       'filterbots' => "How to filter files uploaded by bots. Can only be " .
+                               "used with {$p}sort=timestamp. Cannot be used together with {$p}user",
                        'mime' => 'What MIME type to search for. e.g. image/jpeg. Disabled in Miser Mode',
                        'limit' => 'How many images in total to return',
                );
@@ -371,19 +400,52 @@ class ApiQueryAllImages extends ApiQueryGeneratorBase {
                $p = $this->getModulePrefix();
 
                return array_merge( parent::getPossibleErrors(), array(
-                       array( 'code' => 'params', 'info' => 'Use "gaifilterredir=nonredirects" option instead of "redirects" when using allimages as a generator' ),
-                       array( 'code' => 'badparams', 'info' => "Parameter'{$p}start' can only be used with {$p}sort=timestamp" ),
-                       array( 'code' => 'badparams', 'info' => "Parameter'{$p}end' can only be used with {$p}sort=timestamp" ),
-                       array( 'code' => 'badparams', 'info' => "Parameter'{$p}user' can only be used with {$p}sort=timestamp" ),
-                       array( 'code' => 'badparams', 'info' => "Parameter'{$p}filterbots' can only be used with {$p}sort=timestamp" ),
-                       array( 'code' => 'badparams', 'info' => "Parameter'{$p}from' can only be used with {$p}sort=name" ),
-                       array( 'code' => 'badparams', 'info' => "Parameter'{$p}to' can only be used with {$p}sort=name" ),
-                       array( 'code' => 'badparams', 'info' => "Parameter'{$p}prefix' can only be used with {$p}sort=name" ),
-                       array( 'code' => 'badparams', 'info' => "Parameters '{$p}user' and '{$p}filterbots' cannot be used together" ),
-                       array( 'code' => 'unsupportedrepo', 'info' => 'Local file repository does not support querying all images' ),
+                       array(
+                               'code' => 'params',
+                               'info' => 'Use "gaifilterredir=nonredirects" option instead ' .
+                                       'of "redirects" when using allimages as a generator'
+                       ),
+                       array(
+                               'code' => 'badparams',
+                               'info' => "Parameter'{$p}start' can only be used with {$p}sort=timestamp"
+                       ),
+                       array(
+                               'code' => 'badparams',
+                               'info' => "Parameter'{$p}end' can only be used with {$p}sort=timestamp"
+                       ),
+                       array(
+                               'code' => 'badparams',
+                               'info' => "Parameter'{$p}user' can only be used with {$p}sort=timestamp"
+                       ),
+                       array(
+                               'code' => 'badparams',
+                               'info' => "Parameter'{$p}filterbots' can only be used with {$p}sort=timestamp"
+                       ),
+                       array(
+                               'code' => 'badparams',
+                               'info' => "Parameter'{$p}from' can only be used with {$p}sort=name"
+                       ),
+                       array(
+                               'code' => 'badparams',
+                               'info' => "Parameter'{$p}to' can only be used with {$p}sort=name"
+                       ),
+                       array(
+                               'code' => 'badparams',
+                               'info' => "Parameter'{$p}prefix' can only be used with {$p}sort=name"
+                       ),
+                       array(
+                               'code' => 'badparams',
+                               'info' => "Parameters '{$p}user' and '{$p}filterbots' cannot be used together"
+                       ),
+                       array(
+                               'code' => 'unsupportedrepo',
+                               'info' => 'Local file repository does not support querying all images' ),
                        array( 'code' => 'mimesearchdisabled', 'info' => 'MIME search disabled in Miser Mode' ),
                        array( 'code' => 'invalidsha1hash', 'info' => 'The SHA1 hash provided is not valid' ),
-                       array( 'code' => 'invalidsha1base36hash', 'info' => 'The SHA1Base36 hash provided is not valid' ),
+                       array(
+                               'code' => 'invalidsha1base36hash',
+                               'info' => 'The SHA1Base36 hash provided is not valid'
+                       ),
                ) );
        }
 
@@ -393,11 +455,13 @@ class ApiQueryAllImages extends ApiQueryGeneratorBase {
                                'Simple Use',
                                'Show a list of files starting at the letter "B"',
                        ),
-                       'api.php?action=query&list=allimages&aiprop=user|timestamp|url&aisort=timestamp&aidir=older' => array(
+                       'api.php?action=query&list=allimages&aiprop=user|timestamp|url&' .
+                               'aisort=timestamp&aidir=older' => array(
                                'Simple Use',
                                'Show a list of recently uploaded files similar to Special:NewFiles',
                        ),
-                       'api.php?action=query&generator=allimages&gailimit=4&gaifrom=T&prop=imageinfo' => array(
+                       'api.php?action=query&generator=allimages&gailimit=4&' .
+                               'gaifrom=T&prop=imageinfo' => array(
                                'Using as Generator',
                                'Show info about 4 files starting at the letter "T"',
                        ),
index 47f4505..ff53d0f 100644 (file)
@@ -54,7 +54,8 @@ class ApiQueryAllLinks extends ApiQueryGeneratorBase {
                                $this->dfltNamespace = NS_TEMPLATE;
                                $this->hasNamespace = true;
                                $this->indexTag = 't';
-                               $this->description = 'List all transclusions (pages embedded using {{x}}), including non-existing';
+                               $this->description =
+                                       'List all transclusions (pages embedded using {{x}}), including non-existing';
                                $this->descriptionWhat = 'transclusion';
                                $this->descriptionTargets = 'transcluded titles';
                                $this->descriptionLinking = 'transcluding';
@@ -113,8 +114,10 @@ class ApiQueryAllLinks extends ApiQueryGeneratorBase {
                if ( $params['unique'] ) {
                        if ( $fld_ids ) {
                                $this->dieUsage(
-                                       "{$this->getModuleName()} cannot return corresponding page ids in unique {$this->descriptionWhat}s mode",
-                                       'params' );
+                                       "{$this->getModuleName()} cannot return corresponding page " .
+                                               "ids in unique {$this->descriptionWhat}s mode",
+                                       'params'
+                               );
                        }
                        $this->addOption( 'DISTINCT' );
                }
@@ -145,12 +148,15 @@ class ApiQueryAllLinks extends ApiQueryGeneratorBase {
                }
 
                // 'continue' always overrides 'from'
-               $from = ( $continue || is_null( $params['from'] ) ? null : $this->titlePartToKey( $params['from'] ) );
+               $from = $continue || is_null( $params['from'] )
+                       ? null
+                       : $this->titlePartToKey( $params['from'] );
                $to = ( is_null( $params['to'] ) ? null : $this->titlePartToKey( $params['to'] ) );
                $this->addWhereRange( $pfx . $fieldTitle, 'newer', $from, $to );
 
                if ( isset( $params['prefix'] ) ) {
-                       $this->addWhere( $pfx . $fieldTitle . $db->buildLike( $this->titlePartToKey( $params['prefix'] ), $db->anyString() ) );
+                       $this->addWhere( $pfx . $fieldTitle .
+                               $db->buildLike( $this->titlePartToKey( $params['prefix'] ), $db->anyString() ) );
                }
 
                $this->addFields( array( 'pl_title' => $pfx . $fieldTitle ) );
@@ -178,7 +184,8 @@ class ApiQueryAllLinks extends ApiQueryGeneratorBase {
                $result = $this->getResult();
                foreach ( $res as $row ) {
                        if ( ++$count > $limit ) {
-                               // We've reached the one extra which shows that there are additional pages to be had. Stop here...
+                               // We've reached the one extra which shows that there are
+                               // additional pages to be had. Stop here...
                                if ( $params['unique'] ) {
                                        $this->setContinueEnumParameter( 'continue', $row->pl_title );
                                } else {
@@ -313,7 +320,10 @@ class ApiQueryAllLinks extends ApiQueryGeneratorBase {
                $what = $this->descriptionWhat;
 
                return array_merge( parent::getPossibleErrors(), array(
-                       array( 'code' => 'params', 'info' => "{$m} cannot return corresponding page ids in unique {$what}s mode" ),
+                       array(
+                               'code' => 'params',
+                               'info' => "{$m} cannot return corresponding page ids in unique {$what}s mode"
+                       ),
                ) );
        }
 
index 3c24405..363d657 100644 (file)
@@ -49,7 +49,11 @@ class ApiQueryAllPages extends ApiQueryGeneratorBase {
         */
        public function executeGenerator( $resultPageSet ) {
                if ( $resultPageSet->isResolvingRedirects() ) {
-                       $this->dieUsage( 'Use "gapfilterredir=nonredirects" option instead of "redirects" when using allpages as a generator', 'params' );
+                       $this->dieUsage(
+                               'Use "gapfilterredir=nonredirects" option instead of "redirects" ' .
+                                       'when using allpages as a generator',
+                               'params'
+                       );
                }
 
                $this->run( $resultPageSet );
@@ -88,7 +92,8 @@ class ApiQueryAllPages extends ApiQueryGeneratorBase {
                $this->addWhereRange( 'page_title', $dir, $from, $to );
 
                if ( isset( $params['prefix'] ) ) {
-                       $this->addWhere( 'page_title' . $db->buildLike( $this->titlePartToKey( $params['prefix'] ), $db->anyString() ) );
+                       $this->addWhere( 'page_title' .
+                               $db->buildLike( $this->titlePartToKey( $params['prefix'] ), $db->anyString() ) );
                }
 
                if ( is_null( $resultPageSet ) ) {
@@ -186,7 +191,8 @@ class ApiQueryAllPages extends ApiQueryGeneratorBase {
                $result = $this->getResult();
                foreach ( $res as $row ) {
                        if ( ++$count > $limit ) {
-                               // We've reached the one extra which shows that there are additional pages to be had. Stop here...
+                               // We've reached the one extra which shows that there are
+                               // additional pages to be had. Stop here...
                                $this->setContinueEnumParameter( 'continue', $row->page_title );
                                break;
                        }
@@ -303,7 +309,8 @@ class ApiQueryAllPages extends ApiQueryGeneratorBase {
                        'maxsize' => 'Limit to pages with at most this many bytes',
                        'prtype' => 'Limit to protected pages only',
                        'prlevel' => "The protection level (must be used with {$p}prtype= parameter)",
-                       'prfiltercascade' => "Filter protections based on cascadingness (ignored when {$p}prtype isn't set)",
+                       'prfiltercascade'
+                               => "Filter protections based on cascadingness (ignored when {$p}prtype isn't set)",
                        'filterlanglinks' => array(
                                'Filter based on whether a page has langlinks',
                                'Note that this may not consider langlinks added by extensions.',
@@ -334,7 +341,11 @@ class ApiQueryAllPages extends ApiQueryGeneratorBase {
 
        public function getPossibleErrors() {
                return array_merge( parent::getPossibleErrors(), array(
-                       array( 'code' => 'params', 'info' => 'Use "gapfilterredir=nonredirects" option instead of "redirects" when using allpages as a generator' ),
+                       array(
+                               'code' => 'params',
+                               'info' => 'Use "gapfilterredir=nonredirects" option instead of ' .
+                                       '"redirects" when using allpages as a generator'
+                       ),
                        array( 'code' => 'params', 'info' => 'prlevel may not be used without prtype' ),
                ) );
        }
@@ -349,9 +360,9 @@ class ApiQueryAllPages extends ApiQueryGeneratorBase {
                                'Using as Generator',
                                'Show info about 4 pages starting at the letter "T"',
                        ),
-                       'api.php?action=query&generator=allpages&gaplimit=2&gapfilterredir=nonredirects&gapfrom=Re&prop=revisions&rvprop=content' => array(
-                               'Show content of first 2 non-redirect pages beginning at "Re"',
-                       )
+                       'api.php?action=query&generator=allpages&gaplimit=2&' .
+                               'gapfilterredir=nonredirects&gapfrom=Re&prop=revisions&rvprop=content'
+                               => array( 'Show content of first 2 non-redirect pages beginning at "Re"' )
                );
        }
 
index 68f2487..748dbaf 100644 (file)
@@ -58,7 +58,8 @@ class ApiQueryAllUsers extends ApiQueryBase {
                        $fld_registration = isset( $prop['registration'] );
                        $fld_implicitgroups = isset( $prop['implicitgroups'] );
                } else {
-                       $fld_blockinfo = $fld_editcount = $fld_groups = $fld_registration = $fld_rights = $fld_implicitgroups = false;
+                       $fld_blockinfo = $fld_editcount = $fld_groups = $fld_registration =
+                               $fld_rights = $fld_implicitgroups = false;
                }
 
                $limit = $params['limit'];
@@ -123,7 +124,10 @@ class ApiQueryAllUsers extends ApiQueryBase {
                        if ( count( $params['excludegroup'] ) == 1 ) {
                                $exclude = array( 'ug1.ug_group' => $params['excludegroup'][0] );
                        } else {
-                               $exclude = array( $db->makeList( array( 'ug1.ug_group' => $params['excludegroup'] ), LIST_OR ) );
+                               $exclude = array( $db->makeList(
+                                       array( 'ug1.ug_group' => $params['excludegroup'] ),
+                                       LIST_OR
+                               ) );
                        }
                        $this->addJoinConds( array( 'ug1' => array( 'LEFT OUTER JOIN',
                                array_merge( array( 'ug1.ug_user=user_id' ), $exclude )
@@ -187,12 +191,12 @@ class ApiQueryAllUsers extends ApiQueryBase {
                $lastUser = false;
                $result = $this->getResult();
 
-               //
-               // This loop keeps track of the last entry.
-               // For each new row, if the new row is for different user then the last, the last entry is added to results.
-               // Otherwise, the group of the new row is appended to the last entry.
-               // The setContinue... is more complex because of this, and takes into account the higher sql limit
-               // to make sure all rows that belong to the same user are received.
+               // This loop keeps track of the last entry. For each new row, if the
+               // new row is for different user then the last, the last entry is added
+               // to results. Otherwise, the group of the new row is appended to the
+               // last entry. The setContinue... is more complex because of this, and
+               // takes into account the higher sql limit to make sure all rows that
+               // belong to the same user are received.
 
                foreach ( $res as $row ) {
                        $count++;
@@ -212,7 +216,8 @@ class ApiQueryAllUsers extends ApiQueryBase {
                                }
 
                                if ( $count > $limit ) {
-                                       // We've reached the one extra which shows that there are additional pages to be had. Stop here...
+                                       // We've reached the one extra which shows that there are
+                                       // additional pages to be had. Stop here...
                                        $this->setContinueEnumParameter( 'from', $row->user_name );
                                        break;
                                }
@@ -246,10 +251,13 @@ class ApiQueryAllUsers extends ApiQueryBase {
                        }
 
                        if ( $sqlLimit == $count ) {
-                               // BUG!  database contains group name that User::getAllGroups() does not return
-                               // TODO: should handle this more gracefully
-                               ApiBase::dieDebug( __METHOD__,
-                                       'MediaWiki configuration error: the database contains more user groups than known to User::getAllGroups() function' );
+                               // @todo BUG!  database contains group name that User::getAllGroups() does not return
+                               // Should handle this more gracefully
+                               ApiBase::dieDebug(
+                                       __METHOD__,
+                                       'MediaWiki configuration error: The database contains more ' .
+                                               'user groups than known to User::getAllGroups() function'
+                               );
                        }
 
                        $lastUserObj = User::newFromId( $row->user_id );
@@ -369,11 +377,13 @@ class ApiQueryAllUsers extends ApiQueryBase {
                        'dir' => 'Direction to sort in',
                        'group' => 'Limit users to given group name(s)',
                        'excludegroup' => 'Exclude users in given group name(s)',
-                       'rights' => 'Limit users to given right(s) (does not include rights granted by implicit or auto-promoted groups like *, user, or autoconfirmed)',
+                       'rights' => 'Limit users to given right(s) (does not include rights ' .
+                               'granted by implicit or auto-promoted groups like *, user, or autoconfirmed)',
                        'prop' => array(
                                'What pieces of information to include.',
                                ' blockinfo      - Adds the information about a current block on the user',
-                               ' groups         - Lists groups that the user is in. This uses more server resources and may return fewer results than the limit',
+                               ' groups         - Lists groups that the user is in. This uses ' .
+                                       'more server resources and may return fewer results than the limit',
                                ' implicitgroups - Lists all the groups the user is automatically in',
                                ' rights         - Lists rights that the user has',
                                ' editcount      - Adds the edit count of the user',
@@ -433,7 +443,10 @@ class ApiQueryAllUsers extends ApiQueryBase {
 
        public function getPossibleErrors() {
                return array_merge( parent::getPossibleErrors(), array(
-                       array( 'code' => 'group-excludegroup', 'info' => 'group and excludegroup cannot be used together' ),
+                       array(
+                               'code' => 'group-excludegroup',
+                               'info' => 'group and excludegroup cannot be used together'
+                       ),
                ) );
        }
 
index 238c8e8..bda1e03 100644 (file)
@@ -149,7 +149,8 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase {
                if ( $this->params['filterredir'] == 'redirects' ) {
                        $this->addWhereFld( 'page_is_redirect', 1 );
                } elseif ( $this->params['filterredir'] == 'nonredirects' && !$this->redirect ) {
-                       // bug 22245 - Check for !redirect, as filtering nonredirects, when getting what links to them is contradictory
+                       // bug 22245 - Check for !redirect, as filtering nonredirects, when
+                       // getting what links to them is contradictory
                        $this->addWhereFld( 'page_is_redirect', 0 );
                }
 
@@ -269,7 +270,8 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase {
 
                foreach ( $res as $row ) {
                        if ( ++$count > $this->params['limit'] ) {
-                               // We've reached the one extra which shows that there are additional pages to be had. Stop here...
+                               // We've reached the one extra which shows that there are
+                               // additional pages to be had. Stop here...
                                // Continue string preserved in case the redirect query doesn't pass the limit
                                $this->continueStr = $this->getContinueStr( $row->page_id );
                                break;
@@ -294,7 +296,8 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase {
                        $count = 0;
                        foreach ( $res as $row ) {
                                if ( ++$count > $this->params['limit'] ) {
-                                       // We've reached the one extra which shows that there are additional pages to be had. Stop here...
+                                       // We've reached the one extra which shows that there are
+                                       // additional pages to be had. Stop here...
                                        // We need to keep the parent page of this redir in
                                        if ( $this->hasNS ) {
                                                $parentID = $this->pageMap[$row->{$this->bl_ns}][$row->{$this->bl_title}];
@@ -384,7 +387,10 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase {
                $parentID = $this->pageMap[$ns][$row->{$this->bl_title}];
                // Put all the results in an array first
                $this->resultArr[$parentID]['redirlinks'][] = $a;
-               $this->getResult()->setIndexedTagName( $this->resultArr[$parentID]['redirlinks'], $this->bl_code );
+               $this->getResult()->setIndexedTagName(
+                       $this->resultArr[$parentID]['redirlinks'],
+                       $this->bl_code
+               );
        }
 
        protected function processContinue() {
@@ -396,7 +402,10 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase {
 
                // only image titles are allowed for the root in imageinfo mode
                if ( !$this->hasNS && $this->rootTitle->getNamespace() !== NS_FILE ) {
-                       $this->dieUsage( "The title for {$this->getModuleName()} query must be an image", 'bad_image_title' );
+                       $this->dieUsage(
+                               "The title for {$this->getModuleName()} query must be an image",
+                               'bad_image_title'
+                       );
                }
        }
 
@@ -494,9 +503,14 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase {
                );
                if ( $this->getModuleName() != 'embeddedin' ) {
                        return array_merge( $retval, array(
-                               'redirect' => 'If linking page is a redirect, find all pages that link to that redirect as well. Maximum limit is halved.',
-                               'filterredir' => "How to filter for redirects. If set to nonredirects when {$this->bl_code}redirect is enabled, this is only applied to the second level",
-                               'limit' => "How many total pages to return. If {$this->bl_code}redirect is enabled, limit applies to each level separately (which means you may get up to 2 * limit results)."
+                               'redirect' => 'If linking page is a redirect, find all pages ' .
+                                       'that link to that redirect as well. Maximum limit is halved.',
+                               'filterredir' => 'How to filter for redirects. If set to ' .
+                                       "nonredirects when {$this->bl_code}redirect is enabled, " .
+                                       'this is only applied to the second level',
+                               'limit' => 'How many total pages to return. If ' .
+                                       "{$this->bl_code}redirect is enabled, limit applies to each " .
+                                       'level separately (which means you may get up to 2 * limit results).'
                        ) );
                }
 
@@ -534,7 +548,10 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase {
                return array_merge( parent::getPossibleErrors(),
                        $this->getTitleOrPageIdErrorMessage(),
                        array(
-                               array( 'code' => 'bad_image_title', 'info' => "The title for {$this->getModuleName()} query must be an image" ),
+                               array(
+                                       'code' => 'bad_image_title',
+                                       'info' => "The title for {$this->getModuleName()} query must be an image"
+                               ),
                        )
                );
        }
index c620a8f..cfc2244 100644 (file)
@@ -219,7 +219,9 @@ abstract class ApiQueryBase extends ApiBase {
                if ( $sort ) {
                        $order = $field . ( $isDirNewer ? '' : ' DESC' );
                        // Append ORDER BY
-                       $optionOrderBy = isset( $this->options['ORDER BY'] ) ? (array)$this->options['ORDER BY'] : array();
+                       $optionOrderBy = isset( $this->options['ORDER BY'] )
+                               ? (array)$this->options['ORDER BY']
+                               : array();
                        $optionOrderBy[] = $order;
                        $this->addOption( 'ORDER BY', $optionOrderBy );
                }
@@ -260,16 +262,37 @@ abstract class ApiQueryBase extends ApiBase {
         * @param string $method Function the query should be attributed to.
         *  You should usually use __METHOD__ here
         * @param array $extraQuery Query data to add but not store in the object
-        *  Format is array( 'tables' => ..., 'fields' => ..., 'where' => ..., 'options' => ..., 'join_conds' => ... )
+        *  Format is array(
+        *    'tables' => ...,
+        *    'fields' => ...,
+        *    'where' => ...,
+        *    'options' => ...,
+        *    'join_conds' => ...
+        *  )
         * @return ResultWrapper
         */
        protected function select( $method, $extraQuery = array() ) {
 
-               $tables = array_merge( $this->tables, isset( $extraQuery['tables'] ) ? (array)$extraQuery['tables'] : array() );
-               $fields = array_merge( $this->fields, isset( $extraQuery['fields'] ) ? (array)$extraQuery['fields'] : array() );
-               $where = array_merge( $this->where, isset( $extraQuery['where'] ) ? (array)$extraQuery['where'] : array() );
-               $options = array_merge( $this->options, isset( $extraQuery['options'] ) ? (array)$extraQuery['options'] : array() );
-               $join_conds = array_merge( $this->join_conds, isset( $extraQuery['join_conds'] ) ? (array)$extraQuery['join_conds'] : array() );
+               $tables = array_merge(
+                       $this->tables,
+                       isset( $extraQuery['tables'] ) ? (array)$extraQuery['tables'] : array()
+               );
+               $fields = array_merge(
+                       $this->fields,
+                       isset( $extraQuery['fields'] ) ? (array)$extraQuery['fields'] : array()
+               );
+               $where = array_merge(
+                       $this->where,
+                       isset( $extraQuery['where'] ) ? (array)$extraQuery['where'] : array()
+               );
+               $options = array_merge(
+                       $this->options,
+                       isset( $extraQuery['options'] ) ? (array)$extraQuery['options'] : array()
+               );
+               $join_conds = array_merge(
+                       $this->join_conds,
+                       isset( $extraQuery['join_conds'] ) ? (array)$extraQuery['join_conds'] : array()
+               );
 
                // getDB has its own profileDBIn/Out calls
                $db = $this->getDB();
@@ -289,7 +312,13 @@ abstract class ApiQueryBase extends ApiBase {
        protected function checkRowCount() {
                $db = $this->getDB();
                $this->profileDBIn();
-               $rowcount = $db->estimateRowCount( $this->tables, $this->fields, $this->where, __METHOD__, $this->options );
+               $rowcount = $db->estimateRowCount(
+                       $this->tables,
+                       $this->fields,
+                       $this->where,
+                       __METHOD__,
+                       $this->options
+               );
                $this->profileDBOut();
 
                global $wgAPIMaxDBRows;
index 8dad635..57f76bc 100644 (file)
@@ -76,7 +76,12 @@ class ApiQueryBlocks extends ApiQueryBase {
                        $fld_flags );
 
                $this->addOption( 'LIMIT', $params['limit'] + 1 );
-               $this->addTimestampWhereRange( 'ipb_timestamp', $params['dir'], $params['start'], $params['end'] );
+               $this->addTimestampWhereRange(
+                       'ipb_timestamp',
+                       $params['dir'],
+                       $params['start'],
+                       $params['end']
+               );
 
                $db = $this->getDB();
 
@@ -107,7 +112,10 @@ class ApiQueryBlocks extends ApiQueryBase {
                        # Check range validity, if it's a CIDR
                        list( $ip, $range ) = IP::parseCIDR( $params['ip'] );
                        if ( $ip !== false && $range !== false && $range < $cidrLimit ) {
-                               $this->dieUsage( "$type CIDR ranges broader than /$cidrLimit are not accepted", 'cidrtoobroad' );
+                               $this->dieUsage(
+                                       "$type CIDR ranges broader than /$cidrLimit are not accepted",
+                                       'cidrtoobroad'
+                               );
                        }
 
                        # Let IP::parseRange handle calculating $upper, instead of duplicating the logic here.
@@ -145,8 +153,10 @@ class ApiQueryBlocks extends ApiQueryBase {
                        $this->addWhereIf( 'ipb_user != 0', isset( $show['account'] ) );
                        $this->addWhereIf( 'ipb_user != 0 OR ipb_range_end > ipb_range_start', isset( $show['!ip'] ) );
                        $this->addWhereIf( 'ipb_user = 0 AND ipb_range_end = ipb_range_start', isset( $show['ip'] ) );
-                       $this->addWhereIf( 'ipb_expiry = ' . $db->addQuotes( $db->getInfinity() ), isset( $show['!temp'] ) );
-                       $this->addWhereIf( 'ipb_expiry != ' . $db->addQuotes( $db->getInfinity() ), isset( $show['temp'] ) );
+                       $this->addWhereIf( 'ipb_expiry = ' .
+                               $db->addQuotes( $db->getInfinity() ), isset( $show['!temp'] ) );
+                       $this->addWhereIf( 'ipb_expiry != ' .
+                               $db->addQuotes( $db->getInfinity() ), isset( $show['temp'] ) );
                        $this->addWhereIf( 'ipb_range_end = ipb_range_start', isset( $show['!range'] ) );
                        $this->addWhereIf( 'ipb_range_end > ipb_range_start', isset( $show['range'] ) );
                }
index e62305a..c5b12b3 100644 (file)
@@ -220,14 +220,16 @@ class ApiQueryCategories extends ApiQueryGeneratorBase {
                return array(
                        'prop' => array(
                                'Which additional properties to get for each category',
-                               ' sortkey    - Adds the sortkey (hexadecimal string) and sortkey prefix (human-readable part) for the category',
+                               ' sortkey    - Adds the sortkey (hexadecimal string) and sortkey prefix',
+                               '              (human-readable part) for the category',
                                ' timestamp  - Adds timestamp of when the category was added',
                                ' hidden     - Tags categories that are hidden with __HIDDENCAT__',
                        ),
                        'limit' => 'How many categories to return',
                        'show' => 'Which kind of categories to show',
                        'continue' => 'When more results are available, use this to continue',
-                       'categories' => 'Only list these categories. Useful for checking whether a certain page is in a certain category',
+                       'categories' => 'Only list these categories. Useful for checking ' .
+                               'whether a certain page is in a certain category',
                        'dir' => 'The direction in which to list',
                );
        }
@@ -263,8 +265,10 @@ class ApiQueryCategories extends ApiQueryGeneratorBase {
 
        public function getExamples() {
                return array(
-                       'api.php?action=query&prop=categories&titles=Albert%20Einstein' => 'Get a list of categories [[Albert Einstein]] belongs to',
-                       'api.php?action=query&generator=categories&titles=Albert%20Einstein&prop=info' => 'Get information about all categories used in the [[Albert Einstein]]',
+                       'api.php?action=query&prop=categories&titles=Albert%20Einstein'
+                               => 'Get a list of categories [[Albert Einstein]] belongs to',
+                       'api.php?action=query&generator=categories&titles=Albert%20Einstein&prop=info'
+                               => 'Get information about all categories used in the [[Albert Einstein]]',
                );
        }
 
index 4e78f02..574ef6e 100644 (file)
@@ -63,7 +63,13 @@ class ApiQueryCategoryInfo extends ApiQueryBase {
                                'pp_propname' => 'hiddencat' ) ),
                ) );
 
-               $this->addFields( array( 'cat_title', 'cat_pages', 'cat_subcats', 'cat_files', 'cat_hidden' => 'pp_propname' ) );
+               $this->addFields( array(
+                       'cat_title',
+                       'cat_pages',
+                       'cat_subcats',
+                       'cat_files',
+                       'cat_hidden' => 'pp_propname'
+               ) );
                $this->addWhere( array( 'cat_title' => $cattitles ) );
 
                if ( !is_null( $params['continue'] ) ) {
index 9dc7a32..271558b 100644 (file)
@@ -181,8 +181,10 @@ class ApiQueryCategoryMembers extends ApiQueryGeneratorBase {
                $count = 0;
                foreach ( $rows as $row ) {
                        if ( ++$count > $limit ) {
-                               // We've reached the one extra which shows that there are additional pages to be had. Stop here...
-                               // TODO: Security issue - if the user has no right to view next title, it will still be shown
+                               // We've reached the one extra which shows that there are
+                               // additional pages to be had. Stop here...
+                               // @todo Security issue - if the user has no right to view next
+                               // title, it will still be shown
                                if ( $params['sort'] == 'timestamp' ) {
                                        $this->setContinueEnumParameter( 'start', wfTimestamp( TS_ISO_8601, $row->cl_timestamp ) );
                                } else {
@@ -324,14 +326,16 @@ class ApiQueryCategoryMembers extends ApiQueryGeneratorBase {
                global $wgMiserMode;
                $p = $this->getModulePrefix();
                $desc = array(
-                       'title' => "Which category to enumerate (required). Must include Category: prefix. Cannot be used together with {$p}pageid",
+                       'title' => "Which category to enumerate (required). Must include ' .
+                               'Category: prefix. Cannot be used together with {$p}pageid",
                        'pageid' => "Page ID of the category to enumerate. Cannot be used together with {$p}title",
                        'prop' => array(
                                'What pieces of information to include',
                                ' ids           - Adds the page ID',
                                ' title         - Adds the title and namespace ID of the page',
                                ' sortkey       - Adds the sortkey used for sorting in the category (hexadecimal string)',
-                               ' sortkeyprefix - Adds the sortkey prefix used for sorting in the category (human-readable part of the sortkey)',
+                               ' sortkeyprefix - Adds the sortkey prefix used for sorting in the ' .
+                                       'category (human-readable part of the sortkey)',
                                ' type          - Adds the type that the page has been categorised as (page, subcat or file)',
                                ' timestamp     - Adds the timestamp of when the page was included',
                        ),
@@ -341,10 +345,15 @@ class ApiQueryCategoryMembers extends ApiQueryGeneratorBase {
                        'dir' => 'In which direction to sort',
                        'start' => "Timestamp to start listing from. Can only be used with {$p}sort=timestamp",
                        'end' => "Timestamp to end listing at. Can only be used with {$p}sort=timestamp",
-                       'startsortkey' => "Sortkey to start listing from. Must be given in binary format. Can only be used with {$p}sort=sortkey",
-                       'endsortkey' => "Sortkey to end listing at. Must be given in binary format. Can only be used with {$p}sort=sortkey",
-                       'startsortkeyprefix' => "Sortkey prefix to start listing from. Can only be used with {$p}sort=sortkey. Overrides {$p}startsortkey",
-                       'endsortkeyprefix' => "Sortkey prefix to end listing BEFORE (not at, if this value occurs it will not be included!). Can only be used with {$p}sort=sortkey. Overrides {$p}endsortkey",
+                       'startsortkey' => "Sortkey to start listing from. Must be given in ' .
+                               'binary format. Can only be used with {$p}sort=sortkey",
+                       'endsortkey' => "Sortkey to end listing at. Must be given in binary ' .
+                               'format. Can only be used with {$p}sort=sortkey",
+                       'startsortkeyprefix' => "Sortkey prefix to start listing from. Can ' .
+                               'only be used with {$p}sort=sortkey. Overrides {$p}startsortkey",
+                       'endsortkeyprefix' => "Sortkey prefix to end listing BEFORE (not at, ' .
+                               'if this value occurs it will not be included!). Can only be used with ' .
+                               '{$p}sort=sortkey. Overrides {$p}endsortkey",
                        'continue' => 'For large categories, give the value returned from previous query',
                        'limit' => 'The maximum number of pages to return.',
                );
@@ -406,8 +415,10 @@ class ApiQueryCategoryMembers extends ApiQueryGeneratorBase {
 
        public function getExamples() {
                return array(
-                       'api.php?action=query&list=categorymembers&cmtitle=Category:Physics' => 'Get first 10 pages in [[Category:Physics]]',
-                       'api.php?action=query&generator=categorymembers&gcmtitle=Category:Physics&prop=info' => 'Get page info about first 10 pages in [[Category:Physics]]',
+                       'api.php?action=query&list=categorymembers&cmtitle=Category:Physics'
+                               => 'Get first 10 pages in [[Category:Physics]]',
+                       'api.php?action=query&generator=categorymembers&gcmtitle=Category:Physics&prop=info'
+                               => 'Get page info about first 10 pages in [[Category:Physics]]',
                );
        }
 
index 0eb1ec7..35e78ac 100644 (file)
@@ -39,7 +39,10 @@ class ApiQueryDeletedrevs extends ApiQueryBase {
                $user = $this->getUser();
                // Before doing anything at all, let's check permissions
                if ( !$user->isAllowed( 'deletedhistory' ) ) {
-                       $this->dieUsage( 'You don\'t have permission to view deleted revision information', 'permissiondenied' );
+                       $this->dieUsage(
+                               'You don\'t have permission to view deleted revision information',
+                               'permissiondenied'
+                       );
                }
 
                $db = $this->getDB();
@@ -116,7 +119,10 @@ class ApiQueryDeletedrevs extends ApiQueryBase {
 
                        // This also means stricter restrictions
                        if ( !$user->isAllowed( 'undelete' ) ) {
-                               $this->dieUsage( 'You don\'t have permission to view deleted revision content', 'permissiondenied' );
+                               $this->dieUsage(
+                                       'You don\'t have permission to view deleted revision content',
+                                       'permissiondenied'
+                               );
                        }
                }
                // Check limits
@@ -152,7 +158,8 @@ class ApiQueryDeletedrevs extends ApiQueryBase {
                        $this->addWhereRange( 'ar_title', $dir, $from, $to );
 
                        if ( isset( $params['prefix'] ) ) {
-                               $this->addWhere( 'ar_title' . $db->buildLike( $this->titlePartToKey( $params['prefix'] ), $db->anyString() ) );
+                               $this->addWhere( 'ar_title' .
+                                       $db->buildLike( $this->titlePartToKey( $params['prefix'] ), $db->anyString() ) );
                        }
                }
 
@@ -179,7 +186,10 @@ class ApiQueryDeletedrevs extends ApiQueryBase {
                }
 
                $this->addOption( 'LIMIT', $limit + 1 );
-               $this->addOption( 'USE INDEX', array( 'archive' => ( $mode == 'user' ? 'usertext_timestamp' : 'name_title_timestamp' ) ) );
+               $this->addOption(
+                       'USE INDEX',
+                       array( 'archive' => ( $mode == 'user' ? 'usertext_timestamp' : 'name_title_timestamp' ) )
+               );
                if ( $mode == 'all' ) {
                        if ( $params['unique'] ) {
                                $this->addOption( 'GROUP BY', 'ar_title' );
@@ -391,7 +401,8 @@ class ApiQueryDeletedrevs extends ApiQueryBase {
                        'Operates in three modes:',
                        ' 1) List deleted revisions for the given title(s), sorted by timestamp',
                        ' 2) List deleted contributions for the given user, sorted by timestamp (no titles specified)',
-                       " 3) List all deleted revisions in the given namespace, sorted by title and timestamp (no titles specified, {$p}user not set)",
+                       " 3) List all deleted revisions in the given namespace, sorted by title and timestamp',
+                       '    (no titles specified, {$p}user not set)",
                        'Certain parameters only apply to some modes and are ignored in others.',
                        'For instance, a parameter marked (1) only applies to mode 1 and is ignored in modes 2 and 3',
                );
@@ -399,12 +410,22 @@ class ApiQueryDeletedrevs extends ApiQueryBase {
 
        public function getPossibleErrors() {
                return array_merge( parent::getPossibleErrors(), array(
-                       array( 'code' => 'permissiondenied', 'info' => 'You don\'t have permission to view deleted revision information' ),
-                       array( 'code' => 'badparams', 'info' => 'user and excludeuser cannot be used together' ),
-                       array( 'code' => 'permissiondenied', 'info' => 'You don\'t have permission to view deleted revision content' ),
+                       array(
+                               'code' => 'permissiondenied',
+                               'info' => 'You don\'t have permission to view deleted revision information'
+                       ),
+                       array( 'code' => 'badparams', 'info' => 'user and excludeuser cannot be used together'
+                       ),
+                       array(
+                               'code' => 'permissiondenied',
+                               'info' => 'You don\'t have permission to view deleted revision content'
+                       ),
                        array( 'code' => 'badparams', 'info' => "The 'from' parameter cannot be used in modes 1 or 2" ),
                        array( 'code' => 'badparams', 'info' => "The 'to' parameter cannot be used in modes 1 or 2" ),
-                       array( 'code' => 'badparams', 'info' => "The 'prefix' parameter cannot be used in modes 1 or 2" ),
+                       array(
+                               'code' => 'badparams',
+                               'info' => "The 'prefix' parameter cannot be used in modes 1 or 2"
+                       ),
                        array( 'code' => 'badparams', 'info' => "The 'start' parameter cannot be used in mode 3" ),
                        array( 'code' => 'badparams', 'info' => "The 'end' parameter cannot be used in mode 3" ),
                ) );
@@ -412,7 +433,8 @@ class ApiQueryDeletedrevs extends ApiQueryBase {
 
        public function getExamples() {
                return array(
-                       'api.php?action=query&list=deletedrevs&titles=Main%20Page|Talk:Main%20Page&drprop=user|comment|content'
+                       'api.php?action=query&list=deletedrevs&titles=Main%20Page|Talk:Main%20Page&' .
+                               'drprop=user|comment|content'
                                => 'List the last deleted revisions of Main Page and Talk:Main Page, with content (mode 1)',
                        'api.php?action=query&list=deletedrevs&druser=Bob&drlimit=50'
                                => 'List the last 50 deleted contributions by Bob (mode 2)',
index 0311fa7..1854694 100644 (file)
@@ -95,7 +95,8 @@ class ApiQueryDuplicateFiles extends ApiQueryGeneratorBase {
                        $sha1s[$file->getName()] = $file->getSha1();
                }
 
-               // find all files with the hashes, result format is: array( hash => array( dup1, dup2 ), hash1 => ... )
+               // find all files with the hashes, result format is:
+               // array( hash => array( dup1, dup2 ), hash1 => ... )
                $filesToFindBySha1s = array_unique( array_values( $sha1s ) );
                if ( $params['localonly'] ) {
                        $filesBySha1s = RepoGroup::singleton()->getLocalRepo()->findBySha1s( $filesToFindBySha1s );
index ae42bf7..d220817 100644 (file)
@@ -102,7 +102,8 @@ class ApiQueryExtLinksUsage extends ApiQueryGeneratorBase {
                $count = 0;
                foreach ( $res as $row ) {
                        if ( ++$count > $limit ) {
-                               // We've reached the one extra which shows that there are additional pages to be had. Stop here...
+                               // We've reached the one extra which shows that there are
+                               // additional pages to be had. Stop here...
                                $this->setContinueEnumParameter( 'offset', $offset + $limit );
                                break;
                        }
@@ -222,7 +223,8 @@ class ApiQueryExtLinksUsage extends ApiQueryGeneratorBase {
                                "Protocol of the URL. If empty and {$p}query set, the protocol is http.",
                                "Leave both this and {$p}query empty to list all external links"
                        ),
-                       'query' => 'Search string without protocol. See [[Special:LinkSearch]]. Leave empty to list all external links',
+                       'query' => 'Search string without protocol. See [[Special:LinkSearch]]. ' .
+                               'Leave empty to list all external links',
                        'namespace' => 'The page namespace(s) to enumerate.',
                        'limit' => 'How many pages to return.',
                        'expandurl' => 'Expand protocol-relative URLs with the canonical protocol',
index fb132c0..5803ea7 100644 (file)
@@ -135,7 +135,8 @@ class ApiQueryExternalLinks extends ApiQueryBase {
                                "Protocol of the URL. If empty and {$p}query set, the protocol is http.",
                                "Leave both this and {$p}query empty to list all external links"
                        ),
-                       'query' => 'Search string without protocol. Useful for checking whether a certain page contains a certain external url',
+                       'query' => 'Search string without protocol. Useful for checking ' .
+                               'whether a certain page contains a certain external url',
                        'expandurl' => 'Expand protocol-relative URLs with the canonical protocol',
                );
        }
@@ -160,7 +161,8 @@ class ApiQueryExternalLinks extends ApiQueryBase {
 
        public function getExamples() {
                return array(
-                       'api.php?action=query&prop=extlinks&titles=Main%20Page' => 'Get a list of external links on the [[Main Page]]',
+                       'api.php?action=query&prop=extlinks&titles=Main%20Page'
+                               => 'Get a list of external links on the [[Main Page]]',
                );
        }
 
index 9a12ba1..3d4d38f 100644 (file)
@@ -86,7 +86,10 @@ class ApiQueryFileRepoInfo extends ApiQueryBase {
                        $props = array_merge( $props, array_keys( $repo->getInfo() ) );
                } );
 
-               return array_values( array_unique( array_merge( $props, array_keys( $repoGroup->localRepo->getInfo() ) ) ) );
+               return array_values( array_unique( array_merge(
+                       $props,
+                       array_keys( $repoGroup->localRepo->getInfo() )
+               ) ) );
        }
 
        public function getParamDescription() {
@@ -96,7 +99,8 @@ class ApiQueryFileRepoInfo extends ApiQueryBase {
                        'prop' => array(
                                'Which repository properties to get (there may be more available on some wikis):',
                                ' apiurl      - URL to the repository API - helpful for getting image info from the host.',
-                               ' name        - The key of the repository - used in e.g. $wgForeignFileRepos and imageinfo return values.',
+                               ' name        - The key of the repository - used in e.g. ' .
+                               '$wgForeignFileRepos and imageinfo return values.',
                                ' displayname - The human-readable name of the repository wiki.',
                                ' rooturl     - Root URL for image paths.',
                                ' local       - Whether that repository is the local one or not.',
index 1b2da26..f8f4558 100644 (file)
@@ -41,7 +41,10 @@ class ApiQueryFilearchive extends ApiQueryBase {
                $user = $this->getUser();
                // Before doing anything at all, let's check permissions
                if ( !$user->isAllowed( 'deletedhistory' ) ) {
-                       $this->dieUsage( 'You don\'t have permission to view deleted file information', 'permissiondenied' );
+                       $this->dieUsage(
+                               'You don\'t have permission to view deleted file information',
+                               'permissiondenied'
+                       );
                }
 
                $db = $this->getDB();
@@ -92,7 +95,8 @@ class ApiQueryFilearchive extends ApiQueryBase {
                $to = ( is_null( $params['to'] ) ? null : $this->titlePartToKey( $params['to'] ) );
                $this->addWhereRange( 'fa_name', $dir, $from, $to );
                if ( isset( $params['prefix'] ) ) {
-                       $this->addWhere( 'fa_name' . $db->buildLike( $this->titlePartToKey( $params['prefix'] ), $db->anyString() ) );
+                       $this->addWhere( 'fa_name' .
+                               $db->buildLike( $this->titlePartToKey( $params['prefix'] ), $db->anyString() ) );
                }
 
                $sha1Set = isset( $params['sha1'] );
@@ -137,7 +141,8 @@ class ApiQueryFilearchive extends ApiQueryBase {
                $result = $this->getResult();
                foreach ( $res as $row ) {
                        if ( ++$count > $limit ) {
-                               // We've reached the one extra which shows that there are additional pages to be had. Stop here...
+                               // We've reached the one extra which shows that there are
+                               // additional pages to be had. Stop here...
                                $this->setContinueEnumParameter( 'continue', $row->fa_name );
                                break;
                        }
@@ -275,7 +280,8 @@ class ApiQueryFilearchive extends ApiQueryBase {
                                ' sha1              - Adds SHA-1 hash for the image',
                                ' timestamp         - Adds timestamp for the uploaded version',
                                ' user              - Adds user who uploaded the image version',
-                               ' size              - Adds the size of the image in bytes and the height, width and page count (if applicable)',
+                               ' size              - Adds the size of the image in bytes and the height, ' .
+                                       'width and page count (if applicable)',
                                ' dimensions        - Alias for size',
                                ' description       - Adds description the image version',
                                ' parseddescription - Parse the description on the version',
@@ -358,10 +364,16 @@ class ApiQueryFilearchive extends ApiQueryBase {
 
        public function getPossibleErrors() {
                return array_merge( parent::getPossibleErrors(), array(
-                       array( 'code' => 'permissiondenied', 'info' => 'You don\'t have permission to view deleted file information' ),
+                       array(
+                               'code' => 'permissiondenied',
+                               'info' => 'You don\'t have permission to view deleted file information'
+                       ),
                        array( 'code' => 'hashsearchdisabled', 'info' => 'Search by hash disabled in Miser Mode' ),
-                       array( 'code' => 'invalidsha1hash', 'info' => 'The SHA1 hash provided is not valid' ),
-                       array( 'code' => 'invalidsha1base36hash', 'info' => 'The SHA1Base36 hash provided is not valid' ),
+                       array( 'code' => 'invalidsha1hash', 'info' => 'The SHA-1 hash provided is not valid' ),
+                       array(
+                               'code' => 'invalidsha1base36hash',
+                               'info' => 'The SHA1Base36 hash provided is not valid'
+                       ),
                ) );
        }
 
index bb6a23a..03a72a6 100644 (file)
@@ -112,9 +112,14 @@ class ApiQueryIWBacklinks extends ApiQueryGeneratorBase {
                $result = $this->getResult();
                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...
-                               // Continue string preserved in case the redirect query doesn't pass the limit
-                               $this->setContinueEnumParameter( 'continue', "{$row->iwl_prefix}|{$row->iwl_title}|{$row->iwl_from}" );
+                               // We've reached the one extra which shows that there are
+                               // additional pages to be had. Stop here...
+                               // Continue string preserved in case the redirect query doesn't
+                               // pass the limit
+                               $this->setContinueEnumParameter(
+                                       'continue',
+                                       "{$row->iwl_prefix}|{$row->iwl_title}|{$row->iwl_from}"
+                               );
                                break;
                        }
 
@@ -140,7 +145,10 @@ class ApiQueryIWBacklinks extends ApiQueryGeneratorBase {
 
                                $fit = $result->addValue( array( 'query', $this->getModuleName() ), null, $entry );
                                if ( !$fit ) {
-                                       $this->setContinueEnumParameter( 'continue', "{$row->iwl_prefix}|{$row->iwl_title}|{$row->iwl_from}" );
+                                       $this->setContinueEnumParameter(
+                                               'continue',
+                                               "{$row->iwl_prefix}|{$row->iwl_title}|{$row->iwl_from}"
+                                       );
                                        break;
                                }
                        }
index a339868..be64d36 100644 (file)
@@ -106,7 +106,10 @@ class ApiQueryIWLinks extends ApiQueryBase {
                        if ( ++$count > $params['limit'] ) {
                                // We've reached the one extra which shows that
                                // there are additional pages to be had. Stop here...
-                               $this->setContinueEnumParameter( 'continue', "{$row->iwl_from}|{$row->iwl_prefix}|{$row->iwl_title}" );
+                               $this->setContinueEnumParameter(
+                                       'continue',
+                                       "{$row->iwl_from}|{$row->iwl_prefix}|{$row->iwl_title}"
+                               );
                                break;
                        }
                        $entry = array( 'prefix' => $row->iwl_prefix );
@@ -121,7 +124,10 @@ class ApiQueryIWLinks extends ApiQueryBase {
                        ApiResult::setContent( $entry, $row->iwl_title );
                        $fit = $this->addPageSubItem( $row->iwl_from, $entry );
                        if ( !$fit ) {
-                               $this->setContinueEnumParameter( 'continue', "{$row->iwl_from}|{$row->iwl_prefix}|{$row->iwl_title}" );
+                               $this->setContinueEnumParameter(
+                                       'continue',
+                                       "{$row->iwl_from}|{$row->iwl_prefix}|{$row->iwl_title}"
+                               );
                                break;
                        }
                }
@@ -190,7 +196,8 @@ class ApiQueryIWLinks extends ApiQueryBase {
 
        public function getExamples() {
                return array(
-                       'api.php?action=query&prop=iwlinks&titles=Main%20Page' => 'Get interwiki links from the [[Main Page]]',
+                       'api.php?action=query&prop=iwlinks&titles=Main%20Page'
+                               => 'Get interwiki links from the [[Main Page]]',
                );
        }
 
index 96840e8..9981ec1 100644 (file)
@@ -34,8 +34,9 @@ class ApiQueryImageInfo extends ApiQueryBase {
        private static $transformCount = 0;
 
        public function __construct( $query, $moduleName, $prefix = 'ii' ) {
-               // We allow a subclass to override the prefix, to create a related API module.
-               // Some other parts of MediaWiki construct this with a null $prefix, which used to be ignored when this only took two arguments
+               // We allow a subclass to override the prefix, to create a related API
+               // module. Some other parts of MediaWiki construct this with a null
+               // $prefix, which used to be ignored when this only took two arguments
                if ( is_null( $prefix ) ) {
                        $prefix = 'ii';
                }
@@ -176,7 +177,8 @@ class ApiQueryImageInfo extends ApiQueryBase {
                                /** @var $oldie File */
                                foreach ( $oldies as $oldie ) {
                                        if ( ++$count > $params['limit'] ) {
-                                               // We've reached the extra one which shows that there are additional pages to be had. Stop here...
+                                               // We've reached the extra one which shows that there are
+                                               // additional pages to be had. Stop here...
                                                // Only set a query-continue if there was only one title
                                                if ( count( $pageIds[NS_FILE] ) == 1 ) {
                                                        $this->setContinueEnumParameter( 'start',
@@ -287,7 +289,8 @@ class ApiQueryImageInfo extends ApiQueryBase {
                if ( isset( $paramList['width'] ) ) {
                        if ( intval( $paramList['width'] ) != intval( $thumbParams['width'] ) ) {
                                $this->setWarning( "Ignoring width value set in {$p}urlparam ({$paramList['width']}) "
-                                       . "in favor of width value derived from {$p}urlwidth/{$p}urlheight ({$thumbParams['width']})" );
+                                       . "in favor of width value derived from {$p}urlwidth/{$p}urlheight "
+                                       . "({$thumbParams['width']})" );
                        }
                }
 
@@ -616,18 +619,22 @@ class ApiQueryImageInfo extends ApiQueryBase {
                        'comment' =>        ' comment       - Comment on the version',
                        'parsedcomment' =>  ' parsedcomment - Parse the comment on the version',
                        'url' =>            ' url           - Gives URL to the image and the description page',
-                       'size' =>           ' size          - Adds the size of the image in bytes and the height, width and page count (if applicable)',
-                       'dimensions' =>     ' dimensions    - Alias for size', // For backwards compatibility with Allimages
+                       'size' =>           ' size          - Adds the size of the image in bytes ' .
+                               'and the height, width and page count (if applicable)',
+                       'dimensions' =>     ' dimensions    - Alias for size', // B/C with Allimages
                        'sha1' =>           ' sha1          - Adds SHA-1 hash for the image',
                        'mime' =>           ' mime          - Adds MIME type of the image',
                        'thumbmime' =>      ' thumbmime     - Adds MIME type of the image thumbnail' .
                                ' (requires url and param ' . $modulePrefix . 'urlwidth)',
                        'mediatype' =>      ' mediatype     - Adds the media type of the image',
                        'metadata' =>       ' metadata      - Lists Exif metadata for the version of the image',
-                       'extmetadata' =>    ' extmetadata   - Lists formatted metadata combined from multiple sources. Results are HTML formatted.',
-                       'archivename' =>    ' archivename   - Adds the file name of the archive version for non-latest versions',
+                       'extmetadata' =>    ' extmetadata   - Lists formatted metadata combined ' .
+                               'from multiple sources. Results are HTML formatted.',
+                       'archivename' =>    ' archivename   - Adds the file name of the archive ' .
+                               'version for non-latest versions',
                        'bitdepth' =>       ' bitdepth      - Adds the bit depth of the version',
-                       'uploadwarning' =>  ' uploadwarning - Used by the Special:Upload page to get information about an existing file. Not intended for use outside MediaWiki core',
+                       'uploadwarning' =>  ' uploadwarning - Used by the Special:Upload page to ' .
+                               'get information about an existing file. Not intended for use outside MediaWiki core',
                );
        }
 
@@ -654,22 +661,29 @@ class ApiQueryImageInfo extends ApiQueryBase {
 
                return array(
                        'prop' => self::getPropertyDescriptions( array(), $p ),
-                       'urlwidth' => array( "If {$p}prop=url is set, a URL to an image scaled to this width will be returned.",
+                       'urlwidth' => array(
+                               "If {$p}prop=url is set, a URL to an image scaled to this width will be returned.",
                                'For performance reasons if this option is used, ' .
-                                       'no more than ' . self::TRANSFORM_LIMIT . ' scaled images will be returned.' ),
+                                       'no more than ' . self::TRANSFORM_LIMIT . ' scaled images will be returned.'
+                       ),
                        'urlheight' => "Similar to {$p}urlwidth.",
                        'urlparam' => array( "A handler specific parameter string. For example, pdf's ",
                                "might use 'page15-100px'. {$p}urlwidth must be used and be consistent with {$p}urlparam" ),
                        'limit' => 'How many image revisions to return per image',
                        'start' => 'Timestamp to start listing from',
                        'end' => 'Timestamp to stop listing at',
-                       'metadataversion' => array( "Version of metadata to use. if 'latest' is specified, use latest version.",
+                       'metadataversion'
+                               => array( "Version of metadata to use. if 'latest' is specified, use latest version.",
                                "Defaults to '1' for backwards compatibility" ),
-                       'extmetadatalanguage' => array( 'What language to fetch extmetadata in. This affects both which',
+                       'extmetadatalanguage' => array(
+                               'What language to fetch extmetadata in. This affects both which',
                                'translation to fetch, if multiple are available, as well as how things',
-                               'like numbers and various values are formatted.' ),
-                       'extmetadatamultilang' => 'If translations for extmetadata property are available, fetch all of them.',
-                       'extmetadatafilter' => "If specified and non-empty, only these keys will be returned for {$p}prop=extmetadata",
+                               'like numbers and various values are formatted.'
+                       ),
+                       'extmetadatamultilang'
+                               =>'If translations for extmetadata property are available, fetch all of them.',
+                       'extmetadatafilter'
+                               => "If specified and non-empty, only these keys will be returned for {$p}prop=extmetadata",
                        'continue' => 'If the query response includes a continue value, use it here to get another page of results',
                        'localonly' => 'Look only for files in the local repository',
                );
@@ -817,7 +831,8 @@ class ApiQueryImageInfo extends ApiQueryBase {
        public function getExamples() {
                return array(
                        'api.php?action=query&titles=File:Albert%20Einstein%20Head.jpg&prop=imageinfo',
-                       'api.php?action=query&titles=File:Test.jpg&prop=imageinfo&iilimit=50&iiend=20071231235959&iiprop=timestamp|user|url',
+                       'api.php?action=query&titles=File:Test.jpg&prop=imageinfo&iilimit=50&' .
+                               'iiend=20071231235959&iiprop=timestamp|user|url',
                );
        }
 
index 7ec69b7..a32fb9e 100644 (file)
@@ -164,7 +164,8 @@ class ApiQueryImages extends ApiQueryGeneratorBase {
                return array(
                        'limit' => 'How many images to return',
                        'continue' => 'When more results are available, use this to continue',
-                       'images' => 'Only list these images. Useful for checking whether a certain page has a certain Image.',
+                       'images' => 'Only list these images. Useful for checking whether a ' .
+                               'certain page has a certain Image.',
                        'dir' => 'The direction in which to list',
                );
        }
@@ -184,8 +185,10 @@ class ApiQueryImages extends ApiQueryGeneratorBase {
 
        public function getExamples() {
                return array(
-                       'api.php?action=query&prop=images&titles=Main%20Page' => 'Get a list of images used in the [[Main Page]]',
-                       'api.php?action=query&generator=images&titles=Main%20Page&prop=info' => 'Get information about all images used in the [[Main Page]]',
+                       'api.php?action=query&prop=images&titles=Main%20Page'
+                               => 'Get a list of images used in the [[Main Page]]',
+                       'api.php?action=query&generator=images&titles=Main%20Page&prop=info'
+                               => 'Get information about all images used in the [[Main Page]]',
                );
        }
 
index 7890a40..43b8c0c 100644 (file)
@@ -42,7 +42,8 @@ class ApiQueryInfo extends ApiQueryBase {
        private $pageRestrictions, $pageIsRedir, $pageIsNew, $pageTouched,
                $pageLatest, $pageLength;
 
-       private $protections, $watched, $watchers, $notificationtimestamps, $talkids, $subjectids, $displaytitles;
+       private $protections, $watched, $watchers, $notificationtimestamps,
+               $talkids, $subjectids, $displaytitles;
        private $showZeroWatchers = false;
 
        private $tokenFunctions;
@@ -108,7 +109,7 @@ class ApiQueryInfo extends ApiQueryBase {
                return $this->tokenFunctions;
        }
 
-       static $cachedTokens = array();
+       static protected $cachedTokens = array();
 
        public static function resetTokenCache() {
                ApiQueryInfo::$cachedTokens = array();
@@ -349,7 +350,8 @@ class ApiQueryInfo extends ApiQueryBase {
         */
        private function extractPageInfo( $pageid, $title ) {
                $pageInfo = array();
-               $titleExists = $pageid > 0; //$title->exists() needs pageid, which is not set for all title objects
+               // $title->exists() needs pageid, which is not set for all title objects
+               $titleExists = $pageid > 0;
                $ns = $title->getNamespace();
                $dbkey = $title->getDBkey();
 
@@ -411,7 +413,8 @@ class ApiQueryInfo extends ApiQueryBase {
                if ( $this->fld_notificationtimestamp ) {
                        $pageInfo['notificationtimestamp'] = '';
                        if ( isset( $this->notificationtimestamps[$ns][$dbkey] ) ) {
-                               $pageInfo['notificationtimestamp'] = wfTimestamp( TS_ISO_8601, $this->notificationtimestamps[$ns][$dbkey] );
+                               $pageInfo['notificationtimestamp'] =
+                                       wfTimestamp( TS_ISO_8601, $this->notificationtimestamps[$ns][$dbkey] );
                        }
                }
 
@@ -698,7 +701,8 @@ class ApiQueryInfo extends ApiQueryBase {
                                $this->watched[$row->wl_namespace][$row->wl_title] = true;
                        }
                        if ( $this->fld_notificationtimestamp ) {
-                               $this->notificationtimestamps[$row->wl_namespace][$row->wl_title] = $row->wl_notificationtimestamp;
+                               $this->notificationtimestamps[$row->wl_namespace][$row->wl_title] =
+                                       $row->wl_notificationtimestamp;
                        }
                }
        }
index 652fa11..e6280c8 100644 (file)
@@ -112,9 +112,13 @@ class ApiQueryLangBacklinks extends ApiQueryGeneratorBase {
                $result = $this->getResult();
                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...
-                               // Continue string preserved in case the redirect query doesn't pass the limit
-                               $this->setContinueEnumParameter( 'continue', "{$row->ll_lang}|{$row->ll_title}|{$row->ll_from}" );
+                               // We've reached the one extra which shows that there are
+                               // additional pages to be had. Stop here... Continue string
+                               // preserved in case the redirect query doesn't pass the limit.
+                               $this->setContinueEnumParameter(
+                                       'continue',
+                                       "{$row->ll_lang}|{$row->ll_title}|{$row->ll_from}"
+                               );
                                break;
                        }
 
@@ -140,7 +144,10 @@ class ApiQueryLangBacklinks extends ApiQueryGeneratorBase {
 
                                $fit = $result->addValue( array( 'query', $this->getModuleName() ), null, $entry );
                                if ( !$fit ) {
-                                       $this->setContinueEnumParameter( 'continue', "{$row->ll_lang}|{$row->ll_title}|{$row->ll_from}" );
+                                       $this->setContinueEnumParameter(
+                                               'continue',
+                                               "{$row->ll_lang}|{$row->ll_title}|{$row->ll_from}"
+                                       );
                                        break;
                                }
                        }
index 926a1b6..a20b855 100644 (file)
@@ -182,7 +182,8 @@ class ApiQueryLangLinks extends ApiQueryBase {
 
        public function getExamples() {
                return array(
-                       'api.php?action=query&prop=langlinks&titles=Main%20Page&redirects=' => 'Get interlanguage links from the [[Main Page]]',
+                       'api.php?action=query&prop=langlinks&titles=Main%20Page&redirects='
+                               => 'Get interlanguage links from the [[Main Page]]',
                );
        }
 
index c3a130b..3157a7b 100644 (file)
@@ -43,7 +43,8 @@ class ApiQueryLinks extends ApiQueryGeneratorBase {
                                $this->prefix = 'pl';
                                $this->description = 'link';
                                $this->titlesParam = 'titles';
-                               $this->titlesParamDescription = 'Only list links to these titles. Useful for checking whether a certain page links to a certain title.';
+                               $this->titlesParamDescription = 'Only list links to these titles. Useful ' .
+                                       'for checking whether a certain page links to a certain title.';
                                $this->helpUrl = 'https://www.mediawiki.org/wiki/API:Properties#links_.2F_pl';
                                break;
                        case self::TEMPLATES:
@@ -51,7 +52,8 @@ class ApiQueryLinks extends ApiQueryGeneratorBase {
                                $this->prefix = 'tl';
                                $this->description = 'template';
                                $this->titlesParam = 'templates';
-                               $this->titlesParamDescription = 'Only list these templates. Useful for checking whether a certain page uses a certain template.';
+                               $this->titlesParamDescription = 'Only list these templates. Useful ' .
+                                       'for checking whether a certain page uses a certain template.';
                                $this->helpUrl = 'https://www.mediawiki.org/wiki/API:Properties#templates_.2F_tl';
                                break;
                        default:
@@ -241,8 +243,10 @@ class ApiQueryLinks extends ApiQueryGeneratorBase {
 
                return array(
                        "api.php?action=query&prop={$name}&titles=Main%20Page" => "Get {$desc}s from the [[Main Page]]",
-                       "api.php?action=query&generator={$name}&titles=Main%20Page&prop=info" => "Get information about the {$desc} pages in the [[Main Page]]",
-                       "api.php?action=query&prop={$name}&titles=Main%20Page&{$this->prefix}namespace=2|10" => "Get {$desc}s from the Main Page in the User and Template namespaces",
+                       "api.php?action=query&generator={$name}&titles=Main%20Page&prop=info"
+                               => "Get information about the {$desc} pages in the [[Main Page]]",
+                       "api.php?action=query&prop={$name}&titles=Main%20Page&{$this->prefix}namespace=2|10"
+                               => "Get {$desc}s from the Main Page in the User and Template namespaces",
                );
        }
 
index d177279..0d2f475 100644 (file)
@@ -84,7 +84,10 @@ class ApiQueryLogEvents extends ApiQueryBase {
                $this->addFieldsIf( array( 'log_id', 'page_id' ), $this->fld_ids );
                $this->addFieldsIf( array( 'log_user', 'log_user_text', 'user_name' ), $this->fld_user );
                $this->addFieldsIf( 'log_user', $this->fld_userid );
-               $this->addFieldsIf( array( 'log_namespace', 'log_title' ), $this->fld_title || $this->fld_parsedcomment );
+               $this->addFieldsIf(
+                       array( 'log_namespace', 'log_title' ),
+                       $this->fld_title || $this->fld_parsedcomment
+               );
                $this->addFieldsIf( 'log_comment', $this->fld_comment || $this->fld_parsedcomment );
                $this->addFieldsIf( 'log_params', $this->fld_details );
 
@@ -96,7 +99,8 @@ class ApiQueryLogEvents extends ApiQueryBase {
 
                if ( !is_null( $params['tag'] ) ) {
                        $this->addTables( 'change_tag' );
-                       $this->addJoinConds( array( 'change_tag' => array( 'INNER JOIN', array( 'log_id=ct_log_id' ) ) ) );
+                       $this->addJoinConds( array( 'change_tag' => array( 'INNER JOIN',
+                               array( 'log_id=ct_log_id' ) ) ) );
                        $this->addWhereFld( 'ct_tag', $params['tag'] );
                        $index['change_tag'] = 'change_tag_tag_id';
                }
@@ -110,7 +114,12 @@ class ApiQueryLogEvents extends ApiQueryBase {
                        $index['logging'] = 'type_time';
                }
 
-               $this->addTimestampWhereRange( 'log_timestamp', $params['dir'], $params['start'], $params['end'] );
+               $this->addTimestampWhereRange(
+                       'log_timestamp',
+                       $params['dir'],
+                       $params['start'],
+                       $params['end']
+               );
 
                $limit = $params['limit'];
                $this->addOption( 'LIMIT', $limit + 1 );
@@ -169,7 +178,8 @@ class ApiQueryLogEvents extends ApiQueryBase {
                $result = $this->getResult();
                foreach ( $res as $row ) {
                        if ( ++$count > $limit ) {
-                               // We've reached the one extra which shows that there are additional pages to be had. Stop here...
+                               // We've reached the one extra which shows that there are
+                               // additional pages to be had. Stop here...
                                $this->setContinueEnumParameter( 'start', wfTimestamp( TS_ISO_8601, $row->log_timestamp ) );
                                break;
                        }
@@ -197,7 +207,9 @@ class ApiQueryLogEvents extends ApiQueryBase {
         * @param $legacy bool
         * @return array
         */
-       public static function addLogParams( $result, &$vals, $params, $type, $action, $ts, $legacy = false ) {
+       public static function addLogParams( $result, &$vals, $params, $type,
+               $action, $ts, $legacy = false
+       ) {
                switch ( $type ) {
                        case 'move':
                                if ( $legacy ) {
index 08c883d..5438175 100644 (file)
@@ -63,7 +63,8 @@ class ApiQueryPagePropNames extends ApiQueryBase {
                $count = 0;
                foreach ( $this->select( __METHOD__ ) as $row ) {
                        if ( ++$count > $limit ) {
-                               // We've reached the one extra which shows that there are additional pages to be had. Stop here...
+                               // We've reached the one extra which shows that there are
+                               // additional pages to be had. Stop here...
                                $this->setContinueEnumParameter( 'continue', $row->pp_propname );
                                break;
                        }
index 91a8090..e51c7ab 100644 (file)
@@ -135,7 +135,8 @@ class ApiQueryPageProps extends ApiQueryBase {
        public function getParamDescription() {
                return array(
                        'continue' => 'When more results are available, use this to continue',
-                       'prop' => 'Only list these props. Useful for checking whether a certain page uses a certain page prop',
+                       'prop' => 'Only list these props. Useful for checking whether a ' .
+                               'certain page uses a certain page prop',
                );
        }
 
index 8d4c9c1..48a8d03 100644 (file)
@@ -26,7 +26,6 @@
  * mAttribs:
  *  rc_id           id of the row in the recentchanges table
  *  rc_timestamp    time the entry was made
- *  rc_cur_time     timestamp on the cur row
  *  rc_namespace    namespace #
  *  rc_title        non-prefixed db key
  *  rc_type         is new entry, used to determine whether updating is necessary
@@ -155,7 +154,6 @@ class RecentChange {
                return array(
                        'rc_id',
                        'rc_timestamp',
-                       'rc_cur_time',
                        'rc_user',
                        'rc_user_text',
                        'rc_namespace',
@@ -254,7 +252,6 @@ class RecentChange {
 
                # Fixup database timestamps
                $this->mAttribs['rc_timestamp'] = $dbw->timestamp( $this->mAttribs['rc_timestamp'] );
-               $this->mAttribs['rc_cur_time'] = $dbw->timestamp( $this->mAttribs['rc_cur_time'] );
                $this->mAttribs['rc_id'] = $dbw->nextSequenceValue( 'recentchanges_rc_id_seq' );
 
                ## If we are using foreign keys, an entry of 0 for the page_id will fail, so use NULL
@@ -495,7 +492,6 @@ class RecentChange {
                $rc->mPerformer = $user;
                $rc->mAttribs = array(
                        'rc_timestamp'  => $timestamp,
-                       'rc_cur_time'   => $timestamp,
                        'rc_namespace'  => $title->getNamespace(),
                        'rc_title'      => $title->getDBkey(),
                        'rc_type'       => RC_EDIT,
@@ -555,7 +551,6 @@ class RecentChange {
                $rc->mPerformer = $user;
                $rc->mAttribs = array(
                        'rc_timestamp'      => $timestamp,
-                       'rc_cur_time'       => $timestamp,
                        'rc_namespace'      => $title->getNamespace(),
                        'rc_title'          => $title->getDBkey(),
                        'rc_type'           => RC_NEW,
@@ -665,7 +660,6 @@ class RecentChange {
                $rc->mPerformer = $user;
                $rc->mAttribs = array(
                        'rc_timestamp'  => $timestamp,
-                       'rc_cur_time'   => $timestamp,
                        'rc_namespace'  => $target->getNamespace(),
                        'rc_title'      => $target->getDBkey(),
                        'rc_type'       => RC_LOG,
@@ -721,7 +715,6 @@ class RecentChange {
                wfDeprecated( __METHOD__, '1.22' );
                $this->mAttribs = array(
                        'rc_timestamp' => wfTimestamp( TS_MW, $row->rev_timestamp ),
-                       'rc_cur_time' => $row->rev_timestamp,
                        'rc_user' => $row->rev_user,
                        'rc_user_text' => $row->rev_user_text,
                        'rc_namespace' => $row->page_namespace,
index 8991290..89ef4e4 100644 (file)
@@ -354,6 +354,8 @@ abstract class ContentHandler {
         * @throws MWException if the model id isn't known.
         */
        public static function getLocalizedName( $name ) {
+               // Messages: content-model-wikitext, content-model-text,
+               // content-model-javascript, content-model-css
                $key = "content-model-$name";
 
                $msg = wfMessage( $key );
index 26c9d24..cdfa769 100644 (file)
@@ -76,6 +76,7 @@ abstract class DatabaseMysqlBase extends DatabaseBase {
                } catch ( Exception $ex ) {
                        wfProfileOut( "dbconnect-$server" );
                        wfProfileOut( __METHOD__ );
+                       $this->restoreErrorHandler();
                        throw $ex;
                }
                $error = $this->restoreErrorHandler();
index e564a16..72371a2 100644 (file)
@@ -370,7 +370,14 @@ class DatabasePostgres extends DatabaseBase {
                $this->connectString = $this->makeConnectionString( $connectVars, PGSQL_CONNECT_FORCE_NEW );
                $this->close();
                $this->installErrorHandler();
-               $this->mConn = pg_connect( $this->connectString );
+
+               try {
+                       $this->mConn = pg_connect( $this->connectString );
+               } catch ( Exception $ex ) {
+                       $this->restoreErrorHandler();
+                       throw $ex;
+               }
+
                $phpError = $this->restoreErrorHandler();
 
                if ( !$this->mConn ) {
index 53cb7dc..b37e6b3 100644 (file)
@@ -336,7 +336,12 @@ class WebInstaller extends Installer {
 
                $this->phpErrors = array();
                set_error_handler( array( $this, 'errorHandler' ) );
-               session_start();
+               try {
+                       session_start();
+               } catch ( Exception $e ) {
+                       restore_error_handler();
+                       throw $e;
+               }
                restore_error_handler();
 
                if ( $this->phpErrors ) {
index 0a1f3b1..418ab12 100644 (file)
@@ -23,7 +23,8 @@
 
 /**
  * ProfilerSimpleUDP class, that sends out messages for 'udpprofile' daemon
- * (the one from mediawiki/trunk/udpprofile SVN )
+ * (the one from 
+ *  http://git.wikimedia.org/tree/operations%2Fsoftware.git/master/udpprofile)
  * @ingroup Profiler
  */
 class ProfilerSimpleUDP extends ProfilerSimple {
index f40966c..9764c9f 100644 (file)
@@ -219,7 +219,7 @@ class LoginForm extends SpecialPage {
                        return;
                }
 
-               $status = $this->addNewaccountInternal();
+               $status = $this->addNewAccountInternal();
                if ( !$status->isGood() ) {
                        $error = $status->getMessage();
                        $this->mainLoginForm( $error->toString() );
@@ -865,7 +865,7 @@ class LoginForm extends SpecialPage {
         * @return Status object
         */
        function mailPasswordInternal( $u, $throttle = true, $emailTitle = 'passwordremindertitle', $emailText = 'passwordremindertext' ) {
-               global $wgCanonicalServer, $wgScript, $wgNewPasswordExpiry;
+               global $wgNewPasswordExpiry;
 
                if ( $u->getEmail() == '' ) {
                        return Status::newFatal( 'noemail', $u->getName() );
@@ -882,7 +882,11 @@ class LoginForm extends SpecialPage {
                $u->setNewpassword( $np, $throttle );
                $u->saveSettings();
                $userLanguage = $u->getOption( 'language' );
-               $m = $this->msg( $emailText, $ip, $u->getName(), $np, '<' . $wgCanonicalServer . $wgScript . '>',
+
+               $mainPage = Title::newMainPage();
+               $mainPageUrl = $mainPage->getCanonicalURL();
+
+               $m = $this->msg( $emailText, $ip, $u->getName(), $np, '<' . $mainPageUrl . '>',
                        round( $wgNewPasswordExpiry / 86400 ) )->inLanguage( $userLanguage )->text();
                $result = $u->sendMail( $this->msg( $emailTitle )->inLanguage( $userLanguage )->text(), $m );
 
index 6bbd8bf..2038bac 100644 (file)
@@ -3325,11 +3325,13 @@ class Language {
                                $length -= $eLength;
                                $string = substr( $string, 0, $length ); // xyz...
                                $string = $this->removeBadCharLast( $string );
+                               $string = rtrim( $string );
                                $string = $string . $ellipsis;
                        } else {
                                $length += $eLength;
                                $string = substr( $string, $length ); // ...xyz
                                $string = $this->removeBadCharFirst( $string );
+                               $string = ltrim( $string );
                                $string = $ellipsis . $string;
                        }
                }
index d88c54c..233bbfb 100644 (file)
@@ -1464,8 +1464,8 @@ $2
 'revdelete-hide-user' => 'أخف اسم/آيبي المستخدم',
 'revdelete-hide-restricted' => 'أخف البيانات عن الإداريين إضافة إلى الآخرين',
 'revdelete-radio-same' => '(لا تغير)',
-'revdelete-radio-set' => 'Ù\86عÙ\85',
-'revdelete-radio-unset' => 'Ù\84ا',
+'revdelete-radio-set' => 'Ù\85Ø®Ù\81Ù\8a',
+'revdelete-radio-unset' => 'Ù\85رئÙ\8a',
 'revdelete-suppress' => 'أخف البيانات عن مديري النظام والبقية',
 'revdelete-unsuppress' => 'إزالة الضوابط من المراجعات المسترجعة',
 'revdelete-log' => 'السبب:',
index a39894c..5be4f13 100644 (file)
@@ -809,8 +809,8 @@ Mümkündür ki, bununla bağlı təfərrüatlar [{{fullurl:{{#Special:Log}}/del
 'revdelete-hide-user' => 'Redaktə müəllifinin istifadəçi adını/IP ünvanını gizlə',
 'revdelete-hide-restricted' => 'Məlumatları idarəçilərdən də gizlə',
 'revdelete-radio-same' => '(dəyişdirmə)',
-'revdelete-radio-set' => 'li',
-'revdelete-radio-unset' => 'Xeyr',
+'revdelete-radio-set' => 'Gizli',
+'revdelete-radio-unset' => 'Görünür',
 'revdelete-suppress' => 'Məlumatları idarəçilərdən də gizlə',
 'revdelete-unsuppress' => 'Bərpa olunan versiyalar üzərindən məhdudiyyətləri qaldır',
 'revdelete-log' => 'Səbəb:',
index 35acefa..e78e27e 100644 (file)
@@ -1072,8 +1072,8 @@ An ibang administrador sa {{SITENAME}} puwede pa man makagamit sa pinagtagong la
 'revdelete-hide-user' => 'Paraliwat na ngaran-paragamit/IP na estada',
 'revdelete-hide-restricted' => 'Ilubog an mga datos gikan sa mga administrador asin man kan iba',
 'revdelete-radio-same' => '(dae pagribayan)',
-'revdelete-radio-set' => 'Namamansayan',
-'revdelete-radio-unset' => 'Itinago',
+'revdelete-radio-set' => 'Itinago',
+'revdelete-radio-unset' => 'Hiling-hiling',
 'revdelete-suppress' => 'Dai ipahilíng an mga datos sa mga sysops asin sa mga iba pa',
 'revdelete-unsuppress' => 'Halîon an mga restriksyón sa mga ibinalík na pagpakarhay',
 'revdelete-log' => 'Rason:',
index aac7dca..b47591c 100644 (file)
@@ -1325,8 +1325,8 @@ pokud nebyla nastavena další omezení.",
 'revdelete-hide-user' => 'Uživatelské jméno / IP adresa',
 'revdelete-hide-restricted' => 'Utajit data i před správci',
 'revdelete-radio-same' => '(neměnit)',
-'revdelete-radio-set' => 'Viditelný',
-'revdelete-radio-unset' => 'Skrytý',
+'revdelete-radio-set' => 'Skrytý',
+'revdelete-radio-unset' => 'Viditelný',
 'revdelete-suppress' => 'Utajit data i před správci',
 'revdelete-unsuppress' => 'Odstranit omezení na vrácené verze',
 'revdelete-log' => 'Důvod:',
index ee87588..6915b32 100644 (file)
@@ -1386,8 +1386,8 @@ Andere Administratoren auf {{SITENAME}} haben Zugriff auf den versteckten Inhalt
 'revdelete-hide-user' => 'Benutzername/IP-Adresse des Bearbeiters',
 'revdelete-hide-restricted' => 'Daten sowohl vor Administratoren als auch anderen Benutzern unterdrücken',
 'revdelete-radio-same' => '(nicht ändern)',
-'revdelete-radio-set' => 'Sichtbar',
-'revdelete-radio-unset' => 'Versteckt',
+'revdelete-radio-set' => 'Versteckt',
+'revdelete-radio-unset' => 'Sichtbar',
 'revdelete-suppress' => 'Grund der Löschung auch vor Administratoren verstecken',
 'revdelete-unsuppress' => 'Einschränkungen für wiederhergestellte Versionen aufheben',
 'revdelete-log' => 'Grund:',
index 433915e..c290e8f 100644 (file)
@@ -3962,7 +3962,7 @@ By executing it, your system may be compromised.",
 'svg-long-desc'               => 'SVG file, nominally $1 × $2 pixels, file size: $3',
 'svg-long-desc-animated'      => 'Animated SVG file, nominally $1 × $2 pixels, file size: $3',
 'svg-long-error'              => 'Invalid SVG file: $1',
-'show-big-image'              => 'Full resolution',
+'show-big-image'              => 'Original file',
 'show-big-image-preview'      => 'Size of this preview: $1.',
 'show-big-image-other'        => 'Other {{PLURAL:$2|resolution|resolutions}}: $1.',
 'show-big-image-size'         => '$1 × $2 pixels',
index 36b5831..5ef2ad3 100644 (file)
@@ -1351,8 +1351,8 @@ Les autres administrateurs de {{SITENAME}} pourront toujours accéder au contenu
 'revdelete-hide-user' => 'Nom d’utilisateur/utilisatrice ou adresse IP de l’éditeur/éditrice',
 'revdelete-hide-restricted' => "Supprimer ces données aux administrateurs et administratrices ainsi bien qu'aux autres",
 'revdelete-radio-same' => '(ne pas changer)',
-'revdelete-radio-set' => 'Visible',
-'revdelete-radio-unset' => 'Masqué',
+'revdelete-radio-set' => 'Masqué',
+'revdelete-radio-unset' => 'Visible',
 'revdelete-suppress' => 'Masquer également les données pour les administrateurs',
 'revdelete-unsuppress' => 'Enlever les restrictions sur les versions restaurées',
 'revdelete-log' => 'Motif :',
@@ -3255,12 +3255,12 @@ Vous pouvez toutefois en visualiser la source.',
 # Attribution
 'anonymous' => '{{PLURAL:$1|Utilisateur non enregistré|Utilisateurs non enregistrés}} sur {{SITENAME}}',
 'siteuser' => "{{GENDER:$2|l'utilisateur|l'utilisatrice|l'utilisateur ou utilisatrice}} $1 de {{SITENAME}}",
-'anonuser' => "l'utilisateur anonyme $1 de {{SITENAME}}",
+'anonuser' => "l'utilisateur ou utilisatrice anonyme $1 de {{SITENAME}}",
 'lastmodifiedatby' => 'Cette page a été modifiée pour la dernière fois le $1 à $2 par $3.',
 'othercontribs' => 'Basé sur le travail de $1.',
 'others' => 'autres',
-'siteusers' => "{{PLURAL:$2|l'utilisateur|les utilisateurs}} $1 de {{SITENAME}}",
-'anonusers' => "{{PLURAL:$2|l'utilisateur anonyme|les utilisateurs anonymes}} $1 de {{SITENAME}}",
+'siteusers' => '{{PLURAL:$2|{{GENDER:$1|l’utilisateur|l’utilisatrice|l’utilisatrice ou utilisateur}}|les utilisatrices et/ou utilisateurs}} $1 de {{SITENAME}}',
+'anonusers' => "{{PLURAL:$2|l'utilisateur ou utilisatrice anonyme|les utilisateurs et/ou utilisatrices anonymes}} $1 de {{SITENAME}}",
 'creditspage' => 'Crédits de la page',
 'nocredits' => "Il n'y a pas d'informations d'attribution disponibles pour cette page.",
 
@@ -3292,19 +3292,19 @@ Ne '''RIEN''' inscrire ici !",
 'pageinfo-robot-index' => 'Autorisée',
 'pageinfo-robot-noindex' => 'Interdite',
 'pageinfo-views' => 'Nombre de vues',
-'pageinfo-watchers' => 'Nombre de contributeurs ayant la page dans leur liste de suivi',
-'pageinfo-few-watchers' => 'Moins de $1 {{PLURAL:$1|observateur|observateurs}}',
+'pageinfo-watchers' => 'Nombre de contributrices et contributeurs ayant la page dans leur liste de suivi',
+'pageinfo-few-watchers' => 'Moins de $1 {{PLURAL:$1|observateur ou observatrice|observateurs et observatrices}}',
 'pageinfo-redirects-name' => 'Nombre de redirections vers cette page',
 'pageinfo-subpages-name' => 'Sous-pages de cette page',
 'pageinfo-subpages-value' => '$1 ($2 {{PLURAL:$2|redirection|redirections}}; $3 {{PLURAL:$3|non-redirection|non-redirections}})',
 'pageinfo-firstuser' => 'Créateur de la page',
 'pageinfo-firsttime' => 'Date de création de la page',
-'pageinfo-lastuser' => 'Dernier contributeur',
+'pageinfo-lastuser' => 'Dernier contributeur ou dernière contributrice',
 'pageinfo-lasttime' => 'Date de la dernière modification',
 'pageinfo-edits' => 'Nombre total de modifications',
-'pageinfo-authors' => "Nombre total d'auteurs distincts",
+'pageinfo-authors' => "Nombre total d'auteur(e)s distinct(e)s",
 'pageinfo-recent-edits' => 'Nombre de modifications récentes (dans les derniers $1)',
-'pageinfo-recent-authors' => "Nombre d'auteurs distincts récents",
+'pageinfo-recent-authors' => "Nombre d'auteur(e)s distinct(e)s récents",
 'pageinfo-magic-words' => '{{PLURAL:$1|Mot magique|Mots magiques}} ($1)',
 'pageinfo-hidden-categories' => '{{PLURAL:$1|Catégorie cachée|Catégories cachées}} ($1)',
 'pageinfo-templates' => '{{PLURAL:$1|Modèle inclu|Modèles inclus}} ($1)',
@@ -3486,7 +3486,7 @@ Les autres liens sur la même ligne sont considérés comme des exceptions, par
 'exif-compressedbitsperpixel' => "Mode de compression de l'image",
 'exif-pixelydimension' => "Largeur de l'image",
 'exif-pixelxdimension' => "Hauteur de l'image",
-'exif-usercomment' => "Commentaires de l'utilisateur",
+'exif-usercomment' => "Commentaires de l'utilisateur ou de l’utilisatrice",
 'exif-relatedsoundfile' => 'Fichier audio associé',
 'exif-datetimeoriginal' => 'Date de la prise originelle',
 'exif-datetimedigitized' => 'Date de la numérisation',
index aa7b289..ca60280 100644 (file)
@@ -1371,6 +1371,7 @@ $3 մասնակիցը տվել է հետևյալ պատճառը. ''$2''",
 'right-upload' => 'Նիշքերի բեռնում',
 'right-upload_by_url' => 'Բեռնել նիշքեր ինտերնետային հասցեից',
 'right-delete' => 'Էջերի ջնջում',
+'right-rollback' => 'Արագ հետ գլորել տվյալ էջը վերջին անգամ խմբագրած մասնակցի խմբագրումները',
 
 # Special:Log/newusers
 'newuserlogpage' => 'Մասնակիցների գրանցման տեղեկամատյան',
@@ -1390,6 +1391,7 @@ $3 մասնակիցը տվել է հետևյալ պատճառը. ''$2''",
 'action-delete' => 'Ջնջել այս էջը',
 'action-deleterevision' => 'Ջնջել այս փոփոխությունը',
 'action-deletedhistory' => 'Դիտել այս էջի ջնջված պատմությունը',
+'action-rollback' => 'արագ հետ գլորել էջը վերջին անգամ խմբագրած մասնակցի կատարած փոփոխությունները',
 
 # Recent changes
 'nchanges' => '$1 {{PLURAL:$1|փոփոխություն|փոփոխություն}}',
@@ -1905,11 +1907,12 @@ $NEWPAGE
 'rollback' => 'Հետ գլորել խմբագրումները',
 'rollback_short' => 'Հետ գլորել',
 'rollbacklink' => 'հետ գլորել',
+'rollbacklinkcount' => 'հետ գլորել $1 {{PLURAL:$1|խմբագրում}}',
 'rollbackfailed' => 'Հետ գլորումը ձախողվեց',
 'cantrollback' => 'Չհաջողվեց հետ շրջել խմբագրումը։ Վերջին ներդրումը կատարվել է էջի միակ հեղինակի կողմից։',
-'alreadyrolled' => 'Õ\89Õ°Õ¡Õ»Õ¸Õ²Õ¾Õ¥Ö\81 Õ°Õ¥Õ¿ Õ£Õ¬Õ¸Ö\80Õ¥Õ¬ [[:$1]] Õ§Õ»Õ« Õ¾Õ¥Ö\80Õ»Õ«Õ¶ Õ­Õ´Õ¢Õ¡Õ£Ö\80Õ¸Ö\82Õ´Õ¶Õ¥Ö\80Õ¨Õ\9d Õ¯Õ¡Õ¿Õ¡Ö\80Õ¾Õ¡Õ® [[User:$2|$2]] ([[User talk:$2|Õ\94Õ¶Õ¶Õ¡Ö\80Õ¯Õ¸Ö\82Õ´]]) Õ´Õ¡Õ½Õ¶Õ¡Õ¯Ö\81Õ« Õ¯Õ¸Õ²Õ´Õ«Ö\81Ö\89 Õ\84Õ¥Õ¯ Õ¸Ö\82Ö\80Õ«Õ·Õ¨ Õ¡Ö\80Õ¤Õ¥Õ¶ Õ­Õ´Õ¢Õ¡Õ£Ö\80Õ¥Õ¬ Õ§ Õ¯Õ¡Õ´ Õ°Õ¥Õ¿ Õ§ Õ£Õ¬Õ¸Ö\80Õ¥Õ¬ էջը։
+'alreadyrolled' => 'Õ\89Õ°Õ¡Õ»Õ¸Õ²Õ¾Õ¥Ö\81 Õ°Õ¥Õ¿ Õ£Õ¬Õ¸Ö\80Õ¥Õ¬ [[:$1]] Õ§Õ»Õ¸Ö\82Õ´ [[User:$2|$2]] ([[User talk:$2|Õ\94Õ¶Õ¶Õ¡Ö\80Õ¯Õ¸Ö\82Õ´]]) Õ´Õ¡Õ½Õ¶Õ¡Õ¯Ö\81Õ« Õ¾Õ¥Ö\80Õ»Õ«Õ¶ Õ­Õ´Õ¢Õ¡Õ£Ö\80Õ¸Ö\82Õ´Õ¶Õ¥Ö\80Õ¨â\80¤ Õ´Õ¥Õ¯ Õ¸Ö\82Ö\80Õ«Õ·Õ¶ Õ¡Ö\80Õ¤Õ¥Õ¶ Õ°Õ¥Õ¿ Õ§ Õ£Õ¬Õ¸Ö\80Õ¥Õ¬ Õ¯Õ¡Õ´ Õ­Õ´Õ¢Õ¡Õ£Ö\80Õ¥Õ¬ Õ§ էջը։
 
\8eÕ¥Ö\80Õ»Õ«Õ¶ Õ­Õ´Õ¢Õ¡Õ£Ö\80Õ¸Ö\82Õ´Õ¨ Õ¯Õ¡Õ¿Õ¡Ö\80Õ¾Õ¥Õ¬ Õ§ [[User:$3|$3]] ([[User talk:$3|Õ\94Õ¶Õ¶Õ¡Ö\80Õ¯Õ¸Ö\82Õ´]]) Õ´Õ¡Õ½Õ¶Õ¡Õ¯Ö\81Õ« Õ¯Õ¸Õ²Õ´Õ«Ö\81։',
\8eÕ¥Ö\80Õ»Õ«Õ¶ Õ­Õ´Õ¢Õ¡Õ£Ö\80Õ¸Ö\82Õ´Õ¨ Õ¯Õ¡Õ¿Õ¡Ö\80Õ¥Õ¬ Õ§ [[User:$3|$3]] ([[User talk:$3|Õ\94Õ¶Õ¶Õ¡Ö\80Õ¯Õ¸Ö\82Õ´]]) Õ´Õ¡Õ½Õ¶Õ¡Õ¯Õ«Ö\81Õ¨։',
 'editcomment' => "Խմբագրման մեկնաբանումն էր. «''$1''»։",
 'revertpage' => '[[Special:Contributions/$2|$2]] ([[User talk:$2|քննարկում]]) մասնակցի խմբագրումները հետ են շրջվել [[User:$1|$1]] մասնակցի վերջին տարբերակին։',
 'revertpage-nouser' => 'Հետ շրջվեց (անունը ջնջված է) մասնակցի խմբագրումը՝ [[User:$1|$1]] մասնակցի տարբերակին',
index 955c931..bf94c90 100644 (file)
@@ -3787,6 +3787,7 @@ Per favore, conferma che vuoi veramente ricreare questa pagina.",
 
 # Separators for various lists, etc.
 'percent' => '$1&#160;%',
+'quotation-marks' => '«$1»',
 
 # Multipage image navigation
 'imgmultipageprev' => '← pagina precedente',
index 10a1759..fcc9758 100644 (file)
@@ -1374,8 +1374,8 @@ $3が示した理由: ''$2''",
 'revdelete-hide-user' => '投稿者の利用者名/IPアドレス',
 'revdelete-hide-restricted' => '他の利用者と同様に管理者からもデータを隠す',
 'revdelete-radio-same' => '(変更しない)',
-'revdelete-radio-set' => '表示',
-'revdelete-radio-unset' => 'é\9d\9e表示',
+'revdelete-radio-set' => '非公開',
+'revdelete-radio-unset' => 'é\96²è¦§å\8f¯è\83½',
 'revdelete-suppress' => '他の利用者と同様に管理者からもデータを隠す',
 'revdelete-unsuppress' => '復元版に対する制限を除去',
 'revdelete-log' => '理由:',
index c2e1c12..8bf3c4b 100644 (file)
@@ -1346,8 +1346,8 @@ $2개 보다 적게 {{PLURAL:$2|써야}} 하지만 {{PLURAL:$1|지금은 $1개
 'revdelete-hide-user' => '편집자의 사용자 이름/IP 주소',
 'revdelete-hide-restricted' => '관리자도 보지 못하게 숨기기',
 'revdelete-radio-same' => '(바꾸지 않음)',
-'revdelete-radio-set' => '보이기',
-'revdelete-radio-unset' => '숨기기',
+'revdelete-radio-set' => '숨겨짐',
+'revdelete-radio-unset' => '보여짐',
 'revdelete-suppress' => '문서 내용을 관리자에게도 보이지 않게 숨기기',
 'revdelete-unsuppress' => '되살린 판에 대한 제한을 해제',
 'revdelete-log' => '이유:',
@@ -3317,6 +3317,7 @@ $2',
 'pageinfo-length' => '문서 길이 (바이트)',
 'pageinfo-article-id' => '문서 ID',
 'pageinfo-language' => '문서 내용 언어',
+'pageinfo-content-model' => '문서 콘텐츠 모델',
 'pageinfo-robot-policy' => '로봇에 의한 색인',
 'pageinfo-robot-index' => '허용됨',
 'pageinfo-robot-noindex' => '불허됨',
index 9f89013..d0cfffc 100644 (file)
@@ -1152,8 +1152,8 @@ Aner {{SITENAME}}-Administrateure kënnen de geläschten Inhalt oder aner geläs
 'revdelete-hide-user' => 'Dem Auteur säi Benotzernumm/IP-Adress',
 'revdelete-hide-restricted' => 'Donnéeën och fir Administrateuren suppriméieren geneesou wéi fir déi Aner',
 'revdelete-radio-same' => '(net änneren)',
-'revdelete-radio-set' => 'Visibel',
-'revdelete-radio-unset' => 'Verstoppt',
+'revdelete-radio-set' => 'Verstoppt',
+'revdelete-radio-unset' => 'Visibel',
 'revdelete-suppress' => 'Grond vum Läschen och fir Administrateure verstoppt',
 'revdelete-unsuppress' => 'Limitatiounen fir restauréiert Versiounen ophiewen',
 'revdelete-log' => 'Grond:',
index 91854da..5fc7998 100644 (file)
@@ -1011,8 +1011,8 @@ J'àutri aministrator dzora a {{SITENAME}} a saran ancó sempe bon a s-ciairé 
 'revdelete-hide-user' => "Stranòm/adrëssa IP dl'utent",
 'revdelete-hide-restricted' => "Stërmé j'anformassion a j'aministrator tan-me a j'àutri",
 'revdelete-radio-same' => '(cambia pa)',
-'revdelete-radio-set' => 'Visìbil',
-'revdelete-radio-unset' => 'Stërmà',
+'revdelete-radio-set' => 'Stërmà',
+'revdelete-radio-unset' => 'Visìbil',
 'revdelete-suppress' => "Smon-je pa ij dat gnanca a j'aministrator",
 'revdelete-unsuppress' => "Gava le limitassion da 'nt le version ciapà andaré",
 'revdelete-log' => 'Rason:',
index c2f01a0..3c2fdab 100644 (file)
@@ -2449,14 +2449,14 @@ There are three radio buttons in each row, and the captions above each column re
 * {{msg-mw|Revdelete-radio-same}}
 * {{msg-mw|Revdelete-radio-set}}
 * {{msg-mw|Revdelete-radio-unset}}
-{{Identical|Visible}}',
+{{Identical|Hidden}}',
 'revdelete-radio-unset' => 'This message is a part of the [[mw:RevisionDelete|RevisionDelete]] feature. The message is a caption for a column of radioboxes inside a box with {{msg-mw|Revdelete-legend}} as a title.
 [[File:RevDelete Special-RevisionDelete (r60428).png|frame|center|Screenshot of the interface]]
 There are three radio buttons in each row, and the captions above each column read:
 * {{msg-mw|Revdelete-radio-same}}
 * {{msg-mw|Revdelete-radio-set}}
 * {{msg-mw|Revdelete-radio-unset}}
-{{Identical|Hidden}}',
+{{Identical|Visible}}',
 'revdelete-suppress' => 'Option for oversight; used in [[Special:RevisionDelete]].
 
 See also:
@@ -8254,7 +8254,7 @@ Non-animated images use {{msg-mw|svg-long-desc}}.',
 * $1 - the error message
 See also:
 * {{msg-mw|Thumbnail error}}',
-'show-big-image' => 'Displayed under an image at the image description page, when it is displayed smaller there than it was uploaded.',
+'show-big-image' => 'Displayed under the file on file description pages, when a reduced-size thumbnail of the original file is being displayed.',
 'show-big-image-preview' => 'Message shown under the image description page thumbnail.
 
 Can be followed by {{msg-mw|Show-big-image-other}}.
index 24e1c2b..9af5e22 100644 (file)
@@ -2108,9 +2108,7 @@ Această pagină specială permite căutarea fișierelor în funcție de tipul M
 * Imagini animate : <code>image/gif</code>
 * Fișiere sunet : <code>audio/ogg</code>, <code>audio/x-ogg</code>
 * Fișiere video : <code>video/ogg</code>, <code>video/x-ogg</code>
-* Fișiere PDF : <code>application/pdf</code>
-
-Lista tipurilor MIME recunoscute de MediaWiki poate fi găsită la [http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/mime.types?view=markup fișiere mime.types].',
+* Fișiere PDF : <code>application/pdf</code>',
 'mimetype' => 'Tip MIME:',
 'download' => 'descarcă',
 
index 3eb6277..9fd5270 100644 (file)
@@ -1424,8 +1424,8 @@ $3 {{GENDER:$3|указал|указала}} следующую причину:
 'revdelete-hide-user' => 'Имя участника/IP-адрес',
 'revdelete-hide-restricted' => 'Скрыть данные также и от администраторов',
 'revdelete-radio-same' => '(не изменять)',
-'revdelete-radio-set' => 'Ð\92идимая',
-'revdelete-radio-unset' => 'СкÑ\80Ñ\8bÑ\82ая',
+'revdelete-radio-set' => 'СкÑ\80Ñ\8bÑ\82ая',
+'revdelete-radio-unset' => 'Ð\92идимая',
 'revdelete-suppress' => 'Скрывать данные также и от администраторов',
 'revdelete-unsuppress' => 'Снять ограничения с восстановленных версий',
 'revdelete-log' => 'Причина:',
index edf45c0..58c76a6 100644 (file)
@@ -1266,7 +1266,7 @@ $2
 Проверите разлике испод, па сачувајте измене.',
 'undo-failure' => 'Не могу да вратим измену због постојања сукобљених међуизмена.',
 'undo-norev' => 'Не могу да вратим измену јер не постоји или је обрисана.',
-'undo-summary' => 'Поништена измена $1  {{GENDER:$2|корисника|кориснице}} [[Special:Contributions/$2|$2]] ([[User talk:$2|разговор]])',
+'undo-summary' => 'Поништена измена $1 {{GENDER:$2|корисника|кориснице}} [[Special:Contributions/$2|$2]] ([[User talk:$2|разговор]])',
 'undo-summary-username-hidden' => 'Поништи измену $1 скривеног корисника',
 
 # Account creation failure
index 062e735..a5142ae 100644 (file)
@@ -2249,7 +2249,7 @@ Tugon at karagdagang tulong:
 'excontentauthor' => "ang nilalaman ay: '$1' (at ang tanging nag-ambag ay si '[[Special:Contributions/$2|$2]]')",
 'exbeforeblank' => "nilalaman bago nablangko: '$1'",
 'exblank' => 'walang laman ang pahina',
-'delete-confirm' => 'Burahin "$1"',
+'delete-confirm' => 'Burahin ang "$1"',
 'delete-legend' => 'Burahin',
 'historywarning' => "'''Babala''': May kasaysayan ang pahinang buburahin mo na tinatayang may $1 {{PLURAL:$1|pagbabago|mga pagbabago}}:",
 'confirmdeletetext' => 'Lubos mo nang buburahin ang pahinang ito pati ang kalahatan ng kasaysayan nito.
index 6c4b8cb..fd70746 100644 (file)
@@ -1342,11 +1342,11 @@ $3 зазначив таку причину: ''$2''",
 * Потенційно наклепницькі відомості
 * Недоречна особиста інформація
 *: ''домашні адреси, номери телефонів, номер паспорта тощо.''",
-'revdelete-legend' => 'УÑ\81Ñ\82ановиÑ\82и Ð¾Ð±Ð¼ÐµÐ¶ÐµÐ½Ð½Ñ\8f',
-'revdelete-hide-text' => 'ТекÑ\81Ñ\82 Ð²Ð¸Ð¿Ñ\80авленÑ\8c',
+'revdelete-legend' => 'Ð\92Ñ\81Ñ\82ановиÑ\82и Ð¾Ð±Ð¼ÐµÐ¶ÐµÐ½Ð½Ñ\8f Ð²Ð¸Ð´Ð¸Ð¼Ð¾Ñ\81Ñ\82Ñ\96',
+'revdelete-hide-text' => 'ТекÑ\81Ñ\82 Ð²ÐµÑ\80Ñ\81Ñ\96Ñ\97 Ñ\81Ñ\82оÑ\80Ñ\96нки',
 'revdelete-hide-image' => 'Приховати вміст файлу',
 'revdelete-hide-name' => "Приховати дію та її об'єкт",
-'revdelete-hide-comment' => 'Ð\9fÑ\96дÑ\81Ñ\83мок Ð·Ð¼Ñ\96н',
+'revdelete-hide-comment' => 'Ð\9aоменÑ\82аÑ\80 Ñ\80едагÑ\83ваннÑ\8f',
 'revdelete-hide-user' => "Ім'я автора/IP адреса",
 'revdelete-hide-restricted' => 'Приховати дані також і від адміністраторів',
 'revdelete-radio-same' => '(не змінювати)',
index 4cdff2a..3829b69 100644 (file)
@@ -1284,8 +1284,8 @@ Các quản lý khác ở {{SITENAME}} vẫn có thể truy nhập vào nội du
 'revdelete-hide-user' => 'Tên người dùng hay địa chỉ IP của người viết trang',
 'revdelete-hide-restricted' => 'Ẩn giấu thông tin khỏi các Quản lý lẫn thành viên khác',
 'revdelete-radio-same' => '(không đổi)',
-'revdelete-radio-set' => 'Xem được',
-'revdelete-radio-unset' => 'n',
+'revdelete-radio-set' => 'Ẩn',
+'revdelete-radio-unset' => 'Hiện',
 'revdelete-suppress' => 'Che dữ liệu đối với bảo quản viên cũng như các thành viên khác',
 'revdelete-unsuppress' => 'Bỏ các hạn chế trên các phiên bản được phục hồi',
 'revdelete-log' => 'Lý do:',
@@ -4083,7 +4083,7 @@ hoặc [//www.gnu.org/licenses/old-licenses/gpl-2.0.html đọc nó trực tuy
 # Special:Redirect
 'redirect' => 'Đổi hướng đến tập tin, người dùng, hoặc số phiên bản',
 'redirect-legend' => 'Đổi hướng đến tập tin hoặc trang',
-'redirect-summary' => 'Trang đặc biệt này đổi hướng đến một tập tin (theo tên tập tin được cho vào), trang (theo số phiên bản được cho vào), hoặc trang cá nhân (theo số thành viên). Cách sử dụng: [[{{#Special:Redirect}}/file/Ví dụ.jpg]], [[{{#Special:Redirect}}/revision/328429]], hoặc [[{{#Special:Redirect}}/user/101]].',
+'redirect-summary' => 'Trang đặc biệt này đổi hướng đến một tập tin (theo tên tập tin được cho vào), trang (theo số phiên bản được cho vào), hoặc trang cá nhân (theo số thành viên). Cách sử dụng: [[{{#Special:Redirect}}/file/Example.jpg]], [[{{#Special:Redirect}}/revision/328429]], hoặc [[{{#Special:Redirect}}/user/101]].',
 'redirect-submit' => 'Đi',
 'redirect-lookup' => 'Tra cứu:',
 'redirect-value' => 'Giá trị:',
index 21dc8dc..5a1dd26 100644 (file)
@@ -1171,9 +1171,10 @@ $2
 'revdelete-text' => "'''אויסגעמעקטע רעוויזיעס און געשעענישן וועלן בלייבן אין דער בלאט היסטאריע און די לאגביכער, אבער טיילן פון זייער אינהאלט וועט ווערן אומגרייכלעך צום קהל. '''
 אנדערע סיסאפן אויף {{SITENAME}} וועלן נאך האבן צוטריט צום באהאלטענעם אינהאלט און קענען אים צוריקשטעלן דורך דעם זעלבן אייבערפלאך,  אחוץ ווען מען שטעלט נאך באגרענעצונגען.",
 'revdelete-confirm' => 'זייט אזוי גוט און באשטעטיקט אז דאס איז טאקע אייער כוונה, אז איר פארשטייט די קאנסעקווענצן, און אז איר טוט דאס לויט  [[{{MediaWiki:Policy-url}}|דער פאליסי]].',
-'revdelete-suppress-text' => "באהאלטן זאל בלויז גענוצט ווערן '''נאר''' אין די פאלגענדע פעלער:
+'revdelete-suppress-text' => "אונטערדרוקן זאל בלויז גענוצט ווערן '''נאר''' אין די פאלגנדע פעלער:
+* אינפארמאציע וואס קען זיין מוציא שם רע
 * אויפדעקונג פון פריוואטקייט אינפארמאציע
-* ''היים אדרעסן, טעלעפאן נומערן, אדער סאשעל סעקיורעטי, א.א.וו.:'''",
+*: ''היים אדרעסן, טעלעפאן נומערן, נאציאנאלע אידענטיפיקאציע נומערן, א.א.וו.''",
 'revdelete-legend' => 'שטעלט ווייזונג באגרענעצונגען',
 'revdelete-hide-text' => 'ווערסיע טעקסט',
 'revdelete-hide-image' => 'באהאלט טעקע אינהאלט',
@@ -1182,8 +1183,8 @@ $2
 'revdelete-hide-user' => "רעדאַקטאר'ס באניצער-נאמען/IP-אַדרעס",
 'revdelete-hide-restricted' => 'באהאלט אינפארמאציע אויך פון אדמיניסטראטורן פונקט ווי פשוטע באנוצער',
 'revdelete-radio-same' => '(נישט ענדערן)',
-'revdelete-radio-set' => '×\96×¢×\91×\90ר',
-'revdelete-radio-unset' => 'פֿ×\90ַר×\91×\90ָר×\92×\9f',
+'revdelete-radio-set' => 'פֿ×\90ַר×\91×\90ָר×\92×\9f',
+'revdelete-radio-unset' => '×\96×¢×\91×\90ר',
 'revdelete-suppress' => 'באַהאַלטן אינפֿארמאַציע פון אַדמיניסטראַטארן ווי אויך אנדערע',
 'revdelete-unsuppress' => 'טוה אפ באגרענעצונגן אין גענדערטע רעוויזיעס',
 'revdelete-log' => 'אורזאַך:',
@@ -1558,6 +1559,7 @@ $1",
 'right-editmyusercss' => 'רעדאקטירע אײַערע אייגענע באניצער CSS טעקעס',
 'right-editmyuserjs' => 'רעדאקטירן אײַערע אייגענע באניצער JavaScript טעקעס',
 'right-viewmywatchlist' => 'באקוקן אייער אייגענע אויפפאסונג ליסטע',
+'right-editmywatchlist' => 'רעדאקטירן אייער אייגענע אויפפאסונג ליסטער. טייל פעולות וועלן דאך צולייגן בלעטער אפילו אן דעם רעכט.',
 'right-viewmyprivateinfo' => 'באקוקן אײַער אייגענע פריוואטע דאטן (צ"ב ע־פאסט אדרעס, אמתער נאמען)',
 'right-editmyprivateinfo' => 'רעדאקטירן אײַער אייגענע פריוואטע דאטן (צ"ב ע־פאסט אדרעס, אמתער נאמען)',
 'right-editmyoptions' => 'רעדאקטירן אײַערע אייגענע פרעפערענצן',
@@ -2102,6 +2104,7 @@ $1",
 'listusers' => 'באַניצער ליסטע',
 'listusers-editsonly' => 'ווייזן נאר באניצערס מיט רעדאקטירונגען',
 'listusers-creationsort' => 'סארטירן לויט דער שאַפן דאַטע',
+'listusers-desc' => 'סארטירן אין אראפרשטייגעדיקן סדר',
 'usereditcount' => '{{PLURAL:$1|רעדאַקטירונג|$1 רעדאַקטירונגען}}',
 'usercreated' => '{{GENDER:$3|געשאַפֿן}} אום $2, $1',
 'newpages' => 'נייע בלעטער',
index a3ff98e..ea0153a 100644 (file)
@@ -1266,8 +1266,8 @@ $3的理由是''$2''",
 'revdelete-hide-user' => '编辑者的用户名/IP地址',
 'revdelete-hide-restricted' => '同时阻止管理员与其他用户查看数据',
 'revdelete-radio-same' => '(不要更改)',
-'revdelete-radio-set' => '可见',
-'revdelete-radio-unset' => '隐藏',
+'revdelete-radio-set' => '隐藏',
+'revdelete-radio-unset' => '可见',
 'revdelete-suppress' => '同时阻止管理员与其他用户查看数据',
 'revdelete-unsuppress' => '在已恢复的修订中移除限制',
 'revdelete-log' => '原因:',
index dc04d1d..0b4ed98 100644 (file)
@@ -1201,8 +1201,9 @@ $2
 'revdelete-text' => "'''刪除的修訂仍將顯示在頁面歷史中, 但它們的文字內容已不能被公眾訪問。'''
 在{{SITENAME}}的其他管理員將仍能訪問隱藏的內容並透過與此相同的介面恢復刪除,除非網站工作者進行了一些附加的限制。",
 'revdelete-confirm' => '請確認您肯定去做的話,您就要明白到後果,以及這個程序符合[[{{MediaWiki:Policy-url}}|政策]]。',
-'revdelete-suppress-text' => "壓制'''只'''應在以下的情況下進行:
-* 不合適的個人資料
+'revdelete-suppress-text' => "禁制應'''僅'''於下述情形之一時使用:
+* 潛在誹謗性資訊
+* 不合適個人資料
 *: ''住家地址、電話號碼、社群保安號碼等。''",
 'revdelete-legend' => '設定可見性之限制',
 'revdelete-hide-text' => '修訂文字',
@@ -1212,8 +1213,8 @@ $2
 'revdelete-hide-user' => '編輯者的用戶名/IP位址',
 'revdelete-hide-restricted' => '同時廢止由操作員以及其他用戶的資料',
 'revdelete-radio-same' => '(不要更改)',
-'revdelete-radio-set' => '可見',
-'revdelete-radio-unset' => '隱藏',
+'revdelete-radio-set' => '隱藏',
+'revdelete-radio-unset' => '可見',
 'revdelete-suppress' => '同時廢止由操作員以及其他用戶的資料',
 'revdelete-unsuppress' => '在已恢復的修訂中移除限制',
 'revdelete-log' => '理由:',
@@ -3102,6 +3103,7 @@ $2',
 'pageinfo-length' => '頁面長度 (以位元組為單位)',
 'pageinfo-article-id' => '頁面編號',
 'pageinfo-language' => '頁面內容語言',
+'pageinfo-content-model' => '頁面內容模型',
 'pageinfo-robot-policy' => '機械人索引',
 'pageinfo-robot-index' => '容許',
 'pageinfo-robot-noindex' => '阻止',
@@ -3772,6 +3774,7 @@ $5
 'colon-separator' => ':',
 'word-separator' => '',
 'parentheses' => '($1)',
+'quotation-marks' => '“$1”',
 
 # Multipage image navigation
 'imgmultipageprev' => '← 上一頁',
diff --git a/maintenance/archives/patch-val_ip.sql b/maintenance/archives/patch-val_ip.sql
deleted file mode 100644 (file)
index 9214218..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
--- Column added 2005-05-24
-
-ALTER TABLE /*$wgDBprefix*/validate
-  ADD COLUMN val_ip varchar(20) NOT NULL default '';
diff --git a/maintenance/archives/patch-validate.sql b/maintenance/archives/patch-validate.sql
deleted file mode 100644 (file)
index 9701083..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
--- For article validation
-
-DROP TABLE IF EXISTS /*$wgDBprefix*/validate;
-CREATE TABLE /*$wgDBprefix*/validate (
-  `val_user` int(11) NOT NULL default '0',
-  `val_page` int(11) unsigned NOT NULL default '0',
-  `val_revision` int(11) unsigned NOT NULL default '0',
-  `val_type` int(11) unsigned NOT NULL default '0',
-  `val_value` int(11) default '0',
-  `val_comment` varchar(255) NOT NULL default '',
-  `val_ip` varchar(20) NOT NULL default '',
-  KEY `val_user` (`val_user`,`val_revision`)
-) /*$wgDBTableOptions*/;
index 8f170ab..34837e1 100644 (file)
@@ -1,7 +1,6 @@
 #!/usr/bin/perl
 
 ## Convert data from a MySQL mediawiki database into a Postgres mediawiki database
-## svn: $Id$
 
 ## NOTE: It is probably easier to dump your wiki using maintenance/dumpBackup.php
 ## and then import it with maintenance/importDump.php
@@ -181,7 +180,7 @@ $MYSQLSOCKET and $conninfo .= "\n--   socket    $MYSQLSOCKET";
 print qq{
 -- Dump of MySQL Mediawiki tables for import into a Postgres Mediawiki schema
 -- Performed by the program: $0
--- Version: $VERSION (subversion }.q{$LastChangedRevision$}.qq{)
+-- Version: $VERSION
 -- Author: Greg Sabino Mullane <greg\@turnstep.com> Comments welcome
 --
 -- This file was created: $now
index 315176c..b9eb809 100644 (file)
@@ -70,7 +70,6 @@ class RebuildRecentchanges extends Maintenance {
                $dbw->insertSelect( 'recentchanges', array( 'page', 'revision' ),
                        array(
                                'rc_timestamp'  => 'rev_timestamp',
-                               'rc_cur_time'   => 'rev_timestamp',
                                'rc_user'       => 'rev_user',
                                'rc_user_text'  => 'rev_user_text',
                                'rc_namespace'  => 'page_namespace',
@@ -185,7 +184,6 @@ class RebuildRecentchanges extends Maintenance {
                $dbw->insertSelect( 'recentchanges', array( 'user', "$logging LEFT JOIN $page ON (log_namespace=page_namespace AND log_title=page_title)" ),
                        array(
                                'rc_timestamp'  => 'log_timestamp',
-                               'rc_cur_time'   => 'log_timestamp',
                                'rc_user'       => 'log_user',
                                'rc_user_text'  => 'user_name',
                                'rc_namespace'  => 'log_namespace',
index af01a30..53964aa 100644 (file)
@@ -1026,6 +1026,8 @@ CREATE TABLE /*_*/recentchanges (
   rc_timestamp varbinary(14) NOT NULL default '',
 
   -- This is no longer used
+  -- Field kept in database for downgrades
+  -- @todo: add drop patch with 1.24
   rc_cur_time varbinary(14) NOT NULL default '',
 
   -- As in revision
index ba711aa..299fabd 100644 (file)
        };
 
        // Legacy (for compatibility with the code previously in skins/common.edit.js)
-       window.addButton = toolbar.addButton;
-       window.insertTags = toolbar.insertTags;
+       mw.log.deprecate( window, 'addButton', toolbar.addButton, 'Use mw.toolbar.addButton instead' );
+       mw.log.deprecate( window, 'insertTags', toolbar.insertTags, 'Use mw.toolbar.insertTags instead' );
 
-       // Explose API publicly
+       // Expose API publicly
        mw.toolbar = toolbar;
 
        $( function () {
index c749598..7f9a023 100644 (file)
@@ -24,7 +24,7 @@ class ArticleTablesTest extends MediaWikiLangTestCase {
                $templates1 = $title->getTemplateLinksFrom();
 
                $wgLang = Language::factory( 'de' );
-               $page->mPreparedEdit = false; // In order to force the rerendering of the same wikitext
+               $page = WikiPage::factory( $title ); // In order to force the rerendering of the same wikitext
 
                // We need an edit, a purge is not enough to regenerate the tables
                $page->doEditContent( new WikitextContent( '{{:{{int:history}}}}' ), 'Test code for bug 14404', EDIT_UPDATE, false, $user );
index 78929e2..aa09def 100644 (file)
@@ -241,6 +241,26 @@ class LanguageTest extends LanguageClassesTestCase {
                        $this->getLang()->truncate( "123456789", -5, 'XXXXXXXXXXXXXXX' ),
                        'truncate suffix, large ellipsis'
                );
+               $this->assertEquals(
+                       "123XXX",
+                       $this->getLang()->truncate( "123                ", 9, 'XXX' ),
+                       'truncate prefix, with spaces'
+               );
+               $this->assertEquals(
+                       "12345XXX",
+                       $this->getLang()->truncate( "12345            8", 11, 'XXX' ),
+                       'truncate prefix, with spaces and non-space ending'
+               );
+               $this->assertEquals(
+                       "XXX234",
+                       $this->getLang()->truncate( "1              234", -8, 'XXX' ),
+                       'truncate suffix, with spaces'
+               );
+               $this->assertEquals(
+                       "12345XXX",
+                       $this->getLang()->truncate( "1234567890", 5, 'XXX', false ),
+                       'truncate without adjustment'
+               );
        }
 
        /**