lhc/web/wiklou.git
9 years agoMerge "Removed some unnecessary code in LocalFileDeleteBatch"
jenkins-bot [Fri, 12 Dec 2014 21:18:30 +0000 (21:18 +0000)]
Merge "Removed some unnecessary code in LocalFileDeleteBatch"

9 years agoMerge "Do not require that a Monolog handler has a formatter"
jenkins-bot [Fri, 12 Dec 2014 21:16:09 +0000 (21:16 +0000)]
Merge "Do not require that a Monolog handler has a formatter"

9 years agoMerge "resources: Switch OOjs UI from the 'Apex' to the 'MediaWiki' theme"
jenkins-bot [Fri, 12 Dec 2014 21:13:59 +0000 (21:13 +0000)]
Merge "resources: Switch OOjs UI from the 'Apex' to the 'MediaWiki' theme"

9 years agoMerge "Resources: Split oojs-ui module styling into oojs-ui.styles"
jenkins-bot [Fri, 12 Dec 2014 21:13:55 +0000 (21:13 +0000)]
Merge "Resources: Split oojs-ui module styling into oojs-ui.styles"

9 years agoMerge "Add dependency upon oojs/ui's PHP port"
jenkins-bot [Fri, 12 Dec 2014 21:13:51 +0000 (21:13 +0000)]
Merge "Add dependency upon oojs/ui's PHP port"

9 years agoMerge "Guard against empty integerPart in Language::commafy"
jenkins-bot [Fri, 12 Dec 2014 21:07:01 +0000 (21:07 +0000)]
Merge "Guard against empty integerPart in Language::commafy"

9 years agoresources: Switch OOjs UI from the 'Apex' to the 'MediaWiki' theme
James D. Forrester [Fri, 5 Dec 2014 22:10:28 +0000 (14:10 -0800)]
resources: Switch OOjs UI from the 'Apex' to the 'MediaWiki' theme

Bug: T78054
Change-Id: I712b066a8cd70e1ef81a4e43e24801fe1750b3a4

9 years agoResources: Split oojs-ui module styling into oojs-ui.styles
James D. Forrester [Thu, 4 Dec 2014 02:11:28 +0000 (18:11 -0800)]
Resources: Split oojs-ui module styling into oojs-ui.styles

Change-Id: I56e7802c58ccf546c83901382abd8fcbe370fd0a

9 years agoAdd dependency upon oojs/ui's PHP port
Kunal Mehta [Sat, 22 Nov 2014 01:54:37 +0000 (17:54 -0800)]
Add dependency upon oojs/ui's PHP port

Depends upon Ibca93b05 in mediawiki/vendor.

Change-Id: Ibca93b05623377dc645a28ddd337027e53983552

9 years agoGuard against empty integerPart in Language::commafy
Bryan Davis [Fri, 12 Dec 2014 20:54:30 +0000 (13:54 -0700)]
Guard against empty integerPart in Language::commafy

Fixes:
    Notice: Undefined index: 0 in languages/Language.php on line 3348

Change-Id: I1a00f3af95d3b9b0fd3ad3cc690358fe5b90f58f

9 years agoMerge "Update OOjs UI to v0.5.0"
jenkins-bot [Fri, 12 Dec 2014 20:52:02 +0000 (20:52 +0000)]
Merge "Update OOjs UI to v0.5.0"

9 years agoMerge "Pass config to UsercreateTemplate/UserloginTemplate"
jenkins-bot [Fri, 12 Dec 2014 20:31:25 +0000 (20:31 +0000)]
Merge "Pass config to UsercreateTemplate/UserloginTemplate"

9 years agoDo not require that a Monolog handler has a formatter
Bryan Davis [Fri, 12 Dec 2014 20:29:35 +0000 (13:29 -0700)]
Do not require that a Monolog handler has a formatter

Not all handlers require a formatter.

Change-Id: Ifb31aa278d4e90b7fa3a2b7bf3b20173b8345afd

9 years agoUpdate OOjs UI to v0.5.0
James D. Forrester [Fri, 12 Dec 2014 20:22:29 +0000 (12:22 -0800)]
Update OOjs UI to v0.5.0

Release notes:
 https://git.wikimedia.org/blob/oojs%2Fui.git/v0.5.0/History.md

Change-Id: I8503e846b8d240facb7a579952104285d7f9a7fc

9 years agoPass config to UsercreateTemplate/UserloginTemplate
umherirrender [Fri, 12 Dec 2014 20:14:36 +0000 (21:14 +0100)]
Pass config to UsercreateTemplate/UserloginTemplate

Avoids:
QuickTemplate::__construct was called with no Config instance passed to
it

Change-Id: Ibfa1885dbe5609f1458dc3022dd367eb17b614b1

9 years agoMerge "Check hasTitle() in RequestContext::setWikiPage()"
jenkins-bot [Fri, 12 Dec 2014 19:58:28 +0000 (19:58 +0000)]
Merge "Check hasTitle() in RequestContext::setWikiPage()"

9 years agoCheck hasTitle() in RequestContext::setWikiPage()
Kunal Mehta [Fri, 12 Dec 2014 19:17:55 +0000 (11:17 -0800)]
Check hasTitle() in RequestContext::setWikiPage()

Calling getTitle() right away can lead to reading from
$wgTitle, so check with hasTitle() first.

This avoids a globaltitlefail in ApiEditPage.

Change-Id: I749cc33dd4f1fd6bc7598be34f37e591d822c3f2

9 years agoLog to DBPerformance when queries affect many rows
Aaron Schulz [Wed, 10 Dec 2014 00:25:28 +0000 (16:25 -0800)]
Log to DBPerformance when queries affect many rows

Change-Id: If82b596187b638888760f800bba2fea20fc7ae8a

9 years agoMerge "Always set a title on images when provided"
jenkins-bot [Fri, 12 Dec 2014 19:25:00 +0000 (19:25 +0000)]
Merge "Always set a title on images when provided"

9 years agoAlways set a title on images when provided
Jackmcbarn [Sun, 10 Aug 2014 22:35:37 +0000 (18:35 -0400)]
Always set a title on images when provided

If an image has a title but isn't linked, set the title on the image
itself rather than not setting it at all.

Bug: T23454
Change-Id: I6302246cf28c84ade805a6a7d4a5e131b6f42e86

9 years agoAdd more context to globaltitlefail logs
Kunal Mehta [Fri, 12 Dec 2014 19:04:33 +0000 (11:04 -0800)]
Add more context to globaltitlefail logs

Currently stuff like:
 MessageCache::parse called by Message::toString/Message::parseText/MessageCache::parse with no title set.

is showing up in the logs, and is totally useless.

Change-Id: I0ac3ca906c5a67e19974e3434d0e929e6b27fbb2

9 years agoMerge "Typo fixes and non-code tweaks"
jenkins-bot [Fri, 12 Dec 2014 17:39:24 +0000 (17:39 +0000)]
Merge "Typo fixes and non-code tweaks"

9 years agoTypo fixes and non-code tweaks
Ricordisamoa [Fri, 12 Dec 2014 08:41:27 +0000 (08:41 +0000)]
Typo fixes and non-code tweaks

Skipped replacements:
* prefered → preferred
* prolly → probably

Skipped files:
* resources/lib/jquery.ui/jquery.ui.mouse.js
* resources/lib/jquery/jquery.form.js

Change-Id: Ib7923f362ddfca1b892bf5d601785d6b5aa5d44c

9 years agoMerge "Remove obsolete note from Title->canExist()"
jenkins-bot [Fri, 12 Dec 2014 17:33:27 +0000 (17:33 +0000)]
Merge "Remove obsolete note from Title->canExist()"

9 years agomw.loader: Guard against Object.prototype keys as module names
Fomafix [Mon, 8 Dec 2014 20:18:33 +0000 (20:18 +0000)]
mw.loader: Guard against Object.prototype keys as module names

This avoids conflicts where we confuse an Object method for a
registered module.

Change-Id: I1b1c2db355f0c698be4a5fe797daa55dedc25258

9 years agoMerge "Cleaned up LoadBalancer::getConnection"
jenkins-bot [Fri, 12 Dec 2014 02:47:39 +0000 (02:47 +0000)]
Merge "Cleaned up LoadBalancer::getConnection"

9 years agoFix case insensitive string comparison for http header names
Sergio Santoro [Sat, 2 Aug 2014 11:29:57 +0000 (13:29 +0200)]
Fix case insensitive string comparison for http header names

As of RFC 2616 sec 4.2, http header names are case insensitive.

Change-Id: Ib72df2572f5a9c825c5b3ad7735126f3687aad79

9 years agoAvoid blocking on ChronologyProtecter check in LoadBalancer::getConnection()
Aaron Schulz [Wed, 10 Dec 2014 07:56:46 +0000 (23:56 -0800)]
Avoid blocking on ChronologyProtecter check in LoadBalancer::getConnection()

Change-Id: Iccf324d87d117972cc6321b2abf1ff101d98fa65

9 years agocomposer.json: Update issues link to point to bugs.mediawiki.org
Kunal Mehta [Thu, 11 Dec 2014 20:54:59 +0000 (12:54 -0800)]
composer.json: Update issues link to point to bugs.mediawiki.org

Change-Id: I67f4403f1797a38bc3f5d7b190d7f84f6fdf457c

9 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 11 Dec 2014 22:27:53 +0000 (23:27 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I0d198f282e5db225f16d172a25c7375f48b033f4

9 years agoMerge "Update README from [[mw:README]]"
jenkins-bot [Thu, 11 Dec 2014 22:03:30 +0000 (22:03 +0000)]
Merge "Update README from [[mw:README]]"

9 years agoFix ProfilerStandard sorting and a profile error
Tim Starling [Fri, 5 Dec 2014 04:45:29 +0000 (15:45 +1100)]
Fix ProfilerStandard sorting and a profile error

* Sort $this->collated even if collateOnly is set. Also I don't think
  arsort works that way.
* Fix a profiling error in every DB query, which was due to the two
  scoped profiling sections being destroyed in the wrong order.

Change-Id: I6af05f37a5c0391acfa80d54ecbca7a08ad81250

9 years agoFix parenthesis placement in multi-line condition
Tim Starling [Thu, 11 Dec 2014 03:54:37 +0000 (14:54 +1100)]
Fix parenthesis placement in multi-line condition

After talking with the folks in #mediawiki-core, I decided that I can
put up with it, under protest, on the basis that it's arguably
consistent with PSR-2.

Change-Id: I5f0c0f8f0172674797970d306efe6439ce1c2b67

9 years agoEnforce spaces around magic links (RFC, PMID, and ISBN).
C. Scott Ananian [Fri, 16 May 2014 00:19:10 +0000 (17:19 -0700)]
Enforce spaces around magic links (RFC, PMID, and ISBN).

Ensure that there is a \b boundary before and after RFC, PMID, and ISBN
links.  (Previously we enforced \b boundaries only before free external
links and after ISBN links.)  Consistency is a good thing!

In addition:
* \b is not a PHP escape sequence, so you don't need to write \\b inside
  a string.
* \b before the numeric part of an ISBN is pointless: by the structure
  of the regexp there will always be a space on the left and a word
  character (a digit) on the right.

Bug: 65278
Change-Id: Ic315b988091a5c7530a8285b9249804db72e55db

9 years agoMerge "Stash edit when user idles"
jenkins-bot [Thu, 11 Dec 2014 02:23:10 +0000 (02:23 +0000)]
Merge "Stash edit when user idles"

9 years agoStash edit when user idles
Ori Livneh [Wed, 10 Dec 2014 05:13:44 +0000 (21:13 -0800)]
Stash edit when user idles

Try to anticipate edit submissions earlier by looking for pauses in keyboard
input, on the assumption that users often take a few moments to look over an
edit before submitting it to the server.

Change-Id: Ib2de3f15b93e5d32c66a03363e98606412d5d53b

9 years agoMerge "ResourceLoaderImageModule: Allow use on mobile"
jenkins-bot [Wed, 10 Dec 2014 23:40:48 +0000 (23:40 +0000)]
Merge "ResourceLoaderImageModule: Allow use on mobile"

9 years agoResourceLoaderImageModule: Allow use on mobile
jdlrobson [Wed, 10 Dec 2014 23:31:48 +0000 (15:31 -0800)]
ResourceLoaderImageModule: Allow use on mobile

Change-Id: Ic7913aa1a1e1fb8d3742503cbe8a6cb3427fc826

9 years agoFix check for function wddx_deserialize in tests for hhvm
umherirrender [Wed, 10 Dec 2014 20:09:36 +0000 (21:09 +0100)]
Fix check for function wddx_deserialize in tests for hhvm

The @requires just works for other tests, not for php functions.

This fixed a failure for the hhvm test server:
1) ApiFormatWddxTest::testValidSyntax
Failed asserting that null is of type "array".

Change-Id: Iadd8238ce62d4803cdf56508886ad016f8ac8f1d

9 years agoMerge "Adding aliases for speacial pages in Hebrew"
jenkins-bot [Wed, 10 Dec 2014 21:40:12 +0000 (21:40 +0000)]
Merge "Adding aliases for speacial pages in Hebrew"

9 years agoMerge "Localisation updates from https://translatewiki.net."
Translation updater bot [Wed, 10 Dec 2014 20:49:37 +0000 (20:49 +0000)]
Merge "Localisation updates from https://translatewiki.net."

9 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 10 Dec 2014 20:48:26 +0000 (21:48 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Id102078400328a8f1032b03e926e56645adf00b2

9 years agoFix type hint to match php docs
Mark A. Hershberger [Wed, 10 Dec 2014 20:00:45 +0000 (15:00 -0500)]
Fix type hint to match php docs

From http://php.net/manual/en/function.posix-isatty.php

bool posix_isatty ( mixed $fd )

Determines if the file descriptor fd refers to a valid terminal type device.

fd

    The file descriptor, which is expected to be either a file
    resource or an integer. An integer will be assumed to be a file
    descriptor that can be passed directly to the underlying system
    call.

    In almost all cases, you will want to provide a file resource.

Change-Id: Ief19ac1f09e0a955c8f5d5af28b87b8e8d427a2e

9 years agoLanguage: wfRunHooks() --> Hooks::run()
Kunal Mehta [Wed, 10 Dec 2014 20:29:24 +0000 (12:29 -0800)]
Language: wfRunHooks() --> Hooks::run()

Follows up I8ee996f237fd111873a

Change-Id: I0ffc5903c96219676b9bcb46928fd72bb7133927

9 years agoReplace wfRunHooks calls with direct Hooks::run calls
Aaron Schulz [Tue, 9 Dec 2014 07:23:30 +0000 (23:23 -0800)]
Replace wfRunHooks calls with direct Hooks::run calls

* This avoids the overhead of an extra function call

Change-Id: I8ee996f237fd111873ab51965bded3d91e61e4dd

9 years agoMerge "API edit: allow ConfirmEdit to use the merged parse"
jenkins-bot [Wed, 10 Dec 2014 20:22:05 +0000 (20:22 +0000)]
Merge "API edit: allow ConfirmEdit to use the merged parse"

9 years agoAdding aliases for speacial pages in Hebrew
eranroz [Wed, 10 Dec 2014 20:06:13 +0000 (22:06 +0200)]
Adding aliases for speacial pages in Hebrew

Change-Id: If5e4a535862f40dc7a87527fe525f1fb2f1fe2c1

9 years agoMerge "Fix case of various newFromID/newFromId functions"
jenkins-bot [Wed, 10 Dec 2014 19:47:44 +0000 (19:47 +0000)]
Merge "Fix case of various newFromID/newFromId functions"

9 years agoMerge "Xml: Simplify processing of attributes in Xml::label"
jenkins-bot [Wed, 10 Dec 2014 19:47:24 +0000 (19:47 +0000)]
Merge "Xml: Simplify processing of attributes in Xml::label"

9 years agoFix case of various newFromID/newFromId functions
umherirrender [Tue, 2 Dec 2014 18:13:06 +0000 (19:13 +0100)]
Fix case of various newFromID/newFromId functions

User::newFromID -> User::newFromId
Revision::newFromID -> Revision::newFromId
RecentChange::newFromID -> RecentChange::newFromId

WikiPage::newFromId -> WikiPage::newFromID
Title::newFromId -> Title::newFromID

Change-Id: I310f26653613951e9b21ce915a92d205a87937f1

9 years agoXml: Simplify processing of attributes in Xml::label
Ricordisamoa [Wed, 10 Dec 2014 07:43:28 +0000 (07:43 +0000)]
Xml: Simplify processing of attributes in Xml::label

Comment inserted by Antoine Musso with d86a3bc2177f79.

Also fixed wrong indentation.

Change-Id: I054762929413f90090b446c603b60ed9544c06d1

9 years agoFixed internalClean class/method existence check for HHVM
Aaron Schulz [Wed, 10 Dec 2014 19:04:56 +0000 (11:04 -0800)]
Fixed internalClean class/method existence check for HHVM

* Follows up 4f281083fda91879a77fb87d64d8a9533526bd0c

Change-Id: I5fa406ed1c4f2eefd1c22e9ab90e72655f31d162

9 years agohhvm: Check for tidy function instead of class
Bryan Davis [Wed, 10 Dec 2014 18:08:18 +0000 (11:08 -0700)]
hhvm: Check for tidy function instead of class

Bug: T78166
Change-Id: Ie60e23ffbafd698a3458eed1efce92d54c8d0c2a

9 years agoAvoid preloading unused messages in ContribsPager
Ricordisamoa [Wed, 10 Dec 2014 01:44:07 +0000 (01:44 +0000)]
Avoid preloading unused messages in ContribsPager

* newarticle
* rev-delundel
* rollbacklink

A bit of history:
* messages preloading
** added by Brion Vibber
   commit 935bca8ee764847868ce6c597b43eb74e0908c10

* usage of newarticle
** added by Erik Moeller
   commit d61d3486f0eb7713e58d80f984891cb8882cf7ef
** removed by Alexandre Emsenhuber
   commit 84be101a9098166731fe6a1e30615d2f9b094eeb

* usage of rev-delundel
** added by Aaron Schulz
   commit 0ed239362c54656b95d4d602fcc33d6f5ace8932
** fixed by Raimond Spekking
   commit 349ef821d66a54ee0c6b7ce6024bded399518e95
** removed by Aaron Schulz
   commit 90dcb3c1f2c4b03f2cb9358b40666af1eff88a99

* usage of rollbacklink
** present in Lee Daniel Crocker's 'initial revision'
   commit d82c14fb4fbac288b42ca5918b0a72f33ecb1e69
** removed from old version by Aryeh Gregor
   commit 3a0c45e93cf7cdcfadfd2545a497562968e023ee
** unused but still preloaded in Ilmari Karonen's new version
   commit 2df501fa0d2723bf2a196390c2507a6043cdcdaf

Change-Id: Ib9fce5c1af4f0fd7dd3dcfefa4a6611d61123e02

9 years agoFixup 4f0b2f42419c283e8c94a5be6147d54ae7731a6b
Ricordisamoa [Tue, 9 Dec 2014 22:23:08 +0000 (22:23 +0000)]
Fixup 4f0b2f42419c283e8c94a5be6147d54ae7731a6b

It messed up a couple of entries in RELEASE-NOTES-1.24,
now brought into HISTORY.

Change-Id: I84795de70b0cb24af122acd0aa6ebc8367a782d5

9 years agoFix documentation of hook 'BeforeParserFetchFileAndTitle'
Ricordisamoa [Tue, 9 Dec 2014 19:10:11 +0000 (19:10 +0000)]
Fix documentation of hook 'BeforeParserFetchFileAndTitle'

By placing the notice "If 'broken' is a key in $options
then the file will appear..." added by Aaron Schulz with
commit 9d572d1844380c0db268b456f297bd7675eb609f.
This solves a 'FIXME' added by Siebrand Mazeland with
commit b33c77a52562975aa2503dac66e716e6a5a7ad2e.

Change-Id: I9d100588276faac5d5b2be979d8140389e5ed85a

9 years agoMerge "API: Allow redirecting a page to itself using action=edit"
jenkins-bot [Wed, 10 Dec 2014 15:26:30 +0000 (15:26 +0000)]
Merge "API: Allow redirecting a page to itself using action=edit"

9 years agoMerge "jquery.mwExtension.test: Use better sample data for isDomElement"
jenkins-bot [Wed, 10 Dec 2014 12:06:14 +0000 (12:06 +0000)]
Merge "jquery.mwExtension.test: Use better sample data for isDomElement"

9 years agoMerge "Always use 'bool' instead of 'boolean' after '@param' and '@return'"
jenkins-bot [Wed, 10 Dec 2014 12:03:51 +0000 (12:03 +0000)]
Merge "Always use 'bool' instead of 'boolean' after '@param' and '@return'"

9 years agoAlways use 'bool' instead of 'boolean' after '@param' and '@return'
Ricordisamoa [Wed, 10 Dec 2014 05:09:35 +0000 (05:09 +0000)]
Always use 'bool' instead of 'boolean' after '@param' and '@return'

The former is by far the most common.

Skipped:
* resources/lib/jquery.ui/jquery.ui.datepicker.js
* resources/src/mediawiki.special/mediawiki.special.upload.js

Change-Id: I73c93797e745128ba703e4865080c36784caa474

9 years agoAPI: Allow redirecting a page to itself using action=edit
Kevin Israel [Wed, 10 Dec 2014 11:48:13 +0000 (06:48 -0500)]
API: Allow redirecting a page to itself using action=edit

Follows-up 02660685708747d5.

Change-Id: I60aa15ac9f33c560c940c55cf98626bb9ff4b822

9 years agoCleaned up LoadBalancer::getConnection
Aaron Schulz [Wed, 10 Dec 2014 01:34:48 +0000 (17:34 -0800)]
Cleaned up LoadBalancer::getConnection

* It will also no longer call getReaderIndex( false, ... ) twice
* Removed various related ampersands

Change-Id: Ia79e2007dbf84e7437f9439aa6371333aa3e1b23

9 years agoMerge "Added some abstract methods to DatabaseBase"
jenkins-bot [Wed, 10 Dec 2014 05:42:48 +0000 (05:42 +0000)]
Merge "Added some abstract methods to DatabaseBase"

9 years agojquery.mwExtension.test: Use better sample data for isDomElement
Timo Tijhof [Wed, 10 Dec 2014 04:38:47 +0000 (04:38 +0000)]
jquery.mwExtension.test: Use better sample data for isDomElement

* getElementById, getElementsByTagName()[0] and jQuery#get(0) all
  return an HTMLElement. Test that only once.
  Avoid using random internal QUnit elements like #qunit-header.
  These don't always exist (e.g. when running tests via Karma).
  If anything, it should use #qunit-fixture. But might as well
  create a simple DIV and test that.

* Use 'null' instead of getElementById('not-found'). We're
  testing isDomElement, not getElementById.

* Add test for TextNode.

* Separate tests for isDomElement and isEmpty.

Change-Id: If9284fbbd066897561ae8e679f5f7ceab9255e18

9 years agoSimplify MWTidy
Ori Livneh [Tue, 2 Dec 2014 01:10:52 +0000 (17:10 -0800)]
Simplify MWTidy

* Make the internal MWTidy::*clean() functions always return an array of two
  elements: the output buffer and the error buffer.
* Make MWTidy::externalTidy() always read both stdout and stderr. We can read
  stderr after stdout because tidy.c produces output in the same order.
* Remove the $stderr parameter from the private MWTidy::*clean() methods, since
  error output is always returned.
* Merge MWTidy::phpClean and MWTidy::hhvmClean, since the difference between
  them is now small enough that splitting them up is not warranted.
* On HHVM, MWTidy::internalTidy() always returns an empty string for the error
  buffer.

Change-Id: I178b42d6ebdd1a5b9bd5921eb093a6c5014ffa49

9 years agoMerge "Add parser tests for tables with pipes and wikilinks"
jenkins-bot [Wed, 10 Dec 2014 00:39:39 +0000 (00:39 +0000)]
Merge "Add parser tests for tables with pipes and wikilinks"

9 years agoAdded some abstract methods to DatabaseBase
Aaron Schulz [Tue, 9 Dec 2014 23:32:46 +0000 (15:32 -0800)]
Added some abstract methods to DatabaseBase

Change-Id: I75781ee55d48d9fda40d600228100708d6524df8

9 years agoMerge "Allow moment on mobile web"
jenkins-bot [Wed, 10 Dec 2014 00:22:38 +0000 (00:22 +0000)]
Merge "Allow moment on mobile web"

9 years agoMerge "Made SectionProfiler cache the ScopedCallback closure to lower overhead"
jenkins-bot [Tue, 9 Dec 2014 23:46:52 +0000 (23:46 +0000)]
Merge "Made SectionProfiler cache the ScopedCallback closure to lower overhead"

9 years agoMerge "Register a shutdown function to log fatal errors"
jenkins-bot [Tue, 9 Dec 2014 23:46:04 +0000 (23:46 +0000)]
Merge "Register a shutdown function to log fatal errors"

9 years agoMade SectionProfiler cache the ScopedCallback closure to lower overhead
Aaron Schulz [Tue, 9 Dec 2014 07:44:00 +0000 (23:44 -0800)]
Made SectionProfiler cache the ScopedCallback closure to lower overhead

Change-Id: Ia6f2ef4bb82dad13d49e74c730530295d5719009

9 years agoMerge "Sync up with Parsoid parserTests."
jenkins-bot [Tue, 9 Dec 2014 23:39:25 +0000 (23:39 +0000)]
Merge "Sync up with Parsoid parserTests."

9 years agoRegister a shutdown function to log fatal errors
Bryan Davis [Fri, 5 Dec 2014 01:23:03 +0000 (18:23 -0700)]
Register a shutdown function to log fatal errors

MWExceptionHandler::handleFatalError() is installed as a shutdown
function to inspect `error_get_last()` output and log the error via
MWExceptionHandler::logError(). The error is examined to determine if it
is a missing class error so that a descriptive log message can be
provided instructing the server administrator on 3rd party library
installation methods.

Bug: T74777
Change-Id: I04748626487022c51050ffa7846236947a082d68

9 years agoSync up with Parsoid parserTests.
C. Scott Ananian [Tue, 9 Dec 2014 23:00:48 +0000 (18:00 -0500)]
Sync up with Parsoid parserTests.

This now aligns with Parsoid commit ced8a485d503dd8aa4884894b7288efc34d95f6a

Change-Id: I0850a9c39ca703ad40c897378a099efbe1418b29

9 years agoReuse page preview parses by using the edit stash system
Aaron Schulz [Thu, 4 Dec 2014 09:42:20 +0000 (01:42 -0800)]
Reuse page preview parses by using the edit stash system

* This also changes previews to render section edit tokens but
  remove them on output, avoiding cache fragmentation.
* Also shortened the resulting getStashKey() value.

Change-Id: Ic8fa87669106b960c76912b864788b781f6ee2e6

9 years agoAllow moment on mobile web
Matthew Flaschen [Tue, 9 Dec 2014 22:38:12 +0000 (17:38 -0500)]
Allow moment on mobile web

Bug: T78069
Change-Id: I72ccbd430aea92bc4a71eb51d4203dfc3b3d7ae2

9 years agoMade prepareContentForEdit() use the stash cache by default
Aaron Schulz [Tue, 9 Dec 2014 22:23:11 +0000 (14:23 -0800)]
Made prepareContentForEdit() use the stash cache by default

Change-Id: I1123a8da4764df67f1b0f2b18f6ea74ec5be7be9

9 years agoMerge "API: Don't use an empty LinkBatch in ApiOpenSearch"
jenkins-bot [Tue, 9 Dec 2014 22:19:22 +0000 (22:19 +0000)]
Merge "API: Don't use an empty LinkBatch in ApiOpenSearch"

9 years agoMerge "Handle phpunit being autoloaded from checkLess.php"
jenkins-bot [Tue, 9 Dec 2014 22:17:24 +0000 (22:17 +0000)]
Merge "Handle phpunit being autoloaded from checkLess.php"

9 years agoAPI: Don't use an empty LinkBatch in ApiOpenSearch
Brad Jorsch [Tue, 9 Dec 2014 22:11:38 +0000 (17:11 -0500)]
API: Don't use an empty LinkBatch in ApiOpenSearch

Bug: T78074
Change-Id: Ie4609b0867d816375f49190ee2860526b8fd8f3e

9 years agoMerge "Fix out-of-order entry in autoload.php"
jenkins-bot [Tue, 9 Dec 2014 22:07:14 +0000 (22:07 +0000)]
Merge "Fix out-of-order entry in autoload.php"

9 years agoFix out-of-order entry in autoload.php
Ori Livneh [Tue, 9 Dec 2014 21:57:31 +0000 (13:57 -0800)]
Fix out-of-order entry in autoload.php

Follows 1c1734758056005413dffe9859c72604231ecd9f.

Change-Id: I9b4aa5c7c9fff9c7625861c33080aeb291eef964

9 years agoVarious edit stash fixes
Aaron Schulz [Tue, 9 Dec 2014 21:48:17 +0000 (13:48 -0800)]
Various edit stash fixes

* Unlock the key at the right point, so checkCache actually sees the result
* Turn CRLF to LF just as EditPage does via getText(), this avoids misses
* Added a bit more debug logging

Change-Id: I5c296325ebee2501e5de59b8090e1ddde8689f17

9 years agoAdd parser tests for tables with pipes and wikilinks
umherirrender [Wed, 16 Jul 2014 09:28:25 +0000 (11:28 +0200)]
Add parser tests for tables with pipes and wikilinks

Change-Id: Ifd6c8eb9a9f951b9aa9f21a95d77915905220063

9 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 9 Dec 2014 20:37:59 +0000 (21:37 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I1b86a2b23ee0c26fbe6f3ebe0c8d2553ea06c7ac

9 years agoMerge "Changed some DatabaseBase type hints to IDatabase"
jenkins-bot [Tue, 9 Dec 2014 19:42:08 +0000 (19:42 +0000)]
Merge "Changed some DatabaseBase type hints to IDatabase"

9 years agoMake maintenance/findHooks.php check includes/mail/
Ricordisamoa [Tue, 9 Dec 2014 19:07:07 +0000 (19:07 +0000)]
Make maintenance/findHooks.php check includes/mail/

bf8810d6bcba81de0452ef46963e46d128ea41f2 split some
email-related code into a separate directory, along
with references to five hooks, thus listed as
'Documented and not found':
* AbortTalkPageEmailNotification
* AlternateUserMailer
* SendWatchlistEmailNotification
* UpdateUserMailerFormattedPageStatus
* UserMailerChangeReturnPath

Change-Id: I7601ea2f2b0c4c9dcf802114e464be9af88fa5cb

9 years agoRemove obsolete note from Title->canExist()
Ricordisamoa [Tue, 9 Dec 2014 19:27:30 +0000 (19:27 +0000)]
Remove obsolete note from Title->canExist()

A bit of history:
* when added by Aaron Schulz with commit
  df1f744757b0ce695e6aa1e4a28f6c50fe6d8e20, the method made use of
  a hardcoded `0`;
* Lisa Ridley noted that with
  commit bc1023ac89f9214c6510d97869fb4f280084995f by adding
  "uses hardcoded namespace index instead of constants";
* Max Semenik changed `0` to `NS_MAIN`, thus making the comment
  obsolete, with commit a35fe1f5f2f8eda52a93eb974516c3b65918c819.

Change-Id: I0c2dad773219da80cc4db04ad6a8007a03207e5c

9 years agoMerge "ResourceLoader: Stop passing around errors as /**/-comments"
jenkins-bot [Tue, 9 Dec 2014 19:28:11 +0000 (19:28 +0000)]
Merge "ResourceLoader: Stop passing around errors as /**/-comments"

9 years agoMerge "ResourceLoaderImageModule for icons"
jenkins-bot [Tue, 9 Dec 2014 19:27:22 +0000 (19:27 +0000)]
Merge "ResourceLoaderImageModule for icons"

9 years agoupdateArticleCount.php: use "vslow" DB by default, allow master
Federico Leva [Tue, 9 Dec 2014 14:50:56 +0000 (15:50 +0100)]
updateArticleCount.php: use "vslow" DB by default, allow master

Similar to initSiteStats.php, SiteStatsUpdate.php.
Needed by I13f866b565f665a00ec6ce61bb5073cf380bd0ff

Bug: T68867
Change-Id: I061b1bd7bd4b84db5ca4ecf406980dd6981941d1

9 years agoResourceLoader: Stop passing around errors as /**/-comments
Bartosz Dziewoński [Tue, 11 Nov 2014 20:00:17 +0000 (21:00 +0100)]
ResourceLoader: Stop passing around errors as /**/-comments

They are prone to being stripped by CSS and JS minification and can't
be used for non-CSS non-JS responses, like images.

We've already been keeping some state related to errors in the
$hasErrors member variable, let's go all the way and replace it with
$errors array, which tracks all errors accumulated during current
respond() call. When processing completes, all errors are added to the
response, if possible.

Change-Id: I6643f010174cb1f17780622e8a63db03cffe19e1

9 years agoResourceLoaderImageModule for icons
Bartosz Dziewoński [Tue, 11 Nov 2014 19:50:44 +0000 (20:50 +0100)]
ResourceLoaderImageModule for icons

ResourceLoaderImageModule needs a set of SVG files and some data in
the module definition, and produces styles for a set of CSS classes,
one for each image, optionally with differently colored variants,
generated in SVG and PNG, data-URI-embedded if possible, compatible
with all browsers, and generally slick.

The intended usage is to ship icon libraries with MediaWiki that can
be used throughout the pages with no additional code.

* ResourceLoaderImageModule implements all of the logic for data
  parsing and CSS generation.
* ResourceLoaderImage implements the logic for SVG image colorization
  (for variants) and rasterization.
* ResourceLoader and ResourceLoaderContext were extended to serve a
  new kind of load.php request that delivers a single image file. This
  is used for fallback PNG images served to browsers that don't
  understand SVG.

See change Ic6a76bfb for a demo.

Bug: T76473
Co-Authored-By: Trevor Parscal <trevorparscal@gmail.com>
Co-Authored-By: Bartosz Dziewoński <matma.rex@gmail.com>
Change-Id: Idf6ff4eb8e94f45946f15d283d34108b881fae6e

9 years agoRemove $logType and $visible, leftover from before output refactoring
Chad Horohoe [Tue, 9 Dec 2014 19:06:10 +0000 (11:06 -0800)]
Remove $logType and $visible, leftover from before output refactoring

Change-Id: I4d320b27471608d38b65c14c132d45c6ce3e94a8

9 years agoMerge "Parser test for "Free external link with trailing punctuation""
jenkins-bot [Tue, 9 Dec 2014 18:37:00 +0000 (18:37 +0000)]
Merge "Parser test for "Free external link with trailing punctuation""

9 years agoFix type hint in SkinTemplateOutputPageBeforeExec in hooks.txt
Reedy [Tue, 9 Dec 2014 14:41:46 +0000 (14:41 +0000)]
Fix type hint in SkinTemplateOutputPageBeforeExec in hooks.txt

No Template class, it's QuickTemplate or subclasses

Change-Id: Ie0868a98f762ab13aaa075cf4b1a8bcc5aea0b8c

9 years agoMerge "Fix for broken thumbnails when the file width is in $wgThumbnailBucket"
jenkins-bot [Tue, 9 Dec 2014 15:03:02 +0000 (15:03 +0000)]
Merge "Fix for broken thumbnails when the file width is in $wgThumbnailBucket"

9 years agoAPI: Don't double generator list
Brad Jorsch [Tue, 9 Dec 2014 14:28:35 +0000 (09:28 -0500)]
API: Don't double generator list

Bug: T77974
Change-Id: I1746da0f802e6ab7f87c83ad9918c05f98ab5ea8

9 years agoChanged some DatabaseBase type hints to IDatabase
Aaron Schulz [Tue, 9 Dec 2014 09:05:22 +0000 (01:05 -0800)]
Changed some DatabaseBase type hints to IDatabase

Change-Id: I1158c71f110b140473f56d5cbe352da1f4513ad9

9 years agoFix for broken thumbnails when the file width is in $wgThumbnailBucket
Gergő Tisza [Tue, 9 Dec 2014 01:55:49 +0000 (01:55 +0000)]
Fix for broken thumbnails when the file width is in $wgThumbnailBucket

When the source file width equals a bucket width,
File::getThumbnailBucket() suggests the use of a thumbnail of that
size. A thumbnailing attempt with the same width as the original
usually returns an error; File::generateBucketsIfNeeded() creates
an empty temporary file to later overwrite with the thumbnail, and
does not clean that file up on error. This empty file is then used
as the intermediary thumbnail for everything in the top bucket.

Bug: T77950
Change-Id: I8c2fdd9b51d227f34cac874ed2b16c87adc9315d