Merge "New hook ApiMain::onException"
authorawjrichards <arichards@wikimedia.org>
Wed, 29 Aug 2012 16:54:18 +0000 (16:54 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 29 Aug 2012 16:54:18 +0000 (16:54 +0000)
52 files changed:
.jshintignore
RELEASE-NOTES-1.20
api.php
extensions/README
includes/CategoryViewer.php
includes/DataUpdate.php
includes/EditPage.php
includes/GlobalFunctions.php
includes/LocalisationCache.php
includes/Skin.php
includes/SkinLegacy.php
includes/actions/InfoAction.php
includes/debug/Debug.php
includes/diff/DifferenceEngine.php
includes/filebackend/FileBackend.php
includes/filebackend/FileBackendMultiWrite.php
includes/filebackend/FileBackendStore.php
includes/filebackend/SwiftFileBackend.php
includes/filebackend/filejournal/DBFileJournal.php
includes/job/Job.php
includes/job/RefreshLinksJob.php
includes/libs/CSSJanus.php
includes/parser/CoreParserFunctions.php
includes/parser/Parser.php
includes/specials/SpecialSearch.php
includes/specials/SpecialUndelete.php
includes/specials/SpecialUpload.php
index.php
languages/messages/MessagesCkb.php
languages/messages/MessagesDiq.php
languages/messages/MessagesEn.php
languages/messages/MessagesGd.php
languages/messages/MessagesIt.php
languages/messages/MessagesJa.php
languages/messages/MessagesMl.php
languages/messages/MessagesPa.php
languages/messages/MessagesPms.php
languages/messages/MessagesQqq.php
languages/messages/MessagesTe.php
languages/messages/MessagesTet.php
languages/messages/MessagesUr.php
load.php
maintenance/Maintenance.php
maintenance/language/messageTypes.inc
maintenance/language/messages.inc
resources/Resources.php
resources/jquery/jquery.jStorage.js [new file with mode: 0644]
skins/Standard.php
tests/phpunit/includes/LocalisationCacheTest.php [new file with mode: 0644]
tests/phpunit/includes/debug/MWDebugTest.php
tests/phpunit/includes/filerepo/FileBackendTest.php
tests/phpunit/includes/filerepo/StoreBatchTest.php

index 9534f97..45f2da7 100644 (file)
@@ -8,6 +8,7 @@ resources/jquery/jquery.form.js
 resources/jquery/jquery.hoverIntent.js
 resources/jquery/jquery.js
 resources/jquery/jquery.json.js
+resources/jquery/jquery.jStorage.js
 resources/jquery/jquery.mockjax.js
 resources/jquery/jquery.qunit.js
 resources/jquery/jquery.validate.js
index 1791d4d..82ab330 100644 (file)
@@ -133,6 +133,7 @@ upgrade PHP if you have not done so prior to upgrading MediaWiki.
 * (bug 39376) jquery.form upgraded to 3.14
 * SVG files will now show the actual width in the SVG's specified units
   in the metadata box.
+* Added ResourceLoader module "jquery.jStorage".
 
 === Bug fixes in 1.20 ===
 * (bug 30245) Use the correct way to construct a log page title.
diff --git a/api.php b/api.php
index ad420ff..7fae373 100644 (file)
--- a/api.php
+++ b/api.php
@@ -35,6 +35,7 @@ define( 'MW_API', true );
 
 // Bail if PHP is too low
 if ( !function_exists( 'version_compare' ) || version_compare( phpversion(), '5.3.2' ) < 0 ) {
+       // We need to use dirname( __FILE__ ) here cause __DIR__ is PHP5.3+
        require( dirname( __FILE__ ) . '/includes/PHPVersionError.php' );
        wfPHPVersionError( 'api.php' );
 }
index e810286..66236e8 100644 (file)
@@ -21,7 +21,7 @@ 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
 variable MW_INSTALL_PATH in case the extension is not in the default location.
 
-The following code snippet lets you override the default path: 
+The following code snippet lets you override the default path:
 
  $IP = getenv( 'MW_INSTALL_PATH' );
  if( $IP === false ) {
index 4e4f311..5f4aaea 100644 (file)
@@ -504,7 +504,7 @@ class CategoryViewer extends ContextSource {
                # Split into three columns
                $columns = array_chunk( $columns, ceil( count( $columns ) / 3 ), true /* preserve keys */ );
 
-               $ret = '<table width="100%"><tr valign="top">';
+               $ret = '<table width="100%"><tr style="vertical-align: top;">';
                $prevchar = null;
 
                foreach ( $columns as $column ) {
index 793d335..377b64c 100644 (file)
@@ -84,8 +84,8 @@ abstract class DataUpdate implements DeferrableUpdate {
                $exception = null;
 
                /**
-                * @var $update StorageUpdate
-                * @var $trans StorageUpdate
+                * @var $update DataUpdate
+                * @var $trans DataUpdate
                 */
 
                try {
index d60d73c..0389168 100644 (file)
@@ -2102,8 +2102,11 @@ class EditPage {
                                );
                        }
                }
+               # Add header copyright warning
+               $this->showHeaderCopyrightWarning();
        }
 
+
        /**
         * Standard summary input and label (wgSummary), abstracted so EditPage
         * subclasses may reorganize the form.
@@ -2399,6 +2402,18 @@ HTML
                $wgOut->addHTML( '<div id="wikiDiff">' . $difftext . '</div>' );
        }
 
+       /**
+        * Show the header copyright warning.
+        */
+       protected function showHeaderCopyrightWarning() {
+               $msg = 'editpage-head-copy-warn';
+               if ( !wfMessage( $msg )->isDisabled() ) {
+                       global $wgOut;
+                       $wgOut->wrapWikiMsg( "<div class='editpage-head-copywarn'>\n$1\n</div>",
+                               'editpage-head-copy-warn' );
+               }
+       }
+
        /**
         * Give a chance for site and per-namespace customizations of
         * terms of service summary link that might exist separately
index 328d429..4ff258d 100644 (file)
@@ -1082,35 +1082,7 @@ function wfLogDBError( $text ) {
  * @return null
  */
 function wfDeprecated( $function, $version = false, $component = false, $callerOffset = 2 ) {
-       static $functionsWarned = array();
-
-       MWDebug::deprecated( $function, $version, $component );
-
-       if ( !isset( $functionsWarned[$function] ) ) {
-               $functionsWarned[$function] = true;
-
-               if ( $version ) {
-                       global $wgDeprecationReleaseLimit;
-
-                       if ( $wgDeprecationReleaseLimit && $component === false ) {
-                               # Strip -* off the end of $version so that branches can use the
-                               # format #.##-branchname to avoid issues if the branch is merged into
-                               # a version of MediaWiki later than what it was branched from
-                               $comparableVersion = preg_replace( '/-.*$/', '', $version );
-
-                               # If the comparableVersion is larger than our release limit then
-                               # skip the warning message for the deprecation
-                               if ( version_compare( $wgDeprecationReleaseLimit, $comparableVersion, '<' ) ) {
-                                       return;
-                               }
-                       }
-
-                       $component = $component === false ? 'MediaWiki' : $component;
-                       wfWarn( "Use of $function was deprecated in $component $version.", $callerOffset );
-               } else {
-                       wfWarn( "Use of $function is deprecated.", $callerOffset );
-               }
-       }
+       MWDebug::deprecated( $function, $version, $component, $callerOffset + 1 );
 }
 
 /**
@@ -1124,34 +1096,7 @@ function wfDeprecated( $function, $version = false, $component = false, $callerO
  *        is true
  */
 function wfWarn( $msg, $callerOffset = 1, $level = E_USER_NOTICE ) {
-       global $wgDevelopmentWarnings;
-
-       MWDebug::warning( $msg, $callerOffset + 2 );
-
-       $callers = wfDebugBacktrace();
-       if ( isset( $callers[$callerOffset + 1] ) ) {
-               $callerfunc = $callers[$callerOffset + 1];
-               $callerfile = $callers[$callerOffset];
-               if ( isset( $callerfile['file'] ) && isset( $callerfile['line'] ) ) {
-                       $file = $callerfile['file'] . ' at line ' . $callerfile['line'];
-               } else {
-                       $file = '(internal function)';
-               }
-               $func = '';
-               if ( isset( $callerfunc['class'] ) ) {
-                       $func .= $callerfunc['class'] . '::';
-               }
-               if ( isset( $callerfunc['function'] ) ) {
-                       $func .= $callerfunc['function'];
-               }
-               $msg .= " [Called from $func in $file]";
-       }
-
-       if ( $wgDevelopmentWarnings ) {
-               trigger_error( $msg, $level );
-       } else {
-               wfDebug( "$msg\n" );
-       }
+       MWDebug::warning( $msg, $callerOffset + 1, $level );
 }
 
 /**
@@ -2383,11 +2328,7 @@ function wfSuppressWarnings( $end = false ) {
                }
        } else {
                if ( !$suppressCount ) {
-                       // E_DEPRECATED is undefined in PHP 5.2
-                       if( !defined( 'E_DEPRECATED' ) ) {
-                               define( 'E_DEPRECATED', 8192 );
-                       }
-                       $originalLevel = error_reporting( E_ALL & ~( E_WARNING | E_NOTICE | E_USER_WARNING | E_USER_NOTICE | E_DEPRECATED ) );
+                       $originalLevel = error_reporting( E_ALL & ~( E_WARNING | E_NOTICE | E_USER_WARNING | E_USER_NOTICE | E_DEPRECATED | E_USER_DEPRECATED ) );
                }
                ++$suppressCount;
        }
index c1ac848..d8e5d3a 100644 (file)
@@ -110,7 +110,7 @@ class LocalisationCache {
                'dateFormats', 'datePreferences', 'datePreferenceMigrationMap',
                'defaultDateFormat', 'extraUserToggles', 'specialPageAliases',
                'imageFiles', 'preloadedMessages', 'namespaceGenderAliases',
-               'digitGroupingPattern', 'pluralRules'
+               'digitGroupingPattern', 'pluralRules', 'compiledPluralRules',
        );
 
        /**
@@ -118,7 +118,7 @@ class LocalisationCache {
         * by a fallback sequence.
         */
        static public $mergeableMapKeys = array( 'messages', 'namespaceNames',
-               'dateFormats', 'imageFiles', 'preloadedMessages', 'pluralRules'
+               'dateFormats', 'imageFiles', 'preloadedMessages'
        );
 
        /**
@@ -498,6 +498,9 @@ class LocalisationCache {
         */
        public function getCompiledPluralRules( $code ) {
                $rules = $this->getPluralRules( $code );
+               if ( $rules === null ) {
+                       return null;
+               }
                try {
                        $compiledRules = CLDRPluralRuleEvaluator::compile( $rules );
                } catch( CLDRPluralRuleError $e ) {
@@ -524,17 +527,18 @@ class LocalisationCache {
                        }
                }
                if ( !isset( $this->pluralRules[$code] ) ) {
-                       return array();
+                       return null;
                } else {
                        return $this->pluralRules[$code];
                }
        }
 
+
        /**
         * Load a plural XML file with the given filename, compile the relevant
         * rules, and save the compiled rules in a process-local cache.
         */
-       private function loadPluralFile( $fileName ) {
+       protected function loadPluralFile( $fileName ) {
                $doc = new DOMDocument;
                $doc->load( $fileName );
                $rulesets = $doc->getElementsByTagName( "pluralRules" );
@@ -551,6 +555,30 @@ class LocalisationCache {
                }
        }
 
+       /**
+        * Read the data from the source files for a given language, and register
+        * the relevant dependencies in the $deps array. If the localisation
+        * exists, the data array is returned, otherwise false is returned.
+        */
+       protected function readSourceFilesAndRegisterDeps( $code, &$deps ) {
+               $fileName = Language::getMessagesFileName( $code );
+               if ( !file_exists( $fileName ) ) {
+                       return false;
+               }
+
+               $deps[] = new FileDependency( $fileName );
+               $data = $this->readPHPFile( $fileName, 'core' );
+
+               # Load CLDR plural rules for JavaScript
+               $data['pluralRules'] = $this->getPluralRules( $code );
+               # And for PHP
+               $data['compiledPluralRules'] = $this->getCompiledPluralRules( $code );
+
+               $deps['plurals'] = new FileDependency( __DIR__ . "/../languages/data/plurals.xml" );
+               $deps['plurals-mw'] = new FileDependency( __DIR__ . "/../languages/data/plurals-mediawiki.xml" );
+               return $data;
+       }
+
        /**
         * Merge two localisation values, a primary and a fallback, overwriting the
         * primary value in place.
@@ -649,13 +677,11 @@ class LocalisationCache {
                $deps = array();
 
                # Load the primary localisation from the source file
-               $fileName = Language::getMessagesFileName( $code );
-               if ( !file_exists( $fileName ) ) {
+               $data = $this->readSourceFilesAndRegisterDeps( $code, $deps );
+               if ( $data === false ) {
                        wfDebug( __METHOD__ . ": no localisation file for $code, using fallback to en\n" );
                        $coreData['fallback'] = 'en';
                } else {
-                       $deps[] = new FileDependency( $fileName );
-                       $data = $this->readPHPFile( $fileName, 'core' );
                        wfDebug( __METHOD__ . ": got localisation for $code from source\n" );
 
                        # Merge primary localisation
@@ -684,15 +710,11 @@ class LocalisationCache {
                        foreach ( $coreData['fallbackSequence'] as $fbCode ) {
                                # Load the secondary localisation from the source file to
                                # avoid infinite cycles on cyclic fallbacks
-                               $fbFilename = Language::getMessagesFileName( $fbCode );
-
-                               if ( !file_exists( $fbFilename ) ) {
+                               $fbData = $this->readSourceFilesAndRegisterDeps( $fbCode, $deps );
+                               if ( $fbData === false ) {
                                        continue;
                                }
 
-                               $deps[] = new FileDependency( $fbFilename );
-                               $fbData = $this->readPHPFile( $fbFilename, 'core' );
-
                                foreach ( self::$allKeys as $key ) {
                                        if ( !isset( $fbData[$key] ) ) {
                                                continue;
@@ -749,15 +771,19 @@ class LocalisationCache {
                # Decouple the reference to prevent accidental damage
                unset( $page );
 
+               # If there were no plural rules, return an empty array
+               if ( $allData['pluralRules'] === null ) {
+                       $allData['pluralRules'] = array();
+               }
+               if ( $allData['compiledPluralRules'] === null ) {
+                       $allData['compiledPluralRules'] = array();
+               }
+
                # Set the list keys
                $allData['list'] = array();
                foreach ( self::$splitKeys as $key ) {
                        $allData['list'][$key] = array_keys( $allData[$key] );
                }
-               # Load CLDR plural rules for JavaScript
-               $allData['pluralRules'] = $this->getPluralRules( $code );
-               # And for PHP
-               $allData['compiledPluralRules'] = $this->getCompiledPluralRules( $code );
                # Run hooks
                wfRunHooks( 'LocalisationCacheRecache', array( $this, $code, &$allData ) );
 
index 0b0b616..00eb5e8 100644 (file)
@@ -835,7 +835,7 @@ abstract class Skin extends ContextSource {
         */
        function logoText( $align = '' ) {
                if ( $align != '' ) {
-                       $a = " align='{$align}'";
+                       $a = " style='float: {$align};'";
                } else {
                        $a = '';
                }
@@ -1288,18 +1288,19 @@ abstract class Skin extends ContextSource {
                $ntl = '';
 
                if ( count( $newtalks ) == 1 && $newtalks[0]['wiki'] === wfWikiID() ) {
-                       $userTalkTitle = $this->getUser()->getTalkPage();
+                       $uTalkTitle = $this->getUser()->getTalkPage();
 
-                       if ( !$userTalkTitle->equals( $out->getTitle() ) ) {
+                       if ( !$uTalkTitle->equals( $out->getTitle() ) ) {
                                $lastSeenRev = isset( $newtalks[0]['rev'] ) ? $newtalks[0]['rev'] : null;
                                $nofAuthors = 0;
                                if ( $lastSeenRev !== null ) {
                                        $plural = true; // Default if we have a last seen revision: if unknown, use plural
-                                       $latestRev = Revision::newFromTitle ($userTalkTitle);
+                                       $latestRev = Revision::newFromTitle( $uTalkTitle, false, Revision::READ_NORMAL );
                                        if ( $latestRev !== null ) {
                                                // Singular if only 1 unseen revision, plural if several unseen revisions.
                                                $plural = $latestRev->getParentId() !== $lastSeenRev->getId();
-                                               $nofAuthors = $userTalkTitle->countAuthorsBetween( $lastSeenRev, $latestRev, 10, 'include_new' );
+                                               $nofAuthors = $uTalkTitle->countAuthorsBetween(
+                                                       $lastSeenRev, $latestRev, 10, 'include_new' );
                                        }
                                } else {
                                        // Singular if no revision -> diff link will show latest change only in any case
@@ -1310,14 +1311,14 @@ abstract class Skin extends ContextSource {
                                // the number of revisions or authors is not necessarily the same as the number of
                                // "messages".
                                $newMessagesLink = Linker::linkKnown(
-                                       $userTalkTitle,
+                                       $uTalkTitle,
                                        $this->msg( 'newmessageslinkplural' )->params( $plural )->escaped(),
                                        array(),
                                        array( 'redirect' => 'no' )
                                );
 
                                $newMessagesDiffLink = Linker::linkKnown(
-                                       $userTalkTitle,
+                                       $uTalkTitle,
                                        $this->msg( 'newmessagesdifflinkplural' )->params( $plural )->escaped(),
                                        array(),
                                        $lastSeenRev !== null
index aa6b22a..1ae1cb3 100644 (file)
@@ -123,18 +123,18 @@ class LegacyTemplate extends BaseTemplate {
                  "<table border='0' cellspacing='0' width='100%'>\n<tr>\n";
 
                if ( $this->getSkin()->qbSetting() == 0 ) {
-                       $s .= "<td class='top' align='left' valign='top' rowspan='{$rows}'>\n" .
+                       $s .= "<td class='top' style='text-align: left; vertical-align: top;' rowspan='{$rows}'>\n" .
                                $this->getSkin()->logoText( $wgLang->alignStart() ) . '</td>';
                }
 
                $l = $wgLang->alignStart();
-               $s .= "<td {$borderhack} align='$l' valign='top'>\n";
+               $s .= "<td {$borderhack} style='text-align: $l; vertical-align: top;'>\n";
 
                $s .= $this->topLinks();
                $s .= '<p class="subtitle">' . $this->pageTitleLinks() . "</p>\n";
 
                $r = $wgLang->alignEnd();
-               $s .= "</td>\n<td {$borderhack} valign='top' align='$r' nowrap='nowrap'>";
+               $s .= "</td>\n<td {$borderhack} style='text-align: $r; vertical-align: top;' nowrap='nowrap'>";
                $s .= $this->nameAndLogin();
                $s .= "\n<br />" . $this->searchForm() . '</td>';
 
index 19a0b06..6c21306 100644 (file)
@@ -84,6 +84,11 @@ class InfoAction extends FormlessAction {
                $content = '';
                $table = '';
 
+               // Header
+               if ( !$this->msg( 'pageinfo-header' )->isDisabled() ) {
+                       $content .= $this->msg( 'pageinfo-header ' )->parse();
+               }
+
                // Basic information
                $content = $this->addHeader( $content, $this->msg( 'pageinfo-header-basic' )->text() );
 
@@ -304,6 +309,11 @@ class InfoAction extends FormlessAction {
                        $content = $this->addTable( $content, $table );
                }
 
+               // Footer
+               if ( !$this->msg( 'pageinfo-footer' )->isDisabled() ) {
+                       $content .= $this->msg( 'pageinfo-footer' )->parse();
+               }
+
                return $content;
        }
 
index 0b623e6..d02bcf5 100644 (file)
@@ -133,70 +133,156 @@ class MWDebug {
         * Adds a warning entry to the log
         *
         * @since 1.19
-        * @param $msg
-        * @param int $callerOffset
+        * @param $msg string
+        * @param $callerOffset int
         * @return mixed
         */
-       public static function warning( $msg, $callerOffset = 1 ) {
-               if ( !self::$enabled ) {
-                       return;
-               }
+       public static function warning( $msg, $callerOffset = 1, $level = E_USER_NOTICE ) {
+               $callerDescription = self::getCallerDescription( $callerOffset );
 
-               // Check to see if there was already a deprecation notice, so not to
-               // get a duplicate warning
-               $logCount = count( self::$log );
-               $caller = wfGetCaller( $callerOffset + 1 );
-               if ( $logCount ) {
-                       $lastLog = self::$log[ $logCount - 1 ];
-                       if ( $lastLog['type'] == 'deprecated' && $lastLog['caller'] == $caller ) {
-                               return;
-                       }
-               }
+               self::sendWarning( $msg, $callerDescription, $level );
 
-               self::$log[] = array(
-                       'msg' => htmlspecialchars( $msg ),
-                       'type' => 'warn',
-                       'caller' => $caller,
-               );
+               if ( self::$enabled ) {
+                       self::$log[] = array(
+                               'msg' => htmlspecialchars( $msg ),
+                               'type' => 'warn',
+                               'caller' => $callerDescription['func'],
+                       );
+               }
        }
 
        /**
-        * Adds a depreciation entry to the log, along with a backtrace
+        * Show a warning that $function is deprecated.
+        * This will send it to the following locations:
+        * - Debug toolbar, with one item per function and caller, if $wgDebugToolbar
+        *   is set to true.
+        * - PHP's error log, with level E_USER_DEPRECATED, if $wgDevelopmentWarnings
+        *   is set to true.
+        * - MediaWiki's debug log, if $wgDevelopmentWarnings is set to false.
         *
         * @since 1.19
-        * @param $function
-        * @param $version
-        * @param $component
+        * @param $function string: Function that is deprecated.
+        * @param $version string|bool: Version in which the function was deprecated.
+        * @param $component string|bool: Component to which the function belongs.
+        *     If false, it is assumbed the function is in MediaWiki core.
+        * @param $callerOffset integer: How far up the callstack is the original
+        *    caller. 2 = function that called the function that called
+        *    MWDebug::deprecated() (Added in 1.20).
         * @return mixed
         */
-       public static function deprecated( $function, $version, $component ) {
-               if ( !self::$enabled ) {
-                       return;
-               }
+       public static function deprecated( $function, $version = false, $component = false, $callerOffset = 2 ) {
+               $callerDescription = self::getCallerDescription( $callerOffset );
+               $callerFunc = $callerDescription['func'];
 
-               // Chain: This function -> wfDeprecated -> deprecatedFunction -> caller
-               $caller = wfGetCaller( 4 );
+               $sendToLog = true;
 
                // Check to see if there already was a warning about this function
-               $functionString = "$function-$caller";
-               if ( in_array( $functionString, self::$deprecationWarnings ) ) {
+               if ( isset( self::$deprecationWarnings[$function][$callerFunc] ) ) {
                        return;
+               } elseif ( isset( self::$deprecationWarnings[$function] ) ) {
+                       if ( self::$enabled ) {
+                               $sendToLog = false;
+                       } else {
+                               return;
+                       }
                }
 
-               $version = $version === false ? '(unknown version)' : $version;
-               $component = $component === false ? 'MediaWiki' : $component;
-               $msg = htmlspecialchars( "Use of function $function was deprecated in $component $version" );
-               $msg .= Html::rawElement( 'div', array( 'class' => 'mw-debug-backtrace' ),
-                       Html::element( 'span', array(), 'Backtrace:' )
-                        . wfBacktrace()
-               );
+               self::$deprecationWarnings[$function][$callerFunc] = true;
 
-               self::$deprecationWarnings[] = $functionString;
-               self::$log[] = array(
-                       'msg' => $msg,
-                       'type' => 'deprecated',
-                       'caller' => $caller,
-               );
+               if ( $version ) {
+                       global $wgDeprecationReleaseLimit;
+                       if ( $wgDeprecationReleaseLimit && $component === false ) {
+                               # Strip -* off the end of $version so that branches can use the
+                               # format #.##-branchname to avoid issues if the branch is merged into
+                               # a version of MediaWiki later than what it was branched from
+                               $comparableVersion = preg_replace( '/-.*$/', '', $version );
+
+                               # If the comparableVersion is larger than our release limit then
+                               # skip the warning message for the deprecation
+                               if ( version_compare( $wgDeprecationReleaseLimit, $comparableVersion, '<' ) ) {
+                                       $sendToLog = false;
+                               }
+                       }
+
+                       $component = $component === false ? 'MediaWiki' : $component;
+                       $msg = "Use of $function was deprecated in $component $version.";
+               } else {
+                       $msg = "Use of $function is deprecated.";
+               }
+
+               if ( $sendToLog ) {
+                       self::sendWarning( $msg, $callerDescription, E_USER_DEPRECATED );
+               }
+
+               if ( self::$enabled ) {
+                       $logMsg = htmlspecialchars( $msg ) .
+                               Html::rawElement( 'div', array( 'class' => 'mw-debug-backtrace' ),
+                                       Html::element( 'span', array(), 'Backtrace:' ) . wfBacktrace()
+                               );
+
+                       self::$log[] = array(
+                               'msg' => $logMsg,
+                               'type' => 'deprecated',
+                               'caller' => $callerFunc,
+                       );
+               }
+       }
+
+       /**
+        * Get an array describing the calling function at a specified offset.
+        *
+        * @param $callerOffset integer: How far up the callstack is the original
+        *    caller. 0 = function that called getCallerDescription()
+        * @return array with two keys: 'file' and 'func'
+        */
+       private static function getCallerDescription( $callerOffset ) {
+               $callers = wfDebugBacktrace();
+
+               if ( isset( $callers[$callerOffset] ) ) {
+                       $callerfile = $callers[$callerOffset];
+                       if ( isset( $callerfile['file'] ) && isset( $callerfile['line'] ) ) {
+                               $file = $callerfile['file'] . ' at line ' . $callerfile['line'];
+                       } else {
+                               $file = '(internal function)';
+                       }
+               } else {
+                       $file = '(unknown location)';
+               }
+
+               if ( isset( $callers[$callerOffset + 1] ) ) {
+                       $callerfunc = $callers[$callerOffset + 1];
+                       $func = '';
+                       if ( isset( $callerfunc['class'] ) ) {
+                               $func .= $callerfunc['class'] . '::';
+                       }
+                       if ( isset( $callerfunc['function'] ) ) {
+                               $func .= $callerfunc['function'];
+                       }
+               } else {
+                       $func = 'unknown';
+               }
+
+               return array( 'file' => $file, 'func' => $func );
+       }
+
+       /**
+        * Send a warning either to the debug log or by triggering an user PHP
+        * error depending on $wgDevelopmentWarnings.
+        *
+        * @param $msg string Message to send
+        * @param $caller array caller description get from getCallerDescription()
+        * @param $level error level to use if $wgDevelopmentWarnings is true
+        */
+       private static function sendWarning( $msg, $caller, $level ) {
+               global $wgDevelopmentWarnings;
+
+               $msg .= ' [Called from ' . $caller['func'] . ' in ' . $caller['file'] . ']';
+
+               if ( $wgDevelopmentWarnings ) {
+                       trigger_error( $msg, $level );
+               } else {
+                       wfDebug( "$msg\n" );
+               }
        }
 
        /**
index d9092da..3846473 100644 (file)
@@ -917,7 +917,7 @@ class DifferenceEngine extends ContextSource {
 
                if ( !$diff && !$otitle ) {
                        $header .= "
-                       <tr valign='top'>
+                       <tr style='vertical-align: top;'>
                        <td class='diff-ntitle'>{$ntitle}</td>
                        </tr>";
                        $multiColspan = 1;
@@ -935,17 +935,17 @@ class DifferenceEngine extends ContextSource {
                                $multiColspan = 2;
                        }
                        $header .= "
-                       <tr valign='top'>
+                       <tr style='vertical-align: top;'>
                        <td colspan='$colspan' class='diff-otitle'>{$otitle}</td>
                        <td colspan='$colspan' class='diff-ntitle'>{$ntitle}</td>
                        </tr>";
                }
 
                if ( $multi != '' ) {
-                       $header .= "<tr><td colspan='{$multiColspan}' align='center' class='diff-multi'>{$multi}</td></tr>";
+                       $header .= "<tr><td colspan='{$multiColspan}' style='text-align: center;' class='diff-multi'>{$multi}</td></tr>";
                }
                if ( $notice != '' ) {
-                       $header .= "<tr><td colspan='{$multiColspan}' align='center'>{$notice}</td></tr>";
+                       $header .= "<tr><td colspan='{$multiColspan}' style='text-align: center;'>{$notice}</td></tr>";
                }
 
                return $header . $diff . "</table>";
index 4b707fc..cb2433a 100644 (file)
@@ -242,6 +242,9 @@ abstract class FileBackend {
         *   - allowStale          : Don't require the latest available data.
         *                           This can increase performance for non-critical writes.
         *                           This has no effect unless the 'force' flag is set.
+        *   - preserveCache       : Don't clear the process cache before checking files.
+        *                           This should only be used if all entries in the process
+        *                           cache were added after the files were already locked.
         *   - nonJournaled        : Don't log this operation batch in the file journal.
         *                           This limits the ability of recovery scripts.
         *   - parallelize         : Try to do operations in parallel when possible.
@@ -899,7 +902,16 @@ abstract class FileBackend {
        }
 
        /**
-        * Invalidate any in-process file existence and property cache.
+        * Preload persistent file stat and property cache into in-process cache.
+        * This should be used when stat calls will be made on a known list of a many files.
+        *
+        * @param $paths Array Storage paths
+        * @return void
+        */
+       public function preloadCache( array $paths ) {}
+
+       /**
+        * Invalidate any in-process file stat and property cache.
         * If $paths is given, then only the cache for those files will be cleared.
         *
         * @param $paths Array Storage paths (optional)
index 0c8968a..59392f6 100644 (file)
@@ -151,6 +151,7 @@ class FileBackendMultiWrite extends FileBackend {
                }
                // Clear any cache entries (after locks acquired)
                $this->clearCache();
+               $opts['preserveCache'] = true; // only locked files are cached
                // Do a consistency check to see if the backends agree
                $status->merge( $this->consistencyCheck( $this->fileStoragePathsForOps( $ops ) ) );
                if ( !$status->isOK() ) {
index 852a653..9bec145 100644 (file)
@@ -989,7 +989,9 @@ abstract class FileBackendStore extends FileBackend {
                }
 
                // Clear any file cache entries (after locks acquired)
-               $this->clearCache();
+               if ( empty( $opts['preserveCache'] ) ) {
+                       $this->clearCache();
+               }
 
                // Load from the persistent file and container caches
                $this->primeFileCache( $performOps );
@@ -1106,6 +1108,20 @@ abstract class FileBackendStore extends FileBackend {
                return array();
        }
 
+       /**
+        * @see FileBackend::preloadCache()
+        */
+       final public function preloadCache( array $paths ) {
+               $fullConts = array(); // full container names
+               foreach ( $paths as $path ) {
+                       list( $fullCont, $r, $s ) = $this->resolveStoragePath( $path );
+                       $fullConts[] = $fullCont;
+               }
+               // Load from the persistent file and container caches
+               $this->primeContainerCache( $fullConts );
+               $this->primeFileCache( $paths );
+       }
+
        /**
         * @see FileBackend::clearCache()
         */
index f54f666..9c111c9 100644 (file)
@@ -111,7 +111,7 @@ class SwiftFileBackend extends FileBackendStore {
                        : false;
                $this->swiftCDNExpiry = isset( $config['swiftCDNExpiry'] )
                        ? $config['swiftCDNExpiry']
-                       : 3600; // hour
+                       : 12*3600; // 12 hours is safe (tokens last 24 hours per http://docs.openstack.org)
                $this->swiftCDNPurgable = isset( $config['swiftCDNPurgable'] )
                        ? $config['swiftCDNPurgable']
                        : true;
@@ -852,13 +852,13 @@ class SwiftFileBackend extends FileBackendStore {
                                                // See function "create_container_table" in common/db.py.
                                                // If a directory is not "greater" than the last one,
                                                // then it was already listed by the calling iterator.
-                                               if ( $objectDir > $lastDir ) {
+                                               if ( strcmp( $objectDir, $lastDir ) > 0 ) {
                                                        $pDir = $objectDir;
                                                        do { // add dir and all its parent dirs
                                                                $dirs[] = "{$pDir}/";
                                                                $pDir = $this->getParentDir( $pDir );
                                                        } while ( $pDir !== false // sanity
-                                                               && $pDir > $lastDir // not done already
+                                                               && strcmp( $pDir, $lastDir ) > 0 // not done already
                                                                && strlen( $pDir ) > strlen( $dir ) // within $dir
                                                        );
                                                }
@@ -1297,6 +1297,9 @@ class SwiftFileBackend extends FileBackendStore {
                if ( $e->getMessage() ) {
                        trigger_error( "$func: " . $e->getMessage(), E_USER_WARNING );
                }
+               if ( $e instanceof InvalidResponseException ) { // possibly a stale token
+                       $this->srvCache->delete( $this->getCredsCacheKey( $this->auth->username ) );
+               }
                wfDebugLog( 'SwiftBackend',
                        get_class( $e ) . " in '{$func}' (given '" . FormatJson::encode( $params ) . "')" .
                        ( $e->getMessage() ? ": {$e->getMessage()}" : "" )
index 8fa4c6f..f6268c2 100644 (file)
@@ -27,6 +27,9 @@
  * @since 1.20
  */
 class DBFileJournal extends FileJournal {
+       /** @var DatabaseBase */
+       protected $dbw;
+
        protected $wiki = false; // string; wiki DB name
 
        /**
@@ -71,9 +74,7 @@ class DBFileJournal extends FileJournal {
                }
 
                try {
-                       $dbw->begin();
                        $dbw->insert( 'filejournal', $data, __METHOD__ );
-                       $dbw->commit();
                } catch ( DBError $e ) {
                        $status->fatal( 'filejournal-fail-dbquery', $this->backend );
                        return $status;
@@ -125,12 +126,10 @@ class DBFileJournal extends FileJournal {
                $dbw = $this->getMasterDB();
                $dbCutoff = $dbw->timestamp( time() - 86400 * $this->ttlDays );
 
-               $dbw->begin();
                $dbw->delete( 'filejournal',
                        array( 'fj_timestamp < ' . $dbw->addQuotes( $dbCutoff ) ),
                        __METHOD__
                );
-               $dbw->commit();
 
                return $status;
        }
@@ -142,7 +141,12 @@ class DBFileJournal extends FileJournal {
         * @throws DBError
         */
        protected function getMasterDB() {
-               $lb = wfGetLBFactory()->newMainLB();
-               return $lb->getConnection( DB_MASTER, array(), $this->wiki );
+               if ( !$this->dbw ) {
+                       // Get a separate connection in autocommit mode
+                       $lb = wfGetLBFactory()->newMainLB();
+                       $this->dbw = $lb->getConnection( DB_MASTER, array(), $this->wiki );
+                       $this->dbw->clearFlag( DBO_TRX );
+               }
+               return $this->dbw;
        }
 }
index d7c9563..45f0570 100644 (file)
@@ -153,7 +153,6 @@ abstract class Job {
                $dbw = wfGetDB( DB_MASTER );
                $dbw->delete( 'job', array( 'job_id' => $row->job_id ), __METHOD__ );
                $affected = $dbw->affectedRows();
-               $dbw->commit( __METHOD__ );
 
                if ( !$affected ) {
                        // Failed, someone else beat us to it
@@ -177,7 +176,6 @@ abstract class Job {
                        // Delete the random row
                        $dbw->delete( 'job', array( 'job_id' => $row->job_id ), __METHOD__ );
                        $affected = $dbw->affectedRows();
-                       $dbw->commit( __METHOD__ );
 
                        if ( !$affected ) {
                                // Random job gone before we exclusively deleted it
index 6b8dede..b23951c 100644 (file)
@@ -55,7 +55,7 @@ class RefreshLinksJob extends Job {
                        wfGetLB()->waitFor( $this->params['masterPos'] );
                }
 
-               $revision = Revision::newFromTitle( $this->title, 0, Revision::READ_NORMAL );
+               $revision = Revision::newFromTitle( $this->title, false, Revision::READ_NORMAL );
                if ( !$revision ) {
                        $this->error = 'refreshLinks: Article not found "' .
                                $this->title->getPrefixedDBkey() . '"';
@@ -185,7 +185,7 @@ class RefreshLinksJob2 extends Job {
                        }
                        # Re-parse each page that transcludes this page and update their tracking links...
                        foreach ( $titles as $title ) {
-                               $revision = Revision::newFromTitle( $title, 0, Revision::READ_NORMAL );
+                               $revision = Revision::newFromTitle( $title, false, Revision::READ_NORMAL );
                                if ( !$revision ) {
                                        $this->error = 'refreshLinks: Article not found "' .
                                                $title->getPrefixedDBkey() . '"';
index e6672b4..4ebbc49 100644 (file)
@@ -268,10 +268,17 @@ class CSSJanus {
         * @return string
         */
        private static function fixBackgroundPosition( $css ) {
-               $css = preg_replace_callback( self::$patterns['bg_horizontal_percentage'],
+               $replaced = preg_replace_callback( self::$patterns['bg_horizontal_percentage'],
                        array( 'self', 'calculateNewBackgroundPosition' ), $css );
-               $css = preg_replace_callback( self::$patterns['bg_horizontal_percentage_x'],
+               if ( $replaced !== null ) {
+                       // Check for null; sometimes preg_replace_callback() returns null here for some weird reason
+                       $css = $replaced;
+               }
+               $replaced = preg_replace_callback( self::$patterns['bg_horizontal_percentage_x'],
                        array( 'self', 'calculateNewBackgroundPosition' ), $css );
+               if ( $replaced !== null ) {
+                       $css = $replaced;
+               }
 
                return $css;
        }
index 4c6a22f..8917b6d 100644 (file)
@@ -342,6 +342,7 @@ class CoreParserFunctions {
        static function plural( $parser, $text = '' ) {
                $forms = array_slice( func_get_args(), 2 );
                $text = $parser->getFunctionLang()->parseFormattedNumber( $text );
+               settype( $text, ctype_digit( $text ) ? 'int' : 'float' );
                return $parser->getFunctionLang()->convertPlural( $text, $forms );
        }
 
@@ -660,7 +661,7 @@ class CoreParserFunctions {
                if( isset( $cache[$page] ) ) {
                        $length = $cache[$page];
                } elseif( $parser->incrementExpensiveFunctionCount() ) {
-                       $rev = Revision::newFromTitle( $title );
+                       $rev = Revision::newFromTitle( $title, false, Revision::READ_NORMAL );
                        $id = $rev ? $rev->getPage() : 0;
                        $length = $cache[$page] = $rev ? $rev->getSize() : 0;
 
index 5f211b1..8e9444a 100644 (file)
@@ -3565,7 +3565,7 @@ class Parser {
                        # Get the revision
                        $rev = $id
                                ? Revision::newFromId( $id )
-                               : Revision::newFromTitle( $title, 0, Revision::READ_NORMAL );
+                               : Revision::newFromTitle( $title, false, Revision::READ_NORMAL );
                        $rev_id = $rev ? $rev->getId() : 0;
                        # If there is no current revision, there is no page
                        if ( $id === false && !$rev ) {
index 3344436..85365f5 100644 (file)
@@ -667,10 +667,10 @@ class SpecialSearch extends SpecialPage {
                                        return "<li>" .
                                                '<table class="searchResultImage">' .
                                                '<tr>' .
-                                               '<td width="120" align="center" valign="top">' .
+                                               '<td width="120" style="text-align: center; vertical-align: top;">' .
                                                $thumb->toHtml( array( 'desc-link' => true ) ) .
                                                '</td>' .
-                                               '<td valign="top">' .
+                                               '<td style="vertical-align: top;">' .
                                                $link .
                                                $extract .
                                                "<div class='mw-search-result-data'>{$score}{$desc} - {$date}{$related}</div>" .
index 3a6fab3..6dde6b9 100644 (file)
@@ -914,10 +914,10 @@ class SpecialUndelete extends SpecialPage {
                        "<col class='diff-marker' />" .
                        "<col class='diff-content' />" .
                        "<tr>" .
-                               "<td colspan='2' width='50%' align='center' class='diff-otitle'>" .
+                               "<td colspan='2' width='50%' style='text-align: center' class='diff-otitle'>" .
                                $this->diffHeader( $previousRev, 'o' ) .
                                "</td>\n" .
-                               "<td colspan='2' width='50%' align='center' class='diff-ntitle'>" .
+                               "<td colspan='2' width='50%' style='text-align: center' class='diff-ntitle'>" .
                                $this->diffHeader( $currentRev, 'n' ) .
                                "</td>\n" .
                        "</tr>" .
index d1a9b16..43ea345 100644 (file)
@@ -702,21 +702,18 @@ class SpecialUpload extends SpecialPage {
         * @return string
         */
        public static function getDupeWarning( $dupes ) {
-               global $wgOut;
-               if( $dupes ) {
-                       $msg = '<gallery>';
-                       foreach( $dupes as $file ) {
-                               $title = $file->getTitle();
-                               $msg .= $title->getPrefixedText() .
-                                       '|' . $title->getText() . "\n";
-                       }
-                       $msg .= '</gallery>';
-                       return '<li>' .
-                               wfMessage( 'file-exists-duplicate' )->numParams( count( $dupes ) )->parse() .
-                               $wgOut->parse( $msg ) . "</li>\n";
-               } else {
+               if ( !$dupes ) {
                        return '';
                }
+
+               $gallery = new ImageGallery;
+               $gallery->setShowBytes( false );
+               foreach( $dupes as $file ) {
+                       $gallery->add( $file->getTitle() );
+               }
+               return '<li>' .
+                       wfMessage( 'file-exists-duplicate' )->numParams( count( $dupes ) )->parse() .
+                       $gallery->toHtml() . "</li>\n";
        }
 
 }
index 2ee17f8..0e9676d 100644 (file)
--- a/index.php
+++ b/index.php
@@ -41,6 +41,7 @@
 # PHP 4. Setup.php and ObjectCache.php have structures invalid in PHP 5.0 and
 # 5.1, respectively.
 if ( !function_exists( 'version_compare' ) || version_compare( phpversion(), '5.3.2' ) < 0 ) {
+       // We need to use dirname( __FILE__ ) here cause __DIR__ is PHP5.3+
        require( dirname( __FILE__ ) . '/includes/PHPVersionError.php' );
        wfPHPVersionError( 'index.php' );
 }
index 92fb0b7..9529363 100644 (file)
@@ -808,6 +808,7 @@ $2
 'note' => "'''تێبینی:'''",
 'previewnote' => "'''لە بیرت نەچێت ئەمە تەنیا پێشبینینە.'''
 گۆڕانکارییەکانت ھێشتا پاشەکەوت نەکراون!",
+'continue-editing' => 'بەردەوام بە لەدەستکاریکردن',
 'previewconflict' => 'ئەم پێشبینینە بە تۆ نیشان ئەدات ئەو دەقەی لە شوێنی دەستکاری سەرەوە داتناوە چۆن بەرچاو ئەکەوێت ئەگەر پاشەکەوتی بکەیت.',
 'session_fail_preview' => "'''ببوورە! ناتوانین دەستکارییەکەت پێواژۆ بکەین بە ھۆی لەدەستدانی session data.'''
 تکایە دیسان ھەوڵبدەوە.
@@ -1697,6 +1698,7 @@ $1',
 **لادان لە مافەکانی بڵاوکردنەوە
 ***پەڕگەی دووبارەکراوە',
 'filedelete-edit-reasonlist' => 'دەستکاری هۆکارەکانی سڕینەوە',
+'filedelete-maintenance-title' => 'ناتوانیت پەڕگە بسڕیتەوە',
 
 # MIME search
 'mimesearch' => 'گەڕانی MIME',
@@ -1759,7 +1761,7 @@ $1',
 ئێستا ڕەوانکەرە بۆ [[$2]].',
 'double-redirect-fixer' => 'چارەسەرکەری ڕەوانکەر',
 
-'brokenredirects' => 'ڕەوانەکراوە شکاوەکان',
+'brokenredirects' => 'ڕەوانەکەرە شکاوەکان',
 'brokenredirectstext' => 'ئەم ڕەوانەکراوانە بەستەرن بۆ ئەو پەڕانە کە بوونیان نییە:',
 'brokenredirects-edit' => 'دەستکاری',
 'brokenredirects-delete' => 'سڕینەوە',
@@ -1872,6 +1874,9 @@ $1',
 'allpages-bad-ns' => '{{SITENAME}} ناوبۆشایی نیە "$1".',
 'allpages-hide-redirects' => 'ڕەوانەکراوەکان بشارەوە',
 
+# SpecialCachedPage
+'cachedspecial-refresh-now' => 'دواترین پیشانبدە',
+
 # Special:Categories
 'categories' => 'پۆلەكان',
 'categoriespagetext' => 'ئەم {{PLURAL:$1|پۆلە پەڕە یان پەڕگەی|پۆلانە پەڕە یان پەڕگەیان}} لەخۆگرتە.
@@ -2100,7 +2105,7 @@ $UNWATCHURL
 'protectedarticle' => '«[[$1]]»ی پاراست',
 'modifiedarticleprotection' => 'ئاستی پاراستنی «[[$1]]»ی گۆڕا',
 'unprotectedarticle' => 'پاراستنی لەسەر «[[$1]]» لابرد',
-'movedarticleprotection' => 'ڕێککارییەکانی پاراستن لە  "[[$2]]" گوازرایەوە بۆ "[[$1]]"',
+'movedarticleprotection' => 'ڕێککارییەکانی پاراستن لە  «[[$2]]» گوازرایەوە بۆ «[[$1]]»',
 'protect-title' => 'گۆڕینی ئاستی پاراستنی "$1"',
 'prot_1movedto2' => '[[$1]] گوازرایەوە بۆ [[$2]]',
 'protect-legend' => 'پاراستن تەیید بکە',
@@ -2425,7 +2430,7 @@ $1',
 'movepagebtn' => 'ئەم پەڕەیە بگوازەوە',
 'pagemovedsub' => 'گواستنەوە بە سەرکەوتوویی جێبەجێ کرا',
 'movepage-moved' => "'''«$1» گوازرایەوە بۆ «$2»'''",
-'movepage-moved-redirect' => 'ڕەوانکەرێک درووست‌کرا.',
+'movepage-moved-redirect' => 'ڕەوانەکەرێک دروست کرا.',
 'movepage-moved-noredirect' => 'لە دانانی ڕەوانەکەر بەرگری کرا.',
 'articleexists' => 'پەڕەیەک بەم ناوە ھەیە یان ئەو ناوەی تۆ ھەڵتبژاردووە ڕێگەی پێنەدراوە.
 تکایە ناوێکی دیکە ھەڵبژێرە.',
@@ -2435,7 +2440,7 @@ $1',
 'movedto' => 'گواسترایەوە بۆ',
 'movetalk' => 'پەڕەی وتووێژی پەیوەندیدار بگوازەوە',
 'move-subpages' => 'ژێرپەڕەکانی بگوازەوە (ھەتا $1 پەڕە)',
-'move-talk-subpages' => 'ژێرپەڕەکانی پەڕەی وتووێژی بگۆزەرەوە (ھەتاکوو $1)',
+'move-talk-subpages' => 'ژێرپەڕەکانی پەڕەی وتووێژ بگوازەوە (ھەتا $1 پەڕە)',
 'movepage-page-exists' => 'پەڕەی $1 هەیە و ناتوانرێت خۆکار بخرێتە جێی.',
 'movepage-page-moved' => 'پەڕەی $1 گۆزرایەوە بۆ $2.',
 'movepage-page-unmoved' => 'ناکرێ پەڕەی $1 بگوێزرێتەوە بۆ $2.',
@@ -2444,7 +2449,7 @@ $1',
 'movelogpagetext' => 'لە خوارەوەدا لیستی ھەموو پەڕە گواستنەوەکان دەبینن.',
 'movesubpage' => '{{PLURAL:$1|ژێرپەڕە|ژێرپەڕە}}',
 'movesubpagetext' => 'ئەم لاپەڕە $1 {{PLURAL:$1|ژێرلاپەڕەی‌|ژێرلاپەڕەی}} هەیە کە لەخوارە نیشان دراوە.',
-'movenosubpage' => 'ئەم پەڕە ھیچ ژێرپەڕەیەکی نییە.',
+'movenosubpage' => 'ئەم پەڕەیە ھیچ ژێرپەڕەیەکی نییە.',
 'movereason' => 'ھۆکار:',
 'revertmove' => 'پێچەوانەکردنەوە',
 'delete_and_move' => 'بیسڕەوە و بیگوازەوە',
@@ -2663,9 +2668,11 @@ $1',
 
 # Info page
 'pageinfo-title' => 'زانیاری بۆ «$1»',
+'pageinfo-header-basic' => 'زانیاریی سەرەتایی',
 'pageinfo-header-edits' => 'دەستکاریەکان',
 'pageinfo-views' => 'ژمارەی بینینەکان',
 'pageinfo-watchers' => 'ژمارەی چاودێران',
+'pageinfo-firstuser' => 'دروستکەری پەڕە',
 'pageinfo-edits' => 'ژمارەی دەستکارییەکان',
 
 # Skin names
@@ -2777,8 +2784,11 @@ $1',
 'exif-imagelength' => 'بەرزی',
 'exif-imagedescription' => 'ناونیشانی وێنە',
 'exif-model' => 'جۆری کامێرا',
+'exif-software' => 'نەرمەواڵەی بەکارهاتوو',
 'exif-artist' => 'نووسەر',
 'exif-colorspace' => 'بۆشایی ره‌نگ',
+'exif-pixelydimension' => 'پانی وێنە',
+'exif-pixelxdimension' => 'بەرزی وێنە',
 'exif-usercomment' => 'بۆچوونەکانی بەکارهێنەر',
 'exif-relatedsoundfile' => 'فایلی ده‌نگی لێکچوو',
 'exif-lightsource' => 'سەرچاوەی ڕووناکی',
@@ -2794,6 +2804,10 @@ $1',
 'exif-gpstrack' => 'ئاڕاستەی جوڵان',
 'exif-gpsimgdirection' => 'ئاڕاستەی وێنە',
 'exif-gpsdatestamp' => 'ڕێکەوتی GPS',
+'exif-objectname' => 'سەردێری کورت',
+'exif-headline' => 'سەردێر',
+'exif-source' => 'سەرچاوە',
+'exif-copyrighted' => 'ڕەوشی مافی لەبەرگرتنەوە',
 
 # EXIF attributes
 'exif-compression-1' => 'نەپەستێنراو',
@@ -2903,6 +2917,18 @@ $1',
 'exif-gpsspeed-k' => 'کیلۆمەتر هەر کاتژمێر',
 'exif-gpsspeed-m' => 'مایل هەر کاتژمێر',
 
+# Pseudotags used for GPSDestDistanceRef
+'exif-gpsdestdistance-k' => 'کیلۆمەتر',
+'exif-gpsdestdistance-m' => 'میل',
+'exif-gpsdestdistance-n' => 'میکی دەریایی',
+
+'exif-dc-date' => 'ڕۆژ(ەکان)',
+'exif-dc-publisher' => 'بڵاوکار',
+'exif-dc-relation' => 'پەڕگەی پەیوەندیدار',
+'exif-dc-rights' => 'مافەکان',
+'exif-dc-source' => 'سەرچاوەی پەڕگە',
+'exif-dc-type' => 'جۆری پەڕگە',
+
 'exif-iimcategory-hth' => 'تەندروستی',
 'exif-iimcategory-sci' => 'زانست و تەکنۆلۆژیا',
 'exif-iimcategory-soi' => 'بابەتە کۆمەڵایەتییەکان',
index 8e97155..1e17799 100644 (file)
@@ -1985,6 +1985,7 @@ listeya ke ha ver a têna na {{PLURAL:$1|dosyaya ewwili|dosyaya $1 ewwili}} mocn
 'shared-repo' => 'yew embarê repositoryî',
 'shared-repo-name-wikimediacommons' => 'Wikimedia Commons',
 'filepage.css' => '/* CSS placed here is included on the file description page, also included on foreign client wikis */',
+'upload-disallowed-here' => 'Nê asengi sero theba nênusneyêno.',
 
 # File reversion
 'filerevert' => '$1 reyna biyere',
@@ -3089,7 +3090,7 @@ Tı eşkeno yew sebeb bınus.',
 'pageinfo-authors' => 'Amarina nuştekaran pêro',
 'pageinfo-recent-edits' => 'Amariya vurnayışan ($1 ra nata)',
 'pageinfo-recent-authors' => 'Amarina nuştekaran pêro',
-'pageinfo-restriction' => 'Xısusiyetê pela da  (<code>$1</code>)',
+'pageinfo-restriction' => 'Xısusiyetê pela (<code>{{lcfirst:$1}}</code>)',
 'pageinfo-magic-words' => '{{PLURAL:$1|Çekuya|Çekuyê}} ($1) sihırini',
 'pageinfo-hidden-categories' => '{{PLURAL:$1|Kategoriye|Kategoriyan}} ($1) bınımne',
 'pageinfo-templates' => '{{PLURAL:$1|Şablon|Şabloni}} ($1) açarneyayê',
@@ -3148,6 +3149,7 @@ Gurênayışê nae de, beno ke sistemê şıma zerar bıvêno.",
 'file-info-size-pages' => '$1 × $2 pikse, dergeya dosyay: $3, MIME tipiya cı: $4, $5 {{PLURAL:$5|pela|pela}}',
 'file-nohires' => 'Rovıleşiyayışo berzêr çıniyo.',
 'svg-long-desc' => 'SVG dosya, nominalin $1 × $2 piksels, ebatê dosya: $3',
+'svg-long-desc-animated' => 'SVG dosya, nominalin $1 × $2 piksela, ebatê dosya: $3',
 'show-big-image' => 'Resolosyonê temami',
 'show-big-image-preview' => "Verqayd dergiya: $1'i.",
 'show-big-image-other' => 'Zewmi{{PLURAL:$2|Vılêşnayış|Vılêşnayışê}}: $1.',
@@ -3157,6 +3159,8 @@ Gurênayışê nae de, beno ke sistemê şıma zerar bıvêno.",
 'file-info-png-looped' => 'atlama biyo',
 'file-info-png-repeat' => '$1 {{PLURAL:$1|hew|hew}} kay biyê',
 'file-info-png-frames' => '$1 {{PLURAL:$1|çerçeve|çerçeveyi}}',
+'file-no-thumb-animation' => "'''Not: Dılet tekniko limit, gırd agozneya resm de qıckek de animasyoni miyan dı nêbo.'''",
+'file-no-thumb-animation-gif' => "'''Not: Dılet tekniko limit, gırd agozneya resm de qıckek de  GIF imaci de animasyon do nêbo.'''",
 
 # Special:NewFiles
 'newimages' => 'Galeriya dosyayan dê newan',
index 0828bbe..515a433 100644 (file)
@@ -1435,6 +1435,7 @@ You are also promising us that you wrote this yourself, or copied it from a publ
 If you do not want your writing to be edited mercilessly, then do not submit it here.<br />
 You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see $1 for details).
 '''Do not submit copyrighted work without permission!'''",
+'editpage-head-copy-warn'          => '-', # do not translate or duplicate this message to other languages
 'editpage-tos-summary'             => '-', # do not translate or duplicate this message to other languages
 'longpage-hint'                    => '-', # do not translate or duplicate this message to other languages
 'longpageerror'                    => "'''Error: The text you have submitted is {{PLURAL:$1|one kilobyte|$1 kilobytes}} long, which is longer than the maximum of {{PLURAL:$2|one kilobyte|$2 kilobytes}}.'''
@@ -3734,6 +3735,7 @@ This is probably caused by a link to a blacklisted external site.',
 'spam_deleting'       => 'All revisions contained links to $1, deleting',
 
 # Info page
+'pageinfo-header'              => '-', # do not translate or duplicate this message to other languages
 'pageinfo-title'               => 'Information for "$1"',
 'pageinfo-header-basic'        => 'Basic information',
 'pageinfo-header-edits'        => 'Edit history',
@@ -3764,6 +3766,7 @@ This is probably caused by a link to a blacklisted external site.',
 'pageinfo-magic-words'         => 'Magic {{PLURAL:$1|word|words}} ($1)',
 'pageinfo-hidden-categories'   => 'Hidden {{PLURAL:$1|category|categories}} ($1)',
 'pageinfo-templates'           => 'Transcluded {{PLURAL:$1|template|templates}} ($1)',
+'pageinfo-footer'              => '-', # do not translate or duplicate this message to other languages
 
 # Skin names
 'skinname-standard'    => 'Classic', # only translate this message to other languages if you have to change it
index 23349b8..83abaea 100644 (file)
@@ -251,7 +251,7 @@ $messages = array(
 'otherlanguages' => 'Ann an cànain eile',
 'redirectedfrom' => '(Air ath-sheòladh o $1)',
 'redirectpagesub' => 'Ath-sheòl an duilleag',
-'lastmodifiedat' => 'Chaidh an duilleag seo a mhùthadh $1, aig $2 turas mu dheireadh.',
+'lastmodifiedat' => 'Chaidh an duilleag seo a mhùthadh $1 aig $2 turas mu dheireadh.',
 'viewcount' => 'Chaidh inntrigeadh a dhèanam dhan duilleag seo {{PLURAL:$1|aon turas|$1 thuras|$1 turas|$1 turais|$1 turas}}.',
 'protectedpage' => 'Duilleag fo dhìon',
 'jumpto' => 'Gearr leum gu:',
@@ -731,8 +731,13 @@ Mur obraich e fhathast, feuch is [[Special:UserLogout|clàraich a-mach]] is a-st
 
 '''Mas e deasachadh dligheach a tha seo, feuch ris a-rithist.'''
 Mur obraich e fhathast, feuch is [[Special:UserLogout|clàraich a-mach]] is a-steach a-rithist an uairsin.",
+'token_suffix_mismatch' => "'''Dhiùlt sinn na dheasaich thu a chionn 's gun do chuir an cliant agad na caractaran puingeachaidh tro chèile san tòcan deasachaidh.'''
+Dhiùlt sinn na dheasaich thu air eagal 's gun coirbeadh e teacsa na duilleige.
+Tachraidh seo uaireannan ma chleachdar seirbheis-lìn progsaidh gun urra a tha làn de mhearachdan.",
+'edit_form_incomplete' => "'''Cha do ràinig cuid dhen fhoirm deasachaidh am frithealaichte; dèan cinnteach gu bheil gach deasachadh agad slàn is feuch ris a-rithist.'''",
 'editing' => "A' deasachadh $1",
 'editingsection' => "A' deasachadh $1 (earrann)",
+'editingcomment' => "A' deasachadh $1 (earrann ùr)",
 'editconflict' => 'Còmhstri deasachaidh: $1',
 'explainconflict' => "Tha cuideigin eile air an duilleag seo a mhùthadh on a thòisich thu fhèin air a dheasachadh.
 Tha am bogsa teacsa gu h-àrd a' nochdadh na duilleige mar a tha i an-dràsta.
@@ -741,6 +746,8 @@ Bidh agad ris na mùthaidhean agad fhilleadh a-steach san teacsa làithreach.
 Cha dèid '''ach an teacsa gu h-àrd''' a shàbhaladh nuair a bhriogas tu air \"{{int:savearticle}}\".",
 'yourtext' => 'An teacsa agad',
 'storedversion' => 'Lethbhreac taisgte',
+'nonunicodebrowser' => "'''Rabhadh: Chan eil am brabhsair agad co-chòrdail le Unicode.'''
+Chuir sinn gleus air dòigh dhut a nì cinnteach gun urrainn dhut duilleagan a shàbhaladh gu tèarainte: Nochdaidh caractaran taobh a-muigh ASCII mar chòd sia-dheicheach sa bhogsa deasachaidh.",
 'editingold' => "'''RABHADH: Tha thu a' deasachadh lethbhreac seann-aimsireil na duilleige seo.
 Ma shàbhalas tu seo, thèid gach mùthadh air chall a rinneadh a-mach on mhùthadh seo.'''",
 'yourdiff' => 'Caochlaidhean',
@@ -752,10 +759,22 @@ Tha thu a' toirt geall cuideachd gun do sgrìobh thu fhèin seo no gun do rinn t
 Mur eil thu ag iarraidh an sgrìobhaidh agad a dheasaichear is a sgaoilear le càch, na cuir e.<br />
 Ma dh'fhoilleachas tu rudeigin an seo, bidh tu a' dearbhadh gun do sgrìobh thu fhèin e, no gur ann às an raon phòballach a thàinig e; thoir aire '''nach eil''' sin a' gabhail a-staigh duilleagan-lìn mar as àbhaist (seall $1 airson barrachd fiosrachaidh). <br />
 '''NA CLEACHDAIBH SAOTHAIR FO DHLIGHE-SGRÌOBHAIDH GUN CHEAD!'''",
+'longpageerror' => "'''Mearachd: Tha an teacsa a chur thu thugainn {{PLURAL:$1 kilobyte|$1 kilobyte|$1 kilobyte|$1 kilobyte|$1 kilobyte|$1 kilobyte|}} a dh'fhaid is tha sin nas fhaide na tha ceadaichte ({{PLURAL:$1 kilobyte|$2 kilobyte|$2 kilobyte|$2 kilobyte|$2 kilobyte|$2 kilobyte|}}).'''
+Cha ghabh a shàbhaladh.",
+'readonlywarning' => "'''Rabhadh: Chaidh an stòr-dàta a ghlasadh a chum obair-ghlèidhidh agus chan urrainn dhut na còraichean-deasachaidh agad a chur gu feum an-dràsta fhèin.'''
+'S mathaid gum b' fheairrde dhut lethbhreac a dhèanamh dhen teacsa agus a shàbhaladh ann am faidhle ach an urrainn dhut a chleachdadh as a dhèidh seo.
+
+Seo am mìneachadh a thug an rianaire a ghlais e: $1",
 'protectedpagewarning' => "'''Rabhadh: Chaidh an duilleag seo a dhìon 's chan urrainn ach dhan fheadhainn aig a bheil ùghdarras rianaire a dheasachadh.'''
 Chì thu an clàr mu dheireadh san loga mar fhiosrachadh dhut gu h-ìosal:",
+'semiprotectedpagewarning' => "'''An aire:''' Chaidh an duilleag seo a dhìon 's chan fhaod ach cleachdaichean clàraichte a dheasachadh.
+Seo an rud mu dheireadh san loga mar fhiosrachadh dhut:",
+'cascadeprotectedwarning' => "'''Rabhadh:''' Chaidh an duilleag seo a dhìon 's chan fhaod ach rianairean a dheasachadh a chionn 's gun robh e am broinn {{PLURAL:$1|na duilleige|nan duilleagan}} a leanas a tha cascade-protected.",
+'titleprotectedwarning' => "'''Rabhadh: Chaidh an duilleag seo a dhìon 's feumar [[Special:ListGroupRights|còraichean sònraichte]] gus a dheasachadh.'''
+Seo an rud mu dheireadh san loga mar fhiosrachadh dhut:",
 'templatesused' => "Tha {{PLURAL:$1|teamplaid|theamplaid||teamplaid|theamplaid|teamplaidean|teamplaid}} 'gan cleachdadh air an duilleag seo:",
 'templatesusedpreview' => "Tha {{PLURAL:$1|teamplaid 'ga cleachdadh|teamplaidean 'gan cleachdadh|teamplaidean 'gan cleachdadh|teamplaidean 'gan cleachdadh|teamplaidean 'gan cleachdadh|teamplaidean 'gan cleachdadh}} san ro-shealladh seo:",
+'templatesusedsection' => "Tha {{PLURAL:$1|teamplaid 'ga cleachdadh|teamplaidean 'gan cleachdadh|teamplaidean 'gan cleachdadh|teamplaidean 'gan cleachdadh|teamplaidean 'gan cleachdadh|teamplaidean 'gan cleachdadh}} san earrann seo:",
 'template-protected' => '(air a dhìon)',
 'template-semiprotected' => '(air a leth-dhìon)',
 'hiddencategories' => "Tha an duilleag seo 'na ball de {{PLURAL:$1|1 roinn-seòrsa fhalaichte|$1 roinn-seòrsa fhalaichte|1 roinn-seòrsa fhalaichte|$1 roinn-seòrsa fhalaichte|$1 roinnean-seòrsa falaichte|$1 roinn-seòrsa fhalaichte}}:",
index a97ec76..2986d89 100644 (file)
@@ -927,7 +927,7 @@ I dettagli possono essere trovati nel [{{fullurl:{{#Special:Log}}/delete|page={{
 L'ultimo elemento del registro dei blocchi è riportato di seguito per informazione:",
 'clearyourcache' => "'''Nota:''' dopo aver salvato, potrebbe essere necessario pulire la cache del proprio browser per vedere i cambiamenti. 
 *'''Firefox / Safari''': tenere premuto il tasto delle maiuscole e fare clic su ''Ricarica'', oppure premere ''Ctrl-F5'' o ''Ctrl-R'' (''⌘-R'' su Mac)
-*'''Google Chrome''': premere ''Ctrl-Shift-R'' (''⌘-Shift-R'' su un Mac)
+*'''Google Chrome''': fare clic su ''Ricarica'', oppure premere ''Ctrl-R'' o ''Ctrl-Shift-R'' (''⌘-Shift-R'' su un Mac)
 *'''Internet Explorer''': tenere premuto il tasto ''Ctrl'' mentre si fa clic su ''Refresh'', oppure premere ''Ctrl-F5''
 *'''Opera''': svuotare completamente la cache dal menu ''Strumenti → Preferenze''",
 'usercssyoucanpreview' => "'''Suggerimento:''' usa il pulsante 'Visualizza anteprima' per provare il tuo nuovo CSS prima di salvarlo.",
index 5e4ec33..80f5376 100644 (file)
@@ -887,9 +887,9 @@ Cookieを有効にしていることを確認して、このページを再読
 'resetpass_announce' => 'メールでお送りした仮パスワードでログインしました。
 ログインを完了するには、ここで新しいパスワードを設定する必要があります:',
 'resetpass_text' => '<!-- ここに文を挿入 -->',
-'resetpass_header' => 'ã\82¢ã\82«ã\82¦ã\83³ã\83\88ã\81®ã\83\91ã\82¹ã\83¯ã\83¼ã\83\89ã\82\92変更',
-'oldpassword' => '古いパスワード',
-'newpassword' => '新しいパスワード',
+'resetpass_header' => 'ã\82¢ã\82«ã\82¦ã\83³ã\83\88ã\81®ã\83\91ã\82¹ã\83¯ã\83¼ã\83\89ã\81®変更',
+'oldpassword' => '古いパスワード:',
+'newpassword' => '新しいパスワード:',
 'retypenew' => '新しいパスワードを再入力:',
 'resetpass_submit' => '再設定してログイン',
 'resetpass_success' => 'パスワードの変更に成功しました!
@@ -2928,8 +2928,8 @@ hideuser権限を持っていないため、この利用者のブロックを閲
 手動で統合してください。'''",
 'movedto' => '移動先:',
 'movetalk' => '付随するトークページも移動',
-'move-subpages' => '下位ページも移動($1ページまで)',
-'move-talk-subpages' => 'トークページの下位ページも移動($1まで)',
+'move-subpages' => '下位ページも移動($1 件まで)',
+'move-talk-subpages' => 'トークページの下位ページも移動($1 件まで)',
 'movepage-page-exists' => 'ページ「$1」は既に存在するため、自動的な上書きはできませんでした。',
 'movepage-page-moved' => 'ページ「$1」は「$2」に移動しました。',
 'movepage-page-unmoved' => 'ページ「$1」は「$2」に移動できませんでした。',
@@ -2937,7 +2937,7 @@ hideuser権限を持っていないため、この利用者のブロックを閲
 'movelogpage' => '移動記録',
 'movelogpagetext' => '以下はすべてのページ移動の一覧です。',
 'movesubpage' => '{{PLURAL:$1|下位ページ}}',
-'movesubpagetext' => 'このページには{{PLURAL:$1|下位ページ}}が以下の $1 件あります。',
+'movesubpagetext' => 'このページには、以下の $1 {{PLURAL:$1|下位ページ}}があります。',
 'movenosubpage' => 'このページに下位ページはありません。',
 'movereason' => '理由:',
 'revertmove' => '差し戻し',
@@ -3397,6 +3397,11 @@ Variants for Chinese language
 'variantname-ike-latn' => 'イヌクティトゥット語 (ラテン文字)',
 'variantname-iu' => 'イヌクティトゥット語',
 
+# Variants for Tachelhit language
+'variantname-shi-tfng' => 'シルハ語 (ティフィナグ文字)',
+'variantname-shi-latn' => 'シルハ語 (ラテン文字)',
+'variantname-shi' => 'シルハ語',
+
 # Metadata
 'metadata' => 'メタデータ',
 'metadata-help' => 'このファイルには、追加情報があります(おそらく、作成やデジタル化する際に使用したデジタルカメラやスキャナーが追加したものです)。
index cfb4bab..f2f8323 100644 (file)
@@ -16,6 +16,7 @@
  * @author Junaidpv
  * @author Jyothis
  * @author Kaganer
+ * @author Krenair
  * @author Manjith Joseph <manjithkaini@gmail.com>
  * @author Naveen Sankar
  * @author Praveen Prakash <me.praveen@gmail.com>
@@ -962,8 +963,8 @@ $1 ആണ് ഈ തടയൽ നടത്തിയത്. ''$2'' എന്ന
 'newarticle' => '(പുതിയത്)',
 'newarticletext' => 'ഇതുവരെ നിലവിലില്ലാത്ത ഒരു താൾ സൃഷ്ടിക്കാനുള്ള ശ്രമത്തിലാണ് താങ്കൾ. അതിനായി താഴെ ആവശ്യമുള്ള വിവരങ്ങൾ എഴുതിച്ചേർത്ത് സേവ് ചെയ്യുക (കൂടുതൽ വിവരങ്ങൾക്ക് [[{{MediaWiki:Helppage}}|സഹായം താൾ]] കാണുക). താങ്കളിവിടെ അബദ്ധത്തിൽ വന്നതാണെങ്കിൽ ബ്രൗസറിന്റെ ബാക്ക് ബട്ടൺ ഞെക്കിയാൽ തിരിച്ചുപോകാം.',
 'anontalkpagetext' => "----
-{| class=\"messagebox standard-talk\" style=\"border: 1px solid #B3B300; background-color:#FFFFBF;\"
-|align=\"left\" |
+{| class=\"messagebox standard-talk\" style=\"border: 1px solid #B3B300; background-color:#FFFFBF; text-align: left;\"
+|
 ''ഇതുവരെ അംഗത്വം എടുക്കാതിരിക്കുകയോ, നിലവിലുള്ള അംഗത്വം ഉപയോഗിക്കാതിരിക്കുകയോ ചെയ്യുന്ന '''ഒരു അജ്ഞാത ഉപയോക്താവിന്റെ സം‌വാദം താളാണിത്'''.
 അതിനാൽ അദ്ദേഹത്തെ തിരിച്ചറിയുവാൻ അക്കരൂപത്തിലുള്ള ഐ.പി. വിലാസം ഉപയോഗിക്കേണ്ടതുണ്ട്. ഇത്തരം ഒരു ഐ.പി. വിലാസം പല ഉപയോക്താക്കൾ പങ്കുവെക്കുന്നുണ്ടാവാം.
 താങ്കൾ ഈ സന്ദേശം ലഭിച്ച ഒരു അജ്ഞാത ഉപയോക്താവാണെങ്കിൽ, ഭാവിയിൽ ഇതര ഉപയോക്താക്കളുമായി ഉണ്ടായേക്കാവുന്ന ആശയക്കുഴപ്പം ഒഴിവാക്കാൻ ദയവായി [[Special:UserLogin/signup|ഒരു അംഗത്വമെടുക്കുക]] അല്ലെങ്കിൽ  [[Special:UserLogin|പ്രവേശിക്കുക]].
index 4cef353..b192f98 100644 (file)
@@ -1890,9 +1890,9 @@ delete|ਮਿਟਾਉਣਾਂ ਦਾ ਚਿੱਠਾ]] ਵੇਖੋ।',
 'spamprotectiontitle' => 'Spam ਸੁਰੱਖਿਆ ਫਿਲਟਰ',
 
 # Info page
-'pageinfo-header-edits' => 'ਸੋਧਾਂ',
-'pageinfo-watchers' => 'ਨà¨\9c਼ਰ à¨°à©±à¨\96ਣ à¨µà¨¾à¨²à¨¼à¨¿à¨\86à¨\82 à¨¦à©\80 à¨\97ਿਣਤà©\80',
-'pageinfo-edits' => 'ਸà©\8bਧਾà¨\82 à¨¦à©\80 à¨\97ਿਣਤà©\80',
+'pageinfo-header-edits' => 'ਸੋਧਾਂ ਦਾ ਅਤੀਤ',
+'pageinfo-watchers' => 'ਸਫ਼à©\87 â\80\99ਤà©\87 à¨¨à¨\9c਼ਰ à¨°à©±à¨\96ਣ à¨µà¨¾à¨²à¨¼à©\87',
+'pageinfo-edits' => 'à¨\95à©\81ੱਲ à¨¸à©\8bਧਾà¨\82',
 
 # Skin names
 'skinname-standard' => 'ਕਲਾਸਿਕ',
index e551c96..eec58cc 100644 (file)
@@ -2754,7 +2754,7 @@ A peul visualisene la sorgiss",
 'tooltip-t-permalink' => 'Anliura fissa a sta version-sì dla pàgina',
 'tooltip-ca-nstab-main' => 'Vardé la pàgina ëd contnù.',
 'tooltip-ca-nstab-user' => 'Vardé la pàgina Utent.',
-'tooltip-ca-nstab-media' => 'Vardé la pàgina dl',
+'tooltip-ca-nstab-media' => 'Vardé la pàgina dël mojen',
 'tooltip-ca-nstab-special' => 'Costa a l',
 'tooltip-ca-nstab-project' => 'Vardé la pàgina proteta.',
 'tooltip-ca-nstab-image' => 'Vardé la pàgina dl',
index 0beef17..3081b9b 100644 (file)
@@ -3455,6 +3455,7 @@ See also {{msg-mw|Anonuser}} and {{msg-mw|Siteusers}}.',
 * $1 is a spammed domain name.',
 
 # Info page
+'pageinfo-header' => 'Header for action=info, set by wiki administrator(s).',
 'pageinfo-title' => 'Page title for action=info. Parameters:
 * $1 is the page name',
 'pageinfo-header-basic' => 'Table section header in action=info.',
@@ -3494,6 +3495,7 @@ See also {{msg-mw|Anonuser}} and {{msg-mw|Siteusers}}.',
 * $1 is the number of hidden categories on the page.',
 'pageinfo-templates' => 'The list of templates transcluded within the page. Parameters:
 * $1 is the number of templates transcluded within the page.',
+'pageinfo-footer' => 'Footer for action=info, set by wiki administrator(s).',
 
 # Skin names
 'skinname-standard' => '{{optional}}
index 8146d9a..148206a 100644 (file)
@@ -7,6 +7,7 @@
  * @ingroup Language
  * @file
  *
+ * @author Arjunaraoc
  * @author Chaduvari
  * @author Jprmvnvijay5
  * @author Kaganer
@@ -692,6 +693,7 @@ $2
 # Special:ChangeEmail
 'changeemail' => 'ఈ-మెయిలు చిరునామా మార్పు',
 'changeemail-header' => 'ఖాతా ఈ-మెయిల్ చిరునామాని మార్చండి',
+'changeemail-text' => 'మీ ఈమెయిల్ చిరునామా మార్చుటకు ఈ ఫారము నింపండి. ఈ మార్పుని ఖచ్చితపరచుటకు మీ సంకేతపదం  ప్రవేశపెట్టాలి.',
 'changeemail-no-info' => 'ఈ పేజీని నేరుగా చూడటానికి మీరు లోనికి ప్రవేశించివుండాలి.',
 'changeemail-oldemail' => 'ప్రస్తుత ఈ-మెయిలు చిరునామా:',
 'changeemail-newemail' => 'కొత్త ఈ-మెయిలు చిరునామా:',
index 5e17126..4ddee10 100644 (file)
@@ -764,6 +764,7 @@ Ita-nia mudansa la armazenadu seidauk!",
 'contribslink' => 'kontribuisaun',
 'block-log-flags-nocreate' => 'la bele kria konta foun',
 'block-log-flags-noemail' => 'korreiu eletróniku blokeiu',
+'block-log-flags-nousertalk' => 'la bele edita pájina diskusaun rasik',
 'ipb_already_blocked' => 'Ema ruma blokeiu "$1" tiha ona',
 
 # Move page
index a3b9bba..b726e80 100644 (file)
@@ -1003,6 +1003,7 @@ HTML tags جانچئے.',
 'uploadlogpagetext' => 'درج ذیل میں حالیہ زبراثقال (اپ لوڈ) کی گئی املاف (فائلوں) کی فہرست دی گئی ہے۔',
 'filedesc' => 'خلاصہ',
 'fileuploadsummary' => 'خلاصہ :',
+'filesource' => 'ذرائع',
 'uploadedfiles' => 'زبراثقال ملف (فائل اپ لوڈ)',
 'ignorewarning' => 'انتباہ نظرانداز کرتے ہوۓ بہرصورت ملف (فائل) کو محفوظ کرلیا جاۓ۔',
 'ignorewarnings' => 'ہر انتباہ نظرانداز کردیا جاۓ۔',
index 6ffc145..f363c3f 100644 (file)
--- a/load.php
+++ b/load.php
@@ -24,6 +24,7 @@
 
 // Bail if PHP is too low
 if ( !function_exists( 'version_compare' ) || version_compare( phpversion(), '5.3.2' ) < 0 ) {
+       // We need to use dirname( __FILE__ ) here cause __DIR__ is PHP5.3+
        require( dirname( __FILE__ ) . '/includes/PHPVersionError.php' );
        wfPHPVersionError( 'load.php' );
 }
index 6da5815..69d1131 100644 (file)
@@ -20,8 +20,9 @@
  * @defgroup Maintenance Maintenance
  */
 
-// Make sure we're on PHP5 or better
+// Make sure we're on PHP5.3.2 or better
 if ( !function_exists( 'version_compare' ) || version_compare( PHP_VERSION, '5.3.2' ) < 0 ) {
+       // We need to use dirname( __FILE__ ) here cause __DIR__ is PHP5.3+
        require_once( dirname( __FILE__ ) . '/../includes/PHPVersionError.php' );
        wfPHPVersionError( 'cli' );
 }
@@ -37,7 +38,6 @@ define( 'DO_MAINTENANCE', RUN_MAINTENANCE_IF_MAIN ); // original name, harmless
 
 $maintClass = false;
 
-
 /**
  * Abstract maintenance class for quickly writing and churning out
  * maintenance scripts with minimal effort. All that _must_ be defined
index 2d0f90f..ce1dbb9 100644 (file)
@@ -189,6 +189,7 @@ $wgIgnoredMessages = array(
        'wantedtemplates-summary',
        'activeusers-summary',
        'search-summary',
+       'editpage-head-copy-warn',
        'editpage-tos-summary',
        'addsection-preload',
        'addsection-editintro',
@@ -243,6 +244,8 @@ $wgIgnoredMessages = array(
        'version-entrypoints-api-php',
        'version-entrypoints-load-php',
        'ipb-default-expiry',
+       'pageinfo-header',
+       'pageinfo-footer',
 );
 
 /** Optional messages, which may be translated only if changed in the target language. */
index 33c104b..b644d8e 100644 (file)
@@ -653,6 +653,7 @@ $wgMessageStructure = array(
                'yourdiff',
                'copyrightwarning',
                'copyrightwarning2',
+               'editpage-head-copy-warn',
                'editpage-tos-summary',
                'longpage-hint',
                'longpageerror',
@@ -2663,6 +2664,7 @@ $wgMessageStructure = array(
                'spam_deleting',
        ),
        'info' => array(
+               'pageinfo-header',
                'pageinfo-title',
                'pageinfo-header-basic',
                'pageinfo-header-edits',
@@ -2693,6 +2695,7 @@ $wgMessageStructure = array(
                'pageinfo-magic-words',
                'pageinfo-hidden-categories',
                'pageinfo-templates',
+               'pageinfo-footer',
        ),
        'skin' => array(
                'skinname-standard',
index 5a24355..82ab718 100644 (file)
@@ -204,6 +204,10 @@ return array(
                'scripts' => 'resources/jquery/jquery.spinner.js',
                'styles' => 'resources/jquery/jquery.spinner.css',
        ),
+       'jquery.jStorage' => array(
+               'scripts' => 'resources/jquery/jquery.jStorage.js',
+               'dependencies' => 'jquery.json',
+       ),
        'jquery.suggestions' => array(
                'scripts' => 'resources/jquery/jquery.suggestions.js',
                'styles' => 'resources/jquery/jquery.suggestions.css',
diff --git a/resources/jquery/jquery.jStorage.js b/resources/jquery/jquery.jStorage.js
new file mode 100644 (file)
index 0000000..95959cf
--- /dev/null
@@ -0,0 +1,532 @@
+/*
+ * ----------------------------- JSTORAGE -------------------------------------
+ * Simple local storage wrapper to save data on the browser side, supporting
+ * all major browsers - IE6+, Firefox2+, Safari4+, Chrome4+ and Opera 10.5+
+ *
+ * Copyright (c) 2010 Andris Reinman, andris.reinman@gmail.com
+ * Project homepage: www.jstorage.info
+ *
+ * Taken from Github with slight modifications by Hoo man
+ * https://raw.github.com/andris9/jStorage/master/jstorage.js
+ *
+ * Licensed under MIT-style license:
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/**
+ * $.jStorage
+ *
+ * USAGE:
+ *
+ * jStorage requires Prototype, MooTools or jQuery! If jQuery is used, then
+ * jQuery-JSON (http://code.google.com/p/jquery-json/) is also needed.
+ * (jQuery-JSON needs to be loaded BEFORE jStorage!)
+ *
+ * Methods:
+ *
+ * -set(key, value[, options])
+ * $.jStorage.set(key, value) -> saves a value
+ *
+ * -get(key[, default])
+ * value = $.jStorage.get(key [, default]) ->
+ *    retrieves value if key exists, or default if it doesn't
+ *
+ * -deleteKey(key)
+ * $.jStorage.deleteKey(key) -> removes a key from the storage
+ *
+ * -flush()
+ * $.jStorage.flush() -> clears the cache
+ *
+ * -storageObj()
+ * $.jStorage.storageObj() -> returns a read-ony copy of the actual storage
+ *
+ * -storageSize()
+ * $.jStorage.storageSize() -> returns the size of the storage in bytes
+ *
+ * -index()
+ * $.jStorage.index() -> returns the used keys as an array
+ *
+ * -storageAvailable()
+ * $.jStorage.storageAvailable() -> returns true if storage is available
+ *
+ * -reInit()
+ * $.jStorage.reInit() -> reloads the data from browser storage
+ *
+ * <value> can be any JSON-able value, including objects and arrays.
+ *
+ **/
+
+(function($){
+    if(!$ || !($.toJSON || Object.toJSON || window.JSON)){
+        throw new Error("jQuery, MooTools or Prototype needs to be loaded before jStorage!");
+    }
+
+    var
+        /* This is the object, that holds the cached values */
+        _storage = {},
+
+        /* Actual browser storage (localStorage or globalStorage['domain']) */
+        _storage_service = {jStorage:"{}"},
+
+        /* DOM element for older IE versions, holds userData behavior */
+        _storage_elm = null,
+
+        /* How much space does the storage take */
+        _storage_size = 0,
+
+        /* function to encode objects to JSON strings */
+        json_encode = $.toJSON || Object.toJSON || (window.JSON && (JSON.encode || JSON.stringify)),
+
+        /* function to decode objects from JSON strings */
+        json_decode = $.evalJSON || (window.JSON && (JSON.decode || JSON.parse)) || function(str){
+            return String(str).evalJSON();
+        },
+
+        /* which backend is currently used */
+        _backend = false,
+
+        /* Next check for TTL */
+        _ttl_timeout,
+
+        /**
+         * XML encoding and decoding as XML nodes can't be JSON'ized
+         * XML nodes are encoded and decoded if the node is the value to be saved
+         * but not if it's as a property of another object
+         * Eg. -
+         *   $.jStorage.set("key", xmlNode);        // IS OK
+         *   $.jStorage.set("key", {xml: xmlNode}); // NOT OK
+         */
+        _XMLService = {
+
+            /**
+             * Validates a XML node to be XML
+             * based on jQuery.isXML function
+             */
+            isXML: function(elm){
+                var documentElement = (elm ? elm.ownerDocument || elm : 0).documentElement;
+                return documentElement ? documentElement.nodeName !== "HTML" : false;
+            },
+
+            /**
+             * Encodes a XML node to string
+             * based on http://www.mercurytide.co.uk/news/article/issues-when-working-ajax/
+             */
+            encode: function(xmlNode) {
+                if(!this.isXML(xmlNode)){
+                    return false;
+                }
+                try{ // Mozilla, Webkit, Opera
+                    return new XMLSerializer().serializeToString(xmlNode);
+                }catch(E1) {
+                    try {  // IE
+                        return xmlNode.xml;
+                    }catch(E2){}
+                }
+                return false;
+            },
+
+            /**
+             * Decodes a XML node from string
+             * loosely based on http://outwestmedia.com/jquery-plugins/xmldom/
+             */
+            decode: function(xmlString){
+                var dom_parser = ("DOMParser" in window && (new DOMParser()).parseFromString) ||
+                        (window.ActiveXObject && function(_xmlString) {
+                    var xml_doc = new ActiveXObject('Microsoft.XMLDOM');
+                    xml_doc.async = 'false';
+                    xml_doc.loadXML(_xmlString);
+                    return xml_doc;
+                }),
+                resultXML;
+                if(!dom_parser){
+                    return false;
+                }
+                resultXML = dom_parser.call("DOMParser" in window && (new DOMParser()) || window, xmlString, 'text/xml');
+                return this.isXML(resultXML)?resultXML:false;
+            }
+        };
+
+    ////////////////////////// PRIVATE METHODS ////////////////////////
+
+    /**
+     * Initialization function. Detects if the browser supports DOM Storage
+     * or userData behavior and behaves accordingly.
+     * @returns undefined
+     */
+    function _init(){
+        /* Check if browser supports localStorage */
+        var localStorageReallyWorks = false;
+        if("localStorage" in window){
+            try {
+                window.localStorage.setItem('_tmptest', 'tmpval');
+                localStorageReallyWorks = true;
+                window.localStorage.removeItem('_tmptest');
+            } catch(BogusQuotaExceededErrorOnIos5) {
+                // Thanks be to iOS5 Private Browsing mode which throws
+                // QUOTA_EXCEEDED_ERRROR DOM Exception 22.
+            }
+        }
+        if(localStorageReallyWorks){
+            try {
+                if(window.localStorage) {
+                    _storage_service = window.localStorage;
+                    _backend = "localStorage";
+                }
+            } catch(E3) {/* Firefox fails when touching localStorage and cookies are disabled */}
+        }
+        /* Check if browser supports globalStorage */
+        else if("globalStorage" in window){
+            try {
+                if(window.globalStorage) {
+                    _storage_service = window.globalStorage[window.location.hostname];
+                    _backend = "globalStorage";
+                }
+            } catch(E4) {/* Firefox fails when touching localStorage and cookies are disabled */}
+        }
+        /* Check if browser supports userData behavior */
+        else {
+            _storage_elm = document.createElement('link');
+            if(_storage_elm.addBehavior){
+
+                /* Use a DOM element to act as userData storage */
+                _storage_elm.style.behavior = 'url(#default#userData)';
+
+                /* userData element needs to be inserted into the DOM! */
+                document.getElementsByTagName('head')[0].appendChild(_storage_elm);
+
+                _storage_elm.load("jStorage");
+                var data = "{}";
+                try{
+                    data = _storage_elm.getAttribute("jStorage");
+                }catch(E5){}
+                _storage_service.jStorage = data;
+                _backend = "userDataBehavior";
+            }else{
+                _storage_elm = null;
+                return;
+            }
+        }
+
+        _load_storage();
+
+        // remove dead keys
+        _handleTTL();
+    }
+
+    /**
+     * Loads the data from the storage based on the supported mechanism
+     * @returns undefined
+     */
+    function _load_storage(){
+        /* if jStorage string is retrieved, then decode it */
+        if(_storage_service.jStorage){
+            try{
+                _storage = json_decode(String(_storage_service.jStorage));
+            }catch(E6){_storage_service.jStorage = "{}";}
+        }else{
+            _storage_service.jStorage = "{}";
+        }
+        _storage_size = _storage_service.jStorage?String(_storage_service.jStorage).length:0;
+    }
+
+    /**
+     * This functions provides the "save" mechanism to store the jStorage object
+     * @returns undefined
+     */
+    function _save(){
+        try{
+            _storage_service.jStorage = json_encode(_storage);
+            // If userData is used as the storage engine, additional
+            if(_storage_elm) {
+                _storage_elm.setAttribute("jStorage",_storage_service.jStorage);
+                _storage_elm.save("jStorage");
+            }
+            _storage_size = _storage_service.jStorage?String(_storage_service.jStorage).length:0;
+        }catch(E7){/* probably cache is full, nothing is saved this way*/}
+    }
+
+    /**
+     * Function checks if a key is set and is string or numberic
+     */
+    function _checkKey(key){
+        if(!key || (typeof key !== "string" && typeof key !== "number")){
+            throw new TypeError('Key name must be string or numeric');
+        }
+        if(key === "__jstorage_meta"){
+            throw new TypeError('Reserved key name');
+        }
+        return true;
+    }
+
+    /**
+     * Removes expired keys
+     */
+    function _handleTTL(){
+        var curtime, i, TTL, nextExpire = Infinity, changed = false;
+
+        clearTimeout(_ttl_timeout);
+
+        if(!_storage.__jstorage_meta || typeof _storage.__jstorage_meta.TTL !== "object"){
+            // nothing to do here
+            return;
+        }
+
+        curtime = +new Date();
+        TTL = _storage.__jstorage_meta.TTL;
+        for(i in TTL){
+            if(TTL.hasOwnProperty(i)){
+                if(TTL[i] <= curtime){
+                    delete TTL[i];
+                    delete _storage[i];
+                    changed = true;
+                }else if(TTL[i] < nextExpire){
+                    nextExpire = TTL[i];
+                }
+            }
+        }
+
+        // set next check
+        if(nextExpire != Infinity){
+            _ttl_timeout = setTimeout(_handleTTL, nextExpire - curtime);
+        }
+
+        // save changes
+        if(changed){
+            _save();
+        }
+    }
+
+    ////////////////////////// PUBLIC INTERFACE /////////////////////////
+
+    $.jStorage = {
+        /* Version number */
+        version: "0.1.7.0",
+
+        /**
+         * Sets a key's value.
+         *
+         * @param {String} key - Key to set. If this value is not set or not
+         *              a string an exception is raised.
+         * @param {Mixed} value - Value to set. This can be any value that is JSON
+         *              compatible (Numbers, Strings, Objects etc.).
+         * @param {Object} [options] - possible options to use
+         * @param {Number} [options.TTL] - optional TTL value
+         * @returns the used value
+         */
+        set: function(key, value, options){
+            _checkKey(key);
+
+            options = options || {};
+
+            if(_XMLService.isXML(value)){
+                value = {_is_xml:true,xml:_XMLService.encode(value)};
+            }else if(typeof value === "function"){
+                value = null; // functions can't be saved!
+            }else if(value && typeof value === "object"){
+                // clone the object before saving to _storage tree
+                value = json_decode(json_encode(value));
+            }
+            _storage[key] = value;
+
+            if(!isNaN(options.TTL)){
+                this.setTTL(key, options.TTL);
+                // also handles saving
+            }else{
+                _save();
+            }
+            return value;
+        },
+
+        /**
+         * Looks up a key in cache
+         *
+         * @param {String} key - Key to look up.
+         * @param {mixed} def - Default value to return, if key didn't exist.
+         * @returns the key value, default value or <null>
+         */
+        get: function(key, def){
+            _checkKey(key);
+            if(key in _storage){
+                if(_storage[key] && typeof _storage[key] === "object" &&
+                        _storage[key]._is_xml &&
+                            _storage[key]._is_xml){
+                    return _XMLService.decode(_storage[key].xml);
+                }else{
+                    return _storage[key];
+                }
+            }
+            return typeof(def) === 'undefined' ? null : def;
+        },
+
+        /**
+         * Deletes a key from cache.
+         *
+         * @param {String} key - Key to delete.
+         * @returns true if key existed or false if it didn't
+         */
+        deleteKey: function(key){
+            _checkKey(key);
+            if(key in _storage){
+                delete _storage[key];
+                // remove from TTL list
+                if(_storage.__jstorage_meta &&
+                  typeof _storage.__jstorage_meta.TTL === "object" &&
+                  key in _storage.__jstorage_meta.TTL){
+                    delete _storage.__jstorage_meta.TTL[key];
+                }
+                _save();
+                return true;
+            }
+            return false;
+        },
+
+        /**
+         * Sets a TTL for a key, or remove it if ttl value is 0 or below
+         *
+         * @param {String} key - key to set the TTL for
+         * @param {Number} ttl - TTL timeout in milliseconds
+         * @returns true if key existed or false if it didn't
+         */
+        setTTL: function(key, ttl){
+            var curtime = +new Date();
+            _checkKey(key);
+            ttl = Number(ttl) || 0;
+            if(key in _storage){
+
+                if(!_storage.__jstorage_meta){
+                    _storage.__jstorage_meta = {};
+                }
+                if(!_storage.__jstorage_meta.TTL){
+                    _storage.__jstorage_meta.TTL = {};
+                }
+
+                // Set TTL value for the key
+                if(ttl>0){
+                    _storage.__jstorage_meta.TTL[key] = curtime + ttl;
+                }else{
+                    delete _storage.__jstorage_meta.TTL[key];
+                }
+
+                _save();
+
+                _handleTTL();
+                return true;
+            }
+            return false;
+        },
+
+        /**
+         * Deletes everything in cache.
+         *
+         * @return true
+         */
+        flush: function(){
+            _storage = {};
+            _save();
+            return true;
+        },
+
+        /**
+         * Returns a read-only copy of _storage
+         *
+         * @returns Object
+        */
+        storageObj: function(){
+            function F() {}
+            F.prototype = _storage;
+            return new F();
+        },
+
+        /**
+         * Returns an index of all used keys as an array
+         * ['key1', 'key2',..'keyN']
+         *
+         * @returns Array
+        */
+        index: function(){
+            var index = [], i;
+            for(i in _storage){
+                if(_storage.hasOwnProperty(i) && i !== "__jstorage_meta"){
+                    index.push(i);
+                }
+            }
+            return index;
+        },
+
+        /**
+         * How much space in bytes does the storage take?
+         *
+         * @returns Number
+         */
+        storageSize: function(){
+            return _storage_size;
+        },
+
+        /**
+         * Which backend is currently in use?
+         *
+         * @returns String
+         */
+        currentBackend: function(){
+            return _backend;
+        },
+
+        /**
+         * Test if storage is available
+         *
+         * @returns Boolean
+         */
+        storageAvailable: function(){
+            return !!_backend;
+        },
+
+        /**
+         * Reloads the data from browser storage
+         *
+         * @returns undefined
+         */
+        reInit: function(){
+            var new_storage_elm, data;
+            if(_storage_elm && _storage_elm.addBehavior){
+                new_storage_elm = document.createElement('link');
+
+                _storage_elm.parentNode.replaceChild(new_storage_elm, _storage_elm);
+                _storage_elm = new_storage_elm;
+
+                /* Use a DOM element to act as userData storage */
+                _storage_elm.style.behavior = 'url(#default#userData)';
+
+                /* userData element needs to be inserted into the DOM! */
+                document.getElementsByTagName('head')[0].appendChild(_storage_elm);
+
+                _storage_elm.load("jStorage");
+                data = "{}";
+                try{
+                    data = _storage_elm.getAttribute("jStorage");
+                }catch(E5){}
+                _storage_service.jStorage = data;
+                _backend = "userDataBehavior";
+            }
+
+            _load_storage();
+        }
+    };
+
+    // Initialize jStorage
+    _init();
+
+})(window.$ || window.jQuery);
index e47b35f..5461309 100644 (file)
@@ -67,7 +67,7 @@ class StandardTemplate extends LegacyTemplate {
                wfProfileOut( __METHOD__ . '-1' );
                wfProfileIn( __METHOD__ . '-2' );
                $l = $this->getSkin()->getLanguage()->alignStart();
-               $s .= "<td class='bottom' align='$l' valign='top'>";
+               $s .= "<td class='bottom' style='text-align: $l; vertical-align: top;'>";
 
                $s .= $this->bottomLinks();
                $s .= "\n<br />" . $this->getSkin()->getLanguage()->pipeList( array(
diff --git a/tests/phpunit/includes/LocalisationCacheTest.php b/tests/phpunit/includes/LocalisationCacheTest.php
new file mode 100644 (file)
index 0000000..356db87
--- /dev/null
@@ -0,0 +1,31 @@
+<?php
+
+class LocalisationCacheTest extends MediaWikiTestCase {
+       public function testPuralRulesFallback() {
+               $cache = Language::getLocalisationCache();
+
+               $this->assertEquals(
+                       $cache->getItem( 'ru', 'pluralRules' ),
+                       $cache->getItem( 'os', 'pluralRules' ),
+                       'os plural rules (undefined) fallback to ru (defined)'
+               );
+
+               $this->assertEquals(
+                       $cache->getItem( 'ru', 'compiledPluralRules' ),
+                       $cache->getItem( 'os', 'compiledPluralRules' ),
+                       'os compiled plural rules (undefined) fallback to ru (defined)'
+               );
+
+               $this->assertNotEquals(
+                       $cache->getItem( 'ksh', 'pluralRules' ),
+                       $cache->getItem( 'de', 'pluralRules' ),
+                       'ksh plural rules (defined) dont fallback to de (defined)'
+               );
+
+               $this->assertNotEquals(
+                       $cache->getItem( 'ksh', 'compiledPluralRules' ),
+                       $cache->getItem( 'de', 'compiledPluralRules' ),
+                       'ksh compiled plural rules (defined) dont fallback to de (defined)'
+               );
+       }
+}
index 1627c47..246b291 100644 (file)
@@ -12,6 +12,11 @@ class MWDebugTest extends MediaWikiTestCase {
                }
                /** Clear log before each test */
                MWDebug::clearLog();
+               wfSuppressWarnings();
+       }
+
+       function tearDown() {
+               wfRestoreWarnings();
        }
 
        function testAddLog() {
index c22a867..a2dc5c6 100644 (file)
@@ -3,6 +3,7 @@
 /**
  * @group FileRepo
  * @group FileBackend
+ * @group medium
  */
 class FileBackendTest extends MediaWikiTestCase {
        private $backend, $multiBackend;
@@ -882,6 +883,20 @@ class FileBackendTest extends MediaWikiTestCase {
                                "Correct file size of '$path'" );
                        $this->assertTrue( abs( time() - wfTimestamp( TS_UNIX, $time ) ) < 10,
                                "Correct file timestamp of '$path'" );
+
+                       $this->backend->clearCache( array( $path ) );
+
+                       $size = $this->backend->getFileSize( array( 'src' => $path ) );
+
+                       $this->assertEquals( strlen( $content ), $size,
+                               "Correct file size of '$path'" );
+
+                       $this->backend->preloadCache( array( $path ) );
+
+                       $size = $this->backend->getFileSize( array( 'src' => $path ) );
+
+                       $this->assertEquals( strlen( $content ), $size,
+                               "Correct file size of '$path'" );
                } else {
                        $size = $this->backend->getFileSize( array( 'src' => $path ) );
                        $time = $this->backend->getFileTimestamp( array( 'src' => $path ) );
index 6abceeb..3ab56af 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 /**
  * @group FileRepo
+ * @group medium
  */
 class StoreBatchTest extends MediaWikiTestCase {