# diff page instead of the article.
if ( isset( $diff ) ) {
- include_once( "$IP/DifferenceEngine.php" );
$wgOut->setPageTitle( $this->mTitle->getPrefixedText() );
$de = new DifferenceEngine( $oldid, $diff );
$de->showDiffPage();
# The talk page isn't in the regular link tables, so we need to update manually:
$talkns = $ns ^ 1; # talk -> normal; normal -> talk
$sql = "UPDATE cur set cur_touched='$now' WHERE cur_namespace=$talkns AND cur_title='" . wfStrencode( $ttl ) . "'";
- wfQuery( $sql );
+ wfQuery( $sql, DB_WRITE );
$this->showArticle( $text, wfMsg( "newarticle" ) );
}
function wfEscapeWikiText( $text )
{
$text = str_replace(
- array( '[', "'", 'ISBN ' , '://'),
- array( '[', ''', 'ISBN ', '://'),
+ array( '[', "'", 'ISBN ' , '://' , "\n=" ),
+ array( '[', ''', 'ISBN ', '://' , "\n=" ),
htmlspecialchars($text) );
return $text;
}
-# Loads the entire MediaWiki namespace, retuns the array
+# Loads the entire MediaWiki namespace, returns the array
function wfLoadAllMessages()
{
$sql = "SELECT cur_title,cur_text FROM cur WHERE cur_namespace=" . NS_MEDIAWIKI;
$sk = $wgUser->getSkin();
$text = $sk->transformContent( $text );
- $text .= $this->categoryMagic () ;
+ $text .= $this->categoryMagic () ;
wfProfileOut( $fname );
return $text;
include_once( "$IP/MemCachedClient.inc.php" );
include_once( "$IP/Block.php" );
include_once( "$IP/SearchEngine.php" );
+include_once( "$IP/DifferenceEngine.php" );
wfProfileOut( "$fname-includes" );
wfProfileIn( "$fname-memcached" );
$pages = explode( "\n", $page );
$xml = pages2xml( $pages, $curonly );
echo $xml;
- exit(1);
+ # exit(1) actually prints 1 in some PHP versions
+ exit("");
}
$wgOut->addWikiText( wfMsg( "exporttext" ) );
$DP = "./includes";
include_once( "./LocalSettings.php" );
include_once( "./AdminSettings.php" );
-include_once( "./maintenance/InitialiseMessages.php" );
+include_once( "./maintenance/InitialiseMessages.inc" );
if ( $wgUseTeX && ( ! is_executable( "./math/texvc" ) ) ) {
print "To use math functions, you must first compile texvc by\n" .
check("wgSysopSpecialPages", $lang, $text);
check("wgDeveloperSpecialPages", $lang, $text);
check("wgAllMessages", $lang, $text);
+ check("wgMagicWords", $lang, $text);
}
if ( $argc > 1 ) {
include_once( "Version.php" );
include_once( "{$IP}/Setup.php" );
-include_once( "./maintenance/InitialiseMessages.php" );
+include_once( "./maintenance/InitialiseMessages.inc" );
$wgTitle = Title::newFromText( "Update script" );
$wgCommandLineMode = true;