Last modified: 2009-06-07 01:05:12 UTC
On Special:Specialpages there are several items that if a user clicks on, e.g., Special:Upload, he will be in for a big disappointment: only to learn that that functionality has been turned off for the website in question. Well, as these items are controlled by global variables set in LocalSettings.php, they should be detected upon producing the links for Special:Specialpages, so links that will merely lead to certain disappointment should not be offered in the first place! Tell the customer at the door that there is no more food. Don't wait until he sits down and starts reading the menu.
The specific case of Special:Upload is dealt with in r25047, although I should point out that being notified that uploads are disabled is *useful* for new wiki owners who don't realise that uploads aren't enabled per default, so this might be reverted. Most other cases seem to be handled; Special:Popularpages is disabled if page counters are disabled, Special:Search is disabled when internal search is, and Special:Confirmemail is disabled if email authentication is not required.
Reverted in r25058 -- harms usability for no reason.
Today I even had a telephone call from a user who clicked Special:upload only to be told that sorry, uploads are disabled. Why not use <del> or <strike> on Special:Specialpages, instead of having the user click to find out something you already know? Indeed you could remove the <a href> and still show the linkname also. Don't many menu software show disabled items in grey? That way one knows in advance to not bother to click on them.
Patch to add a clean way to do exclusions. Also checking $wgUseDatabaseMessages before giving 'Allmessages'. Feel free to comment out, like #$wgEnableUploads => 'Upload', // r25058
Created attachment 5942 [details] cleaner array method
Comment on attachment 5942 [details] cleaner array method OOPS BLEW IT. New patch in a moment.
Backing out. Each item needs to be changed in three places. Too hard to maintain as you see from me forgetting to change the Uploads one. Feel free to check $wgUseDatabaseMessages before giving 'Allmessages' one day...
To anyone reading this bug, here's how I finally got "rid" of those Special Pages that bother me. In LocalSetting.php I used: function JidanniLessSpecialPages(&$list){foreach(array('Uncategorizedimages','Unusedimages','Withoutinterwiki','Upload', 'Newimages','Listfiles','MIMEsearch','FileDuplicateSearch','Filepath','Booksources','Mostimages','Tags','Disambiguations', 'Ipblocklist')as $i){unset($list[$i]);}return true;} $wgHooks['SpecialPage_initList'][]='JidanniLessSpecialPages';