r49316 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r49315‎ | r49316 | r49317 >
Date:14:23, 8 April 2009
Author:emil
Status:ok
Tags:
Comment:
Added new hook 'MessageCacheReplace' into MessageCache.php. For instance
to allow extensions to update caches in similar way as MediaWiki invalidates
a cached MonoBook sidebar
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/docs/hooks.txt (modified) (history)
  • /trunk/phase3/includes/MessageCache.php (modified) (history)

Diff [purge]

Index: trunk/phase3/docs/hooks.txt
@@ -935,6 +935,10 @@
936936 $title: title of the message (string)
937937 $message: value (string), change it to the message you want to define
938938
 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+
939943 'MonoBookTemplateToolboxEnd': Called by Monobook skin after toolbox links have been rendered (useful for adding more)
940944 Note: this is only run for the Monobook skin. To add items to the toolbox
941945 for all 'SkinTemplate'-type skins, use the SkinTemplateToolboxEnd hook
Index: trunk/phase3/includes/MessageCache.php
@@ -407,6 +407,8 @@
408408 $sidebarKey = wfMemcKey( 'sidebar', $code );
409409 $parserMemc->delete( $sidebarKey );
410410
 411+ wfRunHooks( "MessageCacheReplace", array( $title, $text ) );
 412+
411413 wfProfileOut( __METHOD__ );
412414 }
413415
Index: trunk/phase3/RELEASE-NOTES
@@ -160,6 +160,9 @@
161161 "{{GROUPCONVERT:xxx}}" enabled for this new feature. You can set related
162162 conversion rules in [[MediaWiki:Groupconversiontable-xxx/language_code]].
163163 * 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
164167
165168 === Bug fixes in 1.15 ===
166169 * (bug 16968) Special:Upload no longer throws useless warnings.

Status & tagging log