Commit graph

63104 commits

Author SHA1 Message Date
jenkins-bot
977f7ad8ad Merge "Combine deleteArchived{Files,Revisions}.inc into the .php scripts" 2015-06-03 00:05:52 +00:00
Timo Tijhof
cd0dff5c00 resourceloader: Use mw.log instead of 'throw' for scripts with syntax errors
For scripts loaded from load.php using mw.loader.implement(), an
exception is handled fine and results in the module state progressing
from 'loading' to 'errror'.

However, for wikis modules loaded with only=scripts from the HTML directly,
there is no wrapper. As such, the state() call appended to the script is
never reached and the module indefinitely stays "loading".

VisualEditor (and others) already explicitly ignore the error state
of the wiki modules (with inline mw.loader.using and casting the Promise to resolved).
However in this case the Promise never completed to neither success nor failure.

As such, this was causing users with syntax errors in their user script to
encounter a stuck VisualEditor loading bar that never goes beyond 70%.

Change-Id: I091a020bdd3392b965e0e25d03b216037fadc48f
2015-06-02 22:43:46 +00:00
jenkins-bot
e3e20c5bf7 Merge "cache: Add in-process caching to MessageBlobStore" 2015-06-02 22:23:44 +00:00
Timo Tijhof
ef79d8361e cache: Add in-process caching to MessageBlobStore
This allows us to continue to use MessageBlobStore::get() as a way
to pre-fetch messages in batches for multiple modules while also
allowing individual modules to retrieve  their messages in a convenient
way.

This is in preparation for implementing ResourceLoaderModule::buildContents
and using it in ResourceLoaderModule::getVersionHash.

ResourceLoader::respond() already fetches message blobs in batches for the
actual response, but it also needs getVersionHash(), which would otherwise
fetch the same messages a second time.

Change-Id: I7e4c8b65765b54807123e85cfbb7eb2e5b2f39bd
2015-06-02 23:10:16 +01:00
jenkins-bot
0e1c80e6e1 Merge "Check result of preg_match_all in Parser.php" 2015-06-02 22:08:42 +00:00
Aaron Schulz
5399fba68b Use less fuzzy User::getDBTouched() in ApiStashEdit::getStashKey()
* The getTouched() value can bump more often or vary in DCs

Change-Id: Idffa22c9dde7c7950943b104ed61f5779636b7e7
2015-06-02 20:31:14 +00:00
Translation updater bot
9c69145345 Localisation updates from https://translatewiki.net.
Change-Id: I860b228e2f23cdb32f066943d377b583bc6436eb
2015-06-02 21:17:31 +02:00
Aaron Schulz
833bdbab37 Fixed $flags bit operation precedence fail in User::loadFromDatabase()
* The bug made READ_LATEST also act as READ_LOCKING

Bug: T100577
Bug: T100869
Bug: T98706
Change-Id: I85092970c236fc4482371216b9f6592c49a27942
2015-06-02 18:39:37 +00:00
Brian Wolff
97e4e113e4 Move xml_free_parser out of destructor.
Attempt to reduce error log spam. I'm not sure about the exact
cause of this error, nor have I really reproduced locally, so
I don't know if this will help, but getting it out of destructor
seems like a good idea.

I also do not know if calling xml_free_parser is really needed
(Would php automatically destroy parser during garbage collection?)

Bug: T89532
Change-Id: I5709b6cf26cf4a9032a79d2b5f48ed3b4238eaee
2015-06-02 17:45:33 +00:00
jenkins-bot
ced04cc5f9 Merge "Use a fixed comment placeholder string in CSSMin" 2015-06-02 17:40:48 +00:00
jenkins-bot
6ffdc1cdca Merge "OOUI theme support" 2015-06-02 17:28:09 +00:00
Ori Livneh
08633bd182 Use a fixed comment placeholder string in CSSMin
Both the problem and solution are nearly identical to the ones presented in
I31d4556bb. Use a constant string as a comment placeholder, and differentiate
it from possible user input using \x7f, which is not valid CSS anyway[1].

  [1]: http://www.w3.org/TR/CSS21/grammar.html

Change-Id: I3d3c2578d5e9c1fe52c02e87901cb08d03847ea7
2015-06-02 09:45:08 -07:00
jenkins-bot
11f3b09a1b Merge "Fixing definition and use of $attrs parameter in Html::buttonAttributes" 2015-06-02 14:20:07 +00:00
jenkins-bot
82bcfd1749 Merge "Improve doc of maxage and s-maxage API parameters" 2015-06-02 14:08:39 +00:00
jenkins-bot
70a1ea48aa Merge "Made LoadBalancer debug log entries use "localhost" placeholder" 2015-06-02 13:34:07 +00:00
jenkins-bot
0169b77d89 Merge "Rewrite Language::hebrewNumeral()" 2015-06-02 13:29:19 +00:00
jenkins-bot
9127d9ea9d Merge "Reduce page deletion lock contention" 2015-06-02 13:20:27 +00:00
Amir E. Aharoni
c9678525eb Rewrite Language::hebrewNumeral()
Use arrays instead of strings, to avoid using
string functions with Unicode.

Handle thousands according to how years like 1000, 2000, etc.
are named in the Hebrew Wikipedia.

Bug: T97444
Change-Id: I5334e86793d28dfcf8939a249b03a5ea85fa4e69
2015-06-02 15:10:52 +02:00
Amir E. Aharoni
f21537f8f2 Cleanup the code of Language::hebrewNumeral()
Change == to === and add empty lines for readability.

Change-Id: Ifeabbf0d6adca25d8a797bd423f1bbdc0f8223ee
2015-06-02 12:31:47 +00:00
Amir E. Aharoni
399d00e7e7 Add tests for Language::hebrewNumeral()
Some failing tests are commented out and will be properly fixed
in subsequent commits.

Bug: T97444
Change-Id: I19721b5dc3dc6bbe923d9bf401fcf5d765fb7a7c
2015-06-02 12:26:48 +00:00
S Page
51ec19ebb3 Improve doc of maxage and s-maxage API parameters
They set HTTP cache control headers.  i18-only change.

Change-Id: I9eefdd51d6937388326ceb7b6baa72288221c2f7
2015-06-02 00:52:18 -07:00
jenkins-bot
6aaddf00c3 Merge "Add List-Unsubscribe header to emails" 2015-06-02 05:06:52 +00:00
jenkins-bot
187369a0cd Merge "mediawiki.ui: checkbox: Render "on top of" the label" 2015-06-02 04:51:44 +00:00
kaldari
f74b88311b Fixing definition and use of $attrs parameter in Html::buttonAttributes
Also clarifying definition of $modifiers parameter.

Also simplifying code for case where $attrs['class'] is not set.

Change-Id: I425211681ba75cb71c1ccc3b3c038c075ea9acb9
2015-06-01 18:53:15 -07:00
Kunal Mehta
75fc0f1661 registration: Remove "additionalitems" property from array (authors)
It doesn't make sense for arrays which can't have items to begin with.

Follows up bfe4ddd810

Change-Id: I851b70782fa8210802fe576fee771ddf1bdd7fec
2015-06-01 18:50:51 -07:00
jenkins-bot
58ff7981de Merge "composer.json: Downgrade PHPUnit to 3.7.37 (temporarily)" 2015-06-02 01:33:36 +00:00
jenkins-bot
e219700835 Merge "Follow-up 727454f: Add mediawiki.widgets to jsduck" 2015-06-01 23:48:53 +00:00
jenkins-bot
1632780c2d Merge "Add help link for 8 more special pages" 2015-06-01 23:47:09 +00:00
James D. Forrester
9069b9ce85 Follow-up 727454f: Add mediawiki.widgets to jsduck
Change-Id: I1715c5bbca8735de8c391dee4e2cec8269414acf
2015-06-01 16:33:21 -07:00
jenkins-bot
821a0606e0 Merge "Commit all connections after each job" 2015-06-01 22:15:11 +00:00
Nik Everett
f204da4bff Commit all connections after each job
If you don't commit the slave connections then they keep their old snapshots.
This clears the snapshots so they don't get out of date views of the world.

Bug: T100838
Change-Id: I1f6f910d88324beb589b2ad9466d8786376eda55
2015-06-01 17:43:43 -04:00
Translation updater bot
3d3fa6dbb8 Localisation updates from https://translatewiki.net.
Change-Id: I491182176e3357ed36de4856e20af71d735dcd27
2015-06-01 22:08:37 +02:00
jenkins-bot
a8b9361b09 Merge "Moved addAutopromoteOnceGroups() call to a deferred update" 2015-06-01 19:24:56 +00:00
jenkins-bot
e43ccecd4c Merge "Add tests for HttpError" 2015-06-01 18:54:02 +00:00
aude
acfff1bff1 Add tests for HttpError
Still missing tests for HttpError::report, but would
have caught the issue that Ie216d19 fixed.

Change-Id: Ic35d70af52c3a2d2a25fc3b9952383198db31fb1
2015-06-01 20:42:21 +02:00
Florian
f73e021e18 Remove legacy vertical-align from select fields
They shouldn't be aligned at the top by default.

Bug: T98493
Change-Id: I17b0825079ff28dfc9ea2c1ec24018073aec3794
2015-06-01 20:01:38 +02:00
Marius Hoch
e826f36d12 Fix undefined variable $header in HttpError
Change-Id: Ie216d1959f2ea903fdbc124b718b4988e08229ae
Follows-up: I8b61d7e9ea4101e3a9ef5f9a59a97db45aeef68c
2015-06-01 19:40:41 +02:00
jenkins-bot
9e4bb78836 Merge "Add 'mediawiki.skinning.logo' module" 2015-06-01 17:16:54 +00:00
Timo Tijhof
0e84138017 HttpError: Consistently escape document title
Wasn't actually a vulnerability because HttpStatus::getMessage
can only return one of a fixed set of values which are all plain
text without any special characters. However the return value
there is meant to plain text and not html, so just like
Html::element and other interfaces, things should be consitently
escaped.

Also renamed variables for clarity.

Change-Id: I8b61d7e9ea4101e3a9ef5f9a59a97db45aeef68c
2015-06-01 14:58:19 +01:00
jenkins-bot
246bebe821 Merge "Add Vivek Ghaisas (polybuildr) to the CREDITS file" 2015-06-01 13:42:41 +00:00
jenkins-bot
973459bd0e Merge "Made isAllowed(), showHistory() and formatRevisionRow() protected to allow for easier subclassing" 2015-06-01 13:38:55 +00:00
jenkins-bot
b87cd4a773 Merge "SpecialMediaStatistics: Protect against invalid indexes" 2015-06-01 11:50:33 +00:00
Brian Wolff
8a6b7ff80d Merge "Fix some RecentChange phpdoc return types" 2015-06-01 11:16:20 +00:00
jenkins-bot
b745eaa260 Merge "Tweak 'position' of 'mediawiki.skinning.*' modules" 2015-06-01 11:13:07 +00:00
addshore
f5e08902a7 Fix some RecentChange phpdoc return types
Change-Id: I3e75a97f7fc76e2dc052463511e32f330cfca9ce
2015-06-01 12:07:17 +01:00
jenkins-bot
72fac16667 Merge "Use a fixed marker prefix string in the Parser and MWTidy" 2015-06-01 02:57:02 +00:00
jenkins-bot
6063ffb150 Merge "Move MWTimestamp::getHumanTimestamp() to Language" 2015-06-01 02:39:57 +00:00
Ori Livneh
12571bde26 Use a fixed marker prefix string in the Parser and MWTidy
Generating one-time, unique strip markers hurts us in multiple ways:

* The strip marker regexes don't benefit from JIT compilation, so they are
  slower to execute than they could be.
* Although the regexes don't benefit from JIT compilation, they are still
  compiled, because HHVM bets on regexes getting reused. This extra work is
  fairly costly (1-2% of CPU usage on the app servers) and doesn't pay off.
* The size of the PCRE JIT cache is finite, and the caching of one-off regexes
  displaces from the cache regexes which are in fact reused.

Tim's preferred solution (per his review comment on
https://gerrit.wikimedia.org/r/167530/) is to use fixed strip markers.
So:

* Replace usage of $parser->mUniqPrefix with Parser::MARKER_PREFIX, which
  complements the existing Parser::MARKER_SUFFIX.
* Deprecate Parser::mUniqPrefix and its accessor, Parser::uniqPrefix().
* Deprecate Parser::getRandomString(), since it is no longer useful.
* In Preprocessor_*:preprocessToObj() and Parser::fetchTemplateAndTitle,
  replace any occurences of \x7f with '?', to prevent strip marker forgery.
  \x7f is not valid input anyway.
* Deprecate the $prefix parameter for StripState::__construct, since a custom
  prefix may no longer be specified.

Change-Id: I31d4556bbb07acb72c33fda335fa5a230379a03f
2015-05-31 19:33:36 -07:00
Kunal Mehta
06cf009d88 Remove deprecated MWFunction::newObj()
Change-Id: I180e9e1e0bcf17c9e72b607c69cae00f47de6579
2015-05-31 23:22:57 +00:00
Bartosz Dziewoński
1fc57830e2 OOUI theme support
* Split off OOjs UI's module definitions to a separate file from
  Resources.php.
* Extend ResourceLoaderImageModule to support per-skin images and
  variants.
* Allow skins to specify their preferred OOjs UI theme using new
  skin registry attribute 'SkinOOUIThemes'. The default remains the
  'mediawiki' theme, 'apex' can also be chosen now.
* Implement custom ResourceLoaderOOUIImageModule which implements some
  special sauce required to shoehorn OOjs UI image set definitions into
  ResourceLoaderImageModule with skin-specific styles support.

Bug: T100895
Change-Id: I3fbacbce95126a4cc29221352f3ef846f41e7b1b
2015-05-31 22:55:13 +00:00