Commit graph

61696 commits

Author SHA1 Message Date
Aaron Schulz
7480b9250c Avoid excess master queries in getTimestampFromId
Bug: T92357
Change-Id: Id5cf7a5620daeee12abfa778f9be19435f3e5e84
2015-03-11 14:37:14 -07:00
Translation updater bot
4938afe99b Merge "Localisation updates from https://translatewiki.net." 2015-03-11 20:53:36 +00:00
Translation updater bot
f472ffd2b4 Localisation updates from https://translatewiki.net.
Change-Id: I384c8214ba8453349d0b7cc90b954580bd571011
2015-03-11 21:50:32 +01:00
Timo Tijhof
3ed7b27f7b OutputPage: Condition-wrap the <script> for 'user.groups'
Follows-up 9d390a09cd. It already wraps the only=script requests
for 'site' and 'user', but forgot about 'user.groups' which is
not 'scripts' but 'combined' (as regular module requests).

That request responds with mw.loader.implement whih will be absent
if the environment is unsupported.

With normal module requests, this is naturally covered by those
requests not being fired from mw.loader in the first place but
with hardcoded requests like these the condition wrap with
document.write is unfortunately required in the current reality.

Change-Id: Ib3a7378d0c44e601760fbbc5174da09bd7b7f492
2015-03-11 19:33:24 +00:00
Aaron Schulz
353659085c Mention metrics in IContextSource docs
Change-Id: I9b654a12578758471978ffd1e1ae20476aeeaa0d
2015-03-11 19:15:33 +00:00
jenkins-bot
cc4f2e6d44 Merge "mediawiki.js: clean-ups" 2015-03-11 18:36:49 +00:00
Ori Livneh
eece5d6b76 mediawiki.js: clean-ups
* Inline canExpandStylesheetWith().
* Make resolve() take an array of module names instead of being flexible
  (taking either a string or an array). It's a private method, so it doesn't
  need to have a cute API.
* Use simple string concatenation rather than [].join in pad()
* Make allReady() more efficient by having it bail early as soon as any
  non-ready module is encountered.
* Add anyFailed(), which is a complement to allReady().
* Remove filter(). In more than one place, it was used to check whether a
  module in some specified state existed in a list of modules, which is
  inefficient, since filter() continues iterating through the array of modules
  after finding a match and because it constructed an array with the matches,
  which was not needed.
* Replace some verbose array iteration with $.grep / $.map / $.each.

Change-Id: I22a2f824488ba39d03b546ac8560f551a3198d7f
2015-03-11 11:25:29 -07:00
Aaron Schulz
b480ec3353 Made JobQueueFederated no longer need "checkDelay" for delaying
This reverts commit b9fd0f311c.

Change-Id: Ibff28591c268689d593cb56a58e0b33c22292eba
2015-03-11 11:15:40 -07:00
Aaron Schulz
ce33c484ed Made JobQueueFederated::supportsDelayedJobs() check all the partition queues
Change-Id: Id451faedd6286a84f993fa183e67e0bf35d21c41
2015-03-11 11:10:12 -07:00
jenkins-bot
612092a512 Merge "Revert "Made JobQueueFederated no longer need "checkDelay" for delaying"" 2015-03-11 17:17:33 +00:00
Legoktm
b9fd0f311c Revert "Made JobQueueFederated no longer need "checkDelay" for delaying"
Breaks Cirrus and Wikibase

This reverts commit c8f96384aa.

Change-Id: I15278d52806bf30d6ea6c6b9eb8586160f65c42b
2015-03-11 17:10:18 +00:00
Gergő Tisza
98248ddeeb mw.loader: Replace log() calls with mw.track events
This allows other consumers (such as an error logging backend) to
subscribe to these errors.

Change-Id: I157e2fb5c6b4d77736fcaf0a87c624e76a833161
2015-03-11 17:26:11 +01:00
jenkins-bot
659a45c263 Merge "jsduck: Add 'mediawiki.startUp.js' to eg-iframe" 2015-03-11 15:20:20 +00:00
jenkins-bot
71f27c7d4b Merge "FeedItem: Use full URL with protocol for <id>/<guid> in Atom/RSS feeds" 2015-03-11 15:01:18 +00:00
Timo Tijhof
ef3d4c20c4 jsduck: Add 'mediawiki.startUp.js' to eg-iframe
Follows-up 2ea420eed8. Without this, the startUp() is never called,
and mw.config remains undefined which caused some of the examples
to no longer work properly.

Also move onerror handler to first <script> (follows-up a64a07d).
Exceptions from other code (eg. startup or mediawiki modules),
were not being caught.

Also include 'error' in the line being logged from onerror.

Change-Id: I3956da40b0bd862acab6d4552932aa609c17d569
2015-03-11 14:47:51 +00:00
Timo Tijhof
a64a07dfbb jsduck: Refactor example iframe to catch uncaught errors
* Make logging function not depend on 'mw' existing.
* Add window.onerror handler.
* Keep exporting to mw.log because that's what existing examples
  use and is what uses should copy for interoperability with the
  regular runtime.

Change-Id: I2925532035974343125e34084f9ac7c8dd1fa279
2015-03-11 14:22:43 +00:00
Brian Wolff
5d9b67e09e Allow edit summaries to be up to 767 bytes long
This is just the db part. The changes to UI validation code will
come in a dependent patch later.

This changes the max size of various *_comment, *_description
and *_reason fields to be 767 bytes. This size is chosen to
be consistent with the largest we can get away with while
still having covering indexes.

It also unifies the various data types of these fields to
varbinary. (Note, this was previously done and reverted in
r80547, but I don't think the reason for revert applies to
the edit summary fields)

MyISAM has a much smaller max index size, and this wouldn't
work with that storage engine. However, none of these fields
are used in default indexes (only in WMF indexes), so this
should not be an issue for anyone using MyISAM. Postgress
and sqlite already supported the larger edit summary size.

Note: This patch increases min mysql version to 5.0.3.

Bug: T6715
Change-Id: I8558e80a18e4591f07f2c3e80f792ea4435c4e71
2015-03-11 13:36:38 +00:00
Aaron Schulz
3c2bc32ae1 Removed newFromConds master fallback logic; obsoleted by $flags
Bug: T86862
Change-Id: I6867a61fff9828fb32b063c1e84872e910c4b273
2015-03-10 20:53:44 -07:00
Brad Jorsch
bfe07bed33 API: Remove explicit profiling
The profileIn/profileOut pair should be covered by the Xhprof profiling
of the method calls it was wrapping.

The profileDBIn/profileDBOut pair are covered by profiling done by the
Database class.

Nothing in extensions in Gerrit is calling anything besides the
profileIn/profileOut pair (and likely those are only to avoid core
formerly throwing exceptions from internal profileDBIn/profileDBOut
calls), and nothing in core or extensions-in-Gerrit is using the methods
for fetching profiling data.

The methods are left as stubs for now to allow for backwards
compatibility in extensions.

Change-Id: I05ba4e2762dc86d5e2bafc183dce701239b43f5c
2015-03-10 18:35:22 -04:00
Aaron Schulz
c8f96384aa Made JobQueueFederated no longer need "checkDelay" for delaying
* Cleaned up the weird logic for checking if delays are supported

Change-Id: I3a1a78bb48b4950b76f445bf8c27b5868d3dc89c
2015-03-10 15:13:18 -07:00
Translation updater bot
608e7b19e5 Localisation updates from https://translatewiki.net.
Change-Id: I3be2b9a50b5695cd9c247bb9a0a49af82eed6ffd
2015-03-10 22:09:43 +01:00
jenkins-bot
ca3ac3dfb8 Merge "mw.ui: button: Update focus state" 2015-03-10 18:25:42 +00:00
jenkins-bot
3823118cd8 Merge "Introduce the Restbase Virtual REST Service class" 2015-03-10 17:08:14 +00:00
jenkins-bot
28b59da2a1 Merge "Update the Chinese conversion table for Chinese WikiProjects" 2015-03-10 13:58:22 +00:00
Aaron Schulz
b48f51c522 Minor doc fixes
Change-Id: I80678e64cafcfd6e2c779452f466d8a630089568
2015-03-09 23:08:37 -07:00
jenkins-bot
fed208086b Merge "mediawiki.jqueryMsg: Fix examples in comments" 2015-03-10 01:58:51 +00:00
jenkins-bot
0446b8eb33 Merge "Add StatsD metric logging" 2015-03-10 00:26:30 +00:00
jenkins-bot
d7254e38d5 Merge "Specify max compatible kss version" 2015-03-10 00:25:02 +00:00
Ori Livneh
87dfc20b1e Add StatsD metric logging
This patch adds a metric data service object to the IContextSource interface,
with full support for StatsD meters, gauges, counters and timing metrics, via
the liuggio/statsd-php-client, which this patch also introduces.

Usage example:

    $stats = $context->getStats();
    $stats->increment( 'resourceloader.cache.hits' );
    $stats->timing( 'resourceloader.cache.rtt', $rtt );

The metrics are flushed to a StatsD server, which may be specified via the
'StatsdServer' configuration key. If no such configuration key exists, the
metrics are discarded.

The StatsD client supplants MediaWiki's StatCounter class. wfIncrStats()
will continue to work, but it will delegate to the StatsD data object.

Change-Id: Ie10db1c154d225971398e189737de7c560bf0f90
2015-03-09 16:57:14 -07:00
Marko Obrovac
b13bd0996c Introduce the Restbase Virtual REST Service class
Restbase, the REST content API service, is to be queried instead of
Parsoid by current Parsoid users (most importantly VE). This patch
introduces the Restbase virtual REST service class and transparently
maps Parsoid calls into Restbase ones if parsoidCompat is set when
creating the service object.

Additionally, $wgVirtualRestConfig is introduced in DefaultSettings.php. This
is a first step towards global service configuration and management.

Bug: T89066
Change-Id: I4d4043e5052327bbd789331f1c05b607c45fe7cb
2015-03-09 22:05:58 +01:00
Fomafix
0d84868ac6 mediawiki.jqueryMsg: Fix examples in comments
Change-Id: Ia6fcb718e9c0ef073ed472af29c8ca4507f45b5a
2015-03-09 20:55:47 +00:00
Translation updater bot
e83bb46bf4 Localisation updates from https://translatewiki.net.
Change-Id: I361e11d5dbbc13010b24e6dd49ff8153f5163535
2015-03-09 21:44:38 +01:00
jenkins-bot
dbbb71b47a Merge "If no secret key is available, don't try to use cache" 2015-03-09 18:54:51 +00:00
jenkins-bot
1f4a23e58f Merge "Added clarifying comments to IContextSource" 2015-03-09 18:44:14 +00:00
Aaron Schulz
46cf4f1e30 Clean up $wgSQLiteDataDir handling and removed standalone sqlite class
* The data directory can now be set via the construction params
* A standalone factory method now replaces the subclass
* Also made mDatabaseFile protected

Change-Id: I1791fd4f630e5c121fa7f68f473411a7c12d0c97
2015-03-09 18:35:24 +00:00
Timo Tijhof
3bbd27aa49 Rename JSDuck config to standard 'jsduck'
* Move configuration to /jsduck.json per standard. This way
  it can be run as plain '$ jsduck' without needing a maintenance
  script or custom Jenkins job. Similar to JSHint, JSCS, Grunt,
  and Gem etc.

* Move --processes=0 from maintenace script into config file.
  This should've been in the config file all along and serves as
  workaround for https://github.com/senchalabs/jsduck/issues/525.

* Use grunt-contrib-copy instead of a symlink for resources.
  For local development a symlink works fine, but for publishing
  from Jenkins to doc.wikimedia.org the /docs/js/ directory needs
  to be standalone. This was previously done with a manual post-build
  step that added an additional rsync, but this logic should be
  in the repository so that the doc entry point can be simplified
  and standardised to 'npm run-script doc' for all projects.

Change-Id: Iaaaac50ee78dd9ff8f24f1ef3a3685ad51cf33b2
2015-03-09 18:10:00 +00:00
rillke
7ba745f854 Make PHP unit parser tests pass again after translation update
- sr-ec.json updated with 17607cf896

Change-Id: I7dfc9bcea2be85dd42d344858ce02246432f7fe1
2015-03-09 13:37:45 +01:00
Translation updater bot
17607cf896 Localisation updates from https://translatewiki.net.
Change-Id: Ifc570f5a883ef4269e9d85b9e634f09e95716581
2015-03-08 21:20:44 +01:00
Bartosz Dziewoński
5709ec0454 FeedItem: Use full URL with protocol for <id>/<guid> in Atom/RSS feeds
Bug: T89975
Change-Id: Ib84932b70aa8194b7bdabe7c90d7fdcc66054a1c
2015-03-07 23:52:44 +01:00
Aaron Schulz
0d84b20a7c Added clarifying comments to IContextSource
* Also removed some duplicated comments

Change-Id: I2c967d0f3219f3533378ecd5f9fccc40c8f9b219
2015-03-07 13:39:07 -08:00
Federico Leva
6ab33238a2 Don't require JavaScript for addHelpLink styles
And avoid wfMessage.
Followup to 376c0a13df

Bug: T45591
Change-Id: I2f02c2a4db609356ff8be30f260490d19f3226d1
2015-03-07 18:59:35 +01:00
jenkins-bot
887fb377d9 Merge "mediawiki.special.upload: One event handling function is enough" 2015-03-07 03:56:12 +00:00
Aaron Schulz
fa212ed345 Push enqueue-on-view jobs to the faster "local" queue
* This only matters for multi-DC setups, otherwise everything is local anyway

Bug: T91819
Change-Id: I0756b59ae1ba27a5d24cf7baef6d068b748e6e30
2015-03-06 13:50:17 -08:00
Translation updater bot
36c125a950 Merge "Localisation updates from https://translatewiki.net." 2015-03-06 21:27:34 +00:00
Translation updater bot
03a7192f5b Localisation updates from https://translatewiki.net.
Change-Id: I5e91846766f3558874fd179fd7a1a3702901bda4
2015-03-06 22:23:26 +01:00
jenkins-bot
78ee62bd76 Merge "Remove isVolatile/markVolatile logic from LocalFile" 2015-03-06 21:23:17 +00:00
Aaron Schulz
7782dee83b Remove isVolatile/markVolatile logic from LocalFile
* This is obsoleted by the "latest" flag
* Follows-up 5085a4b

Bug: T88506 
Change-Id: I808c3a6f0edb3466cb600c06c5e742ab030baf14
2015-03-06 21:12:39 +00:00
jenkins-bot
eec1a53036 Merge "Added EnqueueJob class that handles routing jobs to queues" 2015-03-06 20:03:11 +00:00
Chiefwei
f968119a28 Update the Chinese conversion table for Chinese WikiProjects
The Chinese conversion table is substantially updated to fix a lot of
bugs reported in recent years, and the script generating conversion
table (LanguageZh.php) is also modified to facilitate the maintenance.

Zh-sg and zh-my is set to fallback to zh-cn to improve reading
experience, since there is only trivial difference among them, just like
zh-hk and zh-mo. Further optimization for zh-sg and zh-my will be
performed in local conversion table of Chinese WikiProjects.

Bug: T91620
Change-Id: I1bb0315d6d7a2c9653905654d933942e362bcc42
2015-03-06 19:51:13 +00:00
jenkins-bot
e83daac0e8 Merge "Made wfFindFile/wfLocalFile callers use explicit "latest" flags" 2015-03-06 19:13:50 +00:00