jenkins-bot [Fri, 17 Apr 2015 19:49:44 +0000 (19:49 +0000)]
Merge "Made showJobs.php show claimed jobs too"
Aaron Schulz [Fri, 17 Apr 2015 18:08:26 +0000 (11:08 -0700)]
Made showJobs.php show claimed jobs too
Change-Id: Ifc5eeff10fdcdbbe4ade7b32e5388fee4eb94bcf
jenkins-bot [Fri, 17 Apr 2015 18:45:06 +0000 (18:45 +0000)]
Merge "Always set duration/flags of type block for new api logparam style"
jenkins-bot [Fri, 17 Apr 2015 18:33:15 +0000 (18:33 +0000)]
Merge "Fix old log params of log type rights for new api logparam style"
umherirrender [Fri, 17 Apr 2015 16:24:50 +0000 (18:24 +0200)]
Fix old log params of log type rights for new api logparam style
The log param of right changes can also just be a string. The new api
logparam style does not recognize this and shows an error:
Argument 1 passed to ApiResult::setIndexedTagName() must be an instance of array, string given
Centralize the code in a new helper function and use it also for the gui
part.
Follow-Up: I6846ce09322eb404c506b5a51780a44ce9279fe2
Change-Id: I4762743b3f43e6ebd806d3ae516507ae66478e96
jenkins-bot [Fri, 17 Apr 2015 17:58:01 +0000 (17:58 +0000)]
Merge "Always set suppressredirect of type move for new api logparam style"
umherirrender [Fri, 17 Apr 2015 16:49:50 +0000 (18:49 +0200)]
Always set duration/flags of type block for new api logparam style
Old and very old log params may omit a duration or flags. Always adds
these parameters to the output.
Also simplify the infinity check (see also
I5eb68c1fb6029da8289276ecf7c81330575029ef) and check the return of
strtotime.
Bug: T92902
Follow-Up: I6846ce09322eb404c506b5a51780a44ce9279fe2
Change-Id: I9109a27f416b002e5c562a1454d8c373dcf98fb4
Aaron Schulz [Fri, 17 Apr 2015 17:19:37 +0000 (10:19 -0700)]
Fixed stat calls in checkImages
Bug: T64148
Change-Id: Ibfafb7dd76248855b75edee6c7ecaa87108d17ba
umherirrender [Fri, 17 Apr 2015 16:30:10 +0000 (18:30 +0200)]
Always set suppressredirect of type move for new api logparam style
Old log params for moves may omit the suppressredirect indicator, just
add it as false when missing.
This has no visible change for the old json or xml format, but it will
be useful, when using the new json format, which also output bool=false
Follow-Up: I6846ce09322eb404c506b5a51780a44ce9279fe2
Change-Id: I74981bf064a0b94707b5cc7ff7e5bb8fcdfe2123
jenkins-bot [Fri, 17 Apr 2015 05:36:10 +0000 (05:36 +0000)]
Merge "Made wfWaitForSlaves check all master connections for writes"
Aaron Schulz [Fri, 17 Apr 2015 05:15:46 +0000 (22:15 -0700)]
Made wfWaitForSlaves check all master connections for writes
* Previously it just checked the main connection
Change-Id: If63498e4fa2800f8ffbde4c570c556f21b554473
Brad Jorsch [Sun, 10 Aug 2014 10:25:29 +0000 (11:25 +0100)]
API: Move parameter formatting into LogFormatter
This allows for extensions to format their log entry parameters, and
keeps the code for formatting API log entry parameters in the same place
as for other formatting.
This also takes the opportunity to rearrange the output format slightly
to avoid conflicts like what's happening in T73020.
Bug: T35235
Bug: T73020
Bug: T91466
Change-Id: I6846ce09322eb404c506b5a51780a44ce9279fe2
jenkins-bot [Fri, 17 Apr 2015 01:26:47 +0000 (01:26 +0000)]
Merge "Avoid (s) for unknown plural in a message"
jenkins-bot [Fri, 17 Apr 2015 01:24:05 +0000 (01:24 +0000)]
Merge "Show correct counts in category-info on action=info"
jenkins-bot [Thu, 16 Apr 2015 23:54:59 +0000 (23:54 +0000)]
Merge "API: Update ApiTag, fix error handling"
Brad Jorsch [Thu, 26 Mar 2015 19:34:55 +0000 (15:34 -0400)]
API: Document parameter types
Two things here:
* Identify the parameter types when they're not simple strings (or
already identified).
* Add a section to the 'main' module documentation that describes
booleans and timestamp formats.
Bug: T93982
Bug: T47652
Change-Id: I67da4f4c026616eed5669256b208b03350e756c0
jenkins-bot [Thu, 16 Apr 2015 23:24:20 +0000 (23:24 +0000)]
Merge "Remove $wgRUstart, unused"
jenkins-bot [Thu, 16 Apr 2015 22:45:05 +0000 (22:45 +0000)]
Merge "Introduce PageHistoryPager::doBatchLookups hook."
Chad Horohoe [Thu, 16 Apr 2015 22:28:37 +0000 (15:28 -0700)]
Remove $wgRUstart, unused
Change-Id: Ia57f8fb2da4eed6b185ea0592d521e3119411f0e
Translation updater bot [Thu, 16 Apr 2015 19:08:17 +0000 (21:08 +0200)]
Localisation updates from https://translatewiki.net.
Change-Id: I367d10127998ae26a5627f849d1711065330b5f5
umherirrender [Thu, 16 Apr 2015 18:26:27 +0000 (20:26 +0200)]
Show correct counts in category-info on action=info
The number of pages was always the total count of all members of that
category, not just pages. Correct that and also show the total count.
Change-Id: I246d92b35d508e10fd93f9c7209db11a6e0eeb7a
jenkins-bot [Thu, 16 Apr 2015 18:07:34 +0000 (18:07 +0000)]
Merge "Made saveSettings() CAS check handle caught DB exceptions better"
Aaron Schulz [Thu, 16 Apr 2015 17:54:26 +0000 (10:54 -0700)]
Made saveSettings() CAS check handle caught DB exceptions better
Change-Id: I8e9e75af437e00a76e4184908c579a6702c9023a
Aaron Schulz [Thu, 16 Apr 2015 17:40:04 +0000 (10:40 -0700)]
Moved ChangeTags to /changetags
Change-Id: I55a8f00d3aa2717d0bf6480ab1a694f29b429de0
jenkins-bot [Thu, 16 Apr 2015 16:40:02 +0000 (16:40 +0000)]
Merge "Try to reduce stale cache updates in User::saveSettings()"
jenkins-bot [Thu, 16 Apr 2015 16:39:58 +0000 (16:39 +0000)]
Merge "Moved MessageBlobStore to /cache"
jenkins-bot [Thu, 16 Apr 2015 16:17:52 +0000 (16:17 +0000)]
Merge "Fix variable name and use isset() to shut up a stupid notice"
daniel [Thu, 16 Apr 2015 15:10:43 +0000 (17:10 +0200)]
Introduce PageHistoryPager::doBatchLookups hook.
The intention of the new hook is to allow extensions to prefetch
any information that may be needed for displaying history rows.
In particular, this is needed by Wikibase to allow us to inject
localized entity labels into the edit summaries.
Bug: T95672
Change-Id: Ie10ef99154da35713a4f583e2de2162fba28eef2
Brad Jorsch [Thu, 16 Apr 2015 14:37:13 +0000 (10:37 -0400)]
API: Update ApiTag, fix error handling
Change I7b37295e didn't get rebased to take into account the new ApiTag
module added the same day. So update it now.
Also fix some errors in error handling noticed while testing this
update.
Bug: T96251
Bug: T96252
Change-Id: If8b63af91547e117b9d7d88e2ec9739131ee09b7
Amir E. Aharoni [Thu, 16 Apr 2015 12:27:18 +0000 (15:27 +0300)]
Avoid (s) for unknown plural in a message
Similar to I365d6279310cb2455e078de5677bf7fffa54d60d
Change-Id: If251f1dd46340d7f3b22621f41f890d28e8aae91
jenkins-bot [Thu, 16 Apr 2015 12:21:29 +0000 (12:21 +0000)]
Merge "Avoid (s) for unknown plural in a message"
jenkins-bot [Thu, 16 Apr 2015 10:25:24 +0000 (10:25 +0000)]
Merge "Fix warning, add new special page to MessagesEn.php"
jenkins-bot [Thu, 16 Apr 2015 09:04:26 +0000 (09:04 +0000)]
Merge "Add $linkTrail for Western Baluchi (bgn)"
raymond [Thu, 16 Apr 2015 07:29:15 +0000 (09:29 +0200)]
Fix warning, add new special page to MessagesEn.php
Followup I7d3ef927b5686f6211bc5817776286ead19d916b
Change-Id: I50fa932f2868c38216745b4f9a403b820cc372a5
jenkins-bot [Thu, 16 Apr 2015 04:12:42 +0000 (04:12 +0000)]
Merge "mediawiki.jqueryMsg: Abort test if a language request fails"
Aaron Schulz [Thu, 16 Apr 2015 03:47:02 +0000 (03:47 +0000)]
Merge "Use vslow in tagUsageStatistics"
Aaron Schulz [Thu, 16 Apr 2015 03:36:03 +0000 (20:36 -0700)]
Moved MessageBlobStore to /cache
Change-Id: Ib628cc2f5d9079f4538561d585725fd79876d6f2
Aaron Schulz [Thu, 16 Apr 2015 03:34:51 +0000 (20:34 -0700)]
Try to reduce stale cache updates in User::saveSettings()
Bug: T95839
Change-Id: I4dc87697448b833ea575cbb3e05c92c7160d03f9
jenkins-bot [Thu, 16 Apr 2015 03:30:44 +0000 (03:30 +0000)]
Merge "backupTextPassTest: Disable testCheckpointGzip test"
Timo Tijhof [Thu, 16 Apr 2015 03:04:07 +0000 (04:04 +0100)]
backupTextPassTest: Disable testCheckpointGzip test
Follows-up
3d4c0e93,
73c6f525.
Bug: T70653
Change-Id: I2fbb3e8a2ba14751dfc8942d6d1a379faa9c48bf
Aaron Schulz [Thu, 16 Apr 2015 03:01:21 +0000 (20:01 -0700)]
Use vslow in tagUsageStatistics
Change-Id: If3e76b1ba560eac6e4073f12c9dfa5becb75b6e0
Kunal Mehta [Thu, 16 Apr 2015 02:56:36 +0000 (19:56 -0700)]
The 'spambot_username' message is a reserved username
It is used by cleanupSpam.php
Change-Id: I34d9bba7bf33d363bdce410c24a21dacd84771b5
Timo Tijhof [Thu, 16 Apr 2015 00:28:28 +0000 (01:28 +0100)]
mediawiki.jqueryMsg: Abort test if a language request fails
Follows-up
365b6f3.
If one of the requests fails, stop the test. This avoids one test
from leaking into the next test if it times out. And also makes
the error in question easier to handle. Most subsequent errors
tend to be cascading failures from earlier ones in this case.
It will still run other qunit tests within this module and other modules,
it only aborts the subtest for "Match PHP parser" in mediawiki.jqueryMsg.
To test:
* Change getMwLanguage() and append a bogus string to the request url,
e.g. 'load.fail.php'.
* It will fail as expected with 'Language "en" failed to load.' and QUnit
reports that it expected 49 more assertions, and moves on to the next test.
Change-Id: Id77bf43ef0b7a031db2fdb1d6c1bb8b2c64e689c
jenkins-bot [Thu, 16 Apr 2015 01:37:10 +0000 (01:37 +0000)]
Merge "ChangeTags: Hide tags whose description messages are disabled"
jenkins-bot [Thu, 16 Apr 2015 01:36:24 +0000 (01:36 +0000)]
Merge "Tweaked CAS log message for User::saveSettings"
Ori Livneh [Sun, 9 Nov 2014 03:13:05 +0000 (19:13 -0800)]
ChangeTags: Hide tags whose description messages are disabled
If an interface message describing the given tag exists, check if it has been
disabled. If so, take that as an indication that the tag should not be
displayed.
This amounts to an adequate (if somewhat low-level) interface for managing
which edit tags are shown in change list views like Special:RecentChanges and
Special:Contributions.
This patch is based on a suggestion made by jackmcbarn in a review comment on
commit
494989772cf. I did it in a separate change because I'd be interested in
hiding the HHVM tag even if we end up deciding against a generic mechanism for
hiding tags.
Change-Id: I515cf2118ab929da985d6b40481325640e800dcd
jenkins-bot [Thu, 16 Apr 2015 01:05:51 +0000 (01:05 +0000)]
Merge "API: Overhaul ApiResult, make format=xml not throw, and add json formatversion"
Aaron Schulz [Thu, 16 Apr 2015 00:58:48 +0000 (17:58 -0700)]
Tweaked CAS log message for User::saveSettings
Change-Id: I82376561b3c7c15da6fe6374db0245caa5d79ce8
Timo Tijhof [Thu, 16 Apr 2015 00:19:09 +0000 (01:19 +0100)]
qunit: Abort unfinished AJAX requests in test teardown
Similar to what we do with animations already, ensure we give
the next test a clean start by aborting any requests that were
made during the test that are still pending.
Also log the details of the request (ajax options, e.g. url) to
the console.
To test:
* Add "sleep( 1 );" to LocalSettings.php.
* add "$.ajax( mw.util.wikiScript() )" to a test in mediawiki.util.test.js.
* Run Special:JavaScriptTest/qunit/plain?module=mediawiki.util
Change-Id: Iefef89effc092d296baa9df68a86d95497730708
jenkins-bot [Wed, 15 Apr 2015 22:17:26 +0000 (22:17 +0000)]
Merge "ChangeTags was backported to 1.25"
jenkins-bot [Wed, 15 Apr 2015 21:53:58 +0000 (21:53 +0000)]
Merge "ResourceLoaderImageModule: Implement cache invalidation"
Amir E. Aharoni [Wed, 15 Apr 2015 21:37:04 +0000 (00:37 +0300)]
Avoid (s) for unknown plural in a message
Change-Id: I365d6279310cb2455e078de5677bf7fffa54d60d
Brad Jorsch [Wed, 15 Apr 2015 21:30:19 +0000 (17:30 -0400)]
ChangeTags was backported to 1.25
So change the relevant references to 1.26.
Change-Id: I351de6a77747e3152052a448b8b6d2f25699e1d0
Translation updater bot [Wed, 15 Apr 2015 21:14:20 +0000 (21:14 +0000)]
Merge "Localisation updates from https://translatewiki.net."
Translation updater bot [Wed, 15 Apr 2015 21:07:52 +0000 (23:07 +0200)]
Localisation updates from https://translatewiki.net.
Change-Id: I655e14be267853043341809918d583003366bd7b
Chad Horohoe [Wed, 15 Apr 2015 21:00:45 +0000 (21:00 +0000)]
Merge "Remove MW_SPECIALPAGE_VERSION. Unused anywhere."
Brad Jorsch [Wed, 15 Apr 2015 18:35:07 +0000 (14:35 -0400)]
RELEASE-NOTES for change tagging changes
See I37275e0f and I7d3ef92.
Change-Id: I4ed12a2551241f3224d9994b66e3f1675c51d236
This, that and the other [Wed, 15 Apr 2015 01:31:53 +0000 (11:31 +1000)]
UI for adding and removing change tags on revisions and log entries
There is a new special page, Special:EditTags, which is very similar to
Special:RevisionDelete in a lot of ways. In fact, the SpecialEditTags class
started off as a copy-paste of SpecialRevisiondelete.
You invoke this special page by going to an article history page, checking
some revisions, and clicking "Edit tags of selected revisions". Then you
pick the modifications you want to make and click "Apply". Very much like
the revision deletion workflow.
I had to restructure some of the Action routing code, which was only
designed to handle revision deletion. Also removing some code from
SpecialRevisiondelete which didn't work as advertised in the first place,
and definitely doesn't work now.
Change-Id: I7d3ef927b5686f6211bc5817776286ead19d916b
This, that and the other [Wed, 15 Apr 2015 01:33:08 +0000 (11:33 +1000)]
Allow users to add, remove and apply change tags using the API
You can add tags at the same time as performing action=edit, as long as you
have the "applychangetags" right. Also, you can add or remove tags after
the fact from revisions and log entries using the API action=tags.
No UI is provided for either of these changes. The target audience is user
scripts, gadgets and similar tools.
Includes a new log parameter format type: "list", for a comma-separated
list of values.
Logging of change tag events is limited to those that do not accompany an
edit (i.e. those done after the fact), and is hidden from Special:Log by
default, similar to the patrol log.
Bug: T20670
Change-Id: I37275e0f73fa3127f55da0c320b892551b61ee80
jenkins-bot [Wed, 15 Apr 2015 16:51:38 +0000 (16:51 +0000)]
Merge "Add namespace aliases for Luri (lrc)"
Chad Horohoe [Wed, 15 Apr 2015 16:25:00 +0000 (09:25 -0700)]
Remove MW_SPECIALPAGE_VERSION. Unused anywhere.
If we needed such a constant nowadays we'd probably
stick it on SpecialPage itself rather than a global
define.
Change-Id: I8a62c4af3f6185ddd651cbf0ff86ecf39ca44123
Aaron Schulz [Wed, 15 Apr 2015 15:09:24 +0000 (15:09 +0000)]
Merge "Moved $wgShowUpdatedMarker checks to the right place"
Jack Phoenix [Wed, 15 Apr 2015 13:05:53 +0000 (16:05 +0300)]
Fix variable name and use isset() to shut up a stupid notice
We've had to reapply this small core hack on ShoutWiki basically after
each core upgrade since MW 1.23 (at least).
ShoutWiki SVN r2565, r2819
Change-Id: I815efe0a3c66b145a2c429549cf139ed3c67d175
Nikerabbit [Wed, 15 Apr 2015 11:37:40 +0000 (11:37 +0000)]
Merge "Remove zh-tw message "editing""
jenkins-bot [Wed, 15 Apr 2015 08:42:36 +0000 (08:42 +0000)]
Merge "Message::inLanguage() shouldn't unstub StubUserLang"
Aaron Schulz [Wed, 15 Apr 2015 03:02:29 +0000 (03:02 +0000)]
Merge "Avoid deadlocks in User::incEditCount"
Aaron Schulz [Wed, 15 Apr 2015 01:56:39 +0000 (18:56 -0700)]
Moved $wgShowUpdatedMarker checks to the right place
Change-Id: Icee2ec24aac5fe78f7204aabf434640251791cae
Aaron Schulz [Wed, 15 Apr 2015 01:06:04 +0000 (18:06 -0700)]
Removed some code duplication in Title::getNotificationTimestamp
Change-Id: I02114258448c1dec894e51c2d4c84cb2517eccb7
jenkins-bot [Wed, 15 Apr 2015 00:50:31 +0000 (00:50 +0000)]
Merge "Avoid page_restrictions field queries for templates on edit form"
jenkins-bot [Wed, 15 Apr 2015 00:41:05 +0000 (00:41 +0000)]
Merge "Reduce outages due to master DB problems in doViewUpdates"
jenkins-bot [Tue, 14 Apr 2015 22:19:50 +0000 (22:19 +0000)]
Merge "mediawiki.loader: Remove optional params in mw.loader.implement tests"
jenkins-bot [Tue, 14 Apr 2015 22:00:11 +0000 (22:00 +0000)]
Merge "Don't bother buffering a counter update with a delta of zero."
jenkins-bot [Tue, 14 Apr 2015 21:46:31 +0000 (21:46 +0000)]
Merge "Displaying protection expiry date and time in action=info"
Ori Livneh [Tue, 14 Apr 2015 18:51:26 +0000 (11:51 -0700)]
Don't bother buffering a counter update with a delta of zero.
Counter updates with a delta of zero don't do anything, so there's no point in
sending them over the wire.
Change-Id: Iae82ee9c9a8544c94abfcbdf944bd713687dce9d
Alex Monk [Tue, 14 Apr 2015 19:50:12 +0000 (20:50 +0100)]
Fix link to Special:RevisionDelete in newer log revdel logs
Bug: T96049
Change-Id: I6817ac13e776a3e6fa766c3996173b5da02f54de
Follows-up: Ic149960f797d05fd088fa014390d791e3ae08687
Translation updater bot [Tue, 14 Apr 2015 19:40:40 +0000 (21:40 +0200)]
Localisation updates from https://translatewiki.net.
Change-Id: I29bea8f29d49d43dc501daf22ba6d572be7901b0
Bartosz Dziewoński [Tue, 14 Apr 2015 19:31:19 +0000 (21:31 +0200)]
ResourceLoaderImageModule: Implement cache invalidation
Bug: T94733
Change-Id: I6ac2ef8d897813e560daa133b89a7932f8c1a362
jenkins-bot [Tue, 14 Apr 2015 18:57:16 +0000 (18:57 +0000)]
Merge "Clean up handling of 'infinity'"
Mark Holmquist [Tue, 14 Apr 2015 18:23:20 +0000 (11:23 -0700)]
UploadForm: Don't set a null context
Breaking Special:Specialpages on master now.
Bug: T96057
Change-Id: Ieb21b4d07af2dc8ea18016568c98b78e390ac2d5
Aaron Schulz [Mon, 13 Apr 2015 23:50:34 +0000 (16:50 -0700)]
Reduce outages due to master DB problems in doViewUpdates
Change-Id: Ie28e8dcfc3bc402b3119d9cf43612acab2af1004
jenkins-bot [Tue, 14 Apr 2015 15:09:59 +0000 (15:09 +0000)]
Merge "Handle missing returnto on Special:ChangePassword/ConfirmEmail"
Aaron Schulz [Mon, 13 Apr 2015 23:02:16 +0000 (16:02 -0700)]
Avoid deadlocks in User::incEditCount
* This makes concurrent editing less problematic
Change-Id: I930222d5e831bb3729194abbdcb3cab194c70494
jenkins-bot [Tue, 14 Apr 2015 03:56:20 +0000 (03:56 +0000)]
Merge "API: Add license info to API help output"
Aaron Schulz [Tue, 14 Apr 2015 00:34:58 +0000 (00:34 +0000)]
Merge "Avoid edit stash log spam for bots"
Aaron Schulz [Sat, 11 Apr 2015 19:34:48 +0000 (12:34 -0700)]
Avoid page_restrictions field queries for templates on edit form
* Title::newFromRow() will actually load page_restrictions, which
should normally be empty. This avoids queries in getRestrictions().
Those queries could add 100-200ms to edit form views.
* getLinksFrom() has been simplified to use newFromRow(), thus
loading the old restrictions in passing.
Change-Id: I225955589a82e4accbf059d17390a5e28e2fa1ca
Aaron Schulz [Mon, 13 Apr 2015 23:01:53 +0000 (23:01 +0000)]
Merge "Made WatchedItem use Revision::getTimestampFromId"
Aaron Schulz [Mon, 13 Apr 2015 22:32:32 +0000 (22:32 +0000)]
Merge "Avoid using local main page title in JobSpecification"
jenkins-bot [Mon, 13 Apr 2015 22:16:11 +0000 (22:16 +0000)]
Merge "Made job factory() callers use Title::makeTitle"
jenkins-bot [Mon, 13 Apr 2015 22:08:44 +0000 (22:08 +0000)]
Merge "wikibits: Mark importScript/importStylesheet utilities as deprecated"
Aaron Schulz [Mon, 13 Apr 2015 21:50:40 +0000 (14:50 -0700)]
Avoid using local main page title in JobSpecification
* They may not work well on the wiki that runs the jobs
Bug: T92789
Change-Id: I496974b11bd865ede9dd6d2cd534e0abdd7fa3f7
Aaron Schulz [Mon, 13 Apr 2015 19:18:31 +0000 (12:18 -0700)]
Made WatchedItem use Revision::getTimestampFromId
Change-Id: I3a895a69e8f4678b82a4e50f70d6bfc4df932d74
Aaron Schulz [Mon, 13 Apr 2015 21:21:30 +0000 (14:21 -0700)]
Made job factory() callers use Title::makeTitle
* The titles are not from user input and this simplifies the code
Change-Id: I067049cca5661b387076f0c28bc0b71d22162a0f
Translation updater bot [Mon, 13 Apr 2015 20:10:07 +0000 (22:10 +0200)]
Localisation updates from https://translatewiki.net.
Change-Id: I0ed09090cdcf12ced0fe66f47045795f97a11b0b
umherirrender [Mon, 13 Apr 2015 19:31:49 +0000 (21:31 +0200)]
Handle missing returnto on Special:ChangePassword/ConfirmEmail
A missing returnto results in a null passed to Title::newFromText which
gives a warning:
Notice: Title::newFromText: $text must be a string. This will throw an
InvalidArgumentException in future
Follow-Up: I2b36b7a3b96b37e29fe06f69c13a185b3ec592a7
Change-Id: I95e6023a2630cbae69f25d63611ebafb8b2bd74c
Timo Tijhof [Sat, 11 Apr 2015 12:57:55 +0000 (13:57 +0100)]
specials: Clean up redirect special pages ($subpage can be null)
$subpage being null is clearly documented in SpecialPage::run,
SpecialPage::execute, and most special page subclasses.
But all the redirect subclasses only copied part of the typehint,
making it look like it's always a string.
For SpecialMyLanguage, follows-up
b1853bba0. Don't cast null to
empty string, and don't bother giving Title::newFromText an empty
string only to bail out with null again.
Also:
* Add visibility 'public' where missing.
* Add or correct relevant documentation comments.
* In SpecialMyRedirectPages, handle error first and avoid having
final return inside a conditional; Remove redunant 'else'.
Change-Id: Ie3543f44011832b198bb3d3e32528b6a2868dee1
Schnark [Sat, 11 Apr 2015 08:07:54 +0000 (08:07 +0000)]
wikibits: Mark importScript/importStylesheet utilities as deprecated
The global variable loadedScripts and the import functions from wikibits.js
have been deprecated since 1.17 [1].
The global loadedScripts is used to keep track which scripts have
been loaded through importScriptURI. To do this, it only needs to be
a local variable, not a global.
For scripts using the global to check whether a particular script
has been loaded, here are some possible substitutes:
* Use mw.loader.getState() for scripts loaded through ResourceLoader
(which includes Gadgets).
* Use hooks (mw.hook) to communicate between the scripts.
* Use $( 'script[src="..."]' ).length to check whether a script with
a specific URL has been loaded.
* Use $( 'script[src]' ) for a list of all scripts (excluding inline
scripts), and filter it for whatever you are looking for.
The functions importScriptURI and importStylesheetURI are used to
load scripts and stylesheets resp. from a URI. Use mw.loader.load() instead.
Note that there are minor differences between the deprecated functions
and mw.loader.load(), see [1] for details.
The importScript and importStylesheet shortcuts have been deprecated as well.
[1] https://www.mediawiki.org/wiki/RL/LJS#wikibits.js
Change-Id: Icc87243a8213841bfe46e48a9c074301c241041c
jenkins-bot [Mon, 13 Apr 2015 16:49:36 +0000 (16:49 +0000)]
Merge "Change Language::timeanddate to userTimeAndDate in RevisionList"
Brad Jorsch [Mon, 13 Apr 2015 15:40:30 +0000 (11:40 -0400)]
Message::inLanguage() shouldn't unstub StubUserLang
When a string is passed to Message::inLanguage(), it first checks
whether the message's current language's code is equal to the string, to
avoid a call to Language::factory(). But if the message's current
language is an instance of StubUserLang, it's probably less expensive to
just call Language::factory() than it is to unstub.
This also avoids a possible recursion warning from T56193, particularly
if inLanguage() is being used intentionally in an attempt to avoid that
warning.
Change-Id: Ia09adec05cfbb09c09e07c6be1e2d613435664d9
Tony Thomas [Mon, 13 Apr 2015 04:43:36 +0000 (10:13 +0530)]
Corrected typos in function name unpackMetaData and getMetaData
Bug: T95873
Change-Id: I71dffaaed24c983ce07bc02f806294337ca086e2
Liangent [Mon, 13 Apr 2015 03:47:17 +0000 (03:47 +0000)]
Remove zh-tw message "editing"
The current string is incorrect (written in zh-hans); removing it to
let it fall back to zh-hant. Since zh-tw exporting has been disabled
on translatewiki.net, it's not possible to fix it there. Maybe a full
cleanup is needed for zh-(cn|hk|mo|my|sg|tw).json at some time.
Change-Id: I3cc7bbb2065ecae535986525367d26dfc82c49b1