Index: trunk/phase3/docs/hooks.txt |
— | — | @@ -935,6 +935,10 @@ |
936 | 936 | $title: title of the message (string) |
937 | 937 | $message: value (string), change it to the message you want to define |
938 | 938 | |
| 939 | +'MessageCacheReplace': When a message page is changed. Useful for updating caches. |
| 940 | +$title: name of the page changed. |
| 941 | +$text: new contents of the page. |
| 942 | + |
939 | 943 | 'MonoBookTemplateToolboxEnd': Called by Monobook skin after toolbox links have been rendered (useful for adding more) |
940 | 944 | Note: this is only run for the Monobook skin. To add items to the toolbox |
941 | 945 | for all 'SkinTemplate'-type skins, use the SkinTemplateToolboxEnd hook |
Index: trunk/phase3/includes/MessageCache.php |
— | — | @@ -407,6 +407,8 @@ |
408 | 408 | $sidebarKey = wfMemcKey( 'sidebar', $code ); |
409 | 409 | $parserMemc->delete( $sidebarKey ); |
410 | 410 | |
| 411 | + wfRunHooks( "MessageCacheReplace", array( $title, $text ) ); |
| 412 | + |
411 | 413 | wfProfileOut( __METHOD__ ); |
412 | 414 | } |
413 | 415 | |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -160,6 +160,9 @@ |
161 | 161 | "{{GROUPCONVERT:xxx}}" enabled for this new feature. You can set related |
162 | 162 | conversion rules in [[MediaWiki:Groupconversiontable-xxx/language_code]]. |
163 | 163 | * Superfluous border="0" removed from images |
| 164 | +* Added new hook 'MessageCacheReplace' into MessageCache.php. For instance |
| 165 | + to allow extensions to update caches in similar way as MediaWiki invalidates |
| 166 | + a cached MonoBook sidebar |
164 | 167 | |
165 | 168 | === Bug fixes in 1.15 === |
166 | 169 | * (bug 16968) Special:Upload no longer throws useless warnings. |