Jesús Martínez Novo [Sun, 24 May 2015 13:50:34 +0000 (15:50 +0200)]
HISTORY: Note new $wgThumbnailBuckets as of 1.24.0
Follow-up of
02ca7bff9b100f9def06dad4b28fe6fdc2c26b44
Bug: T78053
Change-Id: I625fee0c4ba85f80396ea396f3fc0019c612ff76
jenkins-bot [Sun, 24 May 2015 12:22:29 +0000 (12:22 +0000)]
Merge "Implement OOUI display format for HTMLForm"
jenkins-bot [Sun, 24 May 2015 11:30:30 +0000 (11:30 +0000)]
Merge "resourceloader: Rename ResourceLoaderImageModule::ensureStuffLoaded to loadFromDefinition"
jenkins-bot [Sun, 24 May 2015 11:28:15 +0000 (11:28 +0000)]
Merge "installer: Export wgResourceBasePath in LocalSettingsGenerator"
Bartosz Dziewoński [Sat, 23 May 2015 17:06:06 +0000 (19:06 +0200)]
resourceloader: Rename ResourceLoaderImageModule::ensureStuffLoaded to loadFromDefinition
The name was a result of my having a bad day when I wrote that code.
Change-Id: I6b729764a963563f0820b8063c3d04f6e676c61e
Chad Horohoe [Sun, 24 May 2015 09:49:59 +0000 (11:49 +0200)]
Installer: use proto-relative URLs for license picker
While encouraging HTTPS is nice, you pass styling to the CC picker
and when installing on a non-HTTPS host you end up with mixed
content warnings.
Bug: T100146
Change-Id: Iad706072b1b14b0ce2fb1c1597aae46e8ec15136
jenkins-bot [Sun, 24 May 2015 09:48:20 +0000 (09:48 +0000)]
Merge "API: Ignore META_BC_SUBELEMENTS elements that aren't actually set"
jenkins-bot [Sun, 24 May 2015 09:41:01 +0000 (09:41 +0000)]
Merge "On missing php-xml, don't mention Mandrake explicitly in the installer"
Timo Tijhof [Sun, 24 May 2015 09:30:21 +0000 (11:30 +0200)]
installer: Export wgResourceBasePath in LocalSettingsGenerator
wgRightsIcon uses wgResourceBasePath in its value, therefore it
must be exported first. Otherwise $wgResourceBasePath will still
be null (as from DefaultSettings.php) and cause an incorrect
value to be assigned.
Also fix $wgLogo to use wgResourceBasePath instead of wgScriptPath,
to match what Setup.php does already.
Bug: T75031
Change-Id: I6f18895f3caa50871327eec108fc7d70c1077f1e
jenkins-bot [Sun, 24 May 2015 08:56:15 +0000 (08:56 +0000)]
Merge "Export allowed tags from Sanitizer to mediawiki.jqueryMsg"
Brad Jorsch [Sat, 23 May 2015 06:48:55 +0000 (08:48 +0200)]
Export allowed tags from Sanitizer to mediawiki.jqueryMsg
Specifically, we export only those that are allowed to be paired,
because its parser doesn't handle self-closing tags.
Bug: T66740
Change-Id: I9944f9af915715c57a7d9ce3c62c3e61e54a75ba
Nemo bis [Thu, 14 May 2015 13:23:08 +0000 (15:23 +0200)]
On missing php-xml, don't mention Mandrake explicitly in the installer
"Mandrake" would be "Mageia" now, but the package advice may apply (or
not) to other distributions as well as the package exists in multiple.
https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Config-xml-bad/es
Change-Id: I6910e0400f2ad9f97f54cb970165d1146d6bf0a2
Kunal Mehta [Sat, 23 May 2015 21:34:25 +0000 (23:34 +0200)]
XMP: Use structured logging instead of wfDebugLog
Co-Authored-By: Brian Wolff <bawolff+wn@gmail.com>
Change-Id: I486192a718576a4d1e585ffb390e297b14dde087
jenkins-bot [Sat, 23 May 2015 21:36:55 +0000 (21:36 +0000)]
Merge "XMP: Throw generic exceptions instead of MWException"
Kunal Mehta [Sat, 23 May 2015 21:26:16 +0000 (23:26 +0200)]
XMP: Throw generic exceptions instead of MWException
Change-Id: I8bd81cfccedaa6f474e541b71c93c66150b6f7b3
Translation updater bot [Sat, 23 May 2015 21:24:54 +0000 (21:24 +0000)]
Merge "Localisation updates from https://translatewiki.net."
Translation updater bot [Sat, 23 May 2015 21:19:41 +0000 (23:19 +0200)]
Localisation updates from https://translatewiki.net.
Change-Id: I5b90c8fd056231ded8e22cff284d76a60539fbe3
jenkins-bot [Sat, 23 May 2015 21:15:02 +0000 (21:15 +0000)]
Merge "Remove unused 'XMPGetInfo' and 'XMPGetResults' hooks"
Kunal Mehta [Sat, 23 May 2015 21:05:10 +0000 (23:05 +0200)]
Remove unused 'XMPGetInfo' and 'XMPGetResults' hooks
These hooks are unused in all extensions in Gerrit. We need to remove
them so we can move these classes into a separate library.
Change-Id: I66406c642168adc703361b75deb95c830c1ddab1
jenkins-bot [Sat, 23 May 2015 20:57:19 +0000 (20:57 +0000)]
Merge "Special:PageLanguage: Show log extract only when title known"
jenkins-bot [Sat, 23 May 2015 20:56:32 +0000 (20:56 +0000)]
Merge "Update namespace aliases for Luri (lrc) from translatewiki"
jenkins-bot [Sat, 23 May 2015 20:36:25 +0000 (20:36 +0000)]
Merge "Remove MWLogger and non-namespaced MWLogger* shim classes"
Bryan Davis [Sat, 23 May 2015 20:10:28 +0000 (22:10 +0200)]
Remove MWLogger and non-namespaced MWLogger* shim classes
These classes were introduced and deprecated during the 1.25 development
cycle.
Bug: 100098
Change-Id: I3a479d194bdf5137f99a7e27fc71c7b438b1e136
jenkins-bot [Sat, 23 May 2015 20:27:11 +0000 (20:27 +0000)]
Merge "Add gender in message 'editinguser'"
Florian [Thu, 7 May 2015 16:01:38 +0000 (18:01 +0200)]
Fix false Namespaceselector value for "all" on Special:LinkSearch
Added the ability to define the value in HTMLSelectNamespace.
Bug: T98496
Follow-Up: I8503c391a40f1654f8570578a9de9015d86c9845
Change-Id: Ic6a871507a027d28b3aeb1efeb9abbceb5734a9e
Yuri Astrakhan [Tue, 12 May 2015 20:16:47 +0000 (23:16 +0300)]
Replaced spaces with underscores in NS_ consts
* All $namespaceNames and similar messages
that reference NS_* constants seem to use '_' for spaces,
except a few cases. I suspect its a mistake, thus replacing.
Regexes used:
([^'"\n]*['"][^'"\n]*(['"][^'"\n]*['"])*[^'"\n]*[^A-Za-z0-9]NS_)
contains a space in front, replaced with _\1
[^A-Za-z0-9]NS_([^'"\n]*['"][^'"\n]*['"])*[^'"\n]*['"][^'"\n]*
contains a space at the very end, replaced with \1_
Change-Id: Ibbc201678ee91db2b5bf3de597c1598b86558d77
umherirrender [Sat, 23 May 2015 19:41:01 +0000 (21:41 +0200)]
Special:PageLanguage: Show log extract only when title known
When open Special:PageLanguage without a page, the whole pagelang log is
shown and the notice:
Title::newFromText: $text must be a string. This will throw an
InvalidArgumentException in future. [Called from LogPager::limitTitle]
The whole log is useless at this position, so showing it only when
looking at a specific page.
Change-Id: I2a0b7ccc71789506554617e1d12797e72835a12a
Aaron Schulz [Fri, 22 May 2015 23:39:05 +0000 (16:39 -0700)]
Cleaned up CAS check in RevDelLogItem::setBits for recentchanges
Change-Id: I6c29653361a0937489c27891739a9dc626c20167
Aaron Schulz [Sat, 23 May 2015 18:04:18 +0000 (11:04 -0700)]
Cleaned up some Job doc types
Change-Id: I205345819bc07575995ab9aff54f40d547bd1d6f
Aaron Schulz [Fri, 22 May 2015 23:31:06 +0000 (16:31 -0700)]
Actually set the $res field via doQuery() in setVisibility
* Otherwise, it is thrown away and redone on a slave
Change-Id: I1252fa5bc98d908cf289f4d93cbdd8d6d33828ea
jenkins-bot [Sat, 23 May 2015 16:53:57 +0000 (16:53 +0000)]
Merge "resources: Add OOjs UI's Apex theme's files"
Bartosz Dziewoński [Sat, 23 May 2015 15:16:36 +0000 (17:16 +0200)]
resources: Add OOjs UI's Apex theme's files
Currently not used, but there are big plans for them!
Change-Id: Iaa0e82a3ebda4665c5eafac5167c8912e82199d4
Seb35 [Sat, 23 May 2015 15:41:07 +0000 (17:41 +0200)]
Add gender in message 'editinguser'
Bug: T99223
Change-Id: Ie8b2a569f9f213c9d2683907c6d17dc637083359
jenkins-bot [Sat, 23 May 2015 15:15:58 +0000 (15:15 +0000)]
Merge "Check for dependencies in entry point and Maintenance.php"
jenkins-bot [Sat, 23 May 2015 15:15:54 +0000 (15:15 +0000)]
Merge "mediawiki.language: Respect $wgTranslateNumerals in convertNumber()"
aude [Sat, 18 Apr 2015 09:37:10 +0000 (05:37 -0400)]
Check for dependencies in entry point and Maintenance.php
This way, if someone tries to install MediaWiki via
either web installer or install.php maintenance script,
after obtaining from git, they get some useful information
on what to do.
Put the checks alongside the php version check, as
stuff installed via composer (mustache / lightncandy)
is used for NoLocalSettings.php and install.php
attempts to use logging stuff.
Also tried to make PHPVersionError look slightly nicer,
with some <h2> elements and more padding for the <p>
elements.
and centralized this code in one place, as much as possible,
for improved ease of maintenance.
Bug: T90438
Bug: T88951
Change-Id: Iae4eb42c4266dbe9213c5de8a96fccfbeaa9acb0
jenkins-bot [Sat, 23 May 2015 14:27:19 +0000 (14:27 +0000)]
Merge "Fix edit link for messages in $wgForceUIMsgAsContentMsg"
jenkins-bot [Sat, 23 May 2015 14:22:04 +0000 (14:22 +0000)]
Merge "Format number for message 'title-invalid-too-long'"
jenkins-bot [Sat, 23 May 2015 14:19:11 +0000 (14:19 +0000)]
Merge "Add explicit plural for number of bytes"
Mark Holmquist [Tue, 21 Apr 2015 21:03:49 +0000 (16:03 -0500)]
Implement OOUI display format for HTMLForm
Bug: T85291
Change-Id: I6ffe93c16d6b209a0ab08d714ad8ddaefb6acd52
Siebrand Mazeland [Sat, 23 May 2015 12:23:14 +0000 (14:23 +0200)]
Add explicit plural for number of bytes
Reported by Purodha at
https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Title-invalid-too-long/ksh
Change-Id: I5555826ce3f71741696cbb2ef2521fe1ff7e6253
jenkins-bot [Sat, 23 May 2015 13:23:52 +0000 (13:23 +0000)]
Merge "SpecialStatsAddExtra: Format column label with msg"
Aaron Schulz [Fri, 22 May 2015 20:49:29 +0000 (13:49 -0700)]
Added $res var docs for RevisionListBase
Change-Id: Ib71b9c662e68b64f1c6ad07c1902ed8ed432f175
umherirrender [Sat, 23 May 2015 13:04:21 +0000 (15:04 +0200)]
Format number for message 'title-invalid-too-long'
Follow-Up: I4da8ecb457a77473e32d745ba48ab8505b35e45f
Change-Id: I30ebf2a21bb09d992140baa2bd8707a674da6d51
Mark A. Hershberger [Thu, 30 Apr 2015 02:40:48 +0000 (22:40 -0400)]
SpecialStatsAddExtra: Format column label with msg
This allows the user of the SpecialStatsAddExtra hook to provide
formatting for the row label using an i18n message key. If given, the
message is given the row key as a parameter. To maintain backward
compatibility, the key is used as-is as was done previously if a message
key is not provided.
Bug: T97623
Change-Id: I43c522b24372e115ed78adf69848bf50cbab8295
Translation updater bot [Fri, 22 May 2015 22:26:03 +0000 (00:26 +0200)]
Localisation updates from https://translatewiki.net.
Change-Id: I49999070014b45d52c59ec38c4bd84202e1172c6
Aaron Schulz [Thu, 21 May 2015 07:21:03 +0000 (00:21 -0700)]
Made RecentChange defer the save() method via DeferredUpdates
* Also made it handle calling PatrolLog::record() itself
Bug: T100042
Change-Id: I58ef060e02b89a5f9dadc0dbc4edba667932beda
Translation updater bot [Thu, 21 May 2015 20:14:53 +0000 (22:14 +0200)]
Localisation updates from https://translatewiki.net.
Change-Id: I0b708cf7c6301f57aa618284f960b9701157cf15
Aaron Schulz [Thu, 21 May 2015 06:13:28 +0000 (23:13 -0700)]
Defer some updates in doEditUpdates()
* These updates add to editing time and can be done
after sending the HTTP response for performance
* Also improved the active users job insertion logic
Change-Id: I5b25217c4f08db7fa9a05eac046283f02d45865e
Ori Livneh [Thu, 21 May 2015 19:16:24 +0000 (12:16 -0700)]
ProfilerOutputStats: replace single ':' with '.', too
This maps 'hook: ' and 'query: ' to a metric name segment, instead of just a
metric name prefix.
Change-Id: I41fb71becbc862597b998c73ccfcaca5a3510ffc
Ori Livneh [Thu, 21 May 2015 18:36:51 +0000 (11:36 -0700)]
Improve ProfilerXhprof's blacklist/whitelist capabilities
* Apply the blacklist / whitelist to profiled sections, not just function names.
* Allow shell-style wildcard patterns in blacklist / whitelist.
* Prefix all profiled section names with 'section.', to distinguish them from
functions.
Note that shell-style wildcard patterns are not supported by xhprof natively,
but it won't barf on them either, nor will they match against actual function
names (since shell wildcard characters are not valid for PHP function names),
and the filtering will still be enforced in ProfilerXhprof.
This has the side-effect of working around https://github.com/facebook/hhvm/issues/4385
Bug: T99829
Change-Id: I8354ed922fa7b42857eda03be8f62b89ac78d0d6
jenkins-bot [Thu, 21 May 2015 19:05:56 +0000 (19:05 +0000)]
Merge "API: Add 'wrfromtitle' and 'wrtotitle' to list=watchlistraw"
jenkins-bot [Thu, 21 May 2015 18:57:20 +0000 (18:57 +0000)]
Merge "Avoid calling load() in LocalFile::invalidateCache; not needed"
jenkins-bot [Thu, 21 May 2015 18:51:21 +0000 (18:51 +0000)]
Merge "ProfilerOutputStats: allow a key prefix to be specified"
Aaron Schulz [Thu, 21 May 2015 18:23:19 +0000 (11:23 -0700)]
Avoid calling load() in LocalFile::invalidateCache; not needed
Change-Id: I1e2d61722a18e4046bdf7c375ea9c1dbbea4a157
Ori Livneh [Thu, 21 May 2015 18:07:39 +0000 (11:07 -0700)]
ProfilerOutputStats: allow a key prefix to be specified
If one wants to nest all metrics emitted by the profiler under a metric
namespace, one can now set the 'prefix' param.
Task: T66301
Change-Id: I6c52f20e39017f4c818ca6623bb7f48683fc8abc
jenkins-bot [Thu, 21 May 2015 17:54:21 +0000 (17:54 +0000)]
Merge "Search: Allow searchContainedSyntax to be defined by constructor"
jenkins-bot [Thu, 21 May 2015 17:33:05 +0000 (17:33 +0000)]
Merge "registration: Don't ignore empty array config settings when converting"
jenkins-bot [Thu, 21 May 2015 17:27:35 +0000 (17:27 +0000)]
Merge "registration: Add test case to demonstrate T98347 is invalid"
Kunal Mehta [Tue, 12 May 2015 16:26:24 +0000 (09:26 -0700)]
registration: Don't ignore empty array config settings when converting
Remember which settings we set to an empty array and then only skip
those settings.
The weird variable name "$__settings" is used to avoid any conflicts
similar to what eval.php does.
Bug: T98739
Change-Id: Iefbf8a98fd433cfbe0087aca6821d90c2786b0cb
Brad Jorsch [Wed, 13 May 2015 18:42:39 +0000 (14:42 -0400)]
API: Add 'wrfromtitle' and 'wrtotitle' to list=watchlistraw
Naming is "fromtitle" rather than just "from" because "from" parameters
in API query modules generally mean a title without namespace, and this
should make use of the client-supplied namespace.
Bug: T98985
Change-Id: I8370f47f6eed71ea97a44a66eb6be2a8f89fea53
jenkins-bot [Thu, 21 May 2015 10:23:49 +0000 (10:23 +0000)]
Merge "Avoid pointless getNativeData() call in isCountable()"
Aaron Schulz [Thu, 21 May 2015 06:56:25 +0000 (23:56 -0700)]
Avoid pointless getNativeData() call in isCountable()
Change-Id: I40ed1972a8815de645d11217b35c1060d5007e5a
Aaron Schulz [Thu, 21 May 2015 06:06:05 +0000 (23:06 -0700)]
Make sure $dbw is an object in DeferredUpdates::addUpdate()
Change-Id: Ib52574bc7f2e13bf06f595e349a7b3ccea425056
jenkins-bot [Wed, 20 May 2015 23:56:25 +0000 (23:56 +0000)]
Merge "registration: Notify of problems before filemtime, not after"
Mark A. Hershberger [Wed, 20 May 2015 22:07:15 +0000 (18:07 -0400)]
registration: Notify of problems before filemtime, not after
Without this several lines of warning are emitted before the final error indicating the cause.
Bug: T99846
Change-Id: Ic1b9d9a80ed995273c56c447c8b044285a8843a7
Aaron Schulz [Wed, 20 May 2015 23:01:51 +0000 (16:01 -0700)]
Flush lazy jobs in load.php and api.php too
* A more proper solution will have one method for all this stuff
Bug: T99775
Bug: T99849
Change-Id: I16a32b260386a85504eb85ea58f1156b4e581a83
kaldari [Wed, 20 May 2015 21:47:14 +0000 (21:47 +0000)]
Merge "Bumping lightncandy version from 0.18 to 0.21"
jenkins-bot [Wed, 20 May 2015 20:25:17 +0000 (20:25 +0000)]
Merge "Fix Special:Preferences onBeforeUnload handler"
jenkins-bot [Wed, 20 May 2015 20:10:02 +0000 (20:10 +0000)]
Merge "Pass a message key to MalformedTitleException constructor"
Florian [Wed, 20 May 2015 20:05:24 +0000 (22:05 +0200)]
Fix Special:Preferences onBeforeUnload handler
Bug: T94194
Change-Id: If9e3836c6061cf99dc0859dafb99b9456e6efd0e
Translation updater bot [Wed, 20 May 2015 19:45:18 +0000 (19:45 +0000)]
Merge "Localisation updates from https://translatewiki.net."
Brad Jorsch [Wed, 20 May 2015 19:44:01 +0000 (15:44 -0400)]
Pass a message key to MalformedTitleException constructor
'badtitletext' seems to be equivalent to the situation before I4da8ecb4,
so let's go with that.
Bug: T99818
Change-Id: Ifdf66d2806df3ae7d2d378343491dd8976c31981
Translation updater bot [Wed, 20 May 2015 19:39:59 +0000 (21:39 +0200)]
Localisation updates from https://translatewiki.net.
Change-Id: I606ac1f2237b561daf4bc88426e3b9f5e65a8fc9
Marius Hoch [Wed, 20 May 2015 19:21:11 +0000 (21:21 +0200)]
Improve documentation of maintenance/sql.php
I found this to be lacking earlier this week...
Change-Id: I409c7451baa71b88cf554af0d82d1bf5904a2c4c
Mark A. Hershberger [Tue, 19 May 2015 18:00:56 +0000 (14:00 -0400)]
Keep jenkins happy by limiting line length.
Just w/s changes to break up long lines.
Change-Id: I69bf30f6c05813cfa32c8cd194f121cedcc4cb8a
jenkins-bot [Wed, 20 May 2015 09:14:00 +0000 (09:14 +0000)]
Merge "Message text clarified."
jenkins-bot [Wed, 20 May 2015 07:49:07 +0000 (07:49 +0000)]
Merge "Make JobRunner flush DeferredUpdates after each job"
jenkins-bot [Wed, 20 May 2015 07:21:35 +0000 (07:21 +0000)]
Merge "Simplified doEditContent exception handling"
jenkins-bot [Wed, 20 May 2015 07:08:33 +0000 (07:08 +0000)]
Merge "Fixed wrong EnqueueJob comment"
jenkins-bot [Wed, 20 May 2015 04:48:59 +0000 (04:48 +0000)]
Merge "Do not allow setting deprecated $wgSpecialPageGroups over extension.json"
Aaron Schulz [Wed, 20 May 2015 02:26:36 +0000 (19:26 -0700)]
Fixed wrong EnqueueJob comment
Change-Id: I8a84bae9cd4206eb042e5a29c91d8281e296ecd1
Ori Livneh [Tue, 19 May 2015 22:45:46 +0000 (15:45 -0700)]
User::clearSharedCache: don't load the full user record for just the ID
Rather than call $this->load() unconditionally, get just the ID via
$this->getId(), potentially saving us a database lookup.
Change-Id: Ifa3b96956a1d66d3e877573ff01970758fad8790
Timo Tijhof [Wed, 29 Apr 2015 22:53:24 +0000 (23:53 +0100)]
resourceloader: Replace timestamp system with version hashing
Modules now track their version via getVersionHash() instead of getModifiedTime().
== Background ==
While some resources have observeable timestamps (e.g. files stored on disk),
many other resources do not. E.g. config variables, and module definitions.
For static file modules, one can e.g. revert one of more files in a module to a
previous version and not affect the max timestamp.
Wiki modules include pages only if they exist. The user module supports common.js
and skin.js. By default neither exists. If a user has both, and then the
less-recently modified one is deleted, the max-timestamp remains unchanged.
For client-side caching, batch requests use "Math.max" on the relevant timestamps.
Again, if a module changes but another module is more recent (e.g. out-of-order
deployment, or out-of-order discovery), the change would not result in a cache miss.
More scenarios can be found in the associated Phabricator tasks.
== Version hash ==
Previously we virtually mapped these variables to a timestamp by storing the current
time alongside a hash of the value in ObjectCache. Considering the number of
possible request contexts (wikis * modules * users * skins * languages) this doesn't
work well. It results in needless cache invalidation when the first time observation
is purged due to LRU algorithms. It also has other minor bugs leading to fewer
cache hits.
All modules automatically get the benefits of version hashing with this change.
The old getDefinitionMtime() and getHashMtime() have been replaced with dummies
that return 1. These functions are often called from getModifiedTime() in subclasses.
For backward-compatibility, their respective values (definition summary and hash)
are now included in getVersionHash directly.
As examples, the following modules have been updated to use getVersionHash directly.
Other modules still work fine and can be updated later.
* ResourceLoaderFileModule
* ResourceLoaderEditToolbarModule
* ResourceLoaderStartUpModule
* ResourceLoaderWikiModule
The presence of hashes in place of timestamps increases the startup module size on
a default MediaWiki install from 4.4k to 5.8k (after gzip and minification).
== ETag ==
Since timestamps are no longer tracked, we need a different way to implement caching
for cache proxies (e.g. Varnish) and web browsers. Previously we used the
Last-Modified header (in combination with Cache-Control and Expires).
Instead of Last-Modified (and If-Modified-Since), we use ETag (and If-None-Match).
Entity tags (new in HTTP/1.1) are much stricter than Last-Modified by default.
They instruct browsers to allow usage of partial Range requests. Since our responses
are dynamically generated, we need to use the Weak version of ETag.
While this sounds bad, it's no different than Last-Modified. As reassured by
RFC 2616 <http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13.3.3> the
specified behaviour behind Last-Modified follows the same "Weak" caching logic as
Entity tags. It's just that entity tags are capable of a stricter mode (whereas
Last-Modified is inherently weak).
== File cache ==
If $wgUseFileCache is enabled, ResourceLoader uses ResourceFileCache to cache
load.php responses. While the blind TTL handling (during the allowed expiry period)
is still maxage/timestamp based, tryRespondNotModified() now requires the caller to
know the expected ETag.
For this to work, the FileCache handling had to be moved from the top of
ResoureLoader::respond() to after the expected ETag is computed.
This also allows us to remove the duplicate tryRespondNotModified() handling since
that's is already handled by ResourceLoader::respond() meanwhile.
== Misc ==
* Remove redundant modifiedTime cache in ResourceLoaderFileModule.
* Change bugzilla references to Phabricator.
* Centralised inclusion of wgCacheEpoch using getDefinitionSummary. Previously this
logic was duplicated in each place the modified timestamp was used.
* It's easy to forget calling the parent class in getDefinitionSummary().
Previously this method only tracked 'class' by default. As such, various
extensions hardcoded that one value instead of calling the parent and extending
the array. To better prevent this in the future, getVersionHash() now asserts
that the '_cacheEpoch' property made it through.
* tests: Don't use getDefinitionSummary() as an API.
Fix ResourceLoaderWikiModuleTest to call getPages properly.
* In tests, the default timestamp used to be
1388534400000 (which is the unix time
of
20140101000000; the unit tests' CacheEpoch). The new version hash of these
modules is "XyCC+PSK", which is the base64 encoded prefix of the SHA1 digest of:
'{"_class":"ResourceLoaderTestModule","_cacheEpoch":"
20140101000000"}'
* Add sha1.js library for client-side hash generation.
Compared various different implementations for code size (after minfication/gzip),
and speed (when used for short hexidecimal strings).
https://jsperf.com/sha1-implementations
- CryptoJS <https://code.google.com/p/crypto-js/#SHA-1> (min+gzip: 2.5k)
http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/sha1.js
Chrome: 45k, Firefox: 89k, Safari: 92k
- jsSHA <https://github.com/Caligatio/jsSHA>
https://github.com/Caligatio/jsSHA/blob/
3c1d4f2e/src/sha1.js (min+gzip: 1.8k)
Chrome: 65k, Firefox: 53k, Safari: 69k
- phpjs-sha1 <https://github.com/kvz/phpjs> (RL min+gzip: 0.8k)
https://github.com/kvz/phpjs/blob/
1eaab15d/functions/strings/sha1.js
Chrome: 200k, Firefox: 280k, Safari: 78k
Modern browsers implement the HTML5 Crypto API. However, this API is asynchronous,
only enabled when on HTTPS in Chromium, and is quite low-level. It requires boilerplate
code to actually use with TextEncoder, ArrayBuffer and Uint32Array. Due this being
needed in the module loader, we'd have to load the fallback regardless. Considering
this is not used in a critical path for performance, it's not worth shipping two
implementations for this optimisation.
May also resolve:
* T44094
* T90411
* T94810
Bug: T94074
Change-Id: Ibb292d2416839327d1807a66c78fd96dac0637d0
Aaron Schulz [Tue, 19 May 2015 21:40:50 +0000 (14:40 -0700)]
Simplified doEditContent exception handling
* Callers should not catch errors and fail to rollback
changes as much here as anywhere else
Change-Id: I65cbeb8d0895223b7ad60c9081d703d14197cb4a
Translation updater bot [Tue, 19 May 2015 19:47:12 +0000 (21:47 +0200)]
Localisation updates from https://translatewiki.net.
Change-Id: Idff54a370b7401517d4f2313576773bc765ca3e4
jenkins-bot [Tue, 19 May 2015 15:23:54 +0000 (15:23 +0000)]
Merge "registration: Have cache entries expire after 24 hours"
jenkins-bot [Tue, 19 May 2015 15:05:53 +0000 (15:05 +0000)]
Merge "registration: Remove implementation of custom processors for now"
jenkins-bot [Tue, 19 May 2015 15:05:15 +0000 (15:05 +0000)]
Merge "registration: Use a static whitelist of keys that are not attributes"
jenkins-bot [Tue, 19 May 2015 14:27:05 +0000 (14:27 +0000)]
Merge "Added documentation for HTMLFormField's "hide-if""
Purodha [Tue, 19 May 2015 13:33:53 +0000 (13:33 +0000)]
Message text clarified.
See also:
https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Title-invalid-interwiki/en
Change-Id: Id6f4573527415ec5f82fd5a4599480e5c17c84d3
Amir E. Aharoni [Sat, 4 Oct 2014 13:50:57 +0000 (16:50 +0300)]
mediawiki.language: Respect $wgTranslateNumerals in convertNumber()
This commit exposes the $wgTranslateNumerals variable via mw.config.
Bug: T72109
Change-Id: Id84ecc0a23aa83041f44294f249af28b92a1e629
jenkins-bot [Tue, 19 May 2015 07:44:44 +0000 (07:44 +0000)]
Merge "Added ObjectCache::getMainStashInstance() and $wgMainStash"
jenkins-bot [Tue, 19 May 2015 06:03:35 +0000 (06:03 +0000)]
Merge "Revert "Remove invalid language code "bh" (alias of "bho")""
Kunal Mehta [Tue, 19 May 2015 05:30:37 +0000 (22:30 -0700)]
registration: Don't array_unique() over the queue before loading it
array_unique works over values, not keys (you can't have an array with
duplicate keys in PHP) so it would end up removing extensions that
happened to have an identical timestamp with another one.
Bug: T98956
Change-Id: I66e202ea882ae4d5cb1bcafb7882cbd9cd52a1b3
Kunal Mehta [Tue, 19 May 2015 04:49:34 +0000 (21:49 -0700)]
registration: Have cache entries expire after 24 hours
Since our cache invalidation strategy is to just change the key, don't
have old entries stick around forever.
Change-Id: Ib62b69adfc2855a2ecd08558d4054d9b5d3ed571
Hoo man [Mon, 18 May 2015 22:37:00 +0000 (22:37 +0000)]
Revert "Remove invalid language code "bh" (alias of "bho")"
Still being heavily used for interwiki links.
See eg. https://www.wikidata.org/wiki/Wikidata:Contact_the_development_team#Link_for_bh.wiki
This reverts commit
34a3de0f65609c7ffdaafbf3770001e531a616cf.
Bug: T99059
Change-Id: I6db0c436dc2c7556bbc060584e0a725402238adf
Aaron Schulz [Tue, 19 May 2015 02:06:49 +0000 (19:06 -0700)]
Made pushLazyJobs() handle all queue groups
* This avoids __destruct() warnings
* Also remove push() code in __destruct() that just made
more warnings since it's too late
Change-Id: I32a3cfabc94e36b9d2808b45d55209f3df46e47d
Aaron Schulz [Mon, 18 May 2015 21:20:35 +0000 (14:20 -0700)]
Make JobRunner flush DeferredUpdates after each job
Change-Id: Iff6625ddc04a15751d2bb07dc6558145e7ceb14a
Erik Bernhardson [Mon, 18 May 2015 23:19:12 +0000 (16:19 -0700)]
Search: Allow searchContainedSyntax to be defined by constructor
The SearchResultSet is returned where no query is performed because it
is known ahead of time that no result exists. In cases where that is
known due to the syntax of the query (e.g. the syntax requires
searching a category that does not exist) this searchContainedSyntax
method returns the wrong value. This patch makes it possible for the
instantiating code to properly set the return value of this method.
Change-Id: I7b7be24f5630a48d2a561e4fda9cec696a8cacf9