Merge "Creating new GetDoubleUnderscoreIDs hook"
authorOri.livneh <ori@wikimedia.org>
Tue, 25 Dec 2012 23:33:18 +0000 (23:33 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 25 Dec 2012 23:33:18 +0000 (23:33 +0000)
RELEASE-NOTES-1.21
docs/hooks.txt
includes/MagicWord.php

index 8bad811..85c01f4 100644 (file)
@@ -65,6 +65,7 @@ production.
   group has no key in wgDebugLogGroups, that will help triage the default log.
 * (bug 24620) Add types to LogFormatter.
 * jQuery JSON upgraded from 2.3 to 2.4.0.
+* Added GetDoubleUnderscoreIDs hook, for modifying the list of magic words.
 
 === Bug fixes in 1.21 ===
 * (bug 40353) SpecialDoubleRedirect should support interwiki redirects.
index 399af41..701c312 100644 (file)
@@ -1075,6 +1075,10 @@ $query: query options passed to Title::getCanonicalURL()
 $title: Title object that we need to get a sortkey for
 &$sortkey: Sortkey to use.
 
+'GetDoubleUnderscoreIDs': modify the list of behavior switch (double underscore)
+magic words. Called by MagicWord.
+&$doubleUnderscoreIDs: array of strings
+
 'GetFullURL': modify fully-qualified URLs used in redirects/export/offsite data
 $title: Title object of page
 $url: string value as output (out parameter, can modify)
index 357eae4..7cf59e9 100644 (file)
@@ -282,6 +282,7 @@ class MagicWord {
         */
        static function getDoubleUnderscoreArray() {
                if ( is_null( self::$mDoubleUnderscoreArray ) ) {
+                       wfRunHooks( 'GetDoubleUnderscoreIDs', array( &self::$mDoubleUnderscoreIDs ) );
                        self::$mDoubleUnderscoreArray = new MagicWordArray( self::$mDoubleUnderscoreIDs );
                }
                return self::$mDoubleUnderscoreArray;