jenkins-bot has submitted this change and it was merged.

Change subject: Update documentation for SpecialPage_initList
......................................................................


Update documentation for SpecialPage_initList

State that it can be used to conditionally register special pages

Change-Id: I83fd793c9cbb7a70fe97186f72078ee021a79475
---
M docs/hooks.txt
M includes/specialpage/SpecialPageFactory.php
2 files changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Hoo man: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/docs/hooks.txt b/docs/hooks.txt
index 62285df..05a3ae1 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -2639,7 +2639,7 @@
   (message key) and a 'default' value.
 
 'SpecialPage_initList': Called when setting up SpecialPageFactory::$list, use 
this
-hook to remove a core special page.
+hook to remove a core special page or conditionally register special pages.
 $list: list (array) of core special pages
 
 'SpecialPageAfterExecute': Called after SpecialPage::execute.
diff --git a/includes/specialpage/SpecialPageFactory.php 
b/includes/specialpage/SpecialPageFactory.php
index 175b0cb..c262519 100644
--- a/includes/specialpage/SpecialPageFactory.php
+++ b/includes/specialpage/SpecialPageFactory.php
@@ -249,8 +249,8 @@
                        // Add extension special pages
                        self::$list = array_merge( self::$list, $wgSpecialPages 
);
 
-                       // Run hooks
-                       // This hook can be used to remove undesired built-in 
special pages
+                       // This hook can be used to disable unwanted core 
special pages
+                       // or conditionally register special pages.
                        Hooks::run( 'SpecialPage_initList', array( &self::$list 
) );
 
                }

-- 
To view, visit https://gerrit.wikimedia.org/r/196711
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I83fd793c9cbb7a70fe97186f72078ee021a79475
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to