From b18ec9495237dd449916c516f8f934c13a6d5a46 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Tue, 14 Jul 2009 13:35:07 +0000 Subject: [PATCH] * Fix typo in Linker.php * Only call ParserOutput::setTOCHTML() if a TOC was really generated --- includes/Linker.php | 2 +- includes/parser/Parser.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/Linker.php b/includes/Linker.php index a799dceb01..93ac43def2 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -1180,7 +1180,7 @@ class Linker { foreach ( $tree as $section ) { if ( $section['toclevel'] > $lastLevel ) $toc .= $this->tocIndent(); - else if ( $secton['toclevel'] < $lastLevel ) + else if ( $section['toclevel'] < $lastLevel ) $toc .= $this->tocUnindent( $lastLevel - $section['toclevel'] ); else diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 768c9cbab9..5a674c5052 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -3734,11 +3734,11 @@ class Parser $toc .= $sk->tocUnindent( $prevtoclevel - 1 ); } $toc = $sk->tocList( $toc ); + $this->mOutput->setTOCHTML( $toc ); } if ( $isMain ) { $this->mOutput->setSections( $tocraw ); - $this->mOutput->setTOCHTML( $toc ); } # split up and insert constructed headlines -- 2.20.1