Find: /isset\(\s*([^()]+?)\s*\)\s*\?\s*\1\s*:\s*/
Replace with: '\1 ?? '
(Everywhere except includes/PHPVersionCheck.php)
(Then, manually fix some line length and indentation issues)
Then manually reviewed the replacements for cases where confusing
operator precedence would result in incorrect results
(fixing those in I478db046a1cc162c6767003ce45c9b56270f3372).
Change-Id: I33b421c8cb11cdd4ce896488c9ff5313f03a38cf
Clean up use of @codingStandardsIgnore
- @codingStandardsIgnoreFile -> phpcs:ignoreFile
- @codingStandardsIgnoreLine -> phpcs:ignore
- @codingStandardsIgnoreStart -> phpcs:disable
- @codingStandardsIgnoreEnd -> phpcs:enable
For phpcs:disable always the necessary sniffs are provided.
Some start/end pairs are changed to line ignore
Change-Id: I92ef235849bcc349c69e53504e664a155dd162c8
Change the SpecialWanted*-Pages so that they do sort
1. by the number of links to a site (as is now) and
2. alphabetically for entries which have the same number of links (new)
This is a follow-up for commit 5b15728.
The previous patch was reverted because using getOrderFields and
prefixing each order field with qc_ in fetchFromCache threw DB errors in
production. This follow-up differs in introducing a new function
getCacheOrderFields that defines order fields only for fetching from the
cache and doesn't reuse getOrderFields which is for the raw query
(without cache). It returns ['value'] by default and thus keeps the
known behaviour.
Bug: T4335
Change-Id: Ic01a3c28892c78ba9a9f0a7d665937efe87b44bd
This reverts commit 5b15728478. The change causes db query errors:
DBQueryError: 1054 Unknown column qc_ra.rd_namespace in order clause
Change-Id: I068beeae70037c959d42419791911c54ca9908a1
Change the SpecialWanted*-Pages so that they do sort
1. by the number of links to a site (as is now) and
2. alphabetically for entries which have the same number of links (new)
Bug: T4335
Change-Id: If54cd52b69007ee81af4733a14be3fd893c4abfe
It's unreasonable to expect newbies to know that "bug 12345" means "Task T14345"
except where it doesn't, so let's just standardise on the real numbers.
Change-Id: I6f59febaf8fc96e80f8cfc11f4356283f461142a
This is easier to maintain as duplicated code everywhere.
This change also adds LinkBatch operations to specialpages, that does
not had it so far, but where it's useful.
Change-Id: I4936ecfb2be3a7709d99570c0561ab0cc9cd754f
This is more consistent with LoadBalancer, modern, and inclusive
of master/master mysql, NDB cluster, and MariaDB galera cluster.
The old constant is an alias now.
Change-Id: I0b37299ecb439cc446ffbe8c341365d1eef45849
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