X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FMagicWord.php;h=1703179c9e289601bf3b2c374df2876cfb271603;hb=a8dcb178c7e347ef56bef1e36bb4a26a61a1d82b;hp=391e05aea1c0188885dd57751af123bf898fa549;hpb=f43fa6f4f0e2cb60b8543daad661b48a3e0653a9;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/MagicWord.php b/includes/MagicWord.php index 391e05aea1..1703179c9e 100644 --- a/includes/MagicWord.php +++ b/includes/MagicWord.php @@ -46,8 +46,8 @@ * $magicWords = []; * * $magicWords['en'] = [ - * 'magicwordkey' => [ 0, 'case_insensitive_magic_word' ], - * 'magicwordkey2' => [ 1, 'CASE_sensitive_magic_word2' ], + * 'magicwordkey' => [ 0, 'case_insensitive_magic_word' ], + * 'magicwordkey2' => [ 1, 'CASE_sensitive_magic_word2' ], * ]; * @endcode * @@ -169,6 +169,7 @@ class MagicWord { 'localtimestamp', 'directionmark', 'contentlanguage', + 'pagelanguage', 'numberofadmins', 'cascadingsources', ]; @@ -501,7 +502,7 @@ class MagicWord { # multiple matched parts (variable match); some will be empty because of # synonyms. The variable will be the second non-empty one so remove any # blank elements and re-sort the indices. - # See also bug 6526 + # See also T8526 $matches = array_values( array_filter( $matches ) ); @@ -525,7 +526,7 @@ class MagicWord { $this->mFound = false; $text = preg_replace_callback( $this->getRegex(), - [ &$this, 'pregRemoveAndRecord' ], + [ $this, 'pregRemoveAndRecord' ], $text ); @@ -540,7 +541,7 @@ class MagicWord { $this->mFound = false; $text = preg_replace_callback( $this->getRegexStart(), - [ &$this, 'pregRemoveAndRecord' ], + [ $this, 'pregRemoveAndRecord' ], $text ); @@ -663,7 +664,7 @@ class MagicWord { $search = []; $replace = []; foreach ( $magicarr as $id => $replacement ) { - $mw = MagicWord::get( $id ); + $mw = self::get( $id ); $search[] = $mw->getRegex(); $replace[] = $replacement; }