Index: trunk/phase3/includes/SpecialVersion.php |
— | — | @@ -129,6 +129,11 @@ |
130 | 130 | $out .= "** Parser extension tags:\n"; |
131 | 131 | $out .= '***' . $this->listToText( $tags ). "\n"; |
132 | 132 | } |
| 133 | + |
| 134 | + if( $cnt = count( $fhooks = $wgParser->getFunctionHooks() ) ) { |
| 135 | + $out .= "** Parser function hooks:\n"; |
| 136 | + $out .= '***' . $this->listToText( $fhooks ) . "\n"; |
| 137 | + } |
133 | 138 | |
134 | 139 | if ( count( $wgSkinExtensionFunction ) ) { |
135 | 140 | $out .= "** Skin extension functions:\n"; |
Index: trunk/phase3/includes/Parser.php |
— | — | @@ -3852,10 +3852,8 @@ |
3853 | 3853 | |
3854 | 3854 | # Add to function cache |
3855 | 3855 | $mw = MagicWord::get( $id ); |
3856 | | - if ( !$mw ) { |
3857 | | - throw new MWException( 'The calling convention to Parser::setFunctionHook() has changed, ' . |
3858 | | - 'it is now required to pass a MagicWord ID as the first parameter.' ); |
3859 | | - } |
| 3856 | + if( !$mw ) |
| 3857 | + throw new MWException( 'Parser::setFunctionHook() expecting a magic word identifier.' ); |
3860 | 3858 | |
3861 | 3859 | $synonyms = $mw->getSynonyms(); |
3862 | 3860 | $sensitive = intval( $mw->isCaseSensitive() ); |
— | — | @@ -3879,6 +3877,15 @@ |
3880 | 3878 | } |
3881 | 3879 | |
3882 | 3880 | /** |
| 3881 | + * Get all registered function hook identifiers |
| 3882 | + * |
| 3883 | + * @return array |
| 3884 | + */ |
| 3885 | + function getFunctionHooks() { |
| 3886 | + return array_keys( $this->mFunctionHooks ); |
| 3887 | + } |
| 3888 | + |
| 3889 | + /** |
3883 | 3890 | * Replace <!--LINK--> link placeholders with actual links, in the buffer |
3884 | 3891 | * Placeholders created in Skin::makeLinkObj() |
3885 | 3892 | * Returns an array of links found, indexed by PDBK: |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -161,8 +161,8 @@ |
162 | 162 | * (bug 832) Return to user page after emailing a user |
163 | 163 | * (bug 366) Add local-system-timezone equivalents for date/time variables |
164 | 164 | * (bug 7109) Fix Atom feed version number in header links |
| 165 | +* (bug 7075) List registered parser function hooks on Special:Version |
165 | 166 | |
166 | | - |
167 | 167 | == Languages updated == |
168 | 168 | |
169 | 169 | * Albanian (sq) |