Merge "(bug 22870) Separate interface message when creating a page"
authorBrion VIBBER <brion@wikimedia.org>
Mon, 2 Apr 2012 23:36:43 +0000 (23:36 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 2 Apr 2012 23:36:43 +0000 (23:36 +0000)
26 files changed:
.gitignore
RELEASE-NOTES-1.20
includes/CryptRand.php
includes/Export.php
includes/GlobalFunctions.php
includes/Skin.php
includes/actions/RawAction.php
includes/api/ApiBlock.php
includes/api/ApiMain.php
includes/api/ApiUnblock.php
includes/db/DatabasePostgres.php
includes/specials/SpecialProtectedtitles.php
languages/messages/MessagesEn.php
maintenance/interwiki.list
maintenance/interwiki.sql
skins/common/commonContent.css
skins/common/shared.css
tests/phpunit/includes/GlobalFunctions/GlobalTest.php
tests/phpunit/includes/api/ApiBlockTest.php
tests/phpunit/includes/api/ApiPurgeTest.php
tests/phpunit/includes/api/ApiQueryTest.php
tests/phpunit/includes/api/ApiTest.php
tests/phpunit/includes/api/ApiUploadTest.php
tests/phpunit/includes/api/ApiWatchTest.php
tests/selenium/data/SimpleSeleniumTestDB.sql
tests/selenium/data/mediawiki118_fresh_installation.sql

index 7b3ec46..fb2b81b 100644 (file)
@@ -1,6 +1,7 @@
 .svn
 *~
 *.kate-swp
+.*.swp
 .classpath
 .idea
 .metadata*
@@ -18,8 +19,12 @@ static*
 tags
 cache/*.cdb
 images/[0-9a-f]
+images/archive
+images/deleted
 images/temp
 images/thumb
-maintenance/dev/data/
+images/timeline
+images/tmp
+maintenance/dev/data
 maintenance/.mweval_history
 maintenance/.mwsql_history
index 1925d13..42001b9 100644 (file)
@@ -56,6 +56,7 @@ production.
 * (bug 18704) Add an unique CSS class or ID to the tagfilter table row at RecentChanges 
 * (bug 33689) Upgrade to 1.19 on Postgres fails due to incomplete query when
               trying to defer foreign key for externallinks
+* (bug 32748) Printer friendly version of article decode Unicode chars as a pretty IRI in footer.
 
 === API changes in 1.20 ===
 * (bug 34316) Add ability to retrieve maximum upload size from MediaWiki API.
index e4be1b3..8994082 100644 (file)
@@ -63,8 +63,14 @@ class MWCryptRand {
 
                // Include some information about the filesystem's current state in the random state
                $files = array();
+
                // We know this file is here so grab some info about ourself
                $files[] = __FILE__;
+
+               // We must also have a parent folder, and with the usual file structure, a grandparent
+               $files[] = dirname( __FILE__ );
+               $files[] = dirname( dirname( __FILE__ ) );
+
                // The config file is likely the most often edited file we know should be around
                // so if the constant with it's location is defined include it's stat info into the state
                if ( defined( 'MW_CONFIG_FILE' ) ) {
index 9a44260..0d1aeef 100644 (file)
@@ -784,7 +784,7 @@ class DumpOutput {
  * @ingroup Dump
  */
 class DumpFileOutput extends DumpOutput {
-       protected $handle, $filename;
+       protected $handle = false, $filename;
 
        function __construct( $file ) {
                $this->handle = fopen( $file, "wt" );
@@ -793,7 +793,10 @@ class DumpFileOutput extends DumpOutput {
 
        function writeCloseStream( $string ) {
                parent::writeCloseStream( $string );
-               fclose( $this->handle );
+               if ( $this->handle ) {
+                       fclose( $this->handle );
+                       $this->handle = false;
+               }
        }
 
        function write( $string ) {
@@ -824,7 +827,10 @@ class DumpFileOutput extends DumpOutput {
        function closeAndRename( $newname, $open = false ) {
                $newname = $this->checkRenameArgCount( $newname );
                if ( $newname ) {
-                       fclose( $this->handle );
+                       if ( $this->handle ) {
+                               fclose( $this->handle );
+                               $this->handle = false;
+                       }
                        $this->renameOrException( $newname );
                        if ( $open ) {
                                $this->handle = fopen( $this->filename, "wt" );
@@ -845,6 +851,7 @@ class DumpFileOutput extends DumpOutput {
  */
 class DumpPipeOutput extends DumpFileOutput {
        protected $command, $filename;
+       private $procOpenResource = false;
 
        function __construct( $command, $file = null ) {
                if ( !is_null( $file ) ) {
@@ -858,7 +865,10 @@ class DumpPipeOutput extends DumpFileOutput {
 
        function writeCloseStream( $string ) {
                parent::writeCloseStream( $string );
-               proc_close( $this->procOpenResource );
+               if ( $this->procOpenResource ) {
+                       proc_close( $this->procOpenResource );
+                       $this->procOpenResource = false;
+               }
        }
 
        function startCommand( $command ) {
@@ -877,8 +887,14 @@ class DumpPipeOutput extends DumpFileOutput {
        function closeAndRename( $newname, $open = false ) {
                $newname = $this->checkRenameArgCount( $newname );
                if ( $newname ) {
-                       fclose( $this->handle );
-                       proc_close( $this->procOpenResource );
+                       if ( $this->handle ) {
+                               fclose( $this->handle );
+                               $this->handle = false;
+                       }
+                       if ( $this->procOpenResource ) {
+                               proc_close( $this->procOpenResource );
+                               $this->procOpenResource = false;
+                       }
                        $this->renameOrException( $newname );
                        if ( $open ) {
                                $command = $this->command;
index e9f22de..bcbcefe 100644 (file)
@@ -802,6 +802,31 @@ function wfParseUrl( $url ) {
        return $bits;
 }
 
+/**
+ * Take a URL, make sure it's expanded to fully qualified, and replace any
+ * encoded non-ASCII Unicode characters with their UTF-8 original forms
+ * for more compact display and legibility for local audiences.
+ *
+ * @todo handle punycode domains too
+ *
+ * @param $url string
+ * @return string
+ */
+function wfExpandIRI( $url ) {
+       return preg_replace_callback( '/((?:%[89A-F][0-9A-F])+)/i', 'wfExpandIRI_callback', wfExpandUrl( $url ) );
+}
+
+/**
+ * Private callback for wfExpandIRI
+ * @param array $matches
+ * @return string
+ */
+function wfExpandIRI_callback( $matches ) {
+       return urldecode( $matches[1] );
+}
+
+
+
 /**
  * Make URL indexes, appropriate for the el_index field of externallinks.
  *
index eb2b8ae..8b10d7f 100644 (file)
@@ -647,10 +647,10 @@ abstract class Skin extends ContextSource {
        function printSource() {
                $oldid = $this->getRevisionId();
                if ( $oldid ) {
-                       $url = htmlspecialchars( $this->getTitle()->getCanonicalURL( 'oldid=' . $oldid ) );
+                       $url = htmlspecialchars( wfExpandIRI( $this->getTitle()->getCanonicalURL( 'oldid=' . $oldid ) ) );
                } else {
                        // oldid not available for non existing pages
-                       $url = htmlspecialchars( $this->getTitle()->getCanonicalURL() );
+                       $url = htmlspecialchars( wfExpandIRI( $this->getTitle()->getCanonicalURL() ) );
                }
                return $this->msg( 'retrievedfrom', '<a href="' . $url . '">' . $url . '</a>' )->text();
        }
index e4c6b3e..5615ad5 100644 (file)
@@ -120,10 +120,13 @@ class RawAction extends FormlessAction {
 
                // If it's a MediaWiki message we can just hit the message cache
                if ( $request->getBool( 'usemsgcache' ) && $title->getNamespace() == NS_MEDIAWIKI ) {
-                       $key = $title->getDBkey();
-                       $msg = wfMessage( $key )->inContentLanguage();
-                       # If the message doesn't exist, return a blank
-                       $text = !$msg->exists() ? '' : $msg->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 );
+                       // If the message doesn't exist, return a blank
+                       if ( $text === false ) {
+                               $text = '';
+                       }
                } else {
                        // Get it from the DB
                        $rev = Revision::newFromTitle( $title, $this->getOldId() );
index 351ac6b..7d3a40b 100644 (file)
@@ -47,7 +47,7 @@ class ApiBlock extends ApiBase {
                $params = $this->extractRequestParams();
 
                if ( $params['gettoken'] ) {
-                       $res['blocktoken'] = $user->getEditToken( '', $this->getMain()->getRequest() );
+                       $res['blocktoken'] = $user->getEditToken();
                        $this->getResult()->addValue( null, $this->getModuleName(), $res );
                        return;
                }
index 15b0861..8f5cfca 100644 (file)
@@ -599,7 +599,7 @@ class ApiMain extends ApiBase {
                        if ( !isset( $moduleParams['token'] ) ) {
                                $this->dieUsageMsg( array( 'missingparam', 'token' ) );
                        } else {
-                               if ( !$this->getUser()->matchEditToken( $moduleParams['token'], $salt, $this->getRequest() ) ) {
+                               if ( !$this->getUser()->matchEditToken( $moduleParams['token'], $salt ) ) {
                                        $this->dieUsageMsg( 'sessionfailure' );
                                }
                        }
index db94fd5..e599e32 100644 (file)
@@ -44,7 +44,7 @@ class ApiUnblock extends ApiBase {
                $params = $this->extractRequestParams();
 
                if ( $params['gettoken'] ) {
-                       $res['unblocktoken'] = $user->getEditToken( '', $this->getMain()->getRequest() );
+                       $res['unblocktoken'] = $user->getEditToken();
                        $this->getResult()->addValue( null, $this->getModuleName(), $res );
                        return;
                }
index c7d64eb..6e0a145 100644 (file)
@@ -315,7 +315,6 @@ class DatabasePostgres extends DatabaseBase {
        }
 
        protected function doQuery( $sql ) {
-               global $wgDebugDBTransactions;
                if ( function_exists( 'mb_convert_encoding' ) ) {
                        $sql = mb_convert_encoding( $sql, 'UTF-8' );
                }
index ad5f3f3..a80f0d0 100644 (file)
@@ -56,15 +56,14 @@ class SpecialProtectedtitles extends SpecialPage {
                $this->getOutput()->addHTML( $this->showOptions( $NS, $type, $level ) );
 
                if ( $pager->getNumRows() ) {
-                       $s = $pager->getNavigationBar();
-                       $s .= "<ul>" .
-                               $pager->getBody() .
-                               "</ul>";
-                       $s .= $pager->getNavigationBar();
+                       $this->getOutput()->addHTML(
+                               $pager->getNavigationBar() .
+                               '<ul>' . $pager->getBody() . '</ul>' .
+                               $pager->getNavigationBar()
+                       );
                } else {
-                       $s = '<p>' . wfMsgHtml( 'protectedtitlesempty' ) . '</p>';
+                       $this->getOutput()->addWikiMsg( 'protectedtitlesempty' );
                }
-               $this->getOutput()->addHTML( $s );
        }
 
        /**
@@ -86,21 +85,20 @@ class SpecialProtectedtitles extends SpecialPage {
 
                $description_items = array ();
 
-               $protType = wfMsgHtml( 'restriction-level-' . $row->pt_create_perm );
+               $protType = $this->msg( 'restriction-level-' . $row->pt_create_perm )->escaped();
 
                $description_items[] = $protType;
 
                $lang = $this->getLanguage();
                $expiry = strlen( $row->pt_expiry ) ? $lang->formatExpiry( $row->pt_expiry, TS_MW ) : $infinity;
                if( $expiry != $infinity ) {
-                       $expiry_description = wfMsg(
+                       $user = $this->getUser();
+                       $description_items[] = $this->msg(
                                'protect-expiring-local',
-                               $lang->timeanddate( $expiry, true ),
-                               $lang->date( $expiry, true ),
-                               $lang->time( $expiry, true )
-                       );
-
-                       $description_items[] = htmlspecialchars($expiry_description);
+                               $lang->userTimeAndDate( $expiry, $user ),
+                               $lang->userDate( $expiry, $user ),
+                               $lang->userTime( $expiry, $user )
+                       )->escaped();
                }
 
                wfProfileOut( __METHOD__ );
@@ -122,11 +120,11 @@ class SpecialProtectedtitles extends SpecialPage {
                $special = htmlspecialchars( $title->getPrefixedDBkey() );
                return "<form action=\"$action\" method=\"get\">\n" .
                        '<fieldset>' .
-                       Xml::element( 'legend', array(), wfMsg( 'protectedtitles' ) ) .
+                       Xml::element( 'legend', array(), $this->msg( 'protectedtitles' )->text() ) .
                        Html::hidden( 'title', $special ) . "&#160;\n" .
                        $this->getNamespaceMenu( $namespace ) . "&#160;\n" .
                        $this->getLevelMenu( $level ) . "&#160;\n" .
-                       "&#160;" . Xml::submitButton( wfMsg( 'allpagessubmit' ) ) . "\n" .
+                       "&#160;" . Xml::submitButton( $this->msg( 'allpagessubmit' )->text() ) . "\n" .
                        "</fieldset></form>";
        }
 
@@ -158,13 +156,13 @@ class SpecialProtectedtitles extends SpecialPage {
        function getLevelMenu( $pr_level ) {
                global $wgRestrictionLevels;
 
-               $m = array( wfMsg('restriction-level-all') => 0 ); // Temporary array
+               $m = array( $this->msg( 'restriction-level-all' )->text() => 0 ); // Temporary array
                $options = array();
 
                // First pass to load the log names
                foreach( $wgRestrictionLevels as $type ) {
                        if ( $type !='' && $type !='*') {
-                               $text = wfMsg("restriction-level-$type");
+                               $text = $this->msg( "restriction-level-$type" )->text();
                                $m[$text] = $type;
                        }
                }
@@ -179,7 +177,7 @@ class SpecialProtectedtitles extends SpecialPage {
                }
 
                return
-                       Xml::label( wfMsg('restriction-level') , $this->IdLevel ) . '&#160;' .
+                       Xml::label( $this->msg( 'restriction-level' )->text(), $this->IdLevel ) . '&#160;' .
                        Xml::tags( 'select',
                                array( 'id' => $this->IdLevel, 'name' => $this->IdLevel ),
                                implode( "\n", $options ) );
@@ -221,7 +219,7 @@ class ProtectedTitlesPager extends AlphabeticPager {
         * @return Title
         */
        function getTitle() {
-               return SpecialPage::getTitleFor( 'Protectedtitles' );
+               return $this->mForm->getTitle();
        }
 
        function formatRow( $row ) {
index 398e881..3cacacf 100644 (file)
@@ -1372,7 +1372,7 @@ Custom .css and .js pages use a lowercase title, e.g. {{ns:user}}:Foo/vector.css
 'updated'                          => '(Updated)',
 'note'                             => "'''Note:'''",
 'previewnote'                      => "'''Remember that this is only a preview.'''
-Your changes have not yet been saved!",
+Your changes have not yet been saved! [[#editform|→ Continue editing]]",
 'previewconflict'                  => 'This preview reflects the text in the upper text editing area as it will appear if you choose to save.',
 'session_fail_preview'             => "'''Sorry! We could not process your edit due to a loss of session data.'''
 Please try again.
index d6abd1a..179fa5c 100644 (file)
@@ -14,8 +14,8 @@ docbook|http://wiki.docbook.org/topic/$1|0
 doi|http://dx.doi.org/$1|0
 drumcorpswiki|http://www.drumcorpswiki.com/index.php/$1|0
 dwjwiki|http://www.suberic.net/cgi-bin/dwj/wiki.cgi?$1|0
-emacswiki|http://www.emacswiki.org/cgi-bin/wiki.pl?$1|0
 elibre|http://enciclopedia.us.es/index.php/$1|0
+emacswiki|http://www.emacswiki.org/cgi-bin/wiki.pl?$1|0
 foldoc|http://foldoc.org/?$1|0
 foxwiki|http://fox.wikis.com/wc.dll?Wiki~$1|0
 freebsdman|http://www.FreeBSD.org/cgi/man.cgi?apropos=1&query=$1|0
@@ -37,11 +37,11 @@ lqwiki|http://wiki.linuxquestions.org/wiki/$1|0
 lugkr|http://lug-kr.sourceforge.net/cgi-bin/lugwiki.pl?$1|0
 mathsongswiki|http://SeedWiki.com/page.cfm?wikiid=237&doc=$1|0
 meatball|http://www.usemod.com/cgi-bin/mb.pl?$1|0
-mediazilla|https://bugzilla.wikimedia.org/$1|1
 mediawikiwiki|http://www.mediawiki.org/wiki/$1|0
+mediazilla|https://bugzilla.wikimedia.org/$1|1
 memoryalpha|http://www.memory-alpha.org/en/index.php/$1|0
 metawiki|http://sunir.org/apps/meta.pl?$1|0
-metawikipedia|http://meta.wikimedia.org/wiki/$1|0
+metawikimedia|http://meta.wikimedia.org/wiki/$1|0
 moinmoin|http://purl.net/wiki/moin/$1|0
 mozillawiki|http://wiki.mozilla.org/index.php/$1|0
 mw|http://www.mediawiki.org/wiki/$1|0
@@ -82,10 +82,11 @@ wikicities|http://www.wikia.com/wiki/$1|0
 wikif1|http://www.wikif1.org/$1|0
 wikihow|http://www.wikihow.com/$1|0
 wikinfo|http://www.wikinfo.org/index.php/$1|0
+# The following wik[it]* interwikis but wikitravel belong to the Wikimedia Family:
 wikimedia|http://wikimediafoundation.org/wiki/$1|0
 wikinews|http://en.wikinews.org/wiki/$1|1
-wikiquote|http://en.wikiquote.org/wiki/$1|1
 wikipedia|http://en.wikipedia.org/wiki/$1|1
+wikiquote|http://en.wikiquote.org/wiki/$1|1
 wikisource|http://wikisource.org/wiki/$1|1
 wikispecies|http://species.wikimedia.org/wiki/$1|1
 wikitravel|http://wikitravel.org/en/$1|0
index 6efc1e0..370460a 100644 (file)
@@ -16,8 +16,8 @@ REPLACE INTO /*$wgDBprefix*/interwiki (iw_prefix,iw_url,iw_local) VALUES
 ('doi','http://dx.doi.org/$1',0),
 ('drumcorpswiki','http://www.drumcorpswiki.com/index.php/$1',0),
 ('dwjwiki','http://www.suberic.net/cgi-bin/dwj/wiki.cgi?$1',0),
-('emacswiki','http://www.emacswiki.org/cgi-bin/wiki.pl?$1',0),
 ('elibre','http://enciclopedia.us.es/index.php/$1',0),
+('emacswiki','http://www.emacswiki.org/cgi-bin/wiki.pl?$1',0),
 ('foldoc','http://foldoc.org/?$1',0),
 ('foxwiki','http://fox.wikis.com/wc.dll?Wiki~$1',0),
 ('freebsdman','http://www.FreeBSD.org/cgi/man.cgi?apropos=1&query=$1',0),
@@ -39,11 +39,11 @@ REPLACE INTO /*$wgDBprefix*/interwiki (iw_prefix,iw_url,iw_local) VALUES
 ('lugkr','http://lug-kr.sourceforge.net/cgi-bin/lugwiki.pl?$1',0),
 ('mathsongswiki','http://SeedWiki.com/page.cfm?wikiid=237&doc=$1',0),
 ('meatball','http://www.usemod.com/cgi-bin/mb.pl?$1',0),
-('mediazilla','https://bugzilla.wikimedia.org/$1',1),
 ('mediawikiwiki','http://www.mediawiki.org/wiki/$1',0),
+('mediazilla','https://bugzilla.wikimedia.org/$1',1),
 ('memoryalpha','http://www.memory-alpha.org/en/index.php/$1',0),
 ('metawiki','http://sunir.org/apps/meta.pl?$1',0),
-('metawikipedia','http://meta.wikimedia.org/wiki/$1',0),
+('metawikimedia','http://meta.wikimedia.org/wiki/$1',0),
 ('moinmoin','http://purl.net/wiki/moin/$1',0),
 ('mozillawiki','http://wiki.mozilla.org/index.php/$1',0),
 ('mw','http://www.mediawiki.org/wiki/$1',0),
@@ -84,10 +84,11 @@ REPLACE INTO /*$wgDBprefix*/interwiki (iw_prefix,iw_url,iw_local) VALUES
 ('wikif1','http://www.wikif1.org/$1',0),
 ('wikihow','http://www.wikihow.com/$1',0),
 ('wikinfo','http://www.wikinfo.org/index.php/$1',0),
+# The following wik[it]* interwikis but wikitravel belong to the Wikimedia Family:
 ('wikimedia','http://wikimediafoundation.org/wiki/$1',0),
 ('wikinews','http://en.wikinews.org/wiki/$1',1),
-('wikiquote','http://en.wikiquote.org/wiki/$1',1),
 ('wikipedia','http://en.wikipedia.org/wiki/$1',1),
+('wikiquote','http://en.wikiquote.org/wiki/$1',1),
 ('wikisource','http://wikisource.org/wiki/$1',1),
 ('wikispecies','http://species.wikimedia.org/wiki/$1',1),
 ('wikitravel','http://wikitravel.org/en/$1',0),
index 6179918..0fe8489 100644 (file)
@@ -86,13 +86,11 @@ html .thumbimage {
 }
 html .thumbcaption {
        border: none;
-       text-align: left;
        line-height: 1.4em;
        padding: 3px !important;
        font-size: 94%;
 }
 div.magnify {
-       float: right;
        border: none !important;
        background: none !important;
 }
index 3172779..1aaf2ba 100644 (file)
@@ -262,12 +262,22 @@ input#wpSummary {
 /**
  * Image captions
  */
-.thumbcaption {
+/* @noflip */
+.mw-content-ltr .thumbcaption {
        text-align: left;
 }
-.magnify {
+/* @noflip */
+.mw-content-rtl .thumbcaption {
+       text-align: right;
+}
+/* @noflip */
+.mw-content-ltr .magnify {
        float: right;
 }
+/* @noflip */
+.mw-content-rtl .magnify {
+       float: left;
+}
 
 /**
  * Categories
index 3cb42f1..a12410c 100644 (file)
@@ -55,6 +55,12 @@ class GlobalTest extends MediaWikiTestCase {
                        wfUrlencode( "\xE7\x89\xB9\xE5\x88\xA5:Contributions/Foobar" ) );
        }
 
+       function testExpandIRI() {
+               $this->assertEquals(
+                       "https://te.wikibooks.org/wiki/ఉబుంటు_వాడుకరి_మార్గదర్శని",
+                       wfExpandIRI( "https://te.wikibooks.org/wiki/%E0%B0%89%E0%B0%AC%E0%B1%81%E0%B0%82%E0%B0%9F%E0%B1%81_%E0%B0%B5%E0%B0%BE%E0%B0%A1%E0%B1%81%E0%B0%95%E0%B0%B0%E0%B0%BF_%E0%B0%AE%E0%B0%BE%E0%B0%B0%E0%B1%8D%E0%B0%97%E0%B0%A6%E0%B0%B0%E0%B1%8D%E0%B0%B6%E0%B0%A8%E0%B0%BF" ) );
+       }
+
        function testReadOnlyEmpty() {
                global $wgReadOnly;
                $wgReadOnly = null;
index 514da42..d9ea7b5 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 
 /**
+ * @group API
  * @group Database
  */
 class ApiBlockTest extends ApiTestCase {
index 70c2074..2566c6c 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 
 /**
+ * @group API
  * @group Database
  */
 class ApiPurgeTest extends ApiTestCase {
index ae05a30..a4b9dc7 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 
 /**
+ * @group API
  * @group Database
  */
 class ApiQueryTest extends ApiTestCase {
index 1d9c323..c3eacd5 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 
 /**
+ * @group API
  * @group Database
  */
 class ApiTest extends ApiTestCase {
index b780374..d2c742a 100644 (file)
@@ -1,8 +1,9 @@
 <?php
 
 /**
+ * @group API
  * @group Database
- * @todo This test suite is severly broken and need a full review 
+ * @todo This test suite is severly broken and need a full review
  */
 class ApiWatchTest extends ApiTestCase {
 
@@ -10,7 +11,7 @@ class ApiWatchTest extends ApiTestCase {
                parent::setUp();
                $this->doLogin();
        }
-       
+
        function getTokens() {
                return $this->getTokenList( self::$users['sysop'] );
        }
@@ -19,9 +20,9 @@ class ApiWatchTest extends ApiTestCase {
         * @group Broken
         */
        function testWatchEdit() {
-               
+
                $data = $this->getTokens();
-               
+
                $keys = array_keys( $data[0]['query']['pages'] );
                $key = array_pop( $keys );
                $pageinfo = $data[0]['query']['pages'][$key];
@@ -44,7 +45,7 @@ class ApiWatchTest extends ApiTestCase {
         * @group Broken
         */
        function testWatchClear() {
-       
+
                $data = $this->doApiRequest( array(
                        'action' => 'query',
                        'list' => 'watchlist' ), $data );
@@ -71,11 +72,11 @@ class ApiWatchTest extends ApiTestCase {
 
        /**
         * @group Broken
-        */      
+        */
        function testWatchProtect() {
-               
+
                $data = $this->getTokens();
-               
+
                $keys = array_keys( $data[0]['query']['pages'] );
                $key = array_pop( $keys );
                $pageinfo = $data[0]['query']['pages'][$key];
@@ -97,9 +98,9 @@ class ApiWatchTest extends ApiTestCase {
         * @group Broken
         */
        function testGetRollbackToken() {
-               
+
                $data = $this->getTokens();
-               
+
                if ( !Title::newFromText( 'UTPage' )->exists() ) {
                        $this->markTestIncomplete( "The article [[UTPage]] does not exist" );
                }
@@ -159,9 +160,9 @@ class ApiWatchTest extends ApiTestCase {
         * @group Broken
         */
        function testWatchDelete() {
-               
+
                $data = $this->getTokens();
-               
+
                $keys = array_keys( $data[0]['query']['pages'] );
                $key = array_pop( $keys );
                $pageinfo = $data[0]['query']['pages'][$key];
index 1a3196c..d688c3b 100644 (file)
@@ -347,7 +347,7 @@ CREATE TABLE `mw_interwiki` (
 
 LOCK TABLES `mw_interwiki` WRITE;
 /*!40000 ALTER TABLE `mw_interwiki` DISABLE KEYS */;
-INSERT INTO `mw_interwiki` VALUES ('acronym','http://www.acronymfinder.com/af-query.asp?String=exact&Acronym=$1','','',0,0),('advogato','http://www.advogato.org/$1','','',0,0),('annotationwiki','http://www.seedwiki.com/page.cfm?wikiid=368&doc=$1','','',0,0),('arxiv','http://www.arxiv.org/abs/$1','','',0,0),('c2find','http://c2.com/cgi/wiki?FindPage&value=$1','','',0,0),('cache','http://www.google.com/search?q=cache:$1','','',0,0),('commons','http://commons.wikimedia.org/wiki/$1','','',0,0),('corpknowpedia','http://corpknowpedia.org/wiki/index.php/$1','','',0,0),('dictionary','http://www.dict.org/bin/Dict?Database=*&Form=Dict1&Strategy=*&Query=$1','','',0,0),('disinfopedia','http://www.disinfopedia.org/wiki.phtml?title=$1','','',0,0),('docbook','http://wiki.docbook.org/topic/$1','','',0,0),('doi','http://dx.doi.org/$1','','',0,0),('drumcorpswiki','http://www.drumcorpswiki.com/index.php/$1','','',0,0),('dwjwiki','http://www.suberic.net/cgi-bin/dwj/wiki.cgi?$1','','',0,0),('elibre','http://enciclopedia.us.es/index.php/$1','','',0,0),('emacswiki','http://www.emacswiki.org/cgi-bin/wiki.pl?$1','','',0,0),('foldoc','http://foldoc.org/?$1','','',0,0),('foxwiki','http://fox.wikis.com/wc.dll?Wiki~$1','','',0,0),('freebsdman','http://www.FreeBSD.org/cgi/man.cgi?apropos=1&query=$1','','',0,0),('gej','http://www.esperanto.de/cgi-bin/aktivikio/wiki.pl?$1','','',0,0),('gentoo-wiki','http://gentoo-wiki.com/$1','','',0,0),('google','http://www.google.com/search?q=$1','','',0,0),('googlegroups','http://groups.google.com/groups?q=$1','','',0,0),('hammondwiki','http://www.dairiki.org/HammondWiki/$1','','',0,0),('hewikisource','http://he.wikisource.org/wiki/$1','','',1,0),('hrwiki','http://www.hrwiki.org/index.php/$1','','',0,0),('imdb','http://us.imdb.com/Title?$1','','',0,0),('jargonfile','http://sunir.org/apps/meta.pl?wiki=JargonFile&redirect=$1','','',0,0),('jspwiki','http://www.jspwiki.org/wiki/$1','','',0,0),('keiki','http://kei.ki/en/$1','','',0,0),('kmwiki','http://kmwiki.wikispaces.com/$1','','',0,0),('linuxwiki','http://linuxwiki.de/$1','','',0,0),('lojban','http://www.lojban.org/tiki/tiki-index.php?page=$1','','',0,0),('lqwiki','http://wiki.linuxquestions.org/wiki/$1','','',0,0),('lugkr','http://lug-kr.sourceforge.net/cgi-bin/lugwiki.pl?$1','','',0,0),('mathsongswiki','http://SeedWiki.com/page.cfm?wikiid=237&doc=$1','','',0,0),('meatball','http://www.usemod.com/cgi-bin/mb.pl?$1','','',0,0),('mediawikiwiki','http://www.mediawiki.org/wiki/$1','','',0,0),('mediazilla','https://bugzilla.wikimedia.org/$1','','',1,0),('memoryalpha','http://www.memory-alpha.org/en/index.php/$1','','',0,0),('metawiki','http://sunir.org/apps/meta.pl?$1','','',0,0),('metawikipedia','http://meta.wikimedia.org/wiki/$1','','',0,0),('moinmoin','http://purl.net/wiki/moin/$1','','',0,0),('mozillawiki','http://wiki.mozilla.org/index.php/$1','','',0,0),('mw','http://www.mediawiki.org/wiki/$1','','',0,0),('oeis','http://www.research.att.com/cgi-bin/access.cgi/as/njas/sequences/eisA.cgi?Anum=$1','','',0,0),('openfacts','http://openfacts.berlios.de/index.phtml?title=$1','','',0,0),('openwiki','http://openwiki.com/?$1','','',0,0),('pmeg','http://www.bertilow.com/pmeg/$1.php','','',0,0),('ppr','http://c2.com/cgi/wiki?$1','','',0,0),('pythoninfo','http://wiki.python.org/moin/$1','','',0,0),('rfc','http://www.rfc-editor.org/rfc/rfc$1.txt','','',0,0),('s23wiki','http://is-root.de/wiki/index.php/$1','','',0,0),('seattlewiki','http://seattle.wikia.com/wiki/$1','','',0,0),('seattlewireless','http://seattlewireless.net/?$1','','',0,0),('senseislibrary','http://senseis.xmp.net/?$1','','',0,0),('sourceforge','http://sourceforge.net/$1','','',0,0),('squeak','http://wiki.squeak.org/squeak/$1','','',0,0),('susning','http://www.susning.nu/$1','','',0,0),('svgwiki','http://wiki.svg.org/$1','','',0,0),('tavi','http://tavi.sourceforge.net/$1','','',0,0),('tejo','http://www.tejo.org/vikio/$1','','',0,0),('theopedia','http://www.theopedia.com/$1','','',0,0),('tmbw','http://www.tmbw.net/wiki/$1','','',0,0),('tmnet','http://www.technomanifestos.net/?$1','','',0,0),('tmwiki','http://www.EasyTopicMaps.com/?page=$1','','',0,0),('twiki','http://twiki.org/cgi-bin/view/$1','','',0,0),('uea','http://www.tejo.org/uea/$1','','',0,0),('unreal','http://wiki.beyondunreal.com/wiki/$1','','',0,0),('usemod','http://www.usemod.com/cgi-bin/wiki.pl?$1','','',0,0),('vinismo','http://vinismo.com/en/$1','','',0,0),('webseitzwiki','http://webseitz.fluxent.com/wiki/$1','','',0,0),('why','http://clublet.com/c/c/why?$1','','',0,0),('wiki','http://c2.com/cgi/wiki?$1','','',0,0),('wikia','http://www.wikia.com/wiki/$1','','',0,0),('wikibooks','http://en.wikibooks.org/wiki/$1','','',1,0),('wikicities','http://www.wikia.com/wiki/$1','','',0,0),('wikif1','http://www.wikif1.org/$1','','',0,0),('wikihow','http://www.wikihow.com/$1','','',0,0),('wikimedia','http://wikimediafoundation.org/wiki/$1','','',0,0),('wikinews','http://en.wikinews.org/wiki/$1','','',1,0),('wikinfo','http://www.wikinfo.org/index.php/$1','','',0,0),('wikipedia','http://en.wikipedia.org/wiki/$1','','',1,0),('wikiquote','http://en.wikiquote.org/wiki/$1','','',1,0),('wikisource','http://wikisource.org/wiki/$1','','',1,0),('wikispecies','http://species.wikimedia.org/wiki/$1','','',1,0),('wikitravel','http://wikitravel.org/en/$1','','',0,0),('wikiversity','http://en.wikiversity.org/wiki/$1','','',1,0),('wikt','http://en.wiktionary.org/wiki/$1','','',1,0),('wiktionary','http://en.wiktionary.org/wiki/$1','','',1,0),('wlug','http://www.wlug.org.nz/$1','','',0,0),('zwiki','http://zwiki.org/$1','','',0,0),('zzz wiki','http://wiki.zzz.ee/index.php/$1','','',0,0);
+INSERT INTO `mw_interwiki` VALUES ('acronym','http://www.acronymfinder.com/af-query.asp?String=exact&Acronym=$1','','',0,0),('advogato','http://www.advogato.org/$1','','',0,0),('annotationwiki','http://www.seedwiki.com/page.cfm?wikiid=368&doc=$1','','',0,0),('arxiv','http://www.arxiv.org/abs/$1','','',0,0),('c2find','http://c2.com/cgi/wiki?FindPage&value=$1','','',0,0),('cache','http://www.google.com/search?q=cache:$1','','',0,0),('commons','http://commons.wikimedia.org/wiki/$1','','',0,0),('corpknowpedia','http://corpknowpedia.org/wiki/index.php/$1','','',0,0),('dictionary','http://www.dict.org/bin/Dict?Database=*&Form=Dict1&Strategy=*&Query=$1','','',0,0),('disinfopedia','http://www.disinfopedia.org/wiki.phtml?title=$1','','',0,0),('docbook','http://wiki.docbook.org/topic/$1','','',0,0),('doi','http://dx.doi.org/$1','','',0,0),('drumcorpswiki','http://www.drumcorpswiki.com/index.php/$1','','',0,0),('dwjwiki','http://www.suberic.net/cgi-bin/dwj/wiki.cgi?$1','','',0,0),('elibre','http://enciclopedia.us.es/index.php/$1','','',0,0),('emacswiki','http://www.emacswiki.org/cgi-bin/wiki.pl?$1','','',0,0),('foldoc','http://foldoc.org/?$1','','',0,0),('foxwiki','http://fox.wikis.com/wc.dll?Wiki~$1','','',0,0),('freebsdman','http://www.FreeBSD.org/cgi/man.cgi?apropos=1&query=$1','','',0,0),('gej','http://www.esperanto.de/cgi-bin/aktivikio/wiki.pl?$1','','',0,0),('gentoo-wiki','http://gentoo-wiki.com/$1','','',0,0),('google','http://www.google.com/search?q=$1','','',0,0),('googlegroups','http://groups.google.com/groups?q=$1','','',0,0),('hammondwiki','http://www.dairiki.org/HammondWiki/$1','','',0,0),('hewikisource','http://he.wikisource.org/wiki/$1','','',1,0),('hrwiki','http://www.hrwiki.org/index.php/$1','','',0,0),('imdb','http://us.imdb.com/Title?$1','','',0,0),('jargonfile','http://sunir.org/apps/meta.pl?wiki=JargonFile&redirect=$1','','',0,0),('jspwiki','http://www.jspwiki.org/wiki/$1','','',0,0),('keiki','http://kei.ki/en/$1','','',0,0),('kmwiki','http://kmwiki.wikispaces.com/$1','','',0,0),('linuxwiki','http://linuxwiki.de/$1','','',0,0),('lojban','http://www.lojban.org/tiki/tiki-index.php?page=$1','','',0,0),('lqwiki','http://wiki.linuxquestions.org/wiki/$1','','',0,0),('lugkr','http://lug-kr.sourceforge.net/cgi-bin/lugwiki.pl?$1','','',0,0),('mathsongswiki','http://SeedWiki.com/page.cfm?wikiid=237&doc=$1','','',0,0),('meatball','http://www.usemod.com/cgi-bin/mb.pl?$1','','',0,0),('mediawikiwiki','http://www.mediawiki.org/wiki/$1','','',0,0),('mediazilla','https://bugzilla.wikimedia.org/$1','','',1,0),('memoryalpha','http://www.memory-alpha.org/en/index.php/$1','','',0,0),('metawiki','http://sunir.org/apps/meta.pl?$1','','',0,0),('metawikimedia','http://meta.wikimedia.org/wiki/$1','','',0,0),('moinmoin','http://purl.net/wiki/moin/$1','','',0,0),('mozillawiki','http://wiki.mozilla.org/index.php/$1','','',0,0),('mw','http://www.mediawiki.org/wiki/$1','','',0,0),('oeis','http://www.research.att.com/cgi-bin/access.cgi/as/njas/sequences/eisA.cgi?Anum=$1','','',0,0),('openfacts','http://openfacts.berlios.de/index.phtml?title=$1','','',0,0),('openwiki','http://openwiki.com/?$1','','',0,0),('pmeg','http://www.bertilow.com/pmeg/$1.php','','',0,0),('ppr','http://c2.com/cgi/wiki?$1','','',0,0),('pythoninfo','http://wiki.python.org/moin/$1','','',0,0),('rfc','http://www.rfc-editor.org/rfc/rfc$1.txt','','',0,0),('s23wiki','http://is-root.de/wiki/index.php/$1','','',0,0),('seattlewiki','http://seattle.wikia.com/wiki/$1','','',0,0),('seattlewireless','http://seattlewireless.net/?$1','','',0,0),('senseislibrary','http://senseis.xmp.net/?$1','','',0,0),('sourceforge','http://sourceforge.net/$1','','',0,0),('squeak','http://wiki.squeak.org/squeak/$1','','',0,0),('susning','http://www.susning.nu/$1','','',0,0),('svgwiki','http://wiki.svg.org/$1','','',0,0),('tavi','http://tavi.sourceforge.net/$1','','',0,0),('tejo','http://www.tejo.org/vikio/$1','','',0,0),('theopedia','http://www.theopedia.com/$1','','',0,0),('tmbw','http://www.tmbw.net/wiki/$1','','',0,0),('tmnet','http://www.technomanifestos.net/?$1','','',0,0),('tmwiki','http://www.EasyTopicMaps.com/?page=$1','','',0,0),('twiki','http://twiki.org/cgi-bin/view/$1','','',0,0),('uea','http://www.tejo.org/uea/$1','','',0,0),('unreal','http://wiki.beyondunreal.com/wiki/$1','','',0,0),('usemod','http://www.usemod.com/cgi-bin/wiki.pl?$1','','',0,0),('vinismo','http://vinismo.com/en/$1','','',0,0),('webseitzwiki','http://webseitz.fluxent.com/wiki/$1','','',0,0),('why','http://clublet.com/c/c/why?$1','','',0,0),('wiki','http://c2.com/cgi/wiki?$1','','',0,0),('wikia','http://www.wikia.com/wiki/$1','','',0,0),('wikibooks','http://en.wikibooks.org/wiki/$1','','',1,0),('wikicities','http://www.wikia.com/wiki/$1','','',0,0),('wikif1','http://www.wikif1.org/$1','','',0,0),('wikihow','http://www.wikihow.com/$1','','',0,0),('wikimedia','http://wikimediafoundation.org/wiki/$1','','',0,0),('wikinews','http://en.wikinews.org/wiki/$1','','',1,0),('wikinfo','http://www.wikinfo.org/index.php/$1','','',0,0),('wikipedia','http://en.wikipedia.org/wiki/$1','','',1,0),('wikiquote','http://en.wikiquote.org/wiki/$1','','',1,0),('wikisource','http://wikisource.org/wiki/$1','','',1,0),('wikispecies','http://species.wikimedia.org/wiki/$1','','',1,0),('wikitravel','http://wikitravel.org/en/$1','','',0,0),('wikiversity','http://en.wikiversity.org/wiki/$1','','',1,0),('wikt','http://en.wiktionary.org/wiki/$1','','',1,0),('wiktionary','http://en.wiktionary.org/wiki/$1','','',1,0),('wlug','http://www.wlug.org.nz/$1','','',0,0),('zwiki','http://zwiki.org/$1','','',0,0),('zzz wiki','http://wiki.zzz.ee/index.php/$1','','',0,0);
 /*!40000 ALTER TABLE `mw_interwiki` ENABLE KEYS */;
 UNLOCK TABLES;
 
index 2724bad..7beb9e6 100644 (file)
@@ -391,7 +391,7 @@ INSERT INTO `mw_interwiki` VALUES ('mediawikiwiki','http://www.mediawiki.org/wik
 INSERT INTO `mw_interwiki` VALUES ('mediazilla','https://bugzilla.wikimedia.org/$1','','',1,0);
 INSERT INTO `mw_interwiki` VALUES ('memoryalpha','http://www.memory-alpha.org/en/index.php/$1','','',0,0);
 INSERT INTO `mw_interwiki` VALUES ('metawiki','http://sunir.org/apps/meta.pl?$1','','',0,0);
-INSERT INTO `mw_interwiki` VALUES ('metawikipedia','http://meta.wikimedia.org/wiki/$1','','',0,0);
+INSERT INTO `mw_interwiki` VALUES ('metawikimedia','http://meta.wikimedia.org/wiki/$1','','',0,0);
 INSERT INTO `mw_interwiki` VALUES ('moinmoin','http://purl.net/wiki/moin/$1','','',0,0);
 INSERT INTO `mw_interwiki` VALUES ('mozillawiki','http://wiki.mozilla.org/index.php/$1','','',0,0);
 INSERT INTO `mw_interwiki` VALUES ('mw','http://www.mediawiki.org/wiki/$1','','',0,0);