Fix some rather embarrassing mistakes. See comments on e33d6f45a.
Also change the behaviour when someone sets an offset higher than
max allowed. Returning a page with 0 results and broken prev/next
links is poor UI imo.
Change-Id: Ibfc983675ae0c600eeccd5e361550e9b5f96f5fd
Most query pages use LIMIT/OFFSET paging, which is inefficient
if someone puts an offset of a billion. Add a limit for the
max offset size that will be respected.
Bug: T107265
Change-Id: I422f9e446d1ee1aebb4057234c829192cf44b953
A lot more methods do not have visibility keywords. Some probably
should be private, a lot need to be protected, but all this will be
a breaking change. In this patch I'm focusing on methods that are
already used as public methods. The added public keyword is not a
breaking change because it's the default anyway.
Change-Id: I52e34209557b00f97a4e68250afbeb7647b64146
Child classes wishing to show a different message, such as wikiHow's
NewArticleBoost extension, need to override showEmptyText() to display
their custom message via the appropriate OutputPage method(s).
Change-Id: If488e2c81b225eb651e52bcca0fea08b8e685286
Found by running tests under a version of PHP patched to report
case mismatches as E_STRICT errors.
User classes:
* MIMEsearchPage
* MostlinkedTemplatesPage
* SpecialBookSources
* UnwatchedpagesPage
Internal classes:
* DOMXPath
* stdClass
* XMLReader
Did not change:
* testautoLoadedcamlCLASS
* testautoloadedserializedclass
Change-Id: Idc8caa82cd6adb7bab44b142af2b02e15f0a89ee
DatabaseBase::query() already passes the value returned by the
database driver (usually an object or resource for SELECT queries)
through $db->resultObject(). There is no need to pass it through
the method a second time to get a ResultWrapper.
Change-Id: I5d34ab2bffb7f236d2f824b4ef0e8670f89d4599
There used to be a bot on commons that did this, but it broke, and
this seems like the sort of thing that should be built in to
MediaWiki anyhow.
In order to do this, it abuses the querycache table somewhat
(Storing non-titles things in the title column).
Also changes the link on Special:Statistics for number of
uploads to link to new page. It seemed appropriate to link
to more detailed statistics instead of to Special:ListFiles.
Change-Id: I9ab768584b02a32b450d5f3981ff775ee07fecfa
The parent SpecialPage::execute also has no return and not all return
statements in QueryPage::execute actual return a value
Change-Id: If7a38ca5ed1107b6a5a740acae54295534950696
... now that f508561f7b ("Moved $wgQueryPages stuff out of the global
scope and into a function") has been merged, which eliminated hardcoding
of the pathname except in the AutoLoader.
WantedQueryPage is moved to a separate file.
Bug: 60445
Change-Id: If2019492722083819b82afa6302670b94b181098