lhc/web/wiklou.git
8 years agoUse addDescription in resetUserEmail maint script
addshore [Sat, 30 Jan 2016 13:55:27 +0000 (14:55 +0100)]
Use addDescription in resetUserEmail maint script

Change-Id: Ib1eb8e3adc8deed0d09c1f655218144b2305d137

8 years agoAdd script to reset user emails
Max Semenik [Mon, 23 Nov 2015 23:32:33 +0000 (15:32 -0800)]
Add script to reset user emails

Current way to do it, via eval.php, is slightly scary.

Change-Id: I2b875326a0eb1e6d1f4bc758b8ac97b8f9324c4e

8 years agoMerge "Use addDescription() instead of accessing mDescription directly"
jenkins-bot [Sat, 30 Jan 2016 13:53:11 +0000 (13:53 +0000)]
Merge "Use addDescription() instead of accessing mDescription directly"

8 years agoMerge "Unroll Article::__call"
jenkins-bot [Sat, 30 Jan 2016 13:53:07 +0000 (13:53 +0000)]
Merge "Unroll Article::__call"

8 years agoMerge "Improve safeGetLag() return docs"
jenkins-bot [Sat, 30 Jan 2016 13:35:39 +0000 (13:35 +0000)]
Merge "Improve safeGetLag() return docs"

8 years agoMerge "Code style cleanups to notifyOnPageChange()"
jenkins-bot [Sat, 30 Jan 2016 13:35:34 +0000 (13:35 +0000)]
Merge "Code style cleanups to notifyOnPageChange()"

8 years agoMerge "Fix doc of LogFormatter::newFromRow"
jenkins-bot [Sat, 30 Jan 2016 12:24:49 +0000 (12:24 +0000)]
Merge "Fix doc of LogFormatter::newFromRow"

8 years agoUnroll Article::__call
umherirrender [Sat, 16 Jan 2016 16:44:37 +0000 (17:44 +0100)]
Unroll Article::__call

Add all public function from WikiPage to Article and replace the magic
__call

__call has the problem, that new functions to WikiPage will also be
available through Article.
It also makes deprecating of some functions harder. Having each function
as an own function will allow to add deprecated notice to just some and
maybe delete some functions earlier than others.

Also some static code analyzer can benefit from separately functions.

Change-Id: I779aa1c017abc9a17047fd5335f2d082148daa6f

8 years agoKill vestiges of SVN times
Max Semenik [Sat, 30 Jan 2016 01:02:36 +0000 (17:02 -0800)]
Kill vestiges of SVN times

Change-Id: Ib80c71ea93479eb326ac5afea295d4608f92babe

8 years agoUse addDescription() instead of accessing mDescription directly
Max Semenik [Sat, 30 Jan 2016 02:48:47 +0000 (18:48 -0800)]
Use addDescription() instead of accessing mDescription directly

Change-Id: I0e2aa83024b8abf5298cfea4b21bf45722ad3103

8 years agoMerge "Remove ApiBase::getVersion()"
jenkins-bot [Sat, 30 Jan 2016 02:38:24 +0000 (02:38 +0000)]
Merge "Remove ApiBase::getVersion()"

8 years agoWhen serializing Message, don't try to unstub StubUserLang
Brad Jorsch [Mon, 18 Jan 2016 22:18:19 +0000 (17:18 -0500)]
When serializing Message, don't try to unstub StubUserLang

If the serialization is happening during PHP shutdown due to a Session
save, it can fatal because $wgLang is already gone.

Change-Id: I7d877be15ef8639f3b94b74bba763053ec289358

8 years agoUse autoloader for PHP data files instead of include/require
Tim Starling [Fri, 29 Jan 2016 05:19:58 +0000 (16:19 +1100)]
Use autoloader for PHP data files instead of include/require

Move ZhConversion.php and Names.php to languages/data and make them both
expose their data as static class variables instead of in the local
scope. This means that the autoloader can be used to load the data,
which is efficient and secure. This also makes additional request-local
caching of the arrays unnecessary.

Change-Id: Iafb96ac4165d0965fcb9a69f1d0a91139ea9790c

8 years agoSECURITY: Fix User::setToken() call on User::newSystemUser
Gergő Tisza [Thu, 28 Jan 2016 23:10:00 +0000 (17:10 -0600)]
SECURITY: Fix User::setToken() call on User::newSystemUser

This was supposed to reset the user token but did set it to '1'
because User::setToken accepts bool/string but only treats true
as bool.

Bug: T125161
Change-Id: Ia4196eba92cd4d170a3023db0f540a2972ffad4f

8 years agoRemove ApiBase::getVersion()
Max Semenik [Sat, 30 Jan 2016 01:16:31 +0000 (17:16 -0800)]
Remove ApiBase::getVersion()

Deprecated in 1.21, removal does not break old extensions still overriding
it.

Change-Id: I24028eab8800373410c6b72a74715f3525c2f7ae

8 years agoSessionManager: Don't save non-persisted sessions to backend storage
Brad Jorsch [Fri, 29 Jan 2016 23:02:11 +0000 (18:02 -0500)]
SessionManager: Don't save non-persisted sessions to backend storage

This introduces an in-process cache (using a HashBagOStuff) for session
data, and only saves to the external cache when the session is
persisted.

Bug: T125267
Change-Id: Ie161e0f7522cd68515b060ad8cf8c151b7198b0b

8 years agoCode style cleanups to notifyOnPageChange()
Aaron Schulz [Sat, 30 Jan 2016 00:03:29 +0000 (16:03 -0800)]
Code style cleanups to notifyOnPageChange()

Change-Id: I08593be2eba6417cdfae31b1aa1021da7db00c74

8 years agoImprove safeGetLag() return docs
Aaron Schulz [Fri, 29 Jan 2016 23:09:59 +0000 (15:09 -0800)]
Improve safeGetLag() return docs

Change-Id: I7b2d0d96901412abe8bdf9abee39e6d545c94644

8 years agoFix IDEA error in safeWaitForPos()
Aaron Schulz [Fri, 29 Jan 2016 22:47:38 +0000 (14:47 -0800)]
Fix IDEA error in safeWaitForPos()

Change-Id: Iecb023925177be05282f67e48056aeb8f2a9703c

8 years agoMerge "Add LoadBalancer::safeWaitForPos()"
jenkins-bot [Fri, 29 Jan 2016 22:19:55 +0000 (22:19 +0000)]
Merge "Add LoadBalancer::safeWaitForPos()"

8 years agoMerge "MessageCache: Don't get a ParserOptions for $wgUser before the end of Setup...
jenkins-bot [Fri, 29 Jan 2016 21:55:54 +0000 (21:55 +0000)]
Merge "MessageCache: Don't get a ParserOptions for $wgUser before the end of Setup.php"

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 29 Jan 2016 21:16:33 +0000 (22:16 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Ic30a1de26fc701c3147e1c324152c35d03fb3645

8 years agoAdd LoadBalancer::safeWaitForPos()
Aaron Schulz [Fri, 29 Jan 2016 21:00:08 +0000 (13:00 -0800)]
Add LoadBalancer::safeWaitForPos()

This is useful for waiting on a specific slave handle to
reach a given master position.

Change-Id: Ia4569c4fc82c25eb4089cf7198f01e349636e2c7

8 years agoMerge "Add IDatabase::getScopedLockAndFlush() method"
jenkins-bot [Fri, 29 Jan 2016 20:54:10 +0000 (20:54 +0000)]
Merge "Add IDatabase::getScopedLockAndFlush() method"

8 years agoMerge "Remove $wgEnotifUseJobQ"
jenkins-bot [Fri, 29 Jan 2016 20:43:10 +0000 (20:43 +0000)]
Merge "Remove $wgEnotifUseJobQ"

8 years agoMerge "Remove $wgDataCenterId/$wgDataCenterRoles"
jenkins-bot [Fri, 29 Jan 2016 20:43:03 +0000 (20:43 +0000)]
Merge "Remove $wgDataCenterId/$wgDataCenterRoles"

8 years agoAdd IDatabase::getScopedLockAndFlush() method
Aaron Schulz [Sun, 17 Jan 2016 10:40:53 +0000 (02:40 -0800)]
Add IDatabase::getScopedLockAndFlush() method

This method is less manual and avoids the usual pitfalls of
not unlocking for a return statement or not flushing out any
prior transaction.

Change-Id: Ib1681244767de860105a68210e181e2f024ee525

8 years agoRemove $wgEnotifUseJobQ
Aaron Schulz [Fri, 22 Jan 2016 04:14:44 +0000 (20:14 -0800)]
Remove $wgEnotifUseJobQ

Always treat this as on and simplify the code.
This will also make it easier to move updateWatchlistTimestamp() into
the EnotifNotifyJob class to avoid query timeouts.

Change-Id: I8ceaa42cdcfe3ad00a26368be6a73052be329045

8 years agoMerge "Use InvalidArgumentException in ActivityUpdateJob"
jenkins-bot [Fri, 29 Jan 2016 20:21:37 +0000 (20:21 +0000)]
Merge "Use InvalidArgumentException in ActivityUpdateJob"

8 years agoRemove $wgDataCenterId/$wgDataCenterRoles
Aaron Schulz [Fri, 29 Jan 2016 20:09:56 +0000 (12:09 -0800)]
Remove $wgDataCenterId/$wgDataCenterRoles

These ended up not getting used after some patch changes

Change-Id: I7c56d58972d1efcca6a249b7fb4d422a4006da88

8 years agoMerge "Make WatchedItem members private"
jenkins-bot [Fri, 29 Jan 2016 19:59:56 +0000 (19:59 +0000)]
Merge "Make WatchedItem members private"

8 years agoUse InvalidArgumentException in ActivityUpdateJob
Aaron Schulz [Fri, 29 Jan 2016 19:56:04 +0000 (11:56 -0800)]
Use InvalidArgumentException in ActivityUpdateJob

Change-Id: Ib73c02868327d5e8f286bce79cdf44ebb1f47ff3

8 years agoMake WatchedItem members private
addshore [Fri, 29 Jan 2016 19:39:23 +0000 (20:39 +0100)]
Make WatchedItem members private

These are only used in this class

Change-Id: I492e7f5b0611f8928b352af983f18f5184bc54bf

8 years agoRemove WatchedItem::IMMEDIATE and DEFERRED
addshore [Fri, 29 Jan 2016 19:10:26 +0000 (20:10 +0100)]
Remove WatchedItem::IMMEDIATE and DEFERRED

It looks like this used to actually be used
since Ie60e20162fd833e64d81763a6aa1dc3faf2162f3
but since the global wgActivityUpdatesUseJobQueue
seems to have been removed from the code.

Thus this stuff is doing nothing and
things are always DEFERRED.

Change-Id: I08cb6051f52e0f0402542d8326f03f115bb00943

8 years agoMessageCache: Don't get a ParserOptions for $wgUser before the end of Setup.php
Brad Jorsch [Fri, 29 Jan 2016 19:30:25 +0000 (14:30 -0500)]
MessageCache: Don't get a ParserOptions for $wgUser before the end of Setup.php

Until Setup.php completes, we can't access the "current" user and trying
to do so logs a warning. So don't try.

Bug: T124367
Change-Id: If31230407829c04f34d9cfefcbb97edacb949b6d

8 years agoMerge "Hide category changes if feature is disabled"
jenkins-bot [Fri, 29 Jan 2016 19:30:10 +0000 (19:30 +0000)]
Merge "Hide category changes if feature is disabled"

8 years agoMerge "KafkaHandler: allow customizing timeouts"
jenkins-bot [Fri, 29 Jan 2016 19:16:03 +0000 (19:16 +0000)]
Merge "KafkaHandler: allow customizing timeouts"

8 years agoRemove use of explodeMarkup
Arlo Breault [Thu, 28 Jan 2016 04:21:35 +0000 (20:21 -0800)]
Remove use of explodeMarkup

 * At that point, element attributes are already escaped so it serves no
   purpose. Before `doTableStuff` is called, `Sanitizer::removeHTMLtags`
   has been invoked which calls `Sanitizer::fixTagAttributes` which
   calls `Sanitizer::safeEncodeTagAttributes` and finally gets down to
   `Sanitizer::safeEncodeAttribute`, with the goal of "extra armoring
   against further wiki processing."

Change-Id: Ieeb9b21148c2909eb839d13195d7d10012b48e3b

8 years agoMerge "Move MaxUserDBWriteDuration logic to LBFactory"
jenkins-bot [Fri, 29 Jan 2016 19:05:16 +0000 (19:05 +0000)]
Merge "Move MaxUserDBWriteDuration logic to LBFactory"

8 years agoFix doc of LogFormatter::newFromRow
addshore [Fri, 29 Jan 2016 14:41:32 +0000 (15:41 +0100)]
Fix doc of LogFormatter::newFromRow

DatabaseLogEntry::newFromRow can take both
objects and arrays (arrays are cast to objects).

An array is passed into this method in the
CheckUser extension.

Fixing this phpdoc will mean static analysis
tools will no longer detect that as an error

Change-Id: I84f35c21f8b4e3be0f5b5bd2051f566bda6544fc

8 years agoUse LinkTarget in TitleValue only methods
addshore [Wed, 27 Jan 2016 11:34:49 +0000 (12:34 +0100)]
Use LinkTarget in TitleValue only methods

Change-Id: Iee4b183ae54457d0c6cd3473f9fed3207742b54f

8 years agoAdd LinkTarget interface
addshore [Tue, 26 Jan 2016 20:24:27 +0000 (21:24 +0100)]
Add LinkTarget interface

To be used by things that do not care if they are
passed a Title or TitleValue so long as it has a
dbkey, namespace, possible fragment and text

Example uses include:
 LinkBatch::addObj
 MediaWikiPageLinkRenderer methods
 MediaWikiTitleCodec methods
 PageLinkRenderer methods
 TitleFormatter methods

Change-Id: I2aa1a82129bb01155924a8e6a403c7a47391432f

8 years agoHide category changes if feature is disabled
addshore [Fri, 29 Jan 2016 11:42:04 +0000 (12:42 +0100)]
Hide category changes if feature is disabled

Recently when RCWatchCategoryMembership was set
to false for many wikis suddenly all of the
category changes appeared in watchlists and in
recent changes.

This patch will avoid this and would instead
continue following the users settings

Change-Id: Id5468e8ef0ff430f03bacae708267a6ee6c84e48

8 years agoMerge "Fix a spelling mistake in a comment"
jenkins-bot [Fri, 29 Jan 2016 07:57:18 +0000 (07:57 +0000)]
Merge "Fix a spelling mistake in a comment"

8 years agoFix a spelling mistake in a comment
Arlo Breault [Thu, 28 Jan 2016 23:23:38 +0000 (15:23 -0800)]
Fix a spelling mistake in a comment

Change-Id: Idf3f9b7778cec846578b0c5242ef8530dc8f32b3

8 years agoMerge "Log user-agents that are using HTTP when HTTPS is preferred"
jenkins-bot [Fri, 29 Jan 2016 04:13:46 +0000 (04:13 +0000)]
Merge "Log user-agents that are using HTTP when HTTPS is preferred"

8 years agoLog user-agents that are using HTTP when HTTPS is preferred
Bryan Davis [Thu, 28 Jan 2016 00:53:54 +0000 (17:53 -0700)]
Log user-agents that are using HTTP when HTTPS is preferred

Log a feature usage message and add a warning to the response when an
API request is made over unencrypted HTTP and the wiki or user has asked
that HTTPS be used by default.

Bug: T105794
Change-Id: I339bfa96614c6318db303bb22a8f86bd0336ddbe

8 years agoKafkaHandler: allow customizing timeouts
Max Semenik [Fri, 29 Jan 2016 00:23:22 +0000 (16:23 -0800)]
KafkaHandler: allow customizing timeouts

Bug: T125084
Change-Id: I8f01fa61d916aeaa831a84e12b6fae08d04ca046

8 years agoMove MaxUserDBWriteDuration logic to LBFactory
Aaron Schulz [Sun, 27 Dec 2015 23:41:14 +0000 (15:41 -0800)]
Move MaxUserDBWriteDuration logic to LBFactory

Change-Id: If7231af24f10ae29b7137f147abb60a351c9127f

8 years agoMerge "Title::newFromText: Cast integers to strings"
jenkins-bot [Fri, 29 Jan 2016 00:55:37 +0000 (00:55 +0000)]
Merge "Title::newFromText: Cast integers to strings"

8 years agoTitle::newFromText: Cast integers to strings
This, that and the other [Thu, 28 Jan 2016 23:52:37 +0000 (10:52 +1100)]
Title::newFromText: Cast integers to strings

This is the cause of the T76305 debug log entries relating to SpecialExport
and Echo.

Bug: T76305
Bug: T116034
Change-Id: I64d629d31be79c4b4702a4298bce68fd544df6e8

8 years agoMerge "mw.loader: Minor documentation and test improvements"
jenkins-bot [Thu, 28 Jan 2016 23:22:23 +0000 (23:22 +0000)]
Merge "mw.loader: Minor documentation and test improvements"

8 years agoMerge "Remove require_once for language classes"
jenkins-bot [Thu, 28 Jan 2016 23:16:37 +0000 (23:16 +0000)]
Merge "Remove require_once for language classes"

8 years agoMerge "Add ParserOutputStashForEdit hook for extension cache warming"
jenkins-bot [Thu, 28 Jan 2016 23:13:06 +0000 (23:13 +0000)]
Merge "Add ParserOutputStashForEdit hook for extension cache warming"

8 years agoRemove require_once for language classes
Tim Starling [Thu, 28 Jan 2016 22:12:05 +0000 (09:12 +1100)]
Remove require_once for language classes

Remove require_once for LanguageConverter and base classes. These
are in the autoloader now, so an explicit require is no longer
necessary.

Change-Id: Ie34ffc58fd9ec89fb57cf077dd5ac1746c35c48e

8 years agomw.loader: Minor documentation and test improvements
Timo Tijhof [Thu, 28 Jan 2016 22:23:36 +0000 (23:23 +0100)]
mw.loader: Minor documentation and test improvements

Update outdated mw.loader.implement documentation

* Not all arguments are required.
* Even 'script' is no longer required. Defaults to 'null' in the registry.
  And supported by execute().
* Add a test for implement() with a name only and no resources.

Bug: T112455
Change-Id: I5ebd8542ae1a4b2f14ffaff560b98b4c1c2adb23

8 years agoSessionManager: Save user name to metadata even if the user doesn't exist locally
Brad Jorsch [Thu, 28 Jan 2016 21:19:37 +0000 (16:19 -0500)]
SessionManager: Save user name to metadata even if the user doesn't exist locally

Bug: T125133
Change-Id: I12ff84db614f0d5839457aa92be58c62b3a4e8fd

8 years agoMerge "User: Fix loading of user_token"
jenkins-bot [Thu, 28 Jan 2016 20:15:15 +0000 (20:15 +0000)]
Merge "User: Fix loading of user_token"

8 years agoMerge "SessionManager: Don't generate user tokens when checking the tokens"
jenkins-bot [Thu, 28 Jan 2016 20:03:21 +0000 (20:03 +0000)]
Merge "SessionManager: Don't generate user tokens when checking the tokens"

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 28 Jan 2016 19:54:24 +0000 (20:54 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Ifd89bebff1d57bcdc57b39ae6a05ea9f5acb115c

8 years agoUser: Fix loading of user_token
Brad Jorsch [Thu, 28 Jan 2016 18:46:22 +0000 (13:46 -0500)]
User: Fix loading of user_token

Similar to T124414, we should always load user_token from the row even
if user_email is unset.

Also, I notice that maintenance/tables.sql defines the column as
"binary(32)", which is going to append ASCII NUL bytes to the default
empty-string. And before that it was "char(32)", which will append
spaces. So trim both of those off when reading the field so the
following check for === '' actually works.

The latter doesn't seem to affect *most* WMF wikis, since they have the
column defined as "varbinary(32)" for some reason. But there are a few
with "binary(32)", I have no idea why.

Change-Id: I50a813bb530639275628d9560c79a773676aa36d

8 years agoSessionManager: Don't generate user tokens when checking the tokens
Brad Jorsch [Thu, 28 Jan 2016 18:27:01 +0000 (13:27 -0500)]
SessionManager: Don't generate user tokens when checking the tokens

Looking at the pre-SessionManager token checking, it's apparently valid
to log in despite user_token being empty. The stored token just gets
compared against the empty string that got returned previously.

This also cleans up some checks that assumed $user->getToken() didn't
automatically create the token if one wasn't already set.

Bug: T125114
Change-Id: Ia3d2382e96e2a0146f33fb7193a2e00ea72e51a0

8 years agoGive TestCase::checkHasDiff3 a better name
addshore [Wed, 27 Jan 2016 18:56:09 +0000 (19:56 +0100)]
Give TestCase::checkHasDiff3 a better name

This method actually marks the test it is called
from as skipped if Diff3 is not confugured.

The new name "markTestSkippedIfNoDiff3" better
reflects that.

Change-Id: I1dffeba0aceb312b3a82216f0b55227e24bc2e34

8 years agoMerge "Add support for image interlacing of Bitmap type images"
jenkins-bot [Thu, 28 Jan 2016 08:11:08 +0000 (08:11 +0000)]
Merge "Add support for image interlacing of Bitmap type images"

8 years agoMerge "Move CSRF token handling into MediaWiki\Session\Session"
jenkins-bot [Thu, 28 Jan 2016 07:11:27 +0000 (07:11 +0000)]
Merge "Move CSRF token handling into MediaWiki\Session\Session"

8 years agoMerge "TagLogFormatter: For log entries changing both revid and logid tags, prefer...
jenkins-bot [Thu, 28 Jan 2016 06:00:32 +0000 (06:00 +0000)]
Merge "TagLogFormatter: For log entries changing both revid and logid tags, prefer revid"

8 years agoMigrate callers to waitForReplication()
Aaron Schulz [Wed, 20 Jan 2016 17:23:46 +0000 (09:23 -0800)]
Migrate callers to waitForReplication()

Change-Id: I7b2b13b9315891561d2d8cc04a12ecad2dc73d70

8 years agoMerge "Cleanup setFileDependencies() docs"
jenkins-bot [Thu, 28 Jan 2016 01:29:59 +0000 (01:29 +0000)]
Merge "Cleanup setFileDependencies() docs"

8 years agoMerge "Add missing argument for wfDebugLog"
jenkins-bot [Thu, 28 Jan 2016 00:47:39 +0000 (00:47 +0000)]
Merge "Add missing argument for wfDebugLog"

8 years agoAdd missing argument for wfDebugLog
Matthias Mullie [Wed, 27 Jan 2016 12:48:03 +0000 (13:48 +0100)]
Add missing argument for wfDebugLog

Change-Id: Id452ee8e9917b8e2dca9f14e37fbedd296853fd4

8 years agoCount the number of EditPage edit conflicts
addshore [Wed, 27 Jan 2016 16:11:52 +0000 (17:11 +0100)]
Count the number of EditPage edit conflicts

edit.failures.* is already used for:
 - session_loss
 - bad_token
 - incomplete_form
hence the choice of metric name.

Bug: T120462
Change-Id: I7636cedaf3d589faec3153882f7d1e8ac7054a89

8 years agoWhitelist additional WAI-ARIA attributes, and all role values
Matt Fitzpatrick [Mon, 18 Jan 2016 01:19:26 +0000 (17:19 -0800)]
Whitelist additional WAI-ARIA attributes, and all role values

Adds the attributes aria-describedby, aria-flowto, aria-label,
aria-labelledby, and aria-owns to the attribute whitelist for all
elements.

Adds Sanitizer::escapeIdReferenceList() to escape attributes
containing space delimited HTML id lists, in the same manner as
Sanitizer::escapeId().

Removes the role="presentation" restriction. Allows all values for
the role attribute.

Bug: T26659
Change-Id: I3a29d727c61f46ac115ca2e50fcb14deeea34418

8 years agoRequestContext::exportSession() should only export persisted session IDs
Brad Jorsch [Wed, 27 Jan 2016 22:14:21 +0000 (17:14 -0500)]
RequestContext::exportSession() should only export persisted session IDs

If a non-persisted session ID is exported, then when the session is
reloaded by RequestContext::importScopedSession() the session_start()
will wind up persisting it.

Bug: T124971
Change-Id: If03d130acca6bb98029cfa3cc520cd46f42ff15e

8 years agoSessionManager: Save 'persisted' flag in session metadata
Brad Jorsch [Wed, 27 Jan 2016 22:13:35 +0000 (17:13 -0500)]
SessionManager: Save 'persisted' flag in session metadata

This allows SessionManager::getSessionById()->isPersisted() to be
reliably set. Otherwise it depends on whether the SessionBackend is
still loaded or not.

Change-Id: I17733559ac5d8fff13881664333f61d36f610b6d

8 years agoCleanup setFileDependencies() docs
Aaron Schulz [Wed, 27 Jan 2016 20:37:44 +0000 (12:37 -0800)]
Cleanup setFileDependencies() docs

Change-Id: If7973bbfd2aaede1b2f5cc0df3f416bc9b8c77c6

8 years agoMove CSRF token handling into MediaWiki\Session\Session
Brad Jorsch [Tue, 22 Sep 2015 14:33:24 +0000 (10:33 -0400)]
Move CSRF token handling into MediaWiki\Session\Session

User keeps most of its token-related methods because anon edit tokens
are special. Login and createaccount tokens are completely moved.

Change-Id: I524218fab7e2d78fd24482ad364428e98dc48bdf

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 27 Jan 2016 20:22:23 +0000 (21:22 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I890aa4632041c66074ace5ee65b4c259a4855f4f

8 years agoConvert page creation to using startAtomic()/endAtomic()
Aaron Schulz [Sun, 13 Dec 2015 12:01:03 +0000 (04:01 -0800)]
Convert page creation to using startAtomic()/endAtomic()

A few semantic changes result from this:

* If multiple pages are created in a request, the updates happen
  in the same order relative to each other, but all in one second
  step instead of after each page edit.
* If an extension set some extra Status info or errors via the
  PageContentInsertComplete hook, they will not be seen by the
  caller (unless it was a CLI script possibly). Few callers use
  $status at all, and I did not see any that mutated it. Since
  the page is already committed when this hooks run (as has always
  been) they cannot veto edits and callers do not care or know what
  to do with random hook-set status errors; there was never much use
  in changing the Status anyway.

Bug: T120718
Change-Id: Ieba35056be31b2f648c57f59d19d3cbbe58f1b05

8 years agoExpose visitingwatchers to API through action=query&prop=info
Geoffrey Mon [Sat, 9 Jan 2016 03:14:12 +0000 (22:14 -0500)]
Expose visitingwatchers to API through action=query&prop=info

Bug: T105392
Change-Id: I87059dd77dd0e280b02e9d9b638ba2725ff71762

8 years agoFix autoload.php order
Florian [Wed, 20 Jan 2016 18:17:07 +0000 (19:17 +0100)]
Fix autoload.php order

Someone maybe added it by hand :) It will add some noise to
other changes, where autoload.php is genereted with
maintenance/generateLocalAutoload.php

Change-Id: If064fcc1fe87165df72eaf368117e62a51b24e95

8 years agoAdd help link to the top of history pages
matejsuchanek [Wed, 27 Jan 2016 12:10:23 +0000 (13:10 +0100)]
Add help link to the top of history pages

It links to https://meta.wikimedia.org/wiki/Special:MyLanguage/Help:Page_history
but the target can be changed locally by creating
"MediaWiki:History-helppage".

Bug: T124885
Change-Id: Iffd396ea9dfb5216fa65ed9780f3c788fde4a3e5

8 years agoassertEquals does not return anything
addshore [Wed, 27 Jan 2016 16:22:32 +0000 (17:22 +0100)]
assertEquals does not return anything

Also this method is not documented as returning
anything

Change-Id: Ibcfda0bec5f84b308866a662400ed5e97dd1ac06

8 years agoMerge "mw.widgets.DateInputWidget: Make placeholder label configurable"
jenkins-bot [Wed, 27 Jan 2016 14:27:00 +0000 (14:27 +0000)]
Merge "mw.widgets.DateInputWidget: Make placeholder label configurable"

8 years agomediawiki.userSuggest: Use formatversion=2 for API request
Fomafix [Wed, 27 Jan 2016 13:56:31 +0000 (13:56 +0000)]
mediawiki.userSuggest: Use formatversion=2 for API request

With formatversion=2 the response uses UTF-8 instead of escape sequences
with hex for encoding of non-ASCII characters (e.g. "\u00e4" for "ä").

The other syntax changes of formatversion=2 have no effect here.

Change-Id: I835308bb0df80cc9335da06fb8c57844eddd3361

8 years agoMerge "Switch name to username in @author tags"
jenkins-bot [Wed, 27 Jan 2016 12:34:54 +0000 (12:34 +0000)]
Merge "Switch name to username in @author tags"

8 years agoRemove doc comment referencing removed method
addshore [Wed, 27 Jan 2016 09:43:04 +0000 (10:43 +0100)]
Remove doc comment referencing removed method

This method was removed in:
cfaf26e5017228208f8049b979cb443eb01677cf
so lets remove the reference to it so people don't
go looking for what is not there.

Change-Id: I229f033a3b4553e6eacc460faaf156ba2539d6d5

8 years agoSwitch name to username in @author tags
addshore [Wed, 27 Jan 2016 09:59:31 +0000 (10:59 +0100)]
Switch name to username in @author tags

From now on I will simply use addshore
everywhere to keep things uniform...

Change-Id: Iaf441b2d7a67a12c20529f0e9c7b47819f4abfae

8 years agomediawiki.api.parse: Use formatversion=2 for API requests
Fomafix [Wed, 27 Jan 2016 08:22:04 +0000 (08:22 +0000)]
mediawiki.api.parse: Use formatversion=2 for API requests

With formatversion=2 the response uses UTF-8 instead of escape sequences
with hex for encoding of non-ASCII characters (e.g. "\u00e4" for "ä").

The structural change in the response of formatversion=2 is abstracted by
this mw.Api plugin.

The test is updated.

Change-Id: I155d220dd4693bff6f8fc6c817698f2b4ac9660f

8 years agoNew hook for filters on Special:Contributions form
Adam Roses Wight [Wed, 27 Jan 2016 04:29:16 +0000 (20:29 -0800)]
New hook for filters on Special:Contributions form

Bug: T124857
Change-Id: I56a3f13e8888202f832c5c18c92f3ff899f032f2

8 years agoresourceloader: Simplify and clean up RLQ wrap
Timo Tijhof [Thu, 21 Jan 2016 17:25:14 +0000 (17:25 +0000)]
resourceloader: Simplify and clean up RLQ wrap

startup.js:
* Don't assign to "window.RLQ" and read from "RLQ". Use the same
  identifier in both places instead of relying on global scope.
* Create the global window.RLQ only once. The temporary [] fallback
  doesn't need to be exposed globally, so use a local variable for
  the loop that processes the pre-existing queue built up while
  the startup module was loading.

OutputPage:
* Simplify the RLQ wrap to be more idiomatic and less repetitive.
  Matches the pattern used in Google and Facebook open-source projects.

Change-Id: I9176377bc05432e51add841696a356428feec8ce

8 years agoAdd ParserOutputStashForEdit hook for extension cache warming
Aaron Schulz [Wed, 27 Jan 2016 01:23:53 +0000 (17:23 -0800)]
Add ParserOutputStashForEdit hook for extension cache warming

This can pre-cache slow queries by extensions that happen on
edit submission.

Bug: T116557
Change-Id: I803f69013f68e80a53dd3c466bddff3ebe2b659b

8 years agoMerge "Set threshold for is a tablet in LESS variable"
jenkins-bot [Wed, 27 Jan 2016 01:13:44 +0000 (01:13 +0000)]
Merge "Set threshold for is a tablet in LESS variable"

8 years agoMerge "images/.htaccess breaks TransformVia404 functionality"
jenkins-bot [Wed, 27 Jan 2016 00:45:24 +0000 (00:45 +0000)]
Merge "images/.htaccess breaks TransformVia404 functionality"

8 years agoMerge "mediawiki.page.patrol.ajax: Use formatversion=2 for API requests"
jenkins-bot [Wed, 27 Jan 2016 00:35:17 +0000 (00:35 +0000)]
Merge "mediawiki.page.patrol.ajax: Use formatversion=2 for API requests"

8 years agoimages/.htaccess breaks TransformVia404 functionality
scnd [Tue, 27 May 2014 10:21:10 +0000 (14:21 +0400)]
images/.htaccess breaks TransformVia404 functionality

Bug: 65220
Change-Id: Ibdb91f4c676b1c77558ac806c1ccc8313ef5929f

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 26 Jan 2016 22:46:17 +0000 (23:46 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I3897ab528fec09104c0a260310a79b3766c106e6

8 years agoMerge "Make ForeignTitle properties private"
jenkins-bot [Tue, 26 Jan 2016 22:33:52 +0000 (22:33 +0000)]
Merge "Make ForeignTitle properties private"

8 years agoUpdate OOjs UI to v0.15.1
James D. Forrester [Tue, 26 Jan 2016 21:16:54 +0000 (13:16 -0800)]
Update OOjs UI to v0.15.1

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

Change-Id: Ic5069503ebea193e117a9f7f3d520a6f04e0b1cd

8 years agoMerge "Skip IPTCTest::testIPTCParseForcedUTFButInvalid() on pre-PHP5.5.26"
jenkins-bot [Tue, 26 Jan 2016 20:36:46 +0000 (20:36 +0000)]
Merge "Skip IPTCTest::testIPTCParseForcedUTFButInvalid() on pre-PHP5.5.26"

8 years agoSet threshold for is a tablet in LESS variable
jdlrobson [Mon, 21 Dec 2015 23:49:10 +0000 (15:49 -0800)]
Set threshold for is a tablet in LESS variable

We need to centrally define our definition of a tablet device so
we can consistently serve alternative mobile and tablet versions.

As well as the two mentioned extensions in the see section, there
are also instances in Gather, Vector, Metrolook and various other
extensions that will benefit from this.

See I257b3b34536 and I97d9600c839.

Bug: T93675
Change-Id: Iefce83763da0cbd037a7ff889088b0da820220a0