r5364 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r5363‎ | r5364 | r5365 >
Date:18:20, 21 September 2004
Author:kateturner
Status:old
Tags:
Comment:
use comments instead of __ so we don't scare the users if erroneous ones creep in
Modified paths:
  • /trunk/phase3/includes/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Parser.php
@@ -1862,13 +1862,13 @@
18631863 $text .= $matches[$i];
18641864 $hl = $matches[$i + 1];
18651865 if ($hl == "") continue;
1866 - if( strstr($hl, "__MWTEMPLATESECTION") ) {
 1866+ if( strstr($hl, "<!--MWTEMPLATESECTION") ) {
18671867 $text .= $hl;
18681868 continue;
18691869 }
18701870 preg_match('/^(={1,6})(.*?)(={1,6})\s*?$/m', $hl, $m2);
1871 - $text .= $m2[1] . $m2[2] . "__MWTEMPLATESECTION="
1872 - . $encodedname . "&" . base64_encode("$nsec") . "__" . $m2[3];
 1871+ $text .= $m2[1] . $m2[2] . "<!--MWTEMPLATESECTION="
 1872+ . $encodedname . "&" . base64_encode("$nsec") . "-->" . $m2[3];
18731873
18741874 $nsec++;
18751875 }
@@ -2165,11 +2165,11 @@
21662166 $templatetitle = "";
21672167 $templatesection = 0;
21682168
2169 - if (preg_match("/__MWTEMPLATESECTION=([^&]+)&([^_]+)__/", $headline, $mat)) {
 2169+ if (preg_match("/<!--MWTEMPLATESECTION=([^&]+)&([^_]+)-->/", $headline, $mat)) {
21702170 $istemplate = 1;
21712171 $templatetitle = base64_decode($mat[1]);
21722172 $templatesection = 1 + (int)base64_decode($mat[2]);
2173 - $headline = preg_replace("/__MWTEMPLATESECTION=([^&]+)&([^_]+)__/", "", $headline);
 2173+ $headline = preg_replace("/<!--MWTEMPLATESECTION=([^&]+)&([^_]+)-->/", "", $headline);
21742174 }
21752175
21762176 $numbering = '';

Status & tagging log