r5362 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r5361‎ | r5362 | r5363 >
Date:18:15, 21 September 2004
Author:kateturner
Status:old
Tags:
Comment:
fix a problem by not inserting __MWTEMPLATESECTION for section titles that don't exist
Modified paths:
  • /trunk/phase3/includes/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Parser.php
@@ -1857,9 +1857,11 @@
18581858 $text = '';
18591859 $nsec = 0;
18601860 for( $i = 0; $i < count($matches); $i += 2 ) {
 1861+ wfDebug("text=[".$matches[$i]."] heading=[".$matches[$i+1]."]\n");
18611862 if ($matches[$i] == "" && $matches[$i + 1] == "") break;
18621863 $text .= $matches[$i];
18631864 $hl = $matches[$i + 1];
 1865+ if ($hl == "") continue;
18641866 if( strstr($hl, "__MWTEMPLATESECTION") ) {
18651867 $text .= $hl;
18661868 continue;

Status & tagging log