Merge "Added --postime option syncFileBackend."
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 4 Mar 2013 21:32:04 +0000 (21:32 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 4 Mar 2013 21:32:04 +0000 (21:32 +0000)
25 files changed:
RELEASE-NOTES-1.21
includes/DefaultSettings.php
includes/ImagePage.php
includes/Pager.php
includes/User.php
includes/WebRequest.php
includes/api/ApiBase.php
includes/api/ApiEmailUser.php
includes/api/ApiQueryInfo.php
includes/api/ApiSetNotificationTimestamp.php
includes/api/ApiTokens.php
includes/api/ApiUnblock.php
includes/installer/Installer.i18n.php
includes/logging/LogFormatter.php
includes/specials/SpecialNewpages.php
includes/specials/SpecialRecentchanges.php
includes/specials/SpecialUndelete.php
includes/specials/SpecialUpload.php
includes/specials/SpecialUserlogin.php
includes/specials/SpecialWatchlist.php
languages/classes/LanguageLt.php [deleted file]
languages/classes/LanguageLv.php [deleted file]
languages/messages/MessagesEn.php
maintenance/mwdoc-filter.php
tests/phpunit/languages/LanguageLvTest.php

index 1d56221..3471dbe 100644 (file)
@@ -248,6 +248,7 @@ production.
   used for action=upload's 'file' and 'chunk' parameters. This type will raise
   an error during parameter validation if the parameter is given but not
   recognized as an uploaded file.
+* (bug 44244) prop=info may now return the number of people watching each page.
 
 === API internal changes in 1.21 ===
 * For debugging only, a new global $wgDebugAPI removes many API restrictions when true.
index 7aad30c..73c097e 100644 (file)
@@ -5245,9 +5245,9 @@ $wgAllowCategorizedRecentChanges = false;
 $wgUseTagFilter = true;
 
 /**
- * If set to an integer, pages that are watched by more users than this
- * threshold will not require the unwatchedpages permission to view the
- * number of watchers.
+ * If set to an integer, pages that are watched by this many users or more
+ * will not require the unwatchedpages permission to view the number of
+ * watchers.
  *
  * @since 1.21
  */
index 0b814ec..998d607 100644 (file)
@@ -916,7 +916,7 @@ EOT
        public function getImageLimitsFromOption( $user, $optionName ) {
                global $wgImageLimits;
 
-               $option = intval( $user->getOption( $optionName ) );
+               $option = $user->getIntOption( $optionName );
                if ( !isset( $wgImageLimits[$option] ) ) {
                        $option = User::getDefaultOption( $optionName );
                }
index 9e937e4..746b02e 100644 (file)
@@ -143,7 +143,7 @@ abstract class IndexPager extends ContextSource implements Pager {
                $this->mOffset = $this->mRequest->getText( 'offset' );
 
                # Use consistent behavior for the limit options
-               $this->mDefaultLimit = intval( $this->getUser()->getOption( 'rclimit' ) );
+               $this->mDefaultLimit = $this->getUser()->getIntOption( 'rclimit' );
                if ( !$this->mLimit ) {
                        // Don't override if a subclass calls $this->setLimit() in its constructor.
                        list( $this->mLimit, /* $offset */ ) = $this->mRequest->getLimitOffset();
index fca2032..2263cae 100644 (file)
@@ -2474,7 +2474,7 @@ class User {
         */
        public function getStubThreshold() {
                global $wgMaxArticleSize; # Maximum article size, in Kb
-               $threshold = intval( $this->getOption( 'stubthreshold' ) );
+               $threshold = $this->getIntOption( 'stubthreshold' );
                if ( $threshold > $wgMaxArticleSize * 1024 ) {
                        # If they have set an impossible value, disable the preference
                        # so we can use the parser cache again.
index 50da049..2195fbb 100644 (file)
@@ -741,7 +741,7 @@ class WebRequest {
                        $limit = 0;
                }
                if( ( $limit == 0 ) && ( $optionname != '' ) ) {
-                       $limit = (int)$wgUser->getOption( $optionname );
+                       $limit = $wgUser->getIntOption( $optionname );
                }
                if( $limit <= 0 ) {
                        $limit = $deflimit;
index 6dd6a2b..9e48e3a 100644 (file)
@@ -845,7 +845,7 @@ abstract class ApiBase extends ContextSource {
                                                        ? 'watchdefault' : 'watchcreations';
                                }
                                # Watch the article based on the user preference
-                               return (bool)$this->getUser()->getOption( $userOption );
+                               return $this->getUser()->getBoolOption( $userOption );
 
                        case 'nochange':
                                return $userWatching;
index 5a5c572..cd0d0cb 100644 (file)
@@ -154,6 +154,6 @@ class ApiEmailUser extends ApiBase {
        }
 
        public function getHelpUrls() {
-               return 'https://www.mediawiki.org/wiki/API:E-mail';
+               return 'https://www.mediawiki.org/wiki/API:Email';
        }
 }
index 7797205..a888d99 100644 (file)
@@ -33,7 +33,8 @@ class ApiQueryInfo extends ApiQueryBase {
 
        private $fld_protection = false, $fld_talkid = false,
                $fld_subjectid = false, $fld_url = false,
-               $fld_readable = false, $fld_watched = false, $fld_notificationtimestamp = false,
+               $fld_readable = false, $fld_watched = false, $fld_watchers = false,
+               $fld_notificationtimestamp = false,
                $fld_preload = false, $fld_displaytitle = false;
 
        private $params, $titles, $missing, $everything, $pageCounter;
@@ -41,7 +42,8 @@ class ApiQueryInfo extends ApiQueryBase {
        private $pageRestrictions, $pageIsRedir, $pageIsNew, $pageTouched,
                $pageLatest, $pageLength;
 
-       private $protections, $watched, $notificationtimestamps, $talkids, $subjectids, $displaytitles;
+       private $protections, $watched, $watchers, $notificationtimestamps, $talkids, $subjectids, $displaytitles;
+       private $showZeroWatchers = false;
 
        private $tokenFunctions;
 
@@ -248,6 +250,7 @@ class ApiQueryInfo extends ApiQueryBase {
                        $prop = array_flip( $this->params['prop'] );
                        $this->fld_protection = isset( $prop['protection'] );
                        $this->fld_watched = isset( $prop['watched'] );
+                       $this->fld_watchers = isset( $prop['watchers'] );
                        $this->fld_notificationtimestamp = isset( $prop['notificationtimestamp'] );
                        $this->fld_talkid = isset( $prop['talkid'] );
                        $this->fld_subjectid = isset( $prop['subjectid'] );
@@ -305,6 +308,10 @@ class ApiQueryInfo extends ApiQueryBase {
                        $this->getWatchedInfo();
                }
 
+               if ( $this->fld_watchers ) {
+                       $this->getWatcherInfo();
+               }
+
                // Run the talkid/subjectid query if requested
                if ( $this->fld_talkid || $this->fld_subjectid ) {
                        $this->getTSIDs();
@@ -384,6 +391,14 @@ class ApiQueryInfo extends ApiQueryBase {
                        $pageInfo['watched'] = '';
                }
 
+               if ( $this->fld_watchers ) {
+                       if ( isset( $this->watchers[$ns][$dbkey] ) ) {
+                               $pageInfo['watchers'] = $this->watchers[$ns][$dbkey];
+                       } elseif ( $this->showZeroWatchers ) {
+                               $pageInfo['watchers'] = 0;
+                       }
+               }
+
                if ( $this->fld_notificationtimestamp ) {
                        $pageInfo['notificationtimestamp'] = '';
                        if ( isset( $this->notificationtimestamps[$ns][$dbkey] ) ) {
@@ -675,6 +690,46 @@ class ApiQueryInfo extends ApiQueryBase {
                }
        }
 
+       /**
+        * Get the count of watchers and put it in $this->watchers
+        */
+       private function getWatcherInfo() {
+               global $wgUnwatchedPageThreshold;
+
+               if ( count( $this->everything ) == 0 ) {
+                       return;
+               }
+
+               $user = $this->getUser();
+               $canUnwatchedpages = $user->isAllowed( 'unwatchedpages' );
+               if ( !$canUnwatchedpages && !is_int( $wgUnwatchedPageThreshold ) ) {
+                       return;
+               }
+
+               $this->watchers = array();
+               $this->showZeroWatchers = $canUnwatchedpages;
+               $db = $this->getDB();
+
+               $lb = new LinkBatch( $this->everything );
+
+               $this->resetQueryParams();
+               $this->addTables( array( 'watchlist' ) );
+               $this->addFields( array( 'wl_title', 'wl_namespace', 'count' => 'COUNT(*)' ) );
+               $this->addWhere( array(
+                       $lb->constructSet( 'wl', $db )
+               ) );
+               $this->addOption( 'GROUP BY', array( 'wl_namespace', 'wl_title' ) );
+               if ( !$canUnwatchedpages ) {
+                       $this->addOption( 'HAVING', "COUNT(*) >= $wgUnwatchedPageThreshold" );
+               }
+
+               $res = $this->select( __METHOD__ );
+
+               foreach ( $res as $row ) {
+                       $this->watchers[$row->wl_namespace][$row->wl_title] = (int)$row->count;
+               }
+       }
+
        public function getCacheMode( $params ) {
                $publicProps = array(
                        'protection',
@@ -706,6 +761,7 @@ class ApiQueryInfo extends ApiQueryBase {
                                        'protection',
                                        'talkid',
                                        'watched', # private
+                                       'watchers', # private
                                        'notificationtimestamp', # private
                                        'subjectid',
                                        'url',
@@ -731,6 +787,7 @@ class ApiQueryInfo extends ApiQueryBase {
                                ' protection            - List the protection level of each page',
                                ' talkid                - The page ID of the talk page for each non-talk page',
                                ' watched               - List the watched status of each page',
+                               ' watchers              - The number of watchers, if allowed',
                                ' notificationtimestamp - The watchlist notification timestamp of each page',
                                ' subjectid             - The page ID of the parent page for each talk page',
                                ' url                   - Gives a full URL to the page, and also an edit URL',
@@ -764,6 +821,12 @@ class ApiQueryInfo extends ApiQueryBase {
                        'watched' => array(
                                'watched' => 'boolean'
                        ),
+                       'watchers' => array(
+                               'watchers' => array(
+                                       ApiBase::PROP_TYPE => 'integer',
+                                       ApiBase::PROP_NULLABLE => true
+                               )
+                       ),
                        'notificationtimestamp' => array(
                                'notificationtimestamp' => array(
                                        ApiBase::PROP_TYPE => 'timestamp',
index 3f5ebfe..8ef1a97 100644 (file)
@@ -259,7 +259,7 @@ class ApiSetNotificationTimestamp extends ApiBase {
        public function getDescription() {
                return array( 'Update the notification timestamp for watched pages.',
                        'This affects the highlighting of changed pages in the watchlist and history,',
-                       'and the sending of email when the "E-mail me when a page on my watchlist is',
+                       'and the sending of email when the "Email me when a page on my watchlist is',
                        'changed" preference is enabled.'
                );
        }
index 518bfce..7080f54 100644 (file)
  * @file
  */
 
-
 /**
  * @ingroup API
  */
 class ApiTokens extends ApiBase {
 
        public function execute() {
-               wfProfileIn( __METHOD__ );
                $params = $this->extractRequestParams();
                $res = array();
 
                $types = $this->getTokenTypes();
                foreach ( $params['type'] as $type ) {
-                       $type = strtolower( $type );
-
                        $val = call_user_func( $types[$type], null, null );
 
                        if ( $val === false ) {
@@ -49,7 +45,6 @@ class ApiTokens extends ApiBase {
                }
 
                $this->getResult()->addValue( null, $this->getModuleName(), $res );
-               wfProfileOut( __METHOD__ );
        }
 
        private function getTokenTypes() {
@@ -58,11 +53,11 @@ class ApiTokens extends ApiBase {
                        return $types;
                }
                wfProfileIn( __METHOD__ );
-               $types = array( 'patrol' => 'ApiQueryRecentChanges::getPatrolToken' );
+               $types = array( 'patrol' => array( 'ApiQueryRecentChanges', 'getPatrolToken' ) );
                $names = array( 'edit', 'delete', 'protect', 'move', 'block', 'unblock',
                        'email', 'import', 'watch', 'options' );
                foreach ( $names as $name ) {
-                       $types[$name] = 'ApiQueryInfo::get' . ucfirst( $name ) . 'Token';
+                       $types[$name] = array( 'ApiQueryInfo', 'get' . ucfirst( $name ) . 'Token' );
                }
                wfRunHooks( 'ApiTokensGetTokenTypes', array( &$types ) );
                ksort( $types );
@@ -81,54 +76,13 @@ class ApiTokens extends ApiBase {
        }
 
        public function getResultProperties() {
-               return array(
-                       '' => array(
-                               'patroltoken' => array(
-                                       ApiBase::PROP_TYPE => 'string',
-                                       ApiBase::PROP_NULLABLE => true
-                               ),
-                               'edittoken' => array(
-                                       ApiBase::PROP_TYPE => 'string',
-                                       ApiBase::PROP_NULLABLE => true
-                               ),
-                               'deletetoken' => array(
-                                       ApiBase::PROP_TYPE => 'string',
-                                       ApiBase::PROP_NULLABLE => true
-                               ),
-                               'protecttoken' => array(
-                                       ApiBase::PROP_TYPE => 'string',
-                                       ApiBase::PROP_NULLABLE => true
-                               ),
-                               'movetoken' => array(
-                                       ApiBase::PROP_TYPE => 'string',
-                                       ApiBase::PROP_NULLABLE => true
-                               ),
-                               'blocktoken' => array(
-                                       ApiBase::PROP_TYPE => 'string',
-                                       ApiBase::PROP_NULLABLE => true
-                               ),
-                               'unblocktoken' => array(
-                                       ApiBase::PROP_TYPE => 'string',
-                                       ApiBase::PROP_NULLABLE => true
-                               ),
-                               'emailtoken' => array(
-                                       ApiBase::PROP_TYPE => 'string',
-                                       ApiBase::PROP_NULLABLE => true
-                               ),
-                               'importtoken' => array(
-                                       ApiBase::PROP_TYPE => 'string',
-                                       ApiBase::PROP_NULLABLE => true
-                               ),
-                               'watchtoken' => array(
-                                       ApiBase::PROP_TYPE => 'string',
-                                       ApiBase::PROP_NULLABLE => true
-                               ),
-                               'optionstoken' => array(
-                                       ApiBase::PROP_TYPE => 'string',
-                                       ApiBase::PROP_NULLABLE => true
-                               )
-                       )
+               $props = array(
+                       '' => array(),
                );
+
+               self::addTokenProperties( $props, $this->getTokenTypes() );
+
+               return $props;
        }
 
        public function getParamDescription() {
index bc7f6e7..55e7331 100644 (file)
@@ -75,7 +75,7 @@ class ApiUnblock extends ApiBase {
 
                $res['id'] = $block->getId();
                $target = $block->getType() == Block::TYPE_AUTO ? '' : $block->getTarget();
-               $res['user'] = $target;
+               $res['user'] = $target instanceof User ? $target->getName() : $target;
                $res['userid'] = $target instanceof User ? $target->getId() : 0;
                $res['reason'] = $params['reason'];
                $this->getResult()->addValue( null, $this->getModuleName(), $res );
index 2b1c5e8..0d910fd 100644 (file)
@@ -668,6 +668,8 @@ If you\'re translating this message to a right-to-left language, consider writin
 * {{msg-mw|config-profile-no-anon}}
 * {{msg-mw|config-profile-fishbowl}}
 * {{msg-mw|config-profile-private}}',
+       'config-email-settings' => '{{Identical|E-mail setting}}',
+       'config-email-user' => '{{Identical|Enable user-to-user e-mail}}',
        'config-upload-help' => 'The word "mode" here refers to the access rights given to various user groups when attempting to create and store files and/or subdiretories in the said directory on the server. It also refers to the <code>mode</code> command used to maipulate said right mask under Unix, Linux, and similar operating systems. A less operating-system-centric translation is fine.',
        'config-logo-help' => '',
        'config-cc-not-chosen' => '{{doc-important|Do not translate the "<code>proceed</code>" part.}}
@@ -2702,7 +2704,6 @@ Arabat cheñch anezho ma n'hoc'h eus ket ezhomm d'en ober.",
        'config-type-postgres' => 'PostgreSQL',
        'config-type-sqlite' => 'SQLite',
        'config-type-oracle' => 'Oracle',
-       'config-type-ibm_db2' => 'IBM DB2',
        'config-support-info' => "Skoret eo ar reizhiadoù diaz titouroù da-heul gant MediaWiki :
 
 $1
@@ -2712,12 +2713,10 @@ Ma ne welit ket amañ dindan ar reizhiad diaz titouroù a fell deoc'h ober ganti
        'config-support-postgres' => "* Ur reizhiad diaz titouroù brudet ha digor eo $1. Gallout a ra ober evit MySQL ([http://www.php.net/manual/en/pgsql.installation.php Penaos kempunañ PHP gant skor PostgreSQL]). Gallout a ra bezañ un nebeud drein bihan enni ha n'eo ket erbedet he implijout en un endro produiñ.",
        'config-support-sqlite' => "* $1 zo ur reizhiad diaz titouroù skañv skoret eus ar c'hentañ. ([http://www.php.net/manual/en/pdo.installation.php Penaos kempunañ PHP gant skor SQLite], implijout a ra PDO)",
        'config-support-oracle' => '* $1 zo un diaz titouroù kenwerzhel. ([http://www.php.net/manual/en/oci8.installation.php Penaos kempunañ PHP gant skor OCI8])',
-       'config-support-ibm_db2' => '* Un diaz titouroù evit embregerezhioù kenwerzhel eo $1.', # Fuzzy
        'config-header-mysql' => 'Arventennoù MySQL',
        'config-header-postgres' => 'Arventennoù PostgreSQL',
        'config-header-sqlite' => 'Arventennoù SQLite',
        'config-header-oracle' => 'Arventennoù Oracle',
-       'config-header-ibm_db2' => 'Arventennoù IBM DB2',
        'config-invalid-db-type' => 'Direizh eo ar seurt diaz roadennoù',
        'config-missing-db-name' => 'Ret eo deoc\'h merkañ un dalvoudenn evit "Anv an diaz titouroù"',
        'config-missing-db-host' => 'Ret eo deoc\'h merkañ un dalvoudenn evit "Ostiz an diaz titouroù"',
@@ -2802,7 +2801,7 @@ Gellout a rit tremen ar c'hefluniadur nevez ha staliañ ar wiki war-eeun.",
        'config-optional-continue' => "Sevel muioc'h a goulennoù ouzhin.",
        'config-optional-skip' => 'Aet on skuizh, staliañ ar wiki hepken.',
        'config-profile' => 'Profil ar gwirioù implijer :',
-       'config-profile-wiki' => 'Wiki hengounel', # Fuzzy
+       'config-profile-wiki' => 'Wiki digor',
        'config-profile-no-anon' => 'Krouidigezh ur gont ret',
        'config-profile-fishbowl' => 'Embanner aotreet hepken',
        'config-profile-private' => 'Wiki prevez',
@@ -2859,7 +2858,7 @@ Marteze e vo ezhomm kefluniañ pelloc'h met gallout a rit o gweredekaat bremañ.
        'config-install-alreadydone' => "'''Diwallit''': Staliet hoc'h eus MediaWiki dija war a seblant hag emaoc'h o klask e staliañ c'hoazh.
 Kit d'ar bajenn war-lerc'h, mar plij.",
        'config-install-begin' => 'Pa vo bet pouezet ganeoc\'h war "{{int:config-continue}}"  e krogo staliadur MediaWiki.
-Pouezit war Kent mar fell deoc\'h cheñch tra pe dra.', # Fuzzy
+Pouezit war "{{int:config-back}}" mar fell deoc\'h cheñch tra pe dra.',
        'config-install-step-done' => 'graet',
        'config-install-step-failed' => "c'hwitet",
        'config-install-extensions' => 'En ur gontañ an astennoù',
@@ -2894,9 +2893,10 @@ Gwiriit hag-eñ e c'hall an implijer « $1 » skrivañ er brastres « $2 ».",
 
 == Kregiñ ganti ==
 
-* [//www.mediawiki.org/wiki/Manual:Configuration_settings Configuration settings list]
-* [//www.mediawiki.org/wiki/Manual:FAQ MediaWiki FAQ]
-* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]", # Fuzzy
+* [//www.mediawiki.org/wiki/Manual:Configuration_settings Roll an arventennoù kefluniañ]
+* [//www.mediawiki.org/wiki/Manual:FAQ FAG MediaWiki]
+* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce Roll ar c'haozeadennoù diwar-benn dasparzhoù MediaWiki]
+* [//www.mediawiki.org/wiki/Localisation#Translation_resources Lec'hiañ MediaWiki en ho yezh", # Fuzzy
 );
 
 /** Bosnian (bosanski)
@@ -9359,7 +9359,6 @@ Pertimbangkan untuk menempatkan basis data di tempat lain, misalnya di <code>/va
        'config-type-postgres' => 'PostgreSQL',
        'config-type-sqlite' => 'SQLite',
        'config-type-oracle' => 'Oracle',
-       'config-type-ibm_db2' => 'IBM DB2',
        'config-support-info' => 'MediaWiki mendukung sistem basis data berikut:
 
 $1
@@ -9369,12 +9368,10 @@ Jika Anda tidak melihat sistem basis data yang Anda gunakan tercantum di bawah i
        'config-support-postgres' => '* $1 adalah sistem basis data sumber terbuka populer sebagai alternatif untuk MySQL ([http://www.php.net/manual/en/pgsql.installation.php cara mengompilasi PHP dengan dukungan PostgreSQL]). Mungkin ada beberapa bug terbuka dan alternatif ini tidak direkomendasikan untuk dipakai dalam lingkungan produksi.',
        'config-support-sqlite' => '* $1 adalah sistem basis data yang ringan yang sangat baik dukungannya. ([http://www.php.net/manual/en/pdo.installation.php cara mengompilasi PHP dengan dukungan SQLite], menggunakan PDO)',
        'config-support-oracle' => '* $1 adalah basis data komersial untuka perusahaan. ([http://www.php.net/manual/en/oci8.installation.php cara mengompilasi PHP dengan dukungan OCI8])',
-       'config-support-ibm_db2' => '* $1 adalah basis data-perusahaan komersial.', # Fuzzy
        'config-header-mysql' => 'Pengaturan MySQL',
        'config-header-postgres' => 'Pengaturan PostgreSQL',
        'config-header-sqlite' => 'Pengaturan SQLite',
        'config-header-oracle' => 'Pengaturan Oracle',
-       'config-header-ibm_db2' => 'Pengaturan IBM DB2',
        'config-invalid-db-type' => 'Jenis basis data tidak sah',
        'config-missing-db-name' => 'Anda harus memasukkan nilai untuk "Nama basis data"',
        'config-missing-db-host' => 'Anda harus memasukkan nilai untuk "Inang basis data"',
@@ -9459,7 +9456,6 @@ Basis data MyISAM cenderung lebih sering rusak daripada basis data InnoDB.",
 Ini lebih efisien daripada modus UTF-8 MySQL dan memungkinkan Anda untuk menggunakan ragam penuh karakter Unicode.
 
 Dalam '''modus UTF-8''', MySQL akan tahu apa set karakter data dan dapat menampilkan dan mengubahnya sesuai keperluan, tetapi tidak akan mengizinkan Anda menyimpan karakter di atas [//en.wikipedia.org/wiki/Mapping_of_Unicode_character_planes Basic Multilingual Plane].",
-       'config-ibm_db2-low-db-pagesize' => "Basis data DB2 Anda tidak memiliki pagesize yang cukup untuk tablespace bawaan. Pagesize harus sama atau lebih dari '''32K'''.",
        'config-site-name' => 'Nama wiki:',
        'config-site-name-help' => 'Ini akan muncul di bilah judul peramban dan di berbagai tempat lainnya.',
        'config-site-name-blank' => 'Masukkan nama situs.',
@@ -10286,13 +10282,13 @@ chmod a+w $3</pre>',
        'config-project-namespace-help' => "ウィキペディアの例に従い、多くのウィキは、コンテンツのページとは分離したポリシーページを「'''プロジェクトの名前空間'''」に持っています。
 この名前空間内のページのページ名はすべて特定の接頭辞で始まります。それをここで指定できます。
 通常、この接頭辞はウィキ名に基づきますが、「#」や「:」のような区切り文字を含めることはできません。",
-       'config-ns-invalid' => '"<nowiki>$1</nowiki>"のように指定された名前空間は無効です。
-違うプロジェクト名前空間を指定してください。',
+       'config-ns-invalid' => '指定した名前空間「<nowiki>$1</nowiki>」は無効です。
+別のプロジェクト名前空間を指定してください。',
        'config-admin-box' => '管理アカウント',
        'config-admin-name' => '名前:',
        'config-admin-password' => 'パスワード:',
        'config-admin-password-confirm' => 'パスワードの再入力:',
-       'config-admin-help' => '希望するユーザー名をここに入力してください (例: "Joe Bloggs")。
+       'config-admin-help' => '希望するユーザー名をここに入力してください (例:「Joe Bloggs」)。
 この名前でこのウィキにログインすることになります。',
        'config-admin-name-blank' => '管理者のユーザー名を入力してください。',
        'config-admin-name-invalid' => '指定したユーザー名「<nowiki>$1</nowiki>」は無効です。
@@ -10302,8 +10298,9 @@ chmod a+w $3</pre>',
        'config-admin-password-mismatch' => '入力された2つのパスワードが一致しません。',
        'config-admin-email' => 'メールアドレス:',
        'config-admin-email-help' => 'メールアドレスを入力してください。他の利用者からのメールの受け取り、パスワードのリセット、ウォッチリストに登録したページの更新通知に使用します。空欄のままにすることもできます。',
-       'config-admin-error-user' => '"<nowiki>$1</nowiki>"という名前の管理者を作成する際に内部エラーが発生しました。',
-       'config-admin-error-password' => '管理者"<nowiki>$1</nowiki>"のパスワードを設定する際に内部エラーが発生しました: <pre>$2</pre>',
+       'config-admin-error-user' => '「<nowiki>$1</nowiki>」という名前の管理者を作成する際に内部エラーが発生しました。',
+       'config-admin-error-password' => '管理者「<nowiki>$1</nowiki>」のパスワードを設定する際に内部エラーが発生しました: <pre>$2</pre>',
+       'config-admin-error-bademail' => '無効なメールアドレスを入力しました。',
        'config-subscribe' => '[https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce リリース告知のメーリングリスト]を購読する。',
        'config-subscribe-help' => 'これは、リリースの告知 (重要なセキュリティに関する案内を含む) に使用される、流量が少ないメーリングリストです。
 このメーリングリストを購読して、新しいバージョンが出た場合にMediaWikiを更新してください。',
@@ -19812,22 +19809,33 @@ $messages['xal'] = array(
  * @author පසිඳු කාවින්ද
  */
 $messages['yi'] = array(
+       'config-information' => 'אינפֿארמאציע',
        'config-back' => '→ צוריק',
+       'config-continue' => 'פֿארזעצן ←',
        'config-page-language' => 'שפראַך',
        'config-page-name' => 'נאָמען',
        'config-page-options' => 'ברירות',
+       'config-db-type' => 'דאטנבאזע טיפ:',
+       'config-db-name' => 'דאטנבאזע נאָמען:',
+       'config-project-namespace' => 'פראיעקט נאָמענטייל:',
        'config-ns-generic' => 'פראיעקט',
        'config-admin-name' => 'אײַער נאָמען:',
        'config-admin-password' => 'פאַסווארט:',
+       'config-admin-password-mismatch' => 'די צוויי פאסוועטרט איר האט איינגעגעבן שטימען נישט.',
        'config-admin-email' => 'בליצפּאָסט אַדרעס:',
+       'config-install-tables' => 'שאפן טאבעלעס',
+       'config-install-tables-exist' => "'''ווארענונג''': זעט אויס אז די מעדיעוויקי טאבעלעס עקזיסטירן שוין.
+איבערהיפן שאפֿן.",
+       'config-download-localsettings' => 'אראפלאדן <code>LocalSettings.php</code>',
        'config-help' => 'הילף',
+       'config-nofile' => 'מ\'האט נישט געקענט טרעפן די טעקע "$1". צי האט מען זי אויסגעמעקט?',
        'mainpagetext' => "'''מעדיעוויקי אינסטאלירט מיט דערפאלג.'''",
        'mainpagedocfooter' => "גיט זיך אן עצה מיט [//meta.wikimedia.org/wiki/Help:Contents באניצער'ס וועגווײַזער] פֿאר אינפֿארמאציע וויאזוי זיך באנוצן מיט וויקי ווייכוואַרג.
 
 == נוצליכע וועבלינקען פֿאַר אנהייבערס ==
 * [//www.mediawiki.org/wiki/Manual:Configuration_settings רשימה פון קאנפֿיגוראציעס]
 * [//www.mediawiki.org/wiki/Manual:FAQ אפֿט געפֿרעגטע שאלות]
-* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce מעדיעוויקי באפֿרײַאונג פאסטליסטע]",
+* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce מעדיעוויקי באפֿרײַאונג פאסטליסטע]* [//www.mediawiki.org/wiki/Localisation#Translation_resources איבערזעצן מעדיעוויקי אין אײַער שפראך]",
 );
 
 /** Yoruba (Yorùbá)
index eb8779f..4d3565d 100644 (file)
@@ -439,7 +439,7 @@ class LogFormatter {
                $entry = $this->entry;
                $params = $this->extractParameters();
                $params[0] = Message::rawParam( $this->getPerformerElement() );
-               $params[1] = $entry->getPerformer()->getName();
+               $params[1] = $this->canView( LogPage::DELETED_USER ) ? $entry->getPerformer()->getName() : '';
                $params[2] = Message::rawParam( $this->makePageLink( $entry->getTarget() ) );
 
                // Bad things happens if the numbers are not in correct order
index 0499e57..6e8e634 100644 (file)
@@ -53,7 +53,7 @@ class SpecialNewpages extends IncludableSpecialPage {
                $opts->add( 'hidepatrolled', $this->getUser()->getBoolOption( 'newpageshidepatrolled' ) );
                $opts->add( 'hidebots', false );
                $opts->add( 'hideredirs', true );
-               $opts->add( 'limit', (int)$this->getUser()->getOption( 'rclimit' ) );
+               $opts->add( 'limit', $this->getUser()->getIntOption( 'rclimit' ) );
                $opts->add( 'offset', '' );
                $opts->add( 'namespace', '0' );
                $opts->add( 'username', '' );
index 7ea3a94..2cc5f9e 100644 (file)
@@ -42,8 +42,8 @@ class SpecialRecentChanges extends IncludableSpecialPage {
        public function getDefaultOptions() {
                $opts = new FormOptions();
 
-               $opts->add( 'days', (int)$this->getUser()->getOption( 'rcdays' ) );
-               $opts->add( 'limit', (int)$this->getUser()->getOption( 'rclimit' ) );
+               $opts->add( 'days', $this->getUser()->getIntOption( 'rcdays' ) );
+               $opts->add( 'limit', $this->getUser()->getIntOption( 'rclimit' ) );
                $opts->add( 'from', '' );
 
                $opts->add( 'hideminor', $this->getUser()->getBoolOption( 'hideminor' ) );
index afc41bf..b6578a3 100644 (file)
@@ -939,8 +939,8 @@ class SpecialUndelete extends SpecialPage {
                        // source view for textual content
                        $sourceView = Xml::element( 'textarea', array(
                                'readonly' => 'readonly',
-                               'cols' => intval( $user->getOption( 'cols' ) ),
-                               'rows' => intval( $user->getOption( 'rows' ) ) ),
+                               'cols' => $user->getIntOption( 'cols' ),
+                               'rows' => $user->getIntOption( 'rows' ) ),
                                $content->getNativeData() . "\n" );
 
                        $previewButton = Xml::element( 'input', array(
index c1505a0..a37f5fb 100644 (file)
@@ -953,7 +953,7 @@ class UploadForm extends HTMLForm {
                                        ? 'filereuploadsummary'
                                        : 'fileuploadsummary',
                                'default' => $this->mComment,
-                               'cols' => intval( $this->getUser()->getOption( 'cols' ) ),
+                               'cols' => $this->getUser()->getIntOption( 'cols' ),
                                'rows' => 8,
                        )
                );
index 27701d4..634d06f 100644 (file)
@@ -747,7 +747,7 @@ class LoginForm extends SpecialPage {
                        case self::SUCCESS:
                                # We've verified now, update the real record
                                $user = $this->getUser();
-                               if( (bool)$this->mRemember != (bool)$user->getOption( 'rememberpassword' ) ) {
+                               if( (bool)$this->mRemember != $user->getBoolOption( 'rememberpassword' ) ) {
                                        $user->setOption( 'rememberpassword', $this->mRemember ? 1 : 0 );
                                        $user->saveSettings();
                                } else {
index bf2d08b..7114fc9 100644 (file)
@@ -226,7 +226,7 @@ class SpecialWatchlist extends SpecialPage {
 
                # Toggle watchlist content (all recent edits or just the latest)
                if( $values['extended'] ) {
-                       $limitWatchlist = intval( $user->getOption( 'wllimit' ) );
+                       $limitWatchlist = $user->getIntOption( 'wllimit' );
                        $usePage = false;
                } else {
                        # Top log Ids for a page are not stored
diff --git a/languages/classes/LanguageLt.php b/languages/classes/LanguageLt.php
deleted file mode 100644 (file)
index ac4ebda..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-/**
- * Lithuanian (Lietuvių) specific code.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Language
- */
-
-/**
- * Lithuanian (Lietuvių)
- *
- * @ingroup Language
- */
-class LanguageLt extends Language {
-       /* Word forms (with examples):
-               1 - vienas (1) lapas, dvidešimt vienas (21) lapas
-               2 - trys (3) lapai
-               3 - penkiolika (15) lapų
-       */
-
-       /**
-        * Lithuanian plural forms as per http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html#lt
-        * @param $count int
-        * @param $forms array
-        *
-        * @return string
-        */
-       function convertPlural( $count, $forms ) {
-               if ( !count( $forms ) ) { return ''; }
-
-               // if the number is not mentioned in message, then use $form[0] for singular and $form[1] for plural or zero
-               if ( count( $forms ) === 2 ) return $count == 1 ? $forms[0] : $forms[1];
-
-               $forms = $this->preConvertPlural( $forms, 3 );
-               // Form[0] if n mod 10 is 1 and n mod 100 not in 11..19;
-               if ( $count % 10 == 1 && $count % 100 != 11 ) return $forms[0];
-               // Forms[1] if n mod 10 in 2..9 and n mod 100 not in 11..19;
-               if ( $count % 10 >= 2 && ( $count % 100 < 10 || $count % 100 >= 20 ) ) return $forms[1];
-               return $forms[2];
-       }
-}
diff --git a/languages/classes/LanguageLv.php b/languages/classes/LanguageLv.php
deleted file mode 100644 (file)
index e76f6f9..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
-/**
- * Latvian (Latviešu) specific code.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @author Niklas Laxström
- * @copyright Copyright © 2006, Niklas Laxström
- * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
- * @ingroup Language
- */
-
-/**
- * Latvian (Latviešu)
- *
- * @ingroup Language
- */
-class LanguageLv extends Language {
-       /**
-        * Plural form transformations. Using the first form for words with the last digit 1, but not for words with the last digits 11, and the second form for all the others.
-        *
-        * Example: {{plural:{{NUMBEROFARTICLES}}|article|articles}}
-        *
-        * @param $count Integer
-        * @param $forms Array
-        * @return String
-        */
-       function convertPlural( $count, $forms ) {
-               if ( !count( $forms ) ) { return ''; }
-
-               // @todo FIXME: CLDR defines 3 plural forms instead of 2.  Form for 0 is missing.
-               //        http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html#lv
-               $forms = $this->preConvertPlural( $forms, 2 );
-
-               return ( ( $count % 10 == 1 ) && ( $count % 100 != 11 ) ) ? $forms[0] : $forms[1];
-       }
-}
index 9ea15cd..21bbc73 100644 (file)
@@ -4411,7 +4411,7 @@ $8', # only translate this message to other languages if you have to change it
 'exif-iimcategory-evn' => 'Environment',
 'exif-iimcategory-hth' => 'Health',
 'exif-iimcategory-hum' => 'Human interest',
-'exif-iimcategory-lab' => 'Labour',
+'exif-iimcategory-lab' => 'Labor',
 'exif-iimcategory-lif' => 'Lifestyle and leisure',
 'exif-iimcategory-pol' => 'Politics',
 'exif-iimcategory-rel' => 'Religion and belief',
index ab05a3e..6eeb48d 100644 (file)
  * @file
  */
 
+if ( PHP_SAPI != 'cli' ) {
+       die( "This filter can only be run from the command line.\n" );
+}
+
 $source = file_get_contents( $argv[1] );
 $regexp = '#\@var\s+([^\s]+)([^/]+)/\s+(var|public|protected|private)\s+(\$[^\s;=]+)#';
 $replac = '${2} */ ${3} ${1} ${4}';
index efb6de6..bd0c759 100644 (file)
@@ -10,13 +10,13 @@ class LanguageLvTest extends LanguageClassesTestCase {
 
        /** @dataProvider providerPlural */
        function testPlural( $result, $value ) {
-               $forms = array( 'one', 'other' );
+               $forms = array( 'zero', 'one', 'other' );
                $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
 
        function providerPlural() {
                return array(
-                       array( 'other', 0 ), #this must be zero form as per CLDR
+                       array( 'zero', 0 ),
                        array( 'one', 1 ),
                        array( 'other', 11 ),
                        array( 'one', 21 ),