From: MatmaRex Date: Fri, 26 Apr 2013 21:42:31 +0000 (+0200) Subject: Remove Wikimedia-specific hack in ParserOutput X-Git-Tag: 1.31.0-rc.0~19433^2~2 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=5ce5e78a938fbd52b01b3d273bedc31380861a01;p=lhc%2Fweb%2Fwiklou.git Remove Wikimedia-specific hack in ParserOutput Cleanup after I6a6c12a9. To be merged after appropriate caches are purged. Change-Id: I849c4bd1fe59e582f9f16789e8b511719e2a5d06 --- diff --git a/includes/parser/ParserOutput.php b/includes/parser/ParserOutput.php index 29b3500967..c5e42a4d2d 100644 --- a/includes/parser/ParserOutput.php +++ b/includes/parser/ParserOutput.php @@ -67,22 +67,8 @@ class ParserOutput extends CacheTime { function getText() { if ( $this->mEditSectionTokens ) { - $text = $this->mText; - - // If there's old output with misplaced editsections links cached, mangle it to put them in - // the right position. We can assume that there is no '' inside header tags, making this - // possible to do with a regex. - $text = preg_replace( - // [ this part is like EDITSECTION_REGEX, but with non-capturing groups ] - // note the space here ------v - '#(<[hH](\d)>)(<(?:mw:)?editsection page="(?:.*?)" section="(?:.*?)"(?:/>|>(?:.*?)(?:))) ([\s\S]*?)()#', - // swap the order of content and editsection link - $2 is ignored since it's the number in hN's tag name - '$1$4 $3$5', - $text - ); - return preg_replace_callback( ParserOutput::EDITSECTION_REGEX, - array( &$this, 'replaceEditSectionLinksCallback' ), $text ); + array( &$this, 'replaceEditSectionLinksCallback' ), $this->mText ); } return preg_replace( ParserOutput::EDITSECTION_REGEX, '', $this->mText ); }