Brad Jorsch [Thu, 19 Nov 2015 20:57:12 +0000 (15:57 -0500)]
API: Allow querying central user info
meta=siteinfo gets a list of all configured central ID lookup providers
and which one is being used as the default, while meta=userinfo,
list=users, and list=allusers get the ability to return the IDs and
attachment status.
Change-Id: Iea15b6c22baac79b3f8ca6df0e20a6a4299507d2
jenkins-bot [Wed, 2 Dec 2015 22:27:34 +0000 (22:27 +0000)]
Merge "objectcache: Move WANObjectCache holdoff from get() to purge value"
Brad Jorsch [Thu, 12 Nov 2015 23:21:19 +0000 (18:21 -0500)]
Add a central ID lookup service
Anything that wants to be "central" right now has to depend on
CentralAuth, and then either can't work without CentralAuth or has to
branch all over the place based on whether CentralAuth is present. Most
of the time all it really needs is a mapping from local users to central
user IDs and back or the ability to query whether the local user is
attached on some other wiki, so let's make an interface for that in
core.
See I52aa0460 for an example implementation (CentralAuth), and Ibd192e29
for an example use (OAuth).
Bug: T111302
Change-Id: I49568358ec35fdfd0b9e53e441adabded5c7b80f
Timo Tijhof [Wed, 2 Dec 2015 15:08:42 +0000 (15:08 +0000)]
objectcache: Move WANObjectCache holdoff from get() to purge value
Move the holdoff period into the purge value instead of deciding
it at runtime. This opens the way for touchCheckKey() to support
a custom $holdoff parameter, which will allow callers to invalidate
keys without a holdoff period. Similar to what we already support
in delete().
Right now the holdoff period is decided at run time.
Change-Id: Id10c036272e92ae4429effc823b75e08fb11a48b
Translation updater bot [Wed, 2 Dec 2015 20:36:35 +0000 (20:36 +0000)]
Merge "Localisation updates from https://translatewiki.net."
Translation updater bot [Wed, 2 Dec 2015 20:33:50 +0000 (21:33 +0100)]
Localisation updates from https://translatewiki.net.
Change-Id: I189c9f774d7322a9aa2cb8b18f6e1d0465576dd5
Elliott Eggleston [Wed, 2 Dec 2015 19:51:30 +0000 (11:51 -0800)]
Fix case for special pages (was breaking tests)
Change I6f44e3e5d97ea917e4a03af47f3795792e4ca122 added some calls
to make special page URLs with the wrong case. This is breaking
tests in extensions, e.g.
https://integration.wikimedia.org/ci/job/mwext-DonationInterface-testextension-zend/2097/consoleFull
Change-Id: Ica66b314088275d43b67e207cedea97a5f1a7350
jenkins-bot [Wed, 2 Dec 2015 18:05:44 +0000 (18:05 +0000)]
Merge "Connect OOjs UI to MediaWiki's localisation system"
Bartosz Dziewoński [Wed, 2 Dec 2015 16:02:56 +0000 (17:02 +0100)]
Connect OOjs UI to MediaWiki's localisation system
Somehow we have forgotten to do this in here, it was only done in
VisualEditor, which is why no one noticed for so long.
Bug: T119984
Change-Id: I9154345119846dcba90c30f81636ea70fd524471
Brad Jorsch [Wed, 2 Dec 2015 14:09:08 +0000 (09:09 -0500)]
API: Add isset() to avoid PHP warning
Bug: T120075
Change-Id: I8e4ac665c262e6f889abba24eb2beb4fd5a76d1b
jenkins-bot [Tue, 1 Dec 2015 22:02:51 +0000 (22:02 +0000)]
Merge "Make HTMLCacheUpdate callers more consistent"
Translation updater bot [Tue, 1 Dec 2015 20:13:10 +0000 (21:13 +0100)]
Localisation updates from https://translatewiki.net.
Change-Id: I2954fbad34ec3c9d2c6537dfa1987eb93f0887fd
This, that and the other [Fri, 6 Nov 2015 23:51:59 +0000 (10:51 +1100)]
Improved personal toolbar for logged-out users
Previously, logged-out users either only saw "Create account" and "Log in"
links in the personal area, or if $wgShowIPinHeader was true, they saw
[icon] 127.0.0.1 Talk for this IP address Create account Log in
where the IP address itself linked to the IP user page.
Now, logged-out users by default see the following:
[icon] Not logged in Talk Contributions Create account Log in
The old $wgShowIPinHeader feature is removed. It is very unfriendly to
show the user's IP address (in red, no less) at the top of every page,
since this will mean nothing to most visitors. Caching means that this
can't even be done reliably, anyway.
Another improvement is that the "talk" and "contributions" links are not
shown if anonymous users don't have the 'edit' right.
Modelled after the loggedOutTalkPage() function at Dutch Wikipedia
<https://nl.wikipedia.org/w/index.php?oldid=
44706954>
Bug: T112724
Change-Id: I6f44e3e5d97ea917e4a03af47f3795792e4ca122
Antoine Musso [Thu, 26 Nov 2015 20:25:03 +0000 (21:25 +0100)]
tests: let us select/exclude ParserTests
The MediaWiki test suite is painfully slow and delays merging of
changes. More than half of the time is spent in
ParserTest_Parser⁄parserTests::testParserTest which is the PHPUnit
wrapping class for the parser tests.
This patch let us extract the parser tests so we can run them
independently. By running them parallely with the rest of the tests,
that will speed up the gate processing time.
Mark the MediaWikiParserTest and NewParserTest class as belonging to the
test group 'ParserTests'. Will let us filter them out via PHPUnit
option --exclude-group
Introduce a new PHPUnit test suite 'parsertests' which loads the
MediaWiki core parser tests wrapper 'MediaWikiParserTest' and the suite
which loads the extensions parser tests (ExtensionsParserTestSuite.php).
This way we can run solely the parser tests with:
cd tests/phpunit
php phpunit.php --testsuite ParserTests
Wikimedia CI can then be configure to run two jobs:
A) php phpunit.php --exclude-group ParserTests
B) php phpunit.php --testsuite ParserTests
Bug: T114314
Change-Id: Ie819bab43163995048c073691c4c5d258f797c02
Derk-Jan Hartman [Sun, 14 Jun 2015 22:13:20 +0000 (00:13 +0200)]
Add a wikipage.diff hook
Bug: T53583
Change-Id: Iba54f26537e0a7ffaaf9465e2f44de2e4367abdb
Aaron Schulz [Tue, 1 Dec 2015 00:55:43 +0000 (16:55 -0800)]
Make HTMLCacheUpdate callers more consistent
A few random callers were calling doUpdate() themselves
instead of using DeferredUpdates
Change-Id: If121e6afab9899dae92f0bf831b0b0c9967deeb5
Adam Roses Wight [Mon, 30 Nov 2015 23:25:21 +0000 (15:25 -0800)]
Fix incorrect annotation
Change-Id: Ia240bda6f8bcee52814e200c6118ed5713ca0ea7
Yuri Astrakhan [Mon, 30 Nov 2015 20:42:09 +0000 (23:42 +0300)]
Minor api doc fix
Change-Id: Ibc432e504aa63f908b5fca93110e2d54f91c5dbd
Translation updater bot [Mon, 30 Nov 2015 20:12:23 +0000 (21:12 +0100)]
Localisation updates from https://translatewiki.net.
Change-Id: Id1033768d26224e8db6f901a636477adfee77ffd
Reedy [Sun, 29 Nov 2015 14:15:34 +0000 (14:15 +0000)]
Remove RELEASE-NOTES-1.26 from master as it is now a release.
Change-Id: I57f39c77286057d29b91dc8e4feda67cbd0ee3ee
jenkins-bot [Mon, 30 Nov 2015 19:17:10 +0000 (19:17 +0000)]
Merge "Do not set autofocus for valid target input on Special:UserRights"
jenkins-bot [Mon, 30 Nov 2015 18:54:50 +0000 (18:54 +0000)]
Merge "Fix packet reduction in SamplingStatsdClient"
umherirrender [Mon, 30 Nov 2015 18:44:26 +0000 (19:44 +0100)]
Do not set autofocus for valid target input on Special:UserRights
When open Special:UserRights with a valid user as target, there is no
need to set the autofocus on the input field. Just set it on blank input
and error input (such as non existing user or ip).
Change-Id: I14b005b83adbbd899d2846c8d71cbfb1a1a25ad7
Edward Chernenko [Sun, 29 Nov 2015 15:46:24 +0000 (18:46 +0300)]
Fix "Undefined property: DiffEngine::$seq" under HHVM in DairikiDiff.php
Bug: T116266
Change-Id: I94ed1ce946b4c3e757405167d6c4530a5863a220
Reedy [Sun, 29 Nov 2015 04:51:33 +0000 (04:51 +0000)]
Fixup MW for HHVM Repo Authorative mode
https://github.com/facebook/hhvm/issues/5834
https://github.com/facebook/hhvm/issues/5833
Change-Id: I138ffa5df874c5660897dc7feab36adef9f32aea
jenkins-bot [Mon, 30 Nov 2015 17:15:31 +0000 (17:15 +0000)]
Merge "mediawiki.ForeignStructuredUpload: Behave correctly when '=' appears in a description"
Bartosz Dziewoński [Thu, 26 Nov 2015 18:36:18 +0000 (19:36 +0100)]
mediawiki.ForeignStructuredUpload: Behave correctly when '=' appears in a description
We can't escape it (and we can't deal with '|'), because users might
expect these to accept wikitext.
Bug: T119691
Change-Id: I10df9ebab408f531812b653b36ed35570311935e
Bartosz Dziewoński [Fri, 27 Nov 2015 01:29:51 +0000 (02:29 +0100)]
SpecialMovepage: Don't change button text when moving over existing page
The button text was being changed from "Move" to "Delete and move". This
is no longer necessary after a confirmation checkbox "Yes, delete the page"
was implemented in
ac563af7e7489e701b6b68756fb7b10ed058d07d (r12433).
Change-Id: Ie8e25ab3d11e75f47f4cf1a4ec96407d3f37b547
Bartosz Dziewoński [Fri, 27 Nov 2015 01:22:56 +0000 (02:22 +0100)]
SpecialMovePage: Display introduction text even after the form was submitted
I see no reason to remove this helpful information just because there's
an error in the form.
Change-Id: I01c6d66231c272d0ef0c671c388c7aa43020b4a3
Translation updater bot [Sun, 29 Nov 2015 23:10:43 +0000 (00:10 +0100)]
Localisation updates from https://translatewiki.net.
Change-Id: Ifb2360c79250472ea49345e50f4525b56b0bb1f5
Glaisher [Thu, 12 Nov 2015 05:15:40 +0000 (10:15 +0500)]
Special:Contribs: autofocus to 'target' if target hasn't been specified or in non-newbies mode
Target field doesn't work in newbies mode so users doesn't need to enter in that field
newbies mode also. This is not a huge issue normally but annoying when you're on a tablet
or mobile where the autofocus makes the screen keyboard be shown when you visit the page.
Bug: T117397
Change-Id: Ic6fd2fb2421325f748fccb2a5432e7713d0dcbb0
Translation updater bot [Sat, 28 Nov 2015 20:26:22 +0000 (21:26 +0100)]
Localisation updates from https://translatewiki.net.
Change-Id: I71391874ae48d2a0d6583001839f7ccedbd03f57
Translation updater bot [Fri, 27 Nov 2015 21:24:30 +0000 (22:24 +0100)]
Localisation updates from https://translatewiki.net.
Change-Id: I862700e5f136550102670d787880ddba92b98b77
addshore [Fri, 27 Nov 2015 19:17:03 +0000 (20:17 +0100)]
Fix packet reduction in SamplingStatsdClient
Doc block has also been changed to show that
this implementation does not follow the defined
interface.
It also says why...
Bug: T116031
Change-Id: If8cca355ae77b751486b40e56a6b3a51b1d7fe0b
addshore [Fri, 27 Nov 2015 18:21:52 +0000 (19:21 +0100)]
Enhance SamplingStatsdClient::sampleData return doc
Change-Id: Idde67e9514fdf736881cb42b6413045f7bc6f3b3
Florian [Sat, 7 Nov 2015 22:56:06 +0000 (23:56 +0100)]
Add mediawiki.api.messages module to easily retrieve a set of messages
Bug: T40280
Change-Id: I6e3fc4beb56c3120702ca291adf6e1521a0bc21f
Bartosz Dziewoński [Thu, 26 Nov 2015 22:17:45 +0000 (23:17 +0100)]
SpecialMovepage: Remove amusing comment about MySQL 4
We haven't supported MySQL 4 since MediaWiki 1.19.
Change-Id: Ice3e62d02ebe94a5a48981039dc455014a5d53f2
Translation updater bot [Thu, 26 Nov 2015 20:38:52 +0000 (21:38 +0100)]
Localisation updates from https://translatewiki.net.
Change-Id: I016ec75a42be034951e8516669c09489054a3d28
Reedy [Mon, 23 Nov 2015 00:37:33 +0000 (00:37 +0000)]
Update liuggio/statsd-php-client to 1.0.18
Depends-On: I81a7d7da30374072c78c51d1a7fe8229cd70d42c
Change-Id: Ibf06b3b97eb6002c1ad2666f38764b44fc716ef3
jenkins-bot [Thu, 26 Nov 2015 00:26:48 +0000 (00:26 +0000)]
Merge "Split out WikiPage 'page' field for EditPage"
Aaron Schulz [Tue, 24 Nov 2015 22:36:36 +0000 (14:36 -0800)]
Split out WikiPage 'page' field for EditPage
* This fixes numerous IDEA warnings
* Also fixed some other warnings by fixing documentation
Change-Id: I2a76ce79c0d04a28a6cd74116dfce4e67435f44a
jenkins-bot [Wed, 25 Nov 2015 22:04:57 +0000 (22:04 +0000)]
Merge "Add comments to EditPage::getBaseRevision()"
Aaron Schulz [Tue, 24 Nov 2015 22:48:56 +0000 (14:48 -0800)]
Add comments to EditPage::getBaseRevision()
Change-Id: Ib0b9e26916f86f00a49c6007ae55896f7421de22
jenkins-bot [Wed, 25 Nov 2015 19:36:12 +0000 (19:36 +0000)]
Merge "Remove MWException use from UIDGenerator"
jenkins-bot [Wed, 25 Nov 2015 17:09:06 +0000 (17:09 +0000)]
Merge "Update ApiBase::PARAM_* comments"
Brad Jorsch [Wed, 25 Nov 2015 16:32:14 +0000 (11:32 -0500)]
Update ApiBase::PARAM_* comments
Put them in a form that doxygen should recognize,[1] and document all the
types recognized for PARAM_TYPE.
Ideally we'd use some @-thing like @var to specify the types instead of
just a weird parenthetical, but looking at existing examples it seems
that putting @var on a class constant will instead make doxygen
completely ignore it.
[1]: See https://doc.wikimedia.org/mediawiki-core/master/php/classApiBase.html
Change-Id: Iccfa1dc9a7a79313ff9acf71934264c115b3fa76
Željko Filipin [Thu, 12 Nov 2015 13:18:39 +0000 (14:18 +0100)]
Added Rakefile
This is needed for our continuous integration.
Bug: T117993
Change-Id: I83d16759597a90ee9a082eb4029fedca7af10a30
James D. Forrester [Wed, 25 Nov 2015 01:22:14 +0000 (17:22 -0800)]
Update OOjs UI to v0.14.0
Release notes:
https://git.wikimedia.org/blob/oojs%2Fui.git/v0.14.0/History.md
Change-Id: Id642023abdae574e32620fc80043631d86bae006
jenkins-bot [Tue, 24 Nov 2015 23:51:43 +0000 (23:51 +0000)]
Merge "Rename wfBaseConvert.php maintenance script"
Aaron Schulz [Tue, 24 Nov 2015 23:42:59 +0000 (15:42 -0800)]
Remove MWException use from UIDGenerator
Change-Id: Ib0ad346c6c8c4f515b388f63840db4a03b99facb
Reedy [Tue, 24 Nov 2015 23:40:00 +0000 (23:40 +0000)]
Last 2 wfBaseConvert to Wikimedia\base_convert
Change-Id: I0b6c1b87114925d17123e35cd5f98b9d05ff62b4
Reedy [Tue, 24 Nov 2015 23:32:49 +0000 (23:32 +0000)]
Rename wfBaseConvert.php maintenance script
Change-Id: I3174ceb040e9029ad8049a3e49c119bfac4aa386
Reedy [Tue, 24 Nov 2015 22:53:58 +0000 (22:53 +0000)]
Mark wfBaseConvert() as deprecated.
Change-Id: I7c258d0844665dea8f93cce3d8dcf617c961c5f9
Reedy [Tue, 24 Nov 2015 22:51:42 +0000 (22:51 +0000)]
Replace wfBaseConvert with Wikimedia\base_convert
Change-Id: Iadab3d018c3559daf79be90edb23d131729bdb68
jenkins-bot [Tue, 24 Nov 2015 22:23:35 +0000 (22:23 +0000)]
Merge "Accessor to get EditPage parent revision ID"
Adam Roses Wight [Sun, 5 Apr 2015 06:53:50 +0000 (23:53 -0700)]
Accessor to get EditPage parent revision ID
Take from either the request parameter, calculated value, or the actual
revision ID of the fetched page content.
This will be used in more places, once we replace time-based conflict
detection with revision-based detection.
Bug: T58849
Change-Id: I29dcb4694cd9fee4622663b4d9787e975cb415ec
Translation updater bot [Tue, 24 Nov 2015 21:34:39 +0000 (22:34 +0100)]
Localisation updates from https://translatewiki.net.
Change-Id: I3d00c03a39dfa25890d894b022a86bb6c7a626fc
jenkins-bot [Tue, 24 Nov 2015 21:21:18 +0000 (21:21 +0000)]
Merge "jquery.accessKeyLabel: Update Opera access keys"
Bartosz Dziewoński [Tue, 24 Nov 2015 20:55:07 +0000 (21:55 +0100)]
jquery.accessKeyLabel: Update Opera access keys
Bug: T119521
Change-Id: Ib2d121af55e890504dd0c643e520a12ab5745836
jenkins-bot [Tue, 24 Nov 2015 20:48:18 +0000 (20:48 +0000)]
Merge "Add unit tests for mw.format()"
Timo Tijhof [Tue, 24 Nov 2015 20:06:52 +0000 (20:06 +0000)]
Add unit tests for mw.format()
Follows-up
ec285f442,
00f6574.
Change-Id: Ic3ff05c0f48bd6101361312af70ca2b2c52ef79a
Timo Tijhof [Fri, 20 Nov 2015 01:14:09 +0000 (01:14 +0000)]
resourceloader: Optimise mw.loader.register()
* Remove redundant 'len' variables. This is a dated micro-optimisation
that is no longer useful and can actually have an adverse effect.
* Remove [.length] assignment. Use native push() instead.
* Remove JSLint-ism of "i += 1" instead of "i++".
* Remove redundant 'delete' operation for local 'unresolved'
object. This falls naturally out of scope. Mutating this object
to save memory probably wastes more cycles than it saves.
Change-Id: Ib3cb40d2fef696078bd64585db9498326f08b2d2
jenkins-bot [Tue, 24 Nov 2015 20:07:50 +0000 (20:07 +0000)]
Merge "Remove redundant escaping for namespace references in documentation"
jenkins-bot [Tue, 24 Nov 2015 20:07:45 +0000 (20:07 +0000)]
Merge "Doxygen: Rewrite mwdoc-filter to fix bug with slashes in comments"
jenkins-bot [Tue, 24 Nov 2015 19:57:19 +0000 (19:57 +0000)]
Merge "StringUtils: Fixup Doxygen warnings"
jenkins-bot [Tue, 24 Nov 2015 19:56:41 +0000 (19:56 +0000)]
Merge "Doxygen: Disable verbose output"
Timo Tijhof [Thu, 19 Nov 2015 21:44:36 +0000 (21:44 +0000)]
resourceloader: Don't create redundant timers in addEmbeddedCSS()
There's is typically two ways one might implement an eventloop-based
timeout buffer in JavaScript.
Note that "tick" refers to an iteration of the eventloop. Each iteration starts
after all other sychronous code has finished in the current script execution.
1. Early-bird
The first call to 'addBuffer' schedules a flush in the next tick.
Any subsequent call (before the next tick) keeps adding to same buffer.
As scheduled, in the next 'tick' all buffered items will be flushed.
The next call to 'addBuffer' will a new cycle again.
Buffered items are flushed within the next tick.
2. Idle delay
Calls to 'addBuffer' always schedule a new flush. One cancels any existing
flush that may've been scheduled. This effectively keeps pushing the flush
to a future tick until a tick does not buffer new items.
Buffered items may remain in buffer for a long time.
For the CSS buffer in ResourceLoader we want the first model. And while the
implementation already behaves like that, it was creating new timers in each
call regardless. This resulted in 10 buffered items creating 10 timers.
The first timer flushes the buffer. And the remaining 9 timers all try to
flush an empty buffer.
Change-Id: I49c64fedb0ad0362e91bb782fecf3cdda7dc61fc
jenkins-bot [Tue, 24 Nov 2015 19:20:07 +0000 (19:20 +0000)]
Merge "Implement HTMLComboboxField"
jenkins-bot [Tue, 24 Nov 2015 19:17:28 +0000 (19:17 +0000)]
Merge "mw.widgets.CategoryCapsuleItemWidget: Explicitly stringify link 'title'"
Bartosz Dziewoński [Tue, 24 Nov 2015 17:58:37 +0000 (18:58 +0100)]
mw.widgets.CategoryCapsuleItemWidget: Explicitly stringify link 'title'
Follow-up to
a9e699553e73868ea5bbc80d9b2481ef6cc26a2f. Explicit is
better than implicit.
Change-Id: Ied1c7204fac015c96a4638fd833dee394171ee02
jenkins-bot [Tue, 24 Nov 2015 18:53:43 +0000 (18:53 +0000)]
Merge "Add script to fix content model of JSON pages"
jenkins-bot [Tue, 24 Nov 2015 18:47:48 +0000 (18:47 +0000)]
Merge "resourceloader: Remove redundant back-compat in mw.loader.addSource()"
Kunal Mehta [Wed, 21 Oct 2015 05:44:33 +0000 (22:44 -0700)]
Add script to fix content model of JSON pages
MediaWiki:Foo.json and User:Foo/bar.json pages now have a default
content model of JSON, but existing pages using those names will be set
to defaults of wikitext.
The content models of those pages are now set to "json", unless it has
invalid syntax, in which case it will be set to "wikitext".
For convenience, the script is automatically run as part of update.php.
Bug: T108663
Change-Id: I1412937ccea8e65dba58580beec79cbf2286ae01
jenkins-bot [Tue, 24 Nov 2015 16:39:50 +0000 (16:39 +0000)]
Merge "Mark ApiQueryBase::getDirectionDescription as deprecated"
jenkins-bot [Tue, 24 Nov 2015 16:39:36 +0000 (16:39 +0000)]
Merge "Fixes for "External libraries" release notes section"
Brad Jorsch [Tue, 24 Nov 2015 15:06:56 +0000 (10:06 -0500)]
Mark ApiQueryBase::getDirectionDescription as deprecated
This should have been marked as deprecated in 1.25 when
ApiBase::getParamDescription was deprecated, since that's its only use,
but it was overlooked at the time.
Change-Id: Ifd67c3e11188adebd3b6218df79a9dde967c4e17
jenkins-bot [Tue, 24 Nov 2015 08:52:12 +0000 (08:52 +0000)]
Merge "Move details of import logs into log params"
Kevin Israel [Wed, 7 Oct 2015 01:52:29 +0000 (21:52 -0400)]
Fixes for "External libraries" release notes section
* Changed the list of libraries to reflect the current states of
resources/lib and composer.json. (I assumed oojs/oojs-ui refers
to the PHP library, not the JS libraries. Also, some JS libraries
may still be missing.)
* Renamed "External libraries" to "External library changes in 1.2X"
and promoted it to heading level 3 for consistency with the other
sections and for a sane TOC within the web installer.
* Made additional minor formatting changes.
Change-Id: I195dd1cf1aca1112945dc630e2bb7d8584bb4bb2
jenkins-bot [Tue, 24 Nov 2015 06:50:13 +0000 (06:50 +0000)]
Merge "Make $.fn.updateTooltipAccessKeys() less expensive"
Aaron Schulz [Tue, 24 Nov 2015 05:41:12 +0000 (21:41 -0800)]
Add 0 hold-off TTL support to WANObjectCache::delete()
This removes the peculiar >= 1 restriction
Change-Id: I255dc6ef9750ad2ed6234e3fcfed9ae22a038748
Ori Livneh [Mon, 23 Nov 2015 21:59:21 +0000 (13:59 -0800)]
Make $.fn.updateTooltipAccessKeys() less expensive
On page.ready on desktop skins, we call $.fn.updateTooltipAccessKeys(), which
updates about 20 elements (depending on the page and skin). Each invocation
parser the 'brackets' message, which ends up being quite expensive. We
previously had some caching to mitigate the cost, but it was removed in
I955ee61f6.
We can re-introduce caching without re-introducing the bug that I955ee61f6
sought to mitigate by making the astCache property unique to each parser
instance, as suggested in T54042#545717, and by ensuring the message function
is cached.
Change-Id: Ia1b42c70d8fc6ce03c8708f03c2b835942c4ead3
Gergő Tisza [Thu, 29 Oct 2015 02:06:37 +0000 (19:06 -0700)]
Disallow associative arguments in ObjectFactory
There is no strong use case for associative "decoration"
of constructor arguments (the documentation benefits
mentioned in I43aa085 are outweighed by the confusion
caused by not failing loudly when someone passes an
associative argument by accident, e.g. by omitting an
array nesting level), so disallow them but make sure
they fail nicely, not with an invalid offset error.
Change-Id: I09e4af85ded6a1497b0db0265d2ee6707f91f5e3
Gergő Tisza [Thu, 29 Oct 2015 02:06:37 +0000 (19:06 -0700)]
Support named arguments in ObjectFactory
Arguments are sometimes given as array( 'foo' => 1, 'bar' => 2 )
which makes the configuration self-documenting.
Change-Id: I43aa085090f1014ba841641867ebf9559d16e76d
Timo Tijhof [Mon, 23 Nov 2015 22:53:38 +0000 (22:53 +0000)]
Remove redundant escaping for namespace references in documentation
Follows-up
b264cee. No longer needed as of
0c9e9cc.
Change-Id: I31745f55885eeec2bb8cf2c9ffe9e98242cd5baa
Timo Tijhof [Mon, 23 Nov 2015 22:38:31 +0000 (22:38 +0000)]
Doxygen: Rewrite mwdoc-filter to fix bug with slashes in comments
The behaviour stays the same (extract type from @var comment and
insert into source code between e.g. "protected" and "$name") but
implemented using PHP's tokenizer instead of global regexes.
This fixes the problem with slashes being found inside the
documentation comment and various other edge cases, such as use
of slashes inside comments.
Also fix the problem with PHP namespaces being misinterpreted
as a Doxygen /command by escaping slashes automatically. This
shouldn't conflict with actual commands, since we use '@' for
all commands (e.g. @param, @return, @since etc.)
Change-Id: Ic03a8fc9d4b4851f66c2e975d9955ba20ab92f0e
Bartosz Dziewoński [Tue, 29 Sep 2015 00:35:06 +0000 (02:35 +0200)]
OOjs UI: Backport
4fbbc737c86b500c11bbb471ec1001c50ab8853c
We totally forgot to use a localisation message we carefully introduced.
We're even sending the message to the client correctly, just not using it.
Has plenty of translations and this is a really annoying kind of issue
to notice on a non-English wiki.
Change-Id: Ifc2cb5ac5930c8d3c4b0da295d5d868d442630b2
jenkins-bot [Mon, 23 Nov 2015 22:10:11 +0000 (22:10 +0000)]
Merge "Fix typo in doc comment on MWSaltedPassword.php"
Brian Wolff [Mon, 23 Nov 2015 21:55:18 +0000 (16:55 -0500)]
Fix typo in doc comment on MWSaltedPassword.php
Change-Id: I4d08846f6692797b0cfea33d56bbf1afb33b27db
Translation updater bot [Mon, 23 Nov 2015 21:17:45 +0000 (22:17 +0100)]
Localisation updates from https://translatewiki.net.
Change-Id: I746fb7bb78d2fe8da19f19bb8074bd5c353225c3
Timo Tijhof [Mon, 23 Nov 2015 21:11:21 +0000 (21:11 +0000)]
StringUtils: Fixup Doxygen warnings
* Code blocks must be indented by 4 spaces (so 5 in total from the star).
* Code blocks are only supported in descriptions, and for some reason the first
line is separate from the description, so there must be an additional line of
text between the summary and the code block since it can't be the first thing
in a description.
* Fix regex confusion with comment syntax due to "/*\/".
To verify these findings, use:
$ php maintenance/mwdocgen.php --file includes/libs/StringUtils.php
And check the output warnings and generated html pages.
Change-Id: I259b87c0bf3b48a95df0108eb6ee799c25b2853f
Timo Tijhof [Mon, 23 Nov 2015 20:33:01 +0000 (20:33 +0000)]
Doxygen: Disable verbose output
https://www.stack.nl/~dimitri/doxygen/manual/config.html#cfg_quiet
* To make the standard output in Jenkins more useful,
disable the verbose messages about "Loading file .." in between
all the errors.
* Remove obsolete config options XML_SCHEMA and XML_DTD that were
producing warnings. We weren't using these anyway (set to their default
blank value).
Change-Id: I6876cf4d783f7795a12d99623c8ce3717e9a51f5
jenkins-bot [Mon, 23 Nov 2015 17:55:56 +0000 (17:55 +0000)]
Merge "SpecialWatchlist: Rewrite cutoffselector() using XmlSelect"
Bartosz Dziewoński [Mon, 23 Nov 2015 16:45:31 +0000 (17:45 +0100)]
SpecialWatchlist: Rewrite cutoffselector() using XmlSelect
Also:
* Include the current value in the dropdown (it's possible to input
something manually in the URL).
* Do correct float comparison for the value from user preferences too.
Change-Id: I9a7a3a56e80c9f18afc866b9e98e2137b6845508
Bartosz Dziewoński [Mon, 23 Nov 2015 14:24:16 +0000 (15:24 +0100)]
mw.widgets.CategoryCapsuleItemWidget: Improve marking of missing categories
* Add a 'title' attribute like for wikitext links
* Add a 'missing' property to make it easy to check for redlinks
in the input programatically
Change-Id: I647af4dee947a6572f0202cf6b8b28777bbdc17e
jenkins-bot [Mon, 23 Nov 2015 16:05:03 +0000 (16:05 +0000)]
Merge "Special:Watchlist: Add user preference to "Show last" options, fix float comparison"
Florian [Fri, 20 Nov 2015 06:45:46 +0000 (07:45 +0100)]
Special:Watchlist: Add user preference to "Show last" options, fix float comparison
Also, simplified the "selected" check:
if ( $a == $b ) {
return true;
} else {
return false;
}
doesn't make sense, if you can use:
return $a == $b;
Bug: T119172
Bug: T119181
Change-Id: I16e1713bcd6519695961fcaf094a214954e7769c
jenkins-bot [Mon, 23 Nov 2015 09:36:20 +0000 (09:36 +0000)]
Merge "Allow maintenance/cdb.php to look up keys with spaces in them."
Reedy [Mon, 23 Nov 2015 01:05:25 +0000 (01:05 +0000)]
Upgraded composer/semver to 1.2.0
Depends-On: I66022e878bba54e51b78da84e7a64aa502baeb02
Change-Id: I400071986b0fd78be2c4bca34dbecef04120b78e
jenkins-bot [Mon, 23 Nov 2015 00:43:59 +0000 (00:43 +0000)]
Merge "API DB commit and sticky DC cookie fixes"
Translation updater bot [Sun, 22 Nov 2015 19:10:05 +0000 (20:10 +0100)]
Localisation updates from https://translatewiki.net.
Change-Id: I40af6a33b266f0697e1c58782d1a59129623e836