lhc/web/wiklou.git
8 years agoAPI: Use message-per-value for apihelp-query+siteinfo-param-prop
umherirrender [Thu, 6 Aug 2015 07:51:00 +0000 (09:51 +0200)]
API: Use message-per-value for apihelp-query+siteinfo-param-prop

Use message-per-value for message
apihelp-query+siteinfo-param-prop to allow smaller strings
for translation.
Each prop in a message also will show up a new parameter on the help
page without the adjust of the translation (but than in english instead
of fully skip it).

Change-Id: I458fddcaef1cc96656a87375eff9707c8ba0db94

8 years agoReplace native "document.write" with deprecated fallback
Timo Tijhof [Thu, 6 Aug 2015 02:55:53 +0000 (19:55 -0700)]
Replace native "document.write" with deprecated fallback

In most browsers, calling "document.write" after the document is
ready results in the document being re-created with the specified
content (effectively replacing with blank page).

While this is a browser issue, mitigate this by replacing the
method with a fallback (wrapped in "mw.log.deprecate") that just
appends the given HTML to the document body.

Note that scripts do not execute when appended as HTML, they will
become dormant elements. It'll work for raw content as a basic
fallback, but it should become apparent to the end user that the
code needs to be upgraded.

Bug: T108139
Change-Id: Ic9056d7a779f234a28ddad005fd4d76f2e750fcc

8 years agoresourceloader: Restore "blocking" legacy modules
Timo Tijhof [Wed, 5 Aug 2015 22:42:26 +0000 (15:42 -0700)]
resourceloader: Restore "blocking" legacy modules

This ensures 'wikibits' and 'mediawiki.util' (if so configured)
finish loading before executing other modules.

This was previously implicitly provided for the bottom queue by
being in the top-queue, but since this is now asynchronous that
is no lower guaranteed. Fix this by making this explicit instead
of implicit.

Keep them in the top queue as-is to ensure consistency with cached
pages and it allows them to preload and batch in the same request
instead of being discovered later at run-time as a separate request.

Bug: T108124
Change-Id: I74e0cbe616404da927ea46d06308a7bae930eb69

8 years agoMerge "refreshLinks.php: Fix deletion of link entries from nonexistent pages"
jenkins-bot [Thu, 6 Aug 2015 02:28:54 +0000 (02:28 +0000)]
Merge "refreshLinks.php: Fix deletion of link entries from nonexistent pages"

8 years agoMerge "mediawiki.action.edit.stash: reduce idle time from 4k to 3k"
jenkins-bot [Wed, 5 Aug 2015 23:49:34 +0000 (23:49 +0000)]
Merge "mediawiki.action.edit.stash: reduce idle time from 4k to 3k"

8 years agomediawiki.action.edit.stash: reduce idle time from 4k to 3k
Ori Livneh [Wed, 5 Aug 2015 22:31:51 +0000 (15:31 -0700)]
mediawiki.action.edit.stash: reduce idle time from 4k to 3k

Deployed to Wikimedia cluster shortly after 23:00 UTC and led to an appreciable dip in save time.

Change-Id: I08fdda110b71bf7030a45afc3f3f5d7cc32c9b05

8 years agoMerge "qunit: Improved unfinished ajax detection"
jenkins-bot [Wed, 5 Aug 2015 22:34:24 +0000 (22:34 +0000)]
Merge "qunit: Improved unfinished ajax detection"

8 years agojsduck: Update eg-iframe.html to match MediaWiki environment
Timo Tijhof [Wed, 5 Aug 2015 20:55:25 +0000 (13:55 -0700)]
jsduck: Update eg-iframe.html to match MediaWiki environment

* Add 'resources/lib/phpjs-sha1/sha1.js' (follows-up f37cee996)
* Remove 'resources/src/startup.js' (follows-up b00cd0b12)
  This no longer works due to the $VARS placeholder. Either way
  it is redundant because we already define a 'startUp' function
  inside eg-iframe. We don't need anything from startup.js.

Bug: T107925
Change-Id: Iaf75850060556f03ebaa37b8e1dce0de6f1c16ce

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 5 Aug 2015 20:17:10 +0000 (22:17 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Iee978afb2b638a484600ebd3e85881320e59e198

8 years agoMerge "Parser: Don't generate an external link on "http://)" and similar"
jenkins-bot [Wed, 5 Aug 2015 20:12:29 +0000 (20:12 +0000)]
Merge "Parser: Don't generate an external link on ")" and similar"

8 years agoMerge "resourceloader: Convert FileModule to use version hashing"
jenkins-bot [Wed, 5 Aug 2015 19:51:42 +0000 (19:51 +0000)]
Merge "resourceloader: Convert FileModule to use version hashing"

8 years agoresourceloader: Convert FileModule to use version hashing
Timo Tijhof [Thu, 9 Jul 2015 18:30:53 +0000 (19:30 +0100)]
resourceloader: Convert FileModule to use version hashing

Enabling the module content versionining is not feasible for FileModule as that
would involve Lessc and CSSJanus just to compute the version hash.

Instead, we can keep the existing logic that exists for the timestamp-based
versioning (which already has a comprehensive grip on tracking all involved
factors that cause a module to change) and convert it to use hashing instead.

This way the version hashes will be deterministic. Currently module versions
tend to be invalidated too often (and sometimes not often enough) due to Git and
other transport mechanisms not preserving file timestamps.

== Research ==

* <https://phabricator.wikimedia.org/T98087#1412712>
  It'd take upto 10 seconds to run startup if FileModule enables build versioning.

* <https://phabricator.wikimedia.org/T104950#1433142>
  Checking all files in resources/** took only ~30m longer in total with
  sha1_file compared to filemtime.

Bug: T104950
Change-Id: I732fa4db32258c634e32b507952f76eac7fc9395

8 years agoAPI: Ignore '_' parameter in jsonp callback mode
Brad Jorsch [Fri, 27 Mar 2015 16:36:19 +0000 (12:36 -0400)]
API: Ignore '_' parameter in jsonp callback mode

jQuery has a misfeature where it by default appends a '_' parameter as a
cachebuster in jsonp mode. So, when in jsonp mode, mark this bogus
parameter as used to avoid an unnecessary warning.

Bug: T94015
Change-Id: I43373439a3605e4589315139c30976c6c2f68542

8 years agoqunit: Improved unfinished ajax detection
Timo Tijhof [Wed, 5 Aug 2015 00:11:11 +0000 (17:11 -0700)]
qunit: Improved unfinished ajax detection

Sometimes $.active is non-zero but the ajaxRequests array doesn't
contain any pending requests (yet). In that case, log $.active
as well.

Change-Id: I1c181b1234d1f883605de38805bc029c064a1f5b

8 years agoMerge "docs: Add examples for mw.Upload"
jenkins-bot [Wed, 5 Aug 2015 16:04:16 +0000 (16:04 +0000)]
Merge "docs: Add examples for mw.Upload"

8 years agodocs: Add examples for mw.Upload
Prateek Saxena [Wed, 5 Aug 2015 10:28:43 +0000 (15:58 +0530)]
docs: Add examples for mw.Upload

Change-Id: Icd759657fb1756d1559173d3a335f87e7a2baa2e

8 years agoRemove thumbnailaccess logging
Gilles Dubuc [Wed, 5 Aug 2015 08:40:58 +0000 (10:40 +0200)]
Remove thumbnailaccess logging

Bug: T107437
Change-Id: I3c2fe7b894fc571f4f92323637340dda23099a3a

8 years agoMerge "Cleaned up and split up Swift header parsing methods a bit"
jenkins-bot [Wed, 5 Aug 2015 08:29:44 +0000 (08:29 +0000)]
Merge "Cleaned up and split up Swift header parsing methods a bit"

8 years agoCleaned up and split up Swift header parsing methods a bit
Aaron Schulz [Fri, 31 Jul 2015 19:41:03 +0000 (12:41 -0700)]
Cleaned up and split up Swift header parsing methods a bit

* Added tests for the metadata headers portion of the code

Change-Id: I8ac65e31212b4cca4592f963e0ca5ad30e1349f7

8 years agoMerge "docs: Move mw.Upload documentation under the Interface heading"
jenkins-bot [Wed, 5 Aug 2015 03:11:52 +0000 (03:11 +0000)]
Merge "docs: Move mw.Upload documentation under the Interface heading"

8 years agodocs: Move mw.Upload documentation under the Interface heading
Prateek Saxena [Wed, 5 Aug 2015 02:49:18 +0000 (08:19 +0530)]
docs: Move mw.Upload documentation under the Interface heading

Change-Id: If78456696184a56b697dcad612356cde850e4e22

8 years agoMerge "Added BagOStuff READ_LATEST flag for replicated stores"
Aaron Schulz [Wed, 5 Aug 2015 01:48:29 +0000 (01:48 +0000)]
Merge "Added BagOStuff READ_LATEST flag for replicated stores"

8 years agoMerge "resourceloader: Fix RLQ script to support IE8 quirk"
jenkins-bot [Tue, 4 Aug 2015 23:43:52 +0000 (23:43 +0000)]
Merge "resourceloader: Fix RLQ script to support IE8 quirk"

8 years agoresourceloader: Fix RLQ script to support IE8 quirk
Timo Tijhof [Tue, 4 Aug 2015 23:07:45 +0000 (16:07 -0700)]
resourceloader: Fix RLQ script to support IE8 quirk

In IE8 there is a race condition. If the window.RLQ runs first (that is, the
startup module loads first) then 'var RLQ' does not get associated
properly to our custom window.RLQ object.

The other way around is fine, but never happens because <script async>
isn't supported in IE8.

Consistently use 'window.RLQ' (never 'var RLQ') to bypass this bug.

Also updating the startup.js file for consistency (though not strictly
needed since the implicit global reference without 'var' also works fine
in IE8.

Bug: T107954
Change-Id: I3f46fee7c4528abf806bb9c51fc767eceb795009

8 years agomediawiki.notification: Add message type with predefined styles
Fomafix [Mon, 3 Aug 2015 17:37:25 +0000 (17:37 +0000)]
mediawiki.notification: Add message type with predefined styles

New option.type to select a predefined style.

Default styles with colors:
* warn: yellow
* error: red
Other styles can be added.

Bug: T61099
Change-Id: I2d7305d9b62ebddc70e7f787e76e752b8b78d570

8 years agoAdded BagOStuff READ_LATEST flag for replicated stores
Aaron Schulz [Wed, 27 May 2015 18:52:44 +0000 (11:52 -0700)]
Added BagOStuff READ_LATEST flag for replicated stores

Bug: T88493
Change-Id: I7ea050a2eabba635f2aadb4e33b6f8fbfb1b01a8

8 years agoMerge "SpecialJavaScriptTest: Bypass ResourceLoader 'target' scope"
jenkins-bot [Tue, 4 Aug 2015 22:22:44 +0000 (22:22 +0000)]
Merge "SpecialJavaScriptTest: Bypass ResourceLoader 'target' scope"

8 years agoMerge "Made EnqueueJob use the same dummy title as the JobSpecification default"
jenkins-bot [Tue, 4 Aug 2015 22:20:46 +0000 (22:20 +0000)]
Merge "Made EnqueueJob use the same dummy title as the JobSpecification default"

8 years agoMerge "mw.widgets.DateInputWidget: Display a translateable placeholder"
jenkins-bot [Tue, 4 Aug 2015 22:14:20 +0000 (22:14 +0000)]
Merge "mw.widgets.DateInputWidget: Display a translateable placeholder"

8 years agoMade EnqueueJob use the same dummy title as the JobSpecification default
Aaron Schulz [Mon, 3 Aug 2015 19:59:25 +0000 (12:59 -0700)]
Made EnqueueJob use the same dummy title as the JobSpecification default

Change-Id: Ice0056fd4a74f2de6d6c7622b1e4e62fad1927e9

8 years agomw.widgets.DateInputWidget: Display a translateable placeholder
Bartosz Dziewoński [Tue, 4 Aug 2015 20:37:26 +0000 (22:37 +0200)]
mw.widgets.DateInputWidget: Display a translateable placeholder

The translations are sourced from UploadWizard's messages
'mwe-upwiz-tooltip-date' and 'mwe-upwiz-error-date', minus the ones
where the translation was identical to English, there were two
different translations, or the translation looked otherwise suspicious.

Change-Id: I0db3163cbf2a99616fae4ac993f49c69e9e755ba

8 years agoMerge "Hide edit toolbar Signature button in non-discussion namespaces"
jenkins-bot [Tue, 4 Aug 2015 20:05:32 +0000 (20:05 +0000)]
Merge "Hide edit toolbar Signature button in non-discussion namespaces"

8 years agoMerge "Make Special:ConfirmEmail load the user from the master"
jenkins-bot [Tue, 4 Aug 2015 18:50:19 +0000 (18:50 +0000)]
Merge "Make Special:ConfirmEmail load the user from the master"

8 years agoMake Special:ConfirmEmail load the user from the master
Aaron Schulz [Mon, 3 Aug 2015 23:20:39 +0000 (16:20 -0700)]
Make Special:ConfirmEmail load the user from the master

* This can help guard against stale reads if the user was
  created or changed a second ago.

Bug: T105896
Change-Id: Ib2a59762cd8f4a4b7ad86d0700f186bee1d5b2d1

8 years agoMerge "mw.widgets.DateInputWidget: Add missing background"
jenkins-bot [Tue, 4 Aug 2015 18:17:13 +0000 (18:17 +0000)]
Merge "mw.widgets.DateInputWidget: Add missing background"

8 years agoMerge "mw.widgets.DateInputWidget: Don't get stuck on today's date if none given"
jenkins-bot [Tue, 4 Aug 2015 18:17:10 +0000 (18:17 +0000)]
Merge "mw.widgets.DateInputWidget: Don't get stuck on today's date if none given"

8 years agoMerge "mw.widgets.DateInputWidget: Add @example"
jenkins-bot [Tue, 4 Aug 2015 18:14:16 +0000 (18:14 +0000)]
Merge "mw.widgets.DateInputWidget: Add @example"

8 years agoMerge "resourceloader: Async all the way"
jenkins-bot [Tue, 4 Aug 2015 17:30:21 +0000 (17:30 +0000)]
Merge "resourceloader: Async all the way"

8 years agoMerge "Remove Sajax"
jenkins-bot [Tue, 4 Aug 2015 17:26:43 +0000 (17:26 +0000)]
Merge "Remove Sajax"

8 years agoresourceloader: Async all the way
Timo Tijhof [Tue, 28 Jul 2015 02:46:00 +0000 (19:46 -0700)]
resourceloader: Async all the way

Page startup:
* Due to the startup module and top queue being asynchronous now,
  move client-nojs/client-js class handling to OutputPage to ensure
  there is no flashes of wrongly styled or unstyled content.

  To preserve compatibility for unsupported browsers, undo the
  class swap at runtime after the isCompatible() check.

ResourceLoader startup module:
* Load the startup module with <script async>.
* Use DOM methods instead of 'document.write' to create base module request (jquery|mediawiki).

mw.loader:
* Drop 'async' parameter from mw.loader.load().
* Remove the now-unused code paths for synchronous requests.

OutputPage:

* Drop '$loadCall' parameter from makeResourceLoaderLink().
  Asynchronous is now the default and only way to load JavaScript.
  This means the 'user' module "conditional document-write scripts"
  are now a simple "mw.loader.load( url )" call.

* Fix incorrect @return of makeResourceLoaderLink(). This returns
  an array not a string.

* Improve documentation of makeResourceLoaderLink().

* Drop '$inHead' parameter from getScriptsForBottomQueue(). No longer used.
  Compatibility with the $wgResourceLoaderExperimentalAsyncLoading
  feature is maintained. It just no longer needs to change the
  way the queue works since it's always asynchronous. The feature
  flag now only controls whether the bottom queue starts at the bottom
  or starts at the top.

* Remove jQuery.ready() optimisation.
  This was mostly there to avoid the setTimeout() loop jQuery does to detect
  dom-ready in IE6/IE7 (which we no longer serve JavaScript at all).
  And for a bug in Firefox with document.write (which is no longer used as of
  this commit).

Bug: T107399
Change-Id: Icba6d7a87b239bf127a221bc6bc432cfa71a4a72

8 years agomw.widgets.DateInputWidget: Add missing background
Bartosz Dziewoński [Tue, 4 Aug 2015 16:33:45 +0000 (18:33 +0200)]
mw.widgets.DateInputWidget: Add missing background

Change-Id: I1db5bffaa8270479746b85b0c35dbb0f7b0eeaaf

8 years agomw.widgets.DateInputWidget: Don't get stuck on today's date if none given
Bartosz Dziewoński [Tue, 4 Aug 2015 16:29:51 +0000 (18:29 +0200)]
mw.widgets.DateInputWidget: Don't get stuck on today's date if none given

If no date was given, the calendar would select today, but the
DateInputWidget itself would have no value.

However, this made the date picker ignore attempts to actually choose
today: the calendar already had that date chosen, so no 'change' even
was fired, and date input stayed empty.

Change mw.widgets.CalendarWidget not to actually select today's date,
just focus the calendar on it.

Follow-up to 66686f8c5e4df1c2cc94273918b9328269d2ec09.

Change-Id: I3ba064982b045a577209d56a009ad0098c357754

8 years agoSync up with Parsoid parserTests.
C. Scott Ananian [Tue, 4 Aug 2015 16:30:20 +0000 (12:30 -0400)]
Sync up with Parsoid parserTests.

This now aligns with Parsoid commit 19c5d8af12ea0a79141f3aa0634d0fd28fb30c5c

Change-Id: Ifffc18a38c6501706209d1b033d2305a7534ba61

8 years agoParser: Don't generate an external link on "http://)" and similar
Bartosz Dziewoński [Mon, 13 Jul 2015 15:31:52 +0000 (17:31 +0200)]
Parser: Don't generate an external link on ")" and similar

Bug: T105697
Change-Id: I6cd14b9c4a541af8d0bb50b925aa0b015e97c3fe

8 years agomw.widgets.DateInputWidget: Add @example
Bartosz Dziewoński [Tue, 4 Aug 2015 16:03:30 +0000 (18:03 +0200)]
mw.widgets.DateInputWidget: Add @example

Bug: T107247
Change-Id: I193fcd3175ebc96297f9d2cdd0f4de428388dd8e

8 years agomw.widgets.CalendarWidget: Improve today's date highlighting
Bartosz Dziewoński [Tue, 4 Aug 2015 12:51:12 +0000 (14:51 +0200)]
mw.widgets.CalendarWidget: Improve today's date highlighting

This was goofy, and the margins caused items to wobble around on
hover. I forgot about the box-shadow trick.

Change-Id: I35c32456ad0a1633ffbd1fbe6ad77adba694ae2d

8 years agomw.widgets.DateInputWidget: Don't set today's date on activation
Bartosz Dziewoński [Tue, 4 Aug 2015 12:00:02 +0000 (14:00 +0200)]
mw.widgets.DateInputWidget: Don't set today's date on activation

Per Mark's review on Ia7bb737bc11b0af3659552fa75d11e6663e2812e.

Change-Id: Ie96602514dd57ffbe655d4ba4a8b5028771acda8

8 years agoMerge "Automatically de-duplicate EnqueueJob jobs when possible"
jenkins-bot [Tue, 4 Aug 2015 09:26:08 +0000 (09:26 +0000)]
Merge "Automatically de-duplicate EnqueueJob jobs when possible"

8 years agoSpecialJavaScriptTest: Bypass ResourceLoader 'target' scope
Timo Tijhof [Thu, 4 Jun 2015 20:12:23 +0000 (21:12 +0100)]
SpecialJavaScriptTest: Bypass ResourceLoader 'target' scope

To make unit testing easier, allow any module to be loaded within
the unit test suite. Regardless of the intended 'target'.

Targets are meant for restricting front-end scope in production.
Enforcing that in the test suite causes various test suites to
get de-registered at run time client-side.

Otherwise, in order to truly run all unit tests, Jenkins would
have to re-run the entire test suite in all known targets. This
wouldn't make sense because modules have to be globally uniquely
named (no conflicts) and unit tests are atomic. They can all run
in the same suite.

To prevent modules being comitted with incompatible target
dependencies, we already have a Structure test in the PHPUnit
suite to catch those issues in the module registry.

This makes the main 'qunit' build for MobileFrontend more useful,
where currently many modules aren't being tested due to them not
being in the 'desktop' target.

Bug: T103027
Change-Id: I69f735eb56c1362189298d9859d3add576faaadb

8 years agoresourceloader: In startup, move RLQ handling to after mw.config
Timo Tijhof [Tue, 4 Aug 2015 01:38:30 +0000 (18:38 -0700)]
resourceloader: In startup, move RLQ handling to after mw.config

Follows-up 59f1a1efa8.

This wasn't breaking anything currently because the startup module
is still loading synchronously.

Change-Id: I2c91331050378f2b5925e89b3aab50a555c07bcd

8 years agoMerge "Added DBAccessObjectUtils class to avoid duplication"
jenkins-bot [Mon, 3 Aug 2015 23:26:15 +0000 (23:26 +0000)]
Merge "Added DBAccessObjectUtils class to avoid duplication"

8 years agoMerge "Empty attribute syntax"
jenkins-bot [Mon, 3 Aug 2015 23:07:00 +0000 (23:07 +0000)]
Merge "Empty attribute syntax"

8 years agoSample StatsD messages when instructed
Gergő Tisza [Thu, 23 Jul 2015 20:13:27 +0000 (20:13 +0000)]
Sample StatsD messages when instructed

Bug: T106457
Change-Id: I8ddb5a53dcbaf398f5a114d2a4a862842e980db4

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 3 Aug 2015 19:46:31 +0000 (21:46 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Iffa0a6e5b7957ee91312fa19a8816b5d013f6629

8 years agoAutomatically de-duplicate EnqueueJob jobs when possible
Aaron Schulz [Mon, 3 Aug 2015 19:46:30 +0000 (12:46 -0700)]
Automatically de-duplicate EnqueueJob jobs when possible

Bug: T107792
Change-Id: I1e7fe5d5a6fed7b9a0dd4482ef3fc3a260033109

8 years agoDelete "Currently unused" regarding generateTOC
S Page [Mon, 3 Aug 2015 05:33:43 +0000 (22:33 -0700)]
Delete "Currently unused" regarding generateTOC

includes/api/ApiHelp.php uses Linker:generateTOC.
This is a trivial comment-only change.

Change-Id: Ie566a94a67b5e583d20a23edcdac5a1e3ba3d542

8 years agoUse lower case edit link on Special:WhatLinkshere
Florianschmidtwelzow [Mon, 3 Aug 2015 11:02:48 +0000 (13:02 +0200)]
Use lower case edit link on Special:WhatLinkshere

Bug: T107633
Change-Id: I2365623d0f0e72645c385be279bc2ccdf4954bcd

8 years agoregistration: Document 'templates' property of ResourceModules objects
Kunal Mehta [Sun, 2 Aug 2015 21:10:23 +0000 (14:10 -0700)]
registration: Document 'templates' property of ResourceModules objects

Bug: T107008
Change-Id: Iaac805969460ef114f9e87afe8f6e9f442728670

8 years agoHide edit toolbar Signature button in non-discussion namespaces
This, that and the other [Mon, 21 Jul 2014 01:36:20 +0000 (11:36 +1000)]
Hide edit toolbar Signature button in non-discussion namespaces

Most wikis only use user signatures on pages set aside from discussion,
(Talk namespaces and sometimes project/main namespaces depending on
the wiki), so having the button available everywhere is confusing.
The few wikis that need the button (especially non-content,
internal/corporate/planning wikis), can add relevant namespaces to the
$wgExtraSignatureNamespaces array in LocalSettings.

This would make it possible to solve bugs like T59727 or T53154.

Since this is a change to default behavior, a release note is added.

Bug: T7645
Change-Id: I7ccf1093b888c7b33721234349ca0ac054c3cd3f

8 years agoRemove Sajax
Ori Livneh [Mon, 3 Aug 2015 03:05:51 +0000 (20:05 -0700)]
Remove Sajax

Calls for the removal of Sajax go back to (at least) October of 2012, when it
was already possible to describe the library as "ancient".[0] The work to mark
the library as deprecated[1] and to update its callers in Core[2] was completed
by Alex Monk two years ago. Usage in extensions was removed long ago in most
cases, and the last holdout -- SecurePoll -- was migrated by Frances Hocutt
last month. There is a long tail of usage in the MediaWiki namespace, but it
should not block this patch.

[0]: http://thread.gmane.org/gmane.science.linguistics.wikipedia.technical/64380
[1]: I4a0af8986
[2]: I52f01e4e7
[3]: I1e4f3107e

Bug: T55120
Change-Id: I22b69113a67c0b3a0979ff6ba1854ee8e95c1b88

8 years agoAdd base interface for setters in RequestContext and DerivativeContext
Kunal Mehta [Mon, 21 Jul 2014 09:13:23 +0000 (02:13 -0700)]
Add base interface for setters in RequestContext and DerivativeContext

Change-Id: I819633ca5344f73a196623569bb58fd8372d6779

8 years agoMerge "Improve messages related to $wgAllowCategorizedRecentChanges"
jenkins-bot [Mon, 3 Aug 2015 05:26:47 +0000 (05:26 +0000)]
Merge "Improve messages related to $wgAllowCategorizedRecentChanges"

8 years agoMerge "OutputPage: Add \n between </style> and <script>"
jenkins-bot [Mon, 3 Aug 2015 05:10:43 +0000 (05:10 +0000)]
Merge "OutputPage: Add \n between </style> and <script>"

8 years agoregistration: Actually set the merge strategy for $wgExtensionCredits
Kunal Mehta [Sun, 2 Aug 2015 21:56:44 +0000 (14:56 -0700)]
registration: Actually set the merge strategy for $wgExtensionCredits

$wgExtensionCredits is special and needs to be set in the
ExtensionRegistry. Also change the cache key so any bad cache entries
will be ignored.

Follows up 1ebb0f5659667f.

Change-Id: Iec08ab8d9ef7fe7cccde979530839ef553779658

8 years agoMerge "Update the comment in MessagesAzb.php to be consistent with Names.php"
jenkins-bot [Sun, 2 Aug 2015 21:44:02 +0000 (21:44 +0000)]
Merge "Update the comment in MessagesAzb.php to be consistent with Names.php"

8 years agoregistration: Allow setting $wgCapitalLinkOverrides
Kunal Mehta [Sat, 1 Aug 2015 08:37:10 +0000 (01:37 -0700)]
registration: Allow setting $wgCapitalLinkOverrides

Change-Id: Iaf8b44d02adf94ac7f7cb6a8a090b4069b98a88c

8 years agoregistration: Allow setting $wgNamespaceProtection
Kunal Mehta [Sat, 1 Aug 2015 07:39:52 +0000 (00:39 -0700)]
registration: Allow setting $wgNamespaceProtection

Change-Id: Id071eeeb3e734f7833d36610a6b4e786f2d26fa6

8 years agoMerge "registration: Overhaul merging of globals"
jenkins-bot [Sun, 2 Aug 2015 20:29:02 +0000 (20:29 +0000)]
Merge "registration: Overhaul merging of globals"

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 2 Aug 2015 19:33:33 +0000 (21:33 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ib39a676086a94d604ccac932170a992ad67b4a41

8 years agoregistration: Overhaul merging of globals
Kunal Mehta [Sat, 1 Aug 2015 07:38:27 +0000 (00:38 -0700)]
registration: Overhaul merging of globals

Instead of hardcoding specific global settings in ExtensionRegistry,
create specific "merge strategies" that are used to merge globals.

Merge strategies are set for core properties in the ExtensionProcessor,
and extensions can set them for their own configuration settings using
the magic "_merge_strategy" key.

The following merge strategies are included:
* array_merge_recursive - call `array_merge_recursive` on the two arrays
* array_plus - use the "+" operator to combine arrays, preserving
               integer keys
* array_plus_2d - A version of array_plus that works on 2d arrays, used
                  for merging arrays like $wgGroupPermissions
* array_merge - call `array_merge` (default)

This changes the merging of various namespaces related settings to use
array_plus so they actually work.

Bug: T107646
Change-Id: I64cb0553864e3b78b0f203333f58bb73b86a6434

8 years agoUpdate the comment in MessagesAzb.php to be consistent with Names.php
Amir E. Aharoni [Sun, 2 Aug 2015 17:33:35 +0000 (20:33 +0300)]
Update the comment in MessagesAzb.php to be consistent with Names.php

Change-Id: I86ae4c514eebaaea6072c9b67bd35915c7b4c3e4

8 years agoApiQueryInfo: Remove unused variable
Kunal Mehta [Sun, 2 Aug 2015 08:16:14 +0000 (01:16 -0700)]
ApiQueryInfo: Remove unused variable

Change-Id: I071ba28ef8ba9f8b137f5e0ea4c7e1fca35cdede

8 years agoRemove classmap-authoratative: true from composer.json
Bryan Davis [Sun, 2 Aug 2015 02:07:21 +0000 (20:07 -0600)]
Remove classmap-authoratative: true from composer.json

The use of classmap-authoratative: true provides a measurable
performance improvement for MediaWiki on the WMF production cluster, but
that environment really uses the composer.json in the
mediawiki/vendor.git repo and not the composer.json in
mediawiki/core.git. Since this setting is merely performance enhancing
and can be worked around for WMF and other large scale users, it seems
reasonable to change the default behavior to be more friendly to
development use where there may be legitimate reasons for PSR0/4
autoloaders (eg bootstrapped tests in extensions).

Bug: T107682
Change-Id: I805c1b82eb6bc93bf3a74a8a9d07e34f2f8c645f

8 years agoUse notification on successful preferences save
Geoffrey Mon [Sun, 7 Jun 2015 00:51:41 +0000 (20:51 -0400)]
Use notification on successful preferences save

"Now 98.6% leaner!"

* Use Xml::tags() for cleaner (old) successbox generation.
* Use #mw-preferences-success for the old successbox
  to make its removal more specific.
* Use the mw.notify box for saved prefs message.
* Remove box on keydown or mousedown in #preftoc or
  .prefsection.
* Remove success=1 querystring on load to prevent
  unnecessary reappearance of notification on reload.

Bug: T19496
Change-Id: Ibecbe21aa52ddc061d4bb27815f6fa5161a96735

8 years agoUse XmlSelect in SpecialListusers
Geoffrey Mon [Sat, 1 Aug 2015 21:15:58 +0000 (21:15 +0000)]
Use XmlSelect in SpecialListusers

Bug: T93234
Change-Id: I25cdd8f7eb1bbfd893d201f6c68f5ccfabe70bf3

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 1 Aug 2015 19:33:52 +0000 (21:33 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ibdd18216129fb8ab0180d07083521e4a0520c30c

8 years agoresourceloader: Remove ESI support (previously disabled)
Timo Tijhof [Fri, 31 Jul 2015 19:34:10 +0000 (12:34 -0700)]
resourceloader: Remove ESI support (previously disabled)

These were never enabled or used in production and are not
compatible with the upcoming async changes (T107399). To avoid
having to maintain compatibility with this, remove it for now.

The current on-going request to operations for ESI support is unrelated
to this code.

Considered making makeResourceLoaderLink() protected as it's not
used anywhere in @wikimedia Git outside mediawiki-core. And the unit
test actually treated it as protected already. However it's called
in SpecialJavaScriptTest so leaving that as-is for now.

In Icba6d7a87b239 the signature will change again with the removal
of the $loadCall parameter, which is obsolete in an async world
due to document.write being forbidden.

Change-Id: I9f557cc794638ffd15329934865e21e1027f7cfa

8 years agoOutputPage: Add \n between </style> and <script>
Fomafix [Sat, 1 Aug 2015 12:24:45 +0000 (12:24 +0000)]
OutputPage: Add \n between </style> and <script>

The ResourceLoader does not add a newline anymore.

Change-Id: Idfdbd0a8836ab2ec7abef1530ca883fb6d618eb4

8 years agoregistration: Fix merging of $wgRevokePermissions
Kunal Mehta [Sat, 1 Aug 2015 06:40:07 +0000 (23:40 -0700)]
registration: Fix merging of $wgRevokePermissions

It's the same as $wgGroupPermissions.

Change-Id: I9c289219c53314970e7af5998c00d6a372bb00cb

8 years agoregistration: Fix "namespaces" schema to match code
Kunal Mehta [Sat, 1 Aug 2015 06:01:59 +0000 (23:01 -0700)]
registration: Fix "namespaces" schema to match code

The "namespaces" property is supposed to be an array of objects, not an
object. Document the properties of the individual objects, and mark the
actually required ones as required.

Change-Id: Ie3cee3e720b962073a1ff098659faa9f11d44fe3

8 years agoMerge "Revision::newNullRevision: Make sure the Title is set in the constructor"
jenkins-bot [Sat, 1 Aug 2015 01:05:13 +0000 (01:05 +0000)]
Merge "Revision::newNullRevision: Make sure the Title is set in the constructor"

8 years agoRevision::newNullRevision: Make sure the Title is set in the constructor
Kunal Mehta [Sat, 1 Aug 2015 00:00:48 +0000 (17:00 -0700)]
Revision::newNullRevision: Make sure the Title is set in the constructor

Revision::__construct() calls Revision::getContentModel() to initialize
the 'content_model' field. If a Title object is not set, it will try to
look up the page in the slave database, which might be behind. At that
point it will default to wikitext, which is problematic during imports.

By passing the Title object in the constructor instead of afterwards,
the content model should be intialized properly.

Bug: T91170
Change-Id: I7fea996ea5b723967272af8cb344150aea10bb54

8 years agoMerge "mediawiki.filewarning: Use 'visibility: hidden' instead of 'display: none'"
jenkins-bot [Sat, 1 Aug 2015 00:00:38 +0000 (00:00 +0000)]
Merge "mediawiki.filewarning: Use 'visibility: hidden' instead of 'display: none'"

8 years agoMerge "mw.widgets.DateInputWidget: Allow not having a date selected"
jenkins-bot [Sat, 1 Aug 2015 00:00:17 +0000 (00:00 +0000)]
Merge "mw.widgets.DateInputWidget: Allow not having a date selected"

8 years agoRevert I4afaecd8: Avoiding writing sessions for no reason
Ori.livneh [Fri, 31 Jul 2015 23:13:35 +0000 (23:13 +0000)]
Revert I4afaecd8: Avoiding writing sessions for no reason

I4afaecd8 reduced the frequency at which the TTL of sessions keys is reset, on
the assumption that we were doing it a whole lot more often than necessary.
We can now assume that this assumption was false, because an uncommitted revert
of this change which I pushed to production earlier caused the rate of session
loss errors in the logs to plummet.

Bug: T102199
Change-Id: Ie67f4ca000afcf3d4f44155c13f91cd4c286866d

8 years agoFix spelling mistake in ResourceLoader inline documentation
Ori Livneh [Fri, 31 Jul 2015 02:07:43 +0000 (19:07 -0700)]
Fix spelling mistake in ResourceLoader inline documentation

Change-Id: Ie099eed12ba45aeb1d3b8b08c911222af25e42fa

8 years agorefreshLinks.php: Fix deletion of link entries from nonexistent pages
Kevin Israel [Fri, 31 Jul 2015 22:16:24 +0000 (18:16 -0400)]
refreshLinks.php: Fix deletion of link entries from nonexistent pages

After checking a chunk of one of the links tables, the script failed
to restore the original chunk start when checking the next table.

Follows-up a1e005155921.

Bug: T107632
Change-Id: I21678bc3c83946f2e62afe3fdc69c7e84678ceeb

8 years agomediawiki.filewarning: Use 'visibility: hidden' instead of 'display: none'
Bartosz Dziewoński [Fri, 31 Jul 2015 21:27:47 +0000 (23:27 +0200)]
mediawiki.filewarning: Use 'visibility: hidden' instead of 'display: none'

Setting 'display: none' causes OOjs UI to get confused when it's
trying to show the popup and calculating its position.

Bug: T107554
Change-Id: Iaf8d728c58efd67cdb965b4cd529164aaabc02be

8 years agoMerge "Monolog: Add Formatter that uses MWExceptionHandler::getRedactedTraceAsString"
jenkins-bot [Fri, 31 Jul 2015 19:52:02 +0000 (19:52 +0000)]
Merge "Monolog: Add Formatter that uses MWExceptionHandler::getRedactedTraceAsString"

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 31 Jul 2015 19:29:37 +0000 (21:29 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ibfb6ba5ceb9cc7cc8365891a76936c7754afabea

8 years agoMonolog: Add Formatter that uses MWExceptionHandler::getRedactedTraceAsString
Bryan Davis [Thu, 30 Jul 2015 19:02:35 +0000 (13:02 -0600)]
Monolog: Add Formatter that uses MWExceptionHandler::getRedactedTraceAsString

Add a Monolog Formatter class that uses
MWExceptionHandler::getRedactedTraceAsString when outputting stack
traces.

Bug: T107440
Change-Id: Ic580c137e27aac95435f7b073a18cf61820b172f

8 years agomw.widgets.DateInputWidget: Allow not having a date selected
Bartosz Dziewoński [Thu, 30 Jul 2015 22:36:19 +0000 (00:36 +0200)]
mw.widgets.DateInputWidget: Allow not having a date selected

* Allow empty value, that is, no date being selected. Display
  an appropriate label when that is the case.
* Start with no date selected, rather than today's date.
* When the field is empty and gets focus, set the date to today, on
  the assumption that this is likely what the user wants. Permit
  emptying the field, though.
* Highlight today's date on the calendar.

Bonus cleanup:

* Update the UI from #setValue, immediately when needed.
* Improve validation of incoming values.
* Correct some documentation.
* Correct some bad copy-paste in styles which caused disabled widget
  to not display correctly.

Change-Id: I7a1f7ff20eb6fc21ea59ecfe48deb9305c8e29e8

8 years agoresourceloader: Use WrappedString library to merge RLQ inline scripts
Timo Tijhof [Fri, 31 Jul 2015 00:13:04 +0000 (17:13 -0700)]
resourceloader: Use WrappedString library to merge RLQ inline scripts

Update unit test to account for the internal 'html' prop now
being an array instead of string. And update expected values to
no longer have a trailing line break.

Bug: T27202
Change-Id: I105b6ef2e64ab8b891562e16940edb88592bd415

8 years agoXmlSelect: Tweak documentation
Bartosz Dziewoński [Thu, 30 Jul 2015 21:03:19 +0000 (23:03 +0200)]
XmlSelect: Tweak documentation

Correct some variable names and types, also some words.

Change-Id: I7ff0664f7ac4f26be8427a2140e2280aa7620657

8 years agoUse Perso-Arabic numberic system for South Azeri (azb)
mjbmr [Thu, 30 Jul 2015 14:31:40 +0000 (14:31 +0000)]
Use Perso-Arabic numberic system for South Azeri (azb)

Change-Id: Ifb0e8edc1ca4d0720ceb048a46589158b34eec52

8 years agoMerge "Added sanitizeHdrs() tests for Swift"
jenkins-bot [Fri, 31 Jul 2015 09:32:03 +0000 (09:32 +0000)]
Merge "Added sanitizeHdrs() tests for Swift"

8 years agoMerge "array_shift returns null on empty array, not false"
jenkins-bot [Fri, 31 Jul 2015 01:43:26 +0000 (01:43 +0000)]
Merge "array_shift returns null on empty array, not false"

8 years agoarray_shift returns null on empty array, not false
Matthew Flaschen [Fri, 31 Jul 2015 01:27:07 +0000 (21:27 -0400)]
array_shift returns null on empty array, not false

Change-Id: I690f9dd0de11ff60f9cba9f401c6e456e7ba8bd6

8 years agoAdd wikimedia/wrappedstring library
Timo Tijhof [Fri, 31 Jul 2015 00:31:58 +0000 (17:31 -0700)]
Add wikimedia/wrappedstring library

Depends on I9a468fd65f1 in mediawiki/vendor.

Change-Id: I3f952aa059d930130a8d712e39798cc1031e0a25

8 years agoMerge "Actually run the Less compilation tests"
jenkins-bot [Thu, 30 Jul 2015 23:33:12 +0000 (23:33 +0000)]
Merge "Actually run the Less compilation tests"