Last modified: 2013-06-18 15:08:52 UTC
Created attachment 7812 [details] Normalize input in exists The input of SpecialPage::exists is not normalized, so special pages with spaces are not marked as exists. This affected (at least) the special page normalizing of the api (bug 24185) Thanks. See also bug 25713
Maybe resolveAliasWithSubpage is better as resolveAlias in this case ...
The patch doesn't strip Special page name parameters, and resolveAlias only officially deals with aliases, it does not guarantee that the "plain" form is tested. I'll just add space normalization to exists instead.
hmm, this problem is wider however. The name of Special pages is nowhere enforced to use the dbkey form. Perhaps we should fix uses of SpecialPage:exists instead ?
(In reply to comment #2) > The patch doesn't strip Special page name parameters, and resolveAlias only > officially deals with aliases, it does not guarantee that the "plain" form is > tested. I'll just add space normalization to exists instead. Should work to run the string through self::resolveAliasWithSubpage(), then check the first element of the returned array.
Umherirrender, thanks for the patch. You've received code review in the last few comments; are you interested in updating your patch to deal with those issues? Thanks again.
Looks fixed after r86255, because that rev adds the call to resolveAlias. resolveAlias handles the space problem correct. Marking as FIXED.