misc. bug fixes
authorTim Starling <tstarling@users.mediawiki.org>
Sat, 15 Nov 2003 07:14:05 +0000 (07:14 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Sat, 15 Nov 2003 07:14:05 +0000 (07:14 +0000)
includes/Article.php
includes/GlobalFunctions.php
includes/OutputPage.php
includes/Setup.php
includes/SpecialExport.php
install.php
maintenance/checktrans2.php
update.php

index af803fd..8bdcb7d 100644 (file)
@@ -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" ) );
        }
index 261f5ee..0de9ac3 100644 (file)
@@ -653,13 +653,13 @@ function wfCheckLimits( $deflimit = 50, $optionname = "rclimit" ) {
 function wfEscapeWikiText( $text )
 {
        $text = str_replace( 
-               array( '[',     "'",     'ISBN '    , '://'),
-               array( '&#91;', '&#39;', 'ISBN&#32;', '&#58;//'),
+               array( '[',     "'",     'ISBN '    , '://'     , "\n=" ),
+               array( '&#91;', '&#39;', 'ISBN&#32;', '&#58;//' , "\n&#61;" ),
                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;
index b743174..c20c1d7 100644 (file)
@@ -731,7 +731,7 @@ $t[] = "</table>" ;
 
                $sk = $wgUser->getSkin();
                $text = $sk->transformContent( $text );
-                $text .= $this->categoryMagic () ;
+               $text .= $this->categoryMagic () ;
 
                wfProfileOut( $fname );
                return $text;
index 826f15a..16cc547 100644 (file)
@@ -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" );
index 1dd1f4a..b70e8b2 100644 (file)
@@ -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" ) );
index 585e2cf..9791eb2 100644 (file)
@@ -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" .
index f36755b..8981101 100755 (executable)
@@ -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 ) {
index a5f79b9..5639d35 100644 (file)
@@ -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;