Merge "(bug 46547) use content language for rotation comment"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 26 Mar 2013 19:53:53 +0000 (19:53 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 26 Mar 2013 19:53:53 +0000 (19:53 +0000)
28 files changed:
.jshintignore
docs/title.txt
includes/AutoLoader.php
includes/GlobalFunctions.php
includes/ImagePage.php
includes/Linker.php
includes/Title.php
includes/api/ApiQuery.php
includes/api/ApiQueryBase.php
includes/filerepo/file/ForeignAPIFile.php
includes/logging/DeleteLogFormatter.php [new file with mode: 0644]
includes/logging/LogFormatter.php
includes/logging/MoveLogFormatter.php [new file with mode: 0644]
includes/logging/NewUsersLogFormatter.php [new file with mode: 0644]
includes/logging/PatrolLogFormatter.php [new file with mode: 0644]
includes/logging/RightsLogFormatter.php [new file with mode: 0644]
includes/parser/CoreParserFunctions.php
includes/parser/Parser.php
includes/specials/SpecialFileDuplicateSearch.php
includes/specials/SpecialWithoutinterwiki.php
languages/classes/LanguageIu.php
languages/classes/LanguageKk.php
languages/classes/LanguageKu.php
languages/classes/LanguageShi.php
languages/classes/LanguageSr.php
maintenance/dumpLinks.php
tests/phpunit/includes/TitleTest.php
tests/phpunit/includes/normal/CleanUpTest.php

index 3869deb..30b6ee1 100644 (file)
@@ -1,3 +1,7 @@
+# Generated documentation
+docs/html/
+docs/js/
+
 # third-party libs
 extensions/
 node_modules/
index d2d91c9..454711d 100644 (file)
@@ -8,7 +8,7 @@ and can be queried for the others, and for other attributes of the title. This
 is intended to be an immutable "value" class, so there are no mutator functions.
 
 To get a new instance, call Title::newFromText(). Once instantiated, the
-non-static accessor methods can be used, such as getText(), getDBKey(),
+non-static accessor methods can be used, such as getText(), getDBkey(),
 getNamespace(), etc. Note that Title::newFromText() may return false if the text
 is illegal according to the rules below.
 
@@ -36,11 +36,11 @@ An initial colon in a title listed in wiki text may however suppress special
 handling for interlanguage links, image links, and category links. It is also
 used to indicate the main namespace in template inclusions.
 
-Once prefixes have been stripped, the rest of the title processed this way: 
+Once prefixes have been stripped, the rest of the title processed this way:
 
 * Spaces and underscores are treated as equivalent and each  is converted to the
   other in the appropriate context (underscore in URL and database keys, spaces
-  in plain text). 
+  in plain text).
 * Multiple consecutive spaces are converted to a single space.
 * Leading or trailing space is removed.
 * If $wgCapitalLinks is enabled (the default), the first letter is  capitalised,
@@ -58,7 +58,7 @@ UTF-8, because that is the size of the database field. Special page titles may
 be up to 512 bytes.
 
 Note that Unicode Normal Form C (NFC) is enforced by MediaWiki's user interface
-input functions, and so titles will typically be in this form. 
+input functions, and so titles will typically be in this form.
 
 getArticleID() needs some explanation: for "internal" articles, it should return
 the "page_id" field if the article exists, else it returns 0. For all external
index ad12fbc..7b6b3e0 100644 (file)
@@ -701,7 +701,7 @@ $wgAutoloadLocalClasses = array(
 
        # includes/logging
        'DatabaseLogEntry' => 'includes/logging/LogEntry.php',
-       'DeleteLogFormatter' => 'includes/logging/LogFormatter.php',
+       'DeleteLogFormatter' => 'includes/logging/DeleteLogFormatter.php',
        'LegacyLogFormatter' => 'includes/logging/LogFormatter.php',
        'LogEntry' => 'includes/logging/LogEntry.php',
        'LogEventsList' => 'includes/logging/LogEventsList.php',
@@ -710,12 +710,12 @@ $wgAutoloadLocalClasses = array(
        'LogPage' => 'includes/logging/LogPage.php',
        'LogPager' => 'includes/logging/LogPager.php',
        'ManualLogEntry' => 'includes/logging/LogEntry.php',
-       'MoveLogFormatter' => 'includes/logging/LogFormatter.php',
-       'NewUsersLogFormatter' => 'includes/logging/LogFormatter.php',
+       'MoveLogFormatter' => 'includes/logging/MoveLogFormatter.php',
+       'NewUsersLogFormatter' => 'includes/logging/NewUsersLogFormatter.php',
        'PatrolLog' => 'includes/logging/PatrolLog.php',
-       'PatrolLogFormatter' => 'includes/logging/LogFormatter.php',
+       'PatrolLogFormatter' => 'includes/logging/PatrolLogFormatter.php',
        'RCDatabaseLogEntry' => 'includes/logging/LogEntry.php',
-       'RightsLogFormatter' => 'includes/logging/LogFormatter.php',
+       'RightsLogFormatter' => 'includes/logging/RightsLogFormatter.php',
 
        # includes/media
        'BitmapHandler' => 'includes/media/Bitmap.php',
index 0b291ec..9042926 100644 (file)
@@ -3940,7 +3940,7 @@ function wfIsBadImage( $name, $contextTitle = false, $blacklist = null ) {
        # Handle redirects
        $redirectTitle = RepoGroup::singleton()->checkRedirect( Title::makeTitle( NS_FILE, $name ) );
        if( $redirectTitle ) {
-               $name = $redirectTitle->getDbKey();
+               $name = $redirectTitle->getDBkey();
        }
 
        # Run the extension hook
index aba9ab5..b5b69df 100644 (file)
@@ -719,7 +719,7 @@ EOT
                $limit = 100;
 
                $out = $this->getContext()->getOutput();
-               $res = $this->queryImageLinks( $this->getTitle()->getDbKey(), $limit + 1 );
+               $res = $this->queryImageLinks( $this->getTitle()->getDBkey(), $limit + 1 );
                $rows = array();
                $redirects = array();
                foreach ( $res as $row ) {
index 972adfc..4f1d10e 100644 (file)
@@ -961,7 +961,7 @@ class Linker {
         */
        protected static function getUploadUrl( $destFile, $query = '' ) {
                global $wgUploadMissingFileUrl, $wgUploadNavigationUrl;
-               $q = 'wpDestFile=' . $destFile->getPartialUrl();
+               $q = 'wpDestFile=' . $destFile->getPartialURL();
                if ( $query != '' )
                        $q .= '&' . $query;
 
@@ -1527,7 +1527,7 @@ class Linker {
                                        $nodotdot = substr( $nodotdot, 3 );
                                }
                                if ( $dotdotcount > 0 ) {
-                                       $exploded = explode( '/', $contextTitle->GetPrefixedText() );
+                                       $exploded = explode( '/', $contextTitle->getPrefixedText() );
                                        if ( count( $exploded ) > $dotdotcount ) { # not allowed to go below top level page
                                                $ret = implode( '/', array_slice( $exploded, 0, -$dotdotcount ) );
                                                # / at the end means don't show full path
index 80be529..5ce742c 100644 (file)
@@ -4070,8 +4070,8 @@ class Title {
 
                if ( $res->numRows() > 0 ) {
                        foreach ( $res as $row ) {
-                               // $data[] = Title::newFromText($wgContLang->getNSText ( NS_CATEGORY ).':'.$row->cl_to);
-                               $data[$wgContLang->getNSText( NS_CATEGORY ) . ':' . $row->cl_to] = $this->getFullText();
+                               // $data[] = Title::newFromText($wgContLang->getNsText ( NS_CATEGORY ).':'.$row->cl_to);
+                               $data[$wgContLang->getNsText( NS_CATEGORY ) . ':' . $row->cl_to] = $this->getFullText();
                        }
                }
                return $data;
index f69ad23..7c64996 100644 (file)
@@ -513,7 +513,7 @@ class ApiQuery extends ApiBase {
                        ApiQueryBase::addTitleInfo( $vals, $title );
                        $vals['special'] = '';
                        if ( $title->isSpecialPage() &&
-                                       !SpecialPageFactory::exists( $title->getDbKey() ) ) {
+                                       !SpecialPageFactory::exists( $title->getDBkey() ) ) {
                                $vals['missing'] = '';
                        } elseif ( $title->getNamespace() == NS_MEDIA &&
                                        !wfFindFile( $title ) ) {
index 7819ead..44fbf58 100644 (file)
@@ -432,7 +432,7 @@ abstract class ApiQueryBase extends ApiBase {
                if ( trim( $key ) == '' ) {
                        return '';
                }
-               $t = Title::newFromDbKey( $key );
+               $t = Title::newFromDBkey( $key );
                // This really shouldn't happen but we gotta check anyway
                if ( !$t ) {
                        $this->dieUsageMsg( array( 'invalidtitle', $key ) );
index 4cc6308..edf623e 100644 (file)
@@ -54,7 +54,7 @@ class ForeignAPIFile extends File {
         */
        static function newFromTitle( Title $title, $repo ) {
                $data = $repo->fetchImageQuery( array(
-                       'titles'            => 'File:' . $title->getDBKey(),
+                       'titles'            => 'File:' . $title->getDBkey(),
                        'iiprop'            => self::getProps(),
                        'prop'              => 'imageinfo',
                        'iimetadataversion' => MediaHandler::getMetadataVersion()
diff --git a/includes/logging/DeleteLogFormatter.php b/includes/logging/DeleteLogFormatter.php
new file mode 100644 (file)
index 0000000..8a9e6db
--- /dev/null
@@ -0,0 +1,196 @@
+<?php
+/**
+ * Formatter for delete log entries.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @author Niklas Laxström
+ * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
+ * @since 1.21
+ */
+
+/**
+ * This class formats delete log entries.
+ *
+ * @since 1.19
+ */
+class DeleteLogFormatter extends LogFormatter {
+       protected function getMessageKey() {
+               $key = parent::getMessageKey();
+               if ( in_array( $this->entry->getSubtype(), array( 'event', 'revision' ) ) ) {
+                       if ( count( $this->getMessageParameters() ) < 5 ) {
+                               return "$key-legacy";
+                       }
+               }
+               return $key;
+       }
+
+       protected function getMessageParameters() {
+               if ( isset( $this->parsedParametersDeleteLog ) ) {
+                       return $this->parsedParametersDeleteLog;
+               }
+
+               $params = parent::getMessageParameters();
+               $subtype = $this->entry->getSubtype();
+               if ( in_array( $subtype, array( 'event', 'revision' ) ) ) {
+                       // $params[3] here is 'revision' for page revisions, 'oldimage' for file versions, or a comma-separated list of log_ids for log entries.
+                       // $subtype here is 'revision' for page revisions and file versions, or 'event' for log entries.
+                       if (
+                               ( $subtype === 'event' && count( $params ) === 6 ) ||
+                               ( $subtype === 'revision' && isset( $params[3] ) && ( $params[3] === 'revision' || $params[3] === 'oldimage' ) )
+                       ) {
+                               $paramStart = $subtype === 'revision' ? 4 : 3;
+
+                               $old = $this->parseBitField( $params[$paramStart+1] );
+                               $new = $this->parseBitField( $params[$paramStart+2] );
+                               list( $hid, $unhid, $extra ) = RevisionDeleter::getChanges( $new, $old );
+                               $changes = array();
+                               foreach ( $hid as $v ) {
+                                       $changes[] = $this->msg( "$v-hid" )->plain();
+                               }
+                               foreach ( $unhid as $v ) {
+                                       $changes[] = $this->msg( "$v-unhid" )->plain();
+                               }
+                               foreach ( $extra as $v ) {
+                                       $changes[] = $this->msg( $v )->plain();
+                               }
+                               $changeText = $this->context->getLanguage()->listToText( $changes );
+
+                               $newParams = array_slice( $params, 0, 3 );
+                               $newParams[3] = $changeText;
+                               $count = count( explode( ',', $params[$paramStart] ) );
+                               $newParams[4] = $this->context->getLanguage()->formatNum( $count );
+                               return $this->parsedParametersDeleteLog = $newParams;
+                       } else {
+                               return $this->parsedParametersDeleteLog = array_slice( $params, 0, 3 );
+                       }
+               }
+
+               return $this->parsedParametersDeleteLog = $params;
+       }
+
+       protected function parseBitField( $string ) {
+               // Input is like ofield=2134 or just the number
+               if ( strpos( $string, 'field=' ) === 1 ) {
+                       list( , $field ) = explode( '=', $string );
+                       return (int) $field;
+               } else {
+                       return (int) $string;
+               }
+       }
+
+       public function getActionLinks() {
+               $user = $this->context->getUser();
+               if ( !$user->isAllowed( 'deletedhistory' ) || $this->entry->isDeleted( LogPage::DELETED_ACTION ) ) {
+                       return '';
+               }
+
+               switch ( $this->entry->getSubtype() ) {
+               case 'delete': // Show undelete link
+                       if( $user->isAllowed( 'undelete' ) ) {
+                               $message = 'undeletelink';
+                       } else {
+                               $message = 'undeleteviewlink';
+                       }
+                       $revert = Linker::linkKnown(
+                               SpecialPage::getTitleFor( 'Undelete' ),
+                               $this->msg( $message )->escaped(),
+                               array(),
+                               array( 'target' => $this->entry->getTarget()->getPrefixedDBkey() )
+                       );
+                       return $this->msg( 'parentheses' )->rawParams( $revert )->escaped();
+
+               case 'revision': // If an edit was hidden from a page give a review link to the history
+                       $params = $this->extractParameters();
+                       if ( !isset( $params[3] ) || !isset( $params[4] ) ) {
+                               return '';
+                       }
+
+                       // Different revision types use different URL params...
+                       $key = $params[3];
+                       // This is a CSV of the IDs
+                       $ids = explode( ',', $params[4] );
+
+                       $links = array();
+
+                       // If there's only one item, we can show a diff link
+                       if ( count( $ids ) == 1 ) {
+                               // Live revision diffs...
+                               if ( $key == 'oldid' || $key == 'revision' ) {
+                                       $links[] = Linker::linkKnown(
+                                               $this->entry->getTarget(),
+                                               $this->msg( 'diff' )->escaped(),
+                                               array(),
+                                               array(
+                                                       'diff' => intval( $ids[0] ),
+                                                       'unhide' => 1
+                                               )
+                                       );
+                               // Deleted revision diffs...
+                               } elseif ( $key == 'artimestamp' || $key == 'archive' ) {
+                                       $links[] = Linker::linkKnown(
+                                               SpecialPage::getTitleFor( 'Undelete' ),
+                                               $this->msg( 'diff' )->escaped(),
+                                               array(),
+                                               array(
+                                                       'target'    => $this->entry->getTarget()->getPrefixedDBkey(),
+                                                       'diff'      => 'prev',
+                                                       'timestamp' => $ids[0]
+                                               )
+                                       );
+                               }
+                       }
+
+                       // View/modify link...
+                       $links[] = Linker::linkKnown(
+                               SpecialPage::getTitleFor( 'Revisiondelete' ),
+                               $this->msg( 'revdel-restore' )->escaped(),
+                               array(),
+                               array(
+                                       'target' => $this->entry->getTarget()->getPrefixedText(),
+                                       'type' => $key,
+                                       'ids' => implode( ',', $ids ),
+                               )
+                       );
+
+                       return $this->msg( 'parentheses' )->rawParams(
+                               $this->context->getLanguage()->pipeList( $links ) )->escaped();
+
+               case 'event': // Hidden log items, give review link
+                       $params = $this->extractParameters();
+                       if ( !isset( $params[3] ) ) {
+                               return '';
+                       }
+                       // This is a CSV of the IDs
+                       $query = $params[3];
+                       // Link to each hidden object ID, $params[1] is the url param
+                       $revert = Linker::linkKnown(
+                               SpecialPage::getTitleFor( 'Revisiondelete' ),
+                               $this->msg( 'revdel-restore' )->escaped(),
+                               array(),
+                               array(
+                                       'target' => $this->entry->getTarget()->getPrefixedText(),
+                                       'type' => 'logging',
+                                       'ids' => $query
+                               )
+                       );
+                       return $this->msg( 'parentheses' )->rawParams( $revert )->escaped();
+               default:
+                       return '';
+               }
+       }
+}
index ace26bb..683dc03 100644 (file)
@@ -814,395 +814,3 @@ class LegacyLogFormatter extends LogFormatter {
        }
 }
 
-/**
- * This class formats move log entries.
- * @since 1.19
- */
-class MoveLogFormatter extends LogFormatter {
-       public function getPreloadTitles() {
-               $params = $this->extractParameters();
-               return array( Title::newFromText( $params[3] ) );
-       }
-
-       protected function getMessageKey() {
-               $key = parent::getMessageKey();
-               $params = $this->getMessageParameters();
-               if ( isset( $params[4] ) && $params[4] === '1' ) {
-                       $key .= '-noredirect';
-               }
-               return $key;
-       }
-
-       protected function getMessageParameters() {
-               $params = parent::getMessageParameters();
-               $oldname = $this->makePageLink( $this->entry->getTarget(), array( 'redirect' => 'no' ) );
-               $newname = $this->makePageLink( Title::newFromText( $params[3] ) );
-               $params[2] = Message::rawParam( $oldname );
-               $params[3] = Message::rawParam( $newname );
-               return $params;
-       }
-
-       public function getActionLinks() {
-               if ( $this->entry->isDeleted( LogPage::DELETED_ACTION ) // Action is hidden
-                       || $this->entry->getSubtype() !== 'move'
-                       || !$this->context->getUser()->isAllowed( 'move' ) )
-               {
-                       return '';
-               }
-
-               $params = $this->extractParameters();
-               $destTitle = Title::newFromText( $params[3] );
-               if ( !$destTitle ) {
-                       return '';
-               }
-
-               $revert = Linker::linkKnown(
-                       SpecialPage::getTitleFor( 'Movepage' ),
-                       $this->msg( 'revertmove' )->escaped(),
-                       array(),
-                       array(
-                               'wpOldTitle' => $destTitle->getPrefixedDBkey(),
-                               'wpNewTitle' => $this->entry->getTarget()->getPrefixedDBkey(),
-                               'wpReason'   => $this->msg( 'revertmove' )->inContentLanguage()->text(),
-                               'wpMovetalk' => 0
-                       )
-               );
-               return $this->msg( 'parentheses' )->rawParams( $revert )->escaped();
-       }
-}
-
-/**
- * This class formats delete log entries.
- * @since 1.19
- */
-class DeleteLogFormatter extends LogFormatter {
-       protected function getMessageKey() {
-               $key = parent::getMessageKey();
-               if ( in_array( $this->entry->getSubtype(), array( 'event', 'revision' ) ) ) {
-                       if ( count( $this->getMessageParameters() ) < 5 ) {
-                               return "$key-legacy";
-                       }
-               }
-               return $key;
-       }
-
-       protected function getMessageParameters() {
-               if ( isset( $this->parsedParametersDeleteLog ) ) {
-                       return $this->parsedParametersDeleteLog;
-               }
-
-               $params = parent::getMessageParameters();
-               $subtype = $this->entry->getSubtype();
-               if ( in_array( $subtype, array( 'event', 'revision' ) ) ) {
-                       // $params[3] here is 'revision' for page revisions, 'oldimage' for file versions, or a comma-separated list of log_ids for log entries.
-                       // $subtype here is 'revision' for page revisions and file versions, or 'event' for log entries.
-                       if (
-                               ( $subtype === 'event' && count( $params ) === 6 ) ||
-                               ( $subtype === 'revision' && isset( $params[3] ) && ( $params[3] === 'revision' || $params[3] === 'oldimage' ) )
-                       ) {
-                               $paramStart = $subtype === 'revision' ? 4 : 3;
-
-                               $old = $this->parseBitField( $params[$paramStart+1] );
-                               $new = $this->parseBitField( $params[$paramStart+2] );
-                               list( $hid, $unhid, $extra ) = RevisionDeleter::getChanges( $new, $old );
-                               $changes = array();
-                               foreach ( $hid as $v ) {
-                                       $changes[] = $this->msg( "$v-hid" )->plain();
-                               }
-                               foreach ( $unhid as $v ) {
-                                       $changes[] = $this->msg( "$v-unhid" )->plain();
-                               }
-                               foreach ( $extra as $v ) {
-                                       $changes[] = $this->msg( $v )->plain();
-                               }
-                               $changeText = $this->context->getLanguage()->listToText( $changes );
-
-                               $newParams = array_slice( $params, 0, 3 );
-                               $newParams[3] = $changeText;
-                               $count = count( explode( ',', $params[$paramStart] ) );
-                               $newParams[4] = $this->context->getLanguage()->formatNum( $count );
-                               return $this->parsedParametersDeleteLog = $newParams;
-                       } else {
-                               return $this->parsedParametersDeleteLog = array_slice( $params, 0, 3 );
-                       }
-               }
-
-               return $this->parsedParametersDeleteLog = $params;
-       }
-
-       protected function parseBitField( $string ) {
-               // Input is like ofield=2134 or just the number
-               if ( strpos( $string, 'field=' ) === 1 ) {
-                       list( , $field ) = explode( '=', $string );
-                       return (int) $field;
-               } else {
-                       return (int) $string;
-               }
-       }
-
-       public function getActionLinks() {
-               $user = $this->context->getUser();
-               if ( !$user->isAllowed( 'deletedhistory' ) || $this->entry->isDeleted( LogPage::DELETED_ACTION ) ) {
-                       return '';
-               }
-
-               switch ( $this->entry->getSubtype() ) {
-               case 'delete': // Show undelete link
-                       if( $user->isAllowed( 'undelete' ) ) {
-                               $message = 'undeletelink';
-                       } else {
-                               $message = 'undeleteviewlink';
-                       }
-                       $revert = Linker::linkKnown(
-                               SpecialPage::getTitleFor( 'Undelete' ),
-                               $this->msg( $message )->escaped(),
-                               array(),
-                               array( 'target' => $this->entry->getTarget()->getPrefixedDBkey() )
-                       );
-                       return $this->msg( 'parentheses' )->rawParams( $revert )->escaped();
-
-               case 'revision': // If an edit was hidden from a page give a review link to the history
-                       $params = $this->extractParameters();
-                       if ( !isset( $params[3] ) || !isset( $params[4] ) ) {
-                               return '';
-                       }
-
-                       // Different revision types use different URL params...
-                       $key = $params[3];
-                       // This is a CSV of the IDs
-                       $ids = explode( ',', $params[4] );
-
-                       $links = array();
-
-                       // If there's only one item, we can show a diff link
-                       if ( count( $ids ) == 1 ) {
-                               // Live revision diffs...
-                               if ( $key == 'oldid' || $key == 'revision' ) {
-                                       $links[] = Linker::linkKnown(
-                                               $this->entry->getTarget(),
-                                               $this->msg( 'diff' )->escaped(),
-                                               array(),
-                                               array(
-                                                       'diff' => intval( $ids[0] ),
-                                                       'unhide' => 1
-                                               )
-                                       );
-                               // Deleted revision diffs...
-                               } elseif ( $key == 'artimestamp' || $key == 'archive' ) {
-                                       $links[] = Linker::linkKnown(
-                                               SpecialPage::getTitleFor( 'Undelete' ),
-                                               $this->msg( 'diff' )->escaped(),
-                                               array(),
-                                               array(
-                                                       'target'    => $this->entry->getTarget()->getPrefixedDBkey(),
-                                                       'diff'      => 'prev',
-                                                       'timestamp' => $ids[0]
-                                               )
-                                       );
-                               }
-                       }
-
-                       // View/modify link...
-                       $links[] = Linker::linkKnown(
-                               SpecialPage::getTitleFor( 'Revisiondelete' ),
-                               $this->msg( 'revdel-restore' )->escaped(),
-                               array(),
-                               array(
-                                       'target' => $this->entry->getTarget()->getPrefixedText(),
-                                       'type' => $key,
-                                       'ids' => implode( ',', $ids ),
-                               )
-                       );
-
-                       return $this->msg( 'parentheses' )->rawParams(
-                               $this->context->getLanguage()->pipeList( $links ) )->escaped();
-
-               case 'event': // Hidden log items, give review link
-                       $params = $this->extractParameters();
-                       if ( !isset( $params[3] ) ) {
-                               return '';
-                       }
-                       // This is a CSV of the IDs
-                       $query = $params[3];
-                       // Link to each hidden object ID, $params[1] is the url param
-                       $revert = Linker::linkKnown(
-                               SpecialPage::getTitleFor( 'Revisiondelete' ),
-                               $this->msg( 'revdel-restore' )->escaped(),
-                               array(),
-                               array(
-                                       'target' => $this->entry->getTarget()->getPrefixedText(),
-                                       'type' => 'logging',
-                                       'ids' => $query
-                               )
-                       );
-                       return $this->msg( 'parentheses' )->rawParams( $revert )->escaped();
-               default:
-                       return '';
-               }
-       }
-}
-
-/**
- * This class formats patrol log entries.
- * @since 1.19
- */
-class PatrolLogFormatter extends LogFormatter {
-       protected function getMessageKey() {
-               $key = parent::getMessageKey();
-               $params = $this->getMessageParameters();
-               if ( isset( $params[5] ) && $params[5] ) {
-                       $key .= '-auto';
-               }
-               return $key;
-       }
-
-       protected function getMessageParameters() {
-               $params = parent::getMessageParameters();
-
-               $target = $this->entry->getTarget();
-               $oldid = $params[3];
-               $revision = $this->context->getLanguage()->formatNum( $oldid, true );
-
-               if ( $this->plaintext ) {
-                       $revlink = $revision;
-               } elseif ( $target->exists() ) {
-                       $query = array(
-                               'oldid' => $oldid,
-                               'diff' => 'prev'
-                       );
-                       $revlink = Linker::link( $target, htmlspecialchars( $revision ), array(), $query );
-               } else {
-                       $revlink = htmlspecialchars( $revision );
-               }
-
-               $params[3] = Message::rawParam( $revlink );
-               return $params;
-       }
-}
-
-/**
- * This class formats new user log entries.
- * @since 1.19
- */
-class NewUsersLogFormatter extends LogFormatter {
-       protected function getMessageParameters() {
-               $params = parent::getMessageParameters();
-               $subtype = $this->entry->getSubtype();
-               if ( $subtype === 'create2' || $subtype === 'byemail' ) {
-                       if ( isset( $params[3] ) ) {
-                               $target = User::newFromId( $params[3] );
-                       } else {
-                               $target = User::newFromName( $this->entry->getTarget()->getText(), false );
-                       }
-                       $params[2] = Message::rawParam( $this->makeUserLink( $target ) );
-                       $params[3] = $target->getName();
-               }
-               return $params;
-       }
-
-       public function getComment() {
-               $timestamp = wfTimestamp( TS_MW, $this->entry->getTimestamp() );
-               if ( $timestamp < '20080129000000' ) {
-                       # Suppress $comment from old entries (before 2008-01-29),
-                       # not needed and can contain incorrect links
-                       return '';
-               }
-               return parent::getComment();
-       }
-
-       public function getPreloadTitles() {
-               $subtype = $this->entry->getSubtype();
-               if ( $subtype === 'create2' || $subtype === 'byemail' ) {
-                       //add the user talk to LinkBatch for the userLink
-                       return array( Title::makeTitle( NS_USER_TALK, $this->entry->getTarget()->getText() ) );
-               }
-               return array();
-       }
-}
-
-/**
- * This class formats rights log entries.
- * @since 1.21
- */
-class RightsLogFormatter extends LogFormatter {
-       protected function makePageLink( Title $title = null, $parameters = array() ) {
-               global $wgContLang, $wgUserrightsInterwikiDelimiter;
-
-               if ( !$this->plaintext ) {
-                       $text = $wgContLang->ucfirst( $title->getText() );
-                       $parts = explode( $wgUserrightsInterwikiDelimiter, $text, 2 );
-
-                       if ( count( $parts ) === 2 ) {
-                               $titleLink = WikiMap::foreignUserLink( $parts[1], $parts[0],
-                                       htmlspecialchars( $title->getPrefixedText() ) );
-
-                               if ( $titleLink !== false ) {
-                                       return $titleLink;
-                               }
-                       }
-               }
-
-               return parent::makePageLink( $title, $parameters );
-       }
-
-       protected function getMessageKey() {
-               $key = parent::getMessageKey();
-               $params = $this->getMessageParameters();
-               if ( !isset( $params[3] ) && !isset( $params[4] ) ) {
-                       $key .= '-legacy';
-               }
-               return $key;
-       }
-
-       protected function getMessageParameters() {
-               $params = parent::getMessageParameters();
-
-               // Really old entries
-               if ( !isset( $params[3] ) && !isset( $params[4] ) ) {
-                       return $params;
-               }
-
-               $oldGroups = $params[3];
-               $newGroups = $params[4];
-
-               // Less old entries
-               if ( $oldGroups === '' ) {
-                       $oldGroups = array();
-               } elseif ( is_string( $oldGroups ) ) {
-                       $oldGroups = array_map( 'trim', explode( ',', $oldGroups ) );
-               }
-               if ( $newGroups === '' ) {
-                       $newGroups = array();
-               } elseif ( is_string( $newGroups ) ) {
-                       $newGroups = array_map( 'trim', explode( ',', $newGroups ) );
-               }
-
-               $userName = $this->entry->getTarget()->getText();
-               if ( !$this->plaintext && count( $oldGroups ) ) {
-                       foreach ( $oldGroups as &$group ) {
-                               $group = User::getGroupMember( $group, $userName );
-                       }
-               }
-               if ( !$this->plaintext && count( $newGroups ) ) {
-                       foreach ( $newGroups as &$group ) {
-                               $group = User::getGroupMember( $group, $userName );
-                       }
-               }
-
-               $lang = $this->context->getLanguage();
-               if ( count( $oldGroups ) ) {
-                       $params[3] = $lang->listToText( $oldGroups );
-               } else {
-                       $params[3] = $this->msg( 'rightsnone' )->text();
-               }
-               if ( count( $newGroups ) ) {
-                       // Array_values is used here because of bug 42211
-                       // see use of array_unique in UserrightsPage::doSaveUserGroups on $newGroups.
-                       $params[4] = $lang->listToText( array_values( $newGroups ) );
-               } else {
-                       $params[4] = $this->msg( 'rightsnone' )->text();
-               }
-
-               return $params;
-       }
-}
diff --git a/includes/logging/MoveLogFormatter.php b/includes/logging/MoveLogFormatter.php
new file mode 100644 (file)
index 0000000..8dafb4a
--- /dev/null
@@ -0,0 +1,82 @@
+<?php
+/**
+ * Formatter for move log entries.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @author Niklas Laxström
+ * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
+ * @since 1.21
+ */
+
+/**
+ * This class formats move log entries.
+ *
+ * @since 1.19
+ */
+class MoveLogFormatter extends LogFormatter {
+       public function getPreloadTitles() {
+               $params = $this->extractParameters();
+               return array( Title::newFromText( $params[3] ) );
+       }
+
+       protected function getMessageKey() {
+               $key = parent::getMessageKey();
+               $params = $this->getMessageParameters();
+               if ( isset( $params[4] ) && $params[4] === '1' ) {
+                       $key .= '-noredirect';
+               }
+               return $key;
+       }
+
+       protected function getMessageParameters() {
+               $params = parent::getMessageParameters();
+               $oldname = $this->makePageLink( $this->entry->getTarget(), array( 'redirect' => 'no' ) );
+               $newname = $this->makePageLink( Title::newFromText( $params[3] ) );
+               $params[2] = Message::rawParam( $oldname );
+               $params[3] = Message::rawParam( $newname );
+               return $params;
+       }
+
+       public function getActionLinks() {
+               if ( $this->entry->isDeleted( LogPage::DELETED_ACTION ) // Action is hidden
+                       || $this->entry->getSubtype() !== 'move'
+                       || !$this->context->getUser()->isAllowed( 'move' ) )
+               {
+                       return '';
+               }
+
+               $params = $this->extractParameters();
+               $destTitle = Title::newFromText( $params[3] );
+               if ( !$destTitle ) {
+                       return '';
+               }
+
+               $revert = Linker::linkKnown(
+                       SpecialPage::getTitleFor( 'Movepage' ),
+                       $this->msg( 'revertmove' )->escaped(),
+                       array(),
+                       array(
+                               'wpOldTitle' => $destTitle->getPrefixedDBkey(),
+                               'wpNewTitle' => $this->entry->getTarget()->getPrefixedDBkey(),
+                               'wpReason'   => $this->msg( 'revertmove' )->inContentLanguage()->text(),
+                               'wpMovetalk' => 0
+                       )
+               );
+               return $this->msg( 'parentheses' )->rawParams( $revert )->escaped();
+       }
+}
diff --git a/includes/logging/NewUsersLogFormatter.php b/includes/logging/NewUsersLogFormatter.php
new file mode 100644 (file)
index 0000000..ed37b6a
--- /dev/null
@@ -0,0 +1,65 @@
+<?php
+/**
+ * Formatter for new user log entries.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @author Niklas Laxström
+ * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
+ * @since 1.21
+ */
+
+/**
+ * This class formats new user log entries.
+ *
+ * @since 1.19
+ */
+class NewUsersLogFormatter extends LogFormatter {
+       protected function getMessageParameters() {
+               $params = parent::getMessageParameters();
+               $subtype = $this->entry->getSubtype();
+               if ( $subtype === 'create2' || $subtype === 'byemail' ) {
+                       if ( isset( $params[3] ) ) {
+                               $target = User::newFromId( $params[3] );
+                       } else {
+                               $target = User::newFromName( $this->entry->getTarget()->getText(), false );
+                       }
+                       $params[2] = Message::rawParam( $this->makeUserLink( $target ) );
+                       $params[3] = $target->getName();
+               }
+               return $params;
+       }
+
+       public function getComment() {
+               $timestamp = wfTimestamp( TS_MW, $this->entry->getTimestamp() );
+               if ( $timestamp < '20080129000000' ) {
+                       # Suppress $comment from old entries (before 2008-01-29),
+                       # not needed and can contain incorrect links
+                       return '';
+               }
+               return parent::getComment();
+       }
+
+       public function getPreloadTitles() {
+               $subtype = $this->entry->getSubtype();
+               if ( $subtype === 'create2' || $subtype === 'byemail' ) {
+                       //add the user talk to LinkBatch for the userLink
+                       return array( Title::makeTitle( NS_USER_TALK, $this->entry->getTarget()->getText() ) );
+               }
+               return array();
+       }
+}
diff --git a/includes/logging/PatrolLogFormatter.php b/includes/logging/PatrolLogFormatter.php
new file mode 100644 (file)
index 0000000..74ab196
--- /dev/null
@@ -0,0 +1,63 @@
+<?php
+/**
+ * Formatter for new user log entries.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @author Niklas Laxström
+ * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
+ * @since 1.21
+ */
+
+/**
+ * This class formats patrol log entries.
+ *
+ * @since 1.19
+ */
+class PatrolLogFormatter extends LogFormatter {
+       protected function getMessageKey() {
+               $key = parent::getMessageKey();
+               $params = $this->getMessageParameters();
+               if ( isset( $params[5] ) && $params[5] ) {
+                       $key .= '-auto';
+               }
+               return $key;
+       }
+
+       protected function getMessageParameters() {
+               $params = parent::getMessageParameters();
+
+               $target = $this->entry->getTarget();
+               $oldid = $params[3];
+               $revision = $this->context->getLanguage()->formatNum( $oldid, true );
+
+               if ( $this->plaintext ) {
+                       $revlink = $revision;
+               } elseif ( $target->exists() ) {
+                       $query = array(
+                               'oldid' => $oldid,
+                               'diff' => 'prev'
+                       );
+                       $revlink = Linker::link( $target, htmlspecialchars( $revision ), array(), $query );
+               } else {
+                       $revlink = htmlspecialchars( $revision );
+               }
+
+               $params[3] = Message::rawParam( $revlink );
+               return $params;
+       }
+}
diff --git a/includes/logging/RightsLogFormatter.php b/includes/logging/RightsLogFormatter.php
new file mode 100644 (file)
index 0000000..67bd4d0
--- /dev/null
@@ -0,0 +1,112 @@
+<?php
+/**
+ * Formatter for user rights log entries.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @author Alexandre Emsenhuber
+ * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
+ * @since 1.21
+ */
+
+/**
+ * This class formats rights log entries.
+ *
+ * @since 1.21
+ */
+class RightsLogFormatter extends LogFormatter {
+       protected function makePageLink( Title $title = null, $parameters = array() ) {
+               global $wgContLang, $wgUserrightsInterwikiDelimiter;
+
+               if ( !$this->plaintext ) {
+                       $text = $wgContLang->ucfirst( $title->getText() );
+                       $parts = explode( $wgUserrightsInterwikiDelimiter, $text, 2 );
+
+                       if ( count( $parts ) === 2 ) {
+                               $titleLink = WikiMap::foreignUserLink( $parts[1], $parts[0],
+                                       htmlspecialchars( $title->getPrefixedText() ) );
+
+                               if ( $titleLink !== false ) {
+                                       return $titleLink;
+                               }
+                       }
+               }
+
+               return parent::makePageLink( $title, $parameters );
+       }
+
+       protected function getMessageKey() {
+               $key = parent::getMessageKey();
+               $params = $this->getMessageParameters();
+               if ( !isset( $params[3] ) && !isset( $params[4] ) ) {
+                       $key .= '-legacy';
+               }
+               return $key;
+       }
+
+       protected function getMessageParameters() {
+               $params = parent::getMessageParameters();
+
+               // Really old entries
+               if ( !isset( $params[3] ) && !isset( $params[4] ) ) {
+                       return $params;
+               }
+
+               $oldGroups = $params[3];
+               $newGroups = $params[4];
+
+               // Less old entries
+               if ( $oldGroups === '' ) {
+                       $oldGroups = array();
+               } elseif ( is_string( $oldGroups ) ) {
+                       $oldGroups = array_map( 'trim', explode( ',', $oldGroups ) );
+               }
+               if ( $newGroups === '' ) {
+                       $newGroups = array();
+               } elseif ( is_string( $newGroups ) ) {
+                       $newGroups = array_map( 'trim', explode( ',', $newGroups ) );
+               }
+
+               $userName = $this->entry->getTarget()->getText();
+               if ( !$this->plaintext && count( $oldGroups ) ) {
+                       foreach ( $oldGroups as &$group ) {
+                               $group = User::getGroupMember( $group, $userName );
+                       }
+               }
+               if ( !$this->plaintext && count( $newGroups ) ) {
+                       foreach ( $newGroups as &$group ) {
+                               $group = User::getGroupMember( $group, $userName );
+                       }
+               }
+
+               $lang = $this->context->getLanguage();
+               if ( count( $oldGroups ) ) {
+                       $params[3] = $lang->listToText( $oldGroups );
+               } else {
+                       $params[3] = $this->msg( 'rightsnone' )->text();
+               }
+               if ( count( $newGroups ) ) {
+                       // Array_values is used here because of bug 42211
+                       // see use of array_unique in UserrightsPage::doSaveUserGroups on $newGroups.
+                       $params[4] = $lang->listToText( array_values( $newGroups ) );
+               } else {
+                       $params[4] = $this->msg( 'rightsnone' )->text();
+               }
+
+               return $params;
+       }
+}
index 542ac0f..6aef08e 100644 (file)
@@ -555,7 +555,7 @@ class CoreParserFunctions {
                $t = Title::newFromText( $title );
                if ( is_null( $t ) || !$t->canTalk() )
                        return '';
-               return wfEscapeWikiText( $t->getTalkPage()->getPrefixedUrl() );
+               return wfEscapeWikiText( $t->getTalkPage()->getPrefixedURL() );
        }
        static function subjectpagename( $parser, $title = null ) {
                $t = Title::newFromText( $title );
@@ -567,7 +567,7 @@ class CoreParserFunctions {
                $t = Title::newFromText( $title );
                if ( is_null( $t ) )
                        return '';
-               return wfEscapeWikiText( $t->getSubjectPage()->getPrefixedUrl() );
+               return wfEscapeWikiText( $t->getSubjectPage()->getPrefixedURL() );
        }
 
        /**
index 59f32d0..62e76c5 100644 (file)
@@ -2756,7 +2756,7 @@ class Parser {
                        case 'talkpagenamee':
                                if ( $this->mTitle->canTalk() ) {
                                        $talkPage = $this->mTitle->getTalkPage();
-                                       $value = wfEscapeWikiText( $talkPage->getPrefixedUrl() );
+                                       $value = wfEscapeWikiText( $talkPage->getPrefixedURL() );
                                } else {
                                        $value = '';
                                }
@@ -2767,7 +2767,7 @@ class Parser {
                                break;
                        case 'subjectpagenamee':
                                $subjPage = $this->mTitle->getSubjectPage();
-                               $value = wfEscapeWikiText( $subjPage->getPrefixedUrl() );
+                               $value = wfEscapeWikiText( $subjPage->getPrefixedURL() );
                                break;
                        case 'pageid': // requested in bug 23427
                                $pageid = $this->getTitle()->getArticleId();
@@ -3289,7 +3289,7 @@ class Parser {
                if ( !$found && $title ) {
                        if ( !Profiler::instance()->isPersistent() ) {
                                # Too many unique items can kill profiling DBs/collectors
-                               $titleProfileIn = __METHOD__ . "-title-" . $title->getDBKey();
+                               $titleProfileIn = __METHOD__ . "-title-" . $title->getDBkey();
                                wfProfileIn( $titleProfileIn ); // template in
                        }
                        wfProfileIn( __METHOD__ . '-loadtpl' );
index 3fe64e6..cc5cd5b 100644 (file)
@@ -113,14 +113,14 @@ class FileDuplicateSearchPage extends QueryPage {
 
                # Create the input form
                $out->addHTML(
-                       Xml::openElement( 'form', array( 'id' => 'fileduplicatesearch', 'method' => 'get', 'action' => $wgScript ) ) .
-                       Html::hidden( 'title', $this->getTitle()->getPrefixedDBkey() ) .
-                       Xml::openElement( 'fieldset' ) .
-                       Xml::element( 'legend', null, $this->msg( 'fileduplicatesearch-legend' )->text() ) .
-                       Xml::inputLabel( $this->msg( 'fileduplicatesearch-filename' )->text(), 'filename', 'filename', 50, $this->filename ) . ' ' .
-                       Xml::submitButton( $this->msg( 'fileduplicatesearch-submit' )->text() ) .
-                       Xml::closeElement( 'fieldset' ) .
-                       Xml::closeElement( 'form' )
+                       Html::openElement( 'form', array( 'id' => 'fileduplicatesearch', 'method' => 'get', 'action' => $wgScript ) ) . "\n" .
+                       Html::hidden( 'title', $this->getTitle()->getPrefixedDBkey() ) . "\n" .
+                       Html::openElement( 'fieldset' ) . "\n" .
+                       Html::element( 'legend', null, $this->msg( 'fileduplicatesearch-legend' )->text() ) . "\n" .
+                       Xml::inputLabel( $this->msg( 'fileduplicatesearch-filename' )->text(), 'filename', 'filename', 50, $this->filename ) . "\n" .
+                       Xml::submitButton( $this->msg( 'fileduplicatesearch-submit' )->text() ) . "\n" .
+                       Html::closeElement( 'fieldset' ) . "\n" .
+                       Html::closeElement( 'form' )
                );
 
                if( $this->file ) {
index 3723740..329b1ad 100644 (file)
@@ -51,14 +51,14 @@ class WithoutInterwikiPage extends PageQueryPage {
                $prefix = $this->prefix;
                $t = $this->getTitle();
 
-               return Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ) .
-                       Xml::openElement( 'fieldset' ) .
-                       Xml::element( 'legend', null, $this->msg( 'withoutinterwiki-legend' )->text() ) .
-                       Html::hidden( 'title', $t->getPrefixedText() ) .
-                       Xml::inputLabel( $this->msg( 'allpagesprefix' )->text(), 'prefix', 'wiprefix', 20, $prefix ) . ' ' .
-                       Xml::submitButton( $this->msg( 'withoutinterwiki-submit' )->text() ) .
-                       Xml::closeElement( 'fieldset' ) .
-                       Xml::closeElement( 'form' );
+               return Html::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ) . "\n" .
+                       Html::openElement( 'fieldset' ) . "\n" .
+                       Html::element( 'legend', null, $this->msg( 'withoutinterwiki-legend' )->text() ) . "\n" .
+                       Html::hidden( 'title', $t->getPrefixedText() ) . "\n" .
+                       Xml::inputLabel( $this->msg( 'allpagesprefix' )->text(), 'prefix', 'wiprefix', 20, $prefix ) . "\n" .
+                       Xml::submitButton( $this->msg( 'withoutinterwiki-submit' )->text() ) . "\n" .
+                       Html::closeElement( 'fieldset' ) . "\n" .
+                       Html::closeElement( 'form' );
        }
 
        function sortDescending() {
index fe5cdf8..14a5641 100644 (file)
@@ -168,7 +168,7 @@ class IuConverter extends LanguageConverter {
         */
        function autoConvert( $text, $toVariant = false ) {
                global $wgTitle;
-               if ( is_object( $wgTitle ) && $wgTitle->getNameSpace() == NS_FILE ) {
+               if ( is_object( $wgTitle ) && $wgTitle->getNamespace() == NS_FILE ) {
                        $imagename = $wgTitle->getNsText();
                        if ( preg_match( "/^$imagename:/", $text ) ) return $text;
                }
index f6bbae7..d8a7e2c 100644 (file)
@@ -280,7 +280,7 @@ class KkConverter extends LanguageConverter {
         */
        function autoConvert( $text, $toVariant = false ) {
                global $wgTitle;
-               if ( is_object( $wgTitle ) && $wgTitle->getNameSpace() == NS_FILE ) {
+               if ( is_object( $wgTitle ) && $wgTitle->getNamespace() == NS_FILE ) {
                        $imagename = $wgTitle->getNsText();
                        if ( preg_match( "/^$imagename:/", $text ) ) return $text;
                }
index 56a52cc..ef1b065 100644 (file)
@@ -188,7 +188,7 @@ class KuConverter extends LanguageConverter {
         */
        function autoConvert( $text, $toVariant = false ) {
                global $wgTitle;
-               if ( is_object( $wgTitle ) && $wgTitle->getNameSpace() == NS_FILE ) {
+               if ( is_object( $wgTitle ) && $wgTitle->getNamespace() == NS_FILE ) {
                        $imagename = $wgTitle->getNsText();
                        if ( preg_match( "/^$imagename:/", $text ) ) return $text;
                }
index 5ddcfde..001ad08 100644 (file)
@@ -147,7 +147,7 @@ class ShiConverter extends LanguageConverter {
         */
        function autoConvert( $text, $toVariant = false ) {
                global $wgTitle;
-               if ( is_object( $wgTitle ) && $wgTitle->getNameSpace() == NS_FILE ) {
+               if ( is_object( $wgTitle ) && $wgTitle->getNamespace() == NS_FILE ) {
                        $imagename = $wgTitle->getNsText();
                        if ( preg_match( "/^$imagename:/", $text ) ) return $text;
                }
index 55aec32..b29cfb8 100644 (file)
@@ -139,7 +139,7 @@ class SrConverter extends LanguageConverter {
         */
        function autoConvert( $text, $toVariant = false ) {
                global $wgTitle;
-               if ( is_object( $wgTitle ) && $wgTitle->getNameSpace() == NS_FILE ) {
+               if ( is_object( $wgTitle ) && $wgTitle->getNamespace() == NS_FILE ) {
                        $imagename = $wgTitle->getNsText();
                        if ( preg_match( "/^$imagename:/", $text ) ) return $text;
                }
index 08aae29..7dfbec1 100644 (file)
@@ -63,11 +63,11 @@ class DumpLinks extends Maintenance {
                                        $this->output( "\n" );
                                }
                                $page = Title::makeTitle( $row->page_namespace, $row->page_title );
-                               $this->output( $page->getPrefixedUrl() );
+                               $this->output( $page->getPrefixedURL() );
                                $lastPage = $row->page_id;
                        }
                        $link = Title::makeTitle( $row->pl_namespace, $row->pl_title );
-                       $this->output( " " . $link->getPrefixedUrl() );
+                       $this->output( " " . $link->getPrefixedURL() );
                }
                if ( isset( $lastPage ) )
                        $this->output( "\n" );
index cff8a2f..970862b 100644 (file)
@@ -38,7 +38,7 @@ class TitleTest extends MediaWikiTestCase {
        function testBug31100FixSpecialName( $text, $expectedParam ) {
                $title = Title::newFromText( $text );
                $fixed = $title->fixSpecialName();
-               $stuff = explode( '/', $fixed->getDbKey(), 2 );
+               $stuff = explode( '/', $fixed->getDBkey(), 2 );
                if ( count( $stuff ) == 2 ) {
                        $par = $stuff[1];
                } else {
index 99ec05d..68efd86 100644 (file)
  *
  * @ingroup UtfNormal
  * @group Large
+ *
+ * We ignore code coverage for this test suite until they are rewritten
+ * to use data providers (bug 46561).
+ * @codeCoverageIgnore
  */
 class CleanUpTest extends MediaWikiTestCase {
        /** @todo document */