Index: branches/REL1_12/phase3/includes/Preprocessor_DOM.php |
— | — | @@ -972,7 +972,7 @@ |
973 | 973 | $titleText = $this->title->getPrefixedDBkey(); |
974 | 974 | $this->parser->mHeadings[] = array( $titleText, $headingIndex ); |
975 | 975 | $serial = count( $this->parser->mHeadings ) - 1; |
976 | | - $marker = "{$this->parser->mUniqPrefix}-h-$serial-{$this->parser->mMarkerSuffix}"; |
| 976 | + $marker = "{$this->parser->mUniqPrefix}-h-$serial-" . Parser::MARKER_SUFFIX; |
977 | 977 | $count = $contextNode->getAttribute( 'level' ); |
978 | 978 | $s = substr( $s, 0, $count ) . $marker . substr( $s, $count ); |
979 | 979 | $this->parser->mStripState->general->setPair( $marker, '' ); |
Index: branches/REL1_12/phase3/includes/Parser.php |
— | — | @@ -82,14 +82,17 @@ |
83 | 83 | const OT_WIKI = 2; |
84 | 84 | const OT_PREPROCESS = 3; |
85 | 85 | const OT_MSG = 3; |
86 | | - |
| 86 | + |
| 87 | + // Marker Suffix needs to be accessible staticly. |
| 88 | + const MARKER_SUFFIX = "-QINU\x7f"; |
| 89 | + |
87 | 90 | /**#@+ |
88 | 91 | * @private |
89 | 92 | */ |
90 | 93 | # Persistent: |
91 | 94 | var $mTagHooks, $mTransparentTagHooks, $mFunctionHooks, $mFunctionSynonyms, $mVariables, |
92 | | - $mImageParams, $mImageParamsMagicArray, $mStripList, $mMarkerSuffix, $mMarkerIndex, |
93 | | - $mExtLinkBracketedRegex, $mPreprocessor, $mDefaultStripList, $mVarCache, $mConf; |
| 95 | + $mImageParams, $mImageParamsMagicArray, $mStripList, $mMarkerIndex, $mPreprocessor, |
| 96 | + $mExtLinkBracketedRegex, $mDefaultStripList, $mVarCache, $mConf; |
94 | 97 | |
95 | 98 | |
96 | 99 | # Cleared with clearState(): |
— | — | @@ -124,7 +127,6 @@ |
125 | 128 | $this->mFunctionHooks = array(); |
126 | 129 | $this->mFunctionSynonyms = array( 0 => array(), 1 => array() ); |
127 | 130 | $this->mDefaultStripList = $this->mStripList = array( 'nowiki', 'gallery' ); |
128 | | - $this->mMarkerSuffix = "-QINU\x7f"; |
129 | 131 | $this->mExtLinkBracketedRegex = '/\[(\b(' . wfUrlProtocols() . ')'. |
130 | 132 | '[^][<>"\\x00-\\x20\\x7F]+) *([^\]\\x0a\\x0d]*?)\]/S'; |
131 | 133 | $this->mVarCache = array(); |
— | — | @@ -560,7 +562,7 @@ |
561 | 563 | $inside = $p[4]; |
562 | 564 | } |
563 | 565 | |
564 | | - $marker = "$uniq_prefix-$element-" . sprintf('%08X', $n++) . $this->mMarkerSuffix; |
| 566 | + $marker = "$uniq_prefix-$element-" . sprintf('%08X', $n++) . self::MARKER_SUFFIX; |
565 | 567 | $stripped .= $marker; |
566 | 568 | |
567 | 569 | if ( $close === '/>' ) { |
— | — | @@ -652,7 +654,7 @@ |
653 | 655 | * @private |
654 | 656 | */ |
655 | 657 | function insertStripItem( $text ) { |
656 | | - $rnd = "{$this->mUniqPrefix}-item-{$this->mMarkerIndex}-{$this->mMarkerSuffix}"; |
| 658 | + $rnd = "{$this->mUniqPrefix}-item-{$this->mMarkerIndex}-" . self::MARKER_SUFFIX; |
657 | 659 | $this->mMarkerIndex++; |
658 | 660 | $this->mStripState->general->setPair( $rnd, $text ); |
659 | 661 | return $rnd; |
— | — | @@ -3220,7 +3222,7 @@ |
3221 | 3223 | $attrText = !isset( $params['attr'] ) ? null : $frame->expand( $params['attr'] ); |
3222 | 3224 | $content = !isset( $params['inner'] ) ? null : $frame->expand( $params['inner'] ); |
3223 | 3225 | |
3224 | | - $marker = "{$this->mUniqPrefix}-$name-" . sprintf('%08X', $this->mMarkerIndex++) . $this->mMarkerSuffix; |
| 3226 | + $marker = "{$this->mUniqPrefix}-$name-" . sprintf('%08X', $this->mMarkerIndex++) . self::MARKER_SUFFIX; |
3225 | 3227 | |
3226 | 3228 | if ( $this->ot['html'] ) { |
3227 | 3229 | $name = strtolower( $name ); |
— | — | @@ -3415,7 +3417,7 @@ |
3416 | 3418 | $prevlevel = 0; |
3417 | 3419 | $toclevel = 0; |
3418 | 3420 | $prevtoclevel = 0; |
3419 | | - $markerRegex = "{$this->mUniqPrefix}-h-(\d+)-{$this->mMarkerSuffix}"; |
| 3421 | + $markerRegex = "{$this->mUniqPrefix}-h-(\d+)-" . self::MARKER_SUFFIX; |
3420 | 3422 | $baseTitleText = $this->mTitle->getPrefixedDBkey(); |
3421 | 3423 | $tocraw = array(); |
3422 | 3424 | |
— | — | @@ -4836,12 +4838,12 @@ |
4837 | 4839 | break; |
4838 | 4840 | } else { |
4839 | 4841 | $out .= call_user_func( $callback, substr( $s, $i, $markerStart - $i ) ); |
4840 | | - $markerEnd = strpos( $s, $this->mMarkerSuffix, $markerStart ); |
| 4842 | + $markerEnd = strpos( $s, self::MARKER_SUFFIX, $markerStart ); |
4841 | 4843 | if ( $markerEnd === false ) { |
4842 | 4844 | $out .= substr( $s, $markerStart ); |
4843 | 4845 | break; |
4844 | 4846 | } else { |
4845 | | - $markerEnd += strlen( $this->mMarkerSuffix ); |
| 4847 | + $markerEnd += strlen( self::MARKER_SUFFIX ); |
4846 | 4848 | $out .= substr( $s, $markerStart, $markerEnd - $markerStart ); |
4847 | 4849 | $i = $markerEnd; |
4848 | 4850 | } |
Index: branches/REL1_12/phase3/includes/Preprocessor_Hash.php |
— | — | @@ -923,7 +923,7 @@ |
924 | 924 | $titleText = $this->title->getPrefixedDBkey(); |
925 | 925 | $this->parser->mHeadings[] = array( $titleText, $bits['i'] ); |
926 | 926 | $serial = count( $this->parser->mHeadings ) - 1; |
927 | | - $marker = "{$this->parser->mUniqPrefix}-h-$serial-{$this->parser->mMarkerSuffix}"; |
| 927 | + $marker = "{$this->parser->mUniqPrefix}-h-$serial-" . Parser::MARKER_SUFFIX; |
928 | 928 | $s = substr( $s, 0, $bits['level'] ) . $marker . substr( $s, $bits['level'] ); |
929 | 929 | $this->parser->mStripState->general->setPair( $marker, '' ); |
930 | 930 | $out .= $s; |
Index: branches/REL1_12/phase3/RELEASE-NOTES |
— | — | @@ -3,6 +3,14 @@ |
4 | 4 | Security reminder: MediaWiki does not require PHP's register_globals |
5 | 5 | setting since version 1.2.0. If you have it on, turn it *off* if you can. |
6 | 6 | |
| 7 | +== MediaWiki 1.12.1 == |
| 8 | + |
| 9 | + |
| 10 | +Changes since 1.12.0: |
| 11 | + |
| 12 | +* (bug 13522) Fix fatal error in Parser::extractTagsAndParams |
| 13 | + |
| 14 | + |
7 | 15 | == MediaWiki 1.12.0 == |
8 | 16 | |
9 | 17 | This is the quarterly branch release of MediaWiki for Winter 2008. |