lhc/web/wiklou.git
7 years agoMerge "Cleanup ServiceWiring/LBFactoryMW interaction"
jenkins-bot [Mon, 19 Sep 2016 17:29:53 +0000 (17:29 +0000)]
Merge "Cleanup ServiceWiring/LBFactoryMW interaction"

7 years agoMake MWExceptionRenderer work with PHP7's exception changes
Brad Jorsch [Mon, 19 Sep 2016 16:39:44 +0000 (12:39 -0400)]
Make MWExceptionRenderer work with PHP7's exception changes

See https://wiki.php.net/rfc/throwable-interface

Change-Id: Ib65f912580f5d84997c5926e7f602d5f5ef3faba

7 years agoCleanup ServiceWiring/LBFactoryMW interaction
Aaron Schulz [Sun, 18 Sep 2016 01:50:56 +0000 (18:50 -0700)]
Cleanup ServiceWiring/LBFactoryMW interaction

* Move almost all the code to LBFactoryMW and inject the main config.
* Make LBFactoryMW no longer extend anything, which is now pointless.
* Let site admins explicitly set "servers" and "externalServers" arrays.
* Pass in the $wgDBschema field regardless of $wgDBtype. It defaults to
  null, so no one would bother setting it if they did not want to use it.

Change-Id: I51f15c0f5d98a73907c51958bdb82dea76b3e38c

7 years agoMerge "Various small cleanups to ResultWrapper"
jenkins-bot [Mon, 19 Sep 2016 16:18:50 +0000 (16:18 +0000)]
Merge "Various small cleanups to ResultWrapper"

7 years agoMerge "Move LBFactorySingle to /libs/rdbms"
jenkins-bot [Mon, 19 Sep 2016 16:15:15 +0000 (16:15 +0000)]
Merge "Move LBFactorySingle to /libs/rdbms"

7 years agoOOjs UI: FieldsetLayout: Styling fixes for `<legend>` labels
James D. Forrester [Mon, 19 Sep 2016 15:41:44 +0000 (08:41 -0700)]
OOjs UI: FieldsetLayout: Styling fixes for `<legend>` labels

[Backport from OOjs UI master as this fixes a significant regression.]

* Make the `<legend>` 'display: inline-table' rather than 'table'.
  A block-level table would push down elements that follow it,
  including the "help" icon, which in turn messed up the fields.
  Fixes T145682, T145678 and first half of T145680.
* Only style .oo-ui-labelElement-label with margin and padding
  if we have the .oo-ui-labelElement class (label is not empty).
  Fixes second half of T145680.

Follow-up to 9cf8b941a9c618f1d7ba2512508f576f70116e1e.

Bug: T145682
Bug: T145678
Bug: T145680
Change-Id: Id95f4167afa6c000d6d2fa2ad7a62b65b6d4d53b

7 years agoMerge "Add Localisation to the links, add the link to Localisation in Languages...
jenkins-bot [Mon, 19 Sep 2016 15:23:50 +0000 (15:23 +0000)]
Merge "Add Localisation to the links, add the link to Localisation  in Languages/Language.php"

7 years agoStub out DatabaseBase::getSearchEngine() as a dummy method
Aaron Schulz [Fri, 16 Sep 2016 02:36:40 +0000 (19:36 -0700)]
Stub out DatabaseBase::getSearchEngine() as a dummy method

SearchEngineFactory::getSearchEngineClass() should be used instead

Change-Id: I984b80815633a8dc38a76d7de8a46ec249ae729f

7 years agoMerge "Make ApiMain use isBot() to catch global bots in checkReadOnly()"
jenkins-bot [Mon, 19 Sep 2016 08:34:56 +0000 (08:34 +0000)]
Merge "Make ApiMain use isBot() to catch global bots in checkReadOnly()"

7 years agoVarious small cleanups to ResultWrapper
Aaron Schulz [Sun, 18 Sep 2016 03:21:50 +0000 (20:21 -0700)]
Various small cleanups to ResultWrapper

* Make FakeResultWrapper call super to avoid IDEA warnings
* Lots of documentation cleanups

Change-Id: Ifcd7163890fa8c7718e88c4244cc38371ed624fc

7 years agoMerge "Move LIST_ constaints to IDatabase class constants"
jenkins-bot [Mon, 19 Sep 2016 08:08:42 +0000 (08:08 +0000)]
Merge "Move LIST_ constaints to IDatabase class constants"

7 years agoMerge "Move DatabaseSqlite to /libs/rdbms"
jenkins-bot [Mon, 19 Sep 2016 08:04:53 +0000 (08:04 +0000)]
Merge "Move DatabaseSqlite to /libs/rdbms"

7 years agoMerge "Fixed method name casing and IDEA warnings in FileRepo"
jenkins-bot [Mon, 19 Sep 2016 08:04:50 +0000 (08:04 +0000)]
Merge "Fixed method name casing and IDEA warnings in FileRepo"

7 years agoMove LIST_ constaints to IDatabase class constants
Aaron Schulz [Mon, 19 Sep 2016 07:28:17 +0000 (00:28 -0700)]
Move LIST_ constaints to IDatabase class constants

Leave aliases in Defines.php for backwards compatibility.

Change-Id: I88b45e0943cbfe97d863c2e0a4911fc0f81e5bb5

7 years agoFixed method name casing and IDEA warnings in FileRepo
Aaron Schulz [Mon, 19 Sep 2016 02:12:05 +0000 (19:12 -0700)]
Fixed method name casing and IDEA warnings in FileRepo

Change-Id: I463885a9f425491cd040cb1cdbc4c16925522848

7 years agoMove DatabaseSqlite to /libs/rdbms
Aaron Schulz [Sun, 18 Sep 2016 23:48:22 +0000 (16:48 -0700)]
Move DatabaseSqlite to /libs/rdbms

Change-Id: Ibda20041803deb922b7e3803cba6fc8d15214169

7 years agoMerge "Remove wf* function and global variable usage from DatabaseSqlite"
jenkins-bot [Mon, 19 Sep 2016 07:52:03 +0000 (07:52 +0000)]
Merge "Remove wf* function and global variable usage from DatabaseSqlite"

7 years agoRemove wf* function and global variable usage from DatabaseSqlite
Aaron Schulz [Sun, 18 Sep 2016 03:39:28 +0000 (20:39 -0700)]
Remove wf* function and global variable usage from DatabaseSqlite

Change-Id: I81753621ecd1e7e3b099243b4c4d0f3428bf9ae2

7 years agoCleanups and IDEA warning fixes to FileRepo classes
Aaron Schulz [Sun, 18 Sep 2016 05:29:06 +0000 (22:29 -0700)]
Cleanups and IDEA warning fixes to FileRepo classes

Change-Id: I98247b299c31b93df183981adc517187cb4aefe5

7 years agoMake LockManager use StatusValue and move classes to /libs
Aaron Schulz [Sun, 18 Sep 2016 04:42:56 +0000 (21:42 -0700)]
Make LockManager use StatusValue and move classes to /libs

Change-Id: Ifa41fc2939f3515d4a056746b0fcbff79786d25b

7 years agoMerge "Remove wf* function dependencies from FSLockManager"
jenkins-bot [Mon, 19 Sep 2016 03:39:50 +0000 (03:39 +0000)]
Merge "Remove wf* function dependencies from FSLockManager"

7 years agoMake ApiMain use isBot() to catch global bots in checkReadOnly()
Aaron Schulz [Sun, 18 Sep 2016 21:01:42 +0000 (14:01 -0700)]
Make ApiMain use isBot() to catch global bots in checkReadOnly()

Change-Id: I2090b1aad8a5858965e4ec261f8e88c37414e804

7 years agoRemove wf* function dependencies from FSLockManager
Aaron Schulz [Sun, 18 Sep 2016 03:48:23 +0000 (20:48 -0700)]
Remove wf* function dependencies from FSLockManager

Change-Id: I52f08c6e7372ddbbcc1b5f82d505e435b01ff138

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 18 Sep 2016 20:02:54 +0000 (22:02 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Id7a10255e2d68819e0de0c005a4442a43f426502

7 years agoMove LBFactorySingle to /libs/rdbms
Aaron Schulz [Sun, 18 Sep 2016 02:13:21 +0000 (19:13 -0700)]
Move LBFactorySingle to /libs/rdbms

Also add newFromConnection() methods for cleaner looking construction
since the IDatabase is fundamental and required.

Change-Id: Ife478d045cee92a30c91e9004833a557488bd512

7 years agoMerge "Remove long-since unused cruft methods from DatabaseBase"
jenkins-bot [Sun, 18 Sep 2016 02:12:51 +0000 (02:12 +0000)]
Merge "Remove long-since unused cruft methods from DatabaseBase"

7 years agoMerge "Fix file/class name mismatch from e2adcc89bbe"
jenkins-bot [Sun, 18 Sep 2016 02:09:11 +0000 (02:09 +0000)]
Merge "Fix file/class name mismatch from e2adcc89bbe"

7 years agoMerge "Avoid MWDebug usage in DatabaseBase"
jenkins-bot [Sun, 18 Sep 2016 02:03:40 +0000 (02:03 +0000)]
Merge "Avoid MWDebug usage in DatabaseBase"

7 years agoFix file/class name mismatch from e2adcc89bbe
Aaron Schulz [Sun, 18 Sep 2016 02:00:01 +0000 (19:00 -0700)]
Fix file/class name mismatch from e2adcc89bbe

Change-Id: Ieac65f29a13612cecd421b62e1cb3a3f47552bb6

7 years agoAvoid MWDebug usage in DatabaseBase
Aaron Schulz [Fri, 16 Sep 2016 20:57:56 +0000 (13:57 -0700)]
Avoid MWDebug usage in DatabaseBase

This class is in /libs and cannot depend on all of MediaWiki.
Replace the call with a simple debug() call instead.

Also, make the legacy logger route/format errors from the two
new DB log types (DBConnection, DBQuery) to the old wfLogDBError
locations, including MWDebug::debugMsg().

Change-Id: I64895d3f5b9a000d8186ab6a6ffb4b76a7e9ff40

7 years agoMerge "Move LoadBalancerSingle to /libs/rdbms"
jenkins-bot [Sun, 18 Sep 2016 01:27:50 +0000 (01:27 +0000)]
Merge "Move LoadBalancerSingle to /libs/rdbms"

7 years agoMove LoadBalancerSingle to /libs/rdbms
Aaron Schulz [Sun, 18 Sep 2016 01:04:42 +0000 (18:04 -0700)]
Move LoadBalancerSingle to /libs/rdbms

Change-Id: I2e8177ca8fa6b9fcdec87e44f0cfeb11bb71f2bc

7 years agoMerge "Move LBFactoryMulti to /libs/rdbms"
jenkins-bot [Sun, 18 Sep 2016 00:57:01 +0000 (00:57 +0000)]
Merge "Move LBFactoryMulti to /libs/rdbms"

7 years agoRemove long-since unused cruft methods from DatabaseBase
Aaron Schulz [Fri, 16 Sep 2016 05:12:50 +0000 (22:12 -0700)]
Remove long-since unused cruft methods from DatabaseBase

Change-Id: I4b28c15a8589504bdbbe79ba0d3aed1e52dbe65b

7 years agoMove LBFactoryMulti to /libs/rdbms
Aaron Schulz [Fri, 16 Sep 2016 02:17:22 +0000 (19:17 -0700)]
Move LBFactoryMulti to /libs/rdbms

Also rename $wiki => $domain and lastWiki => lastDomain.

Change-Id: I2a30f42721715c56f5cddf9f07c10e8de70addd1

7 years agoMerge "Move mysql database classes to /libs/rdbms"
jenkins-bot [Sun, 18 Sep 2016 00:10:43 +0000 (00:10 +0000)]
Merge "Move mysql database classes to /libs/rdbms"

7 years agoMerge "Clean up $wgDBmwschema handling and only apply it to mssql"
jenkins-bot [Sat, 17 Sep 2016 23:57:23 +0000 (23:57 +0000)]
Merge "Clean up $wgDBmwschema handling and only apply it to mssql"

7 years agoClean up $wgDBmwschema handling and only apply it to mssql
Aaron Schulz [Thu, 15 Sep 2016 20:51:31 +0000 (13:51 -0700)]
Clean up $wgDBmwschema handling and only apply it to mssql

Follow-up to 61762bf3f8f904bcc5a0f90985e7f787756032a7

Change-Id: Ib8dc247ba17d7cbf4cf0f46dbe82983a715f2c8d

7 years agoMove mysql database classes to /libs/rdbms
Aaron Schulz [Fri, 16 Sep 2016 03:56:24 +0000 (20:56 -0700)]
Move mysql database classes to /libs/rdbms

Change-Id: I1ba1799deec10e5a8ab8829b69e0708626e723e2

7 years agoMerge "Make Status extend StatusValue and start FileBackend update"
jenkins-bot [Sat, 17 Sep 2016 23:34:33 +0000 (23:34 +0000)]
Merge "Make Status extend StatusValue and start FileBackend update"

7 years agoMove LBFactorySimple to /libs/rdbms
Aaron Schulz [Thu, 15 Sep 2016 18:52:55 +0000 (11:52 -0700)]
Move LBFactorySimple to /libs/rdbms

* Refactored LBFactory a bit to make this possible.
* Move newChronologyProtector() up to LBFactory and
  make a lazy-loading method instead.
* Move appendPreShutdownTimeAsQuery() up to LBFactory.
* Inject the web request values for LBFactory from Setup.php.
* Remove unused laggedSlaveUsed() method.

Change-Id: Ie8a38a6f4d6359680eb6a5be24a34e30b9816479

7 years agoMerge "Inject Profiler into Database objects"
jenkins-bot [Sat, 17 Sep 2016 22:57:15 +0000 (22:57 +0000)]
Merge "Inject Profiler into Database objects"

7 years agoMake Status extend StatusValue and start FileBackend update
Aaron Schulz [Fri, 16 Sep 2016 22:55:40 +0000 (15:55 -0700)]
Make Status extend StatusValue and start FileBackend update

* This avoids code duplication.
* Callers can safely start type-hinting StatusValue as well.
* Also moved the wrap() logic out of Status::__construct(), which
  only wrap() was (and should have been) using. Use "static" as
  well, so subclass behave properly.
* The docs and type-hints in /filebackend are updated as an example.
* A migration pattern is to inject a StatusValue wrapper
  into the backend and use it on all returned statuses, so MediaWiki
  will still get Status for message methods.

Change-Id: Iff9255f34870ea6b0c4b91f6ddc69eea95186aba

7 years agoMerge "registration: Support 'ServiceWiringFiles' in extension.json"
jenkins-bot [Sat, 17 Sep 2016 22:45:18 +0000 (22:45 +0000)]
Merge "registration: Support 'ServiceWiringFiles' in extension.json"

7 years agoMerge "Make database classes handle hyphens in $wgDBname"
jenkins-bot [Sat, 17 Sep 2016 22:41:01 +0000 (22:41 +0000)]
Merge "Make database classes handle hyphens in $wgDBname"

7 years agoInject Profiler into Database objects
Aaron Schulz [Sat, 17 Sep 2016 22:30:17 +0000 (15:30 -0700)]
Inject Profiler into Database objects

* This removes the Profiler::instance() dependency from
  a class in /libs.
* Also removed unused setTransactionProfiler() method

Change-Id: Iec735a130914090dc51aed30a283565a66aabee6

7 years agoMake database classes handle hyphens in $wgDBname
Aaron Schulz [Sat, 17 Sep 2016 04:39:57 +0000 (21:39 -0700)]
Make database classes handle hyphens in $wgDBname

* Add DatabaseDomain class to handle passing domains around.
It also can be cast to and from strings, which are of the same
format as wfWikiId() except with hyphens escaped.
* Make IDatabase::getDomainID() use these IDs so they can be
passed into LoadBalancer::getConnection() and friends without
breaking on sites with a hyphen in the DB name.
* Add more LBFactory unit tests for domains.

Bug: T145840
Change-Id: Icfed62b251af8cef706a899197c3ccdb730ef4d1

7 years agoMerge "LoginSignupSpecialPage: Reduce hackiness of "You are already logged in" warning"
jenkins-bot [Sat, 17 Sep 2016 21:48:50 +0000 (21:48 +0000)]
Merge "LoginSignupSpecialPage: Reduce hackiness of "You are already logged in" warning"

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 17 Sep 2016 20:41:20 +0000 (22:41 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I3280926eadcbb43d64499eed62a6b3de8ecb285d

7 years agoMerge "Show warnings in HTMLForm and warnings as warnings on Login/Signup form"
jenkins-bot [Sat, 17 Sep 2016 18:05:13 +0000 (18:05 +0000)]
Merge "Show warnings in HTMLForm and warnings as warnings on Login/Signup form"

7 years agoMerge "mw.widgets.CategorySelector: Add client-side caching"
jenkins-bot [Sat, 17 Sep 2016 15:05:11 +0000 (15:05 +0000)]
Merge "mw.widgets.CategorySelector: Add client-side caching"

7 years agoLoginSignupSpecialPage: Reduce hackiness of "You are already logged in" warning
Bartosz Dziewoński [Sat, 17 Sep 2016 14:24:34 +0000 (16:24 +0200)]
LoginSignupSpecialPage: Reduce hackiness of "You are already logged in" warning

Use HTMLForm's built-in error/warning handling, rather than generate
the HTML ourselves. Depends on I9a27911613e62b5c4cb86bea40696cb37c4f49c2.

Change-Id: I80dd9dfcd546a50479ebe07b267105cfd4677fc7

7 years agoShow warnings in HTMLForm and warnings as warnings on Login/Signup form
Florian [Fri, 1 Jul 2016 16:26:20 +0000 (18:26 +0200)]
Show warnings in HTMLForm and warnings as warnings on Login/Signup form

This commit changes the way how HTMLForm handles a Status object
when executed from a request. It now handles, beside the errors,
also the warnings of a Status object and prints them out, wrapped
in a warning box.

The LoginSignupPage uses this feature to show informative warnings
actually as warnings and not as more disturbing error messages.
Error messages should be reserved for errors and only for erros. An
AuthenticationProvider, which returns an UI AuthenticationResponse
can choose, if the given message is an error or a warning message.

This commit also addds a new function to Status, which allows a
developer to split the object into two new Status objects, where one only
contains the errors and the other only the warnings of the origin
Status object (splitByErrorType). StatusValue also has a new function,
splitByErrorType(), to support this.

Bug: T139179
Change-Id: I9a27911613e62b5c4cb86bea40696cb37c4f49c2

7 years agoRework UserContribs options section
Amir Sarabadani [Sat, 27 Aug 2016 17:26:40 +0000 (21:56 +0430)]
Rework UserContribs options section

It will make it more mobile friendly and fixes several issues.

Bug: T143518
Bug: T50544
Change-Id: Ie353af860aaec7d6921ae83fa59980ab0a5c8d9b

7 years agoCleanups to DatabaseMysqlBase
Aaron Schulz [Fri, 16 Sep 2016 03:33:25 +0000 (20:33 -0700)]
Cleanups to DatabaseMysqlBase

* Avoid global methods
* Inject global variables
* Remove $wgAllDBsAreLocalhost hack

Change-Id: I54b23654def1f83518764ad697434aebfc6cef73

7 years agoMerge "Move all of the reasonable DatabaseBase methods to Database class"
jenkins-bot [Sat, 17 Sep 2016 05:48:25 +0000 (05:48 +0000)]
Merge "Move all of the reasonable DatabaseBase methods to Database class"

7 years agoMerge "PrefixSearch: Implement searching in multiple namespaces"
jenkins-bot [Sat, 17 Sep 2016 04:13:13 +0000 (04:13 +0000)]
Merge "PrefixSearch: Implement searching in multiple namespaces"

7 years agoMove all of the reasonable DatabaseBase methods to Database class
Aaron Schulz [Fri, 16 Sep 2016 03:14:58 +0000 (20:14 -0700)]
Move all of the reasonable DatabaseBase methods to Database class

The Database class was previously just a short-hand for "Database::",
and such calls should still work. The class now resides in /libs/rdbms.

The subclasses now extend DatabaseBase to avoid breaking type hints
that use that (hints use either IDatabase or DatabaseBase).

Also, use CASCADE with DROP TABLE for MySQL as with other DBs.
Keep SQLite excempt due to lack of support.

Added getDomainID() methods to avoid mentioning the word "wiki".

Change-Id: Ibd05d786cb26c21dcc9cb9601f6b2b52056af9ae

7 years agoMerge "Fix type doc in StatusValue"
jenkins-bot [Sat, 17 Sep 2016 02:41:14 +0000 (02:41 +0000)]
Merge "Fix type doc in StatusValue"

7 years agoMake LoadBalancer domain handling more robust
Aaron Schulz [Fri, 16 Sep 2016 18:32:23 +0000 (11:32 -0700)]
Make LoadBalancer domain handling more robust

* Cleanup setDomainPrefix() methods to handle existing LBs/DBs.
* This also makes it set just the prefix as the prefix rather
  than as the whole domain.
* Fix regression from 789a54a5f1 where "read" mode of
  tablePrefix()/dbSchema() still set the field.
* Make getConnectionRef() always have the domain set.
* Add a check in openConnection() for explicit local
  connections, treating $domain as false and avoiding
  openForeignConnection().

Bug: T145840
Change-Id: Idf392bd9992a215c4fa3bddf275562f3916596aa

7 years agoRename domain => localDomain in LBFactory for consistency
Aaron Schulz [Fri, 16 Sep 2016 18:22:10 +0000 (11:22 -0700)]
Rename domain => localDomain in LBFactory for consistency

Change-Id: I2fb66f98dddb4acc38958a7b8beec002970d43f7

7 years agoAdd Localisation to the links, add the link to Localisation in Languages/Language.php
zppix1 [Thu, 11 Aug 2016 00:53:30 +0000 (19:53 -0500)]
Add Localisation to the links, add the link to Localisation  in Languages/Language.php

Change-Id: I996d09f38a007195ba9734e13f10611c4ca1242c

7 years agoFix type doc in StatusValue
Aaron Schulz [Sat, 17 Sep 2016 00:38:10 +0000 (17:38 -0700)]
Fix type doc in StatusValue

Change-Id: Ib0a3282083b2fd08ea76022b74b21b55da9b8a46

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 16 Sep 2016 21:21:44 +0000 (23:21 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ic5673e78a0257e8c8c1cd93d8450f6f7293e0b5d

7 years agoMerge "resourceloader: Move 'site' and 'user' logic to makeModuleResponse"
jenkins-bot [Fri, 16 Sep 2016 20:03:59 +0000 (20:03 +0000)]
Merge "resourceloader: Move 'site' and 'user' logic to makeModuleResponse"

7 years agoMerge "Avoid triggering SiteConfiguration lookup in JobQueueGroup::push()"
jenkins-bot [Fri, 16 Sep 2016 19:20:57 +0000 (19:20 +0000)]
Merge "Avoid triggering SiteConfiguration lookup in JobQueueGroup::push()"

7 years agoAvoid triggering SiteConfiguration lookup in JobQueueGroup::push()
Aaron Schulz [Fri, 16 Sep 2016 18:16:19 +0000 (11:16 -0700)]
Avoid triggering SiteConfiguration lookup in JobQueueGroup::push()

Just use $wgJobTypesExcludedFromDefaultQueue directly

Bug: T145819
Change-Id: I0d978cdbef40ced98880c1a7d7524fd2b7438bfc

7 years agoApply wfBCP47() to HTTP response header Content-Language
Fomafix [Mon, 9 Nov 2015 05:43:11 +0000 (05:43 +0000)]
Apply wfBCP47() to HTTP response header Content-Language

See https://tools.ietf.org/html/rfc7231#section-3.1.3 for Content-Language.
This references https://tools.ietf.org/html/rfc5646 aka BCP 47.

Example:
curl -I https://crh.wikipedia.org/wiki/Ba%C5%9F_Saife | grep -i '^content-language:'
should contain
Content-language: crh-Latn
instead of
Content-language: crh-latn

Change-Id: Ice4f40911c3761c2542430935bc1898bc4e7a4d4

7 years agoMerge "Add SearchEngineFactory::getSearchEngineClass() instead of using the DB"
jenkins-bot [Fri, 16 Sep 2016 13:40:20 +0000 (13:40 +0000)]
Merge "Add SearchEngineFactory::getSearchEngineClass() instead of using the DB"

7 years agoAdd SearchEngineFactory::getSearchEngineClass() instead of using the DB
Aaron Schulz [Fri, 16 Sep 2016 02:33:52 +0000 (19:33 -0700)]
Add SearchEngineFactory::getSearchEngineClass() instead of using the DB

Change-Id: I46207cafec737cb830adc2bdf1b501a0d138b40d

7 years agoMerge "Split out ConvertableTimestamp class"
jenkins-bot [Fri, 16 Sep 2016 03:07:28 +0000 (03:07 +0000)]
Merge "Split out ConvertableTimestamp class"

7 years agoSplit out ConvertableTimestamp class
Aaron Schulz [Thu, 15 Sep 2016 22:46:01 +0000 (15:46 -0700)]
Split out ConvertableTimestamp class

* Make TimestampException a regular exception.
* Make DatabaseBase use ConvertableTimestamp.

Change-Id: I849737c9c187e8e0c6e080887ec0656e034f80d2

7 years agoFix $wgFileCache DB outage fallback
Aaron Schulz [Wed, 14 Sep 2016 20:07:22 +0000 (13:07 -0700)]
Fix $wgFileCache DB outage fallback

Change-Id: I5c41b4669ca29d119de5c08a2c61dbadae7cf55c

7 years agoMerge "Rephrase tooltip-rollback for clarity"
jenkins-bot [Fri, 16 Sep 2016 01:49:23 +0000 (01:49 +0000)]
Merge "Rephrase tooltip-rollback for clarity"

7 years agoMerge "API: Force straight join for prop=linkshere|transcludedin|fileusage"
jenkins-bot [Fri, 16 Sep 2016 01:45:33 +0000 (01:45 +0000)]
Merge "API: Force straight join for prop=linkshere|transcludedin|fileusage"

7 years agoMerge "Make DB snapshot commit errors include active methods"
jenkins-bot [Fri, 16 Sep 2016 01:44:00 +0000 (01:44 +0000)]
Merge "Make DB snapshot commit errors include active methods"

7 years agoMerge "mediawiki.user: Minor clean up of code and unit tests"
jenkins-bot [Fri, 16 Sep 2016 01:34:01 +0000 (01:34 +0000)]
Merge "mediawiki.user: Minor clean up of code and unit tests"

7 years agoresourceloader: Move 'site' and 'user' logic to makeModuleResponse
Timo Tijhof [Thu, 15 Sep 2016 04:01:09 +0000 (21:01 -0700)]
resourceloader: Move 'site' and 'user' logic to makeModuleResponse

* Keep this out of makeLoaderImplementScript() to keep it more generic
  and to simplify future refactoring.

* Remove now-broken test case that asserted that the output varies
  by global debug mode.

* Make the test responsible for wrapping in XmlJsCode. Previously
  this magically happened because the module name was "user" in the
  last test case.

* Make makeLoaderImplementScript protected. It's not used anywhere
  outside ResourceLoader and we should keep it that way.

Test plan:
* Verify output unchanged:
  - load.php?modules=user&only=scripts&user=Admin (raw code)
  - load.php?modules=user&user=Admin (implement with unwrapped string)
  - load.php?modules=jquery.client (implement with closure)

Change-Id: I527d01926fb6e4ce68c931695d830cdb9ceb608c

7 years agoMerge "Avoid global state in DatabaseBase::factory()/query()"
jenkins-bot [Fri, 16 Sep 2016 01:25:53 +0000 (01:25 +0000)]
Merge "Avoid global state in DatabaseBase::factory()/query()"

7 years agoMerge "Remove wfSetBit()/wfSetVar() calls in DatabaseBase"
jenkins-bot [Fri, 16 Sep 2016 01:04:07 +0000 (01:04 +0000)]
Merge "Remove wfSetBit()/wfSetVar() calls in DatabaseBase"

7 years agoRemove wfSetBit()/wfSetVar() calls in DatabaseBase
Aaron Schulz [Thu, 15 Sep 2016 17:51:13 +0000 (10:51 -0700)]
Remove wfSetBit()/wfSetVar() calls in DatabaseBase

Change-Id: I4f1269d3a4e26c766f181208942042fdf768e0af

7 years agoMerge "Remove wfRandomString() dependency in DatabaseBase"
jenkins-bot [Fri, 16 Sep 2016 00:44:35 +0000 (00:44 +0000)]
Merge "Remove wfRandomString() dependency in DatabaseBase"

7 years agoMerge "Move LoadMonitorMySQL to LoadMonitor"
jenkins-bot [Fri, 16 Sep 2016 00:41:43 +0000 (00:41 +0000)]
Merge "Move LoadMonitorMySQL to LoadMonitor"

7 years agoMerge "Move database constants to their own file"
jenkins-bot [Fri, 16 Sep 2016 00:41:12 +0000 (00:41 +0000)]
Merge "Move database constants to their own file"

7 years agoAvoid global state in DatabaseBase::factory()/query()
Aaron Schulz [Thu, 15 Sep 2016 09:21:21 +0000 (02:21 -0700)]
Avoid global state in DatabaseBase::factory()/query()

Change-Id: Ibb4f1c0dafea071a1c34e0cd5b5c15b8b4bb7bc6

7 years agoMake DB snapshot commit errors include active methods
Aaron Schulz [Wed, 14 Sep 2016 17:09:36 +0000 (10:09 -0700)]
Make DB snapshot commit errors include active methods

Change-Id: I59e501528b104e797b36103fa18792f539d92a14

7 years agoRemove wfRandomString() dependency in DatabaseBase
Aaron Schulz [Thu, 15 Sep 2016 22:02:53 +0000 (15:02 -0700)]
Remove wfRandomString() dependency in DatabaseBase

Change-Id: I9a889e120bd665683e53dfbc8729a7c484ea507c

7 years agomediawiki.user: Minor clean up of code and unit tests
Timo Tijhof [Fri, 16 Sep 2016 00:05:25 +0000 (17:05 -0700)]
mediawiki.user: Minor clean up of code and unit tests

* Clarify getRegistration() return documentation and minor
  optimisation of code order.

* Fix typo in test name for getUserInfo().

* Remove redundant test expect numbers.
  Follows-up 7c363752ed.

* Separate getter assertions for anonymous and logged-in.
  Avoid changing the fixture mid-test. Let setup/teardown
  clean up in the middle.

Change-Id: If777d44a571ac590e91ed84060ea714df67f8f2f

7 years agoMove database constants to their own file
Aaron Schulz [Thu, 15 Sep 2016 23:17:40 +0000 (16:17 -0700)]
Move database constants to their own file

Change-Id: I47e067687bbce7b89e02a0e732ee27368beddb61

7 years agoMerge "Remove wfGetCaller() dependency from DatabaseBase"
jenkins-bot [Fri, 16 Sep 2016 00:21:43 +0000 (00:21 +0000)]
Merge "Remove wfGetCaller() dependency from DatabaseBase"

7 years agoMerge "resourceloader: Set a Title on context-created messages"
jenkins-bot [Fri, 16 Sep 2016 00:17:30 +0000 (00:17 +0000)]
Merge "resourceloader: Set a Title on context-created messages"

7 years agoMerge "Deprecate jquery.arrowSteps module"
jenkins-bot [Fri, 16 Sep 2016 00:16:45 +0000 (00:16 +0000)]
Merge "Deprecate jquery.arrowSteps module"

7 years agoMove LoadMonitorMySQL to LoadMonitor
Aaron Schulz [Thu, 15 Sep 2016 05:38:47 +0000 (22:38 -0700)]
Move LoadMonitorMySQL to LoadMonitor

* The LoadMonitor interface is now ILoadMonitor.
* Nothing in this code was MySQL specific.
  Now any DB type can benefit from a LoadMonitor.

Change-Id: I272a72cd55a70f99a866d518d44cb3bcaca91b9e

7 years agoMerge "Infrastructure for augmenting search results"
jenkins-bot [Thu, 15 Sep 2016 23:09:45 +0000 (23:09 +0000)]
Merge "Infrastructure for augmenting search results"

7 years agoInfrastructure for augmenting search results
Stanislav Malyshev [Tue, 26 Apr 2016 22:19:58 +0000 (15:19 -0700)]
Infrastructure for augmenting search results

Bug: T117493
Change-Id: Ia5413a7846cc961026a2dc3542b619493bc76a23

7 years agoAdd one more level for GlobalTitleFail logging
Kunal Mehta [Thu, 15 Sep 2016 22:41:11 +0000 (15:41 -0700)]
Add one more level for GlobalTitleFail logging

htmlspecialchars/Message->__toString/Message->toString/Message->parseText/MessageCache->parse
is useless without the caller of htmlspecialchars().

Change-Id: I2dad5a487225a11b98149610f1c775057f8baad2

7 years agoresourceloader: Set a Title on context-created messages
Kunal Mehta [Thu, 15 Sep 2016 22:11:59 +0000 (15:11 -0700)]
resourceloader: Set a Title on context-created messages

Ensure that messages created using ResourceLoaderContext::msg() have a
title set so they don't trigger the GlobalTitleFail log. We use a dummy
title since there is no real title we can use here, and the cache
doesn't vary on a title anyways. This particular title was picked
especially for Roan.

This patch should quiet the GlobalTitleFail logs for
MFResourceLoaderParsedMessageModule and VisualEditorDataModule.

Change-Id: I502faa22776e1cb34a6ef17be96567f121c80081

7 years agoEditPage: Generate all messages using $this->context so we have titles
Chad Horohoe [Wed, 7 Sep 2016 17:28:13 +0000 (10:28 -0700)]
EditPage: Generate all messages using $this->context so we have titles

Change-Id: I5ba13f1677e1a1b4160e14357a483b5e1f11ea1c

7 years agoRemove wfGetCaller() dependency from DatabaseBase
Aaron Schulz [Thu, 15 Sep 2016 21:40:00 +0000 (14:40 -0700)]
Remove wfGetCaller() dependency from DatabaseBase

Change-Id: I3e240b2eb5c1f6a21f1bc974c3d28f5755c7451a

7 years agoMerge "Replace WikiPage::doEdit() usages"
jenkins-bot [Thu, 15 Sep 2016 21:38:10 +0000 (21:38 +0000)]
Merge "Replace WikiPage::doEdit() usages"