lhc/web/wiklou.git
6 years agoNew maintenance script to recalculate category membership counts
This, that and the other [Thu, 26 Jan 2017 11:39:30 +0000 (22:39 +1100)]
New maintenance script to recalculate category membership counts

The category membership counts stored in the category table have a habit of
drifting away from the actual number of pages in the category. This script
identifies incorrectly-counted categories by performing a SELECT on the
replica DB, then querying master for up-to-date counts and updating the
category rows with those counts.

It's possible that a LinksUpdate job will be in progress while this script
is run. LinksUpdate does categorylinks INSERTs and category UPDATEs in
separate transactions, and our count might occur in between, leading to
category values that are slightly off. But since we are only updating
categories with already incorrect counts, we are not making the situation
any worse than it already was.

The script runs reasonably quickly on all but the very largest wikis.

Bug: T18765
Change-Id: I555f068fbf3aee20a7775d5532781f421f706346

7 years agoMerge "mw.notification: Re-implement autoHideSeconds as string preset option"
jenkins-bot [Sun, 22 Jan 2017 07:58:54 +0000 (07:58 +0000)]
Merge "mw.notification: Re-implement autoHideSeconds as string preset option"

7 years agomw.notification: Re-implement autoHideSeconds as string preset option
Timo Tijhof [Fri, 20 Jan 2017 03:25:59 +0000 (03:25 +0000)]
mw.notification: Re-implement autoHideSeconds as string preset option

Instead of allowing freeform number values, make it a preset-based
string where pre-defined values are encouraged.

A numerical override is still possible by creating a new preset,
but this undocumented/private for now.

Follows-up 4b9992a0, which added this option. No usage found
as of yet in Wikimedia Git, thus no deprecation/back-compat.

Also:
* Unbreaks `#autoHideSeconds` reference in #autoHideLimit doc.
* Improve wording of #autoHideLimit doc.

Bug: T155228
Change-Id: Id84d8b616fe26b9976263f4bd6bdc70cc8a539ba

7 years agoParser: Trim leading whitespace from links before checking for leading :
This, that and the other [Tue, 27 Dec 2016 09:51:50 +0000 (20:51 +1100)]
Parser: Trim leading whitespace from links before checking for leading :

The leading spaces on the link only cause us problems, such as for the
$noforce check 20 lines later.

Bug: T129218
Change-Id: I93a8da1f73b38fa3da362f8f27479b3039ed3f13

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 21 Jan 2017 20:54:02 +0000 (21:54 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I846c7cf640fe159540ba25c6abfdce30b9dc5351

7 years agoMerge "Revert "Added reason suggestion in block/delete/protect forms""
jenkins-bot [Sat, 21 Jan 2017 19:47:27 +0000 (19:47 +0000)]
Merge "Revert "Added reason suggestion in block/delete/protect forms""

7 years agoMerge "SpecialMIMEsearch: Add a dropdown with input suggestions"
jenkins-bot [Sat, 21 Jan 2017 19:44:34 +0000 (19:44 +0000)]
Merge "SpecialMIMEsearch: Add a dropdown with input suggestions"

7 years agoMerge "Replaced all deprecated Linker methods with proper ones in core(1)"
jenkins-bot [Sat, 21 Jan 2017 19:33:09 +0000 (19:33 +0000)]
Merge "Replaced all deprecated Linker methods with proper ones in core(1)"

7 years agoRevert "Added reason suggestion in block/delete/protect forms"
Florianschmidtwelzow [Sat, 21 Jan 2017 18:54:21 +0000 (18:54 +0000)]
Revert "Added reason suggestion in block/delete/protect forms"

See the task, this was probably entirely my fault not having
looked at this more carefully. Technically the change is ok,
however, it seems to doesn't make much sense in combination
with the Reason dropdown box.

This reverts commit faab2411c29a2ad0851c596f1cadfec1d7e06892.

Task: T34950
Change-Id: I1eeb9c68ff0db20d29e7d5f0fb18f0bfa3224416

7 years agoMerge "BlockLogFormatter: Durations are relative to block's timestamp, not Unix epoch"
jenkins-bot [Sat, 21 Jan 2017 18:54:54 +0000 (18:54 +0000)]
Merge "BlockLogFormatter: Durations are relative to block's timestamp, not Unix epoch"

7 years agoFix typo in README
TTO [Sat, 21 Jan 2017 03:57:03 +0000 (03:57 +0000)]
Fix typo in README

Change-Id: If32667e5e41d924f14ad803c470a21cd54f3f17b

7 years agoMerge "ApiErrorFormatter_BackCompat: Use first error, not last"
jenkins-bot [Sat, 21 Jan 2017 03:35:19 +0000 (03:35 +0000)]
Merge "ApiErrorFormatter_BackCompat: Use first error, not last"

7 years agoMerge "Remove unused fields in SpecialUnusedimages query"
jenkins-bot [Sat, 21 Jan 2017 01:19:06 +0000 (01:19 +0000)]
Merge "Remove unused fields in SpecialUnusedimages query"

7 years agoMerge "Special:Upload should not crash on failing previews"
jenkins-bot [Fri, 20 Jan 2017 20:53:03 +0000 (20:53 +0000)]
Merge "Special:Upload should not crash on failing previews"

7 years agoSpecial:Upload should not crash on failing previews
Derk-Jan Hartman [Thu, 19 Jan 2017 19:49:55 +0000 (11:49 -0800)]
Special:Upload should not crash on failing previews

A thumbnail transformation can fail, but the preview on Special:Upload
was not accounting for failed previews and caused a stacktrace on
accessing getUrl on 'false'.

Bug: T155771
Change-Id: Iff3a2ae3512a34a2d2efb981b7ea85da71aaf637

7 years agoMerge "Added release notes for 'ContentHandler::runLegacyHooks' removal"
jenkins-bot [Fri, 20 Jan 2017 20:13:01 +0000 (20:13 +0000)]
Merge "Added release notes for 'ContentHandler::runLegacyHooks' removal"

7 years agoMerge "Add small script for common job queue admin tasks"
jenkins-bot [Fri, 20 Jan 2017 20:12:57 +0000 (20:12 +0000)]
Merge "Add small script for common job queue admin tasks"

7 years agoAdded release notes for 'ContentHandler::runLegacyHooks' removal
rlot [Fri, 20 Jan 2017 19:51:14 +0000 (20:51 +0100)]
Added release notes for 'ContentHandler::runLegacyHooks' removal

Bug: T154498
Change-Id: I37402478beaac1848feff2ed95e97bebbec5cee0

7 years agoMerge "Update docs/hooks.txt for ShowSearchHitTitle"
jenkins-bot [Fri, 20 Jan 2017 14:30:26 +0000 (14:30 +0000)]
Merge "Update docs/hooks.txt for ShowSearchHitTitle"

7 years agoMerge "Fix Selenium tests"
jenkins-bot [Fri, 20 Jan 2017 13:28:11 +0000 (13:28 +0000)]
Merge "Fix Selenium tests"

7 years agoFix Selenium tests
Željko Filipin [Thu, 19 Jan 2017 16:17:01 +0000 (17:17 +0100)]
Fix Selenium tests

The tests were broken because the feedback meesage is no longer
displayed as part of the page, but using HTML5 `required` attribute.

Bug: T155640
Change-Id: I9c46db374ec7f50262f84d721a21110aa6e81699

7 years agoReplaced all deprecated Linker methods with proper ones in core(1)
Yuriy Shnitkovskiy [Wed, 18 Jan 2017 20:55:20 +0000 (22:55 +0200)]
Replaced all deprecated Linker methods with proper ones in core(1)

Change-Id: Ie3a718dc1eae1507f8829fcf419c64c6846d2cb6

7 years agoUpdate docs/hooks.txt for ShowSearchHitTitle
Thiemo Mättig [Fri, 20 Jan 2017 09:40:28 +0000 (10:40 +0100)]
Update docs/hooks.txt for ShowSearchHitTitle

Reasons:
* $text is vague. It's the label of the link. There is a function named
  getTitleSnippet, which is what I'm reusing for the variable name.
* $page is vague. It's not the page of the search result, but the search
  special page.
* $queryString is not a string but an array of strings.

I also updated https://www.mediawiki.org/wiki/Manual:Hooks/ShowSearchHitTitle
accordingly.

Change-Id: Ia18dbf5ccf7f9fcc8890ad01641d0b7ff3e6eee8

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 20 Jan 2017 07:32:07 +0000 (08:32 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Id4e35d1705d767dfd1130533acfb0d721cc5829e

7 years agoMerge "Make most of DateFormatter private"
jenkins-bot [Thu, 19 Jan 2017 22:53:57 +0000 (22:53 +0000)]
Merge "Make most of DateFormatter private"

7 years agoMerge "SpecialContributions: Username input is not really required"
jenkins-bot [Thu, 19 Jan 2017 21:39:32 +0000 (21:39 +0000)]
Merge "SpecialContributions: Username input is not really required"

7 years agoMake most of DateFormatter private
Max Semenik [Wed, 18 Jan 2017 19:01:26 +0000 (11:01 -0800)]
Make most of DateFormatter private

As discussed in https://gerrit.wikimedia.org/r/#/c/332702/ , these
methods and fields shouldn't have been marked public in the first place.
No outside users. Also, declare a couple of fields and remove unused ones.

Change-Id: I7775978c87d983784a484ee2ad901d25c42499b3

7 years agoSpecialContributions: Username input is not really required
Bartosz Dziewoński [Thu, 19 Jan 2017 21:29:08 +0000 (22:29 +0100)]
SpecialContributions: Username input is not really required

Bug: T155780
Change-Id: If5cd6867029c005cf56a1628efc239955cd49931

7 years agoMerge "Remove unused $resourceLoader"
jenkins-bot [Thu, 19 Jan 2017 21:07:36 +0000 (21:07 +0000)]
Merge "Remove unused $resourceLoader"

7 years agoRemove unused $resourceLoader
addshore [Thu, 19 Jan 2017 20:51:22 +0000 (20:51 +0000)]
Remove unused $resourceLoader

Change-Id: I6b5aebe2c6221ee101ec3bc4c84eafd9aeb7b0e2

7 years agoresources: Update OOjs UI with fixes on top of v0.18.4 (master)
James D. Forrester [Thu, 19 Jan 2017 20:33:18 +0000 (12:33 -0800)]
resources: Update OOjs UI with fixes on top of v0.18.4 (master)

Cherry-picked fixes:

be46e1773cd0f6b04510c325054d49835714b5f3
629389a777b35d131289a12cecf986e52ff65534
92dcdcf5351f6d499624d247b2a3ebff66346aca
f991c382ce3dd80ed3498bb09e81885b94f8795e

Bug: T155711
Bug: T155728
Change-Id: I741db3a17eec812b50b4befcc7eba603943b759c

7 years agoSpecialMIMEsearch: Add a dropdown with input suggestions
Bartosz Dziewoński [Thu, 19 Jan 2017 19:56:47 +0000 (20:56 +0100)]
SpecialMIMEsearch: Add a dropdown with input suggestions

I think people usually distinguish file types by their extensions.
We shouldn't expect them to know what the valid values are here.

Change-Id: I854d48494e7b8c5eb1f49e364c5300df5cd73fe9

7 years agoMerge "Un-blacklist PhanUndeclaredVariable"
jenkins-bot [Thu, 19 Jan 2017 19:00:57 +0000 (19:00 +0000)]
Merge "Un-blacklist PhanUndeclaredVariable"

7 years agoMerge "Use HTTPS instead of HTTP for Amazon"
jenkins-bot [Thu, 19 Jan 2017 18:46:46 +0000 (18:46 +0000)]
Merge "Use HTTPS instead of HTTP for Amazon"

7 years agoHTMLTextField: Set the 'dir' attribute in OOUI mode
Bartosz Dziewoński [Thu, 19 Jan 2017 15:19:27 +0000 (16:19 +0100)]
HTMLTextField: Set the 'dir' attribute in OOUI mode

Bug: T153636
Change-Id: I7ddf6a358f8150ef252d8d8e76661fe1eb93a790

7 years agoUse HTTPS instead of HTTP for Amazon
Fomafix [Thu, 19 Jan 2017 13:24:48 +0000 (14:24 +0100)]
Use HTTPS instead of HTTP for Amazon

This change is performed using:

sed -i -e 's/http:\/\/www.amazon/https:\/\/www.amazon/g' languages/messages/Messages*.php

Change-Id: I22c5e7a8d33a80b8cbe814f9735e7c24f1b004f9

7 years agoMerge "Use parsed HTML error responses instead of api-error-*"
jenkins-bot [Thu, 19 Jan 2017 09:59:33 +0000 (09:59 +0000)]
Merge "Use parsed HTML error responses instead of api-error-*"

7 years agoMerge "Add deprecated annotation to Article::doEditContent()"
jenkins-bot [Thu, 19 Jan 2017 06:50:21 +0000 (06:50 +0000)]
Merge "Add deprecated annotation to Article::doEditContent()"

7 years agoMerge "Add more $wgPoolCounterConf comments"
jenkins-bot [Thu, 19 Jan 2017 03:54:49 +0000 (03:54 +0000)]
Merge "Add more $wgPoolCounterConf comments"

7 years agoMerge "Update tests/phpunit/MediaWikiTestCase.php with support for apcu"
jenkins-bot [Thu, 19 Jan 2017 03:54:42 +0000 (03:54 +0000)]
Merge "Update tests/phpunit/MediaWikiTestCase.php with support for apcu"

7 years agoAdd deprecated annotation to Article::doEditContent()
Reedy [Thu, 19 Jan 2017 03:54:08 +0000 (03:54 +0000)]
Add deprecated annotation to Article::doEditContent()

Change-Id: I5a15b22c8b12fe77105fbd31427e8a15cde327c6

7 years agoUpdate tests/phpunit/MediaWikiTestCase.php with support for apcu
Paladox [Wed, 12 Oct 2016 14:39:46 +0000 (15:39 +0100)]
Update tests/phpunit/MediaWikiTestCase.php with support for apcu

Change-Id: I22d54e96c2c002ea53dabfd2772d2ba4c7eb96b1

7 years agoMark Article::doEditContent() as deprecated
Reedy [Thu, 19 Jan 2017 02:56:16 +0000 (02:56 +0000)]
Mark Article::doEditContent() as deprecated

Bug: T155696
Change-Id: Ie91b428f3a5992ba85c6ca2b2909953d8fce139b

7 years agoRemove deprecated Parser::replaceUnusualEscapes()
Max Semenik [Fri, 23 Dec 2016 01:31:49 +0000 (17:31 -0800)]
Remove deprecated Parser::replaceUnusualEscapes()

Deprecated since 1.24, no callers.

Change-Id: Ib780f1a7b77d3ce624112f59c8e57820fecb6bf2

7 years agoRemove unused fields in SpecialUnusedimages query
Timo Tijhof [Thu, 19 Jan 2017 02:48:38 +0000 (02:48 +0000)]
Remove unused fields in SpecialUnusedimages query

None of img_user, img_user_text, or img_description are used
by UnusedimagesPage nor ImageQueryPage.

Change-Id: Id0fdac9ac37eef097e8ca9f7bf3d66ef10bb83c2

7 years agoRemove deprecated function Article::doEdit() and WikiPage::doEdit()
Subin Siby [Tue, 27 Dec 2016 13:48:16 +0000 (19:18 +0530)]
Remove deprecated function Article::doEdit() and WikiPage::doEdit()

Bug: T61113
Bug: T154498
Change-Id: Ie6c1bb4ee5ee45ac2db432877a7038659231c091

7 years agoRevision::getText() was removed
Reedy [Thu, 19 Jan 2017 01:57:38 +0000 (01:57 +0000)]
Revision::getText() was removed

Bug: T154498
Change-Id: I29dcf768a9c176ca27b94359ac99cdc2b5ea930b

7 years agoArticle::getContent() was removed
Reedy [Thu, 19 Jan 2017 01:49:07 +0000 (01:49 +0000)]
Article::getContent() was removed

Bug: T154498
Change-Id: I27956d494cf19d1204988807130b43f77186db9b

7 years agomediawiki.rcfilters: Add the remaining MW core filters
Roan Kattouw [Fri, 6 Jan 2017 23:51:22 +0000 (15:51 -0800)]
mediawiki.rcfilters: Add the remaining MW core filters

Add JSON definitions and i18n messages.

Bug: T149452
Change-Id: I287e9e5db9ff625bde026056efc81ce4b2401607

7 years agoAdd more $wgPoolCounterConf comments
Aaron Schulz [Thu, 19 Jan 2017 00:27:17 +0000 (16:27 -0800)]
Add more $wgPoolCounterConf comments

Change-Id: Ic7b376dcada2b58a2f2ddc13b79e392e9d4fae6f

7 years agoAdd small script for common job queue admin tasks
Aaron Schulz [Thu, 19 Jan 2017 00:02:16 +0000 (16:02 -0800)]
Add small script for common job queue admin tasks

This can handle dropping queued and re-enqueueing abandoned jobs.
Also use the DB cache table to avoid re-enqueuing duplicate jobs
if this has to get used several times for a queue during a week.

Change-Id: Ib56cf57e56f03ce6f1c4b52e3e36f228413c1056

7 years agoMerge "Unbreak extensions using SpecialSearchResults hook"
jenkins-bot [Wed, 18 Jan 2017 22:44:01 +0000 (22:44 +0000)]
Merge "Unbreak extensions using SpecialSearchResults hook"

7 years agoMerge "Unbreak extensions from ShowSearchHitTitle signature change"
jenkins-bot [Wed, 18 Jan 2017 22:22:43 +0000 (22:22 +0000)]
Merge "Unbreak extensions from ShowSearchHitTitle signature change"

7 years agoUnbreak extensions using SpecialSearchResults hook
Chad Horohoe [Wed, 18 Jan 2017 22:21:36 +0000 (14:21 -0800)]
Unbreak extensions using SpecialSearchResults hook

Changing hook signatures with no deprecation period is a no-no.

Fixes Ib527fc3a3c39eb2e56985e5d1e4905fc4562353c
Reverts I153a7d590faceb1e2c4fe7d95a5cb931cda0c301

Bug: T155625
Change-Id: I2b408691fc4435ef24fc62360bd7ad6114f385c7

7 years agoMerge "Avoid fatal error with FlaggedRevs when running rebuildFileCache.php"
jenkins-bot [Wed, 18 Jan 2017 22:22:39 +0000 (22:22 +0000)]
Merge "Avoid fatal error with FlaggedRevs when running rebuildFileCache.php"

7 years agoUnbreak extensions from ShowSearchHitTitle signature change
Chad Horohoe [Wed, 18 Jan 2017 22:05:45 +0000 (14:05 -0800)]
Unbreak extensions from ShowSearchHitTitle signature change

Fixes If78cb0c29ae394f16e465c15a8e8246c1b56dcea

Change-Id: Ia56f2eb4a5ed98f727f924666322e1c97b3ee183

7 years agoRemoved deprecated ContentHandler hooks.
rlot [Sun, 15 Jan 2017 18:49:28 +0000 (19:49 +0100)]
Removed deprecated ContentHandler hooks.

Plus removed unused "ContentHandler::runLegacyHooks"

Bug: T154498
Change-Id: Ie398fd4e06d3e286fe8e24112d0c8b4ac7d883dc

7 years agoUn-blacklist PhanUndeclaredVariable
Erik Bernhardson [Wed, 18 Jan 2017 00:48:59 +0000 (16:48 -0800)]
Un-blacklist PhanUndeclaredVariable

Undeclared variables are a very common error type that we want to catch
as often as possible. To avoid needing to refactor a variety of global
level code (mostly in old-style maintenance scripts) this ignores
undeclared variables in global scope. This is still a good improvement
over what was happening previously.

Change-Id: I50b41d571724244552074b9408abbdf6160aca59

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 18 Jan 2017 20:55:10 +0000 (21:55 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I2ce862aae175fb1287086106a1fefb3e31de488b

7 years agoMerge "Remove deprecated mediawiki.UI Less variables"
jenkins-bot [Wed, 18 Jan 2017 19:25:26 +0000 (19:25 +0000)]
Merge "Remove deprecated mediawiki.UI Less variables"

7 years agoMerge "Remove deprecated `.mw-ui-constructive` class for text and anchors"
jenkins-bot [Wed, 18 Jan 2017 19:23:04 +0000 (19:23 +0000)]
Merge "Remove deprecated `.mw-ui-constructive` class for text and anchors"

7 years agoMerge "OutputPage: Ignore protocol-relative urls in transformResourcePath()"
jenkins-bot [Wed, 18 Jan 2017 18:43:32 +0000 (18:43 +0000)]
Merge "OutputPage: Ignore protocol-relative urls in transformResourcePath()"

7 years agoMerge "tests: Add unit tests for OutputPage::transformResourcePath"
jenkins-bot [Wed, 18 Jan 2017 18:27:32 +0000 (18:27 +0000)]
Merge "tests: Add unit tests for OutputPage::transformResourcePath"

7 years agoOutputPage: Ignore protocol-relative urls in transformResourcePath()
Timo Tijhof [Wed, 18 Jan 2017 06:07:05 +0000 (06:07 +0000)]
OutputPage: Ignore protocol-relative urls in transformResourcePath()

transformResourcePath is only supposed to be called with something
that starts with a '/' (absolute path from document root).

While the primary caller (CSSMin) only calls this method if the path
makes sense as a local file path, ResourceLoaderSkinModule did not,
and wgLogo may be set to a full url that includes a domain.

While chance made it so that protocol-including urls were already
discarded, protocol-relative urls were mistaken for being a path
inside the file system root with a duplicate slash (e.g.
'//tmp/foo.txt', as 'foo.txt' in /fmp, instead of '/foo.txt' at
http://tmp).

This should be fixed upstream in the wikimedia/relpath library,
but workaround it for now since it really shouldn't be called
with urls in the first place.

Bug: T155310
Change-Id: I9b063f1219ddeca5cc2c8a48832cdf8c9eaffe58

7 years agoMerge "Tweak formatting of 'restrictionsfield-help'"
jenkins-bot [Wed, 18 Jan 2017 16:14:52 +0000 (16:14 +0000)]
Merge "Tweak formatting of 'restrictionsfield-help'"

7 years agoBlockLogFormatter: Durations are relative to block's timestamp, not Unix epoch
Bartosz Dziewoński [Wed, 18 Jan 2017 13:08:28 +0000 (14:08 +0100)]
BlockLogFormatter: Durations are relative to block's timestamp, not Unix epoch

Also fixed legacy code in LogFormatter producing messages for IRC feed.

Bug: T55907
Change-Id: I0df19574f74210a91ce72c79188b6618f04ef9a2

7 years agoMerge "Pass the language code to the MessagesPreLoad hook"
jenkins-bot [Wed, 18 Jan 2017 08:00:48 +0000 (08:00 +0000)]
Merge "Pass the language code to the MessagesPreLoad hook"

7 years agoAvoid fatal error with FlaggedRevs when running rebuildFileCache.php
Aaron Schulz [Wed, 18 Jan 2017 06:10:03 +0000 (22:10 -0800)]
Avoid fatal error with FlaggedRevs when running rebuildFileCache.php

Change-Id: I8d335c64cfc74a227528fbd85d333eaaa8157f41

7 years agotests: Add unit tests for OutputPage::transformResourcePath
Timo Tijhof [Wed, 18 Jan 2017 05:58:46 +0000 (05:58 +0000)]
tests: Add unit tests for OutputPage::transformResourcePath

Bug: T155310
Change-Id: Ic5a4af705c3734a7992037e59dc43fafe447ba12

7 years agoMerge "RCFilters: Clean up focus handling in capsule widget"
jenkins-bot [Wed, 18 Jan 2017 01:45:21 +0000 (01:45 +0000)]
Merge "RCFilters: Clean up focus handling in capsule widget"

7 years agoTweak formatting of 'restrictionsfield-help'
Bartosz Dziewoński [Wed, 18 Jan 2017 01:25:16 +0000 (02:25 +0100)]
Tweak formatting of 'restrictionsfield-help'

`<pre>` looks better for multiline code blocks than `<code>`.

Before: https://phabricator.wikimedia.org/F5302938
After: https://phabricator.wikimedia.org/F5302939

Change-Id: I1a180fee5e635e5f08c6730a9c390d7c4325ff9d

7 years agoRCFilters: Clean up focus handling in capsule widget
Roan Kattouw [Fri, 6 Jan 2017 23:59:48 +0000 (15:59 -0800)]
RCFilters: Clean up focus handling in capsule widget

Don't let the parent class's weird implementation run when the
widget is focused through other code paths (e.g. clicking on
the non-input part of it).

We still need to fix the behavior when you click in the
input twice (the first click shows the popup and the second
click hides it), but this is much better already.

Related to I21b8cff4048 in oojs-ui.

Bug: T149452
Change-Id: I08743c64ea32feace757e2a8626df2f5310cfbc9

7 years agoMerge "Update OOjs UI to v0.18.4"
jenkins-bot [Wed, 18 Jan 2017 01:13:32 +0000 (01:13 +0000)]
Merge "Update OOjs UI to v0.18.4"

7 years agoUpdate OOjs UI to v0.18.4
James D. Forrester [Wed, 18 Jan 2017 00:12:07 +0000 (16:12 -0800)]
Update OOjs UI to v0.18.4

Release notes:
 https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.18.4

Change-Id: I09eacfe7597b26e33ef50e606afcee0cefca1d1c

7 years agoExtract 'did you mean' widget out of SpecialSearch
Erik Bernhardson [Mon, 28 Nov 2016 21:59:03 +0000 (13:59 -0800)]
Extract 'did you mean' widget out of SpecialSearch

Bug: T150390
Change-Id: I41d767550ab4112fcd9cc4094b27a14c7d29169b

7 years agoExtract main search result rendering from SpecialSearch
Erik Bernhardson [Wed, 16 Nov 2016 23:41:16 +0000 (15:41 -0800)]
Extract main search result rendering from SpecialSearch

Has a pre-existing problem related to the link offset of secondary
inline results. Specifically the offset of secondary inline starts
at the provided offset, even though there may be primary results
displayed above it.

Bug: T150390
Change-Id: Id1d6b357f45a2cf615d9412cc95dd597c724e8b6

7 years agoMerge "SpecialSearchResults hooks does not use by-ref anymore"
jenkins-bot [Tue, 17 Jan 2017 23:50:03 +0000 (23:50 +0000)]
Merge "SpecialSearchResults hooks does not use by-ref anymore"

7 years agoMerge "Extract search form from SpecialSearch into widget"
jenkins-bot [Tue, 17 Jan 2017 23:32:29 +0000 (23:32 +0000)]
Merge "Extract search form from SpecialSearch into widget"

7 years agoExtract search form from SpecialSearch into widget
Erik Bernhardson [Wed, 16 Nov 2016 00:10:33 +0000 (16:10 -0800)]
Extract search form from SpecialSearch into widget

Bug: T150390
Change-Id: Ibda84349e1f552641805d6236605c8718540817f

7 years agoMerge "Cleanup execution flow through SpecialSearch::execute()"
jenkins-bot [Tue, 17 Jan 2017 22:57:42 +0000 (22:57 +0000)]
Merge "Cleanup execution flow through SpecialSearch::execute()"

7 years agoSpecialSearchResults hooks does not use by-ref anymore
Stanislav Malyshev [Tue, 17 Jan 2017 22:51:51 +0000 (14:51 -0800)]
SpecialSearchResults hooks does not use by-ref anymore

In general, there's no reason to use by-ref on objects unless
the hook is supposed to replace them (this one isn't).

Change-Id: I153a7d590faceb1e2c4fe7d95a5cb931cda0c301

7 years agoMerge "Add test case for Opus file check"
jenkins-bot [Tue, 17 Jan 2017 21:57:53 +0000 (21:57 +0000)]
Merge "Add test case for Opus file check"

7 years agoCleanup execution flow through SpecialSearch::execute()
Erik Bernhardson [Tue, 15 Nov 2016 01:11:43 +0000 (17:11 -0800)]
Cleanup execution flow through SpecialSearch::execute()

Not a big change, but makes it so there is only one path into
SpecialSearch::showResults(). Makes things a little easier to follow.
Also moves the code for checking if full text search is disabled into
execute(), makes sense to check before even trying to make a search
engine. Also moves some setup code out of execute and into the setupPage
function

Bug: T150393
Change-Id: Ib527fc3a3c39eb2e56985e5d1e4905fc4562353c

7 years agoAdd test case for Opus file check
Brion Vibber [Tue, 17 Jan 2017 21:23:02 +0000 (13:23 -0800)]
Add test case for Opus file check

Test case for Opus file check so we don't regress!
Confirms the fix for T151352 that Opus files return
type 'audio' and not 'multimedia'.

Bug: T151352
Change-Id: Ib868793d90b60609ccec25726e6fbaa28bffebaf

7 years agoMerge "fix line length warnings from Jenkins"
jenkins-bot [Tue, 17 Jan 2017 21:02:07 +0000 (21:02 +0000)]
Merge "fix line length warnings from Jenkins"

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 17 Jan 2017 20:53:37 +0000 (21:53 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: If5b73fd92e39b1d19c581109a09b1b18600beb79

7 years agoMerge "Special case opus mime detction"
jenkins-bot [Tue, 17 Jan 2017 18:51:15 +0000 (18:51 +0000)]
Merge "Special case opus mime detction"

7 years agoUse parsed HTML error responses instead of api-error-*
Matthias Mullie [Sun, 8 Jan 2017 19:10:34 +0000 (20:10 +0100)]
Use parsed HTML error responses instead of api-error-*

There is no point in keeping these api-error- messages.
They were originally introduced in UploadWizard, then moved
to core, where nothing else (apart from some in BookletLayout)
uses them. They are mostly duplicates of other messages in
core, and these are very easy to miss when updating a message
in core.

Instead of building the messages on the frontend, we're much
better off requesting a parsed error response from the API
right away. This also lets us get rid of sime hacks (e.g. for
AbuseFilter)

And then a few other api-error-* messages have been removed
in favor of their alternatives (which are also used elsewhere)

And stashfailed is not a warning. Maybe it was at some point,
but stashfailed now dies with an error.

Bug: T47843
Change-Id: I41d88e2aad308a1fecd10d97085345a17d0c3603

7 years agoApiErrorFormatter_BackCompat: Use first error, not last
Brad Jorsch [Tue, 17 Jan 2017 15:51:27 +0000 (10:51 -0500)]
ApiErrorFormatter_BackCompat: Use first error, not last

Before Iae0e2ce3b, the only place in the API that had to deal with
choosing from multiple errors was ApiBase::dieStatus(), which chose the
first one in the Status object. Iae0e2ce3b changed this to choose the
last one instead, which is an unnecessary backwards compatibility break.

While we could make the change in ApiBase::dieStatus(), it's cleaner to
change ApiErrorFormatter_BackCompat's behavior instead since it seems
unlikely anything else was using that code path.

Bug: T155268
Change-Id: Ia06527f8480c3d4a689792ceb8671b0d399ffbe3

7 years agoMerge "Remove trailing empty lines in PHP"
jenkins-bot [Tue, 17 Jan 2017 10:54:13 +0000 (10:54 +0000)]
Merge "Remove trailing empty lines in PHP"

7 years agoTypofix: Categorie -> Category
Chad Horohoe [Tue, 17 Jan 2017 06:52:45 +0000 (22:52 -0800)]
Typofix: Categorie -> Category

Follows-up f81bb12266

Change-Id: I902522e8a3003cf7fa15c29208fdf7e45e4610f8

7 years agoMerge "Un-deprecate ArticleAfterFetchContentObject hook"
jenkins-bot [Tue, 17 Jan 2017 00:13:15 +0000 (00:13 +0000)]
Merge "Un-deprecate ArticleAfterFetchContentObject hook"

7 years agoRemove trailing empty lines in PHP
Fomafix [Mon, 16 Jan 2017 20:50:28 +0000 (21:50 +0100)]
Remove trailing empty lines in PHP

Performed using
find . -name \*.php -exec sed -i -e :a -e '/./,$!d;/^\n*$/{$d;N;};/\n$/ba' {} \;

Change-Id: I5d0627f94c73690cf3a8a453539c22c760c2aa60

7 years agomaintenance/importImages: Don't sleep after the last upload
Sébastien Santoro [Mon, 16 Jan 2017 15:14:34 +0000 (15:14 +0000)]
maintenance/importImages: Don't sleep after the last upload

Currently, the importImages maintenance script offers an option
to sleep an arbitrary amount of seconds after each upload.

The current logic implementation had a side effect to also sleep
after the last image upload. This is not a desired behavior, as
the tasks are done and a clean exit with a report are welcome.

Instead, sleep will now occur before the second upload and the
ones to follow.

Change-Id: Ia675f210582c3075e9b59b002a00cb1fc4b44cac

7 years agoMerge "Update .mailmap for the generation of CREDITS"
jenkins-bot [Mon, 16 Jan 2017 20:03:11 +0000 (20:03 +0000)]
Merge "Update .mailmap for the generation of CREDITS"

7 years agofix line length warnings from Jenkins
Mark A. Hershberger [Sat, 14 Jan 2017 20:20:03 +0000 (15:20 -0500)]
fix line length warnings from Jenkins

Example: https://integration.wikimedia.org/ci/job/mediawiki-core-phpcs-HEAD/15477/console

Change-Id: I80f5c2ec4de0c6c06f7084ed4cc8a2ec006f6f70

7 years agoMerge "mw.htmlform: Fix 'hide-if' disabling OOUI fields"
jenkins-bot [Mon, 16 Jan 2017 19:07:51 +0000 (19:07 +0000)]
Merge "mw.htmlform: Fix 'hide-if' disabling OOUI fields"

7 years agoFix Hebrew grammar transformation for letter He
Amire80 [Mon, 16 Jan 2017 18:07:14 +0000 (10:07 -0800)]
Fix Hebrew grammar transformation for letter He

It must only be transformed in the beginning of the word.

Change-Id: Iec6e2032775b9efd92cc2d649944f4892f813b24

7 years agoRedocumented $wgAutopromote
victorbarbu [Mon, 14 Dec 2015 09:15:35 +0000 (11:15 +0200)]
Redocumented $wgAutopromote

Completely rewritten the documentation of $wgAutopromote to make it
easier to understand.

Change-Id: I0746c09f7a97dd18feeb774643367fa1a0c09fd4

7 years agoMerge "Fix broken variable inclusions in API unblock parameter documentation"
jenkins-bot [Mon, 16 Jan 2017 13:11:55 +0000 (13:11 +0000)]
Merge "Fix broken variable inclusions in API unblock parameter documentation"