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
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
Status::getWikiText is used for internal logging, api error messages and
maintenance scripts. All this places are usually in english, so pass an
english language to getWikiText.
Change-Id: I3010fca8eb5740a3a851c55a8b12e171714c78f7
Using either action=upload API or Special:Upload. (No user interface
is provided for the latter, this is meant to be used by on-wiki
scripts/gadgets enhancing the upload process.)
Modelled after how ae3ab9eef0
implemented tagging of regular edits.
Bug: T121876
Change-Id: Ia3e0dbd895b2f8bc66985b24db35f112b6f9a22d
* Use getMessage() on the Exception objects
* Use a dummy WebRequestUpload to pass to continueChunks()
instead of an object of a completely wrong type
Change-Id: I01ec5c141a6f37ee425af3236d728b9128b98522
* This causes problems with some session handlers and it is
also trickier to deal with in non CLI script without leaking
cookie headers.
Change-Id: Iaf2a57f9299e42a5f68bf85115e62e88fa0f8ed6
If an exception occurs when creating the new image page during
PublishStashedFile (for example, if ExternalStorage servers
become overloaded), the job is aborted, but the current
transaction is not aborted. Then the next job comes along, does
$dbw->begin(), which implicitly commits the current open
transactions, causing database corruption (entries in page table
with page_latest = 0).
This patch ensures that if some unknown exception occurs during
the job, that the database gets rolled back to a known good state.
I also plan to make a separate patch to make the recordUpload
code handle exceptions properly. Nonetheless, I think its
important that the general job code be as robust as possible.
Bug: 32551
Change-Id: Icb5e06e81700e5dcf0d4e739c7b2bb3221e718b8