From ce01f4f3208f2d7254ce08bdfaa565ddfb85b691 Mon Sep 17 00:00:00 2001 From: Matthias Jordan Date: Thu, 18 Sep 2003 10:51:36 +0000 Subject: [PATCH] TOC has been displayed regardless of user setting "showtoc". Fixed. --- includes/OutputPage.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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 -- 2.20.1