r67626 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r67625‎ | r67626 | r67627 >
Date:15:08, 8 June 2010
Author:platonides
Status:ok
Tags:
Comment:
Merge from trunk r67623.
Replace MonobookTemplateToolboxEnd by SkinTemplateToolboxEnd and deprecate the former. Since r63861
made Modern inherit from Monobook, this mostly benefits vector. On 1.16 it's a win for Modern, too.
Modified paths:
  • /branches/REL1_16/extensions/Contributors/Contributors.php (modified) (history)
  • /branches/REL1_16/extensions/Duplicator/Duplicator.php (modified) (history)
  • /branches/REL1_16/extensions/EmailPage/EmailPage.php (modified) (history)
  • /branches/REL1_16/extensions/LanguageSelector/LanguageSelector.php (modified) (history)
  • /branches/REL1_16/extensions/LanguageSelector/README (modified) (history)
  • /branches/REL1_16/extensions/MetavidWiki/includes/MV_GlobalFunctions.php (modified) (history)
  • /branches/REL1_16/extensions/MultiUpload/SpecialMultipleUpload.php (modified) (history)
  • /branches/REL1_16/extensions/SemanticMediaWiki/includes/SMW_GlobalFunctions.php (modified) (history)
  • /branches/REL1_16/extensions/Tasks/Tasks.php (modified) (history)
  • /branches/REL1_16/extensions/WikiArticleFeeds/WikiArticleFeeds.php (modified) (history)
  • /branches/REL1_16/extensions/Wikidata/misc/FundButton.php (modified) (history)
  • /branches/REL1_16/phase3/RELEASE-NOTES (modified) (history)
  • /branches/REL1_16/phase3/docs/hooks.txt (modified) (history)

Diff [purge]

Index: branches/REL1_16/extensions/MultiUpload/SpecialMultipleUpload.php
@@ -36,7 +36,7 @@
3737 $wgSpecialPageGroups['MultipleUpload'] = 'media';
3838
3939 // Hooked functions
40 -$wgHooks['MonoBookTemplateToolboxEnd'][] = 'wfMultiUploadToolbox';
 40+$wgHooks['SkinTemplateToolboxEnd'][] = 'wfMultiUploadToolbox';
4141 $wgHooks['SkinTemplateBuildNavUrlsNav_urlsAfterPermalink'][] = 'wfSpecialMultiUploadNav';
4242
4343 // Add the link to Special:MultipleUpload to all SkinTemplate-based skins for users with the 'upload' user right
Index: branches/REL1_16/extensions/SemanticMediaWiki/includes/SMW_GlobalFunctions.php
@@ -253,7 +253,7 @@
254254 $wgHooks['ParserFirstCallInit'][] = 'SMWParserExtensions::registerParserFunctions';
255255
256256 if ($smwgToolboxBrowseLink) {
257 - if (version_compare($wgVersion,'1.13','>')) {
 257+ if (version_compare($wgVersion,'1.13','>=')) {
258258 $wgHooks['SkinTemplateToolboxEnd'][] = 'smwfShowBrowseLink'; // introduced only in 1.13
259259 } else {
260260 $wgHooks['MonoBookTemplateToolboxEnd'][] = 'smwfShowBrowseLink';
Index: branches/REL1_16/extensions/Tasks/Tasks.php
@@ -87,7 +87,7 @@
8888 $wgHooks['ArticleInsertComplete'][] = 'wfTasksExtensionArticleSaveComplete';
8989 $wgHooks['ArticleDeleteComplete'][] = 'wfTasksExtensionArticleDeleteComplete';
9090 $wgHooks['SpecialMovepageAfterMove'][] = 'wfTasksExtensionAfterMove';
91 -$wgHooks['MonoBookTemplateToolboxEnd'][] = 'wfTasksExtensionAfterToolbox';
 91+$wgHooks['SkinTemplateToolboxEnd'][] = 'wfTasksExtensionAfterToolbox';
9292 $wgHooks['ArticleViewHeader'][] = 'wfTaskExtensionHeaderHook';
9393 $wgHooks['EditPage::showEditForm:initial'][] = 'wfTaskExtensionEditFormInitialHook';
9494 $wgHooks['ParserTestTables'][] = 'wfTasksTestTables';
Index: branches/REL1_16/extensions/Duplicator/Duplicator.php
@@ -42,7 +42,7 @@
4343 function efDuplicator() {
4444 global $wgHooks;
4545 $wgHooks['SkinTemplateBuildNavUrlsNav_urlsAfterPermalink'][] = 'efDuplicatorNavigation';
46 - $wgHooks['MonoBookTemplateToolboxEnd'][] = 'efDuplicatorToolbox';
 46+ $wgHooks['SkinTemplateToolboxEnd'][] = 'efDuplicatorToolbox';
4747 }
4848
4949 /**
Index: branches/REL1_16/extensions/WikiArticleFeeds/WikiArticleFeeds.php
@@ -206,7 +206,11 @@
207207
208208 # Attach Hooks
209209 $wgHooks['OutputPageBeforeHTML'][] = 'wfAddWikiFeedHeaders';
210 -$wgHooks['MonoBookTemplateToolboxEnd'][] = 'wfWikiArticleFeedsToolboxLinks';
 210+if ( version_compare( $wgVersion, '1.13', '>=' ) ) {
 211+ $wgHooks['SkinTemplateToolboxEnd'][] = 'wfWikiArticleFeedsToolboxLinks'; // introduced in 1.13
 212+} else {
 213+ $wgHooks['MonoBookTemplateToolboxEnd'][] = 'wfWikiArticleFeedsToolboxLinks';
 214+}
211215 $wgHooks['UnknownAction'][] = 'wfWikiArticleFeedsAction';
212216 $wgHooks['ArticlePurge'][] = 'wfPurgeFeedsOnArticlePurge';
213217
@@ -263,7 +267,7 @@
264268
265269 /**
266270 * Adds the Wiki feed links to the bottom of the toolbox in Monobook or like-minded skins.
267 - * Usage: $wgHooks['MonoBookTemplateToolboxEnd'][] = 'wfWikiArticleFeedsToolboxLinks';
 271+ * Usage: $wgHooks['SkinTemplateToolboxEnd'][] = 'wfWikiArticleFeedsToolboxLinks';
268272 * @param QuickTemplate $template Instance of MonoBookTemplate or other QuickTemplate
269273 */
270274 function wfWikiArticleFeedsToolboxLinks( $template ) {
Index: branches/REL1_16/extensions/LanguageSelector/LanguageSelector.php
@@ -170,7 +170,7 @@
171171 if ( $wgLanguageSelectorLocation != LANGUAGE_SELECTOR_MANUAL && $wgLanguageSelectorLocation != LANGUAGE_SELECTOR_AT_TOP_OF_TEXT ) {
172172 switch ( $wgLanguageSelectorLocation ) {
173173 case LANGUAGE_SELECTOR_IN_TOOLBOX:
174 - $wgHooks['MonoBookTemplateToolboxEnd'][] = 'wfLanguageSelectorSkinHook';
 174+ $wgHooks['SkinTemplateToolboxEnd'][] = 'wfLanguageSelectorSkinHook';
175175 break;
176176 default:
177177 $wgHooks['SkinTemplateOutputPageBeforeExec'][] = 'wfLanguageSelectorSkinTemplateOutputPageBeforeExec';
Index: branches/REL1_16/extensions/LanguageSelector/README
@@ -74,8 +74,8 @@
7575 content. This is the default, but it looks quite ugly without extra CSS
7676 rules applied.
7777 ** LANGUAGE_SELECTOR_IN_TOOLBOX: inject a dropdown box at the bottom of the
78 - toolbox in the sidebar. This only works with the MonoBook skin, or skins
79 - explicitly supporting the MonoBookTemplateToolboxEnd hook.
 78+ toolbox in the sidebar. This doesn't work in all skins, mostly in skin
 79+ MonoBook, or skins explicitly supporting the SkinTemplateToolboxEnd hook.
8080 ** LANGUAGE_SELECTOR_AS_PORTLET: inject the language selector as a portlet
8181 in the sidebar, similar to how interlanguage-links are shown.
8282 Works with MonoBook skin, may also work with some SkinTemplate-based skins.
Index: branches/REL1_16/extensions/EmailPage/EmailPage.php
@@ -48,7 +48,7 @@
4949 if ( isset( $_REQUEST['ea-send'] ) ) require_once( $wgPhpMailerClass );
5050
5151 # Add toolbox and action links
52 -if ( $wgEmailPageToolboxLink ) $wgHooks['MonoBookTemplateToolboxEnd'][] = 'wfEmailPageToolboxLink';
 52+if ( $wgEmailPageToolboxLink ) $wgHooks['SkinTemplateToolboxEnd'][] = 'wfEmailPageToolboxLink';
5353 if ( $wgEmailPageActionLink ) $wgHooks['SkinTemplateTabs'][] = 'wfEmailPageActionLink';
5454
5555 function wfEmailPageToolboxLink() {
Index: branches/REL1_16/extensions/Contributors/Contributors.php
@@ -49,7 +49,7 @@
5050 $wgHooks['ArticleSaveComplete'][] = 'efContributorsInvalidateCache';
5151 # Good god, this is ludicrous!
5252 $wgHooks['SkinTemplateBuildNavUrlsNav_urlsAfterPermalink'][] = 'efContributorsNavigation';
53 - $wgHooks['MonoBookTemplateToolboxEnd'][] = 'efContributorsToolbox';
 53+ $wgHooks['SkinTemplateToolboxEnd'][] = 'efContributorsToolbox';
5454 }
5555
5656 /**
Index: branches/REL1_16/extensions/MetavidWiki/includes/MV_GlobalFunctions.php
@@ -202,7 +202,7 @@
203203 }
204204 }
205205
206 - if (version_compare($wgVersion,'1.13','>')) {
 206+ if (version_compare($wgVersion,'1.13','>=')) {
207207 $wgHooks['SkinTemplateToolboxEnd'][] = 'mvAddToolBoxLinks'; // introduced only in 1.13
208208 } else {
209209 $wgHooks['MonoBookTemplateToolboxEnd'][] = 'mvAddToolBoxLinks';
Index: branches/REL1_16/extensions/Wikidata/misc/FundButton.php
@@ -3,7 +3,7 @@
44
55 global $wgHooks;
66
7 -$wgHooks['MonoBookTemplateToolboxEnd'][] = 'wfFundHook';
 7+$wgHooks['SkinTemplateToolboxEnd'][] = 'wfFundHook';
88
99 function wfFundHook() {
1010 $msg = <<<ENDHTML
@@ -32,4 +32,4 @@
3333 echo( $msg );
3434 return true;
3535 }
36 -?>
\ No newline at end of file
 36+?>
Index: branches/REL1_16/phase3/docs/hooks.txt
@@ -1087,9 +1087,10 @@
10881088
10891089 'MonoBookTemplateToolboxEnd': Called by Monobook skin after toolbox links have
10901090 been rendered (useful for adding more)
1091 -Note: this is only run for the Monobook skin. To add items to the toolbox
1092 -for all 'SkinTemplate'-type skins, use the SkinTemplateToolboxEnd hook
1093 -instead.
 1091+Note: this is only run for the Monobook skin. This hook is deprecated and
 1092+may be removed in the future. To add items to the toolbox you should use
 1093+the SkinTemplateToolboxEnd hook instead, which works for all
 1094+'SkinTemplate'-type skins.
10941095 $tools: array of tools
10951096
10961097 'NewRevisionFromEditComplete': called when a revision was inserted
Index: branches/REL1_16/phase3/RELEASE-NOTES
@@ -49,6 +49,8 @@
5050 * (bug 23175) Re-added window.ta variable for backwards compatibility.
5151 * (bug 23264) Fixed breakage of various command line scripts due to extra line
5252 endings being inserted by Maintenance::output().
 53+* MonobookTemplateToolboxEnd has been deprecated. Use SkinTemplateToolboxEnd
 54+ instead.
5355
5456 == Changes since 1.16 beta 2 ==
5557

Follow-up revisions

RevisionCommit summaryAuthorDate
r67682* Removed release notes for doc-only change r67626...tstarling03:49, 9 June 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r63861Make ModernTemplate extend MonoBookTemplate so we can cut down at least /some...demon12:51, 17 March 2010
r67623Deprecate MonoBookTemplateToolboxEnd hook....platonides14:52, 8 June 2010

Status & tagging log