Last modified: 2013-03-13 11:23:04 UTC
2 options that come to mind: How the API does it - We have a "Special:DisabledPage" or similar, and to disable an extension, in LocalSettings.php you can do $wgSpecialPages['ContributionHistory'] = 'DisabledSpecialPage'; Else, a global array variable, key is the special page name, value is the message to display to users
I had both in mind actually: the array specifies the mssage text (and there is some reasonable default); that's checked by DisabledSpecialPage if/when it runs, assuming it can figure out who it is impersonating.
What's the primary use case for disabling special pages? Temporarily turning off poorly-cached query pages that load up the site? Or permanently disabling features that people don't want to expose in their user interface (eg the frequent support requests like "how can I turn off RecentChanges?")
(In reply to comment #2) > What's the primary use case for disabling special pages? Temporarily turning > off poorly-cached query pages that load up the site? Or permanently disabling > features that people don't want to expose in their user interface (eg the > frequent support requests like "how can I turn off RecentChanges?") It was more in the case of the site issues this weekend. So we can disable 1 bad special page, rather than having to turn off all of the extension (or live hacking it out in the extensions loader code)
Add the following at the bottom of your LocalSettings.php : $wgSpecialPages['RecentChanges'] = null;
What error message does this give? Is it documented?
Kaldari implemented this for the ContributionReporting extension in r104478 to temporarily disable it on the cluster with a friendly message. Perhaps this could be replicated elsewhere/moved into its own extension/etc.
(In reply to comment #6) > Kaldari implemented this for the ContributionReporting extension in r104478 to > temporarily disable it on the cluster with a friendly message. Perhaps this > could be replicated elsewhere/moved into its own extension/etc. Pushing it into core should be fine
The result of setting it to null is: No such special page You have requested an invalid special page. A list of valid special pages can be found at Special pages. Return to Main Page. It doesn't give any more information. Kaldaris work which Arthur linked to is definately a step in the right direction, even if it doesn't take care of the problem 100% - Per Ariel, it might be nicer to be able to give a reason per page to keep it easily customisable
Sorry Sam, I have misread that bug. I thought it was someone asking how to disable RecentChanges entirely :-)