From eee45843b02c763d541a6422d715aca5798fd9cc Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Sat, 15 Nov 2003 07:14:05 +0000 Subject: [PATCH] misc. bug fixes --- includes/Article.php | 3 +-- includes/GlobalFunctions.php | 6 +++--- includes/OutputPage.php | 2 +- includes/Setup.php | 1 + includes/SpecialExport.php | 3 ++- install.php | 2 +- maintenance/checktrans2.php | 1 + update.php | 2 +- 8 files changed, 11 insertions(+), 9 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index af803fdbbd..8bdcb7d2fd 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -282,7 +282,6 @@ class Article { # 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(); @@ -689,7 +688,7 @@ $wgLang->recodeForEdit( $wpTextbox1 ) . # 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" ) ); } diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 261f5eeb29..0de9ac302c 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -653,13 +653,13 @@ function wfCheckLimits( $deflimit = 50, $optionname = "rclimit" ) { 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; diff --git a/includes/OutputPage.php b/includes/OutputPage.php index b743174c9c..c20c1d71e8 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -731,7 +731,7 @@ $t[] = "" ; $sk = $wgUser->getSkin(); $text = $sk->transformContent( $text ); - $text .= $this->categoryMagic () ; + $text .= $this->categoryMagic () ; wfProfileOut( $fname ); return $text; diff --git a/includes/Setup.php b/includes/Setup.php index 826f15a0be..16cc547460 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -37,6 +37,7 @@ include_once( "$IP/MagicWord.php" ); 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" ); diff --git a/includes/SpecialExport.php b/includes/SpecialExport.php index 1dd1f4a355..b70e8b2304 100644 --- a/includes/SpecialExport.php +++ b/includes/SpecialExport.php @@ -15,7 +15,8 @@ function wfSpecialExport( $page = "" ) { $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" ) ); diff --git a/install.php b/install.php index 585e2cff45..9791eb2cd1 100644 --- a/install.php +++ b/install.php @@ -21,7 +21,7 @@ if ( ! ( is_readable( "./LocalSettings.php" ) $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" . diff --git a/maintenance/checktrans2.php b/maintenance/checktrans2.php index f36755b864..8981101f84 100755 --- a/maintenance/checktrans2.php +++ b/maintenance/checktrans2.php @@ -72,6 +72,7 @@ function checkLanguage( $lang, $enText ) check("wgSysopSpecialPages", $lang, $text); check("wgDeveloperSpecialPages", $lang, $text); check("wgAllMessages", $lang, $text); + check("wgMagicWords", $lang, $text); } if ( $argc > 1 ) { diff --git a/update.php b/update.php index a5f79b908c..5639d35a50 100644 --- a/update.php +++ b/update.php @@ -38,7 +38,7 @@ set_time_limit( 0 ); 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; -- 2.20.1