lhc/web/wiklou.git
8 years agoProvide some default $wgRateLimits values
Aaron Schulz [Thu, 22 Oct 2015 04:52:52 +0000 (21:52 -0700)]
Provide some default $wgRateLimits values

* This provides some minimal out-of-the-box protection.
* These mostly are the values used by WMF in mediawiki-config

Change-Id: Ie510ca9314e151f9c0ad0705d096fe2bb749a59d

8 years agoMerge "objectcache: Fix grammar error in BagOStuff::getWithToken doc"
jenkins-bot [Thu, 22 Oct 2015 02:33:16 +0000 (02:33 +0000)]
Merge "objectcache: Fix grammar error in BagOStuff::getWithToken doc"

8 years agoAdd WRITE_SYNC flag to BagOStuff::set()/merge()
Aaron Schulz [Sun, 18 Oct 2015 22:57:42 +0000 (15:57 -0700)]
Add WRITE_SYNC flag to BagOStuff::set()/merge()

* This blocks on writing to all replicas
  and returns false if any failed.
* This is useful if ChronologyProtector is to work across
  domains by having the writes go everywhere so that later
  reads will see them (and be local at the same time).
* Redundant doc comments were also removed.

Change-Id: I9ed098d563c64dba605e7809bc96731da3b3e79d

8 years agoobjectcache: Fix grammar error in BagOStuff::getWithToken doc
Timo Tijhof [Thu, 22 Oct 2015 01:35:35 +0000 (02:35 +0100)]
objectcache: Fix grammar error in BagOStuff::getWithToken doc

Follows-up 1fa1235d32.

Change-Id: I19a4430609423f5ff32a1014ed21131175469adf

8 years agoMake DeferredUpdates::doUpdates always commit per task
Aaron Schulz [Thu, 8 Oct 2015 07:09:08 +0000 (00:09 -0700)]
Make DeferredUpdates::doUpdates always commit per task

* All callers are either using commit already or would be fine
  using it (e.g. Maintenance scripts and JobRunner that have
  no real transaction open).

Change-Id: I9f54b27619da6dac2cb63d255995aabc4ee78002

8 years agoMake hookErrorHandler() only care about serious signature errors
Aaron Schulz [Thu, 22 Oct 2015 00:31:18 +0000 (17:31 -0700)]
Make hookErrorHandler() only care about serious signature errors

Previously, it would send all manor of warnings to the error
and error-json channels. This adds a lot of overhead due to
AbuseFilter parse/eval errors. By passing immediately instead
of after calling handleError(), that overhead is avoided. Since
it still passes (e.g. returns false), any default PHP warning
logging still applies.

Change-Id: I18e60c09c2a48f2e26abab5d451bb52ea4ba7961

8 years agoMerge "TemplateParser: Use context makeKey() instead of wfMemcKey()"
jenkins-bot [Thu, 22 Oct 2015 00:11:29 +0000 (00:11 +0000)]
Merge "TemplateParser: Use context makeKey() instead of wfMemcKey()"

8 years agoTemplateParser: Use context makeKey() instead of wfMemcKey()
Timo Tijhof [Wed, 21 Oct 2015 23:55:10 +0000 (00:55 +0100)]
TemplateParser: Use context makeKey() instead of wfMemcKey()

Also:
* Use ternary shorthand.
* Remove verbose comment about APC fallback. APC always requires
  a fallback and is enforced by the method being called. Stating
  the obvious is confusing here.

Change-Id: Ie5cb3bdc60600806b01b57f1f1b352b981818b0d

8 years agoMerge "mediawiki.api: Don't hold references to finished requests forever"
jenkins-bot [Wed, 21 Oct 2015 20:54:04 +0000 (20:54 +0000)]
Merge "mediawiki.api: Don't hold references to finished requests forever"

8 years agoMerge "Replace some calls to wfGetMainCache()"
jenkins-bot [Wed, 21 Oct 2015 20:05:47 +0000 (20:05 +0000)]
Merge "Replace some calls to wfGetMainCache()"

8 years agoMerge "Fix transaction warnings on test cleanup rollback()"
jenkins-bot [Wed, 21 Oct 2015 19:54:26 +0000 (19:54 +0000)]
Merge "Fix transaction warnings on test cleanup rollback()"

8 years agomediawiki.api: Don't hold references to finished requests forever
Bartosz Dziewoński [Tue, 20 Oct 2015 22:50:20 +0000 (00:50 +0200)]
mediawiki.api: Don't hold references to finished requests forever

Follow-up to Ie614b05fbfbddca38ea201e90053bebdd58da949.

Also removed a TODO comment which no longers makes sense. (We can't
share API objects because users could abort each others' requests.)

Change-Id: I106139d6e463d7e5e3473035835eb74b18829b87

8 years agoMerge "mediawiki.api: Remove incomprehensible TODO"
jenkins-bot [Wed, 21 Oct 2015 19:23:46 +0000 (19:23 +0000)]
Merge "mediawiki.api: Remove incomprehensible TODO"

8 years agoMerge "Send X-Database-Lagged header to help with debugging"
jenkins-bot [Wed, 21 Oct 2015 19:13:55 +0000 (19:13 +0000)]
Merge "Send X-Database-Lagged header to help with debugging"

8 years agoFix transaction warnings on test cleanup rollback()
Aaron Schulz [Wed, 21 Oct 2015 19:13:22 +0000 (12:13 -0700)]
Fix transaction warnings on test cleanup rollback()

Change-Id: I85f607c7562474d57f515a947181884fccae735c

8 years agoSend X-Database-Lagged header to help with debugging
Aaron Schulz [Wed, 21 Oct 2015 00:27:27 +0000 (17:27 -0700)]
Send X-Database-Lagged header to help with debugging

Change-Id: Ib654c49a61a1279091c5da92a2bef2ad1f992d23

8 years agoMerge "Convert showPatrolFooter() to using WAN cache"
jenkins-bot [Wed, 21 Oct 2015 18:24:27 +0000 (18:24 +0000)]
Merge "Convert showPatrolFooter() to using WAN cache"

8 years agoMerge "mw.ForeignStructuredUpload: Provide category suggestions from the right wiki"
jenkins-bot [Wed, 21 Oct 2015 17:55:19 +0000 (17:55 +0000)]
Merge "mw.ForeignStructuredUpload: Provide category suggestions from the right wiki"

8 years agomediawiki.api: Remove incomprehensible TODO
Bartosz Dziewoński [Tue, 20 Oct 2015 22:48:22 +0000 (00:48 +0200)]
mediawiki.api: Remove incomprehensible TODO

Change-Id: Iae632527c8b104ddd94b89679d1dba977fddb557

8 years agoMerge "mw.ForeignStructuredUpload: Rearrange messages to always display license name"
jenkins-bot [Wed, 21 Oct 2015 15:45:13 +0000 (15:45 +0000)]
Merge "mw.ForeignStructuredUpload: Rearrange messages to always display license name"

8 years agoAdd pst option to API difftotext
Matt Russell [Mon, 31 Mar 2014 07:58:54 +0000 (07:58 +0000)]
Add pst option to API difftotext

Adds the option difftotextpst to ApiQueryRevisionsBase.php, which will perform a
pre-save transform on the supplied text, before diffing it against the
requested revision.

Bug: T53155
Change-Id: Ia480e8cd4ceeeb0b2812dc8ec96650adb83c03af

8 years agoMerge "Sync up with Parsoid parserTests."
jenkins-bot [Wed, 21 Oct 2015 12:55:34 +0000 (12:55 +0000)]
Merge "Sync up with Parsoid parserTests."

8 years agoBetter phrasing for the contentmodelediterror message
Amir E. Aharoni [Wed, 21 Oct 2015 11:50:11 +0000 (14:50 +0300)]
Better phrasing for the contentmodelediterror message

Change-Id: Ie69642f8ae6993d7bb08b785229321ed04428502

8 years agoConvert showPatrolFooter() to using WAN cache
Aaron Schulz [Wed, 21 Oct 2015 11:06:42 +0000 (04:06 -0700)]
Convert showPatrolFooter() to using WAN cache

Change-Id: I55503eab91d0c64b2dcbc86257088a3eac52a2a1

8 years agomw.ForeignStructuredUpload: Rearrange messages to always display license name
Bartosz Dziewoński [Wed, 21 Oct 2015 10:25:52 +0000 (12:25 +0200)]
mw.ForeignStructuredUpload: Rearrange messages to always display license name

See the task for screenshots.

Bug: T116046
Change-Id: I3dc021713c460e4cd639b7d85545ad4b5afe514b

8 years agoReplace some calls to wfGetMainCache()
Aaron Schulz [Wed, 21 Oct 2015 06:52:07 +0000 (23:52 -0700)]
Replace some calls to wfGetMainCache()

Change-Id: I9ba8fd5918877af6312b0854634bd36211438f00

8 years agoRemove wgAlwaysUseTidy from ExpandTemplates
saper [Thu, 15 Oct 2015 07:08:02 +0000 (09:08 +0200)]
Remove wgAlwaysUseTidy from ExpandTemplates

Fixes ConfigException:

Exception encountered, of type "ConfigException"
[1235d69e] index.php/Special:ExpandTemplates ConfigException
from line 53 of
includes/config/GlobalVarConfig.php:
GlobalVarConfig::get: undefined option: 'AlwaysUseTidy'
Backtrace:
includes/specials/SpecialExpandTemplates.php(117):
GlobalVarConfig->get(string)
i includes/specialpage/SpecialPage.php(384):
SpecialExpandTemplates->execute(NULL)

Change-Id: Iba16f12f50f7427533f89817eb40f46a2ab58ec4

8 years agoMerge "Improve MultiWriteBagOStuff::merge() cross-DC performance"
jenkins-bot [Wed, 21 Oct 2015 05:06:44 +0000 (05:06 +0000)]
Merge "Improve MultiWriteBagOStuff::merge() cross-DC performance"

8 years agoImprove MultiWriteBagOStuff::merge() cross-DC performance
Aaron Schulz [Wed, 21 Oct 2015 04:50:27 +0000 (21:50 -0700)]
Improve MultiWriteBagOStuff::merge() cross-DC performance

Implement merge() by getting a lock on the tier 1
cache, getting it's value, generating the new one,
writing to all tiers, and then unlocking tier 1.
This is done by just using the stock mergeViaLock().

This means that if tier 1 is in the same DC, the
other tiers only need 1 request each, just for set().

Change-Id: I4b0c303ef3b86b63e7630032ed0b010e79706324

8 years agoMerge "Handle revisions with different content models in EditPage"
jenkins-bot [Wed, 21 Oct 2015 04:08:02 +0000 (04:08 +0000)]
Merge "Handle revisions with different content models in EditPage"

8 years agoMerge "Improve documentation of $wgShowRollbackEditCount"
jenkins-bot [Wed, 21 Oct 2015 03:58:33 +0000 (03:58 +0000)]
Merge "Improve documentation of $wgShowRollbackEditCount"

8 years agoresourceloader: Remove CacheEpoch from MessageBlobStore::getFromDB
Timo Tijhof [Tue, 20 Oct 2015 21:14:33 +0000 (22:14 +0100)]
resourceloader: Remove CacheEpoch from MessageBlobStore::getFromDB

CacheEpoch isn't meant for this (it's meant for page cache), I can't
imagine a scenario in which we'd want to bump that to invalidate
MessageBlobStore. It should be standalone and can be easily cleared
if needed by truncating the relevant table (it's automatically
repopulated).

This also removes wfTimestamp/DateTime overhead.

Change-Id: Iab06edbf71f20f3430207a80df90131c79dc03a7

8 years agomw.ForeignStructuredUpload: Provide category suggestions from the right wiki
Bartosz Dziewoński [Tue, 20 Oct 2015 22:32:19 +0000 (00:32 +0200)]
mw.ForeignStructuredUpload: Provide category suggestions from the right wiki

Also check for category existence on the right wiki, and generate
links pointing to the right wiki. Usually.

Bug: T116075
Change-Id: I85da301db4cb407b011277b0c00eb09a8bf3829f

8 years agoImprove documentation of $wgShowRollbackEditCount
Timo Tijhof [Wed, 21 Oct 2015 01:57:32 +0000 (02:57 +0100)]
Improve documentation of $wgShowRollbackEditCount

There were a few grammatical errors, and ambiguities.

Change-Id: I49f998c3d2a693bd755c1aaa4cf08bc5fd5fd505

8 years agoAdd IDatabase::isReadOnly() method
Aaron Schulz [Tue, 20 Oct 2015 23:42:02 +0000 (16:42 -0700)]
Add IDatabase::isReadOnly() method

Also made getReadOnlyReason() protected as it has no outside
callers and is not part of IDatabase.

Change-Id: If6694a19df038af645a97f701397a536570d1b42

8 years agoMerge "Make DB handles inherit configured read-only mode"
jenkins-bot [Tue, 20 Oct 2015 23:37:22 +0000 (23:37 +0000)]
Merge "Make DB handles inherit configured read-only mode"

8 years agoMerge "Remove $wgAjaxWatch configuration variable"
jenkins-bot [Tue, 20 Oct 2015 23:32:32 +0000 (23:32 +0000)]
Merge "Remove $wgAjaxWatch configuration variable"

8 years agoMake DB handles inherit configured read-only mode
Aaron Schulz [Sat, 10 Oct 2015 00:22:14 +0000 (17:22 -0700)]
Make DB handles inherit configured read-only mode

LBFactory inherits $wgReadOnly, the LBs inherit
any LBFactory read only mode, and Database objects
inherit any LB read-only mode.

Add some methods callers can use to check if
a DB/LB handle is read-only before trying writes.

Additionally:
* Fix 5ec1e47475 regression where readOnlyBySection
  read-only mode would not affect wfReadOnly() but only
  lagged-slave read-only mode for LBFactoryMulti.
* Catch errors when getLaggedSlaveMode() is called after
  master connection and object is established.
* Make getLaggedSlaveMode() a no-op if there are no slaves.
* Make string/false logic for read-only consistent everywhere.
* Remove mLaggedSlaveMode "m" prefix.

Change-Id: Ice3224caae564aa5ffb41b424c23d1593229117a

8 years agoAdd check for RCWatchCategoryMembership before trying to access form option
aude [Tue, 20 Oct 2015 23:07:58 +0000 (01:07 +0200)]
Add check for RCWatchCategoryMembership before trying to access form option

Change-Id: Ie38e0fd703eb688267e5d19c145256dd6c8ada94

8 years agoMerge "Push post-edit RefreshLinks jobs into 'refreshLinksPrioritized'"
jenkins-bot [Tue, 20 Oct 2015 22:35:28 +0000 (22:35 +0000)]
Merge "Push post-edit RefreshLinks jobs into 'refreshLinksPrioritized'"

8 years agoMerge "mediawiki.Upload: Don't choke on nameless or dateless files"
jenkins-bot [Tue, 20 Oct 2015 22:26:34 +0000 (22:26 +0000)]
Merge "mediawiki.Upload: Don't choke on nameless or dateless files"

8 years agoPush post-edit RefreshLinks jobs into 'refreshLinksPrioritized'
Aaron Schulz [Tue, 20 Oct 2015 21:46:17 +0000 (14:46 -0700)]
Push post-edit RefreshLinks jobs into 'refreshLinksPrioritized'

Previously the 'prioritize' flag was set in getAsJobSpecification()
but the job still went into the regular 'refreshLinks' queue. Since
the parser cache was just saved, they should be fast to run. The
separate queue stops them from getting stuck behind template updates.

Change-Id: I46c5760702d862dc9288618ee5eff3897f6e838b

8 years agomediawiki.Upload: Don't choke on nameless or dateless files
Bartosz Dziewoński [Tue, 20 Oct 2015 21:55:56 +0000 (23:55 +0200)]
mediawiki.Upload: Don't choke on nameless or dateless files

Bug: T116073
Change-Id: I5919f1457b019ebc913beeb458ee3c6290223cfe

8 years agoRemove $wgAjaxWatch configuration variable
Timo Tijhof [Tue, 20 Oct 2015 21:36:53 +0000 (22:36 +0100)]
Remove $wgAjaxWatch configuration variable

This is now enabled by default.
We still check $wgUseAjax and $wgEnableWriteAPI, however.

Originally introduced in r18598 (69ea9bcf9b; MediaWiki 1.9.0; T9169).

Change-Id: I87b1926e727ae0870a0239d6e8ad87cc3a5ad72b

8 years agoMerge "Enable users to watch category membership changes #2"
jenkins-bot [Tue, 20 Oct 2015 21:41:16 +0000 (21:41 +0000)]
Merge "Enable users to watch category membership changes #2"

8 years agoMerge "Make JobQueueRedis stat calls match the DB one"
jenkins-bot [Tue, 20 Oct 2015 21:41:12 +0000 (21:41 +0000)]
Merge "Make JobQueueRedis stat calls match the DB one"

8 years agoMerge "resourceloader: Wrap another CSSMin::remap call in MemoizedCallable::call"
jenkins-bot [Tue, 20 Oct 2015 21:39:52 +0000 (21:39 +0000)]
Merge "resourceloader: Wrap another CSSMin::remap call in MemoizedCallable::call"

8 years agoSync up with Parsoid parserTests.
Subramanya Sastry [Tue, 20 Oct 2015 15:06:04 +0000 (10:06 -0500)]
Sync up with Parsoid parserTests.

This now aligns with Parsoid commit 31012bb740fea4fe6ce44464dd940d48576ed4ef

Change-Id: I525622766d702c53009d59c1a2a80a52966774fe

8 years agoMake JobQueueRedis stat calls match the DB one
Aaron Schulz [Tue, 20 Oct 2015 21:24:09 +0000 (14:24 -0700)]
Make JobQueueRedis stat calls match the DB one

It looks like someone just forgot to update these to
the newer style (e.g. sans "job-").

Change-Id: Idf953bb73ad31425c5c366d4b2169a42bd5e022d

8 years agoEnable users to watch category membership changes #2
addshore [Mon, 24 Aug 2015 17:40:06 +0000 (17:40 +0000)]
Enable users to watch category membership changes #2

This is part of a chain that reverts:
e412ff5ecc900991cce4f99b7a069f625a5694b3.

NOTE:
- The feature is disabled by default
- User settings default to hiding changes
- T109707 Touching a file on wikisource adds and
      removes it from a category... Even when page
      has no changes.... WTF? See linked issue,
      marked as stalled with a possible way forward
      for this patch.
      @see https://gerrit.wikimedia.org/r/#/c/235467/

Changes since version 1:
- T109604 - Page names in comment are no longer
      url encoded / have _'s
- T109638 & T110338 - Reserved username now used
      when we can't determine a username for the change
      (we could perhaps set the user and id to be blank
      in the RC table, but who knows what this might do)
- T109688 - History links are now disabled in RC....
      (could be fine for the introduction and worked
      on more in the future)
- Categorization changes are now always patrolled
- Touching on T109672 in this change emails will never
      be sent regarding categorization changes. (this
      can of course be changed in a followup)
- Added $wgRCWatchCategoryMembership defaulting to true
      for enabling / disabling the feature
- T109700 - for cases when no revision was retrieved
      for a category change set the bot flag to true.
      This means all changes caused by parser functions
      & Lua will be marked as bot, as will changes that
      cant find their revision due to slave lag..

Bug: T9148
Bug: T109604
Bug: T109638
Bug: T109688
Bug: T109700
Bug: T110338
Bug: T110340
Change-Id: I51c2c1254de862f24a26ef9dbbf027c6c83e9063

8 years agoresourceloader: Wrap another CSSMin::remap call in MemoizedCallable::call
Ori Livneh [Tue, 20 Oct 2015 20:13:57 +0000 (13:13 -0700)]
resourceloader: Wrap another CSSMin::remap call in MemoizedCallable::call

Follows-up da3443bfa2.

Change-Id: Iabfe65b918ef5f8eb589bedd7a1e72b3ad9d2952

8 years agoMake triggerOpportunisticLinksUpdate() directly use RefreshLinks
Aaron Schulz [Tue, 20 Oct 2015 20:51:59 +0000 (13:51 -0700)]
Make triggerOpportunisticLinksUpdate() directly use RefreshLinks

This makes the jobs *actually* end up in the
'refreshLinksPrioritized' queue rather than 'refreshLinks'.
These jobs can run fast in a higher priority queue since the
output is already cached (much of the point of 'prioritize').
They won't if they get stuck behind regular 'refreshLinks'.

This also avoids the indirection of an intermediate job.
The use of lazyPush() is already enough to prevent the user
from experiencing cross-DC RTT overhead.

Change-Id: I5d0440588db09c299cd70191e5624ffc7ebf04c0

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

Change-Id: I64889f5290abf8cae14336b38034863c058d28aa

8 years agoMerge "Fix undefined variable in User::setNewpassword"
jenkins-bot [Tue, 20 Oct 2015 18:47:06 +0000 (18:47 +0000)]
Merge "Fix undefined variable in User::setNewpassword"

8 years agoRemove DeferredUpdates::doUpdates call in CLI scripts
Aaron Schulz [Tue, 20 Oct 2015 18:05:45 +0000 (11:05 -0700)]
Remove DeferredUpdates::doUpdates call in CLI scripts

Core already handles this by not letting them build up.
They run after each main DB commit.

Change-Id: I37c2a60e2df579ed59b2a8f3a7679d1d380e6337

8 years agoMerge "Inject MultiWriteBagOStuff addCallableUpdate() dependency"
jenkins-bot [Tue, 20 Oct 2015 17:55:27 +0000 (17:55 +0000)]
Merge "Inject MultiWriteBagOStuff addCallableUpdate() dependency"

8 years agoInject MultiWriteBagOStuff addCallableUpdate() dependency
Aaron Schulz [Fri, 9 Oct 2015 08:01:28 +0000 (01:01 -0700)]
Inject MultiWriteBagOStuff addCallableUpdate() dependency

Inject the DeferredUpdates::addCallableUpdate method via the
ObjectCache. This brings it closer to being able to move to /libs.

Change-Id: Ifa0d893002c3d709a4dc7346c263a92162274bd7

8 years agoFix undefined variable in User::setNewpassword
Bryan Davis [Tue, 20 Oct 2015 15:49:01 +0000 (09:49 -0600)]
Fix undefined variable in User::setNewpassword

Follow up to I2c736ad to fix use of undefined `$id` variable.

Change-Id: I04bd9c1dd7e3e1e63b8008d02df91cfb1ad971a3

8 years agoMerge "mw.Upload.BookletLayout: Pass image info when emitting the fileSaved event"
jenkins-bot [Tue, 20 Oct 2015 12:25:12 +0000 (12:25 +0000)]
Merge "mw.Upload.BookletLayout: Pass image info when emitting the fileSaved event"

8 years agoMerge "docs: mw.Upload.Dialog: Add another usage example in introduction"
jenkins-bot [Tue, 20 Oct 2015 12:23:50 +0000 (12:23 +0000)]
Merge "docs: mw.Upload.Dialog: Add another usage example in introduction"

8 years agoMerge "jquery.tablesorter: Minor coding style cleanup and DRY"
jenkins-bot [Tue, 20 Oct 2015 12:03:40 +0000 (12:03 +0000)]
Merge "jquery.tablesorter: Minor coding style cleanup and DRY"

8 years agomw.Upload.BookletLayout: Pass image info when emitting the fileSaved event
Prateek Saxena [Tue, 20 Oct 2015 07:36:03 +0000 (13:06 +0530)]
mw.Upload.BookletLayout: Pass image info when emitting the fileSaved event

Don't want to reach into the layout's upload object to get this. Anything
listening to this event would want the image details.

Change-Id: Idd391382292f31d0570a6548c3b89d5e3795e832

8 years agodocs: mw.Upload.Dialog: Add another usage example in introduction
Prateek Saxena [Tue, 20 Oct 2015 06:54:56 +0000 (12:24 +0530)]
docs: mw.Upload.Dialog: Add another usage example in introduction

Change-Id: I8ed1470b712643b23e86a167f06d2fd1116e8627

8 years agoMerge "Database::selectRowCount(): support $join_conds"
jenkins-bot [Tue, 20 Oct 2015 05:43:10 +0000 (05:43 +0000)]
Merge "Database::selectRowCount(): support $join_conds"

8 years agoDatabase::selectRowCount(): support $join_conds
Ori Livneh [Tue, 20 Oct 2015 02:10:10 +0000 (19:10 -0700)]
Database::selectRowCount(): support $join_conds

Add a $join_conds parameter for Database::selectRowCount(), to allow the caller
to specify join conditions for the subquery that it generates.

Change-Id: I8c0a93713c121bc5b691ae65d6b6d8f8c08c9e4c

8 years agoMerge "resourceloader: Disable flaky test ResourceLoaderModule::getVersionHash"
jenkins-bot [Tue, 20 Oct 2015 02:16:30 +0000 (02:16 +0000)]
Merge "resourceloader: Disable flaky test ResourceLoaderModule::getVersionHash"

8 years agoMerge "build: Use my gmail address for attribution"
jenkins-bot [Tue, 20 Oct 2015 02:05:54 +0000 (02:05 +0000)]
Merge "build: Use my gmail address for attribution"

8 years agoresourceloader: Disable flaky test ResourceLoaderModule::getVersionHash
Timo Tijhof [Tue, 20 Oct 2015 01:57:36 +0000 (02:57 +0100)]
resourceloader: Disable flaky test ResourceLoaderModule::getVersionHash

Bug: T109394
Change-Id: I8e62d9e8326046a895588d9cc63f47e6c0d12eda

8 years agobuild: Use my gmail address for attribution
Timo Tijhof [Tue, 20 Oct 2015 01:43:28 +0000 (02:43 +0100)]
build: Use my gmail address for attribution

Per the .mailmap file, my gmail address is the canonical address
for this purpose.

Change-Id: I85de941ef5f8cf9a80cc35647500c5baaa594ac3

8 years agojquery.tablesorter: Minor coding style cleanup and DRY
Timo Tijhof [Tue, 20 Oct 2015 00:45:07 +0000 (01:45 +0100)]
jquery.tablesorter: Minor coding style cleanup and DRY

* Consistently name 'length' cached variables 'len' (e.g. not 'l').

* Fix invalid documentation syntax for convertSortList().
  (Build is passing because this file is not yet indexed.)

* Remove redundant 'len' variable from pure JavaScript arrays where
  iterations can't change the length. Caching the length is a dated
  practice meant to micro-optimise execution time. For the moment,
  kept any loops with complex iteration bodies as-is, as well as loops
  over structures that are not pure arrays (e.g. NodeList objects).

* Use getParserById() in addParser() instead of duplicating its logic.

Change-Id: I566eff6efd97b5d9672277bacb4cb2b501f4625f

8 years agoMerge "Update ResourceLoader for Ib7fc2f939b"
jenkins-bot [Tue, 20 Oct 2015 00:55:33 +0000 (00:55 +0000)]
Merge "Update ResourceLoader for Ib7fc2f939b"

8 years agoMerge "Rename getMainClusterInstance() -> getLocalClusterInstance()"
jenkins-bot [Tue, 20 Oct 2015 00:37:31 +0000 (00:37 +0000)]
Merge "Rename getMainClusterInstance() -> getLocalClusterInstance()"

8 years agoUpdate ResourceLoader for Ib7fc2f939b
Ori Livneh [Mon, 19 Oct 2015 17:00:50 +0000 (10:00 -0700)]
Update ResourceLoader for Ib7fc2f939b

Use BagOStuff::makeKey() and BagOStuff::makeGlobalKey() instead of
wfMemcKey() and wfGlobalCacheKey().

Change-Id: Id4e58c0e616b74de220faf13ba7c9ea606fef8c1

8 years agoRename getMainClusterInstance() -> getLocalClusterInstance()
Aaron Schulz [Mon, 19 Oct 2015 17:56:41 +0000 (10:56 -0700)]
Rename getMainClusterInstance() -> getLocalClusterInstance()

Also corrected some ObjectCache docs

Change-Id: I322f4cbd72fbd5d4c6887d90ee75d0baddb6ac25

8 years agoRemove ObjectCache dependency from MultiWriteBagOStuff
Aaron Schulz [Fri, 9 Oct 2015 07:15:47 +0000 (00:15 -0700)]
Remove ObjectCache dependency from MultiWriteBagOStuff

This brings it closer to being able to move to /libs.

Change-Id: Ia733f9023e56d4a25ffcb99ca0cc8b29cbb2ad45

8 years agoMerge "Add make(Global)Key() method to WANObjectCache"
jenkins-bot [Tue, 20 Oct 2015 00:14:54 +0000 (00:14 +0000)]
Merge "Add make(Global)Key() method to WANObjectCache"

8 years agoMerge "objectcache: Remove getWithSetCallback() signature backwards-compatability"
jenkins-bot [Mon, 19 Oct 2015 23:56:11 +0000 (23:56 +0000)]
Merge "objectcache: Remove getWithSetCallback() signature backwards-compatability"

8 years agoobjectcache: Remove getWithSetCallback() signature backwards-compatability
Aaron Schulz [Sat, 17 Oct 2015 22:45:08 +0000 (15:45 -0700)]
objectcache: Remove getWithSetCallback() signature backwards-compatability

All callers have been migrated

Change-Id: I7b6b87594dd724434ba24d8206fe07d66c1d5d25

8 years agoFix bad call to Database::getCacheSetOptions()
Aaron Schulz [Mon, 19 Oct 2015 19:57:34 +0000 (12:57 -0700)]
Fix bad call to Database::getCacheSetOptions()

Change-Id: I8ac756851b4cc7d36129fbd4e01282a151dc2694

8 years agoAdd make(Global)Key() method to WANObjectCache
Aaron Schulz [Sat, 17 Oct 2015 22:12:20 +0000 (15:12 -0700)]
Add make(Global)Key() method to WANObjectCache

Change-Id: I8e739fbe8614c9bd1c3595bbf16c8cd423aff7cc

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 19 Oct 2015 19:49:13 +0000 (21:49 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ia1685d4f8347c81ef6eb1fe95ebbe66bbe95398e

8 years agoMerge "Convert some users to WANObjectCache for consistency"
jenkins-bot [Mon, 19 Oct 2015 19:29:29 +0000 (19:29 +0000)]
Merge "Convert some users to WANObjectCache for consistency"

8 years agoMerge "Deprecate redundant SquidUpdate::newSimplePurge()"
jenkins-bot [Mon, 19 Oct 2015 19:19:52 +0000 (19:19 +0000)]
Merge "Deprecate redundant SquidUpdate::newSimplePurge()"

8 years agoMore SquidUpdate cleanups
Aaron Schulz [Mon, 19 Oct 2015 16:42:06 +0000 (09:42 -0700)]
More SquidUpdate cleanups

* Remove $wgMaxSquidPurgeTitles; silently discarding URLs is
  the wrong way to limit things. The purge methods already batch,
  which HTCP pushing one at a time. Jobs already batch and have
  $wgJobBackoffThrottling. If code does purge 500 URLs at once
  with no limiting (flooding UDP), then it is already broken.
* Make the HTCP method protected.
* Rename $urlArr field.

Change-Id: I17cced187fe7e93f5a5188022f12202a7746bdb7

8 years agoConvert some users to WANObjectCache for consistency
Aaron Schulz [Thu, 15 Oct 2015 02:45:03 +0000 (19:45 -0700)]
Convert some users to WANObjectCache for consistency

These callers don't need to do purges, but can still perfectly
take advantage of this instance over a plain BagOStuff. Namely:
* Replication and snapshot lag awareness
* Preemptive regeneration
* Easy process cache support

The idea is for there to only be one caching class/factory
to use, instead of having rules for picking which one to use.

Change-Id: I8e362df451c0c28731fc853c044c4c4b8e097f01

8 years agoMerge "Remove "activeusers-updated" cache key usage"
jenkins-bot [Mon, 19 Oct 2015 16:07:54 +0000 (16:07 +0000)]
Merge "Remove "activeusers-updated" cache key usage"

8 years agoMerge "SquidUpdate cleanups"
jenkins-bot [Mon, 19 Oct 2015 15:38:17 +0000 (15:38 +0000)]
Merge "SquidUpdate cleanups"

8 years agoDeprecate redundant SquidUpdate::newSimplePurge()
Aaron Schulz [Mon, 19 Oct 2015 15:24:23 +0000 (08:24 -0700)]
Deprecate redundant SquidUpdate::newSimplePurge()

Change-Id: Id6d92fca2a2b87e23930946f054cecd1f6d433be

8 years agoMerge "Use responsive CSS columns on Special:PrefixIndex and Special:AllPages"
jenkins-bot [Mon, 19 Oct 2015 12:02:36 +0000 (12:02 +0000)]
Merge "Use responsive CSS columns on Special:PrefixIndex and Special:AllPages"

8 years agoMake attributes explicit
Adam Roses Wight [Mon, 19 Oct 2015 07:08:39 +0000 (00:08 -0700)]
Make attributes explicit

Two attributes were referenced, but not declared.

Change-Id: Icb3ce046c15c5709e2f3738ba03e44beaaafd46b

8 years agoApiDelete: Don't pass $user to ChangeTags::addTags()
Kunal Mehta [Mon, 19 Oct 2015 08:45:46 +0000 (01:45 -0700)]
ApiDelete: Don't pass $user to ChangeTags::addTags()

It doesn't take that as a parameter...

Change-Id: I9f78ba4151d131ecf4ca476ecead0ed60408becb

8 years agoSquidUpdate cleanups
Aaron Schulz [Mon, 19 Oct 2015 06:26:05 +0000 (23:26 -0700)]
SquidUpdate cleanups

* Actually implement DeferrableUpdate
* Remove unused parameter to __construct()
* Remove redundant check in newFromTitles()
* Short-circuit purge() if  is empty

Change-Id: I23b1f712001d72305dfa1c49063c3384ea67fb2f

8 years agoFix Maintenance typo
Reedy [Sun, 18 Oct 2015 21:29:03 +0000 (22:29 +0100)]
Fix Maintenance typo

Change-Id: I3e0ae4446f74fac25e1cc79a86ff6e0738ada52d

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

Change-Id: Ib609589d2354e36ef89fb77e97932c823087110c

8 years agoUse responsive CSS columns on Special:PrefixIndex and Special:AllPages
Glaisher [Sat, 17 Oct 2015 17:02:49 +0000 (22:02 +0500)]
Use responsive CSS columns on Special:PrefixIndex and Special:AllPages

Stop using table on Special:PrefixIndex and use CSS columns instead and
removed 'column' parameter from this page.
This will also change the weird ordering (side to side) to the standard
top to bottom instead.

The pagination links hide at the corner on small screens. This can be fixed
later.

Bug: T32965
Change-Id: I720d34e21950c18de3c6e0b1d6d8a4461db495cb

8 years agoMerge "mediawiki.special.preferences: Use standard IIFE"
jenkins-bot [Sun, 18 Oct 2015 05:19:53 +0000 (05:19 +0000)]
Merge "mediawiki.special.preferences: Use standard IIFE"

8 years agoMerge "Mention WANObjectCache::TTL_INDEFINITE in set() method"
jenkins-bot [Sat, 17 Oct 2015 22:55:25 +0000 (22:55 +0000)]
Merge "Mention WANObjectCache::TTL_INDEFINITE in set() method"

8 years agoMerge "zhtable makefile: Remove unused variables, fix almost all pep8 errors"
Liangent [Sat, 17 Oct 2015 22:05:27 +0000 (22:05 +0000)]
Merge "zhtable makefile: Remove unused variables, fix almost all pep8 errors"

8 years agomediawiki.js: Show line number of caller of mw.log.warn and .error
Fomafix [Sat, 17 Oct 2015 17:49:31 +0000 (17:49 +0000)]
mediawiki.js: Show line number of caller of mw.log.warn and .error

Currently the JavaScript console shows the line number from mediawiki.js
where the function mw.log.warn is defined.
With this change the JavaScript console shows the file and the line number
where the function mw.log.warn is called.

Inspirited by https://matthewspencer.github.io/console-log/

Change-Id: I2345333fc0158a66ebcb3abf0e94e6e622b3bdc0

8 years agoAvoid creating lots and lots of cat_id gaps
Kevin Israel [Fri, 28 Aug 2015 07:57:01 +0000 (03:57 -0400)]
Avoid creating lots and lots of cat_id gaps

Currently, INSERT...ON DUPLICATE KEY UPDATE is used to update the page
counts in the category table. However, MySQL 5.1.22 and newer, by default,
increment the counter for cat_id before checking for duplicate key errors.
This creates many gaps in the cat_id sequence.

To avoid this, check for existing category rows, and instead UPDATE any
that were found. It is hoped that the extra queries will not significantly
harm performance.

Change-Id: Ic2ab9ff14f04a0c7ea90a5b6756cade0c78e2885