Merge "[FileBackend] Tweaked various cache parameters and bumped tiny Swift auth...
authorBrion VIBBER <brion@wikimedia.org>
Thu, 26 Apr 2012 23:32:32 +0000 (23:32 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 26 Apr 2012 23:32:32 +0000 (23:32 +0000)
63 files changed:
RELEASE-NOTES-1.19
RELEASE-NOTES-1.20
docs/hooks.txt
includes/DefaultSettings.php
includes/EditPage.php
includes/Title.php
includes/WikiPage.php
includes/api/ApiBase.php
includes/api/ApiEditPage.php
includes/api/ApiEmailUser.php
includes/api/ApiProtect.php
includes/api/ApiQueryAllUsers.php
includes/cache/GenderCache.php
includes/cache/LinkBatch.php
includes/db/Database.php
includes/db/DatabaseError.php
includes/db/DatabaseIbm_db2.php
includes/db/DatabaseMssql.php
includes/db/DatabaseMysql.php
includes/db/DatabaseOracle.php
includes/db/DatabasePostgres.php
includes/db/DatabaseSqlite.php
includes/db/DatabaseUtility.php
includes/db/LBFactory.php
includes/db/LBFactory_Multi.php
includes/db/LBFactory_Single.php
includes/db/LoadBalancer.php
includes/db/LoadMonitor.php
includes/db/ORMResult.php
includes/db/ORMRow.php
includes/db/ORMTable.php
includes/filerepo/backend/FSFileBackend.php
includes/filerepo/backend/FileBackend.php
includes/filerepo/backend/FileBackendStore.php
includes/filerepo/backend/SwiftFileBackend.php
includes/filerepo/file/File.php
includes/resourceloader/ResourceLoaderWikiModule.php
includes/specials/SpecialCategories.php
includes/specials/SpecialEmailuser.php
languages/messages/MessagesAr.php
languages/messages/MessagesArc.php
languages/messages/MessagesEs.php
languages/messages/MessagesEt.php
languages/messages/MessagesFa.php
languages/messages/MessagesFi.php
languages/messages/MessagesGl.php
languages/messages/MessagesHu.php
languages/messages/MessagesHy.php
languages/messages/MessagesIa.php
languages/messages/MessagesIlo.php
languages/messages/MessagesIt.php
languages/messages/MessagesJa.php
languages/messages/MessagesMk.php
languages/messages/MessagesOs.php
languages/messages/MessagesRu.php
languages/messages/MessagesTa.php
languages/messages/MessagesUk.php
languages/messages/MessagesZh_hans.php
maintenance/backupTextPass.inc
maintenance/refreshLinks.php
tests/phpunit/includes/cache/GenderCacheTest.php [new file with mode: 0644]
tests/phpunit/includes/filerepo/FileBackendTest.php
tests/phpunit/phpunit.php

index 94f034c..c15ebff 100644 (file)
@@ -291,8 +291,6 @@ production.
   array.
 * (bug 29753) mw.util.tooltipAccessKeyPrefix should be alt-shift for Chrome
    on Windows
-* (bug 25095) Special:Categories should also include the first relevant item
-   when "from" is filled.
 * (bug 12262) Indents and lists are now aligned
 * (bug 34972) An error occurred while changing your watchlist settings for 
   [[Special:WhatLinksHere/Example]]
index ebf30ca..318768c 100644 (file)
@@ -44,6 +44,7 @@ production.
   $wgDebugLogFile['memcached'] to some filepath.
 * (bug 35685) api.php URL and other entry point URLs are now listed on
   Special:Version
+* Edit notices can now be translated.
 
 === Bug fixes in 1.20 ===
 * (bug 30245) Use the correct way to construct a log page title.
@@ -88,6 +89,7 @@ production.
 * (bug 33564) transwiki import sometimes result in invalid title.
 * (bug 35572) Blocks appear to succeed even if query fails due to wrong DB structure
 * (bug 31757) Add a word-separator between help-messages in HTMLForm
+* (bug 30410) Removed deprecated $wgFilterCallback and the 'filtered' API error.
 
 === API changes in 1.20 ===
 * (bug 34316) Add ability to retrieve maximum upload size from MediaWiki API.
index 1a9f41d..33db1c5 100644 (file)
@@ -904,6 +904,12 @@ $article: in case all revisions of the file are deleted a reference to the
 $user: user who performed the deletion
 $reason: reason
 
+'FileTransformed': When a file is transformed and moved into storage
+$file: reference to the File object
+$thumb: the MediaTransformOutput object
+$tmpThumbPath: The temporary file system path of the transformed file
+$thumbPath: The permanent storage path of the transformed file
+
 'FileUpload': When a file upload occurs
 $file : Image object representing the file that was uploaded
 $reupload : Boolean indicating if there was a previously another image there or not (since 1.17)
index 7c4db0d..d3c24ca 100644 (file)
@@ -3814,21 +3814,6 @@ $wgSpamRegex = array();
 /** Same as the above except for edit summaries */
 $wgSummarySpamRegex = array();
 
-/**
- * Similarly you can get a function to do the job. The function will be given
- * the following args:
- *   - a Title object for the article the edit is made on
- *   - the text submitted in the textarea (wpTextbox1)
- *   - the section number.
- * The return should be boolean indicating whether the edit matched some evilness:
- *  - true : block it
- *  - false : let it through
- *
- * @deprecated since 1.17 Use hooks. See SpamBlacklist extension.
- * @var $wgFilterCallback bool|string|Closure
- */
-$wgFilterCallback = false;
-
 /**
  * Whether to use DNS blacklists in $wgDnsBlacklistUrls to check for open proxies
  * @since 1.16
index 92bca9e..dce8d91 100644 (file)
@@ -36,11 +36,6 @@ class EditPage {
         */
        const AS_HOOK_ERROR                = 210;
 
-       /**
-        * Status: The filter function set in $wgFilterCallback returned true (= block it)
-        */
-       const AS_FILTERING                 = 211;
-
        /**
         * Status: A hook function returned an error
         */
@@ -990,7 +985,6 @@ class EditPage {
                                return true;
 
                        case self::AS_HOOK_ERROR:
-                       case self::AS_FILTERING:
                                return false;
 
                        case self::AS_SUCCESS_NEW_ARTICLE:
@@ -1062,8 +1056,7 @@ class EditPage {
         * AS_CONTENT_TOO_BIG and AS_BLOCKED_PAGE_FOR_USER. All that stuff needs to be cleaned up some time.
         */
        function internalAttemptSave( &$result, $bot = false ) {
-               global $wgFilterCallback, $wgUser, $wgRequest, $wgParser;
-               global $wgMaxArticleSize;
+               global $wgUser, $wgRequest, $wgParser, $wgMaxArticleSize;
 
                $status = Status::newGood();
 
@@ -1109,13 +1102,6 @@ class EditPage {
                        wfProfileOut( __METHOD__ );
                        return $status;
                }
-               if ( $wgFilterCallback && is_callable( $wgFilterCallback ) && $wgFilterCallback( $this->mTitle, $this->textbox1, $this->section, $this->hookError, $this->summary ) ) {
-                       # Error messages or other handling should be performed by the filter function
-                       $status->setResult( false, self::AS_FILTERING );
-                       wfProfileOut( __METHOD__ . '-checks' );
-                       wfProfileOut( __METHOD__ );
-                       return $status;
-               }
                if ( !wfRunHooks( 'EditFilter', array( $this, $this->textbox1, $this->section, &$this->hookError, $this->summary ) ) ) {
                        # Error messages etc. could be handled within the hook...
                        $status->fatal( 'hookaborted' );
@@ -1918,7 +1904,7 @@ class EditPage {
 
                # Optional notices on a per-namespace and per-page basis
                $editnotice_ns = 'editnotice-' . $this->mTitle->getNamespace();
-               $editnotice_ns_message = wfMessage( $editnotice_ns )->inContentLanguage();
+               $editnotice_ns_message = wfMessage( $editnotice_ns );
                if ( $editnotice_ns_message->exists() ) {
                        $wgOut->addWikiText( $editnotice_ns_message->plain() );
                }
@@ -1927,7 +1913,7 @@ class EditPage {
                        $editnotice_base = $editnotice_ns;
                        while ( count( $parts ) > 0 ) {
                                $editnotice_base .= '-' . array_shift( $parts );
-                               $editnotice_base_msg = wfMessage( $editnotice_base )->inContentLanguage();
+                               $editnotice_base_msg = wfMessage( $editnotice_base );
                                if ( $editnotice_base_msg->exists() ) {
                                        $wgOut->addWikiText( $editnotice_base_msg->plain() );
                                }
@@ -1935,7 +1921,7 @@ class EditPage {
                } else {
                        # Even if there are no subpages in namespace, we still don't want / in MW ns.
                        $editnoticeText = $editnotice_ns . '-' . str_replace( '/', '-', $this->mTitle->getDBkey() );
-                       $editnoticeMsg = wfMessage( $editnoticeText )->inContentLanguage();
+                       $editnoticeMsg = wfMessage( $editnoticeText );
                        if ( $editnoticeMsg->exists() ) {
                                $wgOut->addWikiText( $editnoticeMsg->plain() );
                        }
index 1876d75..6764f8f 100644 (file)
@@ -711,17 +711,9 @@ class Title {
                        }
                }
 
-               // Strip off subpages
-               $pagename = $this->getText();
-               if ( strpos( $pagename, '/' ) !== false ) {
-                       list( $username , ) = explode( '/', $pagename, 2 );
-               } else {
-                       $username = $pagename;
-               }
-
                if ( $wgContLang->needsGenderDistinction() &&
                                MWNamespace::hasGenderDistinction( $this->mNamespace ) ) {
-                       $gender = GenderCache::singleton()->getGenderOf( $username, __METHOD__ );
+                       $gender = GenderCache::singleton()->getGenderOf( $this->getText(), __METHOD__ );
                        return $wgContLang->getGenderNsText( $this->mNamespace, $gender );
                }
 
index 6cad466..2678f54 100644 (file)
@@ -121,11 +121,26 @@ class WikiPage extends Page {
         * @return WikiPage|null
         */
        public static function newFromID( $id ) {
-               $t = Title::newFromID( $id );
-               if ( $t ) {
-                       return self::factory( $t );
+               $dbr = wfGetDB( DB_SLAVE );
+               $row = $dbr->selectRow( 'page', self::selectFields(), array( 'page_id' => $id ), __METHOD__ );
+               if ( !$row ) {
+                       return null;
                }
-               return null;
+               return self::newFromRow( $row );
+       }
+
+       /**
+        * Constructor from a database row
+        *
+        * @since 1.20
+        * @param $row object: database row containing at least fields returned
+        *        by selectFields().
+        * @return WikiPage
+        */
+       public static function newFromRow( $row ) {
+               $page = self::factory( Title::newFromRow( $row ) );
+               $page->loadFromRow( $row );
+               return $page;
        }
 
        /**
@@ -256,6 +271,17 @@ class WikiPage extends Page {
                        }
                }
 
+               $this->loadFromRow( $data );
+       }
+
+       /**
+        * Load the object from a database row
+        *
+        * @since 1.20
+        * @param $data object: database row containing at least fields returned
+        *        by selectFields()
+        */
+       public function loadFromRow( $data ) {
                $lc = LinkCache::singleton();
 
                if ( $data ) {
index edd9aca..458214e 100644 (file)
@@ -1215,7 +1215,6 @@ abstract class ApiBase extends ContextSource {
                'noimageredirect-anon' => array( 'code' => 'noimageredirect-anon', 'info' => "Anonymous users can't create image redirects" ),
                'noimageredirect-logged' => array( 'code' => 'noimageredirect', 'info' => "You don't have permission to create image redirects" ),
                'spamdetected' => array( 'code' => 'spamdetected', 'info' => "Your edit was refused because it contained a spam fragment: \"\$1\"" ),
-               'filtered' => array( 'code' => 'filtered', 'info' => "The filter callback function refused your edit" ),
                'contenttoobig' => array( 'code' => 'contenttoobig', 'info' => "The content you supplied exceeds the article size limit of \$1 kilobytes" ),
                'noedit-anon' => array( 'code' => 'noedit-anon', 'info' => "Anonymous users can't edit pages" ),
                'noedit' => array( 'code' => 'noedit', 'info' => "You don't have permission to edit pages" ),
index 796b049..3153016 100644 (file)
@@ -291,9 +291,6 @@ class ApiEditPage extends ApiBase {
                        case EditPage::AS_SPAM_ERROR:
                                $this->dieUsageMsg( array( 'spamdetected', $result['spam'] ) );
 
-                       case EditPage::AS_FILTERING:
-                               $this->dieUsageMsg( 'filtered' );
-
                        case EditPage::AS_BLOCKED_PAGE_FOR_USER:
                                $this->dieUsageMsg( 'blockedtext' );
 
@@ -398,7 +395,6 @@ class ApiEditPage extends ApiBase {
                                array( 'noimageredirect-logged' ),
                                array( 'spamdetected', 'spam' ),
                                array( 'summaryrequired' ),
-                               array( 'filtered' ),
                                array( 'blockedtext' ),
                                array( 'contenttoobig', $wgMaxArticleSize ),
                                array( 'noedit-anon' ),
index d9eed60..0032bd8 100644 (file)
@@ -55,7 +55,7 @@ class ApiEmailUser extends ApiBase {
                        'Subject' => $params['subject'],
                        'CCMe' => $params['ccme'],
                );
-               $retval = SpecialEmailUser::submit( $data );
+               $retval = SpecialEmailUser::submit( $data, $this->getContext() );
 
                if ( $retval instanceof Status ) {
                        // SpecialEmailUser sometimes returns a status
index ec7b560..596bc5c 100644 (file)
@@ -44,11 +44,14 @@ class ApiProtect extends ApiBase {
                        if ( !$titleObj ) {
                                $this->dieUsageMsg( array( 'invalidtitle', $params['title'] ) );
                        }
+                       $pageObj = WikiPage::factory( $titleObj );
+                       $pageObj->loadPageData( 'fromdbmaster' );
                } elseif ( isset( $params['pageid'] ) ) {
-                       $titleObj = Title::newFromID( $params['pageid'] );
-                       if ( !$titleObj ) {
+                       $pageObj = WikiPage::newFromID( $params['pageid'] );
+                       if ( !$pageObj ) {
                                $this->dieUsageMsg( array( 'nosuchpageid', $params['pageid'] ) );
                        }
+                       $titleObj = $pageObj->getTitle();
                }
 
                $errors = $titleObj->getUserPermissionsErrors( 'protect', $this->getUser() );
@@ -115,7 +118,6 @@ class ApiProtect extends ApiBase {
                $watch = $params['watch'] ? 'watch' : $params['watchlist'];
                $this->setWatch( $watch, $titleObj );
 
-               $pageObj = WikiPage::factory( $titleObj );
                $status = $pageObj->doUpdateRestrictions( $protections, $expiryarray, $cascade, $params['reason'], $this->getUser() );
 
                if ( !$status->isOK() ) {
index ac112ef..e96676e 100644 (file)
@@ -34,6 +34,16 @@ class ApiQueryAllUsers extends ApiQueryBase {
                parent::__construct( $query, $moduleName, 'au' );
        }
 
+       /**
+        * This function converts the user name to a canonical form
+        * which is stored in the database.
+        * @param String $name
+        * @return String
+        */
+       private function getCanonicalUserName( $name ) {
+               return str_replace( '_', ' ', $name );
+       }
+
        public function execute() {
                $db = $this->getDB();
                $params = $this->extractRequestParams();
@@ -57,8 +67,8 @@ class ApiQueryAllUsers extends ApiQueryBase {
                $useIndex = true;
 
                $dir = ( $params['dir'] == 'descending' ? 'older' : 'newer' );
-               $from = is_null( $params['from'] ) ? null : $this->keyToTitle( $params['from'] );
-               $to = is_null( $params['to'] ) ? null : $this->keyToTitle( $params['to'] );
+               $from = is_null( $params['from'] ) ? null : $this->getCanonicalUserName( $params['from'] );
+               $to = is_null( $params['to'] ) ? null : $this->getCanonicalUserName( $params['to'] );
 
                # MySQL doesn't seem to use 'equality propagation' here, so like the
                # ActiveUsers special page, we have to use rc_user_text for some cases.
@@ -68,7 +78,7 @@ class ApiQueryAllUsers extends ApiQueryBase {
 
                if ( !is_null( $params['prefix'] ) ) {
                        $this->addWhere( $userFieldToSort .
-                               $db->buildLike( $this->keyToTitle( $params['prefix'] ), $db->anyString() ) );
+                               $db->buildLike( $this->getCanonicalUserName( $params['prefix'] ), $db->anyString() ) );
                }
 
                if ( !is_null( $params['rights'] ) ) {
@@ -190,15 +200,14 @@ class ApiQueryAllUsers extends ApiQueryBase {
                                        $lastUserData = null;
 
                                        if ( !$fit ) {
-                                               $this->setContinueEnumParameter( 'from',
-                                                               $this->keyToTitle( $lastUserData['name'] ) );
+                                               $this->setContinueEnumParameter( 'from', $lastUserData['name'] );
                                                break;
                                        }
                                }
 
                                if ( $count > $limit ) {
                                        // We've reached the one extra which shows that there are additional pages to be had. Stop here...
-                                       $this->setContinueEnumParameter( 'from', $this->keyToTitle( $row->user_name ) );
+                                       $this->setContinueEnumParameter( 'from', $row->user_name );
                                        break;
                                }
 
@@ -235,17 +244,23 @@ class ApiQueryAllUsers extends ApiQueryBase {
                                        'MediaWiki configuration error: the database contains more user groups than known to User::getAllGroups() function' );
                        }
 
-                       $lastUserObj = User::newFromName( $lastUser );
+                       $lastUserObj = User::newFromId( $row->user_id );
 
                        // Add user's group info
                        if ( $fld_groups ) {
-                               if ( !isset( $lastUserData['groups'] ) && $lastUserObj ) {
-                                       $lastUserData['groups'] = ApiQueryUsers::getAutoGroups( $lastUserObj );
+                               if ( !isset( $lastUserData['groups'] ) ) {
+                                       if ( $lastUserObj ) {
+                                               $lastUserData['groups'] = ApiQueryUsers::getAutoGroups( $lastUserObj );
+                                       } else {
+                                               // This should not normally happen
+                                               $lastUserData['groups'] = array();
+                                       }
                                }
 
                                if ( !is_null( $row->ug_group2 ) ) {
                                        $lastUserData['groups'][] = $row->ug_group2;
                                }
+
                                $result->setIndexedTagName( $lastUserData['groups'], 'g' );
                        }
 
@@ -254,13 +269,20 @@ class ApiQueryAllUsers extends ApiQueryBase {
                                $result->setIndexedTagName( $lastUserData['implicitgroups'], 'g' );
                        }
                        if ( $fld_rights ) {
-                               if ( !isset( $lastUserData['rights'] ) && $lastUserObj ) {
-                                       $lastUserData['rights'] =  User::getGroupPermissions( $lastUserObj->getAutomaticGroups() );
+                               if ( !isset( $lastUserData['rights'] ) ) {
+                                       if ( $lastUserObj ) {
+                                               $lastUserData['rights'] =  User::getGroupPermissions( $lastUserObj->getAutomaticGroups() );
+                                       } else {
+                                               // This should not normally happen
+                                               $lastUserData['rights'] = array();
+                                       }
                                }
+
                                if ( !is_null( $row->ug_group2 ) ) {
                                        $lastUserData['rights'] = array_unique( array_merge( $lastUserData['rights'],
                                                User::getGroupPermissions( array( $row->ug_group2 ) ) ) );
                                }
+
                                $result->setIndexedTagName( $lastUserData['rights'], 'r' );
                        }
                }
@@ -269,8 +291,7 @@ class ApiQueryAllUsers extends ApiQueryBase {
                        $fit = $result->addValue( array( 'query', $this->getModuleName() ),
                                null, $lastUserData );
                        if ( !$fit ) {
-                               $this->setContinueEnumParameter( 'from',
-                                       $this->keyToTitle( $lastUserData['name'] ) );
+                               $this->setContinueEnumParameter( 'from', $lastUserData['name'] );
                        }
                }
 
index 2cc1061..c27ab00 100644 (file)
@@ -48,7 +48,7 @@ class GenderCache {
                        $username = $username->getName();
                }
 
-               $username = strtr( $username, '_', ' ' );
+               $username = self::normalizeUsername( $username );
                if ( !isset( $this->cache[$username] ) ) {
 
                        if ( $this->misses >= $this->missLimit && $wgUser->getName() !== $username ) {
@@ -60,11 +60,7 @@ class GenderCache {
 
                        } else {
                                $this->misses++;
-                               if ( !User::isValidUserName( $username ) ) {
-                                       $this->cache[$username] = $this->getDefault();
-                               } else {
-                                       $this->doQuery( $username, $caller );
-                               }
+                               $this->doQuery( $username, $caller );
                        }
 
                }
@@ -86,7 +82,6 @@ class GenderCache {
                foreach ( $data as $ns => $pagenames ) {
                        if ( !MWNamespace::hasGenderDistinction( $ns ) ) continue;
                        foreach ( array_keys( $pagenames ) as $username ) {
-                               if ( isset( $this->cache[$username] ) ) continue;
                                $users[$username] = true;
                        }
                }
@@ -102,26 +97,28 @@ class GenderCache {
        public function doQuery( $users, $caller = '' ) {
                $default = $this->getDefault();
 
-               foreach ( (array) $users as $index => $value ) {
-                       $name = strtr( $value, '_', ' ' );
-                       if ( isset( $this->cache[$name] ) ) {
-                               // Skip users whose gender setting we already know
-                               unset( $users[$index] );
-                       } else {
-                               $users[$index] = $name;
+               $usersToCheck = array();
+               foreach ( (array) $users as $value ) {
+                       $name = self::normalizeUsername( $value );
+                       // Skip users whose gender setting we already know
+                       if ( !isset( $this->cache[$name] ) ) {
                                // For existing users, this value will be overwritten by the correct value
                                $this->cache[$name] = $default;
+                               // query only for valid names, which can be in the database
+                               if( User::isValidUserName( $name ) ) {
+                                       $usersToCheck[] = $name;
+                               }
                        }
                }
 
-               if ( count( $users ) === 0 ) {
+               if ( count( $usersToCheck ) === 0 ) {
                        return;
                }
 
                $dbr = wfGetDB( DB_SLAVE );
                $table = array( 'user', 'user_properties' );
                $fields = array( 'user_name', 'up_value' );
-               $conds = array( 'user_name' => $users );
+               $conds = array( 'user_name' => $usersToCheck );
                $joins = array( 'user_properties' =>
                        array( 'LEFT JOIN', array( 'user_id = up_user', 'up_property' => 'gender' ) ) );
 
@@ -129,11 +126,20 @@ class GenderCache {
                if ( strval( $caller ) !== '' ) {
                        $comment .= "/$caller";
                }
-               $res = $dbr->select( $table, $fields, $conds, $comment, $joins, $joins );
+               $res = $dbr->select( $table, $fields, $conds, $comment, array(), $joins );
 
                foreach ( $res as $row ) {
                        $this->cache[$row->user_name] = $row->up_value ? $row->up_value : $default;
                }
        }
 
+       private static function normalizeUsername( $username ) {
+               // Strip off subpages
+               $indexSlash = strpos( $username, '/' );
+               if ( $indexSlash !== false ) {
+                       $username = substr( $username, 0, $indexSlash );
+               }
+               // normalize underscore/spaces
+               return strtr( $username, '_', ' ' );
+       }
 }
index 29fde03..ab33dcf 100644 (file)
@@ -195,7 +195,7 @@ class LinkBatch {
                }
 
                $genderCache = GenderCache::singleton();
-               $genderCache->dolinkBatch( $this->data, $this->caller );
+               $genderCache->doLinkBatch( $this->data, $this->caller );
                return true;
        }
 
index 5c03617..84ed9f4 100644 (file)
@@ -2,10 +2,26 @@
 /**
  * @defgroup Database Database
  *
+ * This file deals with database interface functions
+ * and query specifics/optimisations.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
  * @file
  * @ingroup Database
- * This file deals with database interface functions
- * and query specifics/optimisations
  */
 
 /** Number of times to re-try an operation in case of deadlock */
index 836d781..6aed05c 100644 (file)
@@ -1,4 +1,25 @@
 <?php
+/**
+ * This file contains database error classes.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Database
+ */
 
 /**
  * Database error base class
index c9c311d..5df6456 100644 (file)
@@ -2,7 +2,22 @@
 /**
  * This is the IBM DB2 database abstraction layer.
  * See maintenance/ibm_db2/README for development notes
- * and other specific information
+ * and other specific information.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
  *
  * @file
  * @ingroup Database
index 61963b6..7a75e1e 100644 (file)
@@ -2,6 +2,21 @@
 /**
  * This is the MS SQL Server Native database abstraction layer.
  *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
  * @file
  * @ingroup Database
  * @author Joel Penner <a-joelpe at microsoft dot com>
index 4fce0a5..c334c38 100644 (file)
@@ -2,6 +2,21 @@
 /**
  * This is the MySQL database abstraction layer.
  *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
  * @file
  * @ingroup Database
  */
index 58cb28b..8ce6e70 100644 (file)
@@ -2,6 +2,21 @@
 /**
  * This is the Oracle database abstraction layer.
  *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
  * @file
  * @ingroup Database
  */
index a11b173..d058769 100644 (file)
@@ -2,6 +2,21 @@
 /**
  * This is the Postgres database abstraction layer.
  *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
  * @file
  * @ingroup Database
  */
index dc086b4..15d1ad0 100644 (file)
@@ -3,6 +3,21 @@
  * This is the SQLite database abstraction layer.
  * See maintenance/sqlite/README for development notes and other specific information
  *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
  * @file
  * @ingroup Database
  */
index 0ea713c..eacebcf 100644 (file)
@@ -1,4 +1,26 @@
 <?php
+/**
+ * This file contains database-related utiliy classes.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Database
+ */
+
 /**
  * Utility class.
  * @ingroup Database
index dec6ae1..aaca12c 100644 (file)
@@ -1,6 +1,21 @@
 <?php
 /**
- * Generator of database load balancing objects
+ * Generator of database load balancing objects.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
  *
  * @file
  * @ingroup Database
index b7977a2..6008813 100644 (file)
@@ -1,6 +1,21 @@
 <?php
 /**
- * Advanced generator of database load balancing objects for wiki farms
+ * Advanced generator of database load balancing objects for wiki farms.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
  *
  * @file
  * @ingroup Database
index f80aa4b..4b165b2 100644 (file)
@@ -1,4 +1,25 @@
 <?php
+/**
+ * Simple generator of database connections that always returns the same object.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Database
+ */
 
 /**
  * An LBFactory class that always returns a single database object.
index db348e8..c40ac0c 100644 (file)
@@ -1,6 +1,21 @@
 <?php
 /**
- * Database load balancing
+ * Database load balancing.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
  *
  * @file
  * @ingroup Database
index 16a0343..146ac61 100644 (file)
@@ -1,6 +1,21 @@
 <?php
 /**
- * Database load monitoring
+ * Database load monitoring.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
  *
  * @file
  * @ingroup Database
index bed8809..31e0c19 100644 (file)
@@ -1,8 +1,22 @@
 <?php
-
 /**
  * Result of a ORMTable::select, which returns ORMRow objects.
  *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
  * @since 1.20
  *
  * @file ORMResult.php
@@ -10,6 +24,7 @@
  * @licence GNU GPL v2 or later
  * @author Jeroen De Dauw < jeroendedauw@gmail.com >
  */
+
 class ORMResult implements Iterator {
 
        /**
index 4ac41cc..d3a97db 100644 (file)
@@ -1,11 +1,25 @@
 <?php
-
 /**
  * Abstract base class for representing objects that are stored in some DB table.
  * This is basically an ORM-like wrapper around rows in database tables that
  * aims to be both simple and very flexible. It is centered around an associative
  * array of fields and various methods to do common interaction with the database.
  *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
  * These methods are likely candidates for overriding:
  * * getDefaults
  * * remove
@@ -37,6 +51,7 @@
  * @licence GNU GPL v2 or later
  * @author Jeroen De Dauw < jeroendedauw@gmail.com >
  */
+
 abstract class ORMRow {
 
        /**
index 651eadd..2f02c6b 100644 (file)
@@ -1,8 +1,22 @@
 <?php
-
 /**
  * Abstract base class for representing a single database table.
  *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
  * @since 1.20
  *
  * @file ORMTable.php
@@ -10,6 +24,7 @@
  * @licence GNU GPL v2 or later
  * @author Jeroen De Dauw < jeroendedauw@gmail.com >
  */
+
 abstract class ORMTable {
 
        /**
index df822fd..9839fa1 100644 (file)
@@ -534,6 +534,14 @@ class FSFileBackend extends FileBackendStore {
                return $tmpFile;
        }
 
+       /**
+        * @see FileBackendStore::directoriesAreVirtual()
+        * @return bool
+        */
+       protected function directoriesAreVirtual() {
+               return false;
+       }
+
        /**
         * Chmod a file, suppressing the warnings
         *
index f3b879a..52baf1e 100644 (file)
@@ -383,7 +383,8 @@ abstract class FileBackend {
         * is that of an empty container, in which case it should be deleted.
         *
         * $params include:
-        *     dir : storage directory
+        *     dir       : storage directory
+        *     recursive : recursively delete empty subdirectories first (@since 1.20)
         *
         * @param $params Array
         * @return Status
index 6af6480..803f966 100644 (file)
@@ -19,6 +19,9 @@
  * @since 1.19
  */
 abstract class FileBackendStore extends FileBackend {
+       /** @var BagOStuff */
+       protected $memCache;
+
        /** @var Array Map of paths to small (RAM/disk) cache items */
        protected $cache = array(); // (storage path => key => value)
        protected $maxCacheSize = 300; // integer; max paths with entries
@@ -31,6 +34,16 @@ abstract class FileBackendStore extends FileBackend {
 
        protected $maxFileSize = 4294967296; // integer bytes (4GiB)
 
+       /**
+        * @see FileBackend::__construct()
+        *
+        * @param $config Array
+        */
+       public function __construct( array $config ) {
+               parent::__construct( $config );
+               $this->memCache = new EmptyBagOStuff(); // disabled by default
+       }
+
        /**
         * Get the maximum allowable file size given backend
         * medium restrictions and basic performance constraints.
@@ -371,6 +384,17 @@ abstract class FileBackendStore extends FileBackend {
                wfProfileIn( __METHOD__ . '-' . $this->name );
                $status = Status::newGood();
 
+               // Recursive: first delete all empty subdirs recursively
+               if ( !empty( $params['recursive'] ) && !$this->directoriesAreVirtual() ) {
+                       $subDirsRel = $this->getTopDirectoryList( array( 'dir' => $params['dir'] ) );
+                       if ( $subDirsRel !== null ) { // no errors
+                               foreach ( $subDirsRel as $subDirRel ) {
+                                       $subDir = $params['dir'] . "/{$subDirRel}"; // full path
+                                       $status->merge( $this->doClean( array( 'dir' => $subDir ) + $params ) );
+                               }
+                       }
+               }
+
                list( $fullCont, $dir, $shard ) = $this->resolveStoragePath( $params['dir'] );
                if ( $dir === null ) {
                        $status->fatal( 'backend-fail-invalidpath', $params['dir'] );
@@ -390,11 +414,13 @@ abstract class FileBackendStore extends FileBackend {
 
                if ( $shard !== null ) { // confined to a single container/shard
                        $status->merge( $this->doCleanInternal( $fullCont, $dir, $params ) );
+                       $this->deleteContainerCache( $fullCont ); // purge cache
                } else { // directory is on several shards
                        wfDebug( __METHOD__ . ": iterating over all container shards.\n" );
                        list( $b, $shortCont, $r ) = self::splitStoragePath( $params['dir'] );
                        foreach ( $this->getContainerSuffixes( $shortCont ) as $suffix ) {
                                $status->merge( $this->doCleanInternal( "{$fullCont}{$suffix}", $dir, $params ) );
+                               $this->deleteContainerCache( "{$fullCont}{$suffix}" ); // purge cache
                        }
                }
 
@@ -846,9 +872,12 @@ abstract class FileBackendStore extends FileBackend {
                        }
                }
 
-               // Clear any cache entries (after locks acquired)
+               // Clear any file cache entries (after locks acquired)
                $this->clearCache();
 
+               // Load from the persistent container cache
+               $this->primeContainerCache( $performOps );
+
                // Actually attempt the operation batch...
                $subStatus = FileOp::attemptBatch( $performOps, $opts, $this->fileJournal );
 
@@ -891,6 +920,15 @@ abstract class FileBackendStore extends FileBackend {
         */
        protected function doClearCache( array $paths = null ) {}
 
+       /**
+        * Is this a key/value store where directories are just virtual?
+        * Virtual directories exists in so much as files exists that are
+        * prefixed with the directory path followed by a forward slash.
+        *
+        * @return bool
+        */
+       abstract protected function directoriesAreVirtual();
+
        /**
         * Move a cache entry to the top (such as when accessed)
         *
@@ -1140,6 +1178,87 @@ abstract class FileBackendStore extends FileBackend {
        protected function resolveContainerPath( $container, $relStoragePath ) {
                return $relStoragePath;
        }
+
+       /**
+        * Get the cache key for a container
+        *
+        * @param $container Resolved container name
+        * @return string
+        */
+       private function containerCacheKey( $container ) {
+               return wfMemcKey( 'backend', $this->getName(), 'container', $container );
+       }
+
+       /**
+        * Set the cached info for a container
+        *
+        * @param $container Resolved container name
+        * @param $val mixed Information to cache
+        * @return void
+        */
+       final protected function setContainerCache( $container, $val ) {
+               $this->memCache->set( $this->containerCacheKey( $container ), $val, 7*86400 );
+       }
+
+       /**
+        * Delete the cached info for a container
+        *
+        * @param $container Resolved container name
+        * @return void
+        */
+       final protected function deleteContainerCache( $container ) {
+               $this->memCache->delete( $this->containerCacheKey( $container ) );
+       }
+
+       /**
+        * Do a batch lookup from cache for container stats for all containers
+        * used in a list of container names, storage paths, or FileOp objects.
+        *
+        * @param $items Array List of storage paths or FileOps
+        * @return void
+        */
+       final protected function primeContainerCache( array $items ) {
+               $paths = array(); // list of storage paths
+               $contNames = array(); // (cache key => resolved container name)
+               // Get all the paths/containers from the items...
+               foreach ( $items as $item ) {
+                       if ( $item instanceof FileOp ) {
+                               $paths = array_merge( $paths, $item->storagePathsRead() );
+                               $paths = array_merge( $paths, $item->storagePathsChanged() );
+                       } elseif ( self::isStoragePath( $item ) ) {
+                               $paths[] = $item;
+                       } elseif ( is_string( $item ) ) { // full container name
+                               $contNames[$this->containerCacheKey( $item )] = $item;
+                       }
+               }
+               // Get all the corresponding cache keys for paths...
+               foreach ( $paths as $path ) {
+                       list( $fullCont, $r, $s ) = $this->resolveStoragePath( $path );
+                       if ( $fullCont !== null ) { // valid path for this backend
+                               $contNames[$this->containerCacheKey( $fullCont )] = $fullCont;
+                       }
+               }
+
+               $contInfo = array(); // (resolved container name => cache value)
+               // Get all cache entries for these container cache keys...
+               $values = $this->memCache->getBatch( array_keys( $contNames ) );
+               foreach ( $values as $cacheKey => $val ) {
+                       $contInfo[$contNames[$cacheKey]] = $val;
+               }
+
+               // Populate the container process cache for the backend...
+               $this->doPrimeContainerCache( array_filter( $contInfo, 'is_array' ) );
+       }
+
+       /**
+        * Fill the backend-specific process cache given an array of
+        * resolved container names and their corresponding cached info.
+        * Only containers that actually exist should appear in the map.
+        *
+        * @param $containerInfo Array Map of resolved container names to cached info
+        * @return void
+        */
+       protected function doPrimeContainerCache( array $containerInfo ) {}
 }
 
 /**
index 10faeb2..435931c 100644 (file)
@@ -64,6 +64,8 @@ class SwiftFileBackend extends FileBackendStore {
                $this->shardViaHashLevels = isset( $config['shardViaHashLevels'] )
                        ? $config['shardViaHashLevels']
                        : '';
+               // Cache container info to mask latency
+               $this->memCache = wfGetMainCache();
        }
 
        /**
@@ -770,6 +772,14 @@ class SwiftFileBackend extends FileBackendStore {
                return $tmpFile;
        }
 
+       /**
+        * @see FileBackendStore::directoriesAreVirtual()
+        * @return bool
+        */
+       protected function directoriesAreVirtual() {
+               return true;
+       }
+
        /**
         * Get headers to send to Swift when reading a file based
         * on a FileBackend params array, e.g. that of getLocalCopy().
@@ -856,23 +866,30 @@ class SwiftFileBackend extends FileBackendStore {
         * Use $reCache if the file count or byte count is needed.
         *
         * @param $container string Container name
-        * @param $reCache bool Refresh the process cache
+        * @param $bypassCache bool Bypass all caches and load from Swift
         * @return CF_Container
+        * @throws InvalidResponseException
         */
-       protected function getContainer( $container, $reCache = false ) {
+       protected function getContainer( $container, $bypassCache = false ) {
                $conn = $this->getConnection(); // Swift proxy connection
-               if ( $reCache ) {
-                       unset( $this->connContainers[$container] ); // purge cache
+               if ( $bypassCache ) { // purge cache
+                       unset( $this->connContainers[$container] );
+               } elseif ( !isset( $this->connContainers[$container] ) ) {
+                       $this->primeContainerCache( array( $container ) ); // check persistent cache
                }
                if ( !isset( $this->connContainers[$container] ) ) {
                        $contObj = $conn->get_container( $container );
                        // NoSuchContainerException not thrown: container must exist
                        if ( count( $this->connContainers ) >= $this->maxContCacheSize ) { // trim cache?
                                reset( $this->connContainers );
-                               $key = key( $this->connContainers );
-                               unset( $this->connContainers[$key] );
+                               unset( $this->connContainers[key( $this->connContainers )] );
                        }
                        $this->connContainers[$container] = $contObj; // cache it
+                       if ( !$bypassCache ) {
+                               $this->setContainerCache( $container, // update persistent cache
+                                       array( 'bytes' => $contObj->bytes_used, 'count' => $contObj->object_count )
+                               );
+                       }
                }
                return $this->connContainers[$container];
        }
@@ -882,6 +899,7 @@ class SwiftFileBackend extends FileBackendStore {
         *
         * @param $container string Container name
         * @return CF_Container
+        * @throws InvalidResponseException
         */
        protected function createContainer( $container ) {
                $conn = $this->getConnection(); // Swift proxy connection
@@ -895,6 +913,7 @@ class SwiftFileBackend extends FileBackendStore {
         *
         * @param $container string Container name
         * @return void
+        * @throws InvalidResponseException
         */
        protected function deleteContainer( $container ) {
                $conn = $this->getConnection(); // Swift proxy connection
@@ -902,6 +921,28 @@ class SwiftFileBackend extends FileBackendStore {
                unset( $this->connContainers[$container] ); // purge cache
        }
 
+       /**
+        * @see FileBackendStore::doPrimeContainerCache()
+        * @return void
+        */
+       protected function doPrimeContainerCache( array $containerInfo ) {
+               try {
+                       $conn = $this->getConnection(); // Swift proxy connection
+                       foreach ( $containerInfo as $container => $info ) {
+                               $this->connContainers[$container] = new CF_Container(
+                                       $conn->cfs_auth,
+                                       $conn->cfs_http,
+                                       $container,
+                                       $info['count'],
+                                       $info['bytes']
+                               );
+                       }
+               } catch ( InvalidResponseException $e ) {
+               } catch ( Exception $e ) { // some other exception?
+                       $this->logException( $e, __METHOD__, array() );
+               }
+       }
+
        /**
         * Log an unexpected exception for this backend
         *
index 461c255..d32a0e3 100644 (file)
@@ -878,6 +878,8 @@ abstract class File {
                                } else {
                                        $thumb = $this->transformErrorOutput( $thumbPath, $thumbUrl, $params, $flags );
                                }
+                               // Give extensions a chance to do something with this thumbnail...
+                               wfRunHooks( 'FileTransformed', array( $this, $thumb, $tmpThumbPath, $thumbPath ) );
                        }
 
                        // Purge. Useful in the event of Core -> Squid connection failure or squid
index 91a51f8..8dddb5b 100644 (file)
@@ -70,8 +70,10 @@ abstract class ResourceLoaderWikiModule extends ResourceLoaderModule {
         */
        protected function getContent( $title ) {
                if ( $title->getNamespace() === NS_MEDIAWIKI ) {
-                       $message = wfMessage( $title->getDBkey() )->inContentLanguage();
-                       return $message->exists() ? $message->plain() : '';
+                       // The first "true" is to use the database, the second is to use the content langue
+                       // and the last one is to specify the message key already contains the language in it ("/de", etc.)
+                       $text = MessageCache::singleton()->get( $title->getDBkey(), true, true, true );
+                       return $text === false ? '' : $text;
                }
                if ( !$title->isCssJsSubpage() && !$title->isCssOrJsPage() ) {
                        return null;
index 338cd70..6d2831c 100644 (file)
@@ -59,16 +59,12 @@ class SpecialCategories extends SpecialPage {
  * @ingroup SpecialPage Pager
  */
 class CategoryPager extends AlphabeticPager {
-       private $conds = array( 'cat_pages > 0' );
-
        function __construct( IContextSource $context, $from ) {
                parent::__construct( $context );
                $from = str_replace( ' ', '_', $from );
                if( $from !== '' ) {
                        $from = Title::capitalize( $from, NS_CATEGORY );
-                       $dbr = wfGetDB( DB_SLAVE );
-                       $this->conds[] = 'cat_title >= ' . $dbr->addQuotes( $from );
-                       $this->setOffset( '' );
+                       $this->mOffset = $from;
                }
        }
 
@@ -76,7 +72,7 @@ class CategoryPager extends AlphabeticPager {
                return array(
                        'tables' => array( 'category' ),
                        'fields' => array( 'cat_title','cat_pages' ),
-                       'conds' => $this->conds,
+                       'conds' => array( 'cat_pages > 0' ),
                        'options' => array( 'USE INDEX' => 'cat_title' ),
                );
        }
index 314da72..55b500d 100644 (file)
@@ -61,7 +61,8 @@ class SpecialEmailUser extends UnlistedSpecialPage {
                        ),
                        'Subject' => array(
                                'type' => 'text',
-                               'default' => wfMsgExt( 'defemailsubject', array( 'content', 'parsemag' ), $this->getUser()->getName() ),
+                               'default' => $this->msg( 'defemailsubject',
+                                       $this->getUser()->getName() )->inContentLanguage()->text(),
                                'label-message' => 'emailsubject',
                                'maxlength' => 200,
                                'size' => 60,
@@ -124,11 +125,11 @@ class SpecialEmailUser extends UnlistedSpecialPage {
                $this->mTargetObj = $ret;
 
                $form = new HTMLForm( $this->getFormFields(), $this->getContext() );
-               $form->addPreText( wfMsgExt( 'emailpagetext', 'parseinline' ) );
-               $form->setSubmitText( wfMsg( 'emailsend' ) );
+               $form->addPreText( $this->msg( 'emailpagetext' )->parse() );
+               $form->setSubmitTextMsg( 'emailsend' );
                $form->setTitle( $this->getTitle() );
-               $form->setSubmitCallback( array( __CLASS__, 'submit' ) );
-               $form->setWrapperLegend( wfMsgExt( 'email-legend', 'parsemag' ) );
+               $form->setSubmitCallback( array( __CLASS__, 'uiSubmit' ) );
+               $form->setWrapperLegendMsg( 'email-legend' );
                $form->loadData();
 
                if( !wfRunHooks( 'EmailUserForm', array( &$form ) ) ) {
@@ -224,14 +225,26 @@ class SpecialEmailUser extends UnlistedSpecialPage {
                $string = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'id' => 'askusername' ) ) .
                        Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) .
                        Xml::openElement( 'fieldset' ) .
-                       Html::rawElement( 'legend', null, wfMessage( 'emailtarget' )->parse() ) .
-                       Xml::inputLabel( wfMessage( 'emailusername' )->text(), 'target', 'emailusertarget', 30, $name ) . ' ' .
-                       Xml::submitButton( wfMessage( 'emailusernamesubmit' )->text() ) .
+                       Html::rawElement( 'legend', null, $this->msg( 'emailtarget' )->parse() ) .
+                       Xml::inputLabel( $this->msg( 'emailusername' )->text(), 'target', 'emailusertarget', 30, $name ) . ' ' .
+                       Xml::submitButton( $this->msg( 'emailusernamesubmit' )->text() ) .
                        Xml::closeElement( 'fieldset' ) .
                        Xml::closeElement( 'form' ) . "\n";
                return $string;
        }
 
+       /**
+        * Submit callback for an HTMLForm object, will simply call submit().
+        *
+        * @since 1.20
+        * @param $data array
+        * @param $form HTMLForm object
+        * @return Status|string|bool
+        */
+       public static function uiSubmit( array $data, HTMLForm $form ) {
+               return self::submit( $data, $form->getContext() );
+       }
+
        /**
         * Really send a mail. Permissions should have been checked using
         * getPermissionsError(). It is probably also a good
@@ -240,25 +253,22 @@ class SpecialEmailUser extends UnlistedSpecialPage {
         * @return Mixed: Status object, or potentially a String on error
         * or maybe even true on success if anything uses the EmailUser hook.
         */
-       public static function submit( $data ) {
+       public static function submit( array $data, IContextSource $context ) {
                global $wgUser, $wgUserEmailUseReplyTo;
 
                $target = self::getTarget( $data['Target'] );
                if( !$target instanceof User ) {
-                       return wfMsgExt( $target . 'text', 'parse' );
+                       return $context->msg( $target . 'text' )->parseAsBlock();
                }
                $to = new MailAddress( $target );
-               $from = new MailAddress( $wgUser );
+               $from = new MailAddress( $context->getUser() );
                $subject = $data['Subject'];
                $text = $data['Text'];
 
                // Add a standard footer and trim up trailing newlines
                $text = rtrim( $text ) . "\n\n-- \n";
-               $text .= wfMsgExt(
-                       'emailuserfooter',
-                       array( 'content', 'parsemag' ),
-                       array( $from->name, $to->name )
-               );
+               $text .= $context->msg( 'emailuserfooter',
+                       $from->name, $to->name )->inContentLanguage()->text();
 
                $error = '';
                if( !wfRunHooks( 'EmailUser', array( &$to, &$from, &$subject, &$text, &$error ) ) ) {
@@ -302,11 +312,8 @@ class SpecialEmailUser extends UnlistedSpecialPage {
                        // unless they are emailing themselves, in which case one
                        // copy of the message is sufficient.
                        if ( $data['CCMe'] && $to != $from ) {
-                               $cc_subject = wfMsg(
-                                       'emailccsubject',
-                                       $target->getName(),
-                                       $subject
-                               );
+                               $cc_subject = $context->msg( 'emailccsubject' )->rawParams(
+                                       $target->getName(), $subject )->text();
                                wfRunHooks( 'EmailUserCC', array( &$from, &$from, &$cc_subject, &$text ) );
                                $ccStatus = UserMailer::send( $from, $from, $cc_subject, $text );
                                $status->merge( $ccStatus );
index 7d3ddc4..665121f 100644 (file)
@@ -1159,6 +1159,7 @@ $2
 هذا يحدث أحيانا عندما تستخدم خدمة بروكسي مجهول معيبة مبنية على الوب.'''",
 'edit_form_incomplete' => "'''بعض أجزاء من نموذج التعديل لم تصل إلى الخادم؛ تأكد من أن تعديلاتك لم تمس وحاول مجددا.'''",
 'editing' => 'تحرير $1',
+'creating' => 'إنشاء $1',
 'editingsection' => 'تحرير $1 (قسم)',
 'editingcomment' => 'تعديل $1 (قسم جديد)',
 'editconflict' => 'تضارب في التحرير: $1',
index 50d44a8..f0a812d 100644 (file)
@@ -351,10 +351,13 @@ $1',
 'internalerror' => 'ܦܘܕܐ ܓܘܝܐ',
 'internalerror_info' => 'ܦܘܕܐ ܓܘܝܐ: $1',
 'badtitle' => 'ܟܘܢܝܐ ܠܐ ܛܒܐ',
+'perfcached' => 'ܓܠܝܬ̈ܐ ܗܠܝܢ ܐܣܢܝܢ ܐܢܘܢ ܘܡܬܡܨܝܢܬܐ ܐܝܬܝܗܝ ܕܠܐ ܢܗܘܢ ܚܘ̈ܕܬܐ. ܡܬܚܐ ܥܠܝܐ ܕ {{PLURAL:$1|ܚܕ ܦܠܛܐ|$1 ܦܠܛ̈ܐ}} ܐܝܬ ܒܐܣܢܐ.',
+'perfcachedts' => 'ܓܠܝܬ̈ܐ ܗܠܝܢ ܐܣܢܝܢ ܐܢܘܢ ܘܚܘܕܬܐ ܐܚܪܝܐ ܗܘܐ ܒ $1. ܡܬܚܐ ܥܠܝܐ ܕ {{PLURAL:$4|ܚܕ ܦܠܛܐ|$4 ܦܠܛ̈ܐ}} ܐܝܬ ܒܐܣܢܐ.',
 'viewsource' => 'ܚܙܝ ܡܒܘܥܐ',
-'actionthrottled' => 'ܠܐ ܘܪܕ ܠܡܥܒܕ ܝܬܝܪ ܡܢ ܐܗܐ ܥܒܕܐ',
-'viewsourcetext' => 'ܡܨܐ ܐܢܬ ܠܚܙܝܐ ܘܢܣܚܐ ܠܡܒܘܥ̈ܐ ܕܐܗܐ ܦܐܬܐ:',
-'protectedinterface' => 'ܐܗܐ ܦܐܬܐ ܡܘܬܪܐ ܟܬܝܒܬܐ ܕܦܐܬܐ ܠܚܘܪܙܐ, ܘܐܝܠܗ ܢܛܪܬܐ ܠܡܘܢܥܐ ܚܪܒܐ.',
+'viewsource-title' => 'ܚܙܝ ܡܒܘܥܐ ܕ $1',
+'actionthrottled' => 'ܠܐ ܡܬܡܨܝܢܬܐ ܐܝܬܝܗܝ ܠܡܥܒܕ ܝܬܝܪ ܡܢ ܗܢܐ ܥܒܕܐ',
+'viewsourcetext' => 'ܡܨܐ ܐܢܬ ܕܢܚܙܐ ܘܢܣܚܐ ܠܡܒܘ̈ܥܐ ܕܗܕܐ ܦܐܬܐ:',
+'protectedinterface' => 'ܗܕܐ ܦܐܬܐ ܡܘܬܪܐ ܟܬܝܒܬܐ ܕܦܐܬܐ ܠܚܘܪܙܐ, ܘܐܝܬܝܗܝ ܢܛܪܬܐ ܠܡܘܢܥ ܚܘܒܠܐ.',
 'editinginterface' => "''ܙܘܗܪܐ:''' ܐܢܬ ܥܒܕܬ ܫܚܠܦܬܐ ܒܦܐܬܐ ܡܬܦܠܚܬ ܠܡܘܬܘܪ̈ܐ ܦܐܬܘܬ̈ܐ ܟܬܝܒ̈ܐ ܠܚܘܪܙܐ.
 ܟܠ ܫܘܚܠܦܐ ܒܐܗܐ ܦܐܬܐ ܒܕ ܥܒܕ ܟܪ ܥܠ ܡܚܙܝܬܐ ܦܐܬܐ ܕܡܦܠܚܢܐ ܠܡܦܠܚܢ̈ܐ ܐܚܪ̈ܝܢܐ.
 ܠܬܘܪ̈ܓܡܐ، ܡܦܠܚ ܬܪܡܝܬܐ ܬܘܪܓܡܐ ܕܡܝܕܝܐܘܝܩܝ [//translatewiki.net/wiki/Main_Page?setlang=ar translatewiki.net].",
@@ -926,7 +929,7 @@ $1',
 ܗܫܐ ܐܝܬܝܗܝ  ܨܘܝܒܐ ܠ [[$2]].',
 
 'brokenredirects' => 'ܨܘܝܒ̈ܐ ܬܒܝܪ̈ܐ',
-'brokenredirectstext' => 'ܨܘ̈ܝܒܐ ܗܠܝܢ ܡܛܝܢ ܠܕ̈ܦܐ ܕܠܝܬ:',
+'brokenredirectstext' => 'ܨܘ̈ܝܒܐ ܗܠܝܢ ܡܛܝܢ ܠܕ̈ܦܐ ܕܠܝܬܠܗܘܢ ܐܝܬܘܬܐ:',
 'brokenredirects-edit' => 'ܫܚܠܦ',
 'brokenredirects-delete' => 'ܫܘܦ',
 
index 7fe16dc..305ee57 100644 (file)
@@ -41,6 +41,7 @@
  * @author Hercule
  * @author Icvav
  * @author Imre
+ * @author Invadinado
  * @author Jatrobat
  * @author Jens Liebenau
  * @author Jurock
@@ -365,15 +366,15 @@ $messages = array(
 'tog-previewontop' => 'Mostrar previsualización antes del cuadro de edición',
 'tog-previewonfirst' => 'Mostrar previsualización en la primera edición',
 'tog-nocache' => 'Desactivar la caché de páginas del navegador',
-'tog-enotifwatchlistpages' => 'Enviarme un correo electrónico cuando una página en mi lista de seguimiento sea modificada',
-'tog-enotifusertalkpages' => 'Enviarme un correo electrónico cuando mi página de discusión sea modificada',
+'tog-enotifwatchlistpages' => 'Enviarme un correo electrónico cuando se modifique una página en mi lista de seguimiento',
+'tog-enotifusertalkpages' => 'Enviarme un correo electrónico cuando se modifique mi página de discusión',
 'tog-enotifminoredits' => 'Notificarme también los cambios menores de páginas',
 'tog-enotifrevealaddr' => 'Revelar mi dirección de correo electrónico en los correos de notificación',
 'tog-shownumberswatching' => 'Mostrar el número de usuarios que la vigilan',
 'tog-oldsig' => 'Firma actual:',
 'tog-fancysig' => 'Tratar firma como wikitexto (sin un enlace automático)',
-'tog-externaleditor' => 'Utilizar editor externo por defecto (sólo para expertos pues necesitas ajustes especiales en tu ordenador. [//www.mediawiki.org/wiki/Manual:External_editors Más información.])',
-'tog-externaldiff' => 'Utilizar diff externo por defecto (sólo para expertos pues necesitas ajustes especiales en tu ordenador. [//www.mediawiki.org/wiki/Manual:External_editors Más información.])',
+'tog-externaleditor' => 'Utilizar editor externo por defecto (sólo para expertos, pues necesitas ajustes especiales en tu ordenador; [//www.mediawiki.org/wiki/Manual:External_editors más información])',
+'tog-externaldiff' => 'Utilizar diff externo por defecto (sólo para expertos, pues necesitas ajustes especiales en tu ordenador; [//www.mediawiki.org/wiki/Manual:External_editors más información])',
 'tog-showjumplinks' => 'Habilitar enlaces de accesibilidad «saltar a»',
 'tog-uselivepreview' => 'Usar live preview (JavaScript) (Experimental)',
 'tog-forceeditsummary' => 'Alertar al grabar sin resumen de edición.',
@@ -461,7 +462,7 @@ $messages = array(
 'category-empty' => "''La categoría no contiene actualmente ningún artículo o archivo multimedia.''",
 'hidden-categories' => '{{PLURAL:$1|Categoría escondida|Categorías escondidas}}',
 'hidden-category-category' => 'Categorías ocultas',
-'category-subcat-count' => '{{PLURAL:$2|Esta categoría comprende solamente la siguiente categoría.|Esta categoría incluye {{PLURAL:$1|la siguiente categorías|las siguientes $1 subcategorías}}, de un total de $2.}}',
+'category-subcat-count' => '{{PLURAL:$2|Esta categoría solo contiene la siguiente subcategoría.|Esta categoría contiene {{PLURAL:$1|la siguiente subcategoría|las siguientes $1 subcategorías}}, de un total de $2.}}',
 'category-subcat-count-limited' => 'Esta categoría contiene {{PLURAL:$1|la siguiente subcategoría|las siguientes $1 subcategorías}}.',
 'category-article-count' => '{{PLURAL:$2|Esta categoría incluye solamente la siguiente página.|{{PLURAL:$1|La siguiente página página pertenece|Las siguientes $1 páginas pertenecen}} a esta categoría, de un total de $2.}}',
 'category-article-count-limited' => '{{PLURAL:$1|La siguiente página pertenece|Las siguientes $1 páginas pertenecen}} a esta categoría.',
@@ -469,12 +470,12 @@ $messages = array(
 'category-file-count-limited' => '{{PLURAL:$1|El siguiente fichero pertenece|Los siguientes $1 ficheros pertenecen}} a esta categoría.',
 'listingcontinuesabbrev' => 'cont.',
 'index-category' => 'Páginas indexadas',
-'noindex-category' => 'Páginas no indizadas',
+'noindex-category' => 'Páginas no indexadas',
 'broken-file-category' => 'Páginas con enlaces rotos a archivos',
 
 'about' => 'Acerca de',
 'article' => 'Artículo',
-'newwindow' => '(Se abre en una ventana nueva)',
+'newwindow' => '(se abre en una ventana nueva)',
 'cancel' => 'Cancelar',
 'moredotdotdot' => 'Más...',
 'mypage' => 'Mi página',
@@ -834,7 +835,7 @@ Puedes ignorar este mensaje si esta cuenta fue creada por error.',
 'login-throttled' => 'Has intentado demasiadas veces iniciar sesión. Por favor espera antes de intentarlo nuevamente.',
 'login-abort-generic' => 'Tu inicio de sesión no fue exitoso - Cancelado',
 'loginlanguagelabel' => 'Idioma: $1',
-'suspicious-userlogout' => 'Tu solicitud de desconexión ha sido denegada debido a que parece que ésta ha sido enviada desde un navegador defectuoso o un proxy caché.',
+'suspicious-userlogout' => 'Tu solicitud de desconexión ha sido denegada, pues parece haber sido enviada desde un navegador defectuoso o un proxy caché.',
 
 # E-mail sending
 'php-mail-error-unknown' => 'Error desconocido en la función mail() de PHP',
@@ -942,7 +943,7 @@ Contraseña temporal: $2',
 Tu dirección IP se almacenará en el historial de ediciones de la página.",
 'anonpreviewwarning' => "''No has iniciado sesión con una cuenta de usuario. Al guardar los cambios se almacenará tu dirección IP en el historial de edición de la página.''",
 'missingsummary' => "'''Atención:''' No has escrito un resumen de edición. Si haces clic nuevamente en «{{int:savearticle}}» tu edición se grabará sin él.",
-'missingcommenttext' => 'Por favor introduce texto debajo.',
+'missingcommenttext' => 'Por favor, introduce un texto debajo.',
 'missingcommentheader' => "'''Recordatorio:''' No has escrito un título para este comentario. Si haces clic nuevamente en \"{{int:savearticle}}\" tu edición se grabará sin él.",
 'summary-preview' => 'Previsualización del resumen:',
 'subject-preview' => 'Previsualización del tema/título:',
index 770d785..e27db56 100644 (file)
@@ -953,6 +953,7 @@ Allpool on toodud viimane blokeerimislogi sissekanne:',
 'note' => "'''Meeldetuletus:'''",
 'previewnote' => "'''Ära unusta, et see on kõigest eelvaade!'''
 Sinu muudatused pole veel salvestatud!",
+'continue-editing' => 'Jätka redigeerimist',
 'previewconflict' => 'See eelvaade näitab, kuidas ülemises toimetuskastis olev tekst hakkab välja nägema, kui otsustate salvestada.',
 'session_fail_preview' => "'''Vabandust! Meil ei õnnestunud seansiandmete kaotuse tõttu sinu muudatust töödelda.'''
 Palun proovi uuesti.
index f3dd6b6..0f84990 100644 (file)
@@ -1129,6 +1129,7 @@ $2
 'note' => "'''نکته:'''",
 'previewnote' => "'''به یاد داشته باشید که این فقط پیش‌نمایش است.'''
 تغییرات شما هنوز ذخیره نشده‌است!",
+'continue-editing' => 'ادامهٔ ویرایش',
 'previewconflict' => 'این پیش‌نمایش منعکس‌کنندهٔ متن ناحیهٔ ویرایش متن بالایی است، به شکلی که اگر متن را ذخیره کنید نمایش خواهد یافت.',
 'session_fail_preview' => "'''شرمنده! به علت از دست رفتن اطلاعات نشست کاربری نمی‌توانیم ویرایش شما را پردازش کنیم.'''
 لطفاً دوباره سعی کنید.
@@ -4091,7 +4092,7 @@ $5
 'logentry-newusers-newusers' => '$1 یک حساب کاربری ایجاد کرد',
 'logentry-newusers-create' => '$1 یک حساب کاربری ایجاد کرد',
 'logentry-newusers-create2' => '$1 یک حساب کاربری ایجاد کرد $3',
-'logentry-newusers-autocreate' => 'کاروری حساب $1  بساتن به شکل خودکار',
+'logentry-newusers-autocreate' => 'حساب $1  به شکل خودکار ساخته شد',
 'newuserlog-byemail' => 'گذرواژه با پست الکترونیکی ارسال شد',
 
 # Feedback
index 59bf42c..aba7318 100644 (file)
@@ -689,6 +689,9 @@ $2',
 'customjsprotected' => 'Sinulla ei ole oikeutta muuttaa tätä JavaScript-sivua, koska se sisältää toisen käyttäjän henkilökohtaisia asetuksia.',
 'ns-specialprotected' => 'Toimintosivuja ei voi muokata.',
 'titleprotected' => "Käyttäjä [[User:$1|$1]] on asettanut tämän sivun luontikieltoon: ''$2''.",
+'filereadonlyerror' => 'Tiedostoa "$1" ei voi muuttaa, koska jaettu mediavarasto "$2" on "vain luku" -tilassa.
+
+Lukituksen asettanut ylläpitäjä on antanut seuraavan syyn toimenpiteelle: "$3".',
 
 # Virus scanner
 'virus-badscanner' => "Virheellinen asetus: Tuntematon virustutka: ''$1''",
@@ -765,6 +768,7 @@ Tästä johtuen tästä IP-osoitteesta ei voi tällä hetkellä luoda uusia tunn
 'emailconfirmlink' => 'Varmenna sähköpostiosoite',
 'invalidemailaddress' => 'Sähköpostiosoitetta ei voida hyväksyä, koska se ei ole oikeassa muodossa. Ole hyvä ja anna oikea sähköpostiosoite tai jätä kenttä tyhjäksi.',
 'cannotchangeemail' => 'Tunnuksien sähköpostiosoitteita ei voi muuttaa tässä wikissä.',
+'emaildisabled' => 'Tältä sivustolta ei voi lähettää sähköpostia.',
 'accountcreated' => 'Käyttäjätunnus luotiin',
 'accountcreatedtext' => 'Käyttäjän $1 käyttäjätunnus luotiin.',
 'createaccount-title' => 'Tunnuksen luominen {{GRAMMAR:illative|{{SITENAME}}}}',
@@ -973,7 +977,7 @@ Yritä uudelleen. Jos ongelma ei katoa, yritä [[Special:UserLogout|kirjautua ul
 'token_suffix_mismatch' => "'''Muokkauksesi on hylätty, koska asiakasohjelmasi ei osaa käsitellä välimerkkejä muokkaustarkisteessa. Syynä voi olla viallinen välityspalvelin.'''",
 'edit_form_incomplete' => "'''Osa muokkauslomakkeesta ei saavuttanut palvelinta. Tarkista, että muokkauksesi ovat vahingoittumattomia ja yritä uudelleen.'''",
 'editing' => 'Muokataan sivua $1',
-'creating' => 'Luodaan sivu $1',
+'creating' => 'Sivun $1 luonti',
 'editingsection' => 'Muokataan osiota sivusta $1',
 'editingcomment' => 'Muokataan uutta osiota sivulla $1',
 'editconflict' => 'Päällekkäinen muokkaus: $1',
@@ -989,7 +993,7 @@ Sinun täytyy yhdistää muutoksesi olemassa olevaan tekstiin.
 'yourdiff' => 'Eroavaisuudet',
 'copyrightwarning' => "'''Muutoksesi astuvat voimaan välittömästi.''' Kaikki {{GRAMMAR:illative|{{SITENAME}}}} tehtävät tuotokset katsotaan julkaistuksi $2 -lisenssin mukaisesti ($1). Jos et halua, että kirjoitustasi muokataan armottomasti ja uudelleenkäytetään vapaasti, älä tallenna kirjoitustasi. Tallentamalla muutoksesi lupaat, että kirjoitit tekstisi itse, tai kopioit sen jostain vapaasta lähteestä. '''ÄLÄ KÄYTÄ TEKIJÄNOIKEUDEN ALAISTA MATERIAALIA ILMAN LUPAA!'''",
 'copyrightwarning2' => "Huomaa, että kuka tahansa voi muokata, muuttaa ja poistaa kaikkia sivustolle tekemiäsi lisäyksiä ja muutoksia. Muokkaamalla sivustoa luovutat sivuston käyttäjille tämän oikeuden ja takaat, että lisäämäsi aineisto on joko itse kirjoittamaasi tai peräisin jostain vapaasta lähteestä. Lisätietoja sivulla $1. '''TEKIJÄNOIKEUDEN ALAISEN MATERIAALIN KÄYTTÄMINEN ILMAN LUPAA ON EHDOTTOMASTI KIELLETTYÄ!'''",
-'longpageerror' => "'''Virhe: Lähettämäsi tekstin pituus on {{PLURAL:$1|kilotavu|$1 kilotavua}}. Tekstiä ei voida tallentaa, koska se on pitempi kuin sallittu {{PLURAL:$2|yksi kilotavu|$2 kilotavua}}.'''",
+'longpageerror' => "'''Virhe: Lähettämäsi tekstin pituus on {{PLURAL:$1|kilotavu|$1 kilotavua}}. Tekstiä ei voida tallentaa, koska se on pitempi kuin sallittu enimmäispituus {{PLURAL:$2|yksi kilotavu|$2 kilotavua}}.'''",
 'readonlywarning' => "'''Varoitus: Tietokanta on lukittu huoltoa varten, joten et pysty tallentamaan muokkauksiasi juuri nyt.'''
 Saattaa olla paras leikata ja liimata tekstisi omaan tekstitiedostoosi ja tallentaa se tänne myöhemmin.
 
@@ -1180,8 +1184,8 @@ Sinulla ei ole oikeutta siihen.',
 
 # Suppression log
 'suppressionlog' => 'Häivytysloki',
-'suppressionlogtext' => 'Alla on lista uusimmista poistoista ja muokkausestoista, jotka sisältävät ylläpitäjiltä piilotettua materiaalia.
-[[Special:BlockList|Muokkausestolistassa]] on tämänhetkiset muokkausestot.',
+'suppressionlogtext' => 'Alla on luettelo poistoista ja muokkausestoista, jotka sisältävät ylläpitäjiltä piilotettua materiaalia.
+[[Special:BlockList|Estolistassa]] on lueteltu voimassa olevat muokkauskiellot ja muokkausestot.',
 
 # History merging
 'mergehistory' => 'Yhdistä muutoshistoriat',
@@ -1243,7 +1247,7 @@ Uuden ja vanhan sivun muutoksien pitää muodostaa jatkumo – ne eivät saa men
 
 $1 {{int:pipe-separator}} $2',
 'searchmenu-legend' => 'Hakuasetukset',
-'searchmenu-exists' => "'''Sivu [[:$1]] löytyy tästä wikistä.'''",
+'searchmenu-exists' => "'''Tässä wikissä on sivu nimellä [[:$1]].'''",
 'searchmenu-new' => "'''Luo sivu ''[[:$1]]'' tähän wikiin.'''",
 'searchhelp-url' => 'Help:Sisällys',
 'searchmenu-prefix' => '[[Special:PrefixIndex/$1|Selaa sivuja tällä etuliitteellä]]',
@@ -1766,6 +1770,7 @@ $1',
 'backend-fail-closetemp' => 'Väliaikaista tiedostoa ei voitu sulkea.',
 'backend-fail-read' => 'Tiedostoa $1 ei voitu lukea.',
 'backend-fail-create' => 'Tiedostoa $1 ei voitu luoda.',
+'backend-fail-connect' => 'Varastojärjestelmään "$1" ei saada yhteyttä.',
 
 # Lock manager
 'lockmanager-notlocked' => 'Kohteen $1 lukitusta ei voitu poistaa, koska se ei ole lukittu.',
@@ -1883,6 +1888,10 @@ Seuraava lista näyttää {{PLURAL:$1|ensimmäisen linkittävän sivun|$1 ensimm
 Katso [$2 tiedoston kuvaussivulta] lisätietoja.',
 'sharedupload-desc-here' => 'Tämä tiedosto on jaettu kohteesta $1 ja muut projektit saattavat käyttää sitä.
 Tiedot [$2 tiedoston kuvaussivulta] näkyvät alla.',
+'sharedupload-desc-edit' => 'Tämä tiedosto on jaettu kohteesta $1 ja muut projektit saattavat käyttää sitä. 
+Voit tarvittaessa muokata [$2 tiedoston kuvaussivua] kohteessa.',
+'sharedupload-desc-create' => 'Tämä tiedosto on jaettu kohteesta $1 ja muut projektit saattavat käyttää sitä. 
+Voit tarvittaessa muokata [$2 tiedoston kuvaussivua] kohteessa.',
 'filepage-nofile' => 'Tämän nimistä tiedostoa ei ole olemassa.',
 'filepage-nofile-link' => 'Tämän nimistä tiedostoa ei ole olemassa, mutta voit [$1 tallentaa sen].',
 'uploadnewversion-linktext' => 'Tallenna uusi versio tästä tiedostosta',
@@ -2012,6 +2021,8 @@ Jokaisella rivillä on linkit ensimmäiseen ja toiseen ohjaukseen sekä toisen o
 'wantedpages' => 'Halutut sivut',
 'wantedpages-badtitle' => 'Virheellinen otsikko tuloksissa: $1',
 'wantedfiles' => 'Halutut tiedostot',
+'wantedfiletext-cat' => 'Seuraavia tiedostoja käytetään, mutta niitä ei ole olemassa. Ulkopuolissa mediavarastoissa olevat tiedostot voivat näkyä tällä listalla, vaikka ne ovat olemassa. Tällaiset väärät merkinnät on <del>yliviivattu</del>. Lisäksi sellaiset sivut, joihin on sisällytetty tiedostoja, jotka eivät ole olemassa, on luetteloitu [[:$1|täällä]].',
+'wantedfiletext-nocat' => 'Seuraavia tiedostoja käytetään, mutta niitä ei ole olemassa. Ulkopuolissa mediavarastoissa olevat tiedostot voivat näkyä tällä listalla, vaikka ne ovat olemassa. Tällaiset väärät merkinnät on <del>yliviivattu</del.>',
 'wantedtemplates' => 'Halutut mallineet',
 'mostlinked' => 'Viitatuimmat sivut',
 'mostlinkedcategories' => 'Viitatuimmat luokat',
@@ -2089,7 +2100,12 @@ Voit rajoittaa listaa valitsemalla lokityypin, käyttäjän tai sivun johon muut
 'allpagesprefix' => 'Katkaisuhaku',
 'allpagesbadtitle' => 'Annettu otsikko oli kelvoton tai siinä oli wikien välinen etuliite.',
 'allpages-bad-ns' => '{{GRAMMAR:inessive|{{SITENAME}}}} ei ole nimiavaruutta ”$1”.',
-'allpages-hide-redirects' => 'Piilota uudelleenohjaukset',
+'allpages-hide-redirects' => 'Piilota ohjaussivut',
+
+# SpecialCachedPage
+'cachedspecial-viewing-cached-ttl' => 'Katselet arkistoitua versiota tästä sivusta, joka voi olla jopa $1 vanha.',
+'cachedspecial-viewing-cached-ts' => 'Katselet arkistoitua versiota tästä sivusta, joka ei välttämättä ole sivun viimeisin versio.',
+'cachedspecial-refresh-now' => 'Näytä uusin versio.',
 
 # Special:Categories
 'categories' => 'Luokat',
@@ -2397,7 +2413,7 @@ Voit palauttaa versiota valikoivasti valitsemalla vain niiden versioiden valinta
 'undeletedrevisions' => '{{PLURAL:$1|Yksi versio|$1 versiota}} palautettiin',
 'undeletedrevisions-files' => '{{PLURAL:$1|Yksi versio|$1 versiota}} ja {{PLURAL:$2|yksi tiedosto|$2 tiedostoa}} palautettiin',
 'undeletedfiles' => '{{PLURAL:$1|1 tiedosto|$1 tiedostoa}} palautettiin',
-'cannotundelete' => 'Palauttaminen epäonnistui.',
+'cannotundelete' => 'Palauttaminen epäonnistui; joku muu on voinut jo palauttaa sivun.',
 'undeletedpage' => "'''$1 on palautettu.'''
 
 [[Special:Log/delete|Poistolokista]] löydät listan viimeisimmistä poistoista ja palautuksista.",
@@ -2510,7 +2526,7 @@ Alla on viimeisin estolokin tapahtuma:',
 'badipaddress' => 'IP-osoite on väärin muotoiltu.',
 'blockipsuccesssub' => 'Esto onnistui',
 'blockipsuccesstext' => 'Käyttäjä tai IP-osoite [[Special:Contributions/$1|$1]] on estetty.<br />
-Nykyiset estot löytyvät [[Special:BlockList|estolistalta]].',
+Voimassa olevat estot näkyvät [[Special:BlockList|estolistasta]].',
 'ipb-blockingself' => 'Olet estämässä itseäsi. Oletko varma, että haluat tehdä niin?',
 'ipb-confirmhideuser' => 'Olet estämässä käyttäjää ”piilota käyttäjä” -toiminnon kanssa.  Tämä piilottaa käyttäjän nimen kaikissa luetteloissa ja lokitapahtumissa.  Oletko varma, että haluat tehdä näin?',
 'ipb-edit-dropdown' => 'Muokkaa estosyitä',
@@ -3642,6 +3658,9 @@ Sinun olisi pitänyt saada [{{SERVER}}{{SCRIPTPATH}}/COPYING kopio GNU General P
 'version-software' => 'Asennettu ohjelmisto',
 'version-software-product' => 'Tuote',
 'version-software-version' => 'Versio',
+'version-entrypoints' => 'Aloituskohtien URL-osoitteet',
+'version-entrypoints-header-entrypoint' => 'Aloituskohta',
+'version-entrypoints-header-url' => 'URL',
 
 # Special:FilePath
 'filepath' => 'Tiedoston osoite',
@@ -3800,6 +3819,7 @@ Muussa tapauksessa voit käyttää alla olevaa helpompaa lomaketta. Kommenttisi
 'api-error-duplicate-archive-popup-title' => 'Tiedostolla on {{PLURAL:$1|poistettu kaksoiskappale|poistettuja kaksoiskappaleita}}',
 'api-error-duplicate-popup-title' => 'Tiedoston {{PLURAL:$1|kaksoiskappale|kaksoiskappaleet}}',
 'api-error-empty-file' => 'Määrittämäsi tiedosto on tyhjä.',
+'api-error-emptypage' => 'Ei ole sallittua luoda uutta, tyhjää sivua.',
 'api-error-fetchfileerror' => 'Sisäinen virhe: jotakin meni pieleen tiedoston haussa.',
 'api-error-file-too-large' => 'Määrittämäsi tiedosto on liian iso.',
 'api-error-filename-tooshort' => 'Tiedoston nimi on liian lyhyt.',
index ba3ccca..6a184c9 100644 (file)
@@ -915,6 +915,7 @@ Lembre que as páxinas .css e .js personalizadas utilizan un título en minúscu
 'updated' => '(Actualizado)',
 'note' => "'''Nota:'''",
 'previewnote' => "'''Lembre que esta é só unha vista previa e que aínda non gardou os seus cambios!'''",
+'continue-editing' => 'Continuar editando',
 'previewconflict' => 'Esta vista previa mostra o texto na área superior tal e como aparecerá se escolle gardar.',
 'session_fail_preview' => "'''O sistema non pode procesar a súa edición porque se perderon os datos de inicio da sesión.
 Por favor, inténteo de novo.
index 00e1fc5..f5ee6bd 100644 (file)
@@ -991,6 +991,7 @@ a szerkesztési tokenben. A szerkesztés azért lett visszautasítva, hogy megel
 Ez a probléma akkor fordulhat elő, ha hibás, web-alapú proxyszolgáltatást használsz.'''",
 'edit_form_incomplete' => "'''A szerkesztési űrlap egyes részei nem érkeztek meg a szerverre; ellenőrizd újra, hogy a szerkesztés sértetlen-e, majd próbáld újra.'''",
 'editing' => '$1 szerkesztése',
+'creating' => '$1 létrehozása',
 'editingsection' => '$1 szerkesztése (szakasz)',
 'editingcomment' => '$1 szerkesztése (új szakasz)',
 'editconflict' => 'Szerkesztési ütközés: $1',
index 369d443..bd10818 100644 (file)
@@ -887,6 +887,7 @@ $2',
 '''Եթե սա բարեխիղճ խմբագրման փորձ է, խնդրում ենք փորձել կրկին։ Սխալի կրկնման դեպքում՝ փորձեք [[Special:UserLogout|դուրս գալ]], ապա կրկին մտնել համակարգ։'''",
 'token_suffix_mismatch' => "'''Ձեր խմբագրումը մերժվել է, քանի որ ձեր օգտագործած ծրագիրը աղավաղել է կետադրության նշանները խմբագրման դաշտում։ Խմբագրումը մերժվել է էջի տեքստի խաթարումը կանխելու նպատակով։ Սա երբեմն պայմանավորված է սխալներ պարունակող անանվանեցնող վեբ-փոխարինորդ (proxy) ծառայության օգտագործմամբ։'''",
 'editing' => 'Խմբագրում. $1',
+'creating' => 'Ստեղծում $1',
 'editingsection' => 'Խմբագրում. $1 (բաժին)',
 'editingcomment' => 'Խմբագրում $1 (նոր բաժին)',
 'editconflict' => 'Խմբագրման ընդհարում. $1',
index f83362d..a0ff026 100644 (file)
@@ -844,6 +844,7 @@ Memora que le paginas .css and .js personalisate usa un titulo in minusculas, p.
 'note' => "'''Nota:'''",
 'previewnote' => "'''Isto es solmente un previsualisation.'''
 Le modificationes non ha ancora essite publicate!",
+'continue-editing' => 'Continuar a modificar',
 'previewconflict' => 'Iste previsualisation reflecte le apparentia final del texto in le area de modification superior
 si tu opta pro publicar lo.',
 'session_fail_preview' => "'''Nos non poteva processar tu modification proque nos perdeva le datos del session.
index 2b5502c..0a85879 100644 (file)
@@ -405,7 +405,7 @@ $2',
 Ti naited a rason ket ''$2''.",
 'filereadonlyerror' => 'Di nabaliwan ti papales "$1" gapu ket ti repositorio ti papeles "$2" ket basaen laeng a moda.
 
-Ti rason a naited ket "\'\'$3\'\'".',
+Ti administrador a nagserra ket nagited iti daytoy a panagilawlawag "\'\'$3\'\'".',
 
 # Virus scanner
 'virus-badscanner' => 'Madi di panaka-aramidna: Di am-ammo a birus a panagskan: "$1"',
@@ -501,6 +501,7 @@ Awan ti e-surat nga ipatulod para dagitoy a langa.',
 'invalidemailaddress' => 'Ti e-surat a pagtaengam ket saan a maawat, ket kasla addaan ti saan a napudno a nakabuklan.
 Pangngaasi ta ikkam ti nasayaat  a  nakabuklan a pagtaengan wenno ikkatem amin dagiti naikabil mo.',
 'cannotchangeemail' => 'Dagiti pakabilangan nga e-surat a pagtaengan ket saan a mabaliwan ditoy a wiki.',
+'emaildisabled' => 'Daytoy a pagsaaadan ket saan a makaipatuod kadagiti e-surat.',
 'accountcreated' => 'Naaramiden ti pakabilangan',
 'accountcreatedtext' => 'Naaramiden ti pakabilangan a pagaramat ni $1.',
 'createaccount-title' => 'Panagaramid iti pakabilangan para iti {{SITENAME}}',
@@ -708,7 +709,9 @@ Ti naudi a listaan ti panaka-serra ket adda dita baba tapno mausar a reperensia:
 Annawid a .css ken .js dagiti titulo ket agususar ti napababa a letra, a kas dagiti {{ns:user}}:Foo/vector.css saan ket a {{ns:user}}:Foo/Vector.css.",
 'updated' => '(Napabaro)',
 'note' => "'''Paammo:'''",
-'previewnote' => "'''Maysa laeng a pagpadas daytoy; dagiti sinukatam ket saan pay a naidulin!'''",
+'previewnote' => "'''Laglagipem a daytoy ket panagipadas laeng.'''
+Dagiti sinukatam ket saan pay a naidulin!",
+'continue-editing' => 'Agtultuloy nga agurnos',
 'previewconflict' => 'Daytoy a panagpadas ket agiparang ti testo dita ngato a panagurnos a lugar a kasla agparang no kayatmo nga idulin.',
 'session_fail_preview' => "'''Pasensian a! Saan mi a maaramid ti panag-urnos gapu ngamin ta naawanan ti gimong ti data.'''
 Pangngaasi ta padasem manen.
@@ -724,6 +727,7 @@ Ti panag-urnos ket saan a naawat tapno mapawilan ti panakadadael ti testo ti pan
 Mapasamak daytoy no agus-usar ka ti saan a nasayaat a naibasta ti sapot a diamammo a proxy a panagserbi.",
 'edit_form_incomplete' => "'''Adda dagiti paset ti panag-urnos a kabuklan a saan a nakadanon dita server; kitkitaen nga dagiti pianag-urnos mo ket saan a naikkatan ken padasem manen.'''",
 'editing' => 'Ururnosen ti $1',
+'creating' => 'Agparpartuat ti $1',
 'editingsection' => 'Ururnosen ti $1 (paset)',
 'editingcomment' => 'Ururnosen ti $1 (baro a paset)',
 'editconflict' => 'Adda kasinnungat ti panag-urnos: $1',
@@ -791,6 +795,7 @@ Kasla met naikkaten.',
 'edit-no-change' => 'Ti inurnos mo ket saan a naikaskaso, ngamin ket awan ti nasukatan a testo.',
 'edit-already-exists' => 'Saan a makaaramid ti baro a panid.
 Adda met daytoyen.',
+'defaultmessagetext' => 'Naisigud a testo ti mensahe',
 
 # Parser/template warnings
 'expensive-parserfunction-warning' => "'''Ballaag:''' Daytoy a panid ket adu unay kadagiti nangina a parser nga opisio a pinagtawtawag.
@@ -950,8 +955,8 @@ Saan mo a mabalin a serrekan.',
 
 # Suppression log
 'suppressionlog' => 'Listaan ti nadepdepan',
-'suppressionlogtext' => 'Dita baba ket addaan dagiti listaan ti pinagikkat ken naserraan nga adda nagyanna a nailemmeng kadagiti administrador.
-Kitaen ti [[Special:BlockList|Listaan ti naserraan nga IP]] iti listaan ti agdama a kadagiti operasional a pinagparit ken panagserra',
+'suppressionlogtext' => 'Dita baba ket addaan dagiti listaan ti pinagikkat ken npanagserra a nairaman dagiti linaon a nailemmeng manipud kadagiti administrador.
+Kitaen ti [[Special:BlockList|Listaan ti lapden nga IP]] para iti listaan kadagiti agdama nga operasional a pinagparit ken panagserra.',
 
 # History merging
 'mergehistory' => 'Pagtiponen dagiti pakasaritaan ti pampanid',
@@ -1895,6 +1900,10 @@ Mapabassit mo ti pinagpakita no piliam ti kita ti listaan, ti nagan ti gar-arama
 'allpages-bad-ns' => 'Awan ti {{SITENAME}} iti nagan ti lugar a "$1".',
 'allpages-hide-redirects' => 'Ilemmeng dagiti baw-ing',
 
+# SpecialCachedPage
+'cachedspecial-viewing-cached-ttl' => 'Kitkitaenm ti naidulin a bersion iti daytoy a panid, nga addan ti kadaanan a $1.',
+'cachedspecial-refresh-now' => 'Kitaen ti kinaudian.',
+
 # Special:Categories
 'categories' => 'Dagiti kategoria',
 'categoriespagetext' => 'Dagiti sumaganad a {{PLURAL:$1|nagyan ti kategoria|dagiti nagyan ti kategoria}} pampanid wenno midia.
@@ -2342,8 +2351,8 @@ Ikkan ti nainaganan a rason dita baba (kas pagarigan, dakamaten ti maysa a panid
 'ipb-confirm' => 'Pasingkedan ti serra',
 'badipaddress' => 'Imbalido nga IP a pagtaengan',
 'blockipsuccesssub' => 'Balligi ti panangserra',
-'blockipsuccesstext' => '[[Special:Contributions/$1|$1]] ket naserraan.<br />
-Kitaen ti [[Special:BlockList|listaan ti IP a naserraan]] ta kitaen dagiti serra.',
+'blockipsuccesstext' => '[[Special:Contributions/$1|$1]] ket naserraanen.<br />
+Kitaen ti [[Special:BlockList|listaan ti lapden nga IP ]] tapno marepaso dagiti serra.',
 'ipb-blockingself' => 'Mangrugrugi ka nga agserra kenka! Sigurado nga kayatmo nga aramiden daytoy?',
 'ipb-confirmhideuser' => 'Mangrugrugi ka ti mangserra ti agar-aramat nga addaan ti napabalin na nga "ilemmeng ti agar-aramat". Iddeppen na ti nagan daytoy nga agar-aramat kadagiti amin a listaan ken dagiti naikabkabil ti listaan. Sigurado ka a kasta ti kayatmo?',
 'ipb-edit-dropdown' => 'Urnosen dagiti rason ti panagserra',
@@ -2396,9 +2405,9 @@ Ti listaan ti serra ket naikabil dita baba tapno mausar a reperensia:',
 Ti listaan ti napasardeng ket naikabil dita baba tapno mausar a reperensia:',
 'blocklogentry' => 'naserraan ni [[$1]] nga addaan ti oras ti panagpaso nga $2 $3',
 'reblock-logentry' => 'sinukatan ti panakaserra ni [[$1]] ti agtapos nga oras nga $2 $3',
-'blocklogtext' => 'Daytoy ket listaan ti gar-aramat kadagiti pinagserraken panaglukat ti serra
-Dagiti na-automatiko a panakaserra ti IP a pagtaengan ket saan a nailista.
-Kitaen ti [[Special:BlockList|Listaan ti serra ti IP]] ti listaan kadagiti agdama a naiparit a pagpataray ken dagiti serra.',
+'blocklogtext' => 'Daytoy ket listaan ti agar-aramat kadagiti pinagserra ken panaglukat ti serra
+Dagiti na-atomatiko a panakaserra ti IP a pagtaengan ket saan a nailista.
+Kitaen ti [[Special:BlockList|Listaan ti lapden nga IP]] para iti listaan kadagiti agdama a naiparit a pagpataray ken dagiti serra.',
 'unblocklogentry' => 'lukatan ti serra ni $1',
 'block-log-flags-anononly' => 'dagiti di am-ammo nga agar-aramat laeng',
 'block-log-flags-nocreate' => 'naisardeng ti pinagaramid iti pakabilangan',
@@ -3073,6 +3082,8 @@ Dagiti dadduma ket mailemmeng a kinasigud.
 'exif-planarconfiguration-1' => 'chunky format',
 'exif-planarconfiguration-2' => 'planar format',
 
+'exif-colorspace-65535' => 'Di-nakalibrar',
+
 'exif-componentsconfiguration-0' => 'awan',
 
 'exif-exposureprogram-0' => 'Saan a naipalpalawag',
@@ -3455,6 +3466,9 @@ Naka-awat ka kuman ti [{{SERVER}}{{SCRIPTPATH}}/COPYING kopia iti GNU Sapasap a
 'version-software' => 'Naikabil a software',
 'version-software-product' => 'Produkto',
 'version-software-version' => 'Bersion',
+'version-entrypoints' => 'Paserrekan a puntos dagiti URL',
+'version-entrypoints-header-entrypoint' => 'Pagserrekan a puntos',
+'version-entrypoints-header-url' => 'URL',
 
 # Special:FilePath
 'filepath' => 'Dalanan ti papeles',
@@ -3644,4 +3658,15 @@ Nupay kasta, mau-sar mo ti nakabuklan dita baba. Ti komentario nga ited mo ket m
 'api-error-uploaddisabled' => 'Nabaldado ti mangipapan iti daytoy a wiki.',
 'api-error-verification-error' => 'Dakes ngata daytoy a papeles, wenno addaan ti madi a pagpa-atiddog.',
 
+# Durations
+'duration-seconds' => '$1 {{PLURAL:$1|segundo|seg-segundo}}',
+'duration-minutes' => '$1 {{PLURAL:$1|minuto|min-minuto}}',
+'duration-hours' => '$1 {{PLURAL:$1|oras|or-oras}}',
+'duration-days' => '$1 {{PLURAL:$1|aldaw|al-aldaw}}',
+'duration-weeks' => '$1 {{PLURAL:$1|lawas|law-lawas}}',
+'duration-years' => '$1 {{PLURAL:$1|tawen|taw-tawen}}',
+'duration-decades' => '$1 {{PLURAL:$1|dekada|dek-dekada}}',
+'duration-centuries' => '$1 {{PLURAL:$1|siglo|sig-siglo}}',
+'duration-millennia' => '$1 {{PLURAL:$1|milenio|mil-milenio}}',
+
 );
index 2cb6ac6..8e00feb 100644 (file)
@@ -920,6 +920,7 @@ L'ultimo elemento del registro dei blocchi è riportato di seguito per informazi
 'note' => "'''NOTA:'''",
 'previewnote' => "'''Ricorda che questa è solo un'anteprima.'''
 Le tue modifiche NON sono ancora state salvate!",
+'continue-editing' => 'Continua a modificare',
 'previewconflict' => 'L\'anteprima corrisponde al testo presente nella casella di modifica superiore e rappresenta la pagina come apparirà se si sceglie di premere "Salva la pagina" in questo momento.',
 'session_fail_preview' => "'''Non è stato possibile elaborare la modifica perché sono andati persi i dati relativi alla sessione.
 Riprovare.
index 9bec9ac..d75dcce 100644 (file)
@@ -481,12 +481,12 @@ $messages = array(
 'category-empty' => "''このカテゴリには、ページまたはメディアがひとつもありません。''",
 'hidden-categories' => '{{PLURAL:$1|隠しカテゴリ}}',
 'hidden-category-category' => '隠しカテゴリ',
-'category-subcat-count' => '{{PLURAL:$2|このカテゴリには以下の下位カテゴリのみが含まれています。|このカテゴリには $2 下位カテゴリが含まれており、そのうち以下の{{PLURAL:$1|下位カテゴリ| $1 下位カテゴリ}}を表示しています。}}',
-'category-subcat-count-limited' => 'このカテゴリには以下の{{PLURAL:$1|下位カテゴリ| $1 下位カテゴリ}}が含まれています。',
-'category-article-count' => '{{PLURAL:$2|このカテゴリには以下のページのみ含まれています。|このカテゴリには $2 ページが含まれており、そのうち以下の {{PLURAL:$1|$1 ページ}}を表示しています。}}',
-'category-article-count-limited' => '現在のカテゴリには以下の{{PLURAL:$1|ページ| $1 ページ}}が含まれています。',
+'category-subcat-count' => '{{PLURAL:$2|このカテゴリには以下の下位カテゴリのみが含まれています。|このカテゴリには $2 下位カテゴリが含まれており、そのうち以下の{{PLURAL:$1|下位カテゴリ|&#32;$1 下位カテゴリ}}を表示しています。}}',
+'category-subcat-count-limited' => 'このカテゴリには以下の{{PLURAL:$1|下位カテゴリ|&#32;$1 下位カテゴリ}}が含まれています。',
+'category-article-count' => '{{PLURAL:$2|このカテゴリには以下のページのみ含まれています。|このカテゴリには $2 ページが含まれており、そのうち以下の {{PLURAL:$1|$1 ページ}}を表示しています。}}',
+'category-article-count-limited' => '現在のカテゴリには以下の{{PLURAL:$1|ページ|&#32;$1 ページ}}が含まれています。',
 'category-file-count' => '{{PLURAL:$2|このカテゴリには以下のファイルのみが含まれています。|このカテゴリには $2 ファイルが含まれており、そのうち以下の {{PLURAL:$1|$1 ファイル}}を表示しています。}}',
-'category-file-count-limited' => '現在のカテゴリには以下の{{PLURAL:$1|ファイル| $1 ファイル}}が含まれています。',
+'category-file-count-limited' => '現在のカテゴリには以下の{{PLURAL:$1|ファイル|&#32;$1 ファイル}}が含まれています。',
 'listingcontinuesabbrev' => 'の続き',
 'index-category' => '検索エンジンに収集されるページ',
 'noindex-category' => '検索エンジンに収集されないページ',
@@ -1561,7 +1561,7 @@ HTMLタグを見直してください。',
 'saveusergroups' => '利用者グループを保存',
 'userrights-groupsmember' => '所属グループ:',
 'userrights-groupsmember-auto' => '自動的に付与される権限:',
-'userrights-groups-help' => 'ã\81\93ã\81®å\88©ç\94¨è\80\85ã\81\8cå±\9eã\81\99ã\82\8bã\82°ã\83«ã\83¼ã\83\97ã\82\92å¤\89æ\9b´ã\81\99ã\82\8bã\81\93ã\81¨ã\81\8cã\81§ã\81\8dã\81¾ã\81\99ã\80\82
+'userrights-groups-help' => 'この利用者が属するグループを変更できます。
 * チェックが入っているボックスは、この利用者がそのグループに属していることを意味します。
 * チェックが入っていないボックスは、この利用者がそのグループに属していないことを意味します。
 * 「*」はグループに一旦追加した場合に除去(あるいはその逆)ができないことを示しています。',
@@ -1600,7 +1600,7 @@ HTMLタグを見直してください。',
 # Rights
 'right-read' => 'ページを閲覧',
 'right-edit' => 'ページを編集',
-'right-createpage' => '(議論ページではない)ページを作成',
+'right-createpage' => '(議論ページ以外の)ページを作成',
 'right-createtalk' => '議論ページを作成',
 'right-createaccount' => '新しい利用者アカウントを作成',
 'right-minoredit' => '細部の編集の印を付ける',
@@ -1827,13 +1827,13 @@ HTMLタグを見直してください。',
 * アップロード中のファイルの名前:'''<tt>[[:$1]]</tt>'''
 * 既存ファイルの名前:'''<tt>[[:$2]]</tt>'''
 違う名前を選択してください。",
-'fileexists-thumbnail-yes' => "このファイルは元の画像から縮小されたもの(サムネイル)のようです。
+'fileexists-thumbnail-yes' => "このファイルは元の画像から縮小されたもの''(サムネイル)''のようです。
 [[$1|thumb]]
 ファイル'''<tt>[[:$1]]</tt>'''を確認してください。
-確認したファイルが同じ画像のもとのサイズの版である場合、サムネイルを個別にアップロードする必要はありません。",
+確認したファイルが同じ画像の元のサイズの版の場合は、サムネイルを別途アップロードする必要はありません。",
 'file-thumbnail-no' => "ファイル名が'''<tt>$1</tt>'''から始まっています。
-他の画像から縮小されたもの(サムネイル)のようです。
\82\88ã\82\8aé«\98精細ã\81ªç\94»å\83\8fã\82\92ã\81\8aæ\8c\81ã\81¡ã\81®å ´å\90\88ã\81¯ã\80\81ã\81\9dã\81¡ã\82\89ã\82\92ã\82¢ã\83\83ã\83\97ã\83­ã\83¼ã\83\89ã\81\97ã\81¦ã\81\8fã\81 ã\81\95ã\81\84ã\80\82ã\81\9dã\81\86ã\81§ない場合はファイル名を変更してください。",
+他の画像から縮小されたもの''(サムネイル)''のようです。
\82\88ã\82\8aé«\98精細ã\81ªç\94»å\83\8fã\82\92ã\81\8aæ\8c\81ã\81¡ã\81®å ´å\90\88ã\81¯ã\81\9dã\82\8cã\82\92ã\82¢ã\83\83ã\83\97ã\83­ã\83¼ã\83\89ã\81\97ã\81¦ã\81\8fã\81 ã\81\95ã\81\84ã\80\82ã\81\8aæ\8c\81ã\81¡ã\81§ã\81¯ない場合はファイル名を変更してください。",
 'fileexists-forbidden' => 'この名前のファイルは既に存在しており、上書きできません。
 アップロードを継続したい場合は、前のページに戻り、別のファイル名を使用してください。
 [[File:$1|thumb|center|$1]]',
@@ -2041,7 +2041,7 @@ URLが正しいものであり、ウェブサイトが稼働していること
 'filehist-dimensions' => '解像度',
 'filehist-filesize' => 'ファイルサイズ',
 'filehist-comment' => 'コメント',
-'filehist-missing' => 'ã\83\95ã\82¡ã\82¤ã\83«ã\81\8cã\81¿ã\81¤ã\81\8bりません',
+'filehist-missing' => 'ã\83\95ã\82¡ã\82¤ã\83«ã\81\8cã\81\82りません',
 'imagelinks' => 'ファイルの使用状況',
 'linkstoimage' => 'このファイルへは以下の {{PLURAL:$1|ページ| $1 ページ}}からリンクしています:',
 'linkstoimage-more' => 'このファイルへは $1 を超える数のページからリンクがあります。
@@ -2713,7 +2713,7 @@ $1',
 ** 複数アカウントの不正利用
 ** 不適切な利用者名',
 'ipb-hardblock' => 'ログインしている利用者によるこのIPアドレスからの編集を不許可',
-'ipbcreateaccount' => 'アカウント作成を禁止する',
+'ipbcreateaccount' => 'アカウント作成を禁止',
 'ipbemailban' => 'メール送信を防止',
 'ipbenableautoblock' => 'この利用者が最後に使用したIPアドレスと、後に編集しようとしたIPアドレスを自動的にブロック',
 'ipbsubmit' => 'この利用者をブロック',
@@ -4046,7 +4046,7 @@ MediaWikiは、有用であることを期待して配布されていますが
 'fileduplicatesearch-info' => '$1×$2 ピクセル<br />ファイルサイズ:$3<br />MIMEタイプ:$4',
 'fileduplicatesearch-result-1' => 'ファイル「$1」と重複するファイルはありません。',
 'fileduplicatesearch-result-n' => 'ファイル「$1」は$2件のファイルと重複しています。',
-'fileduplicatesearch-noresults' => 'ã\80\8c$1ã\80\8dã\81¨ã\81\84ã\81\86å\90\8då\89\8dã\81®ã\83\95ã\82¡ã\82¤ã\83«ã\81\8cã\81¿ã\81¤ã\81\8bりません。',
+'fileduplicatesearch-noresults' => 'ã\80\8c$1ã\80\8dã\81¨ã\81\84ã\81\86å\90\8då\89\8dã\81®ã\83\95ã\82¡ã\82¤ã\83«ã\81¯ã\81\82りません。',
 
 # Special:SpecialPages
 'specialpages' => '特別ページ',
index e6ca5e3..9acbc1b 100644 (file)
@@ -1429,7 +1429,7 @@ $1",
 Секој што го знае клучот во полево ќе може да го чита вашиот список на набљудувања, па затоа изберете некоја безбедна вредност.
 Еве една случајно-создадена вредност што можете да ја користите: $1',
 'savedprefs' => 'Вашите нагодувања се зачувани.',
-'timezonelegend' => 'ЧаÑ\81овна Ð·Ð¾Ð½Ð°:',
+'timezonelegend' => 'ЧаÑ\81овен Ð¿Ð¾Ñ\98аÑ\81:',
 'localtime' => 'Локално време:',
 'timezoneuseserverdefault' => 'Од викито ($1)',
 'timezoneuseoffset' => 'Друго (посочете отстапување)',
@@ -1677,7 +1677,7 @@ $1",
 'rcshowhidemine' => '$1 мои уредувања',
 'rclinks' => 'Прикажи скорешни $1 промени во последните $2 дена<br />$3',
 'diff' => 'разл',
-'hist' => 'ист',
+'hist' => 'истор',
 'hide' => 'Скриј',
 'show' => 'Прикажи',
 'minoreditletter' => 'с',
index 0cb4671..2d4e482 100644 (file)
@@ -910,7 +910,7 @@ $3',
 'uploaderror' => 'Файл сæвæрыны рæдыд',
 'uploadlogpage' => 'Æвгæндты лог',
 'filename' => 'Файлы ном',
-'filedesc' => 'Ð\98вдÑ\82Ñ\8bÑ\82Ñ\8b Ð°фыст:',
+'filedesc' => 'Ð\90фыст:',
 'minlength1' => 'Файлы номы хъуамæ æппынкъаддæр иу дамгъæ уа.',
 'badfilename' => 'Нывы ном ивд æрцыдис. Ныр хуины «$1».',
 'savefile' => 'Бавæр æй',
index 13d71b8..95dc0d0 100644 (file)
@@ -986,6 +986,7 @@ $2
 'note' => "'''Примечание:'''",
 'previewnote' => "'''Помните, что это только предварительный просмотр.'''
 Ваши изменения ещё не были сохранены!",
+'continue-editing' => 'Продолжить редактирование',
 'previewconflict' => 'Этот предварительный просмотр отражает текст в верхнем окне редактирования так, как он будет выглядеть, если вы решите записать его.',
 'session_fail_preview' => "'''К сожалению, сервер не смог обработать вашу правку из-за потери идентификатора сессии.
 Пожалуйста, попробуйте ещё раз.
index dbdf9a3..593c305 100644 (file)
@@ -215,7 +215,7 @@ $messages = array(
 'mytalk' => 'என் பேச்சு',
 'anontalk' => 'இந்த ஐ.பி. முகவரிக்கான பேச்சு',
 'navigation' => 'வழிசெலுத்தல்',
-'and' => '&#32;மற்றும்',
+'and' => ' மற்றும்',
 
 # Cologne Blue skin
 'qbfind' => 'கண்டுபிடி',
@@ -3337,7 +3337,7 @@ $5
 'version-variables' => 'மாறிகள்',
 'version-antispam' => ' குப்பை (spam) தடுப்பு',
 'version-skins' => 'தோல்கள்',
-'version-other' => 'மறà¯\8dறவà¯\88',
+'version-other' => 'பிறரà¯\8d',
 'version-mediahandlers' => 'ஊடக கையாளிகள்',
 'version-hooks' => 'கொக்கிகள்',
 'version-extension-functions' => 'நீட்சி செயற்பாடுகள்',
@@ -3348,7 +3348,7 @@ $5
 'version-version' => '(பதிப்பு $1)',
 'version-license' => 'அனுமதி',
 'version-poweredby-credits' => "இந்த் விக்கி '''[//www.mediawiki.org/ MediaWiki]''' இதன் மூலம் வழங்கப்படுகிறது, காப்புரிமை © 2001-$1 $2.",
-'version-poweredby-others' => 'மறà¯\8dறவà¯\88à®\95ள்',
+'version-poweredby-others' => 'பிறர்',
 'version-license-info' => 'மீடியாவிக்கியானது இலவச மென்பொருள்.இதை நீங்கள் மற்றவர்களுக்கு கொடுப்பது அல்லது திருத்தம் செய்வது இலவச மென்பொருள் அறக்கட்டளை வழங்கிய   GNUவின் பொது உரிம விதிகளுக்குட்பட்டது;உரிமத்தின் இரண்டாவது பதிப்பு அல்லது அதற்கு மேற்பட்ட பதிப்பு (உங்கள் விருப்பத்திற்க்கேற்றவாறு).
 மீடியா உபயோகப்படக்கூடியது என்ற நம்பிக்கையில் வெளியிடப்பட்டுள்ளது, ஆனால் இதற்க்கு உத்தரவாதம் கிடையாது.மேலும் வணிகத்தன்மைக்கான அல்லது ஒரு குறிப்பிட்ட செயலுக்காகவும் உத்தரவாதம் கிடையாது.மேலும் விவரங்களுக்கு GNU பொது உரிமத்தை பார்க்கவும்.
 நீங்கள் இந்த  மென்பொருளுடன் [{{SERVER}}{{SCRIPTPATH}}/COPYING a copy of the GNU General Public License] பெற்றீருப்பிர்கள்;இல்லையெனில் , Free Software Foundation, Inc.,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA க்கு எழுதவும்.அல்லது [//www.gnu.org/licenses/old-licenses/gpl-2.0.html read it online].',
index cac83ff..695bd37 100644 (file)
@@ -955,6 +955,7 @@ $2
 Подібні проблеми можуть виникати при використанні анонімізуючих веб-проксі, що містять помилки.'''",
 'edit_form_incomplete' => "'''Частина даних із форми редагування не досягла сервера. Уважно перевірте чи не пошкоджено ваших правок і спробуйте ще раз.'''",
 'editing' => 'Редагування $1',
+'creating' => 'Створення $1',
 'editingsection' => 'Редагування $1 (розділ)',
 'editingcomment' => 'Редагування $1 (новий розділ)',
 'editconflict' => 'Конфлікт редагування: $1',
index 6e7f643..8da71aa 100644 (file)
@@ -889,6 +889,7 @@ $2
 'updated' => '(已更新)',
 'note' => "'''注意:'''",
 'previewnote' => "'''请记住这仅为预览。'''您的更改还未保存!",
+'continue-editing' => '继续编辑',
 'previewconflict' => '这个预览显示了上面文字编辑区中的内容。它将在你选择保存后出现。',
 'session_fail_preview' => "'''抱歉!由于会话数据丢失,我们不能处理你的编辑。'''请重试。如果再次失败,请尝试[[Special:UserLogout|退出]]后重新登录。",
 'session_fail_preview_html' => "'''抱歉!我们不能处理你在进程数据丢失时的编辑。'''
@@ -1425,7 +1426,7 @@ $1",
 'right-editusercss' => '编辑其他用户的CSS文件',
 'right-edituserjs' => '编辑其他用户的JavaScript文件',
 'right-rollback' => '快速回退最后对特定页面作出的编辑的用户的所有编辑',
-'right-markbotedits' => '标示复原编辑作机械人编辑',
+'right-markbotedits' => '将回退编辑标记为机器人编辑动作',
 'right-noratelimit' => '没有使用频率限制',
 'right-import' => '由其它wiki中导入页面',
 'right-importupload' => '由文件上传中导入页面',
@@ -2014,6 +2015,7 @@ $1',
 'allpages-hide-redirects' => '隐藏重定向页',
 
 # SpecialCachedPage
+'cachedspecial-viewing-cached-ttl' => '你正在浏览本页的缓存版本,至多可能存在 $1 的延迟。',
 'cachedspecial-refresh-now' => '查看最新的。',
 
 # Special:Categories
@@ -3596,6 +3598,7 @@ MediaWiki是基于使用目的而加以发布,然而不负任何担保责任
 'version-software' => '已安装的软件',
 'version-software-product' => '产品',
 'version-software-version' => '版本',
+'version-entrypoints-header-url' => 'URL',
 
 # Special:FilePath
 'filepath' => '文件路径',
index 6752166..11f0cd5 100644 (file)
@@ -444,6 +444,13 @@ class TextPassDumper extends BackupDumper {
                                        } else {
                                                $text = $this->getTextDb( $id );
                                        }
+
+                                       // No more checks for texts from DB for now.
+                                       // If we received something that is not false,
+                                       // We treat it as good text, regardless of whether it actually is or is not
+                                       if ( $text !== false ) {
+                                               return $text;
+                                       }
                                }
 
                                if ( $text === false ) {
@@ -480,20 +487,22 @@ class TextPassDumper extends BackupDumper {
                        // Something went wrong; we did not a text that was plausible :(
                        $failures++;
 
-
-                       // After backing off for some time, we try to reboot the whole process as
-                       // much as possible to not carry over failures from one part to the other
-                       // parts
-                       sleep( $this->failureTimeout );
-                       try {
-                               $this->rotateDb();
-                               if ( $this->spawn ) {
-                                       $this->closeSpawn();
-                                       $this->openSpawn();
+                       // A failure in a prefetch hit does not warrant resetting db connection etc.
+                       if ( ! $tryIsPrefetch ) {
+                               // After backing off for some time, we try to reboot the whole process as
+                               // much as possible to not carry over failures from one part to the other
+                               // parts
+                               sleep( $this->failureTimeout );
+                               try {
+                                       $this->rotateDb();
+                                       if ( $this->spawn ) {
+                                               $this->closeSpawn();
+                                               $this->openSpawn();
+                                       }
+                               } catch ( Exception $e ) {
+                                       $this->progress( "Rebooting getText infrastructure failed (" . $e->getMessage() . ")" .
+                                               " Trying to continue anyways" );
                                }
-                       } catch ( Exception $e ) {
-                               $this->progress( "Rebooting getText infrastructure failed (" . $e->getMessage() . ")" .
-                                       " Trying to continue anyways" );
                        }
                }
 
index a7c7ec4..26d7e29 100644 (file)
@@ -174,10 +174,10 @@ class RefreshLinks extends Maintenance {
         * @param $id int The page_id of the redirect
         */
        private function fixRedirect( $id ) {
-               $title = Title::newFromID( $id );
+               $page = WikiPage::newFromID( $id );
                $dbw = wfGetDB( DB_MASTER );
 
-               if ( is_null( $title ) ) {
+               if ( $page === null ) {
                        // This page doesn't exist (any more)
                        // Delete any redirect table entry for it
                        $dbw->delete( 'redirect', array( 'rd_from' => $id ),
@@ -185,11 +185,10 @@ class RefreshLinks extends Maintenance {
                        return;
                }
 
-               $page = WikiPage::factory( $title );
                $rt = $page->getRedirectTarget();
 
                if ( $rt === null ) {
-                       // $title is not a redirect
+                       // The page is not a redirect
                        // Delete any redirect table entry for it
                        $dbw->delete( 'redirect', array( 'rd_from' => $id ),
                                __METHOD__ );
@@ -203,26 +202,27 @@ class RefreshLinks extends Maintenance {
        public static function fixLinksFromArticle( $id ) {
                global $wgParser, $wgContLang;
 
-               $title = Title::newFromID( $id );
-               $dbw = wfGetDB( DB_MASTER );
+               $page = WikiPage::newFromID( $id );
 
                LinkCache::singleton()->clear();
 
-               if ( is_null( $title ) ) {
+               if ( $page === null ) {
                        return;
                }
 
-               $revision = Revision::newFromTitle( $title );
-               if ( !$revision ) {
+               $text = $page->getRawText();
+               if ( $text === false ) {
                        return;
                }
 
+               $dbw = wfGetDB( DB_MASTER );
                $dbw->begin( __METHOD__ );
 
                $options = ParserOptions::newFromUserAndLang( new User, $wgContLang );
-               $parserOutput = $wgParser->parse( $revision->getText(), $title, $options, true, true, $revision->getId() );
-               $update = new LinksUpdate( $title, $parserOutput, false );
+               $parserOutput = $wgParser->parse( $text, $page->getTitle(), $options, true, true, $page->getLatest() );
+               $update = new LinksUpdate( $page->getTitle(), $parserOutput, false );
                $update->doUpdate();
+
                $dbw->commit( __METHOD__ );
        }
 
diff --git a/tests/phpunit/includes/cache/GenderCacheTest.php b/tests/phpunit/includes/cache/GenderCacheTest.php
new file mode 100644 (file)
index 0000000..d62ee20
--- /dev/null
@@ -0,0 +1,100 @@
+<?php\r
+\r
+/**\r
+ * @group Database\r
+ * @group Cache\r
+ */\r
+class GenderCacheTest extends MediaWikiLangTestCase {\r
+\r
+       function setUp() {\r
+               parent::setUp();\r
+               //ensure the correct default gender\r
+               $wgDefaultUserOptions['gender'] = 'unknown';\r
+       }\r
+\r
+       function addDBData() {\r
+               $user = User::newFromName( 'UTMale' );\r
+               if( $user->getID() == 0 ) {\r
+                       $user->addToDatabase();\r
+                       $user->setPassword( 'UTMalePassword' );\r
+               }\r
+               //ensure the right gender\r
+               $user->setOption( 'gender', 'male' );\r
+               $user->saveSettings();\r
+\r
+               $user = User::newFromName( 'UTFemale' );\r
+               if( $user->getID() == 0 ) {\r
+                       $user->addToDatabase();\r
+                       $user->setPassword( 'UTFemalePassword' );\r
+               }\r
+               //ensure the right gender\r
+               $user->setOption( 'gender', 'female' );\r
+               $user->saveSettings();\r
+\r
+               $user = User::newFromName( 'UTDefaultGender' );\r
+               if( $user->getID() == 0 ) {\r
+                       $user->addToDatabase();\r
+                       $user->setPassword( 'UTDefaultGenderPassword' );\r
+               }\r
+               //ensure the default gender\r
+               $user->setOption( 'gender', null );\r
+               $user->saveSettings();\r
+       }\r
+\r
+       /**\r
+        * test usernames\r
+        *\r
+        * @dataProvider dataUserName\r
+        */\r
+       function testUserName( $username, $expectedGender ) {\r
+               $genderCache = GenderCache::singleton();\r
+               $gender = $genderCache->getGenderOf( $username );\r
+               $this->assertEquals( $gender, $expectedGender, "GenderCache normal" );\r
+       }\r
+\r
+       /**\r
+        * genderCache should work with user objects, too\r
+        *\r
+        * @dataProvider dataUserName\r
+        */\r
+       function testUserObjects( $username, $expectedGender ) {\r
+               $genderCache = GenderCache::singleton();\r
+               $user = User::newFromName( $username );\r
+               $gender = $genderCache->getGenderOf( $user );\r
+               $this->assertEquals( $gender, $expectedGender, "GenderCache normal" );\r
+       }\r
+\r
+       function dataUserName() {\r
+               return array(\r
+                       array( 'UTMale', 'male' ),\r
+                       array( 'UTFemale', 'female' ),\r
+                       array( 'UTDefaultGender', 'unknown' ),\r
+                       array( 'UTNotExist', 'unknown' ),\r
+                       //some not valid user\r
+                       array( '127.0.0.1', 'unknown' ),\r
+                       array( 'user@test', 'unknown' ),\r
+               );\r
+       }\r
+\r
+       /**\r
+        * test strip of subpages to avoid unnecessary queries\r
+        * against the never existing username\r
+        *\r
+        * @dataProvider dataStripSubpages\r
+        */\r
+       function testStripSubpages( $pageWithSubpage, $expectedGender ) {\r
+               $genderCache = GenderCache::singleton();\r
+               $gender = $genderCache->getGenderOf( $pageWithSubpage );\r
+               $this->assertEquals( $gender, $expectedGender, "GenderCache must strip of subpages" );\r
+       }\r
+\r
+       function dataStripSubpages() {\r
+               return array(\r
+                       array( 'UTMale/subpage', 'male' ),\r
+                       array( 'UTFemale/subpage', 'female' ),\r
+                       array( 'UTDefaultGender/subpage', 'unknown' ),\r
+                       array( 'UTNotExist/subpage', 'unknown' ),\r
+                       array( '127.0.0.1/subpage', 'unknown' ),\r
+               );\r
+       }\r
+}\r
index 612c368..af88bc8 100644 (file)
@@ -1022,6 +1022,58 @@ class FileBackendTest extends MediaWikiTestCase {
                }
        }
 
+       public function testRecursiveClean() {
+               $this->backend = $this->singleBackend;
+               $this->doTestRecursiveClean();
+               $this->tearDownFiles();
+
+               $this->backend = $this->multiBackend;
+               $this->doTestRecursiveClean();
+               $this->tearDownFiles();
+       }
+
+       function doTestRecursiveClean() {
+               $backendName = $this->backendClass();
+
+               $base = $this->baseStorePath();
+               $dirs = array(
+                       "$base/unittest-cont1/a",
+                       "$base/unittest-cont1/a/b",
+                       "$base/unittest-cont1/a/b/c",
+                       "$base/unittest-cont1/a/b/c/d0",
+                       "$base/unittest-cont1/a/b/c/d1",
+                       "$base/unittest-cont1/a/b/c/d2",
+                       "$base/unittest-cont1/a/b/c/d0/1",
+                       "$base/unittest-cont1/a/b/c/d0/2",
+                       "$base/unittest-cont1/a/b/c/d1/3",
+                       "$base/unittest-cont1/a/b/c/d1/4",
+                       "$base/unittest-cont1/a/b/c/d2/5",
+                       "$base/unittest-cont1/a/b/c/d2/6"
+               );
+               foreach ( $dirs as $dir ) {
+                       $status = $this->prepare( array( 'dir' => $dir ) );
+                       $this->assertEquals( array(), $status->errors,
+                               "Preparing dir $dir succeeded without warnings ($backendName)." );
+               }
+
+               if ( $this->backend instanceof FSFileBackend ) {
+                       foreach ( $dirs as $dir ) {
+                               $this->assertEquals( true, $this->backend->directoryExists( array( 'dir' => $dir ) ),
+                                       "Dir $dir exists ($backendName)." );
+                       }
+               }
+
+               $status = $this->backend->clean(
+                       array( 'dir' => "$base/unittest-cont1", 'recursive' => 1 ) );
+               $this->assertEquals( array(), $status->errors,
+                       "Recursive cleaning of dir $dir succeeded without warnings ($backendName)." );
+
+               foreach ( $dirs as $dir ) {
+                       $this->assertEquals( false, $this->backend->directoryExists( array( 'dir' => $dir ) ),
+                               "Dir $dir no longer exists ($backendName)." );
+               }
+       }
+
        // @TODO: testSecure
 
        public function testDoOperations() {
index d18b33b..e3f780b 100755 (executable)
@@ -18,6 +18,16 @@ define( 'MW_PHPUNIT_TEST', true );
 require_once( "$IP/maintenance/Maintenance.php" );
 
 class PHPUnitMaintClass extends Maintenance {
+
+       function __construct() {
+               parent::__construct();
+               $this->addOption( 'with-phpunitdir'
+                       , 'Directory to include PHPUnit from, for example when using a git fetchout from upstream. Path will be prepended to PHP `include_path`.'
+                       , false # not required
+                       , true  # need arg
+               );
+       }
+
        public function finalSetup() {
                parent::finalSetup();
 
@@ -37,7 +47,42 @@ class PHPUnitMaintClass extends Maintenance {
 
                $wgLocalisationCacheConf['storeClass'] =  'LCStore_Null';
        }
-       public function execute() { }
+
+       public function execute() {
+               global $IP;
+
+               # Make sure we have --configuration or PHPUnit might complain
+               if( !in_array( '--configuration', $_SERVER['argv'] ) ) {
+                       //Hack to eliminate the need to use the Makefile (which sucks ATM)
+                       array_splice( $_SERVER['argv'], 1, 0,
+                               array( '--configuration', $IP . '/tests/phpunit/suite.xml' ) );
+               }
+
+               # --with-phpunitdir let us override the default PHPUnit version
+               if( $phpunitDir = $this->getOption( 'with-phpunitdir' ) ) {
+                       # Sanity checks
+                       if( !is_dir($phpunitDir) ) {
+                               $this->error( "--with-phpunitdir should be set to an existing directory", 1 );
+                       }
+                       if( !is_readable( $phpunitDir."/PHPUnit/Runner/Version.php" ) ) {
+                               $this->error( "No usable PHPUnit installation in $phpunitDir.\nAborting.\n", 1 );
+                       }
+
+                       # Now prepends provided PHPUnit directory
+                       $this->output( "Will attempt loading PHPUnit from `$phpunitDir`\n" );
+                       set_include_path( $phpunitDir
+                               . PATH_SEPARATOR . get_include_path() );
+
+                       # Cleanup $args array so the option and its value do not
+                       # pollute PHPUnit
+                       $key = array_search( '--with-phpunitdir', $_SERVER['argv'] );
+                       unset( $_SERVER['argv'][$key]   ); // the option
+                       unset( $_SERVER['argv'][$key+1] ); // its value
+                       $_SERVER['argv'] = array_values( $_SERVER['argv'] );
+
+               }
+       }
+
        public function getDbType() {
                return Maintenance::DB_ADMIN;
        }
@@ -46,18 +91,13 @@ class PHPUnitMaintClass extends Maintenance {
 $maintClass = 'PHPUnitMaintClass';
 require( RUN_MAINTENANCE_IF_MAIN );
 
-if( !in_array( '--configuration', $_SERVER['argv'] ) ) {
-       //Hack to eliminate the need to use the Makefile (which sucks ATM)
-       array_splice( $_SERVER['argv'], 1, 0,
-               array( '--configuration', $IP . '/tests/phpunit/suite.xml' ) );
-}
-
 require_once( 'PHPUnit/Runner/Version.php' );
-if( version_compare( PHPUnit_Runner_Version::id(), '3.5.0', '<' ) ) {
+
+if( PHPUnit_Runner_Version::id() !== '@package_version@'
+   && version_compare( PHPUnit_Runner_Version::id(), '3.5.0', '<' ) ) {
        die( 'PHPUnit 3.5 or later required, you have ' . PHPUnit_Runner_Version::id() . ".\n" );
 }
 require_once( 'PHPUnit/Autoload.php' );
 
 require_once( "$IP/tests/TestsAutoLoader.php" );
 MediaWikiPHPUnitCommand::main();
-