Commit graph

25983 commits

Author SHA1 Message Date
Liangent
0f9b9d5144 Purge Squid variant pages based on page language (not $wgContLang)
Change-Id: I36a55d0de33dd199513b94741b1833e8e0543b95
2012-06-04 01:39:55 +08:00
Translation updater bot
4fbe50631e Localisation updates from http://translatewiki.net.
Change-Id: I023836a005656b5232661e21e2849f4de5f154f9
2012-06-03 14:43:26 +00:00
Platonides
abce6ed742 Replace calls to deprecated Article::doWatch and Article::doUnwatch
Change-Id: I7e87b24144cbff01fdf8b40c5e7da783c0c57f24
2012-06-03 15:41:57 +02:00
pmolina
7218b00583 (bug 37181) Removed hard coded parentheses in SpecialMIMEsearch.php
Change-Id: I32d351dc24e4029bfea68b36904b44022375f4b3
2012-06-03 09:59:54 -03:00
Siebrand
ec8ad1ae75 Merge "(bug 37182) Removed hard coded parentheses in SpecialStatistics.php" 2012-06-03 12:04:38 +00:00
Siebrand
016af5e13e Merge "(bug 37183) Removed hard coded parentheses in SpecialListfiles.php" 2012-06-03 12:02:39 +00:00
pmolina
86d740f81c (bug 37182) Removed hard coded parentheses in SpecialStatistics.php
Change-Id: Ie412b21a0426e5aaf9c1cf55aa91ab16fd1c0662
2012-06-03 08:31:24 -03:00
pmolina
e3e46ba763 (bug 37183) Removed hard coded parentheses in SpecialListfiles.php
Change-Id: Id8fceb6075579bd30b701c2531f0d24723fe54f1
2012-06-03 08:26:11 -03:00
Brion VIBBER
0d22edd27b Merge "Revert "Adding sanity check to Title::isRedirect()."" 2012-06-03 11:03:20 +00:00
Brion VIBBER
d7f7a6234b Revert "Adding sanity check to Title::isRedirect()."
This reverts commit 7d12b7b72c
2012-06-03 11:00:54 +00:00
Siebrand
8f7e04dddf Merge "(bug 37178) Allow pagination link l10n" 2012-06-03 10:35:37 +00:00
Dereckson
11d1680274 (bug 37178) Allow pagination link l10n
Change-Id: I1035c1e85246c8f9ce09f35405dfa3a5b6d4ba1c
2012-06-03 10:16:11 +00:00
Aaron Schulz
41fd47ed1e Merge "clean up User::getOptions a bit" 2012-06-03 10:14:09 +00:00
Aaron Schulz
bc789ee4e6 Merge "reverse text/sha1 output in export to match xsd" 2012-06-03 10:09:08 +00:00
Aaron Schulz
98aaf7b52b Merge "(bug 22750) <logitem> is at wrong location in export.xsd" 2012-06-03 10:06:18 +00:00
Aaron Schulz
0bb1856aad Merge "Fix for Ibe3e88fa (a12ce17c): Moved WikiPage::getDeletionUpdates() near WikiPage::doDeleteUpdates()." 2012-06-03 09:57:53 +00:00
Aaron Schulz
af4d37c48d Merge "Set the status code to 500 on exceptions." 2012-06-03 09:56:17 +00:00
Aaron Schulz
873fab65d2 Merge "Fix bug in getXVO() that produced XVO headers with stray semicolons" 2012-06-02 23:29:48 +00:00
Aaron Schulz
2f06a9931a Fixed destructor in FSLockManager to clear all the locks.
Change-Id: I019d24c19f317eb649b5a0415618b453e1ea171b
2012-06-02 15:13:31 -07:00
Aaron Schulz
7358c7340d Merge "Adding sanity check to the LinksUpdate() constructor." 2012-06-02 17:10:19 +00:00
Aaron Schulz
c20f708ffd Merge "PHP >= 5.4.0 started taking advantage of $limit optimization of wfDebugBacktrace(), which we weren't treating right." 2012-06-02 16:58:41 +00:00
Alexandre Emsenhuber
799a291c70 Select all nedded fields for Title::newFromRow() when fetch a revision from the database.
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
2012-06-02 18:39:20 +02:00
Alexandre Emsenhuber
d55ccfd4d2 Use local context to get messages and don't use implicit Message object to string conversion.
Fix for I1d391e72 (3695486) and Idb00a337 (8a73db8) plus two changes of wfMsgHtml('diff') that were already there.

Change-Id: Ie52e1060058f4d1935c991a7d0e1f651069d4ed5
2012-06-02 18:32:17 +02:00
Aaron Schulz
07a7479195 Merge "(bug 37185) Removed hard coded parentheses in RevisionDelete.php" 2012-06-02 16:17:49 +00:00
pmolina
411b2b1c6d (bug 37185) Removed hard coded parentheses in RevisionDelete.php
Change-Id: Idb00a337fa202d653b61ddd28c32aecef3e66419
2012-06-02 13:12:36 -03:00
awjrichards
ee0d3d330f Revert to arbitrarily old point before initial remote branch creation to help clean up
Change-Id: I41a3d1e55d3ea9dffa42451237fe065f9334361d
2012-06-02 08:43:04 -07:00
Catrope
7e6cd60977 Merge "[FileRepo] Fixed file move data-loss race condition." 2012-06-05 22:28:17 +00:00
Aaron Schulz
d96161d71a Merge "setSquidMaxage() globally if we can purge it, instead of in actions." 2012-06-05 20:51:00 +00:00
Aaron Schulz
612185643c Merge "(bug 32643) Prevent action=purge&forcelinkupdate crash" 2012-06-05 20:24:58 +00:00
Aaron
c2443ec058 Fixed bit math logic error in 0e765f8405.
Change-Id: Idfba3971f9c2d47967d1210352d8fb25583834e0
2012-06-05 10:10:11 -07:00
Liangent
6eac0a40cf setSquidMaxage() globally if we can purge it, instead of in actions.
Change-Id: I404c994616eab0902a9e3650c97028e9bcfb22db
2012-06-04 14:46:36 +08:00
Aaron Schulz
04804e67d5 [FileRepo] Fixed file move data-loss race condition.
* Update the DB before copying the files over.
  This fixes a serious regession from 395c5907ff.

Change-Id: Ibeec2cda839adecf28f4b944fa1cdb6e4eff7e3b
2012-06-03 01:49:35 -07:00
pmolina
d142444079 (bug 37184) Removed hard coded parentheses in RevisionList.php
Change-Id: I1d391e7234b48ca870fffbdb48bd2ca03285a050
2012-06-02 12:40:54 -03:00
Brad Jorsch
c42131dd8e (bug 32643) Prevent action=purge&forcelinkupdate crash
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
2012-06-02 15:41:06 +02:00
Siebrand Mazeland
3695486b46 (bug 37177) Make revision row localisable.
Change-Id: Ie35a8b918151467400683a8474775790d45a5b55
2012-06-02 12:43:43 +02:00
umherirrender
bf7a4bc7fc clean up User::getOptions a bit
* use local vars for often used objects
* move some lines near the code, which depends on it

Change-Id: I7a4d4ba1350cca69a8f1c6d355002ee8fdd8f2bc
2012-06-02 10:46:37 +02:00
umherirrender
6209ef4086 (bug 22750) <logitem> is at wrong location in export.xsd
* fix indent of logitem
* add logtitle/params tags
* change one Image: to File:

Change-Id: I02e631d8c4679c46095320901cdff724533d66f0
2012-06-01 17:57:02 +02:00
Reedy
9aa347f430 Merge "Added base class for testing ORMRow deriving classes and added a mock implementation in order to test the abstract parent class itself" 2012-06-01 14:29:07 +00:00
Reedy
500a1401d2 Merge "Adding interfaces for ORM row and table classes so these can be used for type hinting in a way that does not prevent doing stuff such as the decorator pattern. Also made some minor fixes in the docs" 2012-06-01 13:58:05 +00:00
Catrope
07c643f215 Fix bug in getXVO() that produced XVO headers with stray semicolons
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
2012-06-01 05:50:30 -07:00
Alexandre Emsenhuber
f3c8358eb8 Fix for Ibe3e88fa (a12ce17c): Moved WikiPage::getDeletionUpdates() near WikiPage::doDeleteUpdates().
Please group related methods instead of adding new at the bottom along with deprecated ones. Thanks.

Change-Id: Ie08500de8226e33d5fe4c8a2a95c6a23a550e6d1
2012-06-01 11:09:59 +02:00
umherirrender
4e20a471ad reverse text/sha1 output in export to match xsd
Change-Id: I84588e3d9692ee9eb7411b1e391abfc6c9ee89bf
2012-05-31 21:05:40 +02:00
Aaron Schulz
ffe6613ff7 Merge "Show revdel links instead of checkboxes on pages where there is no multiple log entry revdel form." 2012-05-31 18:48:03 +00:00
Platonides
3e59f15bb0 Set the status code to 500 on exceptions.
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
2012-05-31 19:15:33 +02:00
Aaron Schulz
c6f24bf856 Merge "cleanup EditWatchlist a bit" 2012-05-31 17:10:07 +00:00
Aaron Schulz
37c2fde15d Merge "Revision::getTitle produce rev_id IS NULL query" 2012-05-31 17:06:50 +00:00
Platonides
2e506c4809 PHP >= 5.4.0 started taking advantage of $limit optimization of wfDebugBacktrace(),
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
2012-05-31 17:32:33 +02:00
umherirrender
af74e25d71 cleanup EditWatchlist a bit
* 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
2012-05-31 17:23:50 +02:00
Reedy
912c309987 Merge "(bug 37194) remove obsoletes *.deps.php" 2012-05-31 13:54:00 +00:00
robin
f99f4945a5 Change of Title->exists() to Title->isKnown() for subpage links
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
2012-05-30 23:19:34 +02:00
Antoine Musso
58f390e9bf missing $dbr instance in JobQueue
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
2012-05-30 21:17:30 +02:00
Alex Monk
0e765f8405 Show revdel links instead of checkboxes on pages where there is no multiple log entry revdel form.
Change-Id: Ie061ee5b77a39c13628bfdb73f09cb3fa97dd090
2012-05-30 19:43:38 +01:00
Alexandre Emsenhuber
6908025fb9 Use local context to get messages
Change-Id: I5defc5ef6a2fefeb77856f0bebd1e5ac3a5ceea3
2012-05-30 13:26:54 +02:00
Liangent
8c65834425 Add new message 'brackets' and use it to kill some hardcoded []s.
Change-Id: Idae8d9201d1c291316ab520d204ae8c5cde2d890
2012-05-30 14:40:11 +08:00
Reedy
d943db7318 Merge "Added missing GPLv2 headers in some places." 2012-05-29 20:43:24 +00:00
Aaron Schulz
2dbea5d278 Removed dead code since PHP minimum is > 5.2.1.
Change-Id: I565ff44e5e058ce72cd2eaeaec9ea1e441d01010
2012-05-29 22:23:07 +02:00
Aaron Schulz
d9d6a7c1e9 Merge "Unused variable $wgUser" 2012-05-29 20:20:58 +00:00
Aaron Schulz
5097ada351 Merge "(bug 37072) - prevents infinite job loop" 2012-05-29 20:19:58 +00:00
Hashar
ebf821f643 Merge "Change if/else to a ternary operator" 2012-05-29 18:59:38 +00:00
Platonides
74fa4635ca Change if/else to a ternary operator
This keep the wfProfileOut() detector happy.

Change-Id: I85ecc33121d94e6a2d2e8ea3d1f5ca47f3db86bc
2012-05-29 20:58:15 +02:00
Hashar
3e71ecf9c2 Merge "Minor changes to Ic50d01f5 Accept-Language code." 2012-05-29 18:43:55 +00:00
Platonides
1ea18dfaf2 Minor changes to Ic50d01f5 Accept-Language code.
Minor improvments to commit 894c5c1

Change-Id: I8cc63cb1ba2c3aa74ca9e225022d5be75e75ad23
2012-05-29 20:38:48 +02:00
Aaron Schulz
90108d8c93 Merge "wfProfileOut() for new return added in c6396 (c4e407c)" 2012-05-29 18:08:25 +00:00
Platonides
669b1e1927 Unused variable $wgUser
Change-Id: Ib00ba04cc372788b791fec3f1358048530ecca9f
2012-05-29 19:54:48 +02:00
Platonides
2c15039e4d wfProfileOut() for new return added in c6396 (c4e407c)
Change-Id: I9fed0ba277fb32df65a772c8c4de123e2867b4c5
2012-05-29 19:34:43 +02:00
Aaron Schulz
2f3004af8e Merge "Adding sanity check to Title::isRedirect()." 2012-05-29 17:29:19 +00:00
Alexandre Emsenhuber
42fcb726e6 Fix user rights check to display the "revert" link on file histories.
* 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
2012-05-29 19:09:01 +02:00
Max Semenik
aa305c06fe mobile sub-directories for mobile-related code
Move DeviceDetection.php and DeviceDetectionTest.php

Change-Id: Ia4aaf7ad499dd2021ef9d2ebf7f6d829e8fc4656
2012-05-29 16:48:28 +02:00
daniel
a6c9dcc13e Adding sanity check to the LinksUpdate() constructor.
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
2012-05-29 15:44:58 +02:00
daniel
7d12b7b72c Adding sanity check to Title::isRedirect().
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
2012-05-29 15:39:43 +02:00
Hoo man
932774a5e2 Fixed the API doc. for aurights (list=allusers)
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
2012-05-29 14:17:19 +02:00
Antoine Musso
0ec77e2b31 (bug 37194) remove obsoletes *.deps.php
PHP had a nasty bug related to late/early binding and referenced at
https://bugs.php.net/bug.php?id=56776 . The workaround was to add some
.deps.php files to make sure code is loaded early.

Upstream PHP issue #56778 was fixed in PHP 5.1.

See also:
http://lists.wikimedia.org/pipermail/wikitech-l/2006-January/021311.html

Change-Id: I4c85f65c6b5f3df3218bb107881547d44f0cf107
2012-05-29 14:05:03 +02:00
Antoine Musso
fb69ee48d3 (bug 37072) - prevents infinite job loop
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
2012-05-29 13:50:44 +02:00
Alexandre Emsenhuber
58bb669812 Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: Ia1a7230adc92079b505362317d2e03b36130cc8b
2012-05-29 13:01:11 +02:00
Liangent
22b00ec69d (bug 37186) Remove hard coded parentheses in ImagePage.php
Change-Id: Ib516e501953f37a69707a5de3e2ed96004760caa
2012-05-29 16:10:47 +08:00
Siebrand
92ee7fe929 Merge "Use message 'parentheses' in prefs-changeemail." 2012-05-29 06:29:10 +00:00
Liangent
ce62df7bef Use message 'parentheses' in prefs-changeemail.
Change-Id: Iba4498b93e3ae45be84b6716bd6764ddfab7c113
2012-05-29 13:35:33 +08:00
Aaron Schulz
4fa67221df Merge "$wgUseSquid unused since parent commit (fa1a8d5)" 2012-05-28 22:36:38 +00:00
Christian Aistleitner
af919fe3e0 Fix error message for MySQL connection failures
Change-Id: I23cbe6a58ab5aed88c656bfa9370568b39ca4e32
2012-05-28 22:06:43 +02:00
Platonides
e73515b10c $wgUseSquid unused since parent commit (fa1a8d5)
Change-Id: I47e103e6c4bb44f74f9d940505775ac2f2e66b29
2012-05-28 19:32:18 +02:00
Platonides
b8b502ac72 Merge "Tweak Accept-Language sorting method to respect RFC 3282." 2012-05-28 16:33:07 +00:00
jeroendedauw
298c8b4786 Added base class for testing ORMRow deriving classes and added a mock implementation in order to test the abstract parent class itself
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
2012-05-28 17:35:05 +02:00
Nikerabbit
bc174c139c Merge "bug 37015: Allow disabling special page summary" 2012-05-28 15:15:33 +00:00
Reedy
73bbe9f3a2 Forward port of https://www.mediawiki.org/wiki/Special:Code/MediaWiki/105964
"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
2012-05-28 15:43:06 +01:00
Liangent
894c5c108d Tweak Accept-Language sorting method to respect RFC 3282.
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
2012-05-28 19:03:19 +08:00
Antoine Musso
281510195d remove windows lines ending
Introduced by commit 6c2cf98
https://gerrit.wikimedia.org/r/8919

Change-Id: Idfe6dd1f6d2b7fabfdbccd9acf6f0dcbbb5833be
2012-05-27 21:40:19 +02:00
Alexandre Emsenhuber
43940407d3 Check validity of fetched titles and show a descriptive messages when an invalid title is encountered.
Change-Id: I84804c9d89e778d263c781393afe9c8f70395c99
2012-05-27 19:28:22 +02:00
Aaron Schulz
38acd2bcfe Merge "Block.php: replace '*' with explicit fields in selects" 2012-05-27 16:30:05 +00:00
umherirrender
e778bf886c setTitle on a new null revision
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
2012-05-27 17:47:29 +02:00
umherirrender
4a279515f4 Revision::getTitle produce rev_id IS NULL query
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
2012-05-27 16:39:04 +02:00
Nikerabbit
7b9870d070 Merge "Set title for Linker::revComment on Special:NewPages" 2012-05-27 06:29:09 +00:00
Krinkle
d7bef769e3 Merge "[ResourceLoader] Use getLanguage() accessor as the field is lazy-loaded." 2012-05-26 21:34:32 +00:00
Alexandre Emsenhuber
b6c04726c6 Removed function_exists() check for header_remove() since it's now always available.
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
2012-05-26 21:31:30 +02:00
umherirrender
a44edf4a71 Set title for Linker::revComment on Special:NewPages
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
2012-05-26 21:10:52 +02:00
Alexandre Emsenhuber
c82961b1d4 Check validity of fetched titles and show a descriptive messages when an invalid title is encountered.
Change-Id: I8989430db3eb817d24b5128df46942eda15eb535
2012-05-26 18:13:31 +02:00
Aaron
9f6afeab0d [FileRepo] Made getDescription() respect *_deleted fields.
Change-Id: I1dd54611501d6747fb4ad6cbe6b58b0010b1d6d4
2012-05-25 16:00:49 -07:00
Aaron
e302c675a2 [ResourceLoader] Use getLanguage() accessor as the field is lazy-loaded.
Change-Id: I6a106d1557366f6ff4586c9604fd324be51d7e1f
2012-05-25 14:52:39 -07:00
jeroendedauw
dc16ea18a7 Adding interfaces for ORM row and table classes so these can be used for type hinting in a way that does not prevent doing stuff such as the decorator pattern. Also made some minor fixes in the docs
Change-Id: I8ee1495a46d676062026d4d6b7acaae7bb227c42
2012-05-25 22:09:32 +02:00
Aaron Schulz
7d1004bd5c Merge "user table: replace some '*' with explicit fields in selects" 2012-05-25 17:14:08 +00:00
Aaron Schulz
ac9cbba73b Merge "Title.php: replace some '*' with explicit fields in selects" 2012-05-25 17:10:18 +00:00