lhc/web/wiklou.git
7 years agoMerge "Make WikiPage::doDeleteArticle more robust"
jenkins-bot [Mon, 29 Aug 2016 23:28:12 +0000 (23:28 +0000)]
Merge "Make WikiPage::doDeleteArticle more robust"

7 years agoMake WikiPage::doDeleteArticle more robust
daniel [Sat, 25 Jun 2016 16:25:13 +0000 (18:25 +0200)]
Make WikiPage::doDeleteArticle more robust

When it becomes impossible to load the content of a page due to some
error or misconfiguration, we still want to be able to delete that
page. This change makes WikiPage::doDeleteArticle more robust by catching
any exceptions that may be thrown while trying to load the page content
during the deletion process.

See T128466 for context.

Change-Id: I19f2d16850a3c1af5b504a70a27b9bf1330bc68d

7 years agoMerge "Floor slave lag before display"
jenkins-bot [Mon, 29 Aug 2016 23:16:54 +0000 (23:16 +0000)]
Merge "Floor slave lag before display"

7 years agoMerge "resourceloader: Add test coverage for DerivativeResourceLoaderContext"
jenkins-bot [Mon, 29 Aug 2016 23:00:46 +0000 (23:00 +0000)]
Merge "resourceloader: Add test coverage for DerivativeResourceLoaderContext"

7 years agoMerge "Use DB_SLAVE in TemporaryPasswordPrimaryAuthenticationProvider"
jenkins-bot [Mon, 29 Aug 2016 22:52:09 +0000 (22:52 +0000)]
Merge "Use DB_SLAVE in TemporaryPasswordPrimaryAuthenticationProvider"

7 years agodatabase: Clean up profiling code in DatabaseBase
Aaron Schulz [Mon, 29 Aug 2016 17:41:59 +0000 (10:41 -0700)]
database: Clean up profiling code in DatabaseBase

This cuts down on conditionals and ScopedCallback use.

Change-Id: Ie478c613b062e45120cdd626f9fb9de09594c638

7 years agoresourceloader: Add test coverage for DerivativeResourceLoaderContext
Timo Tijhof [Mon, 29 Aug 2016 21:34:57 +0000 (14:34 -0700)]
resourceloader: Add test coverage for DerivativeResourceLoaderContext

* Re-order method tests to match source class.
* Add @covers.
* Add tests to make coverage 100%.

Change-Id: I46bdb66bc08120a82d44208a39d2dd6b7de18de1

7 years agoMove HTTP 304 check from performRequest to ViewAction
Aaron Schulz [Thu, 25 Aug 2016 00:19:58 +0000 (17:19 -0700)]
Move HTTP 304 check from performRequest to ViewAction

* Follow-up to 8b141886edebc
* The method is now called after the setCdnMaxage() call
  in performAction.
* Allow any CDN urls for the title now, check $wgDebugToolbar,
  and allows caching redirects. The multi-step redirect case does
  not cache however, for simplicity.
* Removed now-unused code in Article that calculated $timestamp.

Change-Id: Ic4f4e3a79d7d386c2f15ca5b11dddf5c57ff9e9f

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 29 Aug 2016 19:58:25 +0000 (21:58 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I1c626bebfe8884c968a8e76e151496f224f90cea

7 years agoMerge "mediawiki.api.messages: Fix typo in comments"
jenkins-bot [Mon, 29 Aug 2016 18:57:31 +0000 (18:57 +0000)]
Merge "mediawiki.api.messages: Fix typo in comments"

7 years agomediawiki.api.messages: Fix typo in comments
Bartosz Dziewoński [Mon, 29 Aug 2016 17:06:02 +0000 (19:06 +0200)]
mediawiki.api.messages: Fix typo in comments

Change-Id: I2d51a982408f54ea62e38d7b3da99af4b73541c6

7 years agoRename EditButtonPublishNotSave to EditSubmitButtonLabelPublish
James D. Forrester [Mon, 29 Aug 2016 17:44:44 +0000 (10:44 -0700)]
Rename EditButtonPublishNotSave to EditSubmitButtonLabelPublish

Per legoktm.

Change-Id: I4fbe54876095378a476399bf5e336c8df3e91e14

7 years agoMerge "Directly use getSession for specialPreferencesSaveSuccess"
jenkins-bot [Mon, 29 Aug 2016 16:54:15 +0000 (16:54 +0000)]
Merge "Directly use getSession for specialPreferencesSaveSuccess"

7 years agoMerge "Fix shutdown() code duplication in LBFactory"
jenkins-bot [Mon, 29 Aug 2016 16:47:04 +0000 (16:47 +0000)]
Merge "Fix shutdown() code duplication in LBFactory"

7 years agoMerge "Remove Block::purgeExpired() call from block query API"
jenkins-bot [Mon, 29 Aug 2016 16:30:15 +0000 (16:30 +0000)]
Merge "Remove Block::purgeExpired() call from block query API"

7 years agoRemove Block::purgeExpired() call from block query API
Aaron Schulz [Sun, 28 Aug 2016 18:37:39 +0000 (11:37 -0700)]
Remove Block::purgeExpired() call from block query API

This avoids master queries on HTTP GET. Filter out rows on the
fly and allow for pruning to only happen when blocks do.

Change-Id: Idd25b2f8a789ba191fde87e997910e78d67c7021

7 years agoFix shutdown() code duplication in LBFactory
Aaron Schulz [Mon, 29 Aug 2016 16:11:02 +0000 (09:11 -0700)]
Fix shutdown() code duplication in LBFactory

Merge duplicate shutdown() methods from LBFactory subclasses
to the base class, as cronProt is also set there too.

Change-Id: I4050b3469f61b1f4173d5841ff2497f3f30e1382

7 years agoMerge "Set the WRITE_SYNC flag for SessionBackend writes"
jenkins-bot [Mon, 29 Aug 2016 16:05:47 +0000 (16:05 +0000)]
Merge "Set the WRITE_SYNC flag for SessionBackend writes"

7 years agoUse DB_SLAVE in TemporaryPasswordPrimaryAuthenticationProvider
Aaron Schulz [Sun, 28 Aug 2016 19:10:14 +0000 (12:10 -0700)]
Use DB_SLAVE in TemporaryPasswordPrimaryAuthenticationProvider

Barring ChronologyProtector failure (which itself falls back
to waitForReplication) on account creation, this should be fine.

Change-Id: I94be86c8f56e9e98a9d06814b33a9f08a9228db6

7 years agoMerge "ApiResult: Remove double space in error message"
jenkins-bot [Mon, 29 Aug 2016 14:47:46 +0000 (14:47 +0000)]
Merge "ApiResult: Remove double space in error message"

7 years agoApiResult: Remove double space in error message
Bartosz Dziewoński [Mon, 29 Aug 2016 14:02:04 +0000 (16:02 +0200)]
ApiResult: Remove double space in error message

Change-Id: I5888d617ab9aebe5ae1fe4da6873639a81f60fc3

7 years agoAdd notes in release notes for supporting xiz and xit in time parser function
Amir Sarabadani [Mon, 29 Aug 2016 10:17:08 +0000 (14:47 +0430)]
Add notes in release notes for supporting xiz and xit in time parser function

Change-Id: I0bec049a23337933a4a2c06b72260d7399c7cd4c

7 years agoMerge "introduce {{#time: xiz}} for days passed in the year"
jenkins-bot [Mon, 29 Aug 2016 06:11:40 +0000 (06:11 +0000)]
Merge "introduce {{#time: xiz}} for days passed in the year"

7 years agoDirectly use getSession for specialPreferencesSaveSuccess
Fomafix [Mon, 22 Aug 2016 04:36:09 +0000 (06:36 +0200)]
Directly use getSession for specialPreferencesSaveSuccess

Change-Id: If9017f6c42f4c8f697504e3b92cee8bfb907b8e7

7 years agoMerge "Memcached PECL: Allow using binary protocol"
jenkins-bot [Sun, 28 Aug 2016 21:49:47 +0000 (21:49 +0000)]
Merge "Memcached PECL: Allow using binary protocol"

7 years agoSet the WRITE_SYNC flag for SessionBackend writes
Aaron Schulz [Sun, 28 Aug 2016 20:44:04 +0000 (13:44 -0700)]
Set the WRITE_SYNC flag for SessionBackend writes

Session writes should be seen in all datacenters so users do not
randomly end up logged on the next page view on a GET request
after login. Sticky DC cookies help, but not for cross domain
redirects or page views.

Change-Id: Id533fa1b867680e6386060efa4878ad1b4638c18

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

Change-Id: Ic246c3d4e15143a000363bcfb64921cc88e1ae58

7 years agoMerge "Fix database class doc typos"
jenkins-bot [Sun, 28 Aug 2016 05:24:45 +0000 (05:24 +0000)]
Merge "Fix database class doc typos"

7 years agoFix database class doc typos
Aaron Schulz [Sun, 28 Aug 2016 02:39:28 +0000 (19:39 -0700)]
Fix database class doc typos

Change-Id: I3e8c4e31326cb4f1a6b427348b42975fba86e62b

7 years agoMerge "mw.loader: Minor clean up and optimisations"
jenkins-bot [Sun, 28 Aug 2016 02:16:06 +0000 (02:16 +0000)]
Merge "mw.loader: Minor clean up and optimisations"

7 years agoMerge "Add new UsersPagerDoBatchLookups hook to allow for extensions to modify UsersP...
jenkins-bot [Sat, 27 Aug 2016 22:05:43 +0000 (22:05 +0000)]
Merge "Add new UsersPagerDoBatchLookups hook to allow for extensions to modify UsersPager::doBatchLookup()'s rigid behavior"

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 27 Aug 2016 20:50:29 +0000 (22:50 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I430efe1c74261562782b5814c0ed609a340ff88c

7 years agoMerge "Enable $wgResourceLoaderStorageEnabled by default"
jenkins-bot [Sat, 27 Aug 2016 19:22:27 +0000 (19:22 +0000)]
Merge "Enable $wgResourceLoaderStorageEnabled by default"

7 years agoDo not localize content model name inside of english exception messages
Tpt [Sat, 27 Aug 2016 09:03:18 +0000 (11:03 +0200)]
Do not localize content model name inside of english exception messages

Bug: T143889
Change-Id: I2d8004123ca6ae94219bd7880beb1c274ce13417

7 years agoMerge "API: Some raw message cleanup"
jenkins-bot [Sat, 27 Aug 2016 01:18:10 +0000 (01:18 +0000)]
Merge "API: Some raw message cleanup"

7 years agoMerge "Rollback: Catch error when unable to load latest revision data"
jenkins-bot [Sat, 27 Aug 2016 00:30:06 +0000 (00:30 +0000)]
Merge "Rollback: Catch error when unable to load latest revision data"

7 years agoMerge "Linker: Get rid of "shortcuts" in image linking functions"
jenkins-bot [Sat, 27 Aug 2016 00:25:06 +0000 (00:25 +0000)]
Merge "Linker: Get rid of "shortcuts" in image linking functions"

7 years agoRollback: Catch error when unable to load latest revision data
Chad Horohoe [Sat, 27 Aug 2016 00:01:53 +0000 (17:01 -0700)]
Rollback: Catch error when unable to load latest revision data

Ideally this never happens, but it can, so fail gracefully instead
of just throwing a 'call to a member function on non-object' message

Change-Id: Iac8be9c7994aa3e74ed3c0eecff211524037165e

7 years agomw.loader: Minor clean up and optimisations
Timo Tijhof [Thu, 25 Aug 2016 23:08:56 +0000 (16:08 -0700)]
mw.loader: Minor clean up and optimisations

* mw.loader.state: Simplify code by removing redundant branch that could set
  the value to what it already was. Also remove the condition for it since
  re-setting it should never happen in practice.
  If it does happen, it's a harmless no-op.

* mw.loader.store.set: Document use cases for descriptor being partial.
  On a most page views, this branch runs for 'site.styles', 'json', 'user',
  'dom-level2-shim', 'mediawiki.hidpi', 'user.options', and 'user.tokens'.
  Aside from group=user modules, the others are skipped or style modules.

* register: Make faster and reduce GC overhead
  (MacBookPro, Chrome canary 52, Vagrant, 566 registered modules)
  Measured using Timeline (JS Profile) and Profile (Allocation Profile).

  - Use typeof instead of isFunction().
  - In resolveIndexedDependencies:
    - Use a for-loop instead of $.each(). This uncovered a JSHint warning for
      making $.map() functions in a loop. Move the function out and re-use it.
    - Use a for-loop instead of $.map().
  - Don't create an empty dependencies array in the registry only to
    dereference it in the next statement.

  Time for register() down from 5-10ms to 3-4ms.
  Memory for register() down
   from 153KB (88% in register, 12% in resolveIndexedDependencies/each/map)
   to 120KB (100% in register, no mention of resolveIndexedDependencies)
  GC down from 350KB to 240KB.

* Remove use of isFunction(). We're not interested in its edge cases of
  native functions in old IE and regex false-positive in Android 2.3.
  For plain user-specified functions, typeof will return 'function'
  in all supported browsers.

Change-Id: I43fc7c7f54d0c279b659d6fddd21673de48f4bc2

7 years agoMerge "Make database ping() method avoid starting transactions"
jenkins-bot [Fri, 26 Aug 2016 20:15:52 +0000 (20:15 +0000)]
Merge "Make database ping() method avoid starting transactions"

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 26 Aug 2016 19:56:23 +0000 (21:56 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I3b13581197c9b68ffa28e156f47311b6a26d741d

7 years agoMerge "resources: Deprecate module "jquery.appear""
jenkins-bot [Fri, 26 Aug 2016 19:48:49 +0000 (19:48 +0000)]
Merge "resources: Deprecate module "jquery.appear""

7 years agoMake database ping() method avoid starting transactions
Aaron Schulz [Fri, 26 Aug 2016 05:20:23 +0000 (22:20 -0700)]
Make database ping() method avoid starting transactions

Also use the $ignoreErrors flag to simplify the code.

Change-Id: Ieb685366b35487abcd618eb73cf67f4c266a70c7

7 years agoMerge "Fix docs for the HtmlPageLinkRenderer hooks"
jenkins-bot [Fri, 26 Aug 2016 19:07:02 +0000 (19:07 +0000)]
Merge "Fix docs for the HtmlPageLinkRenderer hooks"

7 years agoFix docs for the HtmlPageLinkRenderer hooks
Marius Hoch [Fri, 26 Aug 2016 01:58:59 +0000 (03:58 +0200)]
Fix docs for the HtmlPageLinkRenderer hooks

The $text parameter wasn't correctly documented here,
as far as I can tell.

Change-Id: I335d1a59739d80f9f904872e3135f0aae7535956

7 years agoMerge "ApiUpload: Better handle unreasonably large metadata in 'imageinfo'"
jenkins-bot [Fri, 26 Aug 2016 17:02:32 +0000 (17:02 +0000)]
Merge "ApiUpload: Better handle unreasonably large metadata in 'imageinfo'"

7 years agoMerge "Clean up array() syntax in docs, part IV"
jenkins-bot [Fri, 26 Aug 2016 16:49:58 +0000 (16:49 +0000)]
Merge "Clean up array() syntax in docs, part IV"

7 years agoApiUpload: Better handle unreasonably large metadata in 'imageinfo'
Bartosz Dziewoński [Fri, 26 Aug 2016 13:22:09 +0000 (15:22 +0200)]
ApiUpload: Better handle unreasonably large metadata in 'imageinfo'

Bug: T143993
Change-Id: I1fcdbca9981dd034572eeb32070d574cf97a132f

7 years agointroduce {{#time: xiz}} for days passed in the year
Amir Sarabadani [Fri, 26 Aug 2016 14:08:04 +0000 (18:38 +0430)]
introduce {{#time: xiz}} for days passed in the year

Discussed in the community

Change-Id: I4d5f638d7f0635df2a0a253a3b3bfe278a0aed0e

7 years agoClean up array() syntax in docs, part IV
Amir Sarabadani [Fri, 26 Aug 2016 11:36:58 +0000 (16:06 +0430)]
Clean up array() syntax in docs, part IV

Change-Id: If626409a93d31bf90c054c9bf7ba44a78ea9a621

7 years agoRemove patch-pl-tl-il-unique.sql
Kevin Israel [Fri, 26 Aug 2016 09:09:12 +0000 (05:09 -0400)]
Remove patch-pl-tl-il-unique.sql

In 1.24 (b8c038f6784ef082), this update from 1.15 (see T18645,
640a6d311e91ccdc) was undone in tables.sql. However, it was not
removed from MysqlUpdater, so update.php would still make the
indices UNIQUE, even when run on a new MediaWiki installation.

In its place, added patch-pl-tl-il-nonunique.sql, which recreates
the indices to match the current definitions from tables.sql.

Bug: T78513
Change-Id: Ic82ca06c8e7051bcd1e0a2a3d5d251e297a9142f

7 years agoMerge "SQLite syntax checker: Fix support for multiple files"
jenkins-bot [Fri, 26 Aug 2016 03:37:27 +0000 (03:37 +0000)]
Merge "SQLite syntax checker: Fix support for multiple files"

7 years agoresources: Deprecate module "jquery.appear"
jdlrobson [Mon, 15 Aug 2016 22:22:20 +0000 (16:22 -0600)]
resources: Deprecate module "jquery.appear"

Bug: T143965
Change-Id: Ib610a624cdce082def3de5efc30ed8721432a7f8

7 years agojquery.ui.position: Mark as deprecated
Jforrester [Fri, 26 Aug 2016 01:28:28 +0000 (01:28 +0000)]
jquery.ui.position: Mark as deprecated

Bug: T142418
Change-Id: Ie6a65e8cfb69f9858c0b04d6f24c307ffcebb5a5

7 years agoSQLite syntax checker: Fix support for multiple files
Matthew Flaschen [Fri, 26 Aug 2016 01:28:45 +0000 (21:28 -0400)]
SQLite syntax checker: Fix support for multiple files

Change-Id: I285965189e4186bc557b8ef86168fb666384e5a8

7 years agoMerge "Update and broaden @covers for PreprocessorTest"
jenkins-bot [Fri, 26 Aug 2016 01:24:41 +0000 (01:24 +0000)]
Merge "Update and broaden @covers for PreprocessorTest"

7 years agoUpdate and broaden @covers for PreprocessorTest
Tim Starling [Fri, 26 Aug 2016 01:01:07 +0000 (11:01 +1000)]
Update and broaden @covers for PreprocessorTest

This class is intended to be an integration test of both preprocessor
implementations and their helper classes.

Change-Id: Iefbd6d8828bbc3278503a0f85efd7d1230a9d66c

7 years agoMerge "NewParserTest: tear down globals before returning early"
jenkins-bot [Fri, 26 Aug 2016 01:02:57 +0000 (01:02 +0000)]
Merge "NewParserTest: tear down globals before returning early"

7 years agoMerge "EditPage: Don't show create label for the button on new sections"
jenkins-bot [Fri, 26 Aug 2016 01:00:31 +0000 (01:00 +0000)]
Merge "EditPage: Don't show create label for the button on new sections"

7 years agoMerge "RELEASE-NOTES: Add release note for 74fa607"
jenkins-bot [Fri, 26 Aug 2016 00:57:30 +0000 (00:57 +0000)]
Merge "RELEASE-NOTES: Add release note for 74fa607"

7 years agoMerge "resourceloader: Make 'site.styles' actually in group 'site'"
jenkins-bot [Fri, 26 Aug 2016 00:24:15 +0000 (00:24 +0000)]
Merge "resourceloader: Make 'site.styles' actually in group 'site'"

7 years agoNewParserTest: tear down globals before returning early
Tim Starling [Thu, 25 Aug 2016 23:59:10 +0000 (09:59 +1000)]
NewParserTest: tear down globals before returning early

teardownGlobals() was called at the end of testParserTest(), but not
when returning early or throwing a "skipped" exception. This caused a
test failure when VisualEditor tests were run after parser tests, due to
$wgThumbLimits having the value set in parser tests.

Change-Id: I12d9365813fc51c15f6649084c373f5b7ccfac26

7 years agoMerge "LoginSignupSpecialPage: Restore old display of 'createacct-helpusername'"
jenkins-bot [Thu, 25 Aug 2016 23:33:45 +0000 (23:33 +0000)]
Merge "LoginSignupSpecialPage: Restore old display of 'createacct-helpusername'"

7 years agoMerge "Add urls from various adware to the CSP false positive list"
jenkins-bot [Thu, 25 Aug 2016 23:01:49 +0000 (23:01 +0000)]
Merge "Add urls from various adware to the CSP false positive list"

7 years agoAdd urls from various adware to the CSP false positive list
Brian Wolff [Thu, 25 Aug 2016 20:32:55 +0000 (20:32 +0000)]
Add urls from various adware to the CSP false positive list

URLs are based on spam that comes into the Wikimedia log files,
based on testing on elwiki.

Change-Id: Iee86633abaae86c55764365042681bda1f2304be

7 years agoresourceloader: Make 'site.styles' actually in group 'site'
Timo Tijhof [Thu, 25 Aug 2016 20:32:05 +0000 (13:32 -0700)]
resourceloader: Make 'site.styles' actually in group 'site'

Before 93ed259cf and 7bb7315d4, 'site' and 'site.styles' module were one module
loaded in two parts. One part via the general queue (not in a separate request),
and the other part in the stylesheet queue (in a separate request).

This was achieved by hacking the stylesheet queue handler to hardcode the group
to be 'site' for a module named 'site' (later 'site.styles' in c20a76ee)
eventhough the module as a whole was not actually in that group.

Now that these modules are separated, this hack is no longer needed
and the module can be registered as being in group 'site' properly.

Change-Id: If193f556be211749b115f3808ee46536b578fb22

7 years agoLoginSignupSpecialPage: Restore old display of 'createacct-helpusername'
Bartosz Dziewoński [Thu, 25 Aug 2016 20:23:17 +0000 (22:23 +0200)]
LoginSignupSpecialPage: Restore old display of 'createacct-helpusername'

Note that this message is empty by default. You'll have to create it
on your wiki to see effects of this change.

Bug: T143923
Change-Id: I509c13775426b8d51f65c95af49dffb84ccaa0f4

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 25 Aug 2016 19:57:21 +0000 (21:57 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ia68c69742fbb7eae69e4160e923ec7fa459f7b67

7 years agoMerge "Linker: Avoid Title in normaliseSpecialPage()"
jenkins-bot [Thu, 25 Aug 2016 19:26:30 +0000 (19:26 +0000)]
Merge "Linker: Avoid Title in normaliseSpecialPage()"

7 years agoAdd new UsersPagerDoBatchLookups hook to allow for extensions to modify UsersPager...
Jack Phoenix [Wed, 24 Aug 2016 14:00:22 +0000 (17:00 +0300)]
Add new UsersPagerDoBatchLookups hook to allow for extensions to modify UsersPager::doBatchLookup()'s rigid behavior

Currently UsersPager::doBatchLookup() assumes that group data comes *only*
from one place, the (local) user_groups DB table. But this isn't correct
when an extension like [[mw:Extension:GlobalUserrights]] is installed.
With the current master version of the GlobalUserrights ext. installed
under MW 1.27, only the *local* groups are shown on Special:ListUsers.
Even if you have a global group called 'staff' and you go to the
[[Special:ListUsers/staff]] page, it *will* display the correct list of
users, but the group data in parentheses is wrong; it's either 1) missing
(if the user is only a member of a global group but not any local groups)
or 2) incorrect in that it omits global group membership(s) entirely.

With this hook, an extension such as GlobalUserrights is able to query an
additional source of user group data (such as the global_user_groups table
in $wgSharedDB in the case of the GlobalUserrights ext.) and have this
data stored in the cache to ensure that global group data shows up as it
should.

Change-Id: Ied2c0f2d5738cf96a66a9672182345d630285639

7 years agoMerge "debug: Interpolate log messages"
jenkins-bot [Thu, 25 Aug 2016 19:24:11 +0000 (19:24 +0000)]
Merge "debug: Interpolate log messages"

7 years agoMerge "debug: Merge mediawiki.debug.init module into mediawiki.debug"
jenkins-bot [Thu, 25 Aug 2016 19:17:55 +0000 (19:17 +0000)]
Merge "debug: Merge mediawiki.debug.init module into mediawiki.debug"

7 years agoMerge "debug: Don't show git branch if on a detached HEAD"
jenkins-bot [Thu, 25 Aug 2016 19:16:54 +0000 (19:16 +0000)]
Merge "debug: Don't show git branch if on a detached HEAD"

7 years agomediawiki.inspect: Output size in bytes used in local storage
Peter Hedenskog [Thu, 25 Aug 2016 18:36:25 +0000 (20:36 +0200)]
mediawiki.inspect: Output size in bytes used in local storage

The current version only outputs the total size formated
human readable (kb, mb etc). Lets make it also output the size
in plain bytes so it can be formated depending on language.

Bug: T143770
Change-Id: Idda77fdae4e49a7cf46cce2fcd23c2fb2fe43f9d

7 years agoMerge "mw.htmlform: Don't refer to OO.ui if it might not be loaded"
jenkins-bot [Thu, 25 Aug 2016 17:46:26 +0000 (17:46 +0000)]
Merge "mw.htmlform: Don't refer to OO.ui if it might not be loaded"

7 years agomw.htmlform.ooui.styles: Remove vertical margin from OOjs UI HTMLForms
Bartosz Dziewoński [Wed, 10 Aug 2016 23:33:45 +0000 (01:33 +0200)]
mw.htmlform.ooui.styles: Remove vertical margin from OOjs UI HTMLForms

Originally added in b524a4333f9c1b42bf6ac0f6caa3055bd8acf84a,
this is no longer needed for framed forms (with setWrapperLegend())
after e5bb1f68cf4154c1bc4389a4404808ebddb5cef9 in OOjs UI and was
never needed for non-framed forms at all.

Change-Id: If4b4b8776080a00685bbcb9026a3d5eb89e4167d

7 years agoMerge "HTMLFormField: Don't display empty popup in OOUI mode if empty 'help' is given"
jenkins-bot [Thu, 25 Aug 2016 16:27:45 +0000 (16:27 +0000)]
Merge "HTMLFormField: Don't display empty popup in OOUI mode if empty 'help' is given"

7 years agoMerge "RestbaseVirtualRESTService: Support production URL layout"
jenkins-bot [Thu, 25 Aug 2016 15:04:33 +0000 (15:04 +0000)]
Merge "RestbaseVirtualRESTService: Support production URL layout"

7 years agoLinker: Get rid of "shortcuts" in image linking functions
Kunal Mehta [Thu, 25 Aug 2016 07:21:26 +0000 (00:21 -0700)]
Linker: Get rid of "shortcuts" in image linking functions

This code is already hard to read, and using abbreviations definitely
doesn't help.

Change-Id: I681630b66f95319a521ee2aec3be5b678122b73b

7 years agoMerge "Remove redundant UNIQUE from rev_page_id"
jenkins-bot [Thu, 25 Aug 2016 07:23:34 +0000 (07:23 +0000)]
Merge "Remove redundant UNIQUE from rev_page_id"

7 years agoLinker: Avoid Title in normaliseSpecialPage()
Kunal Mehta [Thu, 25 Aug 2016 06:49:00 +0000 (23:49 -0700)]
Linker: Avoid Title in normaliseSpecialPage()

Now that SpecialPage::getTitleValueFor() exists, use it so that we can
avoid returning a Title object uncessarily.

Change-Id: I5bf605baf2ecad62e189421a2e5c556cc0b6f6ac

7 years agoRemove redundant UNIQUE from rev_page_id
Aaron Schulz [Mon, 11 Apr 2016 21:01:43 +0000 (14:01 -0700)]
Remove redundant UNIQUE from rev_page_id

The PRIMARY KEY is rev_id, so this is a waste and
makes the index slower to maintain (e.g. no change
buffering).

Bug: T142725
Change-Id: I63f817656ff5e62aa27caf607d70353cc99eb349

7 years agomw.htmlform: Don't refer to OO.ui if it might not be loaded
Bartosz Dziewoński [Thu, 25 Aug 2016 04:34:35 +0000 (06:34 +0200)]
mw.htmlform: Don't refer to OO.ui if it might not be loaded

Dependencies are loaded dynamically here, before this code runs.
If there are no OOjs UI HTMLForm fields on the page, then OOjs UI
is not loaded, and the attempt to check if we're working with a
OO.ui.Widget would cause an exception. Invert the test to check
for jQuery, which is always loaded.

Follow-up to 89107070d14187915e760f8543579ec4d784620f.

Bug: T143850
Change-Id: Ibaa5a15fe367ed7470e3e8176e52b13442aeb985

7 years agoMerge "PreprocessorTest: test both implementations"
jenkins-bot [Thu, 25 Aug 2016 03:54:58 +0000 (03:54 +0000)]
Merge "PreprocessorTest: test both implementations"

7 years agoPreprocessorTest: test both implementations
Tim Starling [Thu, 25 Aug 2016 03:17:13 +0000 (13:17 +1000)]
PreprocessorTest: test both implementations

* Instead of only testing the configured preprocessor, test each in turn.
* Fix a test error when testing Preprocessor_Hash by removing <equals>
  tags -- only Preprocessor_Hash emits them, but they have no effect on
  the expansion.

Change-Id: I596f6b66fc636b767c447af3450556bfebe28241

7 years agoMerge "Cleanups to SqlBagOStuff"
jenkins-bot [Thu, 25 Aug 2016 03:04:29 +0000 (03:04 +0000)]
Merge "Cleanups to SqlBagOStuff"

7 years agoMerge "Optimize ChronologyProtector writes for multi-DC case"
jenkins-bot [Thu, 25 Aug 2016 03:00:39 +0000 (03:00 +0000)]
Merge "Optimize ChronologyProtector writes for multi-DC case"

7 years agoMerge "Fix AuthManagerSpecialPage submit button logic"
jenkins-bot [Thu, 25 Aug 2016 02:59:09 +0000 (02:59 +0000)]
Merge "Fix AuthManagerSpecialPage submit button logic"

7 years agoFix AuthManagerSpecialPage submit button logic
Gergő Tisza [Thu, 25 Aug 2016 02:24:51 +0000 (19:24 -0700)]
Fix AuthManagerSpecialPage submit button logic

Bug: T143840
Change-Id: I7fe442f5044c3dce27f89d83b8003dc6e4170296

7 years agoCleanups to SqlBagOStuff
Aaron Schulz [Wed, 24 Aug 2016 21:02:15 +0000 (14:02 -0700)]
Cleanups to SqlBagOStuff

* Keep track of the custom LoadBalancer when it makes one.
* Use the custom LoadBalancer to wait for slaves if one
  was used, rather than the main singleton.
* Only wait on the slaves in the LoadBalancer if the
  main DBs are being used.

Change-Id: I11de814306c44f27e0c33b08b5921c0fd4cdc24f

7 years agoMerge "resourceloader: Improve coverage in ResourceLoaderTest.php"
jenkins-bot [Thu, 25 Aug 2016 02:13:06 +0000 (02:13 +0000)]
Merge "resourceloader: Improve coverage in ResourceLoaderTest.php"

7 years agoresourceloader: Improve coverage in ResourceLoaderTest.php
Timo Tijhof [Thu, 25 Aug 2016 01:50:30 +0000 (18:50 -0700)]
resourceloader: Improve coverage in ResourceLoaderTest.php

* Fix signature of makeLoaderSourcesScript() to match
  the change in behaviour since e103ba265.

* Consistently order providers before the test.

* Simplify testRegisterValid() and remove needless @depends.

* Remove unused private method stripNoflip().

Coverage:

* Expand test coverage for register().

* Add tests for getModuleNames().

* Add tests for getModule().

* Expand test coverage for addSource().
  (case of invalid array)

* Expand test coverage for makeLoaderImplementScript().
  (case of unwrapped user script, and case of invalid scripts)

* Add tests for makeLoaderSourcesScript().

Change-Id: Ibca3e486fcd3664f171f135327a0f340ee6da9ee

7 years agoClear SiteStats process cache after DB update
Tim Starling [Thu, 25 Aug 2016 01:37:38 +0000 (11:37 +1000)]
Clear SiteStats process cache after DB update

This fixes a phpunit test error, wherein {{NUMBEROFFILES}} would give
the number of files in the host wiki, not in the temporary database,
when Scribunto was installed, due to a Scribunto phpunit data provider
calling SiteStats::pages().

Change-Id: Ic0d021a72addaa2a13a6b94fd34dccc423de3a8f

7 years agoMerge "API: Log when too many values are passed for a multi-valued parameter"
jenkins-bot [Wed, 24 Aug 2016 23:34:04 +0000 (23:34 +0000)]
Merge "API: Log when too many values are passed for a multi-valued parameter"

7 years agoEditPage: Don't show create label for the button on new sections
Jforrester [Wed, 24 Aug 2016 23:19:36 +0000 (23:19 +0000)]
EditPage: Don't show create label for the button on new sections

It turns out that the helpful $this->isNew is true on new section edits,
whether or not the page exists, so instead we have to fall back on the
$this->mTitle->exists() call that partially populates isNew anyway.

Change-Id: I7d7cdecda51c6ab4b05496f0b1420cb0264fcccb

7 years agodebug: Interpolate log messages
Kunal Mehta [Wed, 24 Aug 2016 23:12:02 +0000 (16:12 -0700)]
debug: Interpolate log messages

Change-Id: Ib61a50863022db796d69264bf738fb0b22f776e9

7 years agodebug: Merge mediawiki.debug.init module into mediawiki.debug
Kunal Mehta [Wed, 24 Aug 2016 23:00:09 +0000 (16:00 -0700)]
debug: Merge mediawiki.debug.init module into mediawiki.debug

It just calls mw.Debug.init() on document ready, which can easily be
done inside mediawiki.debug.

Change-Id: Ifaa5a4884c9e430241a4bff51454bb96f468cd61

7 years agodebug: Don't show git branch if on a detached HEAD
Kunal Mehta [Wed, 24 Aug 2016 22:44:41 +0000 (15:44 -0700)]
debug: Don't show git branch if on a detached HEAD

The short SHA1 is already shown with the MediaWiki version, and
displaying the full SHA1 again adds 40+ more characters. Mostly this
annoys me as it causes the toolbar to wrap earlier when making my
browser window smaller.

Change-Id: If7474a090466de708d65cef6dcc30a36df56621f

7 years agoMerge "Add LBFactory::beginMasterChanges() for doing DBO_TRX rounds"
jenkins-bot [Wed, 24 Aug 2016 20:21:14 +0000 (20:21 +0000)]
Merge "Add LBFactory::beginMasterChanges() for doing DBO_TRX rounds"

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 24 Aug 2016 19:55:28 +0000 (21:55 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: If5f82b2d32ab93592dd54cf21cb5d36c52315936