Code was largely copied from Tim's CR comment on r83812 but adapted to deal with the fact that we have to apply the cmcontinue-induced WHERE on cl_sortkey and cl_from only for the first query. Because ApiQueryBase doesn't let us unset or overwrite conditions like these in a nice way, I added an $extraQuery parameter to ApiQueryBase::select() that excepts additional query parameters that are only applied to that query but not stored in the object.
This patch mostly impact Title:getLocalUrl() with two changes:
1) Abstraction:
$wgActionPath related code is now in Title::resolveActionPath(). It now
interprets query parameters using an array which is easier to read than
playing with a regexp and the evil $matches[].
2) Tweaking:
Change the 7 years old (r2621) URL forge:
"{$wgScript}?title={$dbkey}&{$query}"
=> /w/index.php?title=FOO&q=2
To a nicer
"str_replace( '$1', $dbkey, $wgArticlePath )"
=> /wiki/FOO?q=2
Additional changes:
* Parser tests were modified to reflect the changes.
* PHPUnit TitleTest amended to test getLocalUrl() (add more!!)
* When using wgActionPaths, makes sure the 'view' action is a sane default
* Implement accessors for isHardblock() and getRangeStart()/getRangeEnd() in the same fashion.
* Make the corresponding variables private, removing external accessors. This required updating AbuseFilter with non-B/C code, so I also implemented the rest of the changes I've made to the blocking backend in that extension.
* Move the "get an IP range which encompasses the given IP/range" logic to Block.php; will be needed later... :D
Except for some whitespace changes, this is Baowolff's patch from http://bug-attachment.wikimedia.org/attachment.cgi?id=8312 which I am applying in the spirit of “apologize later”.
Baowolff writes:
Don't show new page entries in Special:newpage for supressed redirects.
Patch to remove the new page entry from Special:RecentChange and
special:newpages, if the new page gets moved with redirect supressed.
I'm not a 100% sure this is a good idea. This will only suppress the initial
new page line in the RC (And newpages), and won't supress any other edits to
the page. Does this behaviour really make sense? (Thats not rhetorical). It
seems somewhat different from deleting a page, where none of the content is
relevent, but when you move a page, the edits don't go away, they're just in a
new title.
I suppose we could just change the new page entry in the RC to point to the
other page, but that seems rather wrong too.
So anyhow, not sure what the right approach is.