From 7fd73cbe63f95ea4d945656c80485addd8fb491b Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Sat, 10 Jan 2004 14:18:05 +0000 Subject: [PATCH] fixed a few minor bugs and misc. notices --- includes/Article.php | 2 +- includes/DateFormatter.php | 2 +- includes/GlobalFunctions.php | 1 + includes/Setup.php | 2 +- includes/Skin.php | 5 ++++- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index 6da535f4c2..7b122d1873 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -1188,7 +1188,7 @@ class Article { and ($this->getID() != 0) and ($wgUser->getId() == 0) and (!$wgUser->getNewtalk()) - and ($this->mTitle->getNamespace != Namespace::getSpecial()) + and ($this->mTitle->getNamespace() != Namespace::getSpecial()) and ($action == "view") and (!isset($oldid)) and (!isset($diff)) diff --git a/includes/DateFormatter.php b/includes/DateFormatter.php index a4a42826bb..7eb46b2cfa 100755 --- a/includes/DateFormatter.php +++ b/includes/DateFormatter.php @@ -25,7 +25,7 @@ class DateFormatter function DateFormatter() { - global $wgMonthNamesEn; + global $wgMonthNamesEn, $wgInputEncoding; $this->monthNames = $this->getMonthRegex(); for ( $i=1; $i<=12; $i++ ) { diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 25f67bb9ba..917735d55f 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -165,6 +165,7 @@ function logProfilingData() $elapsed = $now - $start; if ( "" != $wgDebugLogFile ) { $prof = wfGetProfilingOutput( $start, $elapsed ); + $forward = ""; if( !empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) $forward = " forwarded for " . $_SERVER['HTTP_X_FORWARDED_FOR']; if( !empty( $_SERVER['HTTP_CLIENT_IP'] ) ) diff --git a/includes/Setup.php b/includes/Setup.php index 9e01fa4200..dcb53781ca 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -43,7 +43,7 @@ global $wgUser, $wgLang, $wgOut, $wgTitle; global $wgArticle, $wgDeferredUpdateList, $wgLinkCache; global $wgMemc, $wgMagicWords, $wgMwRedir, $wgDebugLogFile; global $wgMessageCache, $wgUseMemCached, $wgUseDatabaseMessages; -global $wgMsgCacheExpiry, $wgDBname; +global $wgMsgCacheExpiry, $wgDBname, $wgCommandLineMode; class MemCachedClientforWiki extends MemCachedClient { function _debug( $text ) { diff --git a/includes/Skin.php b/includes/Skin.php index 59ed116670..e5638f77c9 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -81,6 +81,8 @@ class Skin { } function outputPage( &$out ) { + global $wgDebugComments; + wfProfileIn( "Skin::outputPage" ); $this->initPage(); $out->out( $out->headElement() ); @@ -1045,7 +1047,7 @@ class Skin { function otherLanguages() { - global $wgOut, $wgLang, $wgTitle; + global $wgOut, $wgLang, $wgTitle, $wgUseNewInterlanguage; $a = $wgOut->getLanguageLinks(); # TEST THIS @@@ @@ -1866,6 +1868,7 @@ class Skin { } function tocUnindent($level) { + $rv = ""; while($level-->0) $rv.="\n"; return $rv; } -- 2.20.1