Otherwise MW will throw an exception with the message "LinkCache doesn't currently know about this title"
when accessing redirect or len items of these Title objects, e.g. in Special:RevisionDelete.
Change-Id: I07978145df78bddac894bdac087c5d62b03759b3
Fix for I1d391e72 (3695486) and Idb00a337 (8a73db8) plus two changes of wfMsgHtml('diff') that were already there.
Change-Id: Ie52e1060058f4d1935c991a7d0e1f651069d4ed5
action=purge with forcelinkupdate crashes when the rate limit is
reached, because the module passes an array rather than a string to
setWarning. The appropriate string is in the 'info' key of the array, so
just use that.
Change-Id: Ia0215290197e115e7272f945ab1bc5b81aeec80a
addVaryHeader() converts $options to an array, so null values (no XVO
options) are converted to empty arrays. This led to headers like:
X-Vary-Options: Foo;string-contains=bar,Baz;,Quux;string-contains=xyz
This fix changes the "Baz;," part to "Baz,"
Change-Id: I2fa0b374f5d4cfa6b894cbd9de8c14354f04ad86
Please group related methods instead of adding new at the bottom along with deprecated ones. Thanks.
Change-Id: Ie08500de8226e33d5fe4c8a2a95c6a23a550e6d1
Should fix bug 37140, scripts served through
action=raw failing due to being served a html
error page.
As well as such as giving a better behavior
such as for search engines.
This could affect IE users by showing them
smart errors instead of the content, though.
Change-Id: I5d680fe10db6d61d91e898323bd5fb755a07135d
which we weren't treating right.
* $limit in wfDebugBacktrace() is the number of returned frames,
we thus need to take into account the wfDebugBacktrace() frame, which
is sliced from debug_backtrace().
* wfGetCaller() needs to add a level for itself.
* MWDebug::warning() was logging itself as the warning issuer,
which is useless (the call a few lines before was right, though)
MWDebugTest.php changed accordingly.
* Removed double call to wfGetCaller( $callerOffset + 1 )
* Documented the meaning of wfGetCaller() parameter
* Added unit test
Change-Id: Ief50f4c810bad8b03bb2bf9dc6d945d9acb29851
* set fields explict in select statement
* get database connection only, if there is anything to do
* store often used object in local var
Change-Id: I41325ee0fdd935e48e2539668dfa0a46ff04af51
isKnown() calls both exists() and isAlwaysKnown(), so subpage links below the page title are also added for pages that "always exist", as can be changed through a hook
Change-Id: I345bb8e6e611afd53afbc7b2d92910e360f598ee
This comes from factoring done with commit fb69ee4. To add quotes based
on the database type, we actually need a Database instance!
Fault introduced by https://gerrit.wikimedia.org/r/9116
Change-Id: I7a4f7fb1a744cd7adb5166e66424b664edb3d9e8
* Don't do expensive checks for display (for the consistency of the interface)
* Removed the logged-in check and changed it for 'upload' right (as the user need this right to execute the action)
Change-Id: Ie5752e5292a953cbcf81ab665365c3efbd4eba6a
The check makes sure that the page id is known for the title
passed to the constructor. LinksUpdate needs to know this id in
order to update the various links tables. If the page id is not
known to the title (e.g. because the page doesn't actually exist)
something is wrong, and LinksUpdate can't operate.
Amend: use MWException instead of assert()
Change-Id: I4873211a71099fe3563b52a53532c95b6a2ff30f
isRedirect() assumes that the LinkCache already contains
information about this title. If that is not the case, it
currently returns false, even though it just doesn't know
whether this link is a redirect.
The new check asserts the assumption that this title
is already known to the link cache.
Amend: use Exception instead of assert()
Change-Id: Id3ad2d4e140b270b1f5ca1f7af9b3320cffff5a2
Listings with aurights can't show users with rights which are
granted by implicit or auto-promoted groups like *, user, or autoconfirmed.
This is my first commit, btw.
Change-Id: I083eb977393729961317d0f3cf9f7cfaa50fde51
nextJob.php does not honor jobs types being excluded from the default
job queue by using $wgJobTypesExcludedFromDefaultQueue. Since those jobs
can never get processed, nextJob.php will always return a database which
might produce a nasty infinite loop while trying to process the whole
queue.
Job::pop did take in account wgJobTypesExcludedFromDefaultQueue to
filter the jobs out. So this patch factor out the code in a new method
and uses it for nextJob.php.
Change-Id: I15197ffcca00f229c9004e2abd87e009bc40f384
Patchset 2: attempt to fix sql error when using sqlite
Patchset 3: for great justice
Patchset 4: sqlite, not postgres... /facepalm
Patchset 5: joy, more sql divergence...
Patchset 7: handle inconsistencies in MWs database abstraction layer
Change-Id: I1948c4ad815008321801c93584eb249c1f597560
"Temporary workaround for bug 31576. The logs show that once every hour or so, a job runner somewhere in the cluster somehow loses all its magic words and starts hitting this case. Throwing an exception should kill the job runner before it does too much damage."
Currently keeps being re-imported into deployment branches...
Change-Id: I9d6ef2f4e0755a86476388508a8c08266fc94a9f
Now in Accept-Language handling (in the language converter),
languages appearing earlier in the list are treated as more
preferred languages (variants).
Change-Id: Ic50d01f52dce1ae1f4f4e747d5f8b8399ca03b0b
Revision::getTitle will make a query against slave to load the title on
demand. But when there is a slave lag, the slave does not know the new
revision id and the caller gets null back
Change-Id: Ia85866362715ba666d51106037e7771d6bf4a237
Seen on Special:NewPages: Linker::revComment is calling
Revision::getTitle, but the revision object has no id set.
This is another way to avoid a query per non-empty comment on
Special:NewPages, see gerrit 9003
Change-Id: I1786a4c13000f574c0f34fb59759bb2fc4117bcd
header_remove() was added in PHP 5.3.0 which is below that our minimum requirement; also fixed a comment for the minimum required PHP version.
Change-Id: Ib6992ed772f1a707f96020fdfe6eb6152102402a
When Linker::revComment gets the title from the revision object, he can
produce section links for autocomments
This will also avoid a query per non-empty comment, because the revision
object loads the title on demand, if not set
Change-Id: I891afe9aaa6eeeb8382a6131376c26690082a8c7