Remove AjaxAddScript hook
authorChad Horohoe <chadh@wikimedia.org>
Thu, 17 Jul 2014 01:46:56 +0000 (18:46 -0700)
committerChad Horohoe <chadh@wikimedia.org>
Thu, 17 Jul 2014 01:49:36 +0000 (18:49 -0700)
Has been obsolete since the introduction of ResourceLoader and
is unused by any extension in Git.

Change-Id: Ia8ce6a0f1c5d46811897bd75670a3d5ea76caf7d

RELEASE-NOTES-1.24
docs/hooks.txt
includes/OutputPage.php

index f9280fc..9abbb77 100644 (file)
@@ -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
index 0bbcd0e..065c7d3 100644 (file)
@@ -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
index 8967938..6163a8d 100644 (file)
@@ -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.