X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fparser%2FLinkHolderArray.php;h=bc5182c1dd185c416bd250c692e8d232b4c09334;hp=b32f43b893f13f635d1de643236a0931eeff5b80;hb=89539f2aa1b158fdcc703ad053e2580cb97a6385;hpb=f43fa6f4f0e2cb60b8543daad661b48a3e0653a9 diff --git a/includes/parser/LinkHolderArray.php b/includes/parser/LinkHolderArray.php index b32f43b893..bc5182c1dd 100644 --- a/includes/parser/LinkHolderArray.php +++ b/includes/parser/LinkHolderArray.php @@ -264,18 +264,16 @@ class LinkHolderArray { /** * Replace link placeholders with actual links, in the buffer * - * @param string $text + * @param string &$text */ public function replace( &$text ) { - $this->replaceInternal( $text ); $this->replaceInterwiki( $text ); - } /** * Replace internal links - * @param string $text + * @param string &$text */ protected function replaceInternal( &$text ) { if ( !$this->internals ) { @@ -414,12 +412,11 @@ class LinkHolderArray { $replacer->cb(), $text ); - } /** * Replace interwiki links - * @param string $text + * @param string &$text */ protected function replaceInterwiki( &$text ) { if ( empty( $this->interwikis ) ) { @@ -447,7 +444,7 @@ class LinkHolderArray { /** * Modify $this->internals and $colours according to language variant linking rules - * @param array $colours + * @param array &$colours */ protected function doVariants( &$colours ) { global $wgContLang; @@ -614,10 +611,9 @@ class LinkHolderArray { * @return string */ public function replaceText( $text ) { - $text = preg_replace_callback( '//', - [ &$this, 'replaceTextCallback' ], + [ $this, 'replaceTextCallback' ], $text ); return $text;