From: Brion Vibber Date: Wed, 2 Jul 2008 22:56:15 +0000 (+0000) Subject: Revert the rest of r36804 -- ExtendJSGlobalVars and wfMessageCacheReplace hooks. X-Git-Tag: 1.31.0-rc.0~46789 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=918ec72c43433774153894a4fd302e1f7c3fa70c;p=lhc%2Fweb%2Fwiklou.git Revert the rest of r36804 -- ExtendJSGlobalVars and wfMessageCacheReplace hooks. ExtendJSGlobalVars is probably ok in function, though I don't really like its name. wfMessageCacheReplace seems really unclear as to what it's trying to accomplish. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 5ae6e76540..735b2b6c3f 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -175,7 +175,6 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Allow an $error message to be passed to ArticleDelete hook * Allow extensions to modify the user creation form by calling addInputItem(); * Add meta generator tag to HTML output -* Two new hooks, ExtendJSGlobalVars and wfMessageCacheReplace added * MediawikiPerformAction hook is now passed the Mediawiki object * Added blank special page Special:BlankPage for benchmarking, etc. * (bug 13862) Specialpages now has a horizontal TOC if there's three or more diff --git a/docs/hooks.txt b/docs/hooks.txt index 8a787c3f33..de06b14ce5 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -600,10 +600,6 @@ $from: address of sending user $subject: subject of the mail $text: text of the mail -'ExtendJSGlobalVars': called right before Skin::makeVariablesScript is executed -&$vars: variable (or multiple variables) to be added into the output - of Skin::makeVariablesScript - 'FetchChangesList': When fetching the ChangesList derivative for a particular user &$user: User the list is being fetched for &$skin: Skin object to be used with the list @@ -1302,9 +1298,5 @@ $article: article object watched 'wgQueryPages': called when initialising $wgQueryPages, use this to add new query pages to be updated with maintenance/updateSpecialPages.php $query: $wgQueryPages itself -'wfMessageCacheReplace': called after sidebar memcached key has been deleted, use this to replace core messages by using an extension -$title: title of the MediaWiki: message page -$text: text of the MediaWiki: message page - More hooks might be available but undocumented, you can execute ./maintenance/findhooks.php to find hidden one. diff --git a/includes/MessageCache.php b/includes/MessageCache.php index 9d9a057f8d..9bd33214f0 100644 --- a/includes/MessageCache.php +++ b/includes/MessageCache.php @@ -363,7 +363,6 @@ class MessageCache { } $this->unlock(); $parserMemc->delete(wfMemcKey('sidebar')); - wfRunHooks( 'wfMessageCacheReplace', array( $title, $text ) ); wfProfileOut( __METHOD__ ); } diff --git a/includes/Skin.php b/includes/Skin.php index 15b7a1ffa6..3f8c6b983f 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -362,8 +362,6 @@ class Skin extends Linker { $vars['wgAjaxWatch'] = $msgs; } - wfRunHooks('ExtendJSGlobalVars', array(&$vars)); - return self::makeVariablesScript( $vars ); }