Last modified: 2009-06-07 01:05:12 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T13023, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 11023 - cleaner array for avoiding Special:Specialpages' disabled links
cleaner array for avoiding Special:Specialpages' disabled links
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
1.15.x
All All
: Lowest trivial with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on: 18407 18408 18409
Blocks:
  Show dependency treegraph
 
Reported: 2007-08-22 13:11 UTC by Dan Jacobson
Modified: 2009-06-07 01:05 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
cleaner array method (2.08 KB, text/plain)
2009-03-20 03:07 UTC, Dan Jacobson
Details

Description Dan Jacobson 2007-08-22 13:11:33 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.
Comment 1 Rob Church 2007-08-22 13:24:41 UTC
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.
Comment 2 Brion Vibber 2007-08-22 16:25:46 UTC
Reverted in r25058 -- harms usability for no reason.
Comment 3 Dan Jacobson 2007-11-28 04:15:22 UTC
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.

Comment 4 Dan Jacobson 2009-03-20 03:06:10 UTC
Patch to add a clean way to do exclusions.

Also checking $wgUseDatabaseMessages before giving 'Allmessages'. Feel free to comment out, like
#$wgEnableUploads => 'Upload', // r25058
Comment 5 Dan Jacobson 2009-03-20 03:07:13 UTC
Created attachment 5942 [details]
cleaner array method
Comment 6 Dan Jacobson 2009-03-20 03:09:33 UTC
Comment on attachment 5942 [details]
cleaner array method

OOPS BLEW IT. New patch in a moment.
Comment 7 Dan Jacobson 2009-03-20 03:21:52 UTC
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...
Comment 8 Dan Jacobson 2009-06-07 00:39:26 UTC
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';

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links