Commit graph

25983 commits

Author SHA1 Message Date
Demon
280cb1c5f8 Merge "Set $wgLanguageConverterCacheType to CACHE_NONE in installer" 2012-05-20 14:28:12 +00:00
Aaron Schulz
1aaac4c915 Avoid extreme performance regression in ImagePage.
* For some reason, when 404 handling is off, all the links for
  $wgImageLimits were still generated but not put into the HTML.
  They still triggered convert() calls - 7 times by default.

Change-Id: I0d12c7ec3c02039c1307a1a1d04d1d1cbd44b547
2012-05-19 22:07:15 -07:00
Antoine Musso
7a0f6f5778 give path when not able to write the thumb
Change-Id: I970da631b4263b658c2c071a4c10b155100e53fc
2012-05-20 03:42:32 +02:00
Aaron Schulz
beebe060e3 Merge "(bug 23844) Add var dataCacheTime to mw.config" 2012-05-19 22:05:20 +00:00
umherirrender
dbaec6e71f Wrap message querypage-no-updates into a class
this allows easy styling of that message

Change-Id: Ief78cb598613e705dace65e4b8e36dcb544c6f4b
2012-05-19 19:48:13 +02:00
umherirrender
3992cd8f65 (bug 23844) Add var dataCacheTime to mw.config
Change-Id: I67c9cbf4fc01f4e8580b39852b27a1ac70993051
2012-05-19 19:44:09 +02:00
awjrichards
15599d3d39 Adds support to HTMLForm for rendering form fields wrapped in divs
or just plain old (mostly) raw form fields.

Also fixes minor code style issues

Change-Id: Ia9510d6960f2adb17c1bb19e378763a60169dee6
2012-05-19 07:06:15 -07:00
Aaron Schulz
fc4683ae7b [FileBackend] Made supported ops check more explicit for sanity.
Change-Id: I8d7b4e3dcae77f76d390432fe0c52366e63e3f2d
2012-05-19 01:33:01 -07:00
Aaron Schulz
2f5914c2ce Merge "Title::moveToInternal doesn't return anything, but it does throw an exception" 2012-05-19 07:55:54 +00:00
Aaron
dfa7120f1b [FileRepo] Added more upload profiling.
Change-Id: Ib79306fde3470ccaa1f6822b894f1b61f16d772b
2012-05-18 17:56:53 -07:00
Aaron
d0facbf7b1 [FileRepo] Disabled ancient migration code, kills performance.
Change-Id: I6ed49f447dda3235e22edbbf837dad66c66d0764
2012-05-18 15:35:23 -07:00
daniel
fa132be893 fix for Ibe3e88fa: restoring doDeleteUpdates().
When generalizing LinksUpdate to DataUpdate and introducing
WikiPage::getDeletionUpdates(), WikiPage::doDeleteUpdates()
was removed, even though it was still used by Title::moveToInternal().

This patch restores WikiPage::doDeleteUpdates(), using the
new logic based on WikiPage::getDeletionUpdates() to implement it.

Change-Id: I12a49d5ca3ccb6bb9cbb63dde436bcf2a7d8a985
2012-05-18 18:58:21 +02:00
Aaron Schulz
5ec99f4b24 Merge "Make errors from ArticleSave hooks propagate to the interface" 2012-05-18 05:39:19 +00:00
Aaron Schulz
9fc59854b4 Merge "Various fixes to Special:Mostlinked." 2012-05-18 05:22:55 +00:00
Aaron Schulz
fadea7c097 Merge "Document DBO_PERSISTENT in DefaultSettings.php" 2012-05-18 05:15:39 +00:00
Aaron Schulz
5f6b22de68 Merge "exclude immovable namespaces from the namespace selector on Special:MovePage" 2012-05-18 05:14:19 +00:00
Tim Starling
78d0b3cfa8 Merge "Remove extra unneeded whitespace" 2012-05-18 04:57:44 +00:00
Tim Starling
8fffd51059 Merge "[FileRepo] Use faster doQuickOperations() function for thumbnails ops." 2012-05-18 04:49:44 +00:00
Reedy
68f50015c7 Improved/added parameter documentation
Change-Id: Ie48852acb434f6b62fda0b13b13e076f833d8975
2012-05-18 03:58:15 +01:00
Aaron
24cad34372 [FileBackend] Moved closeResources() call up to parent class function.
Change-Id: I903b40c17e8f757bc3642e24552ddd518c0ef39d
2012-05-17 17:21:39 -07:00
Reedy
d34e01c12d Merge "[FileBackend] Fixed parallelize check in doQuickOperationsInternal()." 2012-05-17 23:48:58 +00:00
Aaron
0624af8f2e [FileBackend] Fixed parallelize check in doQuickOperationsInternal().
Change-Id: Ia552a5094e61f418bc3fa8958f1a4869018be536
2012-05-17 16:17:01 -07:00
Reedy
79b044a199 Document DBO_PERSISTENT in DefaultSettings.php
Change-Id: Iee17925fdfd011218a36d5e555ce6494c27837ff
2012-05-17 23:08:07 +01:00
Aaron
bbb1131501 [FileBackend] Added profiling to doQuickOperationsInternal().
Change-Id: I98ce4bdfb61bf55b5306dabf0f20427c26319c3c
2012-05-17 14:18:45 -07:00
Aaron
159cc27fde [FileBackend] A few code cleanups and some error message improvements.
Change-Id: I75f066104b98638ca956042c4e877c0f6327509c
2012-05-17 11:34:15 -07:00
Aaron
930c9f8060 [FileRepo] Use faster doQuickOperations() function for thumbnails ops.
Change-Id: I8139b7f6f8533bb0dbeddba12750ab9342b2dd82
2012-05-17 09:55:02 -07:00
Tim Starling
4024de4bd8 Merge "[FileBackend] Improved connection error handling and logging a bit for Swift." 2012-05-17 07:52:06 +00:00
Tim Starling
f03819f8eb Merge "[FileBackend] Added doQuickOperations() function for things like purging thumbnails." 2012-05-17 07:42:07 +00:00
Tim Starling
ea973a8a00 Merge "[FileBackend] Added CDN support to Swift for third-party sites." 2012-05-17 07:16:09 +00:00
Tim Starling
ad8b234b1b Merge "[FileBackend] Made it easy to use registed file backend config in multi-write backends." 2012-05-17 07:08:51 +00:00
Tim Starling
dbb2b3e664 Merge "[FileBackend] Syncing from journal support." 2012-05-17 07:03:34 +00:00
Liangent
7443931d5c Tweak includes/zhtable/Makefile.py
* Make it executable and use a more generic shebang line.
* Write ZhConversion.php to its own location directly, so it can be more
  convenient to do git checkout -b; edits; ./Makefile.py; git diff; to
  confirm changes made.
* Cosmetic text changes.

Change-Id: Ia3556e3b2cd5ee4eeaa67c4e535141576f13dc16
2012-05-17 07:10:59 +02:00
Catrope
92ee2e4964 Merge "Introduced the concept of raw ResourceLoader modules" 2012-05-17 03:11:04 +00:00
Aaron Schulz
1abcd5e30e [FileBackend] Improved connection error handling and logging a bit for Swift.
Change-Id: I9a128bc5027cba85b1cf4992434d697215b3277f
2012-05-16 18:51:38 -07:00
Reedy
5b4e4a06c7 Merge "add since tags" 2012-05-16 23:48:49 +00:00
Aaron
4b0a61227f [Upload] Added various profiling calls to upload code.
Change-Id: Ib13be24393eee05e3af4a942a1c8cdcf590b0da9
2012-05-16 16:44:48 -07:00
Aaron Schulz
edf417c8e1 Merge "prop=revisions: join user table to get user name" 2012-05-16 22:20:49 +00:00
Aaron Schulz
6e96a6e8e6 Merge "Add DebugInfos to api result" 2012-05-16 22:17:17 +00:00
Reedy
50661be3dc Merge "Renamed new BagOStuff getBatch() function to getMulti() for consistency." 2012-05-16 20:17:34 +00:00
umherirrender
7b8e963c88 empty string test for old page_restricions entries
some old page_restricions entries are move=:edit=,
which result in any empty string as level in the JS var
wgRestrictionEdit

Checking wgRestrictionEdit.length is than not possible

Change-Id: I250b4f9bda60361d4cd8c3139b17b299fec0a718
2012-05-16 21:14:40 +02:00
Aaron
86e2372772 Fixed call to setArticleBodyOnly() on wrong object type.
Change-Id: I492bbdb41aa849a86b162c7cc659dde391874454
2012-05-16 11:15:00 -07:00
Aaron
957f09b8a4 [FileBackend] Added doQuickOperations() function for things like purging thumbnails.
* doQuickOperations() lets us do things like purge thumbnails as fast as possible.
  Stat calls, SHA1 checks, and RTTs in general are avoided. It also avoids the
  slowness of lazy population of thumbnail SHA1s in Swift (for those made by rewrite.py).
* Removed supportedOperations() to avoid the extra complexity.
* Made a few variable type and exception documentation cleanups.
* Cleaned up unit test file removal a bit and made some functions private.

Change-Id: I6922368c6af7752a6927d96402519132203108a1
2012-05-16 10:30:34 -07:00
umherirrender
278bb4414f multi dbms support in api
Add some calls to Database::timestamp
Change some calls from Database::strencode to
Database::addQuotes to avoid ' in raw sql
Remove ' from ints in raw sql
Rename some vars to avoid duplicate names

Change-Id: I63f5602fa968f969a42932902a3ccc45fc54b432
2012-05-16 19:22:36 +02:00
jeroendedauw
6e9ca6e285 add since tags
Change-Id: I4601600f3d0de79c34f5a1a4074384b27f57b005
2012-05-16 18:27:17 +02:00
umherirrender
0ea2c38727 Fill GenderCache inside ApiPageSet
the queries for title and pageids are own queries created by the api,
which does not use the GenderCache, that can produce a query per row

Change-Id: I932f8d9d1cfa751dbb6f5237e2de325527d3ff53
2012-05-16 16:46:22 +02:00
umherirrender
a5e50e8b2f prop=revisions: join user table to get user name
this avoid a lazy load of the user name for each row

Change-Id: I5d8983476e03cc2f6dad074577402f5255080838
2012-05-16 16:38:40 +02:00
Reedy
aab0f8bc6f Merge "Add includes/zhtable/.gitignore to avoid data files to be committed." 2012-05-16 02:10:29 +00:00
Reedy
8f7fb6cffa Merge "[FileBackend] Avoid infinite loops when populating missing metadata in Swift." 2012-05-16 01:51:34 +00:00
Max Semenik
cd7923ac16 Introduced the concept of raw ResourceLoader modules
This is needed for mobile scripts that are supposed to work on dumb
devices and as such can't rely on client-side RL, but still can take
advantage of server-side minification and concatenation.

Patchset 2: Allow loading raw modules with &raw=true appended to URL.

Change-Id: I9410ffbf6633075e07bd06b10a98a4d12d9b6106
2012-05-16 01:03:12 +04:00
Aaron
634c3be2bb [FileBackend] Avoid infinite loops when populating missing metadata in Swift.
Change-Id: Ief13048256ee11caf3494d934eb5267f5eb71e8b
2012-05-15 13:05:46 -07:00
Reedy
df7b1cc716 Merge "[IP] Added an IP::prettifyIP() function for displaying IPs." 2012-05-15 19:10:51 +00:00
Aaron Schulz
6117b89f11 Merge "Various fixes to Special:Mostcategories." 2012-05-15 09:16:59 +00:00
Aaron Schulz
6a460ed446 Renamed new BagOStuff getBatch() function to getMulti() for consistency.
Change-Id: Icfe673919f65192565aa114c165c90d97d33785a
2012-05-15 01:48:22 -07:00
Aaron Schulz
e0f61b56b8 Merge "Don't log HttpError" 2012-05-15 08:45:04 +00:00
Aaron Schulz
cb559873da Merge "Minor PECL client fixes" 2012-05-15 08:38:54 +00:00
Tim Starling
e2aa8b4978 Don't log HttpError
Fix for r97314: don't log HttpError exceptions to the exception log channel. Do
this by overriding MWException::report() rather than
MWException::reportHTML(), same as every other child class in
Exception.php.

Change-Id: I3fb2b0ca9b0e7c67c210078d1fd90e1430be39df
2012-05-15 15:04:40 +10:00
Tim Starling
d3fd5db207 Minor PECL client fixes
* Fixed the check for igbinary presence. It's not enough for the
  extension to be loaded, the memcached extension also needs to be
  compiled with --enable-memcached-igbinary.
* When delete() is attempted on a key that doesn't exist, return true,
  as in the other BagOStuff implementations.

Change-Id: I298952f4a9925d860fa5673f632d073b1f20aa47
2012-05-15 14:13:58 +10:00
Tim Starling
cf11d9d95b Merge "Reduced contention slam potential in User::invalidateCache()." 2012-05-15 01:37:03 +00:00
Aaron
059823dae6 [FileBackend] Removed likely surperflous memcached retry code.
Change-Id: I934cd658d14c051f99f72d7e37e12f8646e59458
2012-05-14 18:26:56 -07:00
Aaron Schulz
a0aa7557fe Merge "Add/update function level parameter documentation" 2012-05-15 01:09:37 +00:00
Aaron Schulz
ba7a5f70f4 Merge "Implemented a wrapper for the memcached PECL client" 2012-05-15 01:07:05 +00:00
Tim Starling
3c62077fe2 Implemented a wrapper for the memcached PECL client
* Introduced a common base class for the two memcached clients, called
  MemcachedBagOStuff.
* Moved the expiry time normalisation from MemcachedClient.php to
  MemcachedBagOStuff since libmemcached needs the same workaround.

Change-Id: I507d4ec5a7fd863ae64a94f2c453981f9f03746c
2012-05-15 10:19:41 +10:00
Reedy
2df7fae395 Add/update function level parameter documentation
Change-Id: I148b84e3b81c29c63585f3bf524fc445fd7683a7
2012-05-15 00:44:25 +01:00
Reedy
2a1fa50eae Merge "Added missing GPLv2 headers in some places." 2012-05-14 23:38:10 +00:00
Aaron
908b4d4340 [FileBackend] Added CDN support to Swift for third-party sites.
Change-Id: I220ab8cf8fd97d3a080b8dcc8f010d97fcc09671
2012-05-14 16:10:11 -07:00
Aaron Schulz
348767cae2 Merge "Adding NamespaceIsMovable hook to isMovable in MWNamespace, much like done in Title::isMovable." 2012-05-14 22:23:46 +00:00
Aaron Schulz
060ba3cb68 Merge "Generalizing LinksUpdate to allow extensions to add arbitrary update handlers." 2012-05-14 22:20:04 +00:00
Aaron Schulz
d1f8301e62 Merge "GROUP BY and ORDER BY supports arrays in Database class" 2012-05-14 22:17:01 +00:00
Aaron Schulz
adedb66279 [FileBackend] Added getScopedLocksForOps() function.
This lets callers safely change files *and* update DB data.

Change-Id: I6ec70e98b1535528b756e109b8b28e4a3e839552
2012-05-14 13:11:12 -07:00
Alexandre Emsenhuber
15e9fcca01 Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: Iaebd4e253ff3b35b568e9b394231a5691445ac95
2012-05-14 19:59:58 +02:00
Mark A. Hershberger
843738b4cd Bug 36785 Special:Shortpages lists only NS_MAIN pages. (pages from all $wgContentNamespaces should be listed)
Change-Id: I9d7307ae22745e7aa640ed611ea64f76e2507651
2012-05-14 13:11:48 -04:00
Tim Starling
50927f376b Merge "Fix typo in comment" 2012-05-14 07:25:13 +00:00
Tim Starling
2734ef7497 Fix typo in comment
Change-Id: I67d040cb9e4ed450b5487fcc4e5b4cdf857b8552
2012-05-14 17:23:47 +10:00
Tim Starling
6e49b1a966 Merge "[FileBackend] Added support for concurrent file write operations." 2012-05-14 07:23:29 +00:00
Nikerabbit
f43939a433 Merge "Use local context to get messages and time formatting methods of Language class" 2012-05-14 06:28:20 +00:00
Catrope
87e6aaf9bf Make the private-logs-UDP code path in saveContent() also return $newId
This was an oversight in a69fb48274 which
changed saveContent() (and, by extension, addEntry()) to return a log_id
rather than a boolean.

Also update the documentation comments to reflect this, and remove a
resolved TODO

Change-Id: I8fe269f452f8c8d4fa0318c120b676ac10efebae
2012-05-13 14:47:19 -07:00
daniel
a12ce17c6e Generalizing LinksUpdate to allow extensions to add arbitrary update handlers.
This supercedes I6d03bf2a, using better names for the new classes and
incorporating the changes requested by Aaron.

This change introduces the base class SecondaryDataUpdate to be used for any
updates that need to be applied when a page is changed or deleted. Until now,
this was done by the LinksUpdate class for updates and WikiPage::doDeletionUpdates
upon deletion. This patch uses a list of SecondaryDataUpdates in both cases.

This allows extensions (e.g. via the ContentHandler facility, once that is in) to
easily specify what needs to be done when a page is updated or deleted in order to
keep any secondary data stores (such as link tables) in sync.

Note that limited transactional logic is also introduced, so SecondaryDataUpdate
can be implemented to only commit their changes if all updates were performed
sucessfully.

Patch Set 2: fixing some coding style issues mentioned by Nikerabbit.

Patch Set 4: some stuff I kept from the old LinksUpdate class needs cleanup,
             but might break extensions when changed. Marking as todo for now.

Patch Set 5: fixed misnamed member in LinksDeletionUpdate (thanks Aaron).

Change-Id: Ibe3e88fadd8c1d4063cf13bb6972f2a23569a73f
2012-05-13 20:53:37 +02:00
umherirrender
0a5e1bf76a Add DebugInfos to api result
This allow to get the queries of the api due the same api request,
when setting $wgDebugToolbar = true, that acts like the inline script
added to index.php

Change-Id: I7c121822827137ba098d95a54ec90f824e0ddf01
2012-05-13 11:20:04 +02:00
umherirrender
41988661e4 GROUP BY and ORDER BY supports arrays in Database class
Change-Id: Ib431b07ffa2ce6843e21536de2ff19c648e0a595
2012-05-13 00:06:48 +02:00
robin
84b8ca9801 Remove extra unneeded whitespace
This whitespaces causes an extra empty paragraph between text and transcluding a special page.
When a heading precedes a transcluded special page, there is no difference and it's fine with or without this whitespace.

See for example http://incubator.wikimedia.org/w/index.php?title=Incubator:Sandbox&oldid=822299

Change-Id: I6b06006d921368619d3969660c244176344e8aff
2012-05-12 23:37:50 +02:00
Alexandre Emsenhuber
aa6ba56bf4 Use local context to get messages and time formatting methods of Language class
Also pass the context to the LogFormatter instance.

Change-Id: I30d88822d8ede5c138dd5403a998dd722f950bbe
2012-05-12 23:27:22 +02:00
Alexandre Emsenhuber
a682b7335a Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: I0db3461139284edcb6ac02923eb83d54e6756ffb
2012-05-12 22:33:51 +02:00
Aaron Schulz
aefa39ead9 Merge "Add maxresults to list=querypage" 2012-05-12 17:13:35 +00:00
Aaron Schulz
53d7092ab4 Merge "ApiPageSet::populateFromTitles can work with Titles" 2012-05-12 17:13:03 +00:00
Aaron Schulz
d3ace7bdc3 Merge "set tidy = true for action=purge&forcelinkupdate=" 2012-05-12 17:09:08 +00:00
umherirrender
94395dcdd3 Add maxresults to list=querypage
Change-Id: I96e12428305d86c623e810d58f3f3173906f42e1
2012-05-12 17:11:47 +02:00
umherirrender
e552ca3dca ApiPageSet::populateFromTitles can work with Titles
Change-Id: I492c350cbb487c1a35bc96c7bcf5f0af9a9d530c
2012-05-12 17:02:53 +02:00
umherirrender
223abdc2ca set tidy = true for action=purge&forcelinkupdate=
Change-Id: Ibf17c312193629b64c3d5184b8fb26387862dd0d
2012-05-12 15:56:31 +02:00
Liangent
0803cf2d65 Update Chinese conversion table: 海淀山後
Change-Id: Iae9c711ff66a2694c5f1e120fd84e602ca7ceb21
2012-05-12 21:48:58 +08:00
Liangent
ebc43af0f4 Add includes/zhtable/.gitignore to avoid data files to be committed.
Change-Id: I7ac9cd01d4eac5357278e0fd50d7d728d3107def
2012-05-12 21:15:00 +08:00
Aaron Schulz
3a8c2e47f7 Merge "Add username as parameter for gender support" 2012-05-12 01:41:26 +00:00
robin
4909deab93 Add username as parameter for gender support
Change-Id: I66ec154e6d62172321f983f6898fa074d53e0e23
2012-05-12 03:25:29 +02:00
Reedy
c68ca4228e Merge "Integrating mobile device detection class into MW core" 2012-05-11 22:50:35 +00:00
Aaron Schulz
50adb91fee Merge "add Interwiki::selectFields" 2012-05-11 22:33:58 +00:00
Aaron Schulz
4104f10fe0 Merge "Add unit test for MWNamespace::isNonincludable" 2012-05-11 22:32:54 +00:00
Aaron Schulz
270b13df54 Merge "Add user talk page in newusers log to LinkBatch" 2012-05-11 22:31:15 +00:00
Aaron
8ffaa46662 Reduced contention slam potential in User::invalidateCache().
Change-Id: If40f368072d97e244295522003fbaa9c082f8f7c
2012-05-11 15:18:14 -07:00
Alexandre Emsenhuber
a06b79ab53 Use local context to get messages.
Also added "false, false" to Language::time() and Language::date() calls in Special:Lockdb, this is to have the date using the default format and not in the format of the user locking the database.

Change-Id: I9309022b005fcc7d31350242b8989ca7eabf69a8
2012-05-11 22:22:06 +02:00
umherirrender
38a2cd320a add Interwiki::selectFields
to avoid * inside select

Change-Id: I9d0ac631d9389744f68d744fa1d3fa3e3866a956
2012-05-11 22:16:19 +02:00
umherirrender
d6c651f608 Add user talk page in newusers log to LinkBatch
Using NewUsersLogFormatter::getPreloadTitles for that

Change-Id: Ib3bede90e33c3d240aad5950247d52d732d8876b
2012-05-11 21:27:40 +02:00
Aaron
456177bdee [IP] Added an IP::prettifyIP() function for displaying IPs.
Change-Id: I53b3fe70bd0091ef02740f2b8950c36a0e4cf32e
2012-05-11 10:53:14 -07:00
umherirrender
e9fa97f76e Add unit test for MWNamespace::isNonincludable
rename MWNamespace::isNonincludableNamespace
to MWNamespace::isNonincludable, because "Namespace" is already in the
class name

Change-Id: Ie982835c7dc84cb10c823996e5360cc1b342f704
2012-05-11 19:52:34 +02:00
Nikola Smolenski
b5153c2532 Set $wgLanguageConverterCacheType to CACHE_NONE in installer
Change-Id: I03ddd59fe7758032b3faa401ff1b0fa3b459e723
2012-05-11 19:13:13 +02:00
jeroendedauw
94fc70a48c exclude immovable namespaces from the namespace selector on Special:MovePage
Change-Id: Icd5645921e95bfd4b3a04c40d4b9bba3600d2f07
2012-05-11 16:32:52 +02:00
jeroendedauw
717e93bd81 Adding NamespaceIsMovable hook to isMovable in MWNamespace, much like done in Title::isMovable.
Change-Id: I72c19be541391857aa25ff2433c017e5d63a8ecd
2012-05-11 16:13:30 +02:00
Demon
f950f4b39f Merge "Added missing GPLv2 headers in some places." 2012-05-11 12:49:12 +00:00
Nikerabbit
03ecf97aec Merge "(bug 33928) make diff title page more relevant" 2012-05-11 09:05:44 +00:00
Alexandre Emsenhuber
d1f8640a3b Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: Ia45d0756cd84138da267bf1cbd1a58be7f28c6d1
2012-05-11 10:34:29 +02:00
Aaron Schulz
ae78b076cd Merge "Parameter documentation stuffs" 2012-05-10 23:17:40 +00:00
Reedy
6885d1fd90 Parameter documentation stuffs
Change-Id: I2d9e800bf21d420fb26c130d0f271f6739c730a4
2012-05-11 00:09:58 +01:00
Aaron Schulz
d0bdc038e8 Merge "Revert r97711" 2012-05-10 23:00:50 +00:00
Catrope
f3b8e30521 Merge "[SiteStatsUpdate] Reduced contention by using a new lockIsFree() DB function." 2012-05-10 22:52:23 +00:00
Aaron
ff187ea7cc [SiteStatsUpdate] Reduced contention by using a new lockIsFree() DB function.
* Note: follows up a4b3979160
* Cleanup up transaction statements a bit; transactions don't effect the lock calls
* Also made DatabaseMysql::unlock() actually return a bool

Change-Id: Iade2efa94165b6918eae0863716cc163f36a07b8
2012-05-10 15:48:58 -07:00
Catrope
78ead2330b Merge "Add support for User:0 in 'user' and 'user.groups' RL modules." 2012-05-10 22:42:03 +00:00
Catrope
4a75357363 Merge "[SiteStatsUpdate] Added support for memcached staging of stats updates." 2012-05-10 22:23:14 +00:00
Aaron
a4b3979160 [SiteStatsUpdate] Added support for memcached staging of stats updates.
Change-Id: I0bfdd6a4c9b8b09355bf008bd97456401f8b485b
2012-05-10 15:19:43 -07:00
Alexandre Emsenhuber
0697701232 Various fixes to Special:Mostlinked.
* Show descriptive error message on invalid title
* Call methods directly on ResultWrapper instead of DatabaseBase

Change-Id: Ia437e73546ce664395f07c4a10bad6f04fcfb5d7
2012-05-10 21:57:22 +02:00
Catrope
b1e0daa428 Make errors from ArticleSave hooks propagate to the interface
Aborting a save from the ArticleSave hook and putting an error in
$status didn't actually propagate the error message to the user, but
instead displayed the edit conflict page (!). Fix this so that if we get
an unrecognized error from ArticleSave, we treat it as an extension
error and render it rather than going into conflict mode.

Similarly, make the API attempt to render the error through
dieUsageMsg() like it already does for AS_END

Change-Id: Iccf78480240d0c7ed321438c8190472805957099
2012-05-10 12:10:25 -07:00
Reedy
c87a63935a Merge "(bug 19195) Make user IDs more readily available with the API" 2012-05-10 18:47:42 +00:00
Petr Onderka
7264a75515 Fixed typo in description in categorymembers module
Change-Id: I7d82df6a4b0f65fe763e0eea23dfa05ae2e7c5f1
2012-05-10 20:36:34 +02:00
Szymon Świerkosz
bde989e74c Add support for User:0 in 'user' and 'user.groups' RL modules.
Change-Id: I290e44166306036629ada990e233f098558c2aea
2012-05-10 20:12:13 +02:00
Aaron Schulz
eec6d86af3 Merge "Use local context to get messages" 2012-05-10 18:11:02 +00:00
Aaron Schulz
afb23b2ad3 Merge "Fix typo in comments, rm debugging code" 2012-05-10 18:10:01 +00:00
Reedy
2705e07bfd Merge "Added missing GPLv2 headers in some places." 2012-05-10 18:09:23 +00:00
Max Semenik
aacbb6bea7 Fix typo in comments, rm debugging code
Change-Id: I1ae2e59048fbeaf1a1f279dd5bd38bd19b5a8498
2012-05-10 21:01:50 +04:00
Alexandre Emsenhuber
8138e2ab38 Use local context to get messages
Change-Id: I942ce637b53599b865f36012bd9a91f0fea63b1f
2012-05-10 17:58:38 +02:00
Alexandre Emsenhuber
bc9d9f1f9c Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent and removed a duplicate comment from SpecialPageFactory.php in SpecialPage.php.

Change-Id: I99dd2de7fe461f2fad4e0bd315ebc2899958a90f
2012-05-10 17:51:44 +02:00
Kaldari
57975e257f Adding new getCreator and getOldestRevision methods to WikiPage class.
Patch 2: Adding getOldest method per comments
Patch 3: whitespace fix
Patch 4: renaming getOldest to getOldestRevision
Patch 5: separating into 3 methods: getOldestRevisionId, getOldestRevision, getCreator
Patch 6: more concise, fixing whitespace
Patch 7: return user object instead of user id
Patch 8: consolidating revision methods per discussion
Patch 9: whitespace
Patch 11: better commit summary
Patch 12: Typo, sigh
Patch 13: switching to use Revision::newFromRow per comment
Patch 14: using Revision::selectFields()
Patch 15: moving outside of while loop
Change-Id: I140e17a95b89c9263978942fd642d6a236a5cc4f
2012-05-09 20:41:16 -07:00
Aaron Schulz
f1a37c1618 Merge "Factor out module name validation into a static function" 2012-05-09 23:41:44 +00:00
Catrope
4910a61046 Factor out module name validation into a static function
Also add the requirement that module names be at most 255 bytes, so
they'll fit in the DB fields that we put module names in (md_module,
mr_resource, mrl_resource)

Change-Id: I7193c9beb7aff4eabfe20db461e6f9032ae994b1
2012-05-09 14:41:27 -07:00
awjrichards
8653accc60 Integrating mobile device detection class into MW core
Change-Id: Ic7bbeba746ea37a92c1df5dbaa1fb4fd08da130c
2012-05-09 14:28:16 -07:00
Aaron
b9ac85cbf3 [SiteStatsUpdate] Changing raw DB update calls to use SiteStatsUpdate.
* Made SiteStatsUpdate fields protected
* Added factory function for unretarded object construction
* Changed FileRepo code to use deferred stats updates like everything else

Change-Id: I93039104b14f0362509e37b6852604ffb0898dc7
2012-05-09 14:17:56 -07:00
Alexandre Emsenhuber
5c18fed079 (bug 25946) The message on the top of Special:RecentChanges is now displayed in user language instead of content language
Moved 'recentchangestext' message to 'recentchanges-summary'; left 'recentchangestext' empty by default for wikis that would like to display things in content language on the top of Special:RecentChanges

This a resubmit of r86186 (https://www.mediawiki.org/wiki/Special:Code/MediaWiki/86186) which was reverted in r86294 (https://www.mediawiki.org/wiki/Special:Code/MediaWiki/86294). The revert should have been temporary (at least from commit summary), but it seems that it was not the case.

Change-Id: Ia2061a581f754aa1bc374a615d41e8465996feac
2012-05-09 22:51:11 +02:00
Aaron Schulz
2004c44a14 Merge "Use local context to get messages" 2012-05-09 18:44:11 +00:00
Brion VIBBER
92f645b2ae Merge "[FileRepo] Purging/transaction fixes." 2012-05-09 18:37:23 +00:00
Alexandre Emsenhuber
28309ef5b4 Use local context to get messages
Change-Id: Ieb3564e5532e421b4b803ed6c327d6a75ed0103c
2012-05-09 20:18:30 +02:00
Alexandre Emsenhuber
2040d1337e Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: Ib46e50da4ec649a6a06cbeed00752effb79ed06e
2012-05-09 20:11:36 +02:00
Aaron
d086fc9f6d [FileBackend] Made it easy to use registed file backend config in multi-write backends.
Change-Id: Idce8c06a56bd0debac5f2217bef89b4fe8bf5ba8
2012-05-09 10:39:32 -07:00
Timo Tijhof
5d0dae240b Revert r97711
WONTFIX:
 * (bug 30245) Use the correct way to construct a log page title.

 This was previously reverted for 1.19 and now reverting again for
 1.20, only this time proposing it not to be temporary.

 Right now this is already live on 2 wikis and as soon as it goes
 live on a non-English wiki (since English namespace name for Log
 matches the canonical name "Log", and as such causes no breakage yet
 for bots using the IRC feed), as soon as it goes live on a
 non-English wiki it will all log actions that bots are monitoring
 using the irc feed.

 (because no matter which log action is monitored, it all goes
 back to detecting the page title of Special:Log)

 If properly announced ahead of time it could be done, but we don't
 have that time anymore. Perhaps re-try in 1.21 or 1.22, but as far
 as I'm concerned, this bug can be kept WONTFIX as it only affects
 the IRC feed. And it's not worth the loss that will undoubtedly
 result from breaking this.
 Theoretically a certain amount of time for the announcement could be
 required, and if the change enables something or fixes a security
 problem, it could be justified, but for this it is just not worth
 it.

 The human-readable output from the API and on Special:Log are fully
 localized and even better so with the rewrite that Niklas did last
 year. The IRC feed however, has little to no gain from this and only
 causes breakages for the the large amount of bot usage from it, of
 which many are no longer maintained and as such will not be fixed,
 no matter how much time it is given. Granted those will probably
 break no matter what at some point, but hopefully we will have
 push notification *with* structured data[2] by that time to
 encourage rewrites of those bots.

Change-Id: I229e345c74b10f4d96b8d2d305b4a7623825b3f6
Links:
 * https://www.mediawiki.org/wiki/Special:Code/MediaWiki/97711
 * https://www.mediawiki.org/wiki/Requests_for_comment/Structured_data_push_notification_support_for_recent_changes
2012-05-09 16:45:39 +02:00
Aaron
23a0490b78 [FileBackend] Added support for concurrent file write operations.
* FS backends work via popen() and basic shell commands.
* Swift backends use the custom SwiftCloudFiles async features.
* Refactored storagePathsRead()/storagePathsChanged() to normalize the paths
  for correct dependency detection in FileOpBatch.
* Cleaned up SwiftFileBackend exception handling to make debugging easier.
* Added a quick and dirty performance testing script.
* Updated unit tests to include a run with parallelize=implicit.
* Improved file test failure output a bit.

Change-Id: I6a5ed743c30c598e0dd7301dbdb3631c460332fd
2012-05-09 05:37:41 -07:00
Alexandre Emsenhuber
12ddff3005 Various fixes to Special:Mostcategories.
* Show descriptive error message on invalid title
* Don't check for page existence if the query is not cached, since the page must exist to be listed here
* Do a LinkBatch if the query is cached, otherwise we end up with on database query per displayed row

Change-Id: Ia10d0e7d69def0ee1f42727124518bc6f6335dda
2012-05-09 09:56:56 +02:00
Krinkle
0c9a4522cc Merge "HTTP: Fix ded6170bd2, which broke all HTTP calls." 2012-05-09 06:39:09 +00:00
Aaron
e4f0c1f57b HTTP: Fix ded6170bd2, which broke all HTTP calls.
* respHeaders contains arrays for each header (should've been
  respHeaders['content-length'][0] instead of respHeaders['content-length'])
  using getResponseHeader() instead.
* This also fixes InstantCommons, which was broken by this (bug 36653).
* Also cleaned up a bit of w/s in foreign repo code while in the area.

Change-Id: I429b0a36618cc2b873077516e9c1023dc5b7d693
2012-05-09 08:35:14 +02:00
Timo Tijhof
2100e3e591 Merge "(bug 36669) Installer CSS outdated" 2012-05-09 06:09:42 +00:00
Aaron
fa1a8d5119 [FileRepo] Purging/transaction fixes.
* Purge old version thumbnails on move
* Pushed purge operations outside of the DB transaction for move/delete

Change-Id: I260940149599eea814226d3c5b7092f4d6544a72
2012-05-08 17:29:39 -07:00
Timo Tijhof
6540260001 (bug 36669) Installer CSS outdated
Change-Id: I7ac606f2e8538eb5fd10a3944cf9d8b42bbc5ed5
2012-05-09 02:20:03 +02:00
Aaron Schulz
7f04814796 Merge changes Ic19071c7,Icc8dc4ae
* changes:
  Message documentation for Icc8dc4ae (circular references in strip tags)
  (bug 35315) Detect circular references in strip tags
2012-05-08 22:54:59 +00:00
Platonides
2af392378d Typo in comment
Change-Id: Ic5e1451f86d7bcda374fd12b5a9b85fe199a7c1a
2012-05-08 23:27:21 +02:00
Brion VIBBER
d0d2c9bb49 Merge "Show descriptive error message on invalid title instead of showing an empty line" 2012-05-08 20:47:59 +00:00
Brion VIBBER
78a58988d4 Merge "Optimized SqlBagOStuff::getBatch() a bit." 2012-05-08 20:30:55 +00:00
Brion VIBBER
bf76d27595 Merge "(bug 35993) gettoken should go die in a fire (part 1)" 2012-05-08 20:26:28 +00:00
Brion VIBBER
364be04f3f Merge "[FileRepo] Locking and transaction fixes." 2012-05-08 20:21:44 +00:00
Brion VIBBER
7201be76e7 Merge "Add new-inline-tags to tidy.conf" 2012-05-08 20:15:53 +00:00
Alexandre Emsenhuber
c7958d6bfd Show descriptive error message on invalid title instead of showing an empty line
Change-Id: Ided20c465fee37087239a0caef01c7427c5ceeef
2012-05-08 21:34:40 +02:00
Brion VIBBER
4614e395e4 Merge "(bug 36568) Fixed "Illegal string offset 'LIMIT'" warnings in updater" 2012-05-08 18:56:41 +00:00
Aaron Schulz
9b98d3f637 Merge "Don't make two database requests to load the same object, again." 2012-05-08 18:50:15 +00:00
Brion VIBBER
3d7f9d6fee Merge "(bug 20189) Added 'Show/hide selected revisions' button and checkboxes to Special:Log." 2012-05-08 18:36:05 +00:00
Brion VIBBER
25f3d4674f Merge "[FileBackend] File locking fixes." 2012-05-08 18:30:19 +00:00
Brion VIBBER
0949454a57 Merge "Make getContinueStr protected as it's used in subclass by TMH" 2012-05-08 18:28:30 +00:00
Brion VIBBER
198c2fc3bb Merge "Include the namespace of the page in the "target" parameter of the form to confirm display of a deleted file." 2012-05-08 18:27:46 +00:00
Brion VIBBER
3807ba51b9 Merge "ORDER BY/GROUP BY accept arrays" 2012-05-08 18:10:38 +00:00
Reedy
2173e1fbee Make getContinueStr protected as it's used in subclass by TMH
Change-Id: I3bd265805122d3ae12b986d1396ca634ca9f8097
2012-05-08 19:08:43 +01:00
Aaron Schulz
0f40dbc0ce Merge "Fix comment ResourceLoader::tryRespondFromFileCache()." 2012-05-08 17:23:38 +00:00
Hashar
3f9d7a7eb3 Merge "Added Linker::getInvalidTitleDescription() to display invalid title entries in various places." 2012-05-08 16:12:59 +00:00
Nikerabbit
3b0a213ed1 Merge "Use CamelCase in both ConfirmEmail and InvalidateEmail page names." 2012-05-08 15:58:29 +00:00
Alexandre Emsenhuber
160a1df2f0 Fix comment ResourceLoader::tryRespondFromFileCache().
Mention ResourceFileCache instead of ObjectFileCache for the $fileCache parameter since the signature is
function tryRespondFromFileCache( ResourceFileCache $fileCache, ResourceLoaderContext $context )

Change-Id: I8e738c847ea358117a2a9b54f41fdb10308e2656
2012-05-08 17:53:59 +02:00
Alexandre Emsenhuber
4471b93253 Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: I604ed8ddc572e89001e49df6740ab42307bc0330
2012-05-08 14:51:21 +02:00
Alexandre Emsenhuber
c6b36a5f20 Include the namespace of the page in the "target" parameter of the form to confirm display of a deleted file.
Currently the name of the file is sent without the "File:" prefix making MediaWiki think we want to display a page in the main namespace.

Change-Id: I5a42764c8e9289d13b95a1989be63fdf357bc6ef
2012-05-08 14:06:12 +02:00
Liangent
47f3110a7e Use CamelCase in both ConfirmEmail and InvalidateEmail page names.
Change-Id: I2685023eff58479f0eecd3d6ff416cbe22ee425a
2012-05-08 17:29:21 +08:00
Aaron Schulz
a9e028e5a8 [FileBackend] File locking fixes.
* Fixed unlocking logic in FSLockManager for case when an EX lock was made, then an SH one, and then the EX one was "unlocked"
* Avoid hiding useful unlink() warnings in FSLockManager
* Reduced locking use in test cleanup code
* Added a simple testLockCalls() test function
* Made a few cleanups & fixes to backend tests

Change-Id: I1110d9b537c450d9feca5a2fb35519c22435e81d
2012-05-08 01:51:57 -07:00
Tim Starling
3905be18fb (bug 35315) Detect circular references in strip tags
Explicitly detect circular references in strip tags and break the loop,
similar to how we deal with circular references in templates. This is
necessary to support Scribunto since we imagine we will provide an API
that allows strip markers to be forged.

The recursion depth limit is a consequence of changing the algorithm
from iterative to recursive, it's required to protect the stack against
deeply nested #tag invocations.

Change-Id: Icc8dc4aedbced55ad75b3b5a5429a376d06d9b31
2012-05-08 14:36:32 +10:00
Alex Monk
961a8d1e7f (bug 20189) Added 'Show/hide selected revisions' button and checkboxes to Special:Log.
Change-Id: I2c4d4e1234d5ab9f7d514831351ea3b298811165
2012-05-08 02:32:15 +01:00
Tim Starling
f8e0327656 Fix for r113993: don't log UsageException instances
Change-Id: I205252534fcf7a0ee486938123c1e15cd036f4f1
2012-05-08 11:05:09 +10:00
Demon
f2e8e7109f Merge "Make $wgShowExceptionDetails=false more feasible for production" 2012-05-08 00:06:03 +00:00
Tim Starling
70841c5867 Make $wgShowExceptionDetails=false more feasible for production
* Make the HTML error message prettier, with a nice red box and
  instructions to modify LocalSettings.php hidden in an HTML comment.
* Show the exception class name, since that's pretty safe.
* Show a random "log ID" to the user, and also send it to the exception
  log, to allow easier log correlation.
* Optionally send backtraces to the error log, enabled by default.

Change-Id: Ie92e46032b3d194c4217119567847a38a53be577
2012-05-08 10:01:13 +10:00
Kaldari
a986772e98 Fixing fatal error - you can't call getUser on a WebRequest object
Change-Id: I323e9c39cd89673b7e369df3b77573e51f4ea2e3
2012-05-07 16:34:09 -07:00
Aaron Schulz
08d795969b Merge "Treat truncated HTTP requests as errors." 2012-05-07 23:21:56 +00:00
Aaron Schulz
ec299eabb6 Merge "add type check and bail out when title could not be created" 2012-05-07 23:03:03 +00:00
Platonides
ded6170bd2 Treat truncated HTTP requests as errors.
We detect such prematurely ended request when there's a Content-Length
greater than the body we got. A strict comparison would easily fail
when there was a content encoding layer, but hopefully we won't hit
a compressed request _larger_ than the original content.

See http://thread.gmane.org/gmane.org.wikimedia.mediawiki/39622
for breakage caused by truncated HTTP replies.

Change-Id: I71418424730d46a781bde5cbfda8038457ec79c5
2012-05-07 14:46:54 -07:00
Antoine Musso
a8629e30ed (bug 36603) Make DumpFilter::$sink public again
This is required by dump unit testing for now. The change was introduced
by commit ab6e54e0 https://gerrit.wikimedia.org/r/#/c/6089/

We will have to update the Dump tests to no more reference sink directly
but use a proper accessing method that has yet to be written.

Change-Id: I1246739c4ea174b13af475db8cfcb48740ecc2df
2012-05-07 14:37:55 -07:00
Aaron Schulz
97eee1a066 Merge "Made WikiPage recall the source of the data used to load its state." 2012-05-07 17:44:34 +00:00
Alexandre Emsenhuber
d3fecf5ac6 Added Linker::getInvalidTitleDescription() to display invalid title entries in various places.
This method will use two new messages 'invalidtitle-knownnamespace' and 'invalidtitle-unknownnamespace' depending on the fact that the given namespace number exists or not.
I did put that method in Linker because I plan to use it in various places, notably in other QueryPage and Pager subclasses.

Change-Id: I13e7cdc2c0a8e86dc5e4b144b6012f3864d2ec06
2012-05-07 18:25:52 +02:00
Alexandre Emsenhuber
1d3934e1ad (bug 36568) Fixed "Illegal string offset 'LIMIT'" warnings in updater
No RELEASE-NOTES entry since this is going to be backported and RELEASE-NOTES-1.19 is out of sync.

Change-Id: I1ec6c824677606ac6f93cc43345942e4de8bd3f4
2012-05-07 15:52:55 +02:00
Demon
329ec1a40d Merge "(bug 36537) Rename wfArrayToCGI to wfArrayToCgi" 2012-05-07 12:26:34 +00:00
Siebrand
a15243f15d Merge "Pass the result of the database queries in Title::getPreviousRevisionID() and Title::getNextRevisionID() into intval()." 2012-05-07 10:22:46 +00:00
Alexandre Emsenhuber
61f246aa78 Made WikiPage recall the source of the data used to load its state.
In WikiPage.php:
* Added WikiPage::$mDataLoadedFrom to store the source of the data used to load the state of the object and four new WikiPage::DATA_* constants for its possible values.
* Added WikiPage::convertSelectType() to convert 'fromdb', 'fromdbmaster' and 'forupdate' to the new WikiPage::DATA_* constants.
* Added $options to WikiPage::pageData(), WikiPage::pageDataFromTitle() and WikiPage::pageDataFromId() so that the "FOR UPDATE" option can be passed to DatabaseBase::select().
* Added new possibility "forupdate" to WikiPage::loadPageData() load the data from the master database using SELECT FOR UPDATE; this avoids to have to do this by LinkCache (via Title::getArticleID( Title::GAID_FOR_UPDATE ) )).
* Changed WikiPage::doDeleteArticleReal() to use this new feature so that all the data stored in WikiPage is up-to-date.

My point is also to deprecate the loading using SELECT FOR UPDATE in Title and remove LinkCache::forUpdate() at some point (there are still one usage in Title::moveTo(), two other in UploadFromUrlTest plus some in extensions).

In EditPage.php:
* Don't call WikiPage::clear() after fetching informations from master, this destroys all we work we did to get the correct data.
* Reload the whole data from master using SELECT FOR UPDATE directly in WikiPage and not only in Title. The problem was that before, the up-to-date information was only available in Title and not in WikiPage.
  Consider the following sequence from a MySQL prompt (where both revision 1 and 2 belong to page one, revision #2 being the current one):

mysql> UPDATE page SET page_latest=1 WHERE page_id=1;
mysql> COMMIT;
// Now grad the edit form for page #1 from the web and do some changes
mysql> BEGIN;
mysql> SELECT page_latest FROM page WHERE page_id=1 FOR UPDATE;
// Now submit the web form
mysql> UPDATE page SET page_latest=2 WHERE page_id=1;
mysql> COMMIT;

Before you ended-up with a "edit conflict" form with revision #1's text being displayed as current text (even if the texts are mergeable), due to the fact that
in the submit request the WikiPage object was loaded at the moment where page_latest was 1 (certainly due to MySQL's "consistent read" feature) making the
"UPDATE page SET ... WHERE page_id=1 AND page_latest=1" query of WikiPage::updateRevisionOn() return zero row, and thus WikiPage::doEdit returing a fatal Status object with message "edit-conflict".
Now the SELECT FOR UPDATE is done in the WikiPage, meaning that the object has the correct data and EditPage will correctly try to merge the revisions (and show the correct edit conflict if needed).

Change-Id: Ic4878ddb4dd96432b7ecaf43f9f359458d966999
2012-05-07 09:17:14 +02:00
Alexandre Emsenhuber
d5381d0ea0 Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: Iad15427368d13a6cc11c8512b7265e8c7b8878a5
2012-05-07 09:11:33 +02:00
Aaron Schulz
43aa35016b [FileRepo] Locking and transaction fixes.
* Make sure locks for file moves cover the whole operation.
* Pushed purging out of the move/delete/restore transactions.

Change-Id: I398c5627808fa79739f0dee632c4edf7416507c1
2012-05-06 23:28:07 -07:00
Aaron Schulz
3a4faf8a4a Merge "$wgGitRepositoryViewers to link to gitweb" 2012-05-07 01:13:04 +00:00
Aaron Schulz
cc3938316c [FileBackend] Syncing from journal support.
* Added FileJournal::getChangeEntries() and FileBackend::getJournal().
* Added a script to sync one file backend from another, using the journal of the later.
* Removed some overzealous exception catching in FileJournal.

Change-Id: I6cc8d4fa2479dcf88878dc0b351b3cc92f4a5ad5
2012-05-06 17:04:53 -07:00
Siebrand
2d6a3b3bc6 Merge "Added missing GPLv2 headers in some places." 2012-05-06 21:12:29 +00:00
Jan Gerber
9464788f0f Add new-inline-tags to tidy.conf
by default tidy does not support html5 tags.
TimedMediaHandler outputs video, audio and source
To make TimedMediaHandler work with $wgUseTidy = true,
those tags need to be allowed in tidy.conf:
new-inline-tags: video,audio,source,track

Fixes #30541

Change-Id: I528c9521e9277be308a6a75cc3fc57c83905b5df
2012-05-06 22:13:32 +02:00
saper
8bab490dec $wgGitRepositoryViewers to link to gitweb
My git remote is configured just to be ssh://review/mediawiki/core.git
and I have "review" set up in $HOME/.ssh/config.

Unfortunately, I need to change git remote URLs to make sure
the repository is linked from Special:Version.

This shouldn't be necessary; either we should fallback to the
official MediaWiki git repository or we should add the configuration
option to adapt to local needs.

Change-Id: I2e0b6470c16ec36d0e94cceab844f4a4c4334067
2012-05-06 22:12:14 +02:00
Szymon Świerkosz
aa86d2d3e6 (bug 35993) gettoken should go die in a fire (part 1)
Mark gettoken param as deprecated, so users can fix their tools.
The second part will remove the support for gettoken from ApiMain,
but that is in the future.

Change-Id: I369ddc740c38d80aa8389544087ac6671cabc618
2012-05-06 16:43:09 +02:00
Szymon Świerkosz
7cf5f38232 Move optionstoken from meta=userinfo to action=tokens.
Follow up to I0d6c654a7354ba77e65e338423952a6a78c1150f.
I have also added a URL to a help page on mw.org.

Change-Id: Ie223930cfc313aff150e2dcfd70b74bf4360a8a8
2012-05-06 16:07:17 +02:00
Alexandre Emsenhuber
09bb6975c5 Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: I1615bf268515ed7169e33173cea6ec30402451dc
2012-05-06 07:50:15 +02:00
umherirrender
ffa3486aa8 (bug 33224) add variants of content language to meta=siteinfo
Change-Id: I0b92e1e626f0c5bc543c5d134eb44d7ca7722217
2012-05-06 05:13:55 +02:00
umherirrender
5c4406d9ea (bug 28814) add properties to output of action=parse
Change-Id: I27cf2daaf6f34596bc34aac230601d5688a0066f
2012-05-05 22:00:45 +02:00
umherirrender
b08ee41f45 (bug 34927) Output media_type for list=filearchive
Change-Id: I7c9b2f614ab319facfc9fb30893d82a9427e4253
2012-05-05 20:24:27 +02:00
Timo Tijhof
6b8a256d5d (bug 36537) Rename wfArrayToCGI to wfArrayToCgi
- For consistency with wfCgiToArray()
  This way instead of the other way around to keep lowerCamelCase natural.

Change-Id: If4528f6572afeab42ef0602a427ac44da9830a3f
2012-05-05 19:02:58 +02:00
umherirrender
d2baedfa56 Use right case for Title::makeTitle
Change-Id: Ia91b3679f03eefb9970a790c784a92ea6fb0c274
2012-05-05 16:08:47 +02:00
umherirrender
81dd7fefa5 ORDER BY/GROUP BY accept arrays
renaming all variable which hold "' DESC'" to $sort
to keep it all the same

Change-Id: I75118f8cdd701f53949fe5cdd7155fb07f78ff65
2012-05-05 15:29:08 +02:00
Aaron Schulz
820ed8667f Merge "Use $wgExpensiveParserFunctionLimit over ParserOptions" 2012-05-05 09:32:28 +00:00
umherirrender
f8101287bd Do not treat EXPLAIN as write query
Change-Id: Idb15955b94ee6977f3a4692df44d445d3450b1a5
2012-05-05 11:24:07 +02:00
Aaron Schulz
3791cc86c9 Merge "Show Highest expansion depth in limit report" 2012-05-05 08:51:12 +00:00
Aaron Schulz
49d8201ede Merge "Use local context to get messages and time formatting methods of Language class" 2012-05-05 08:46:31 +00:00
Aaron Schulz
4f7584686e Merge "Add MWNamespace::isNonincludableNamespace" 2012-05-05 08:41:29 +00:00
umherirrender
cd40d0040c Add MWNamespace::isNonincludableNamespace
Method is a wrapper around $wgNonincludableNamespaces,
replaced the one place in parser and
add it as info to api's meta=siteinfo

Change-Id: I501b811137c39f5c2d9ea35c78fef8ae22d21bfe
2012-05-05 10:22:28 +02:00
awjrichards
4b891e27bd Merge "Use Title::legalChars()" 2012-05-05 00:01:24 +00:00
Reedy
23d63db90c Merge "Only use per-template profiling for one-time profiling output." 2012-05-04 23:35:52 +00:00
Aaron
691318d0eb Only use per-template profiling for one-time profiling output.
Change-Id: Ib89ce14310ccac529684f0ada71f60744319eb3e
2012-05-05 00:34:50 +01:00
Reedy
c1ed53da6c Kill off pre php 5.3.2 back compat hacks
Change-Id: I5b806a5d8fd4ec6914e3786a4a9aefba4ad6faa6
2012-05-05 00:23:35 +01:00
Aaron
bf858d0c8e [FileBackend] Removed PHP < 5.3 b/c cruft.
Change-Id: Ied29fab9c2582384fd95b76831649f77639a3647
2012-05-04 15:39:30 -07:00
Catrope
a213a2bc2d Merge "[FileBackend] Added copy() sanity checks to FSFileBackend." 2012-05-04 22:26:50 +00:00
Aaron
a8076245aa [FileBackend] Added copy() sanity checks to FSFileBackend.
Change-Id: I3c7db46d74f744fbe877222639e78ea7318f8507
2012-05-04 15:23:57 -07:00
umherirrender
e5614cea2c Show Highest expansion depth in limit report
With 1.20wmf2 we get a tracking category with all the problem pages,
seeing the limit for a page is a helpful information than

Change-Id: I1916e5fa6de06b923a01cf1f0ca9362287a9fd70
2012-05-04 22:44:14 +02:00
Alexandre Emsenhuber
18cc220038 Don't make two database requests to load the same object, again.
I know there's no second parameter to WikiPage::newFromID(), but this will change soon.

This follows-up I098dd36619fff3610be6894037220d3472b809d5.

Change-Id: Ic28b7e05db51e55a5f49fed70c042ba11e4d97fe
2012-05-04 22:10:36 +02:00
umherirrender
fafd3e0b26 Use Title::legalChars()
Change-Id: I6b29f29875fa54196b5899042a8f576c82a8943f
2012-05-04 21:47:00 +02:00
Reedy
144c8a5f99 Update both the MediaWiki version and the min required PHP version in PHPVersionError.php
Change-Id: Ia7db1c90854b30aee17cc180381fdd9dc2f9c90b
2012-05-04 20:08:23 +01:00
umherirrender
3dd5c97e85 Use $wgExpensiveParserFunctionLimit over ParserOptions
This allows extensions to set the value

Change-Id: I4a935a00fe02a2bb88a14942e5e3ec6f4e5e833e
2012-05-04 20:56:28 +02:00
umherirrender
f963ec0cea (bug 32604) Some messages needs escaping of wikitext inside username
Change-Id: I223a5fb8d110ceace122acb7045bc6a925bfda66
2012-05-04 19:15:11 +02:00
Demon
b095e93a1a Merge "Use the same object when checking if the user is blocked instead of creating a new one." 2012-05-04 14:09:05 +00:00
Demon
b061fc5877 Merge "[FileRepo] Various ForeignApiRepo fixes." 2012-05-04 13:50:46 +00:00
Reedy
c30749cc19 Merge "Added missing GPLv2 headers in some places." 2012-05-04 13:46:26 +00:00
Tim Starling
6a79e09d6f Merge "Various updates needed to bump min php version to 5.3.2" 2012-05-04 12:44:57 +00:00
Tim Starling
4fc7b7aa76 Merge "(bug 29296) Expanded Blacklist for SVG Files" 2012-05-04 07:58:16 +00:00
Alexandre Emsenhuber
63176b99b7 Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: I1deb70318d01a257b51948ba806d80cd1a239f4f
2012-05-04 08:47:07 +02:00
Alexandre Emsenhuber
61388cf0af Use local context to get messages and time formatting methods of Language class
Change-Id: I04d460a63f40e13e7f84cb168a9001516b1215fa
2012-05-04 07:53:55 +02:00
Werdna
a97f5a1134 Merge "(bug 18195) Allow changing preferences via API" 2012-05-04 05:53:06 +00:00
Aaron Schulz
247953c7ad Merge "(bug 5445) remove autoblocks when user is unblocked" 2012-05-04 00:12:16 +00:00
Aaron
30befebf5d [FileRepo] Various ForeignApiRepo fixes.
* Avoid using FileRepo functions to stat cache files as we override/hack
  fileExistsBatch(). Instead, use the FileBackend object directly.
* Adding missing prepare() call to unbreak thumbnail cache.
* Added a warning and sanity check for mwstore:// paths rather than appending them
  to URLs and shipping them off to Commons. This seem to be mostly gone now though.
* Removed useless error suppression calls that were broken due to a "return" statement.

Change-Id: Ie760f09e6bfa1752544cdb60018513ffc7823496
2012-05-03 14:04:12 -07:00
Alexandre Emsenhuber
31003d22ea Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: I26a320bcddd4122ce423f536609d5794446d743e
2012-05-03 22:22:45 +02:00
Aaron Schulz
240ac2341e Merge "ImagePage refactoring" 2012-05-03 19:13:53 +00:00
Aaron Schulz
73737df4a4 Merge "Noticed while looking at $wgShowUpdatedMarker related database queries, queries not using index order at all. Fixed up" 2012-05-03 18:25:18 +00:00
Aaron Schulz
3ae2e2b4ce Merge "Done a bit of deglobalisation." 2012-05-03 17:43:47 +00:00
Marc A. Pelletier
7694faf68f (bug 5445) remove autoblocks when user is unblocked
Previously, whenever we blocked a user, its IP address would be
autoblocked whenever he tries to edit a page. Thus when later unblocking
the username, he would be automatically blocked again if we forgot to
clean up is IP.

This patch introduces a the ipb_parent_block_id column in ipblocks table
to track which block triggered the autoblock command. Thus, when deleting
the original block we can easily remove all subsequentautoblocks.

Schema updaters for MySQL, SQLite and postgres have been added to the
patch but not for the other database types such as ibm_db2, mssql and
Oracle.

Change-Id: I4aa820ae9bbd962a12d0b48b6c638a1b6ff4efc9
2012-05-03 12:07:30 +02:00
Reedy
6098ed55dd Merge "Ported r112366 from 1.19wmf branch indefinitely." 2012-05-02 17:12:03 +00:00
jeroendedauw
c4e407cf6c add type check and bail out when title could not be created
Change-Id: I5d931892d8f8f70a3dc13d0ed73413de47d43f53
2012-05-02 17:04:55 +02:00
Petr Onderka
4f17f49b78 Fixed whitespace in API classes
Change-Id: Ia06de4822e32612c4f668e14643236322837a3e1
2012-05-02 15:48:02 +02:00
Amir E. Aharoni
6564620d2a (bug 33928) make diff title page more relevant
Original patch by Nischay Nahata.

Patchset2: amended commit message to be shorter and clearer.
Patchset3: use wfMessage()->text() instead of default parse()
Patchset4: remove unneeded tabs.
Patchset5: added git difference-title to maintenance/language/messages.inc .
Patchset6: moved OutputPage::setPageTitle() calls to DifferenceEngine and added difference-title-multipage message
Patchset7: Fixed an error in messages.inc from the last changeset
Patchset8: Removed the diff page subtitle according to Brion's
           suggestions. Note: I am doing this almost a month since
           committing the original patch. Rebasing proved to be too
           tricky, so I tried to cherry-pick the original commit
           in a new branch. Apparently, Git identified it. If this
           works as planned, it must be a miracle.
Patchset9: removes unneeded changes to message files

Change-Id: I4e6363529a1e77a3f5267ec6871e8dea0354f043
2012-05-02 14:05:13 +02:00
Alexandre Emsenhuber
5e7c414018 Pass the result of the database queries in Title::getPreviousRevisionID() and Title::getNextRevisionID() into intval().
No idea why mysql_fetch_object() returns string when the field in defined as integer, but it is so on my machine...

Change-Id: I353c6087d20d7a72d6d4b39bdc477b094bc460f6
2012-05-02 10:52:51 +02:00
Alexandre Emsenhuber
d7f3f6be14 Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: Ib21f42166ae0841e04c8af4fdcf59c0fa06f1738
2012-05-02 10:51:15 +02:00
RobLa
576542a314 (bug 36361) Fix git links in Special:Version - removing extra space
Change-Id: I731e163e5f329b78402ed3c6307547c847264587
2012-05-01 22:07:35 -07:00
Aaron Schulz
54615b5ea1 Ported r112366 from 1.19wmf branch indefinitely.
Change-Id: I6e326d7729b26bdc7a02f19a475d2e6033ffbfc3
2012-05-01 19:50:09 -07:00
umherirrender
e0ded894d9 (bug 30488) API now allows listing of backlinks/embeddedin/imageusage
per pageid

Move the possibles errors set by ApiBase::getTitleOrPageId to
ApiBase::getTitleOrPageIdErrorMessages and remove it from used modules

Change-Id: If037e04665d2524c1f2476bc7996d9573753a4b8
2012-05-02 01:35:04 +01:00
Aaron Schulz
1043c7abcb Merge "(bug 30975) API import of pages with invalid characters in this wiki leads to Fatal Error" 2012-05-01 22:24:42 +00:00
Aaron Schulz
2c69f8590e Merge "Few documentation/type hint updates" 2012-05-01 22:23:14 +00:00
Aaron Schulz
4f869aaa87 Merge "(bug 31704) Allow selection of associated namespace on the watchlist" 2012-05-01 22:22:09 +00:00
Petr Onderka
ca7eb5c409 Removed intval for undelete reason in API
Undelete reason is a string, it doesn't make sense to use
intval() to change it into an integer.

Change-Id: I76553d6a22305dca8cdc5d676ad60a9b146a0212
2012-05-02 00:04:11 +02:00
Reedy
5813680952 Few documentation/type hint updates
Change-Id: Ib2882cc03540403f74f68854fa76df375c1bb25a
2012-05-01 22:03:50 +01:00