Merge "Removed more FORCE INDEX clauses for logging"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 3 Oct 2013 06:34:02 +0000 (06:34 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 3 Oct 2013 06:34:02 +0000 (06:34 +0000)
23 files changed:
README
includes/GlobalFunctions.php
includes/installer/Installer.i18n.php
includes/installer/Installer.php
includes/installer/WebInstallerOutput.php
includes/specials/SpecialTags.php
includes/specials/SpecialUserlogin.php
languages/classes/LanguageCu.php
languages/classes/LanguageHi.php [deleted file]
languages/classes/LanguageMg.php [deleted file]
languages/classes/LanguageMt.php [deleted file]
languages/classes/LanguagePl.php
languages/classes/LanguageSh.php [deleted file]
languages/classes/LanguageSk.php [deleted file]
languages/classes/LanguageTi.php [deleted file]
languages/classes/LanguageTl.php [deleted file]
languages/classes/LanguageWa.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php
maintenance/language/messages.inc
tests/parser/parserTest.inc
tests/parser/parserTests.txt
tests/phpunit/includes/parser/NewParserTest.php

diff --git a/README b/README
index fe1fd08..a4185ba 100644 (file)
--- a/README
+++ b/README
@@ -8,10 +8,10 @@ large and vibrant community of third-party users and developers.
 
 MediaWiki is:
 
-* Feature-rich and extensible, both on-wiki and with over 2,000 extensions;
-* Scalable and suitable for both small and large sites;
-* Available in your language; and
-* Simple to install, working on most hardware/software combinations.
+* feature-rich and extensible, both on-wiki and with over 2,000 extensions;
+* scalable and suitable for both small and large sites;
+* available in your language; and
+* simple to install, working on most hardware/software combinations.
 
 For system requirements, installation, and upgrade details, see the files
 RELEASE-NOTES, INSTALL, and UPGRADE.
@@ -30,4 +30,4 @@ RELEASE-NOTES, INSTALL, and UPGRADE.
 MediaWiki is the result of global collaboration and cooperation. The CREDITS
 file lists technical contributors to the project. The COPYING file explains
 MediaWiki's copyright and license (GNU General Public License, version 2 or
-later). Many thanks to the MediaWiki regulars for testing and suggestions.
+later). Many thanks to the Wikimedia community for testing and suggestions.
index ba60fd8..318b151 100644 (file)
@@ -1951,23 +1951,6 @@ function wfViewPrevNext( $offset, $limit, $link, $query = '', $atend = false ) {
        return $wgLang->viewPrevNext( $title, $offset, $limit, $query, $atend );
 }
 
-/**
- * Make a list item, used by various special pages
- *
- * @param string $page Page link
- * @param string $details Text between brackets
- * @param $oppositedm Boolean  Add the direction mark opposite to your
- *                                                             language, to display text properly
- * @return String
- * @deprecated since 1.19; use Language::specialList() instead
- */
-function wfSpecialList( $page, $details, $oppositedm = true ) {
-       wfDeprecated( __METHOD__, '1.19' );
-
-       global $wgLang;
-       return $wgLang->specialList( $page, $details, $oppositedm );
-}
-
 /**
  * @todo document
  * @todo FIXME: We may want to blacklist some broken browsers
index f1aac35..637a5fc 100644 (file)
@@ -134,6 +134,10 @@ MediaWiki requires UTF-8 support to function correctly.",
 This is probably too low.
 The installation may fail!",
        'config-ctype'                    => "'''Fatal:''' PHP must be compiled with support for the [http://www.php.net/manual/en/ctype.installation.php Ctype extension].",
+       'config-json'                     => "'''Fatal:''' PHP was compiled without JSON support.
+You must install either the PHP JSON extension or the [http://pecl.php.net/package/jsonc PECL jsonc] extension before installing MediaWiki.
+* The PHP extension is included in Red Hat Enterprise Linux (CentOS) 5 and 6, though must be enabled in <code>/etc/php.ini</code> or <code>/etc/php.d/json.ini</code>.
+* Some Linux distributions released after May 2013 omit the PHP extension, instead packaging the PECL extension as <code>php5-json</code> or <code>php-pecl-jsonc</code>.",
        'config-xcache'                   => '[http://xcache.lighttpd.net/ XCache] is installed',
        'config-apc'                      => '[http://www.php.net/apc APC] is installed',
        'config-wincache'                 => '[http://www.iis.net/download/WinCacheForPhp WinCache] is installed',
@@ -656,6 +660,10 @@ Parameters:
        'config-memory-bad' => 'Parameters:
 * $1 is the configured <code>memory_limit</code>.',
        'config-ctype' => 'Message if support for [http://www.php.net/manual/en/ctype.installation.php Ctype] is missing from PHP',
+       'config-json' => 'Message if support for [[wikipedia:JSON|JSON]] is missing from PHP.
+* "[[wikipedia:Red Hat Enterprise Linux|Red Hat Enterprise Linux]]" (RHEL) and "[[wikipedia:CentOS|CentOS]]" refer to two almost-identical Linux distributions. "5 and 6" refers to version 5 or 6 of either distribution. Because RHEL 7 likely will not include the PHP extension, do not translate as "5 or newer".
+* "The [http://www.php.net/json PHP extension]" is the JSON extension included with PHP 5.2 and newer.
+* "The [http://pecl.php.net/package/jsonc PECL extension]" is based on the PHP extension, though excludes code some distributions have found unacceptable (see [[bugzilla:47431]]).',
        'config-xcache' => 'Message indicates if this program is available',
        'config-apc' => 'Message indicates if this program is available',
        'config-wincache' => 'Message indicates if this program is available',
index afd2e3d..1044f18 100644 (file)
@@ -131,6 +131,7 @@ abstract class Installer {
                'envCheckLibicu',
                'envCheckSuhosinMaxValueLength',
                'envCheckCtype',
+               'envCheckJSON',
        );
 
        /**
@@ -1181,6 +1182,17 @@ abstract class Installer {
                return true;
        }
 
+       /**
+        * @return bool
+        */
+       protected function envCheckJSON() {
+               if ( !function_exists( 'json_decode' ) ) {
+                       $this->showError( 'config-json' );
+                       return false;
+               }
+               return true;
+       }
+
        /**
         * Get an array of likely places we can find executables. Check a bunch
         * of known Unix-like defaults, as well as the PATH environment variable
index 3e65eae..77e9a2c 100644 (file)
@@ -239,7 +239,6 @@ class WebInstallerOutput {
        <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
        <title><?php $this->outputTitle(); ?></title>
        <?php echo $this->getCssUrl() . "\n"; ?>
-       <?php echo Html::inlineScript( "var dbTypes = " . Xml::encodeJsVar( $dbTypes ) ) . "\n"; ?>
        <?php echo $this->getJQuery() . "\n"; ?>
        <?php echo Html::linkedScript( '../skins/common/config.js' ) . "\n"; ?>
 </head>
index 80c38d5..7e34e98 100644 (file)
@@ -44,9 +44,13 @@ class SpecialTags extends SpecialPage {
                $html = Xml::tags( 'tr', null, Xml::tags( 'th', null, $this->msg( 'tags-tag' )->parse() ) .
                                Xml::tags( 'th', null, $this->msg( 'tags-display-header' )->parse() ) .
                                Xml::tags( 'th', null, $this->msg( 'tags-description-header' )->parse() ) .
+                               Xml::tags( 'th', null, $this->msg( 'tags-active-header' )->parse() ) .
                                Xml::tags( 'th', null, $this->msg( 'tags-hitcount-header' )->parse() )
                        );
 
+               // Used in #doTagRow()
+               $this->definedTags = array_fill_keys( ChangeTags::listDefinedTags(), true );
+
                foreach ( ChangeTags::tagUsageStatistics() as $tag => $hitcount ) {
                        $html .= $this->doTagRow( $tag, $hitcount );
                }
@@ -76,6 +80,9 @@ class SpecialTags extends SpecialPage {
                }
                $newRow .= Xml::tags( 'td', null, $desc );
 
+               $active = $this->msg( isset( $this->definedTags[$tag] ) ? 'tags-active-yes' : 'tags-active-no' )->escaped();
+               $newRow .= Xml::tags( 'td', null, $active );
+
                $hitcountLabel = $this->msg( 'tags-hitcount' )->numParams( $hitcount )->escaped();
                $hitcountLink = Linker::link( SpecialPage::getTitleFor( 'Recentchanges' ), $hitcountLabel, array(), array( 'tagfilter' => $tag ) );
                // add raw $hitcount for sorting, because tags-hitcount contains numbers and letters
index 9429f10..7a93ade 100644 (file)
@@ -48,7 +48,7 @@ class LoginForm extends SpecialPage {
        var $mLoginattempt, $mRemember, $mEmail, $mDomain, $mLanguage;
        var $mSkipCookieCheck, $mReturnToQuery, $mToken, $mStickHTTPS;
        var $mType, $mReason, $mRealName;
-       var $mAbortLoginErrorMsg = 'login-abort-generic';
+       var $mAbortLoginErrorMsg = null;
        private $mLoaded = false;
        private $mSecureLoginUrl;
 
@@ -582,7 +582,9 @@ class LoginForm extends SpecialPage {
 
                // Give general extensions, such as a captcha, a chance to abort logins
                $abort = self::ABORTED;
-               if ( !wfRunHooks( 'AbortLogin', array( $u, $this->mPassword, &$abort, &$this->mAbortLoginErrorMsg ) ) ) {
+               $msg = null;
+               if ( !wfRunHooks( 'AbortLogin', array( $u, $this->mPassword, &$abort, &$msg ) ) ) {
+                       $this->mAbortLoginErrorMsg = $msg;
                        return $abort;
                }
 
@@ -780,51 +782,62 @@ class LoginForm extends SpecialPage {
                                break;
 
                        case self::NEED_TOKEN:
-                               $this->mainLoginForm( $this->msg( 'nocookiesforlogin' )->parse() );
+                               $error = $this->mAbortLoginErrorMsg ?: 'nocookiesforlogin';
+                               $this->mainLoginForm( $this->msg( $error )->parse() );
                                break;
                        case self::WRONG_TOKEN:
-                               $this->mainLoginForm( $this->msg( 'sessionfailure' )->text() );
+                               $error = $this->mAbortLoginErrorMsg ?: 'sessionfailure';
+                               $this->mainLoginForm( $this->msg( $error )->text() );
                                break;
                        case self::NO_NAME:
                        case self::ILLEGAL:
-                               $this->mainLoginForm( $this->msg( 'noname' )->text() );
+                               $error = $this->mAbortLoginErrorMsg ?: 'noname';
+                               $this->mainLoginForm( $this->msg( $error )->text() );
                                break;
                        case self::WRONG_PLUGIN_PASS:
-                               $this->mainLoginForm( $this->msg( 'wrongpassword' )->text() );
+                               $error = $this->mAbortLoginErrorMsg ?: 'wrongpassword';
+                               $this->mainLoginForm( $this->msg( $error )->text() );
                                break;
                        case self::NOT_EXISTS:
                                if ( $this->getUser()->isAllowed( 'createaccount' ) ) {
-                                       $this->mainLoginForm( $this->msg( 'nosuchuser',
+                                       $error = $this->mAbortLoginErrorMsg ?: 'nosuchuser';
+                                       $this->mainLoginForm( $this->msg( $error,
                                                wfEscapeWikiText( $this->mUsername ) )->parse() );
                                } else {
-                                       $this->mainLoginForm( $this->msg( 'nosuchusershort',
+                                       $error = $this->mAbortLoginErrorMsg ?: 'nosuchusershort';
+                                       $this->mainLoginForm( $this->msg( $error,
                                                wfEscapeWikiText( $this->mUsername ) )->text() );
                                }
                                break;
                        case self::WRONG_PASS:
-                               $this->mainLoginForm( $this->msg( 'wrongpassword' )->text() );
+                               $error = $this->mAbortLoginErrorMsg ?: 'wrongpassword';
+                               $this->mainLoginForm( $this->msg( $error )->text() );
                                break;
                        case self::EMPTY_PASS:
-                               $this->mainLoginForm( $this->msg( 'wrongpasswordempty' )->text() );
+                               $error = $this->mAbortLoginErrorMsg ?: 'wrongpasswordempty';
+                               $this->mainLoginForm( $this->msg( $error )->text() );
                                break;
                        case self::RESET_PASS:
-                               $this->resetLoginForm( $this->msg( 'resetpass_announce' )->text() );
+                               $error = $this->mAbortLoginErrorMsg ?: 'resetpass_announce';
+                               $this->resetLoginForm( $this->msg( $error )->text() );
                                break;
                        case self::CREATE_BLOCKED:
                                $this->userBlockedMessage( $this->getUser()->isBlockedFromCreateAccount() );
                                break;
                        case self::THROTTLED:
-                               $this->mainLoginForm( $this->msg( 'login-throttled' )
+                               $error = $this->mAbortLoginErrorMsg ?: 'login-throttled';
+                               $this->mainLoginForm( $this->msg( $error )
                                ->params ( $this->getLanguage()->formatDuration( $wgPasswordAttemptThrottle['seconds'] ) )
                                ->text()
                                );
                                break;
                        case self::USER_BLOCKED:
-                               $this->mainLoginForm( $this->msg( 'login-userblocked',
-                                       $this->mUsername )->escaped() );
+                               $error = $this->mAbortLoginErrorMsg ?: 'login-userblocked';
+                               $this->mainLoginForm( $this->msg( $error, $this->mUsername )->escaped() );
                                break;
                        case self::ABORTED:
-                               $this->mainLoginForm( $this->msg( $this->mAbortLoginErrorMsg )->text() );
+                               $error = $this->mAbortLoginErrorMsg ?: 'login-abort-generic';
+                               $this->mainLoginForm( $this->msg( $error )->text() );
                                break;
                        default:
                                throw new MWException( 'Unhandled case value' );
index 454ce34..60cf2b1 100644 (file)
@@ -63,24 +63,4 @@ class LanguageCu extends Language {
                }
                return $word;
        }
-
-       /**
-        * @param $count int
-        * @param $forms array
-        * @return string
-        */
-       function convertPlural( $count, $forms ) {
-               if ( !count( $forms ) ) {
-                       return '';
-               }
-               $forms = $this->preConvertPlural( $forms, 4 );
-
-               switch ( $count % 10 ) {
-                       case 1: return $forms[0];
-                       case 2: return $forms[1];
-                       case 3:
-                       case 4: return $forms[2];
-                       default: return $forms[3];
-               }
-       }
 }
diff --git a/languages/classes/LanguageHi.php b/languages/classes/LanguageHi.php
deleted file mode 100644 (file)
index 6f7edb4..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-/**
- * Hindi (हिन्दी) 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
- */
-
-/**
- * Hindi (हिन्दी)
- *
- * @ingroup Language
- */
-class LanguageHi extends Language {
-       /**
-        * Use singular form for zero
-        *
-        * @param $count int
-        * @param $forms array
-        *
-        * @return string
-        */
-       function convertPlural( $count, $forms ) {
-               if ( !count( $forms ) ) {
-                       return '';
-               }
-               $forms = $this->preConvertPlural( $forms, 2 );
-
-               return ( $count <= 1 ) ? $forms[0] : $forms[1];
-       }
-}
diff --git a/languages/classes/LanguageMg.php b/languages/classes/LanguageMg.php
deleted file mode 100644 (file)
index bf6800c..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-/**
- * Malagasy (Malagasy) 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
- */
-
-/**
- * Malagasy (Malagasy)
- *
- * @ingroup Language
- */
-class LanguageMg extends Language {
-       /**
-        * Use singular form for zero
-        *
-        * @param $count int
-        * @param $forms array
-        *
-        * @return string
-        */
-       function convertPlural( $count, $forms ) {
-               if ( !count( $forms ) ) {
-                       return '';
-               }
-               $forms = $this->preConvertPlural( $forms, 2 );
-
-               return ( $count <= 1 ) ? $forms[0] : $forms[1];
-       }
-}
diff --git a/languages/classes/LanguageMt.php b/languages/classes/LanguageMt.php
deleted file mode 100644 (file)
index 20213a8..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-/**
- * Maltese (Malti) 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
- * @ingroup Language
- */
-
-/**
- * Maltese (Malti)
- *
- * @ingroup Language
- */
-class LanguageMt extends Language {
-
-       /**
-        * @param $count int
-        * @param $forms array
-        * @return string
-        */
-       function convertPlural( $count, $forms ) {
-               if ( !count( $forms ) ) {
-                       return '';
-               }
-
-               $forms = $this->preConvertPlural( $forms, 4 );
-
-               if ( $count == 1 ) {
-                       $index = 0;
-               } elseif ( $count == 0 || ( $count % 100 > 1 && $count % 100 < 11 ) ) {
-                       $index = 1;
-               } elseif ( $count % 100 > 10 && $count % 100 < 20 ) {
-                       $index = 2;
-               } else {
-                       $index = 3;
-               }
-               return $forms[$index];
-       }
-}
index e15c9e2..8e286c9 100644 (file)
  * @ingroup Language
  */
 class LanguagePl extends Language {
-
-       /**
-        * @param $count string
-        * @param $forms array
-        * @return string
-        */
-       function convertPlural( $count, $forms ) {
-               if ( !count( $forms ) ) {
-                       return '';
-               }
-               $forms = $this->preConvertPlural( $forms, 3 );
-               $count = abs( $count );
-               if ( $count == 1 ) {
-                       return $forms[0]; // singular
-               }
-               switch ( $count % 10 ) {
-                       case 2:
-                       case 3:
-                       case 4:
-                               if ( $count / 10 % 10 != 1 ) {
-                                       return $forms[1]; // plural
-                               }
-                       default:
-                               return $forms[2];   // plural genitive
-               }
-       }
-
        /**
         * @param $_ string
         * @return string
diff --git a/languages/classes/LanguageSh.php b/languages/classes/LanguageSh.php
deleted file mode 100644 (file)
index 83c42cc..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php
-/**
- * Serbo-Croatian (Srpskohrvatski / Српскохрватски) 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
- */
-
-/**
- * Serbo-Croatian (Srpskohrvatski / Српскохрватски)
- *
- * @ingroup Language
- */
-class LanguageSh extends Language {
-
-       /**
-        * @param $count string
-        * @param $forms array
-        * @return string
-        */
-       function convertPlural( $count, $forms ) {
-               if ( !count( $forms ) ) {
-                       return '';
-               }
-
-               // if no number with word, then use $form[0] for singular and $form[1] for plural or zero
-               if ( count( $forms ) === 2 ) {
-                       return $count == 1 ? $forms[0] : $forms[1];
-               }
-
-               // @todo FIXME: CLDR defines 4 plural forms. Form with decimals missing.
-               // See http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html#sh
-               $forms = $this->preConvertPlural( $forms, 3 );
-
-               if ( $count > 10 && floor( ( $count % 100 ) / 10 ) == 1 ) {
-                       return $forms[2];
-               } else {
-                       switch ( $count % 10 ) {
-                               case 1: return $forms[0];
-                               case 2:
-                               case 3:
-                               case 4: return $forms[1];
-                               default: return $forms[2];
-                       }
-               }
-       }
-}
diff --git a/languages/classes/LanguageSk.php b/languages/classes/LanguageSk.php
deleted file mode 100644 (file)
index cd15f18..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
-/**
- * Slovak (Slovenčina) 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
- */
-
-/**
- * Slovak (Slovenčina)
- *
- * @ingroup Language
- */
-class LanguageSk extends Language {
-
-       /**
-        * @param $count int
-        * @param $forms array
-        * @return string
-        */
-       function convertPlural( $count, $forms ) {
-               if ( !count( $forms ) ) {
-                       return '';
-               }
-               $forms = $this->preConvertPlural( $forms, 3 );
-
-               if ( $count == 1 ) {
-                       $index = 0;
-               } elseif ( $count == 2 || $count == 3 || $count == 4 ) {
-                       $index = 1;
-               } else {
-                       $index = 2;
-               }
-               return $forms[$index];
-       }
-}
diff --git a/languages/classes/LanguageTi.php b/languages/classes/LanguageTi.php
deleted file mode 100644 (file)
index f17b4d1..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-/**
- * Tigrinya (ትግርኛ) 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
- */
-
-/**
- * Tigrinya (ትግርኛ)
- *
- * @ingroup Language
- */
-class LanguageTi extends Language {
-       /**
-        * Use singular form for zero
-        *
-        * @param $count int
-        * @param $forms array
-        *
-        * @return string
-        */
-       function convertPlural( $count, $forms ) {
-               if ( !count( $forms ) ) {
-                       return '';
-               }
-               $forms = $this->preConvertPlural( $forms, 2 );
-
-               return ( $count <= 1 ) ? $forms[0] : $forms[1];
-       }
-}
diff --git a/languages/classes/LanguageTl.php b/languages/classes/LanguageTl.php
deleted file mode 100644 (file)
index 060d1e2..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-/**
- * Tagalog (Tagalog) 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
- */
-
-/**
- * Tagalog (Tagalog)
- *
- * @ingroup Language
- */
-class LanguageTl extends Language {
-       /**
-        * Use singular form for zero
-        *
-        * @param $count int
-        * @param $forms array
-        *
-        * @return string
-        */
-       function convertPlural( $count, $forms ) {
-               if ( !count( $forms ) ) {
-                       return '';
-               }
-               $forms = $this->preConvertPlural( $forms, 2 );
-
-               return ( $count <= 1 ) ? $forms[0] : $forms[1];
-       }
-}
index fde8c53..e5f7438 100644 (file)
  * @ingroup Language
  */
 class LanguageWa extends Language {
-       /**
-        * Use singular form for zero
-        *
-        * @param $count int
-        * @param $forms array
-        *
-        * @return string
-        */
-       function convertPlural( $count, $forms ) {
-               if ( !count( $forms ) ) {
-                       return '';
-               }
-               $forms = $this->preConvertPlural( $forms, 2 );
-
-               return ( $count <= 1 ) ? $forms[0] : $forms[1];
-       }
 
        /**
         * Dates in Walloon are "1î d' <monthname>" for 1st of the month,
index 5ce4bcc..87f729f 100644 (file)
@@ -4928,7 +4928,10 @@ You should have received [{{SERVER}}{{SCRIPTPATH}}/COPYING a copy of the GNU Gen
 'tags-tag'                => 'Tag name',
 'tags-display-header'     => 'Appearance on change lists',
 'tags-description-header' => 'Full description of meaning',
+'tags-active-header'      => 'Active?',
 'tags-hitcount-header'    => 'Tagged changes',
+'tags-active-yes'         => 'Yes',
+'tags-active-no'          => 'No',
 'tags-edit'               => 'edit',
 'tags-hitcount'           => '$1 {{PLURAL:$1|change|changes}}',
 
index f351543..e6b5ae3 100644 (file)
@@ -10035,7 +10035,10 @@ Parameters:
 'tags-tag' => 'Caption of a column in [[Special:Tags]]. For more information on tags see [[mw:Manual:Tags|MediaWiki]].',
 'tags-display-header' => 'Caption of a column in [[Special:Tags]]. For more information on tags see [[mw:Manual:Tags|MediaWiki]].',
 'tags-description-header' => 'Caption of a column in [[Special:Tags]]. For more information on tags see [[mw:Manual:Tags|MediaWiki]].',
+'tags-active-header' => 'Caption of a column in [[Special:Tags]]. For more information on tags see [[mw:Manual:Tags|MediaWiki]].',
 'tags-hitcount-header' => 'Caption of a column in [[Special:Tags]]. For more information on tags see [[mw:Manual:Tags|MediaWiki]].',
+'tags-active-yes' => 'Table cell contents if given tag is "active".',
+'tags-active-no' => 'Table cell contents if given tag is not "active".',
 'tags-edit' => 'Used on [[Special:Tags]]. Verb. Used as display text on a link to create/edit a description.
 {{Identical|Edit}}',
 'tags-hitcount' => 'Shown in the "{{msg-mw|Tags-hitcount-header}}" column in [[Special:Tags]]. For more information on tags see [[mw:Manual:Tags|MediaWiki]].
index 991fc1b..65933f3 100644 (file)
@@ -3772,7 +3772,10 @@ $wgMessageStructure = array(
                'tags-tag',
                'tags-display-header',
                'tags-description-header',
+               'tags-active-header',
                'tags-hitcount-header',
+               'tags-active-yes',
+               'tags-active-no',
                'tags-edit',
                'tags-hitcount',
        ),
index f08e995..3f8d7f9 100644 (file)
@@ -143,7 +143,7 @@ class ParserTest {
        static function setUp() {
                global $wgParser, $wgParserConf, $IP, $messageMemc, $wgMemc,
                        $wgUser, $wgLang, $wgOut, $wgRequest, $wgStyleDirectory, $wgEnableParserCache,
-                       $wgNamespaceAliases, $wgNamespaceProtection, $wgLocalFileRepo,
+                       $wgExtraNamespaces, $wgNamespaceAliases, $wgNamespaceProtection, $wgLocalFileRepo,
                        $parserMemc, $wgThumbnailScriptPath, $wgScriptPath,
                        $wgArticlePath, $wgScript, $wgStylePath, $wgExtensionAssetsPath,
                        $wgMainCacheType, $wgMessageCacheType, $wgParserCacheType, $wgLockManagers;
@@ -182,6 +182,9 @@ class ParserTest {
                $wgNamespaceProtection[NS_MEDIAWIKI] = 'editinterface';
                $wgNamespaceAliases['Image'] = NS_FILE;
                $wgNamespaceAliases['Image_talk'] = NS_FILE_TALK;
+               # add a namespace shadowing a interwiki link, to test
+               # proper precedence when resolving links. (bug 51680)
+               $wgExtraNamespaces[100] = 'MemoryAlpha';
 
                // XXX: tests won't run without this (for CACHE_DB)
                if ( $wgMainCacheType === CACHE_DB ) {
@@ -239,6 +242,11 @@ class ParserTest {
                                        'iw_api' => '',
                                        'iw_wikiid' => '',
                                        'iw_local' => 0 ),
+                               'memoryalpha' => array(
+                                       'iw_url' => 'http://www.memory-alpha.org/en/index.php/$1',
+                                       'iw_api' => '',
+                                       'iw_wikiid' => '',
+                                       'iw_local' => 0 ),
                                'zh' => array(
                                        'iw_url' => 'http://zh.wikipedia.org/wiki/$1',
                                        'iw_api' => '',
index 47189fc..e21ee3d 100644 (file)
@@ -4634,6 +4634,22 @@ Link to namespaces
 </p>
 !! end
 
+!! article
+MemoryAlpha:AlphaTest
+!! text
+This is an article in the MemoryAlpha namespace
+(which shadows the memoryalpha interwiki link).
+!! endarticle
+
+!! test
+Namespace takes precedence over interwiki link (bug 51680)
+!! input
+[[MemoryAlpha:AlphaTest]]
+!! result
+<p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
+</p>
+!! end
+
 !! test
 Piped link to namespace
 !! input
index 73c85f0..ab8e77b 100644 (file)
@@ -37,7 +37,7 @@ class NewParserTest extends MediaWikiTestCase {
        }
 
        protected function setUp() {
-               global $wgNamespaceAliases;
+               global $wgNamespaceAliases, $wgContLang;
                global $wgHooks, $IP;
 
                parent::setUp();
@@ -132,6 +132,9 @@ class NewParserTest extends MediaWikiTestCase {
                $tmpHooks['ParserTestParser'][] = 'ParserTestParserHook::setup';
                $tmpHooks['ParserGetVariableValueTs'][] = 'ParserTest::getFakeTimestamp';
                $tmpGlobals['wgHooks'] = $tmpHooks;
+               # add a namespace shadowing a interwiki link, to test
+               # proper precedence when resolving links. (bug 51680)
+               $tmpGlobals['wgExtraNamespaces'] = array( 100 => 'MemoryAlpha' );
 
                $this->setMwGlobals( $tmpGlobals );
 
@@ -140,10 +143,13 @@ class NewParserTest extends MediaWikiTestCase {
 
                $wgNamespaceAliases['Image'] = NS_FILE;
                $wgNamespaceAliases['Image_talk'] = NS_FILE_TALK;
+
+               MWNamespace::getCanonicalNamespaces( true ); # reset namespace cache
+               $wgContLang->resetNamespaces(); # reset namespace cache
        }
 
        protected function tearDown() {
-               global $wgNamespaceAliases;
+               global $wgNamespaceAliases, $wgContLang;
 
                $wgNamespaceAliases['Image'] = $this->savedWeirdGlobals['image_alias'];
                $wgNamespaceAliases['Image_talk'] = $this->savedWeirdGlobals['image_talk_alias'];
@@ -159,6 +165,9 @@ class NewParserTest extends MediaWikiTestCase {
                MessageCache::destroyInstance();
 
                parent::tearDown();
+
+               MWNamespace::getCanonicalNamespaces( true ); # reset namespace cache
+               $wgContLang->resetNamespaces(); # reset namespace cache
        }
 
        public static function tearDownAfterClass() {