From 6d73b42d59a7a9ee352be24e9724c2bdf8a22cd4 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Wed, 16 Jul 2014 18:46:56 -0700 Subject: [PATCH] Remove AjaxAddScript hook Has been obsolete since the introduction of ResourceLoader and is unused by any extension in Git. Change-Id: Ia8ce6a0f1c5d46811897bd75670a3d5ea76caf7d --- RELEASE-NOTES-1.24 | 2 ++ docs/hooks.txt | 5 ----- includes/OutputPage.php | 6 +----- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/RELEASE-NOTES-1.24 b/RELEASE-NOTES-1.24 index f9280fce9f..9abbb778a7 100644 --- a/RELEASE-NOTES-1.24 +++ b/RELEASE-NOTES-1.24 @@ -246,6 +246,8 @@ changes to languages because of Bugzilla reports. * Removed getFormFields(), onSubmit() and onSuccess() from FormlessAction, as these were meant specifically for FormAction instead. * Removed Action::execute(). +* Removed AjaxAddScript which has been obsolete since ResourceLoader and + is unused by any modern extension. ==== Renamed classes ==== * CLDRPluralRuleConverter_Expression to CLDRPluralRuleConverterExpression diff --git a/docs/hooks.txt b/docs/hooks.txt index 0bbcd0ea99..065c7d303a 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -333,11 +333,6 @@ $ig: Gallery, an object of one of the gallery classes (inheriting from ImageGalleryBase) $html: HTML generated by the gallery -'AjaxAddScript': Called in output page just before the initialisation -of the javascript ajax engine. The hook is only called when ajax -is enabled ( $wgUseAjax = true; ). -&$output: OutputPage object - 'AlternateEdit': Before checking if a user can edit a page and before showing the edit form ( EditPage::edit() ). This is triggered on &action=edit. $editPage: the EditPage object diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 89679382cf..6163a8def5 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -2060,7 +2060,7 @@ class OutputPage extends ContextSource { */ public function output() { global $wgLanguageCode, $wgDebugRedirects, $wgMimeType, $wgVaryOnXFP, - $wgUseAjax, $wgResponsiveImages; + $wgResponsiveImages; if ( $this->mDoNothing ) { return; @@ -2151,10 +2151,6 @@ class OutputPage extends ContextSource { $this->addModules( $group ); } MWDebug::addModules( $this ); - if ( $wgUseAjax ) { - // FIXME: deprecate? - not clear why this is useful - wfRunHooks( 'AjaxAddScript', array( &$this ) ); - } // Hook that allows last minute changes to the output page, e.g. // adding of CSS or Javascript by extensions. -- 2.20.1