Page MenuHomePhabricator

Special:SpecialPages should indicate cached and disabled query pages
Closed, ResolvedPublic

Description

Special:SpecialPages should show if such special page is out of use.

Typically Special:WantedPages is off, thus there should be some notice about that on Special:SpecialPages, say:

  • Wanted pages (off)

Version: unspecified
Severity: enhancement

Details

Reference
bz14645

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:10 PM
bzimport set Reference to bz14645.
bzimport added a subscriber: Unknown Object (MLST).

Functional patch v1

My first attempt to hack MW, feel free to adjust / reject / laugh at it at will.

In short, it moves over to a semantically valid CSS-only markup, then readds the bolding for restricted pages and adds a new class for cache-only pages. Then it adds italics as the default styling for these.

It could just as easily leave them un-styled by default, but I suppose then the new default notes message might look a little odd.

attachment 14645.patch ignored as obsolete

Patch looks good to me. Have not tested yet.

OK, tested the patch. Found a few small issues:

  • If a special page is both expensive and restricted, the classes get concatenated with no space in between. I'd suggest using an array instead and imploding it.
  • The specialpages-note message is only shown if the list includes restricted pages. The condition should be changed to also show it if there are cached pages.

(Also, ideally the message would be split so that we could only show the parts matching pages actually present in the list, but I think it's good enough as it is.)

-need-review +reviewed per Iimari

Patch v2

Thanks for the review. Yes, I was going to implement an OR feature for showing the notes, seems reasonable (obviously forgot).

attachment 14645.patch ignored as obsolete

Patch v3

Oops. Meant to attach this one instead. Sorry all.

attachment 14645.patch ignored as obsolete

Patch v4

Okay, this is definitely the patch I meant to attach this time. I think. :)

Attached:

Applied with a few tweaks in r83554. I decided to move the isExpensive() method up to the SpecialPage class and get rid of the method_exists() kluge -- it's IMO more elegant this way.

Oh, and thanks!