lhc/web/wiklou.git
8 years agoMerge "Add unit tests for mw.format()"
jenkins-bot [Tue, 24 Nov 2015 20:48:18 +0000 (20:48 +0000)]
Merge "Add unit tests for mw.format()"

8 years agoAdd 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 ec285f44200f6574.

Change-Id: Ic3ff05c0f48bd6101361312af70ca2b2c52ef79a

8 years agoresourceloader: Optimise mw.loader.register()
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

8 years agoMerge "Remove redundant escaping for namespace references in documentation"
jenkins-bot [Tue, 24 Nov 2015 20:07:50 +0000 (20:07 +0000)]
Merge "Remove redundant escaping for namespace references in documentation"

8 years agoMerge "Doxygen: Rewrite mwdoc-filter to fix bug with slashes in comments"
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"

8 years agoMerge "StringUtils: Fixup Doxygen warnings"
jenkins-bot [Tue, 24 Nov 2015 19:57:19 +0000 (19:57 +0000)]
Merge "StringUtils: Fixup Doxygen warnings"

8 years agoMerge "Doxygen: Disable verbose output"
jenkins-bot [Tue, 24 Nov 2015 19:56:41 +0000 (19:56 +0000)]
Merge "Doxygen: Disable verbose output"

8 years agoresourceloader: Don't create redundant timers in addEmbeddedCSS()
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

8 years agoMerge "Implement HTMLComboboxField"
jenkins-bot [Tue, 24 Nov 2015 19:20:07 +0000 (19:20 +0000)]
Merge "Implement HTMLComboboxField"

8 years agoMerge "mw.widgets.CategoryCapsuleItemWidget: Explicitly stringify link 'title'"
jenkins-bot [Tue, 24 Nov 2015 19:17:28 +0000 (19:17 +0000)]
Merge "mw.widgets.CategoryCapsuleItemWidget: Explicitly stringify link 'title'"

8 years agomw.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

8 years agoMerge "Add script to fix content model of JSON pages"
jenkins-bot [Tue, 24 Nov 2015 18:53:43 +0000 (18:53 +0000)]
Merge "Add script to fix content model of JSON pages"

8 years agoMerge "resourceloader: Remove redundant back-compat in mw.loader.addSource()"
jenkins-bot [Tue, 24 Nov 2015 18:47:48 +0000 (18:47 +0000)]
Merge "resourceloader: Remove redundant back-compat in mw.loader.addSource()"

8 years agoAdd script to fix content model of JSON pages
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

8 years agoMerge "Mark ApiQueryBase::getDirectionDescription as deprecated"
jenkins-bot [Tue, 24 Nov 2015 16:39:50 +0000 (16:39 +0000)]
Merge "Mark ApiQueryBase::getDirectionDescription as deprecated"

8 years agoMerge "Fixes for "External libraries" release notes section"
jenkins-bot [Tue, 24 Nov 2015 16:39:36 +0000 (16:39 +0000)]
Merge "Fixes for "External libraries" release notes section"

8 years agoMark ApiQueryBase::getDirectionDescription as deprecated
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

8 years agoMerge "Move details of import logs into log params"
jenkins-bot [Tue, 24 Nov 2015 08:52:12 +0000 (08:52 +0000)]
Merge "Move details of import logs into log params"

8 years agoFixes for "External libraries" release notes section
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

8 years agoMerge "Make $.fn.updateTooltipAccessKeys() less expensive"
jenkins-bot [Tue, 24 Nov 2015 06:50:13 +0000 (06:50 +0000)]
Merge "Make $.fn.updateTooltipAccessKeys() less expensive"

8 years agoAdd 0 hold-off TTL support to WANObjectCache::delete()
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

8 years agoMake $.fn.updateTooltipAccessKeys() less expensive
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

8 years agoDisallow associative arguments in ObjectFactory
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

8 years agoSupport named arguments in ObjectFactory
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

8 years agoRemove redundant escaping for namespace references in documentation
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

8 years agoDoxygen: Rewrite mwdoc-filter to fix bug with slashes in comments
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

8 years agoOOjs UI: Backport 4fbbc737c86b500c11bbb471ec1001c50ab8853c
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

8 years agoMerge "Fix typo in doc comment on MWSaltedPassword.php"
jenkins-bot [Mon, 23 Nov 2015 22:10:11 +0000 (22:10 +0000)]
Merge "Fix typo in doc comment on MWSaltedPassword.php"

8 years agoFix 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

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 23 Nov 2015 21:17:45 +0000 (22:17 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I746fb7bb78d2fe8da19f19bb8074bd5c353225c3

8 years agoStringUtils: Fixup Doxygen warnings
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

8 years agoDoxygen: Disable verbose output
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

8 years agoMerge "SpecialWatchlist: Rewrite cutoffselector() using XmlSelect"
jenkins-bot [Mon, 23 Nov 2015 17:55:56 +0000 (17:55 +0000)]
Merge "SpecialWatchlist: Rewrite cutoffselector() using XmlSelect"

8 years agoSpecialWatchlist: 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

8 years agomw.widgets.CategoryCapsuleItemWidget: Improve marking of missing categories
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

8 years agoMerge "Special:Watchlist: Add user preference to "Show last" options, fix float compa...
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"

8 years agoSpecial: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

8 years agoMerge "Allow maintenance/cdb.php to look up keys with spaces in them."
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."

8 years agoUpgraded composer/semver to 1.2.0
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

8 years agoMerge "API DB commit and sticky DC cookie fixes"
jenkins-bot [Mon, 23 Nov 2015 00:43:59 +0000 (00:43 +0000)]
Merge "API DB commit and sticky DC cookie fixes"

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 22 Nov 2015 19:10:05 +0000 (20:10 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I40af6a33b266f0697e1c58782d1a59129623e836

8 years agoAdded reversed as acceptable attribute for ol
Lee Bousfield [Sun, 22 Nov 2015 02:24:29 +0000 (19:24 -0700)]
Added reversed as acceptable attribute for ol

According to w3 at http://www.w3.org/TR/html-markup/ol.html reversed
specifies if the list order should be reversed.

Bug: T118701
Change-Id: I357957faafadfae1a0300d1cb8ba7eaa3fa0aed5

8 years agoAllow maintenance/cdb.php to look up keys with spaces in them.
Brian Wolff [Sun, 22 Nov 2015 17:29:02 +0000 (12:29 -0500)]
Allow maintenance/cdb.php to look up keys with spaces in them.

Change-Id: I4fd5f86706cf33345e650fac1c54d86c18207be5

8 years agoMerge "Fix typo: mapp -> map"
jenkins-bot [Sun, 22 Nov 2015 17:02:28 +0000 (17:02 +0000)]
Merge "Fix typo: mapp -> map"

8 years agoFix typo: mapp -> map
umherirrender [Sun, 22 Nov 2015 16:49:03 +0000 (17:49 +0100)]
Fix typo: mapp -> map

Change-Id: Id5cad30a3a83aa0da4ef2c608510c66cea06d7d0

8 years agoremoved duplicate line for api-error-duplicate-archive
opatel99 [Sun, 22 Nov 2015 16:39:55 +0000 (10:39 -0600)]
removed duplicate line for api-error-duplicate-archive

Change-Id: Ifafcf02e03e1122a569f66f7d693c3a590ce5e2b

8 years agoCall DB::timestampOrNull in WatchedItem::resetNotificationTimestamp
umherirrender [Sun, 22 Nov 2015 10:06:58 +0000 (11:06 +0100)]
Call DB::timestampOrNull in WatchedItem::resetNotificationTimestamp

This increase cross DBMS support

Bug: T86490
Change-Id: Ia1108c321dbc93295b18039420e49960ad6215d6

8 years agoMake SpecialRecentChanges::getFeedQuery() protected
Reedy [Sat, 21 Nov 2015 13:31:06 +0000 (13:31 +0000)]
Make SpecialRecentChanges::getFeedQuery() protected

Bug: T119299
Change-Id: I650b407b019cb4d0cd9ae1bd8df07bea57ee7e5d

8 years agoMerge "Add unit tests for MessageBlobStore"
jenkins-bot [Sat, 21 Nov 2015 03:18:48 +0000 (03:18 +0000)]
Merge "Add unit tests for MessageBlobStore"

8 years agoRELEASE-NOTES-1.27: Bugzilla is dead, long live Phabricator!
Kevin Israel [Sat, 21 Nov 2015 02:26:15 +0000 (21:26 -0500)]
RELEASE-NOTES-1.27: Bugzilla is dead, long live Phabricator!

As in 173617003560c8cf (which changed RELEASE-NOTES-1.26).

Change-Id: I86c537b322828d6b1fae7efc12d47834a866ee7f

8 years agoMove 3f1e9fa268cd release notes into 1.27 file
Kunal Mehta [Fri, 20 Nov 2015 23:05:00 +0000 (15:05 -0800)]
Move 3f1e9fa268cd release notes into 1.27 file

Change-Id: I651092bf7c0e7383e4dbe16c29c1ddbdabb51f80

8 years agoMove 617d59fcb326b release notes into 1.27 file
Kunal Mehta [Fri, 20 Nov 2015 23:01:46 +0000 (15:01 -0800)]
Move 617d59fcb326b release notes into 1.27 file

Change-Id: I514e057720528c887214f21f1b46f70deb7559f5

8 years agoMove ceab69238d2b release notes into 1.27 file
Kunal Mehta [Fri, 20 Nov 2015 22:53:29 +0000 (14:53 -0800)]
Move ceab69238d2b release notes into 1.27 file

Change-Id: I20c7d28f6f1ff3bde935e895eb34768574db2dc6

8 years agoFollow up de6cbaf65298a, move release notes into 1.27 file
Kunal Mehta [Fri, 20 Nov 2015 22:47:52 +0000 (14:47 -0800)]
Follow up de6cbaf65298a, move release notes into 1.27 file

Change-Id: Ia14b80285dcf09bd94870e8d43950101f9196dc0

8 years agoMove 90e1b22166b0 release notes to 1.27 file, and fix @since tag
Kunal Mehta [Fri, 20 Nov 2015 22:43:01 +0000 (14:43 -0800)]
Move 90e1b22166b0 release notes to 1.27 file, and fix @since tag

Change-Id: Ie40280f3bd0fb6b6fb817e1af1bca8c1901a6891

8 years agoMove 4a3fd2e42a1d release notes into 1.27 file
Kunal Mehta [Fri, 20 Nov 2015 22:35:25 +0000 (14:35 -0800)]
Move 4a3fd2e42a1d release notes into 1.27 file

Change-Id: I0d34972b6ce40fc7a207daa3ad16af568cf807da

8 years agoAdd unit tests for MessageBlobStore
Timo Tijhof [Fri, 20 Nov 2015 23:58:59 +0000 (23:58 +0000)]
Add unit tests for MessageBlobStore

* Also added getBlob() and getBlobs() methods. These don't
  require passing ResourceLoader as argument.
  In preparation for T113092.

Change-Id: I3239c45f0243eca1eaf85bc53fca736e4c9a209c

8 years agoMerge "Don't "preview" (i.e. execute) user JS on non-preview requests"
jenkins-bot [Fri, 20 Nov 2015 23:59:02 +0000 (23:59 +0000)]
Merge "Don't "preview" (i.e. execute) user JS on non-preview requests"

8 years agoMove a05971dfc7fd release notes into 1.27 file
Kunal Mehta [Fri, 20 Nov 2015 22:21:40 +0000 (14:21 -0800)]
Move a05971dfc7fd release notes into 1.27 file

Change-Id: Ie020342abe76d751515a907e0755ee9855c84874

8 years agoMerge "Fudge testGetWithSeveralCheckKeys() in both directions to be deterministic"
jenkins-bot [Fri, 20 Nov 2015 22:54:22 +0000 (22:54 +0000)]
Merge "Fudge testGetWithSeveralCheckKeys() in both directions to be deterministic"

8 years agoFudge testGetWithSeveralCheckKeys() in both directions to be deterministic
Aaron Schulz [Fri, 20 Nov 2015 22:21:31 +0000 (14:21 -0800)]
Fudge testGetWithSeveralCheckKeys() in both directions to be deterministic

Change-Id: I0f25cbd4555033f492b1b5d4ab55669240f19fc8

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 20 Nov 2015 21:36:29 +0000 (22:36 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I25fb88ffb87521842cd479e837d4c12df127aa80

8 years agoMerge "Add release notes for extension.json changes in 1.26"
jenkins-bot [Fri, 20 Nov 2015 21:17:43 +0000 (21:17 +0000)]
Merge "Add release notes for extension.json changes in 1.26"

8 years agoMerge "Use Database::fetchRow instead of array cast"
jenkins-bot [Fri, 20 Nov 2015 21:17:39 +0000 (21:17 +0000)]
Merge "Use Database::fetchRow instead of array cast"

8 years agoAdd release notes for extension.json changes in 1.26
Kunal Mehta [Fri, 20 Nov 2015 20:40:10 +0000 (12:40 -0800)]
Add release notes for extension.json changes in 1.26

Bug: T115658
Change-Id: I78ad659e0b035c4b16b582b50f01b24b0c049dc4

8 years agoUse Database::fetchRow instead of array cast
umherirrender [Fri, 20 Nov 2015 19:44:56 +0000 (20:44 +0100)]
Use Database::fetchRow instead of array cast

Change-Id: I71435955de604a9b3c2b2570e144b55b35421e4c

8 years agoSkip User name->id cache on READ_LATEST
Gergő Tisza [Fri, 20 Nov 2015 19:03:12 +0000 (11:03 -0800)]
Skip User name->id cache on READ_LATEST

This avoids mishaps when User::idFromName is called first without,
then with READ_LATEST.

Change-Id: I4ea723d9568f77d91a4ab3a9d963652cc00d6c89

8 years agoMerge "Update cached user ID after user is added to the database"
jenkins-bot [Fri, 20 Nov 2015 19:00:10 +0000 (19:00 +0000)]
Merge "Update cached user ID after user is added to the database"

8 years agoMerge "Use User::getId instead of trying to fix the ID in BlockTest"
jenkins-bot [Fri, 20 Nov 2015 18:59:52 +0000 (18:59 +0000)]
Merge "Use User::getId instead of trying to fix the ID in BlockTest"

8 years agoUpdate cached user ID after user is added to the database
Gergő Tisza [Thu, 19 Nov 2015 00:42:39 +0000 (16:42 -0800)]
Update cached user ID after user is added to the database

Bug: T119021
Change-Id: I5e0599d1d045b0389a7825fddc2b346e4cfd001d

8 years agoUse User::getId instead of trying to fix the ID in BlockTest
Gergő Tisza [Thu, 19 Nov 2015 22:09:29 +0000 (14:09 -0800)]
Use User::getId instead of trying to fix the ID in BlockTest

User::setId() has no effect on User::addToDatabase whatsoever,
and directly messing with the database is fragile due to
internal ID caching. Just use the insert ID instead.

Change-Id: Ib92f2b6d73deacaec90dc06634d8b3ad195d53e3

8 years agoFix undefined variable passed by reference to a hook
Reedy [Fri, 20 Nov 2015 12:37:22 +0000 (12:37 +0000)]
Fix undefined variable passed by reference to a hook

Change-Id: Iee488ff9baddc3962ca52eb34efbe7ebdb628ea5

8 years agoMerge "mediawiki.api: Use action=query&meta=tokens instead of action=tokens"
jenkins-bot [Fri, 20 Nov 2015 01:57:10 +0000 (01:57 +0000)]
Merge "mediawiki.api: Use action=query&meta=tokens instead of action=tokens"

8 years agoresourceloader: Remove redundant back-compat in mw.loader.addSource()
Timo Tijhof [Fri, 20 Nov 2015 00:48:01 +0000 (00:48 +0000)]
resourceloader: Remove redundant back-compat in mw.loader.addSource()

Follows-up e103ba265b.

This method doesn't need to be backward-compatible as this is already
normalised server-side.

When upgrading from before MediaWiki 1.24 the startup response will
change to the new format and also inline a request to the newer
version of mediawiki.js.

Also update method documentation to be up to date and remove
spurious return statements that aren't used.

Change-Id: I03d1b5666fcddedaa46ecf878ee7636042a5e3be

8 years agoresources: Upgrade jquery.i18n from 1.0.3 to 1.0.4
James D. Forrester [Fri, 20 Nov 2015 00:41:20 +0000 (16:41 -0800)]
resources: Upgrade jquery.i18n from 1.0.3 to 1.0.4

Only change is to un-break IE8 support

Bug: T118242
Change-Id: I8db627c54e3567afd6e0000840c2b02e0af71eb8

8 years agoMerge "Fix conflicting configuration name in TitleInputWidget"
jenkins-bot [Thu, 19 Nov 2015 21:45:18 +0000 (21:45 +0000)]
Merge "Fix conflicting configuration name in TitleInputWidget"

8 years agoMerge "TitleSearchWidget: Use OO.ui.mixin.RequestManager"
jenkins-bot [Thu, 19 Nov 2015 21:32:48 +0000 (21:32 +0000)]
Merge "TitleSearchWidget: Use OO.ui.mixin.RequestManager"

8 years agoMerge "Reduce usage of inline <span style="white-space: nowrap">"
jenkins-bot [Thu, 19 Nov 2015 21:32:44 +0000 (21:32 +0000)]
Merge "Reduce usage of inline <span style="white-space: nowrap">"

8 years agoFix conflicting configuration name in TitleInputWidget
Florian [Thu, 19 Nov 2015 21:21:15 +0000 (22:21 +0100)]
Fix conflicting configuration name in TitleInputWidget

config.validate is already given and used in OO.ui.TextInputWidget to
define a string/regex/method where a query is checked against. TitleInputWidget
would override it with a config option to enable/disable this check.

The config option "validate" uses the "validateTitle" name, now. There was
no usage so far.

Follow up: I732a2f56a2375d8c708e3b295996187ee209f1a6

Bug: T119075
Change-Id: Ibb47b20506d21213fc9681b6aa919ce45505e474

8 years agoMerge "SpecialWatchlist: Keep checkboxes and their labels together"
jenkins-bot [Thu, 19 Nov 2015 21:21:53 +0000 (21:21 +0000)]
Merge "SpecialWatchlist: Keep checkboxes and their labels together"

8 years agoReduce usage of inline <span style="white-space: nowrap">
Bartosz Dziewoński [Thu, 19 Nov 2015 20:34:27 +0000 (21:34 +0100)]
Reduce usage of inline <span style="white-space: nowrap">

Inspired by T119055.

Change-Id: I6829a67fb77c00e87772983f35b884bf03fad7e3

8 years agoSpecialWatchlist: Keep checkboxes and their labels together
Bartosz Dziewoński [Thu, 19 Nov 2015 20:31:16 +0000 (21:31 +0100)]
SpecialWatchlist: Keep checkboxes and their labels together

Style added to shared.css, since I intend to reuse it elsewhere.
We have a lot of inline style="white-space: nowrap;" in some places.

Bug: T119055
Change-Id: If6cfcaac070cd51a93c078248b65020ae81d94f2

8 years agoAPI DB commit and sticky DC cookie fixes
Aaron Schulz [Tue, 10 Nov 2015 06:57:00 +0000 (22:57 -0800)]
API DB commit and sticky DC cookie fixes

* Make sure the API commits DBs *before* sending the
  response, in case something goes south which would
  make a sent response wrong.
* Make sticky DC cookies trigger with api.php too.
* Make sure UseDC cookies do not end up with a prefix.
  VCL rules should not have to deal with having a DB
  name as a prefix or such. This was an oversight.

Change-Id: I9e4090ab15c1c1493b0589a710184745dac9b0c1

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 19 Nov 2015 20:10:44 +0000 (21:10 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Idd9602752f2328fef651d992a02b7f5315cf0cf8

8 years agoTitleSearchWidget: Use OO.ui.mixin.RequestManager
David Lynch [Wed, 11 Nov 2015 22:54:53 +0000 (14:54 -0800)]
TitleSearchWidget: Use OO.ui.mixin.RequestManager

Get that request management goodness that only LookupWidgets used to
benefit from. We can undo the earlier hacky fix to avoid requests
overrunning each other as part of this.

Bug: T114175
Change-Id: I6ff686b3b157d23ff534357ce25ebcb4ef7efea1

8 years agoMerge "TOC: Restore missing underlines in Firefox"
jenkins-bot [Thu, 19 Nov 2015 16:43:45 +0000 (16:43 +0000)]
Merge "TOC: Restore missing underlines in Firefox"

8 years agoTOC: Restore missing underlines in Firefox
Fomafix [Fri, 6 Nov 2015 20:27:34 +0000 (20:27 +0000)]
TOC: Restore missing underlines in Firefox

According to <http://www.w3.org/TR/css-text-decor-3/#line-decoration>,
text decorations are not propagated to the contents of inline blocks
and inline tables, and 'display: table-cell' generates an inline table
when used without any parent table-rows and tables.

Firefox currently seems to be the only browser handling this correctly,
see <https://bugzilla.mozilla.org/show_bug.cgi?id=1222703>.

This is a follow-up to c7894deb.

Bug: T92481
Change-Id: Iae4a1e6fd30be950f0f1c40f47b4d2483002fe72

8 years agoMerge "HTMLForm: Do not render hidden elements as elements"
jenkins-bot [Thu, 19 Nov 2015 16:28:05 +0000 (16:28 +0000)]
Merge "HTMLForm: Do not render hidden elements as elements"

8 years agoAdd a new message key on watchlist for "Hide"
Raimond Spekking [Thu, 19 Nov 2015 13:56:04 +0000 (13:56 +0000)]
Add a new message key on watchlist for "Hide"

The older message key "hide" is used on many places, often inline
But this new message is used as first word of a line and at least in
German it needs a capital letter in the translation

Change-Id: I26ed976d89d1dc9759abf22f6d39b77d26c68731

8 years agoMerge "mediawiki.jqueryMsg: Extend mw.Message with new #parseDom method"
jenkins-bot [Thu, 19 Nov 2015 08:06:51 +0000 (08:06 +0000)]
Merge "mediawiki.jqueryMsg: Extend mw.Message with new #parseDom method"

8 years agoMerge "Improve docs for lag related DB functions"
jenkins-bot [Thu, 19 Nov 2015 07:33:19 +0000 (07:33 +0000)]
Merge "Improve docs for lag related DB functions"

8 years agoMerge "SquidUpdate doc cleanups"
jenkins-bot [Thu, 19 Nov 2015 07:23:53 +0000 (07:23 +0000)]
Merge "SquidUpdate doc cleanups"

8 years agoMerge "phpcs: Assignment expression not allowed"
jenkins-bot [Thu, 19 Nov 2015 03:28:40 +0000 (03:28 +0000)]
Merge "phpcs: Assignment expression not allowed"

8 years agoImprove docs for lag related DB functions
Aaron Schulz [Thu, 19 Nov 2015 02:23:03 +0000 (18:23 -0800)]
Improve docs for lag related DB functions

* They can return false if replication is stopped.
* Also remove redundant related doc blocks.

Change-Id: I40a1cb2da2f23815b9da8f79195df45c5e510585

8 years agomediawiki.jqueryMsg: Extend mw.Message with new #parseDom method
Bartosz Dziewoński [Tue, 3 Nov 2015 23:48:11 +0000 (00:48 +0100)]
mediawiki.jqueryMsg: Extend mw.Message with new #parseDom method

Unlike #parse, this one returns a jQuery set of DOM nodes and not a
HTML string, for two benefits:

* Allows to skip unnecessary HTML serialization and reconstruction
  when we just want to insert the message contents somewhere.

  Old way:
    $( '#foo' ).html( mw.message( 'foo' ).parse() );
  New way:
    $( '#foo' ).append( mw.message( 'foo' ).parseDom() );

  This is roughly equivalent to the old alternative:
    $( '#foo' ).msg( 'foo' );
  But that way can't be used if you start with a mw.Message object, or
  don't yet know where the elements will be inserted.

* Allows to preserve the event handlers when a function is passed as
  message parameter.

    mw.messages.set( 'foo', '[$1 Click me!]' );
    $( '#foo' ).append( mw.message( 'foo', function () {
      console.log( 'Link clicked!' );
    } ).parseDom() );

Change-Id: Ia09131c2ffc1d149ca6b1c32dcd918a539c3a719

8 years agonamespaceDupes: Ignore duplicate key errors in link table updates
Roan Kattouw [Thu, 19 Nov 2015 00:24:17 +0000 (16:24 -0800)]
namespaceDupes: Ignore duplicate key errors in link table updates

Bug: T115824
Change-Id: I67f57f680587c2c1e00f63a268019270bf8d5f86

8 years agoSquidUpdate doc cleanups
Aaron Schulz [Thu, 19 Nov 2015 00:07:29 +0000 (16:07 -0800)]
SquidUpdate doc cleanups

Change-Id: Ia5b8060e8a93f40a2e31272e043b225f59fb6d50

8 years agoMerge "Race condition fixes for refreshLinks jobs"
jenkins-bot [Wed, 18 Nov 2015 22:41:18 +0000 (22:41 +0000)]
Merge "Race condition fixes for refreshLinks jobs"

8 years agoMerge "Allow findHooks.php to compare parameter references of hooks"
jenkins-bot [Wed, 18 Nov 2015 21:27:49 +0000 (21:27 +0000)]
Merge "Allow findHooks.php to compare parameter references of hooks"

8 years agoMerge "Allow findHooks.php to compare parameter count of hooks"
jenkins-bot [Wed, 18 Nov 2015 21:17:20 +0000 (21:17 +0000)]
Merge "Allow findHooks.php to compare parameter count of hooks"