From: Matthias Jordan Date: Thu, 18 Sep 2003 10:51:36 +0000 (+0000) Subject: TOC has been displayed regardless of user setting "showtoc". Fixed. X-Git-Tag: 1.1.0~255 X-Git-Url: http://git.cyclocoop.org/data/%24self?a=commitdiff_plain;h=ce01f4f3208f2d7254ce08bdfaa565ddfb85b691;p=lhc%2Fweb%2Fwiklou.git TOC has been displayed regardless of user setting "showtoc". Fixed. --- diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 4a7dfb6d38..2fd15de496 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -1368,10 +1368,14 @@ $t[] = "" ; $es=$wgUser->getID() && $wgUser->getOption( "editsection" ); $esr=$wgUser->getID() && $wgUser->getOption( "editsectiononrightclick" ); } - # if the string __NOTOC__ (not case-sensitive) occurs in the HTML, do not - # add TOC + + # if the string __NOTOC__ (not case-sensitive) occurs in the HTML, + # do not add TOC $mw =& MagicWord::get( MAG_NOTOC ); - $st = ! $mw->matchAndRemove( $text ); + if ($mw->matchAndRemove( $text )) + { + $st = 0; + } # never add the TOC to the Main Page. This is an entry page that should not # be more than 1-2 screens large anyway