lhc/web/wiklou.git
8 years agoFix broken min() call in OutputPage
Aaron Schulz [Sat, 10 Oct 2015 03:55:47 +0000 (20:55 -0700)]
Fix broken min() call in OutputPage

Change-Id: Ia2d895371f6f114c1cb821dd1d2aaaef7935033f

8 years agoMerge "Add ObjectCache::getMainClusterInstance()"
jenkins-bot [Sat, 10 Oct 2015 02:43:43 +0000 (02:43 +0000)]
Merge "Add ObjectCache::getMainClusterInstance()"

8 years agoMerge "Set correct parentid on import"
jenkins-bot [Sat, 10 Oct 2015 02:21:48 +0000 (02:21 +0000)]
Merge "Set correct parentid on import"

8 years agoAdd ObjectCache::getMainClusterInstance()
Ori Livneh [Fri, 9 Oct 2015 23:26:26 +0000 (16:26 -0700)]
Add ObjectCache::getMainClusterInstance()

Provide a complement to ObjectCache::getMainWANInstance() and
ObjectCache::getMainStashInstance() which gets the default ObjectCache
instance.

Change-Id: Ib16ee40908b159e60be41a308db49a9291b5de0d

8 years agoBetter explain WANObjectCache::TTL_NONE constant
Aaron Schulz [Thu, 8 Oct 2015 17:02:02 +0000 (10:02 -0700)]
Better explain WANObjectCache::TTL_NONE constant

Change-Id: I2ce363c957f35e75a17f05b2160979a6fa4aa642

8 years agoFix "installer started" detection
Brad Jorsch [Fri, 9 Oct 2015 21:25:36 +0000 (17:25 -0400)]
Fix "installer started" detection

NoLocalSettings.php tries to detect whether the installer has been
started or not. But this detection has been broken since I4cf237d when a
change was made to stop setting the session name when NO_SESSION is
defined, causing NoLocalSettings.php to be looking at a different
session-cookie than is actually being used by the installer.

The complete fix is twofold:
* Have WebInstaller::startSession() call session_name()
* Have NoLocalSettings.php not call session_name() when PHP's
  session.auto_start configuration setting is set.

Change-Id: I618d11df902b5d1f70e175bc94137621e9195c2f

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 9 Oct 2015 20:11:52 +0000 (22:11 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I630ffad122995402233190be172a5f250c4f24d2

8 years agoMerge "mediawiki.jqueryMsg: Strip leading colon in wikilinks"
jenkins-bot [Fri, 9 Oct 2015 15:43:59 +0000 (15:43 +0000)]
Merge "mediawiki.jqueryMsg: Strip leading colon in wikilinks"

8 years agoSet correct parentid on import
umherirrender [Thu, 8 Oct 2015 19:26:56 +0000 (21:26 +0200)]
Set correct parentid on import

When importing over an existing page the parentid is set to the latest
rev id of the page, which makes the size diff in history unusable.

The import constructs the Revision object without a parentid and than
Revision::getPreviousRevisionId is using the page_latest field to
propagate the missing parentid.
Avoid this bad propagate by select the previous revision id depending on
timestamp before construct of the Revision object.

Bug: T114806
Change-Id: Iee44d5a74de459f733ea62373cdbe9911e77083f

8 years agomediawiki.jqueryMsg: Strip leading colon in wikilinks
Bartosz Dziewoński [Wed, 7 Oct 2015 18:16:30 +0000 (20:16 +0200)]
mediawiki.jqueryMsg: Strip leading colon in wikilinks

Strip leading ':', which is used to suppress special behavior in
wikitext links, e.g. [[:Category:Foo]] or [[:File:Foo.jpg]].

Also added tests for empty wikilinks.

Bug: T114130
Change-Id: Idc78310d6106c2badc0fde933f901d672556ab26

8 years agoMerge "LocalisationCache::recache(): Use array_fill_keys()"
jenkins-bot [Fri, 9 Oct 2015 06:17:07 +0000 (06:17 +0000)]
Merge "LocalisationCache::recache(): Use array_fill_keys()"

8 years agoLocalisationCache::recache(): Use array_fill_keys()
Kevin Israel [Thu, 8 Oct 2015 20:29:16 +0000 (16:29 -0400)]
LocalisationCache::recache(): Use array_fill_keys()

LocalisationCache was added in 1.16, so in order to retain PHP 5.1
compatibility, array_fill_keys() was avoided. In 1.17, support for
PHP 5.1 was dropped, so we can use that function now.

Change-Id: I435705639f1a470324a4ba46153351aadc0d40e2

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 8 Oct 2015 20:07:30 +0000 (22:07 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I02f0defd61aa359a17b6d5cfc75c9e6db0149124

8 years agoMerge "Implement ApiPageSet::setRedirectMergePolicy()"
jenkins-bot [Thu, 8 Oct 2015 18:49:36 +0000 (18:49 +0000)]
Merge "Implement ApiPageSet::setRedirectMergePolicy()"

8 years agoImplement ApiPageSet::setRedirectMergePolicy()
Erik Bernhardson [Wed, 7 Oct 2015 21:03:15 +0000 (14:03 -0700)]
Implement ApiPageSet::setRedirectMergePolicy()

This allows generator implementations to define how generator data
about a redirect gets merged into the redirect destination.  This
does not change any defaults, only modules that explicitly set a
merge policy will have a change in their results.

This functionality is initially used for the search api modules to
retain search positions within the final result set.

Bug: T92796
Change-Id: If2f49e0fc3176288c95e870240754ee320a6bf91

8 years agoMerge "Consistent TODO spelling in JavaScript"
jenkins-bot [Thu, 8 Oct 2015 18:10:35 +0000 (18:10 +0000)]
Merge "Consistent TODO spelling in JavaScript"

8 years agoMerge "Change "Subject/headline" to "Subject""
jenkins-bot [Thu, 8 Oct 2015 18:00:43 +0000 (18:00 +0000)]
Merge "Change "Subject/headline" to "Subject""

8 years agoMerge "Fix namespaced class references for Doxygen"
jenkins-bot [Thu, 8 Oct 2015 17:58:19 +0000 (17:58 +0000)]
Merge "Fix namespaced class references for Doxygen"

8 years agoMerge "mediawiki.Upload.BookletLayout: Add setFile method"
jenkins-bot [Thu, 8 Oct 2015 17:25:32 +0000 (17:25 +0000)]
Merge "mediawiki.Upload.BookletLayout: Add setFile method"

8 years agoMerge "Fix French special pages titles inconsistencies"
jenkins-bot [Thu, 8 Oct 2015 17:24:19 +0000 (17:24 +0000)]
Merge "Fix French special pages titles inconsistencies"

8 years agoMerge "Fixed Special:ChangeEmail spelling in French"
jenkins-bot [Thu, 8 Oct 2015 17:14:13 +0000 (17:14 +0000)]
Merge "Fixed Special:ChangeEmail spelling in French"

8 years agoFix namespaced class references for Doxygen
Bryan Davis [Thu, 8 Oct 2015 16:58:34 +0000 (10:58 -0600)]
Fix namespaced class references for Doxygen

Doxygen doesn't quite grok PHP's use of the reverse solidus (backslash)
character as a namespace separator. The C++ based parser it uses needs
them to be escaped in comments just as if they were being used in
a literal string context in PHP.

Change-Id: I9aff9dd0fb74a95039da1091c2f247cf71fd085a

8 years agomediawiki.Upload.BookletLayout: Add setFile method
Ed Sanders [Wed, 7 Oct 2015 20:26:50 +0000 (21:26 +0100)]
mediawiki.Upload.BookletLayout: Add setFile method

Change-Id: I30ec98be0e28e65d84b57cb78c9a89dd82d19c30

8 years agoMerge "mw.ForeignStructuredUpload.BookletLayout: Reset forms after use"
jenkins-bot [Thu, 8 Oct 2015 16:27:06 +0000 (16:27 +0000)]
Merge "mw.ForeignStructuredUpload.BookletLayout: Reset forms after use"

8 years agoMerge "mw.widgets.DateInputWidget: Close calendar after a date is picked"
jenkins-bot [Thu, 8 Oct 2015 16:01:37 +0000 (16:01 +0000)]
Merge "mw.widgets.DateInputWidget: Close calendar after a date is picked"

8 years agoMerge "Add get() flags support to BagOStuff::getWithSetCallback()"
jenkins-bot [Thu, 8 Oct 2015 15:53:17 +0000 (15:53 +0000)]
Merge "Add get() flags support to BagOStuff::getWithSetCallback()"

8 years agoMerge "Update getWithSetCallback() callers to the newer signature"
jenkins-bot [Thu, 8 Oct 2015 15:53:13 +0000 (15:53 +0000)]
Merge "Update getWithSetCallback() callers to the newer signature"

8 years agoMerge "Update getWithSetCallback() examples to use the new signature"
jenkins-bot [Thu, 8 Oct 2015 15:53:07 +0000 (15:53 +0000)]
Merge "Update getWithSetCallback() examples to use the new signature"

8 years agoMerge "Handle edge case in WikiPage::lock()"
jenkins-bot [Thu, 8 Oct 2015 15:51:12 +0000 (15:51 +0000)]
Merge "Handle edge case in WikiPage::lock()"

8 years agomw.widgets.DateInputWidget: Close calendar after a date is picked
Prateek Saxena [Thu, 8 Oct 2015 12:07:57 +0000 (17:37 +0530)]
mw.widgets.DateInputWidget: Close calendar after a date is picked

It guess it makes sense to do this. I can't think on any use case in
which the user would want to keep clicking on random dates on an open
calendar. It could be helpful if it were a filter for some
visualization, but in that case we should probably have a config to
keep the calendar always open.

Bug: T114942
Change-Id: I1c81464a1835eb488a75920334a3cf3b92ef34fc

8 years agoMerge "Effectively remove EDIT_DEFER_UPDATES flag"
jenkins-bot [Thu, 8 Oct 2015 15:43:19 +0000 (15:43 +0000)]
Merge "Effectively remove EDIT_DEFER_UPDATES flag"

8 years agoMerge "Various WikiPage code cleanups"
jenkins-bot [Thu, 8 Oct 2015 15:43:15 +0000 (15:43 +0000)]
Merge "Various WikiPage code cleanups"

8 years agoMerge "Move SquidPurgeClient under /clientpool"
jenkins-bot [Thu, 8 Oct 2015 15:43:12 +0000 (15:43 +0000)]
Merge "Move SquidPurgeClient under /clientpool"

8 years agoMerge "Convert updateChunkStatus to using a flush commit()"
jenkins-bot [Thu, 8 Oct 2015 15:33:29 +0000 (15:33 +0000)]
Merge "Convert updateChunkStatus to using a flush commit()"

8 years agoMerge "Made LinksUpdate on edit use the job queue"
jenkins-bot [Thu, 8 Oct 2015 15:31:49 +0000 (15:31 +0000)]
Merge "Made LinksUpdate on edit use the job queue"

8 years agoMerge "Show password-required message only if $wgRequirePasswordforEmailChange =...
jenkins-bot [Thu, 8 Oct 2015 15:18:17 +0000 (15:18 +0000)]
Merge "Show password-required message only if $wgRequirePasswordforEmailChange = true"

8 years agoRemove .php5 entrypoints and $wgScriptExtension
Ori Livneh [Wed, 7 Oct 2015 16:47:25 +0000 (09:47 -0700)]
Remove .php5 entrypoints and $wgScriptExtension

* The '.php5' entrypoints were deprecated in I68b1ae842, $wgScriptExtension
  in I3690f78bc.
* Drop the associated ResourceLoader configuration variable, too. `mwgrep`
  shows no usage in the MediaWiki namespace.
* Keep the scriptExtension configuration parameter for FileRepo for people who
  would like to interoperate with older MediaWiki installations that still use
  '.php5'.

Change-Id: I17c8a15484b7e82cd5970d34e688109a2aae3840

8 years agoMerge "Allow change tags to be added via API action=delete"
jenkins-bot [Thu, 8 Oct 2015 14:08:06 +0000 (14:08 +0000)]
Merge "Allow change tags to be added via API action=delete"

8 years agomw.ForeignStructuredUpload.BookletLayout: Reset forms after use
Prateek Saxena [Thu, 8 Oct 2015 11:44:28 +0000 (17:14 +0530)]
mw.ForeignStructuredUpload.BookletLayout: Reset forms after use

Bug: T114936
Bug: T114947
Change-Id: I96a6440c32316a077069bb744fff8564e91a04b2

8 years agoMerge "Provide a default "max lag" value for LoadBalancer"
jenkins-bot [Thu, 8 Oct 2015 08:36:33 +0000 (08:36 +0000)]
Merge "Provide a default "max lag" value for LoadBalancer"

8 years agoProvide a default "max lag" value for LoadBalancer
Aaron Schulz [Thu, 8 Oct 2015 03:44:54 +0000 (20:44 -0700)]
Provide a default "max lag" value for LoadBalancer

* No MediaWiki site can tolerate unbounded slave lag
  without editing and account creation and such being
  broken and unusable
* Also fix a few trivial __construct() IDEA errors

Change-Id: I95b8b73be2df3b5a87e7adbf53988cfbeb85c260

8 years agoMade LinksUpdate on edit use the job queue
Aaron Schulz [Wed, 30 Sep 2015 19:30:22 +0000 (12:30 -0700)]
Made LinksUpdate on edit use the job queue

* LinksUpdate is now an EnqueueableDataUpdate
  and can yeild a prioritzed refreshLinks job.
* DeferredUpdates::runUpdates() now takes an enqueue
  flag to try to use jobs. This is set in restInPeace().
  Updates that change many links will be less likely to
  increase lag, as the runners are more strict about that.
* Also made the LinksDeletionUpdate job enqueue happen
  post-send on page deletion for consistency

Bug: T95501
Change-Id: I8863caef9c8f03234699d33e4d47d2310a0c8446

8 years agoMerge "Make ForeignDBRepo::getDBFactory() actually work on 5.3"
jenkins-bot [Thu, 8 Oct 2015 07:56:08 +0000 (07:56 +0000)]
Merge "Make ForeignDBRepo::getDBFactory() actually work on 5.3"

8 years agoMerge "Make DeferredUpdates::doUpdates use DataUpdate::runUpdates"
jenkins-bot [Thu, 8 Oct 2015 07:47:02 +0000 (07:47 +0000)]
Merge "Make DeferredUpdates::doUpdates use DataUpdate::runUpdates"

8 years agoMake ForeignDBRepo::getDBFactory() actually work on 5.3
Aaron Schulz [Thu, 8 Oct 2015 05:36:49 +0000 (22:36 -0700)]
Make ForeignDBRepo::getDBFactory() actually work on 5.3

Change-Id: Id790ccb1728a6a163f2e2149dd56ec1b14fc33af

8 years agoMove SquidPurgeClient under /clientpool
Aaron Schulz [Thu, 8 Oct 2015 07:36:22 +0000 (00:36 -0700)]
Move SquidPurgeClient under /clientpool

Each class has its own file now too.

Change-Id: I11593d6efbfce8e3981895e84edb4e0dea3998e4

8 years agoAllow change tags to be added via API action=delete
This, that and the other [Thu, 8 Oct 2015 07:34:27 +0000 (18:34 +1100)]
Allow change tags to be added via API action=delete

ApiDelete::delete() and ApiDelete::deleteFile() are altered from public
to protected visibility. This is not believed to affect any extensions.

Also get rid of the token variables, as they are not doing anything useful.

Bug: T108564
Change-Id: I6143043dafa6425a0df4baefe970620cbe69466c

8 years agoMake DeferredUpdates::doUpdates use DataUpdate::runUpdates
Aaron Schulz [Thu, 8 Oct 2015 06:46:18 +0000 (23:46 -0700)]
Make DeferredUpdates::doUpdates use DataUpdate::runUpdates

All DataUpdate objects will be managed by runUpdates() while
the other DeferrableUpdate objects will still be run here.
This respects the transaction sematics of DataUpdate a bit more.

Change-Id: Ia0d2dd26a38b0e8911589407b533b58d04d2b084

8 years agoEffectively remove EDIT_DEFER_UPDATES flag
Aaron Schulz [Thu, 8 Oct 2015 07:02:22 +0000 (00:02 -0700)]
Effectively remove EDIT_DEFER_UPDATES flag

* All DeferrableUpdates will be deferred as normal.
  In CLI mode this is just post-commit and would have
  happened before the doUpdates() call anyway. For web
  requests this will be at request-end (post-send on HHVM).
  Note that deferral was already the default for EditPage.
* Previously, it was easy to accidently not set EDIT_DEFER_UPDATES.
  Deferred updates are supposed to be deferrable by definition,
  and there is no longer the problem of them piling up in CLI in
  recent versions. Not deferring mostly just forfeits performance.
* Also, it is not really the responsibility of WikiPage to be
  running DeferrableUpdate instances itself.

Change-Id: I2bc47b82635e0a24b1df5d502ba66f6de737697e

8 years agoMerge "SpecialEditWatchlist: Use 'parentheses' message instead of hard-coded ()"
jenkins-bot [Thu, 8 Oct 2015 07:01:38 +0000 (07:01 +0000)]
Merge "SpecialEditWatchlist: Use 'parentheses' message instead of hard-coded ()"

8 years agoSmall clean-ups for OutputPage::userCanPreview
Ori Livneh [Thu, 8 Oct 2015 06:04:59 +0000 (23:04 -0700)]
Small clean-ups for OutputPage::userCanPreview

Change-Id: Ibd973750b60cbcc8d1289686de6cabcfdca5c5d9

8 years agoFix-up for I949fc289d: handle falsy cookie values correctly
Ori Livneh [Thu, 8 Oct 2015 04:45:26 +0000 (21:45 -0700)]
Fix-up for I949fc289d: handle falsy cookie values correctly

Ensure that OutputPage::haveVaryCacheCookies() handles falsey values correctly,
and that it requires a cookie to have a nonempty value before it declares a
match.

Change-Id: I2afe54b62c940187a427498cb4037e1dd0e78dd9

8 years agoUpdate getWithSetCallback() examples to use the new signature
Aaron Schulz [Thu, 8 Oct 2015 04:52:43 +0000 (21:52 -0700)]
Update getWithSetCallback() examples to use the new signature

Change-Id: I81916b4d1884bad5d30f689698aa35cdb9f139eb

8 years agoVarious WikiPage code cleanups
Aaron Schulz [Thu, 8 Oct 2015 04:36:54 +0000 (21:36 -0700)]
Various WikiPage code cleanups

* Break numerous long lines
* Clean up style in a few methods
* Fix some IntelliJ IDEA errors

Change-Id: If8e58906031d4080c28ac33b0c9b5efe95b15854

8 years agoReplace XVO with support for the Key HTTP header
Faidon Liambotis [Tue, 6 Oct 2015 07:01:10 +0000 (10:01 +0300)]
Replace XVO with support for the Key HTTP header

MediaWiki currently has support for a header called X-Vary-Options
(XVO), used to communicate to upstream caches more granular cache
variance options than the Vary header can.

The header was envisioned by Tim Starling back in 2008 and implemented
into MediaWiki and Squid 2.0, with those patches submitted to the
squid-dev mailing list at the time:
http://www.squid-cache.org/mail-archive/squid-dev/200802/0085.html
The patches never actually made it into an upstream Squid release,
however, and Squid has since evolved in potentially significant ways.

Wikimedia has since switched to Varnish but XVO was not ported over as
it was deemed too complex at the time; custom VCL was used instead. To
our knowledge, noone else is using XVO in production and certainly not
with recent, up-to-date MediaWiki releases.

There is currently work at IETF's httpbis working group for a "Key"
header that is in concept and implementation very similar to Tim's XVO
header: https://datatracker.ietf.org/doc/draft-fielding-http-key/

Rather than rip XVO out of MediaWiki, replace it with support for the
Key header, as preliminary defined by the draft spec. This is an almost
straight search-and-replace.

No other software (caching proxy or user-agent) currently implements Key
to my knowledge, so this is essentially untested.

Change-Id: I949fc289dd5d48bd34f3b37f7739e2b9cd5db277

8 years agoAdd get() flags support to BagOStuff::getWithSetCallback()
Aaron Schulz [Thu, 8 Oct 2015 03:51:00 +0000 (20:51 -0700)]
Add get() flags support to BagOStuff::getWithSetCallback()

Change-Id: Ib6046f5bc5d8c0481f90b56c381ba761fee558d6

8 years agoFix default $oldOpts from 09cbebb224
Aaron Schulz [Thu, 8 Oct 2015 03:26:38 +0000 (20:26 -0700)]
Fix default $oldOpts from 09cbebb224

This fixes the default $oldOpts value for the case when
$opts is given check keys and no $oldOpts value is passed
in. In that case, the getWithSetCallback() method
variable $opts would be null instead of array().

Change-Id: I825062533478b37766511aae1d06dd4b81f8dba1

8 years agoUpdate getWithSetCallback() callers to the newer signature
Aaron Schulz [Thu, 8 Oct 2015 02:27:08 +0000 (19:27 -0700)]
Update getWithSetCallback() callers to the newer signature

Change-Id: I1cda46178c16b7ffad97d09f8480fd57f766be57

8 years agoWANObjectCache: Change getWithSetCallback() signature to key/ttl/callback/opts
Timo Tijhof [Wed, 7 Oct 2015 23:21:11 +0000 (16:21 -0700)]
WANObjectCache: Change getWithSetCallback() signature to key/ttl/callback/opts

* Put 'checkKeys' param in opts array instead of as a separate parameter.
  It's neat to not have to skip unnamed/positional arguments that are optional.
* Move TTL to be before callback instead of after. This avoids dangling integers
  toward the bottom of a large code block that have no obvious meaning.
  Matches BagOStuff::getWithSetCallback.

Add unit test for lockTSE to confirm

Change-Id: I60d6b64fc5dff14108741bafe801fd1fde16d1df

8 years agoobjectcache: Fix flaky unit test
Timo Tijhof [Thu, 8 Oct 2015 00:17:13 +0000 (17:17 -0700)]
objectcache: Fix flaky unit test

Change-Id: Id7d3b75248a42e2e82a51d70a3ee1479f0507685

8 years agoHandle edge case in WikiPage::lock()
Aaron Schulz [Wed, 7 Oct 2015 20:42:42 +0000 (13:42 -0700)]
Handle edge case in WikiPage::lock()

If the page row for the title was replaced with another
row with the same title *and* page_latest but a different
page_id, callers will want to bail when doing CAS logic

Change-Id: Ia98323d5adf59b91eb86849fd21dd90f586b9207

8 years agoSite: fix copy-n-paste phpdoc
Bryan Davis [Wed, 7 Oct 2015 21:21:28 +0000 (15:21 -0600)]
Site: fix copy-n-paste phpdoc

Change-Id: I5e735089b3dacea94044fa96f821fc47940f7029

8 years agoUpdate OOjs UI to v0.12.11
James D. Forrester [Wed, 7 Oct 2015 20:59:52 +0000 (13:59 -0700)]
Update OOjs UI to v0.12.11

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

Change-Id: I2884af2f6de88754b06f3e644d302e489f5abec5

8 years agoMerge "More quick fixes for mw.ForeignUpload"
jenkins-bot [Wed, 7 Oct 2015 20:04:12 +0000 (20:04 +0000)]
Merge "More quick fixes for mw.ForeignUpload"

8 years agoMerge "Made Database atomic section errors mention the sections"
jenkins-bot [Wed, 7 Oct 2015 19:53:24 +0000 (19:53 +0000)]
Merge "Made Database atomic section errors mention the sections"

8 years agoMerge "Convert doBatchPushInternal to use startAtomic/endAtomic"
jenkins-bot [Wed, 7 Oct 2015 19:51:28 +0000 (19:51 +0000)]
Merge "Convert doBatchPushInternal to use startAtomic/endAtomic"

8 years agoMore quick fixes for mw.ForeignUpload
Bartosz Dziewoński [Wed, 7 Oct 2015 19:32:20 +0000 (21:32 +0200)]
More quick fixes for mw.ForeignUpload

Follow-up to 2814053cb0c27bda0a76b21ffc9eeb31ef9726b1.
Maybe it works this time!

Change-Id: I2633c87ac8b78d411eaa4622c7ad62e35f4cac78

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 7 Oct 2015 19:39:07 +0000 (21:39 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I64e0e170899ff0395a1ae3e7979a6473f99a7c3f

8 years agoMade Database atomic section errors mention the sections
Aaron Schulz [Wed, 7 Oct 2015 19:31:04 +0000 (12:31 -0700)]
Made Database atomic section errors mention the sections

Change-Id: Ia6243dd655ef09f3bfbc66ac6d0757ec7bb4bd10

8 years agoMerge "mw.Upload.BookletLayout: Add a catch all error state"
jenkins-bot [Wed, 7 Oct 2015 18:19:40 +0000 (18:19 +0000)]
Merge "mw.Upload.BookletLayout: Add a catch all error state"

8 years agoMerge "Split out UserInputWidgets from mediawiki.widgets"
jenkins-bot [Wed, 7 Oct 2015 18:12:39 +0000 (18:12 +0000)]
Merge "Split out UserInputWidgets from mediawiki.widgets"

8 years agoMerge "Quick fixes for mw.ForeignUpload"
Bartosz Dziewoński [Wed, 7 Oct 2015 18:08:12 +0000 (18:08 +0000)]
Merge "Quick fixes for mw.ForeignUpload"

8 years agoConvert updateChunkStatus to using a flush commit()
Aaron Schulz [Wed, 7 Oct 2015 18:06:55 +0000 (11:06 -0700)]
Convert updateChunkStatus to using a flush commit()

This will at least warn if an explicit transaction
from a caller via begin() is active

Change-Id: Id4198cb35368c0d92cf8abfde46c75ea09fd8f96

8 years agoConvert doBatchPushInternal to use startAtomic/endAtomic
Aaron Schulz [Wed, 7 Oct 2015 18:03:35 +0000 (11:03 -0700)]
Convert doBatchPushInternal to use startAtomic/endAtomic

This is less likely to cause nesting problems if the main
DB is used for the job table (e.g. stock installs)

Change-Id: I4c72688bd5d07a6b0626958869e6b386babbc5b3

8 years agoQuick fixes for mw.ForeignUpload
Mark Holmquist [Wed, 7 Oct 2015 16:55:48 +0000 (11:55 -0500)]
Quick fixes for mw.ForeignUpload

Message name tweaks, and default fixes for the targets.

Remove useless tests.

Change-Id: I327050a5fec0df3ccd68ba777d6dc12b833fc13a

8 years agoWhitelist ApiErrorFormatter_BackCompat as class not in camel case
umherirrender [Sat, 3 Oct 2015 18:51:58 +0000 (20:51 +0200)]
Whitelist ApiErrorFormatter_BackCompat as class not in camel case

The class name is used in extensions

Change-Id: Idd1435c5997be5b43fdeea636a453e1d675cfb27

8 years agoAPI: Allow generator=recentchanges to generate revids
Brad Jorsch [Sun, 27 Sep 2015 15:18:47 +0000 (11:18 -0400)]
API: Allow generator=recentchanges to generate revids

A quick review of usage on enwiki reveals that people are currently
using generator=recentchanges with prop=revisions, so the generation of
revids is not the default to avoid breaking those clients.

Bug: T113884
Change-Id: Ia91af7099120660dc40230b76896090843985d96

8 years agoMerge "API: Add ApiQueryAllRevisions"
jenkins-bot [Wed, 7 Oct 2015 16:38:35 +0000 (16:38 +0000)]
Merge "API: Add ApiQueryAllRevisions"

8 years agoMerge "Make WikiMap fall back to sites if a site couldn't be found using $wgConf"
jenkins-bot [Wed, 7 Oct 2015 16:25:50 +0000 (16:25 +0000)]
Merge "Make WikiMap fall back to sites if a site couldn't be found using $wgConf"

8 years agoMerge "Return log id for file deletions"
jenkins-bot [Wed, 7 Oct 2015 16:19:06 +0000 (16:19 +0000)]
Merge "Return log id for file deletions"

8 years agoMerge "Use ForeignFileRepo information for foreign uploads"
jenkins-bot [Wed, 7 Oct 2015 16:05:58 +0000 (16:05 +0000)]
Merge "Use ForeignFileRepo information for foreign uploads"

8 years agoUse ForeignFileRepo information for foreign uploads
Mark Holmquist [Tue, 6 Oct 2015 18:13:13 +0000 (13:13 -0500)]
Use ForeignFileRepo information for foreign uploads

This seems like a (slightly) cleaner system. We'll need to change
some documentation and add some configuration, but at least this will
be easier to handle.

Bug: T114765
Change-Id: If962fd3066e25e43e745efd29058eae82195bfb1

8 years agoSplit out UserInputWidgets from mediawiki.widgets
Florian [Mon, 5 Oct 2015 17:50:15 +0000 (19:50 +0200)]
Split out UserInputWidgets from mediawiki.widgets

Move it to its own module mediawiki.widgets.UserInputWidget. It's
currently used in HTMLUserTextField only.

Bug: T108733
Change-Id: Id8c6dd5d9616086bdb0918442bfafe9ec708ab31

8 years agoMerge "Bump WANObjectCache::LOW_TTL to 30"
jenkins-bot [Wed, 7 Oct 2015 15:35:10 +0000 (15:35 +0000)]
Merge "Bump WANObjectCache::LOW_TTL to 30"

8 years agoMerge "Small optimization for FileContentsHasher"
jenkins-bot [Wed, 7 Oct 2015 15:25:58 +0000 (15:25 +0000)]
Merge "Small optimization for FileContentsHasher"

8 years agoReturn log id for file deletions
Brad Jorsch [Wed, 7 Oct 2015 14:19:36 +0000 (10:19 -0400)]
Return log id for file deletions

WikiPage::doDeleteArticleReal returns the log id as the value of the
returned Status object, and ApiDelete depends on this. ApiDelete is also
expecting FileDeleteForm::doDelete to do the same, so let's make it
happen.

Bug: T114893
Change-Id: Ia887d88f16378134924d122dad6c17c8a981f0e6

8 years agoMake WikiMap fall back to sites if a site couldn't be found using $wgConf
Marius Hoch [Thu, 1 Oct 2015 10:57:25 +0000 (12:57 +0200)]
Make WikiMap fall back to sites if a site couldn't be found using $wgConf

The mapping is not very good, but should be good enough, given
that only the URL parts are really being used.

Bug: T114107
Change-Id: I8186140aed5620cf7b4ba84aa4c9492c61f406d0

8 years agoMerge "Pass the search term into the SpecialSearchResultsAppend hook"
jenkins-bot [Wed, 7 Oct 2015 10:37:50 +0000 (10:37 +0000)]
Merge "Pass the search term into the SpecialSearchResultsAppend hook"

8 years agoBump WANObjectCache::LOW_TTL to 30
Aaron Schulz [Wed, 7 Oct 2015 06:50:24 +0000 (23:50 -0700)]
Bump WANObjectCache::LOW_TTL to 30

This better handles values that take a long time to
generate. For example if it took 10 sec, then the old
value would not regenerate in time. 30 is a good, high,
value that is the default PHP timeout.

Change-Id: I2e4372bf4c6d28d09347012926d8c0a9deda4183

8 years agoClean up BagOStuff::get() interface
Aaron Schulz [Sun, 4 Oct 2015 05:59:38 +0000 (22:59 -0700)]
Clean up BagOStuff::get() interface

* Callers of get() no longer have to contend with
  the annoying $casToken parameter, which is there
  but totally unusable to non-BagOStuff code.
* The default get() now delegates to doGet(),
  which callers must implement instead. They can
  ignore the overhead of generating $casToken if
  they do not implement cas(), which applies to
  callers that use the stock merge(). If cas() is
  used for merge(), then getWithToken() must be
  implemented.
* Also add BagOStuff::READ_LATEST to mergeViaCas()
  for sanity, as that missing before.
  Likewise with mergeViaLock().

Change-Id: I4efce6a9ab4b1eadd2f161dff641004a7239c516

8 years agoMerge "Remove begin/commit from recordOldUpload()"
jenkins-bot [Wed, 7 Oct 2015 02:45:27 +0000 (02:45 +0000)]
Merge "Remove begin/commit from recordOldUpload()"

8 years agoMerge "Move WebRequestUpload class to its own file"
jenkins-bot [Wed, 7 Oct 2015 02:36:14 +0000 (02:36 +0000)]
Merge "Move WebRequestUpload class to its own file"

8 years agoMerge "Remove begin/commit from recordUpload2()"
jenkins-bot [Wed, 7 Oct 2015 02:31:39 +0000 (02:31 +0000)]
Merge "Remove begin/commit from recordUpload2()"

8 years agoRemove begin/commit from recordOldUpload()
Aaron Schulz [Tue, 6 Oct 2015 18:10:33 +0000 (11:10 -0700)]
Remove begin/commit from recordOldUpload()

* The only caller already has has transaction via lock/unlock
  and does the file operations first (avoiding contention)
* Also made recordOldUpload() protected

Change-Id: Ib03ca76895a181ed513a289e2b44f6b97e4a1bc0

8 years agoMove WebRequestUpload class to its own file
Timo Tijhof [Wed, 7 Oct 2015 02:24:58 +0000 (19:24 -0700)]
Move WebRequestUpload class to its own file

Moving out of WebRequest.php. It's not even a subclass.

Change-Id: I87e5c01afe215a084e39b442c65d22d9d0cc1015

8 years agoMerge "Fix AssembleUploadChunksJob/PublishStashedFileJob IDEA errors"
jenkins-bot [Wed, 7 Oct 2015 02:18:43 +0000 (02:18 +0000)]
Merge "Fix AssembleUploadChunksJob/PublishStashedFileJob IDEA errors"

8 years agoMerge "Lower CDN cache TTL when slave lag is high"
jenkins-bot [Wed, 7 Oct 2015 02:01:34 +0000 (02:01 +0000)]
Merge "Lower CDN cache TTL when slave lag is high"

8 years agoUpdate more docs and type hints to use IDatabase
Aaron Schulz [Tue, 6 Oct 2015 05:39:37 +0000 (22:39 -0700)]
Update more docs and type hints to use IDatabase

Change-Id: I8c8d85b32a8aba21e14d2a2dde4c25eb509186c1

8 years agoLower CDN cache TTL when slave lag is high
Aaron Schulz [Thu, 1 Oct 2015 07:24:18 +0000 (00:24 -0700)]
Lower CDN cache TTL when slave lag is high

* $wgCdnMaxageLagged controls exactly what that TTL is
  and the usual "max lag" settings determine what "high"
  is for lag (which already makes the site read-only).
* This helps avoids stale content getting stuck in CDN
  for a month just because a slave was lagged for a minute.
  Of course race conditions with normal slave lag and WAN
  cache relay purges can still lead to this problem, though
  the scope of it is reduced.

Bug: T113204
Change-Id: I7ff0a8d88665f4e557566e7b412e75edee2627fe

8 years agoMerge "Enforce lagged-slave read-only mode on the DB layer"
jenkins-bot [Wed, 7 Oct 2015 01:40:34 +0000 (01:40 +0000)]
Merge "Enforce lagged-slave read-only mode on the DB layer"