.svn
*~
*.kate-swp
+.*.swp
.classpath
.idea
.metadata*
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
amount of user/site scripts that are lacking dependency information. In the short to
medium term these user/site scripts should be fixed by adding the used modules to the
dependencies in the module registry and/or wrapping them in a callback to mw.loader.using.
+* MediaWiki now requires MySQL 5.0.2 or later when using a MySQL database.
== Compatibility ==
* Introduce a cryptographic random number generator source api for use when
generating various tokens.
* (bug 30963) Option on Special:Prefixindex and Special:Allpages to not show redirects.
+* (bug 18062) new message when edit or create the local page of a shared file
+* (bug 22870) Separate interface message when creating a page
=== Bug fixes in 1.20 ===
* (bug 30245) Use the correct way to construct a log page title.
* (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.
+* Removed white border around thumbnails in galleries
=== API changes in 1.20 ===
* (bug 34316) Add ability to retrieve maximum upload size from MediaWiki API.
// 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' ) ) {
# Enabled article-related sidebar, toplinks, etc.
$wgOut->setArticleRelated( true );
+ $contextTitle = $this->getContextTitle();
if ( $this->isConflict ) {
- $wgOut->setPageTitle( wfMessage( 'editconflict', $this->getContextTitle()->getPrefixedText() ) );
- } elseif ( $this->section != '' ) {
+ $msg = 'editconflict';
+ } elseif ( $contextTitle->exists() && $this->section != '' ) {
$msg = $this->section == 'new' ? 'editingcomment' : 'editingsection';
- $wgOut->setPageTitle( wfMessage( $msg, $this->getContextTitle()->getPrefixedText() ) );
} else {
- # Use the title defined by DISPLAYTITLE magic word when present
- if ( isset( $this->mParserOutput )
- && ( $dt = $this->mParserOutput->getDisplayTitle() ) !== false ) {
- $title = $dt;
- } else {
- $title = $this->getContextTitle()->getPrefixedText();
- }
- $wgOut->setPageTitle( wfMessage( 'editing', $title ) );
+ $msg = $contextTitle->exists() || ( $contextTitle->getNamespace() == NS_MEDIAWIKI && $contextTitle->getDefaultMessageText() !== false ) ?\r
+ 'editing' : 'creating';\r
}
+ # Use the title defined by DISPLAYTITLE magic word when present
+ $displayTitle = isset( $this->mParserOutput ) ? $this->mParserOutput->getDisplayTitle() : false;\r
+ if ( $displayTitle === false ) {\r
+ $displayTitle = $contextTitle->getPrefixedText();\r
+ }
+ $wgOut->setPageTitle( wfMessage( $msg, $displayTitle ) );
}
/**
if ( $namespace == NS_MEDIAWIKI ) {
# Show a warning if editing an interface message
$wgOut->wrapWikiMsg( "<div class='mw-editinginterface'>\n$1\n</div>", 'editinginterface' );
+ } else if( $namespace == NS_FILE ) {
+ # Show a hint to shared repo
+ $file = wfFindFile( $this->mTitle );
+ if( $file && !$file->isLocal() ) {
+ $descUrl = $file->getDescriptionUrl();
+ # there must be a description url to show a hint to shared repo
+ if( $descUrl ) {
+ if( !$this->mTitle->exists() ) {
+ $wgOut->wrapWikiMsg( "<div class=\"mw-sharedupload-desc-create\">\n$1\n</div>", array (
+ 'sharedupload-desc-create', $file->getRepo()->getDisplayName(), $descUrl
+ ) );
+ } else {
+ $wgOut->wrapWikiMsg( "<div class=\"mw-sharedupload-desc-edit\">\n$1\n</div>", array(
+ 'sharedupload-desc-edit', $file->getRepo()->getDisplayName(), $descUrl
+ ) );
+ }
+ }
+ }
}
# Show a warning message when someone creates/edits a user (talk) page but the user does not exist
* @ingroup Dump
*/
class DumpFileOutput extends DumpOutput {
- protected $handle, $filename;
+ protected $handle = false, $filename;
function __construct( $file ) {
$this->handle = fopen( $file, "wt" );
function writeCloseStream( $string ) {
parent::writeCloseStream( $string );
- fclose( $this->handle );
+ if ( $this->handle ) {
+ fclose( $this->handle );
+ $this->handle = false;
+ }
}
function write( $string ) {
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" );
*/
class DumpPipeOutput extends DumpFileOutput {
protected $command, $filename;
+ private $procOpenResource = false;
function __construct( $command, $file = null ) {
if ( !is_null( $file ) ) {
function writeCloseStream( $string ) {
parent::writeCloseStream( $string );
- proc_close( $this->procOpenResource );
+ if ( $this->procOpenResource ) {
+ proc_close( $this->procOpenResource );
+ $this->procOpenResource = false;
+ }
}
function startCommand( $command ) {
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;
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.
*
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();
}
// 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() );
$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;
}
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' );
}
}
$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;
}
}
protected function doQuery( $sql ) {
- global $wgDebugDBTransactions;
if ( function_exists( 'mb_convert_encoding' ) ) {
$sql = mb_convert_encoding( $sql, 'UTF-8' );
}
}
$out->preventClickjacking( $pager->getPreventClickjacking() );
+
# Show the appropriate "footer" message - WHOIS tools, etc.
- if ( $this->opts['contribs'] != 'newbie' ) {
+ if ( $this->opts['contribs'] == 'newbie' ) {
+ $message = 'sp-contributions-footer-newbies';
+ } elseif( IP::isIPAddress( $target ) ) {
+ $message = 'sp-contributions-footer-anon';
+ } elseif( $userObj->isAnon() ) {
+ // No message for non-existing users
+ $message = '';
+ } else {
$message = 'sp-contributions-footer';
- if ( IP::isIPAddress( $target ) ) {
- $message = 'sp-contributions-footer-anon';
- } else {
- if ( $userObj->isAnon() ) {
- // No message for non-existing users
- return;
- }
- }
+ }
+ if( $message ) {
if ( !$this->msg( $message, $target )->isDisabled() ) {
$out->wrapWikiMsg(
"<div class='mw-contributions-footer'>\n$1\n</div>",
$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 );
}
/**
$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__ );
$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 ) . " \n" .
$this->getNamespaceMenu( $namespace ) . " \n" .
$this->getLevelMenu( $level ) . " \n" .
- " " . Xml::submitButton( wfMsg( 'allpagessubmit' ) ) . "\n" .
+ " " . Xml::submitButton( $this->msg( 'allpagessubmit' )->text() ) . "\n" .
"</fieldset></form>";
}
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;
}
}
}
return
- Xml::label( wfMsg('restriction-level') , $this->IdLevel ) . ' ' .
+ Xml::label( $this->msg( 'restriction-level' )->text(), $this->IdLevel ) . ' ' .
Xml::tags( 'select',
array( 'id' => $this->IdLevel, 'name' => $this->IdLevel ),
implode( "\n", $options ) );
* @return Title
*/
function getTitle() {
- return SpecialPage::getTitleFor( 'Protectedtitles' );
+ return $this->mForm->getTitle();
}
function formatRow( $row ) {
'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.
This sometimes happens when you are using a buggy web-based anonymous proxy service.",
'edit_form_incomplete' => "'''Some parts of the edit form did not reach the server; double-check that your edits are intact and try again.'''",
'editing' => 'Editing $1',
+'creating' => 'Creating $1',
'editingsection' => 'Editing $1 (section)',
'editingcomment' => 'Editing $1 (new section)',
'editconflict' => 'Edit conflict: $1',
Please see the [$2 file description page] for further information.',
'sharedupload-desc-here' => 'This file is from $1 and may be used by other projects.
The description on its [$2 file description page] there is shown below.',
+'sharedupload-desc-edit' => 'This file is from $1 and may be used by other projects.
+Maybe you want edit the description on its [$2 file description page] there.',
+'sharedupload-desc-create' => 'This file is from $1 and may be used by other projects.
+Maybe you want edit the description on its [$2 file description page] there.',
'shareddescriptionfollows' => '-', # do not translate or duplicate this message to other languages
'filepage-nofile' => 'No file by this name exists.',
'filepage-nofile-link' => 'No file by this name exists, but you can [$1 upload it].',
'sp-contributions-explain' => '', # only translate this message to other languages if you have to change it
'sp-contributions-footer' => '-', # do not translate or duplicate this message to other languages
'sp-contributions-footer-anon' => '-', # do not translate or duplicate this message to other languages
+'sp-contributions-footer-newbies' => '-', # do not translate or duplicate this message to other languages
# What links here
'whatlinkshere' => 'What links here',
'updated' => '{{Identical|Updated}}',
'previewnote' => 'Note displayed when clicking on Show preview',
'editing' => "Shown as page title when editing a page. \$1 is the name of the page that is being edited. Example: \"''Editing Main Page''\".",
+'creating' => "Shown as page title when creating a page. \$1 is the name of the page that is being created. Example: \"''Creating Main Page''\".",
'editingsection' => 'The variable $1 is the page name. This message displays at the top of the page when a user is editing a page section.',
'explainconflict' => 'Appears at the top of a page when there is an edit conflict.',
'storedversion' => 'This is used in an edit conflict as the label for the top revision that has been stored, as opposed to your version that has not been stored which is shown at the bottom of the page.',
{{doc-important|Do not customise this message. Just translate it.|Customisation should be done by local wikis.}}',
'sharedupload-desc-there' => ':See also: {{msg-mw|Sharedupload}}',
'sharedupload-desc-here' => ':See also: {{msg-mw|Sharedupload}}',
+'sharedupload-desc-edit' => ':See also: {{msg-mw|Sharedupload}}',
+'sharedupload-desc-create' => ':See also: {{msg-mw|Sharedupload}}',
'filepage-nofile' => "This message appears when visiting a File page for which there's no file, if the user cannot upload files, or file uploads are disabled. (Otherwise, see {{msg-mw|Filepage-nofile-link}})
Filepage-nofile and Filepage-nofile-link message deprecate {{msg-mw|Noimage}}",
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
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
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
('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),
('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),
('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),
'sitetitle',
'sp-contributions-footer',
'sp-contributions-footer-anon',
+ 'sp-contributions-footer-newbies',
'statistics-summary',
'statistics-footer',
'talkpagetext',
'token_suffix_mismatch',
'edit_form_incomplete',
'editing',
+ 'creating',
'editingsection',
'editingcomment',
'editconflict',
'sharedupload',
'sharedupload-desc-there',
'sharedupload-desc-here',
+ 'sharedupload-desc-edit',
+ 'sharedupload-desc-create',
'shareddescriptionfollows',
'filepage-nofile',
'filepage-nofile-link',
'sp-contributions-explain',
'sp-contributions-footer',
'sp-contributions-footer-anon',
+ 'sp-contributions-footer-newbies',
),
'whatlinkshere' => array(
'whatlinkshere',
}
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;
}
/* Galleries (see shared.css for more info) */
li.gallerybox {
vertical-align: top;
- border: solid 2px white;
display: -moz-inline-box;
display: inline-block;
}
/**
* 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
/* Don't forget to update commonPrint.css */
li.gallerybox {
vertical-align: top;
- border: solid 2px white;
display: -moz-inline-box;
display: inline-block;
}
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;
<?php
/**
+ * @group API
* @group Database
*/
class ApiBlockTest extends ApiTestCase {
<?php
/**
+ * @group API
* @group Database
*/
class ApiPurgeTest extends ApiTestCase {
<?php
/**
+ * @group API
* @group Database
*/
class ApiQueryTest extends ApiTestCase {
<?php
/**
+ * @group API
* @group Database
*/
class ApiTest extends ApiTestCase {
<?php
/**
+ * @group API
* @group Database
*/
<?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 {
parent::setUp();
$this->doLogin();
}
-
+
function getTokens() {
return $this->getTokenList( self::$users['sysop'] );
}
* @group Broken
*/
function testWatchEdit() {
-
+
$data = $this->getTokens();
-
+
$keys = array_keys( $data[0]['query']['pages'] );
$key = array_pop( $keys );
$pageinfo = $data[0]['query']['pages'][$key];
* @group Broken
*/
function testWatchClear() {
-
+
$data = $this->doApiRequest( array(
'action' => 'query',
'list' => 'watchlist' ), $data );
/**
* @group Broken
- */
+ */
function testWatchProtect() {
-
+
$data = $this->getTokens();
-
+
$keys = array_keys( $data[0]['query']['pages'] );
$key = array_pop( $keys );
$pageinfo = $data[0]['query']['pages'][$key];
* @group Broken
*/
function testGetRollbackToken() {
-
+
$data = $this->getTokens();
-
+
if ( !Title::newFromText( 'UTPage' )->exists() ) {
$this->markTestIncomplete( "The article [[UTPage]] does not exist" );
}
* @group Broken
*/
function testWatchDelete() {
-
+
$data = $this->getTokens();
-
+
$keys = array_keys( $data[0]['query']['pages'] );
$key = array_pop( $keys );
$pageinfo = $data[0]['query']['pages'][$key];
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;
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);