lhc/web/wiklou.git
8 years agoFix stray $1 in some Special:Tags error messages
georggi [Wed, 9 Dec 2015 12:07:33 +0000 (14:07 +0200)]
Fix stray $1 in some Special:Tags error messages

Removed '$1' on line 395 of SpecialTags.php, it should
no longer appear in the text.

Bug: T97639
Change-Id: I7f225df684c20f4d0606f001b90a7fb97595600d

8 years agoMerge "Fix some language depending phpunit tests by using MediaWikiLangTestCase"
jenkins-bot [Tue, 8 Dec 2015 19:22:45 +0000 (19:22 +0000)]
Merge "Fix some language depending phpunit tests by using MediaWikiLangTestCase"

8 years agoRenamed confusing initial $status var in doEditContent()
Aaron Schulz [Tue, 8 Dec 2015 03:10:17 +0000 (19:10 -0800)]
Renamed confusing initial $status var in doEditContent()

Change-Id: I22cad9eb3fb4040e5506b0cccd573871d108d257

8 years agoMerge "Fix edge case in onTransactionIdle()"
jenkins-bot [Tue, 8 Dec 2015 01:33:18 +0000 (01:33 +0000)]
Merge "Fix edge case in onTransactionIdle()"

8 years agoFix edge case in onTransactionIdle()
Aaron Schulz [Tue, 8 Dec 2015 01:26:15 +0000 (17:26 -0800)]
Fix edge case in onTransactionIdle()

If a callback set DBO_TRX, make sure it gets unset if that
is not what the DB was set to before the callbacks ran.

Change-Id: I79b649de02e821494d7f88e8979764ec8a9d0c43

8 years agoUse wgCanonicalNamespace instead of wgNamespaceIds[key] in JS
Timo Tijhof [Tue, 8 Dec 2015 01:17:41 +0000 (01:17 +0000)]
Use wgCanonicalNamespace instead of wgNamespaceIds[key] in JS

Follows-up 746f8fc9a81bf7.

Change-Id: I1e62d7b64a87c26f9a2c4a6a6ca988daac223ede

8 years agoMerge "Remove unused $wgStatsMethod and related UDPProfiler variables"
jenkins-bot [Mon, 7 Dec 2015 22:58:58 +0000 (22:58 +0000)]
Merge "Remove unused $wgStatsMethod and related UDPProfiler variables"

8 years agomediawiki.api: fix badtoken handling with legacy token types
Niklas Laxström [Tue, 1 Dec 2015 16:25:16 +0000 (17:25 +0100)]
mediawiki.api: fix badtoken handling with legacy token types

Manual test plan:

mw.loader.using( 'mediawiki.api.login' ).done( function () {
var
user = 'XXX',
pass = 'YYY',
api = new mw.Api();

api.login( user, pass ).done( function () {
api.postWithToken( 'options', {
action: 'options',
optionname: 'userjs-tokentest',
optionvalue: 1
} ).fail( function () {
console.log( arguments );
} );
} );
} );

Change-Id: I175cf4e3a845cdfe621b6009920fddba6bc1ff12

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 7 Dec 2015 21:51:28 +0000 (22:51 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Iac16753a290ab6b9549d4292265969a9df9b1dc4

8 years agoRemove unused $wgStatsMethod and related UDPProfiler variables
Timo Tijhof [Mon, 7 Dec 2015 19:49:38 +0000 (19:49 +0000)]
Remove unused $wgStatsMethod and related UDPProfiler variables

All unused:
* $wgProfileCallTree
* $wgProfilePerHost
* $wgUDPProfilerHost
* $wgUDPProfilerPort
* $wgUDPProfilerFormatString
* $wgStatsMethod
* $wgAggregateStatsID
* $wgStatsFormatString

The only one still used was $wgProfilePerHost.

Also move release notes for ade945b97a51 from HISTORY to RELEASE-NOTES (Oops!)

Change-Id: Ia0280d23674ace1ac33aa561b06ee73cab865b29

8 years agoMerge "Add $wgMaxUserDBWriteDuration to limit user-generated transactions"
jenkins-bot [Mon, 7 Dec 2015 21:25:24 +0000 (21:25 +0000)]
Merge "Add $wgMaxUserDBWriteDuration to limit user-generated transactions"

8 years agoMerge "Remove obsolete showCacheStats.php and showCacheStats.php"
jenkins-bot [Mon, 7 Dec 2015 20:52:28 +0000 (20:52 +0000)]
Merge "Remove obsolete showCacheStats.php and showCacheStats.php"

8 years agoMerge "objectcache: Improve entry point docs and fix typo in READ_LATEST"
jenkins-bot [Mon, 7 Dec 2015 20:48:49 +0000 (20:48 +0000)]
Merge "objectcache: Improve entry point docs and fix typo in READ_LATEST"

8 years agoMerge "Fix phpdoc of wfArrayToCgi"
jenkins-bot [Mon, 7 Dec 2015 20:39:59 +0000 (20:39 +0000)]
Merge "Fix phpdoc of wfArrayToCgi"

8 years agoobjectcache: Improve entry point docs and fix typo in READ_LATEST
Timo Tijhof [Mon, 7 Dec 2015 19:52:42 +0000 (19:52 +0000)]
objectcache: Improve entry point docs and fix typo in READ_LATEST

Add missing colon in "BagOStuff::READ_LATEST".

Change-Id: I93f55299b49b5240e3ef6354d3a1fca2b416e40d

8 years agoRemove obsolete showCacheStats.php and showCacheStats.php
Timo Tijhof [Sun, 6 Dec 2015 18:20:10 +0000 (18:20 +0000)]
Remove obsolete showCacheStats.php and showCacheStats.php

These scripts interact with keys that used to be set by ParserCache.php.
However this hasn't been the case for a long time now. They use wfIncrStats(),
which is configured by $wgStatsdServer.

Change-Id: Id6a62aec57801085ed684af9362a96eca0914e92

8 years agoMerge "Split out edit/create methods from doEditContent()"
jenkins-bot [Mon, 7 Dec 2015 19:29:23 +0000 (19:29 +0000)]
Merge "Split out edit/create methods from doEditContent()"

8 years agoMerge "tests: Remove unused $wgMemc resets"
jenkins-bot [Mon, 7 Dec 2015 19:24:17 +0000 (19:24 +0000)]
Merge "tests: Remove unused $wgMemc resets"

8 years agoMerge "resourceloader: Log warning if module produces an invalid version hash"
jenkins-bot [Mon, 7 Dec 2015 19:14:40 +0000 (19:14 +0000)]
Merge "resourceloader: Log warning if module produces an invalid version hash"

8 years agoMerge "Allow auto suggestion for subpages of some special pages"
jenkins-bot [Mon, 7 Dec 2015 18:28:04 +0000 (18:28 +0000)]
Merge "Allow auto suggestion for subpages of some special pages"

8 years agoFix phpunit for wikis with $wgResourceLoaderValidateJS = false
umherirrender [Mon, 7 Dec 2015 16:38:28 +0000 (17:38 +0100)]
Fix phpunit for wikis with $wgResourceLoaderValidateJS = false

1) ResourceLoaderModuleTest::testValidateScriptFile
Replace invalid syntax with error logging
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'var a = 'this is';
- {
-invalid'
+'mw.log.error("JavaScript parse error: Parse error: Unexpected token;
token } expected in file 'input' on line 3");'

Change-Id: I0271de4bf2d5bcc50eaf5c0e999e16e554985805

8 years agoFix some language depending phpunit tests by using MediaWikiLangTestCase
umherirrender [Mon, 7 Dec 2015 16:26:16 +0000 (17:26 +0100)]
Fix some language depending phpunit tests by using MediaWikiLangTestCase

Some tests fails on wikis with $wgLanguageCode not = 'en', fix this by
setting the correct language context.

Change-Id: Ia72017df59d8beb5c508832584b2431ffab0f77f

8 years agoresourceloader: Log warning if module produces an invalid version hash
Timo Tijhof [Tue, 10 Nov 2015 03:12:24 +0000 (03:12 +0000)]
resourceloader: Log warning if module produces an invalid version hash

* Add logger to ResourceLoaderContext for convenient use within modules.
* Group related members within ResourceLoaderContext.

Change-Id: Ifbc3de1b6e0838386735f1573df328d9b331ac37

8 years agoMerge "Change wording of 'wlshowtime' for ease of localisation"
jenkins-bot [Mon, 7 Dec 2015 12:45:26 +0000 (12:45 +0000)]
Merge "Change wording of 'wlshowtime' for ease of localisation"

8 years agoMerge "Add magic word for protection expiry"
jenkins-bot [Mon, 7 Dec 2015 10:32:19 +0000 (10:32 +0000)]
Merge "Add magic word for protection expiry"

8 years agoMerge "SpecialWatchlist: Don't display '0' in the selector when 'all' is chosen"
jenkins-bot [Mon, 7 Dec 2015 10:17:22 +0000 (10:17 +0000)]
Merge "SpecialWatchlist: Don't display '0' in the selector when 'all' is chosen"

8 years agoAdd magic word for protection expiry
cenarium [Fri, 27 Nov 2015 18:44:11 +0000 (19:44 +0100)]
Add magic word for protection expiry

This adds a magic word to get the protection expiry for a page for a
given action.
Usage is {{PROTECTIONEXPIRY:action}}.

Bug: T19354
Change-Id: Ia1a20e313781789480dc082bdc7f585c4f0e28df

8 years agoSplit out edit/create methods from doEditContent()
Aaron Schulz [Wed, 4 Nov 2015 01:12:15 +0000 (17:12 -0800)]
Split out edit/create methods from doEditContent()

* Make the method sizes a bit more manageable.
  This will be useful for replacing the begin/commit
  calls later (with startAtomic/endAtomic).
* Cleaned up a few inconsistencies in code style.

Change-Id: I8d66503a5575ca369cd5feb56058af7d24001629

8 years agoMerge "Use wgNamespaceIds constants instead of hard-coded numbers"
jenkins-bot [Mon, 7 Dec 2015 00:19:49 +0000 (00:19 +0000)]
Merge "Use wgNamespaceIds constants instead of hard-coded numbers"

8 years agoSpecialWatchlist: Don't display '0' in the selector when 'all' is chosen
Bartosz Dziewoński [Fri, 4 Dec 2015 15:51:22 +0000 (16:51 +0100)]
SpecialWatchlist: Don't display '0' in the selector when 'all' is chosen

Follow-up to f3daab99f71eb3e41ae472deb8a71d7d6cbd42db.

Change-Id: I6ffc9b93bc1bd6111224c06f124b1bd01107bbd5

8 years agoMerge "objectcache: Make protected WANObjectCache::makePurgeValue non-static"
jenkins-bot [Sun, 6 Dec 2015 22:34:46 +0000 (22:34 +0000)]
Merge "objectcache: Make protected WANObjectCache::makePurgeValue non-static"

8 years agoMerge "tests: Clean up use of mt_rand()"
jenkins-bot [Sun, 6 Dec 2015 22:32:43 +0000 (22:32 +0000)]
Merge "tests: Clean up use of mt_rand()"

8 years agoMerge "tests: Remove unused TableCleanupTest class"
jenkins-bot [Sun, 6 Dec 2015 22:32:39 +0000 (22:32 +0000)]
Merge "tests: Remove unused TableCleanupTest class"

8 years agoMerge "Special:Statistics: Change link target for content pages to hide redirects"
jenkins-bot [Sun, 6 Dec 2015 20:44:44 +0000 (20:44 +0000)]
Merge "Special:Statistics: Change link target for content pages to hide redirects"

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 6 Dec 2015 20:31:22 +0000 (21:31 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I0bd8b710b580a76a88e16088ab0f70677a90ea63

8 years agoSpecial:Statistics: Change link target for content pages to hide redirects
Florianschmidtwelzow [Tue, 3 Nov 2015 08:04:46 +0000 (09:04 +0100)]
Special:Statistics: Change link target for content pages to hide redirects

Content pages, as visible on Special:Statistics, doesn't include
redirects in the visible counter. But the link target (Special:AllPages)
includes redirects in the default view, which could be confusing, if a
user expects all pages excluding redirects.

Change the link target of Content pages to hide redirects by default and
add a link for "Pages" to the default view of Special:AllPages.

Change-Id: I1c1ada8e3d16d19db8315eccfbea2c753814659e

8 years agoMerge "Remove obsolete category links code"
Krinkle [Sun, 6 Dec 2015 18:42:39 +0000 (18:42 +0000)]
Merge "Remove obsolete category links code"

8 years agoMerge "Make RefreshLinksJob de-duplication more robust"
jenkins-bot [Sun, 6 Dec 2015 18:41:48 +0000 (18:41 +0000)]
Merge "Make RefreshLinksJob de-duplication more robust"

8 years agotests: Remove unused $wgMemc resets
Timo Tijhof [Sun, 6 Dec 2015 18:06:08 +0000 (18:06 +0000)]
tests: Remove unused $wgMemc resets

If we really need this we can do it in MediaWikiTestCase, next
to the setting of wgMainCacheType. But from what I can see the
code being tested here already doesn't use the old $wgMemc.

Change-Id: I9e4b2109b2f3c18d8d5551bbadae5711c1d4c0a6

8 years agoAllow auto suggestion for subpages of some special pages
umherirrender [Sun, 6 Dec 2015 15:06:01 +0000 (16:06 +0100)]
Allow auto suggestion for subpages of some special pages

The autocomplete search allows special pages to define the list of
subpages to be excepted. Fill up the function to show auto suggestion
for subpages of the following special pages:

Special:AllPages
Special:ChangeContentModel
Special:FileDuplicateSearch
Special:Movepage
Special:PageLanguage
Special:Prefixindex
Special:Recentchangeslinked
Special:Undelete

This makes it easier to navigate to this special pages with a prefilled
title/target field.

Change-Id: I71f77c3001a12d75b901807c20115cead9c64e93

8 years agoMerge "Add user autocomplete and autofocus to Special:ActiveUsers"
jenkins-bot [Sun, 6 Dec 2015 16:31:49 +0000 (16:31 +0000)]
Merge "Add user autocomplete and autofocus to Special:ActiveUsers"

8 years agoMerge "Fill getSubpagesForPrefixSearch of Special:Tags"
jenkins-bot [Sun, 6 Dec 2015 15:49:56 +0000 (15:49 +0000)]
Merge "Fill getSubpagesForPrefixSearch of Special:Tags"

8 years agoMerge "SpecialContributions: Fix whitespace in tagfilter"
jenkins-bot [Sun, 6 Dec 2015 15:33:22 +0000 (15:33 +0000)]
Merge "SpecialContributions: Fix whitespace in tagfilter"

8 years agoMerge "Fix PHPDoc for getTimeAndDelay()"
jenkins-bot [Sun, 6 Dec 2015 15:31:12 +0000 (15:31 +0000)]
Merge "Fix PHPDoc for getTimeAndDelay()"

8 years agoSpecialContributions: Fix whitespace in tagfilter
Florian [Sun, 6 Dec 2015 01:30:30 +0000 (02:30 +0100)]
SpecialContributions: Fix whitespace in tagfilter

Removing the first element of an array, and using it as a label, doesn't make
much sense, if the array will be imploded using a whitespace to add a whitespace
between both array parts.

Instead of writing:
Tag filter:<input>

this will result in the expected output:
Tag filter: <input>

Change-Id: Ifc9de7cc6ab380fcff435fcd0410963e72ef6203

8 years agoMerge "Make ForkController destroy redis instances too"
jenkins-bot [Sun, 6 Dec 2015 15:16:19 +0000 (15:16 +0000)]
Merge "Make ForkController destroy redis instances too"

8 years agoAdd user autocomplete and autofocus to Special:ActiveUsers
umherirrender [Sun, 6 Dec 2015 14:26:52 +0000 (15:26 +0100)]
Add user autocomplete and autofocus to Special:ActiveUsers

Add autocomplete and autofocus as already exists on Special:ListUsers

Change-Id: I7a89023491cfff4d36c3214a4d56d4c0d35d192e

8 years agoFill getSubpagesForPrefixSearch of Special:Tags
umherirrender [Sun, 6 Dec 2015 14:58:31 +0000 (15:58 +0100)]
Fill getSubpagesForPrefixSearch of Special:Tags

Adding all the possible sub pages to getSubpagesForPrefixSearch will
show them up on search suggestion

Change-Id: I4bd99376bbddbbce1812119a43484f08e2360ff5

8 years agoobjectcache: Make protected WANObjectCache::makePurgeValue non-static
Timo Tijhof [Fri, 4 Dec 2015 12:34:01 +0000 (12:34 +0000)]
objectcache: Make protected WANObjectCache::makePurgeValue non-static

It was already used everywhere as non-static via $this.
This is needed in order to allow MessageBlobStore unit tests
to disable the holdoff via a mock (mocks can't override static methods).

Change-Id: I3aad5b6e780addf1b6ce9de56c81b91f5ab358b2

8 years agoMerge "Fix get()/getMulti() check key race condition in WANObjectCache"
jenkins-bot [Sun, 6 Dec 2015 14:13:13 +0000 (14:13 +0000)]
Merge "Fix get()/getMulti() check key race condition in WANObjectCache"

8 years agomediawiki.ForeignStructuredUpload: Always use '|1=' for description templates
Steinsplitter [Sun, 6 Dec 2015 07:21:13 +0000 (07:21 +0000)]
mediawiki.ForeignStructuredUpload: Always use '|1=' for description templates

'|1=' should be always used, following the standard on Commons.

Follow-up to 56af60ab91e0b74af9e416b11fa487e15097f5bc.

Bug: T119691
Change-Id: Ied787ecb91aaae3f643c9d013b8982ddabea8142

8 years agoDeduplicate input in Special:Contributions
Ltrlg [Sun, 6 Dec 2015 01:08:44 +0000 (02:08 +0100)]
Deduplicate input in Special:Contributions

Bug: T120542
Change-Id: I129bf2cf826439b873c3bf590f784ea24ab6181d

8 years agoRemove obsolete category links code
Aaron Schulz [Sun, 6 Dec 2015 00:07:50 +0000 (16:07 -0800)]
Remove obsolete category links code

* These calls and methods should no longer be needed
* Follow-up to 6dedffc2d7f8

Change-Id: Iff121263610117112c84edb5e575f039456d1ac8

8 years agoFix PHPDoc for getTimeAndDelay()
Aaron Schulz [Sat, 5 Dec 2015 22:02:34 +0000 (14:02 -0800)]
Fix PHPDoc for getTimeAndDelay()

Change-Id: I7e5b368d13489afec6df56cdc3e71c2e60e07e20

8 years agoFix some FileRepo IDEA errors
Aaron Schulz [Fri, 4 Dec 2015 23:31:02 +0000 (15:31 -0800)]
Fix some FileRepo IDEA errors

Change-Id: Ia30d82c9ce27503182d95cd9a3f23d80743e7364

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 5 Dec 2015 21:48:14 +0000 (22:48 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I5b5a38cb36401a8866f1c15b8892a84bc131e570

8 years agoFix IDEA error in intervalsSinceGregorianBinary()
Aaron Schulz [Sat, 5 Dec 2015 21:31:07 +0000 (13:31 -0800)]
Fix IDEA error in intervalsSinceGregorianBinary()

Change-Id: Icc90a3050d5d918176dfbb88636a4d9b742fd4b0

8 years agoMerge "registration: Remove type validation for "config" items"
jenkins-bot [Sat, 5 Dec 2015 21:07:26 +0000 (21:07 +0000)]
Merge "registration: Remove type validation for "config" items"

8 years agoAdd UUIDv1 function to UIDGenerator
Ori Livneh [Wed, 2 Dec 2015 22:10:01 +0000 (14:10 -0800)]
Add UUIDv1 function to UIDGenerator

* Added some more unit tests.

Change-Id: Ieb7e66b1319df2e9c6da1518cc9539f276da1838

8 years agoFix phpdoc of wfArrayToCgi
addshore [Sat, 5 Dec 2015 19:07:03 +0000 (20:07 +0100)]
Fix phpdoc of wfArrayToCgi

Change-Id: I87db5c251310f6f56f0ec47cbb7f034ed43c31ac

8 years agoMake ForkController destroy redis instances too
Aaron Schulz [Sat, 5 Dec 2015 07:15:36 +0000 (23:15 -0800)]
Make ForkController destroy redis instances too

Bug: T85565
Change-Id: I79e1b6aab30ef8ddfee2dd4f5f41e991562dbf13

8 years agoregistration: Remove type validation for "config" items
Kunal Mehta [Sat, 5 Dec 2015 05:04:51 +0000 (21:04 -0800)]
registration: Remove type validation for "config" items

The type list was missing "number" for doubles, but since we allow *all*
types of variables, don't even bother checking types.

Bug: T120507
Change-Id: I10626f5764f49d4f96a3cc35a27c890905a71bfe

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 4 Dec 2015 23:20:07 +0000 (00:20 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I898facfb74a8876df8b0dd2068026f3c6c7fe93d

8 years agoFix get()/getMulti() check key race condition in WANObjectCache
Aaron Schulz [Fri, 4 Dec 2015 22:22:02 +0000 (14:22 -0800)]
Fix get()/getMulti() check key race condition in WANObjectCache

If a set() happened around the exact same time as check key was
initialized via get(), the curTTL in future get() calls could
sometimes be 0 instead of a negative value, even though hold-off
should apply.

Change-Id: Ide1fd65112aff425a4798e2ec406d71f2a8e84a7

8 years agoConvert ApiStashEdit to PSR-3
Bryan Davis [Fri, 4 Dec 2015 22:18:07 +0000 (15:18 -0700)]
Convert ApiStashEdit to PSR-3

Convert the wfDebugLog calls in ApiStashEdit to direct use of the PSR-3
logging layer and add severity information for each message.

Change-Id: Ic91e89ceee405a1d22e5e3c461ad37795cae4a6f

8 years agoFollow-up for Iba0138a6d: remove now-unused MWHookException class
Ori Livneh [Fri, 4 Dec 2015 21:14:33 +0000 (13:14 -0800)]
Follow-up for Iba0138a6d: remove now-unused MWHookException class

Change-Id: I9cf80f2b701d6db8a6cfe884e4fd15d4e0482dda

8 years agoRemove DeferredUpdates::forceDeferral() testing hack
Aaron Schulz [Wed, 2 Dec 2015 00:13:51 +0000 (16:13 -0800)]
Remove DeferredUpdates::forceDeferral() testing hack

Change-Id: I7f2ad8190e1a746b6c39190b86fa9c83c5b921fe

8 years agoMerge "Remove redundant testGetMulti() assertion"
jenkins-bot [Fri, 4 Dec 2015 21:13:16 +0000 (21:13 +0000)]
Merge "Remove redundant testGetMulti() assertion"

8 years agoAdd $wgMaxUserDBWriteDuration to limit user-generated transactions
Aaron Schulz [Sat, 24 Oct 2015 10:22:41 +0000 (03:22 -0700)]
Add $wgMaxUserDBWriteDuration to limit user-generated transactions

This is a low level catch-all net for huge updates that still slip
through. Features that let users add/remove arbitrarily many rows
to lists of arbitrary size can easily result in high lag due to
strange usage patterns or deliberate attacks.

Also removed duplicate 'autochange-username' JSON key.

Bug: T95501
Change-Id: I58a91ca23cae528ef1954d2d78c8f0a90681983e

8 years agoMerge "Fix phpdoc of StatusValue::merge"
jenkins-bot [Fri, 4 Dec 2015 21:05:22 +0000 (21:05 +0000)]
Merge "Fix phpdoc of StatusValue::merge"

8 years agoRemove redundant testGetMulti() assertion
Aaron Schulz [Fri, 4 Dec 2015 20:31:01 +0000 (12:31 -0800)]
Remove redundant testGetMulti() assertion

Change-Id: Iadbf39de9c6be2baeb7c2f7c1dce39e9f2bed2e4

8 years agoMerge "Don't install a custom error handler for hooks"
jenkins-bot [Fri, 4 Dec 2015 21:02:44 +0000 (21:02 +0000)]
Merge "Don't install a custom error handler for hooks"

8 years agoFix phpdoc of StatusValue::merge
addshore [Fri, 4 Dec 2015 20:45:30 +0000 (21:45 +0100)]
Fix phpdoc of StatusValue::merge

Change-Id: I6fec36f9911d647fa7507c36b57f6b11ef04d63d

8 years agoMake RefreshLinksJob de-duplication more robust
Aaron Schulz [Tue, 1 Dec 2015 23:40:46 +0000 (15:40 -0800)]
Make RefreshLinksJob de-duplication more robust

* Do not de-duplicate jobs with "masterPos". It either does not
  catch anything or is not correct. Previously, it was the later,
  by making getDuplicationInfo() ignore the position. That made the
  oldest DB position win among "duplicate" jobs, which is unsafe.
* From graphite, deduplication only applies .5-2% of the time for
  "refreshLinks", so there should not be much more duplicated
  effort. Dynamic and Prioritized refreshLinks jobs remain
  de-duplicated on push() and root job de-duplication still applies
  as it did before. Also, getLinksTimestamp() is still checked to
  avoid excess work.
* Document the class constants.

Change-Id: Ie9a10aa58f14fa76917501065dfe65083afb985c

8 years agoMerge "Add support for blacklisting common passwords"
jenkins-bot [Fri, 4 Dec 2015 20:17:45 +0000 (20:17 +0000)]
Merge "Add support for blacklisting common passwords"

8 years agoDon't install a custom error handler for hooks
Ori Livneh [Fri, 4 Dec 2015 19:59:52 +0000 (11:59 -0800)]
Don't install a custom error handler for hooks

Installing a custom error handler on every hook invocation has a high overhead,
and does not even correctly achieves what it sets out to achieve, which is to
flag hook function signature errors (and only hook function signature errors).
The "PHP way" is to simply increase the error reporting level for development
environments, which we do already.

Bug: T117553
Change-Id: Iba0138a6d0a0ddf839bc5a36e03cadb012e06f3c

8 years agoUse wgNamespaceIds constants instead of hard-coded numbers
Ed Sanders [Fri, 4 Dec 2015 19:59:19 +0000 (19:59 +0000)]
Use wgNamespaceIds constants instead of hard-coded numbers

Change-Id: I2d4a75ed877331ff41e0dca6a7dddd5feb91eabf

8 years agoMerge "Defer the redirect table update in WikiPage::insertRedirect()"
jenkins-bot [Fri, 4 Dec 2015 19:30:05 +0000 (19:30 +0000)]
Merge "Defer the redirect table update in WikiPage::insertRedirect()"

8 years agoMerge "Add user autocomplete and autofocus to Special:Emailuser"
jenkins-bot [Fri, 4 Dec 2015 19:26:42 +0000 (19:26 +0000)]
Merge "Add user autocomplete and autofocus to Special:Emailuser"

8 years agoMerge "Add more BacklinkJobUtils comments"
jenkins-bot [Fri, 4 Dec 2015 19:24:54 +0000 (19:24 +0000)]
Merge "Add more BacklinkJobUtils comments"

8 years agoMerge "Remove unused WikiPage::getLastNAuthors() method"
jenkins-bot [Fri, 4 Dec 2015 19:20:33 +0000 (19:20 +0000)]
Merge "Remove unused WikiPage::getLastNAuthors() method"

8 years agoMerge "Fix some IDEA errors in BacklinkJobUtils"
jenkins-bot [Fri, 4 Dec 2015 19:19:51 +0000 (19:19 +0000)]
Merge "Fix some IDEA errors in BacklinkJobUtils"

8 years agoMerge "Make CDN purge calls use DeferredUpdates"
jenkins-bot [Fri, 4 Dec 2015 19:19:09 +0000 (19:19 +0000)]
Merge "Make CDN purge calls use DeferredUpdates"

8 years agoMerge "Add mergeable update support DeferredUpdates"
jenkins-bot [Fri, 4 Dec 2015 19:19:05 +0000 (19:19 +0000)]
Merge "Add mergeable update support DeferredUpdates"

8 years agoMerge "Add pre-send update support to DeferredUpdates"
jenkins-bot [Fri, 4 Dec 2015 19:16:00 +0000 (19:16 +0000)]
Merge "Add pre-send update support to DeferredUpdates"

8 years agoMake CDN purge calls use DeferredUpdates
Aaron Schulz [Tue, 1 Dec 2015 00:05:56 +0000 (16:05 -0800)]
Make CDN purge calls use DeferredUpdates

* Using addUpdate() makes sure purges are coalesced and
  de-duplicated.
* Also removed incosistent $wgUseSquid checks. If CDN caching
  is not used, then $wgSquidServers will just be empty anyway.

Bug: T119016
Change-Id: I8b448366f037f668385d252f9d68289b71d1a707

8 years agoAdd mergeable update support DeferredUpdates
Aaron Schulz [Mon, 30 Nov 2015 23:26:45 +0000 (15:26 -0800)]
Add mergeable update support DeferredUpdates

* DeferrableUpdate classes can implement MergeableUpdate.
  Duplicate updates will be merged via the merge() method.
* Make SquidUpdate support merge() so that duplicate URL
  purges are now caught accross the entire pre-send request
  execution.

Change-Id: Idffdd3e71d89e4a0f28281e65a881113caae497c

8 years agoAdd pre-send update support to DeferredUpdates
Aaron Schulz [Mon, 30 Nov 2015 22:02:53 +0000 (14:02 -0800)]
Add pre-send update support to DeferredUpdates

* PRESEND/POSTSEND constants can now be used in addUpdate()
  and addCallableUpdate() to control when the update runs.
  This is useful for updates that may report errors the client
  should see or to just get a head start on queued or pubsub
  based updates like CDN purges. The OutputPage::output() method
  can easily take a few 100ms.
* Removed some argument b/c code from doUpdates().
* Also moved DeferrableUpdate to a separate file.

Change-Id: I9831fe890f9f68f9ad8c4f4bba6921a8f29ba666

8 years agoMerge "Make HTMLCacheUpdate always use the job queue"
jenkins-bot [Fri, 4 Dec 2015 19:07:58 +0000 (19:07 +0000)]
Merge "Make HTMLCacheUpdate always use the job queue"

8 years agoAdd user autocomplete and autofocus to Special:Emailuser
umherirrender [Fri, 4 Dec 2015 18:55:28 +0000 (19:55 +0100)]
Add user autocomplete and autofocus to Special:Emailuser

When the page is visited without a user in context, there is a user
input field which now has autofocus and autocomplete

Change-Id: I31e08b7f950fbdb02e5617e3acf9a136bcdef50b

8 years agoMerge "SpecialWatchlist: Remove random unnecessary `<hr>`"
jenkins-bot [Fri, 4 Dec 2015 17:26:33 +0000 (17:26 +0000)]
Merge "SpecialWatchlist: Remove random unnecessary `<hr>`"

8 years agoMerge "Use normal space instead of &#160; in "white-space: nowrap"
jenkins-bot [Fri, 4 Dec 2015 17:16:06 +0000 (17:16 +0000)]
Merge "Use normal space instead of &#160; in "white-space: nowrap"

8 years agoMerge "Extracted some code from PrefixSearch for re-usability by other search engines."
jenkins-bot [Fri, 4 Dec 2015 16:56:39 +0000 (16:56 +0000)]
Merge "Extracted some code from PrefixSearch for re-usability by other search engines."

8 years agoChange wording of 'wlshowtime' for ease of localisation
Bartosz Dziewoński [Fri, 4 Dec 2015 16:38:26 +0000 (17:38 +0100)]
Change wording of 'wlshowtime' for ease of localisation

Bug: T119245
Change-Id: Ib6ecf28696ca6f1063ac6973a66083363090086c

8 years agoSpecialWatchlist: Remove random unnecessary `<hr>`
Bartosz Dziewoński [Fri, 4 Dec 2015 16:39:53 +0000 (17:39 +0100)]
SpecialWatchlist: Remove random unnecessary `<hr>`

Change-Id: I7ebe73ae0773a4bfc52c02fdc0cd028913b044b3

8 years agoSpecialWatchlist: Add an option to automatically reload the page when a filter was...
Florian [Sat, 28 Nov 2015 15:10:33 +0000 (16:10 +0100)]
SpecialWatchlist: Add an option to automatically reload the page when a filter was changed

The biggest negative point (as far as I can tell) with the change mentioned in the follow-up
is, that a user needs at least 3 clicks to change an option, which before it required only
one click. This option adds a new preference for the watchlist (which can be enabled/disabled
using Special:Preferences) which, if enabled, loads a new, tiny module with a script, that
listens on all input and select fields in the header form of Special:Watchlist. Whenever one
of these elements get changed, the watchlist form will be submitted automatically.

The default for this option is false (disabled).

Follow up: I3bcd27596c21aa4

Bug: T50615
Bug: T119322
Change-Id: Icab1a5143df24a06f468165421d40db8fa57e73c

8 years agoFix categories with a namespace prefix in the cat name for CatWatch
addshore [Fri, 4 Dec 2015 11:03:44 +0000 (12:03 +0100)]
Fix categories with a namespace prefix in the cat name for CatWatch

Title::newFromText will use the given namespace as default, but when
parsing a title with a namespace at the begin the method will not use
the default, instead used the namespace from the given text.
Use Title::makeTitle to create a title with always belongs to the given
namespace.

Bug: T119763
Change-Id: Ic96671e1c33c6572b07f0f859d97c85a7a15bd39

8 years agoMerge "Fix CatMemberChanges for numeric category names"
jenkins-bot [Fri, 4 Dec 2015 10:57:26 +0000 (10:57 +0000)]
Merge "Fix CatMemberChanges for numeric category names"

8 years agoMerge "Move category membership RC updates to CategoryMembershipChangeJob"
jenkins-bot [Fri, 4 Dec 2015 10:56:12 +0000 (10:56 +0000)]
Merge "Move category membership RC updates to CategoryMembershipChangeJob"

8 years agoAdd warning comment on formatLinksInComment
csteipp [Fri, 4 Dec 2015 00:12:41 +0000 (16:12 -0800)]
Add warning comment on formatLinksInComment

Bug: T120324
Change-Id: If4423e14737a7e9d80661da27ad6f5463798a7d7