lhc/web/wiklou.git
6 years agoMerge "RCFilters: Preference length is in bytes, so use $.byteLength"
jenkins-bot [Wed, 13 Sep 2017 13:38:54 +0000 (13:38 +0000)]
Merge "RCFilters: Preference length is in bytes, so use $.byteLength"

6 years agoMerge "Skin.php: HTML escape message pipe-separator"
jenkins-bot [Wed, 13 Sep 2017 13:16:39 +0000 (13:16 +0000)]
Merge "Skin.php: HTML escape message pipe-separator"

6 years agoReplace more problematic uses of "SELECT *"
Brad Jorsch [Wed, 13 Sep 2017 12:13:02 +0000 (08:13 -0400)]
Replace more problematic uses of "SELECT *"

With the introduction of CommentStore, selects from various table
require certain joins or column aliases for proper operation.

Change-Id: I2ecb6030bf253664c3227d69b5ed2277596a83f0

6 years agoreplacing "images" by "files" in listfiles-show-all for consistency
Envel Le Hir [Wed, 13 Sep 2017 12:45:22 +0000 (14:45 +0200)]
replacing "images" by "files" in listfiles-show-all for consistency

Change-Id: I2adabce83df0b429809f8256f3ae333fd8a36902

6 years agoMove call of Sanitizer::decodeCharReferences from Skin to Parser
Fomafix [Wed, 13 Sep 2017 11:49:02 +0000 (13:49 +0200)]
Move call of Sanitizer::decodeCharReferences from Skin to Parser

Supporting HTML entities in Wikitext is part of the parser not of the
skin.

Change-Id: Ib30ff08f4f4ce585f31211aa24b719783f06456e

6 years agoSkin.php: HTML escape message pipe-separator
Fomafix [Wed, 13 Sep 2017 10:37:36 +0000 (12:37 +0200)]
Skin.php: HTML escape message pipe-separator

This prevents HTML and JavaScript injections.

Change-Id: I6241dadf29e96aa1aa15324a3edc51538214345d

6 years agoMerge "Linker: Accept LinkTargets in makeCommentLink()"
jenkins-bot [Wed, 13 Sep 2017 10:15:54 +0000 (10:15 +0000)]
Merge "Linker: Accept LinkTargets in makeCommentLink()"

6 years agoMerge "Linker: Accept LinkTarget objects in link()"
jenkins-bot [Wed, 13 Sep 2017 10:10:38 +0000 (10:10 +0000)]
Merge "Linker: Accept LinkTarget objects in link()"

6 years agoMerge "Linker: Don't use Title::setFragment()"
jenkins-bot [Wed, 13 Sep 2017 10:07:16 +0000 (10:07 +0000)]
Merge "Linker: Don't use Title::setFragment()"

6 years agoMerge "ImageHistoryPseudoPager: Don't use Title::setFragment()"
jenkins-bot [Wed, 13 Sep 2017 10:03:44 +0000 (10:03 +0000)]
Merge "ImageHistoryPseudoPager: Don't use Title::setFragment()"

6 years agoRCFilters: Preference length is in bytes, so use $.byteLength
Matthew Flaschen [Wed, 13 Sep 2017 02:22:33 +0000 (22:22 -0400)]
RCFilters: Preference length is in bytes, so use $.byteLength

Also, a minor fix to $.byteLength docs

Change-Id: I0f93edb0cb61a057da5ce0876b74cd17179c6587

6 years agoMerge "Fix coverage annotations"
jenkins-bot [Wed, 13 Sep 2017 06:51:53 +0000 (06:51 +0000)]
Merge "Fix coverage annotations"

6 years agoMerge "Use db query builder not raw sql"
jenkins-bot [Wed, 13 Sep 2017 00:03:58 +0000 (00:03 +0000)]
Merge "Use db query builder not raw sql"

6 years agoMerge "Quote $default in PostgresUpdater::setDefault"
jenkins-bot [Tue, 12 Sep 2017 23:46:29 +0000 (23:46 +0000)]
Merge "Quote $default in PostgresUpdater::setDefault"

6 years agoMerge "Remove @covers from private Sanitizer method"
jenkins-bot [Tue, 12 Sep 2017 23:43:51 +0000 (23:43 +0000)]
Merge "Remove @covers from private Sanitizer method"

6 years agoMerge "Chinese Conversion Table Update 2017-4"
jenkins-bot [Tue, 12 Sep 2017 23:38:11 +0000 (23:38 +0000)]
Merge "Chinese Conversion Table Update 2017-4"

6 years agoMerge "Split off remaining helper classes for special pages to separate files"
jenkins-bot [Tue, 12 Sep 2017 23:35:11 +0000 (23:35 +0000)]
Merge "Split off remaining helper classes for special pages to separate files"

6 years agoChinese Conversion Table Update 2017-4
Chiefwei [Thu, 17 Aug 2017 06:10:08 +0000 (14:10 +0800)]
Chinese Conversion Table Update 2017-4

Update the Chinese conversion table routinely to fix bugs reported from https://zh.wikipedia.org/wiki/Wikipedia:%E5%AD%97%E8%AF%8D%E8%BD%AC%E6%8D%A2/%E4%BF%AE%E5%A4%8D%E8%AF%B7%E6%B1%82 .

It is only data changes and only works for Chinese WikiProjects.

Change-Id: Ic66546d3a47e4dd946ae67c636a638ca181b0ca1

6 years agoUse db query builder not raw sql
Reedy [Tue, 12 Sep 2017 22:24:12 +0000 (23:24 +0100)]
Use db query builder not raw sql

Change-Id: I8e26932e28fdda9a52e0486c5d2eb269eb9ecae5
Follows-up: Ice1bdae3d16cf365da14c6df0e8d91d2b914e064

6 years agoMerge "postEdit: Use standard close icon"
jenkins-bot [Tue, 12 Sep 2017 22:14:13 +0000 (22:14 +0000)]
Merge "postEdit: Use standard close icon"

6 years agoSplit off remaining helper classes for special pages to separate files
Bartosz Dziewoński [Tue, 12 Sep 2017 21:03:26 +0000 (23:03 +0200)]
Split off remaining helper classes for special pages to separate files

includes/specials/formfields/
* EditWatchlistCheckboxSeriesField (for SpecialEditWatchlist)
* UploadSourceField                (for SpecialUpload)
* Licenses                         (for SpecialUpload)

includes/specials/forms/
* EditWatchlistNormalHTMLForm      (for SpecialEditWatchlist)
* PreferencesForm                  (for SpecialPreferences)
* UploadForm                       (for SpecialUpload)

includes/specials/helpers/
* ImportReporter                   (for SpecialImport)
* License                          (for SpecialUpload)

Change-Id: I58abcbb44dbf9bf1762b4252555f7552bfa7c253

6 years agoMerge "Enable recursive partials in TemplateParser"
jenkins-bot [Tue, 12 Sep 2017 20:08:47 +0000 (20:08 +0000)]
Merge "Enable recursive partials in TemplateParser"

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 12 Sep 2017 19:56:32 +0000 (21:56 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I23445b9466fb16491dc794c730e743a035cc5b17

6 years agoMerge "Reduce code duplication for parsing messages into dropdown menus"
jenkins-bot [Tue, 12 Sep 2017 19:35:26 +0000 (19:35 +0000)]
Merge "Reduce code duplication for parsing messages into dropdown menus"

6 years agoMerge "EditPage: Stop using $wgLang"
jenkins-bot [Tue, 12 Sep 2017 19:14:41 +0000 (19:14 +0000)]
Merge "EditPage: Stop using $wgLang"

6 years agoReduce code duplication for parsing messages into dropdown menus
Bartosz Dziewoński [Wed, 12 Jul 2017 19:31:33 +0000 (21:31 +0200)]
Reduce code duplication for parsing messages into dropdown menus

The same behavior was implemented by Xml::listDropDown(),
Article::confirmDelete() and HTMLFormField::getOptions().
A new function Xml::listDropDownOptions() is added and
all three are changed to use it.

Additionally:
* Xml::listDropDown() now uses XmlSelect internally to generate the
  dropdown HTML.
* Xml::listDropDownOptionsOoui() is introduced to handle converting
  the existing format to the OOUI format, which was previously
  duplicated in Article::confirmDelete() and HTMLFormField::getOptionsOOUI().
* This change allows HTMLForm 'select' fields (HTMLSelectField) to
  support nested options (optgroups) in OOUI mode. This is a
  prerequisite for T117781.

Bug: T117781
Change-Id: I0a088f61eb32ec59677113583c7ecdcbc3fd2af0

6 years agoEditPage: Stop using $wgLang
Kunal Mehta [Tue, 12 Sep 2017 18:31:43 +0000 (11:31 -0700)]
EditPage: Stop using $wgLang

Change-Id: Ifca2cdcff45b4e06aef6e06dc5a3b852752a7a1a

6 years agoEditPage: Rename and make getSubmitButtonLabel() protected
Kunal Mehta [Tue, 12 Sep 2017 18:17:20 +0000 (11:17 -0700)]
EditPage: Rename and make getSubmitButtonLabel() protected

Calling this method "SaveButton" is misleading since this function
controls whether the button is called "save" or "publish". The
corresponding config option (EditSubmitButtonLabelPublish) already uses
the terminology "SubmitButton" so re-use it here.

And make it protected so subclasses (e.g. TwoColConflict) can use it
instead of having to re-implement it.

Change-Id: Iae811f0487f661bb501a9893037c352efa4e1e73

6 years agoSync up with Parsoid parserTests.txt
Arlo Breault [Tue, 12 Sep 2017 17:50:11 +0000 (13:50 -0400)]
Sync up with Parsoid parserTests.txt

This now aligns with Parsoid commit c695317294087a691bad649237f9d86fbfce64c5

Change-Id: I6cb1eafcaf23846aba25714e6177c0e510c0b174

6 years agoRemove @covers from private Sanitizer method
Reedy [Tue, 12 Sep 2017 16:39:46 +0000 (17:39 +0100)]
Remove @covers from private Sanitizer method

Breaks mediawiki-core-code-coverage

https://integration.wikimedia.org/ci/job/mediawiki-core-code-coverage/3003/console

Change-Id: I3204289c1d45e5ea0bee5c4bb6869434152e6017

6 years agoJobQueueMemory: Actually return values in MappedIterator callback
Brad Jorsch [Tue, 12 Sep 2017 15:45:45 +0000 (11:45 -0400)]
JobQueueMemory: Actually return values in MappedIterator callback

Change-Id: Ie489d43ba3e9f4a10580716f38ec0f123d9ab5bb

6 years agoImprove flaky SiteStatsTest
Brad Jorsch [Tue, 12 Sep 2017 15:48:41 +0000 (11:48 -0400)]
Improve flaky SiteStatsTest

SiteStatsTest::testJobsCountGetCached() is somewhat flaky in that if it
runs after a test that adds a page (thereby producing htmlCacheUpdate
and recentChangesUpdate jobs) but doesn't have the CI framework reset
the `page` tables (which has the side effect of clearing all such jobs),
it will fail.

This change manually clears those jobs so it doesn't depend on test
ordering.

Change-Id: I1277e633c81b29bda7564fa12d23f13ded7298c7

6 years agoMerge "Update padding of mw-ui-input to match OOUI"
jenkins-bot [Tue, 12 Sep 2017 14:27:53 +0000 (14:27 +0000)]
Merge "Update padding of mw-ui-input to match OOUI"

6 years agoDo not double decode HTML entities for IDs
Fomafix [Mon, 2 May 2016 05:14:45 +0000 (05:14 +0000)]
Do not double decode HTML entities for IDs

* in links (T103714)
* in indicators (T104196)

This change removes the automatic Sanitizer::decodeCharReferences from
Sanitizer::escapeId and Sanitizer::escapeIdInternal. Where decoding of
HTML entities are wanted an explicit call to
Sanitizer::decodeCharReferences is added.

Explicit decode HTML entities in non local autocomments. (T104311)

Bug: T103714
Bug: T104196
Bug: T104311
Change-Id: I88e8e2077e6f5eec2b232391f7818370894a62dc

6 years agoUpdate padding of mw-ui-input to match OOUI
Ed Sanders [Tue, 12 Sep 2017 13:38:28 +0000 (14:38 +0100)]
Update padding of mw-ui-input to match OOUI

Change-Id: I85c7044666be41a9baa52e8f7ba019a96dac4a6b

6 years agoMerge "Port BCP47 formatter from PHP to JavaScript"
jenkins-bot [Tue, 12 Sep 2017 11:43:49 +0000 (11:43 +0000)]
Merge "Port BCP47 formatter from PHP to JavaScript"

6 years agoPort BCP47 formatter from PHP to JavaScript
Niklas Laxström [Thu, 7 Sep 2017 12:11:01 +0000 (14:11 +0200)]
Port BCP47 formatter from PHP to JavaScript

It can be accessed via mw.language.bcp47.
To be used in ContentTranslation, see T157212

Change-Id: I37d32ab8a55c7101b903b03869899f00a39afd11

6 years agoMerge "Replace autocomment color with WCAG conformant WikimediaUI palette one"
jenkins-bot [Tue, 12 Sep 2017 08:53:48 +0000 (08:53 +0000)]
Merge "Replace autocomment color with WCAG conformant WikimediaUI palette one"

6 years agoMerge "Sanity check "stashedtexthash" param before checking memcached"
jenkins-bot [Tue, 12 Sep 2017 08:53:45 +0000 (08:53 +0000)]
Merge "Sanity check "stashedtexthash" param before checking memcached"

6 years agoReplace autocomment color with WCAG conformant WikimediaUI palette one
Volker E [Tue, 12 Sep 2017 05:00:20 +0000 (22:00 -0700)]
Replace autocomment color with WCAG conformant WikimediaUI palette one

Replacing outdated `.autocomment` color with WCAG level AA conformant
one from WikimediaUI color palette and also replace `.wikitable`'s
color with normal text color. Black is to be used solely on emphasized
UI elements and we're remaining high contrast level.
Follow-up to Ide230784be654def9f120d5242d036f7423e65b2

Bug: T152025
Change-Id: I8e860b53481caf03e11f9bcdd836a80c3a2fc39f

6 years agoFix coverage annotations
Max Semenik [Tue, 12 Sep 2017 04:34:43 +0000 (21:34 -0700)]
Fix coverage annotations

Change-Id: I1f9b421a4ce55f1e0d4a81ed4a886aae20100fab

6 years agoMerge "Don't percent-encode HTML5 IDs"
jenkins-bot [Tue, 12 Sep 2017 01:38:59 +0000 (01:38 +0000)]
Merge "Don't percent-encode HTML5 IDs"

6 years agoDon't percent-encode HTML5 IDs
Max Semenik [Fri, 1 Sep 2017 00:48:42 +0000 (17:48 -0700)]
Don't percent-encode HTML5 IDs

During the TechCom meeting, it was decided this is the better way.

Bug: T152540

Change-Id: I6c3ec1c407225b4e925b7373bf52208e2f6b6c4a

6 years agoFix bug in dl-dt list output generation
Subramanya Sastry [Wed, 6 Sep 2017 22:47:54 +0000 (17:47 -0500)]
Fix bug in dl-dt list output generation

* An open <dt> (;) should be closed when we encounter a new <dd> (:)
  char even if it is on a new line that has other nested lists inside.

* Tidy was hiding this PHP parser bug by closing a <dt> and opening
  a <dd> when given this HTML: "<dl><dt>a<ul><li>b</li></ul></dt></dl>"
  It generates "<dl><dt>a</dt><dd><ul><li>b</li></ul></dd></dl>"

  However, a HTML5 parser like RemexHTML, domino (used by Parsoid),
  or browsers don't do this fixup.

* So, what I thought was a bug in RemexHTML turned out to be a bug
  in the PHP parser that was being hidden by the use of Tidy.

* Added a regression test.

Bug: T175099
Change-Id: I6d5b225b82cecf9a43f23837ed8ec359b31aadad

6 years agoMerge "Provide an opt-out preference for New Filters for RecentChanges"
jenkins-bot [Tue, 12 Sep 2017 00:30:13 +0000 (00:30 +0000)]
Merge "Provide an opt-out preference for New Filters for RecentChanges"

6 years agoRCFilters: Add an initialization hook
Moriel Schottlender [Sat, 9 Sep 2017 00:24:27 +0000 (17:24 -0700)]
RCFilters: Add an initialization hook

Change-Id: I9adc529bee0d5e25566409cc98f7bbac8178c478

6 years agoProvide an opt-out preference for New Filters for RecentChanges
James D. Forrester [Wed, 23 Aug 2017 21:30:20 +0000 (14:30 -0700)]
Provide an opt-out preference for New Filters for RecentChanges

Currently this is disabled by default. On wikis with the BetaFeatures and
WikimediaMessages extensions installed, this preference is set (if the
$wgEnableRcFiltersBetaFeature flag is set) via BetaFeatures. This change
lets users on normal wikis use these too, and lets BetaFeatures-capable
wikis "graduate" the feature to be provided to all users by default.

Bug: T168376
Change-Id: I3c75f9f2f6287414bf330f116d959d078250392d

6 years agoMerge "Add some devs with significant contributions to core"
jenkins-bot [Mon, 11 Sep 2017 21:59:59 +0000 (21:59 +0000)]
Merge "Add some devs with significant contributions to core"

6 years agoMerge "FeedbackDialog: Improve alignment"
jenkins-bot [Mon, 11 Sep 2017 20:46:26 +0000 (20:46 +0000)]
Merge "FeedbackDialog: Improve alignment"

6 years agoMerge "Add <body> class marking whether RCFilters is enabled"
jenkins-bot [Mon, 11 Sep 2017 20:36:39 +0000 (20:36 +0000)]
Merge "Add <body> class marking whether RCFilters is enabled"

6 years agoMerge "RCFilters: Live update: disable peek param"
jenkins-bot [Mon, 11 Sep 2017 20:32:28 +0000 (20:32 +0000)]
Merge "RCFilters: Live update: disable peek param"

6 years agoAdd <body> class marking whether RCFilters is enabled
Matthew Flaschen [Mon, 11 Sep 2017 07:12:03 +0000 (03:12 -0400)]
Add <body> class marking whether RCFilters is enabled

Also added OutputPage->addBodyClasses to allow this

Bug: T175062
Change-Id: I2111d0762328f2e59038c92d63583a9bb267fc9f

6 years agoAdd CommentStoreComment::newUnsavedComment()
Brad Jorsch [Mon, 11 Sep 2017 18:27:01 +0000 (14:27 -0400)]
Add CommentStoreComment::newUnsavedComment()

Revision (or more accurately, its upcoming MCR replacement) should allow
for the full flexibility of CommentStore in its interface, and the most
straightforward way to do that is to use CommentStoreComment. But for
that to work sanely, we need a non-@private way to create a new
CommentStoreComment that hasn't been saved to the database yet.

Change-Id: I76028e8ef3da4568a16e098cdfbc806a67b814e3

6 years agoMerge "Show a warning in edit preview when a template loop is detected"
jenkins-bot [Mon, 11 Sep 2017 18:26:11 +0000 (18:26 +0000)]
Merge "Show a warning in edit preview when a template loop is detected"

6 years agoMerge "Use CommentStore::getCommentLegacy with CommentStore::getFields"
jenkins-bot [Mon, 11 Sep 2017 18:13:29 +0000 (18:13 +0000)]
Merge "Use CommentStore::getCommentLegacy with CommentStore::getFields"

6 years agoApiQuery: Fix type docs for $groups in ApiQueryBase::selectNamedDB() call chain
Kunal Mehta [Sun, 10 Sep 2017 22:14:33 +0000 (15:14 -0700)]
ApiQuery: Fix type docs for $groups in ApiQueryBase::selectNamedDB() call chain

Change-Id: Iaa2ed914347fc4a1b477406cc8b83d7f21adf1a7

6 years agoMerge "ApiQueryWatchlist: Document type of $commentStore property"
jenkins-bot [Mon, 11 Sep 2017 14:54:07 +0000 (14:54 +0000)]
Merge "ApiQueryWatchlist: Document type of $commentStore property"

6 years agoMerge "ApiQueryWatchlist: Don't reinvent Title::newFromLinkTarget()"
jenkins-bot [Mon, 11 Sep 2017 14:43:23 +0000 (14:43 +0000)]
Merge "ApiQueryWatchlist: Don't reinvent Title::newFromLinkTarget()"

6 years agoUse CommentStore::getCommentLegacy with CommentStore::getFields
Brad Jorsch [Mon, 11 Sep 2017 14:33:29 +0000 (10:33 -0400)]
Use CommentStore::getCommentLegacy with CommentStore::getFields

It doesn't matter when $wgCommentTableSchemaMigrationStage is
MIGRATION_OLD, but it'll fail when we start changing that to later
migration stages.

Follows up I3447a412.

Change-Id: I6c010cefedd99324080ec078b83159d12709c1b1

6 years agoApiQueryWatchlist: Document type of $commentStore property
Kunal Mehta [Sun, 10 Sep 2017 22:13:26 +0000 (15:13 -0700)]
ApiQueryWatchlist: Document type of $commentStore property

Change-Id: I884bdd347aeddadfd4a7de89261e5ab1a0d8f6f2

6 years agoRCFilters: Live update: disable peek param
Stephane Bisson [Mon, 11 Sep 2017 12:38:53 +0000 (08:38 -0400)]
RCFilters: Live update: disable peek param

Temporarily disable the peek parameter until
we figure out why it doesn't work in betalabs.

This makes the responses larger but still much
smaller than they were originally.

Bug: T173613
Change-Id: I15af48d520644e3da073f0cc3bc63a7f7b7b3850

6 years agotests: ensure parserTestRunner restores $wgParser
Antoine Musso [Mon, 11 Sep 2017 10:58:13 +0000 (12:58 +0200)]
tests: ensure parserTestRunner restores $wgParser

ParserTestRunner::addArticle() set a dummy $wgParser to ease test
running. However if doEditContent() fails, it would abort and never
restore $wgParser.

Make sure the restoration is done even on exception.

I caught that one while running parser tests with Scribunto and Cite. My
setup lacked a luastandalone which causes Scribunto to throw an
exception. When the Cite tests are run, the MessageCache parser ended up
using $wgParser = ParserTestMockParser;

Change-Id: I33a0a5c1f40f197405d40b7925cc043342e6757e

6 years agoMerge "build: Updating mediawiki/mediawiki-codesniffer to 0.12.0"
jenkins-bot [Sun, 10 Sep 2017 23:06:47 +0000 (23:06 +0000)]
Merge "build: Updating mediawiki/mediawiki-codesniffer to 0.12.0"

6 years agoMerge "Improve some parameter docs"
jenkins-bot [Sun, 10 Sep 2017 22:57:48 +0000 (22:57 +0000)]
Merge "Improve some parameter docs"

6 years agoImageHistoryPseudoPager: Don't use Title::setFragment()
Kunal Mehta [Sun, 10 Sep 2017 22:26:05 +0000 (15:26 -0700)]
ImageHistoryPseudoPager: Don't use Title::setFragment()

It's deprecated for public usage.

Change-Id: I3edde2826abc8e3e87259ae602eda679f7cb7ed4

6 years agoLinker: Accept LinkTargets in makeCommentLink()
Kunal Mehta [Sun, 10 Sep 2017 22:20:07 +0000 (15:20 -0700)]
Linker: Accept LinkTargets in makeCommentLink()

Change-Id: I47b421b38ec60aaf8b4b9f762084f42b44ef8026

6 years agoLinker: Accept LinkTarget objects in link()
Kunal Mehta [Sun, 10 Sep 2017 22:19:24 +0000 (15:19 -0700)]
Linker: Accept LinkTarget objects in link()

Even though this function is deprecated, it'll make the migration to
TitleValue easier.

Change-Id: Idb16dd2dd50a5273bff5e0537825dc5e91f00d86

6 years agoLinker: Don't use Title::setFragment()
Kunal Mehta [Sun, 10 Sep 2017 22:15:38 +0000 (15:15 -0700)]
Linker: Don't use Title::setFragment()

It's deprecated for public usage.

Change-Id: I916841f28351567dfa71f5a65c5cbc273ddbabd4

6 years agoApiQueryWatchlist: Don't reinvent Title::newFromLinkTarget()
Kunal Mehta [Sun, 10 Sep 2017 22:13:07 +0000 (15:13 -0700)]
ApiQueryWatchlist: Don't reinvent Title::newFromLinkTarget()

Change-Id: I1591c517ad8325e7c249197e6601fcc3d3efcc99

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 10 Sep 2017 19:54:28 +0000 (21:54 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ic79b226d568bfe5c9c6c4e016ea273d74dc055e3

6 years agobuild: Updating mediawiki/mediawiki-codesniffer to 0.12.0
Umherirrender [Sun, 10 Sep 2017 19:11:37 +0000 (21:11 +0200)]
build: Updating mediawiki/mediawiki-codesniffer to 0.12.0

Change-Id: Iefaae5043fa77d5d556c31079549dab8f61bd3ef

6 years agoImprove some parameter docs
Umherirrender [Sat, 9 Sep 2017 20:47:04 +0000 (22:47 +0200)]
Improve some parameter docs

Add missing @return and @param to function docs and fixed some @param

Change-Id: I810727961057cfdcc274428b239af5975c57468d

6 years agoMerge "FancyCaptcha: Align to WikimediaUI Style Guide"
jenkins-bot [Sun, 10 Sep 2017 12:24:02 +0000 (12:24 +0000)]
Merge "FancyCaptcha: Align to WikimediaUI Style Guide"

6 years agoMerge "HTMLForm: Implement OOUI version of HTMLTagFilter"
jenkins-bot [Sun, 10 Sep 2017 12:17:03 +0000 (12:17 +0000)]
Merge "HTMLForm: Implement OOUI version of HTMLTagFilter"

6 years agoMerge "Replace wfShellExec() with a class"
jenkins-bot [Sun, 10 Sep 2017 11:37:53 +0000 (11:37 +0000)]
Merge "Replace wfShellExec() with a class"

6 years agoEnable recursive partials in TemplateParser
Gergő Tisza [Sun, 10 Sep 2017 03:08:43 +0000 (20:08 -0700)]
Enable recursive partials in TemplateParser

Recursive partials are the only way to handle tree-like structures
such as nested lists. Allow setting FLAG_RUNTIMEPARTIAL in LightnCandy
so they can be used.

Since this has a slight performance impact (makes partial invocations
evaluation-time functions calls instead of compilation-time transclusions)
make it optional.

Change-Id: Ie37105a9f1ff92e1a79bfcd9f8578965e3d347f0

6 years agoMerge "Minor fixes to ParsoidVirtualRESTService"
jenkins-bot [Sun, 10 Sep 2017 01:11:30 +0000 (01:11 +0000)]
Merge "Minor fixes to ParsoidVirtualRESTService"

6 years agoMerge "Avoid using the deprecated ParserCache::singleton()"
jenkins-bot [Sun, 10 Sep 2017 00:59:15 +0000 (00:59 +0000)]
Merge "Avoid using the deprecated ParserCache::singleton()"

6 years agoFix return in HttpStatus::header
Umherirrender [Sat, 9 Sep 2017 23:44:29 +0000 (01:44 +0200)]
Fix return in HttpStatus::header

No caller expected a bool as return, which is not given in any case,
so remove it

Change-Id: Iaf994342e9f783108c767bb2de13af7345247805

6 years agoFix return of Interwiki::invalidateCache
Umherirrender [Sat, 9 Sep 2017 22:17:26 +0000 (00:17 +0200)]
Fix return of Interwiki::invalidateCache

InterwikiLookup::invalidateCache does not expected a return value

Change-Id: I5b2ba21ccb42ba9925205eb1645f2152fd51c0a0

6 years agoAvoid using the deprecated ParserCache::singleton()
Kunal Mehta [Sat, 9 Sep 2017 00:19:17 +0000 (17:19 -0700)]
Avoid using the deprecated ParserCache::singleton()

Change-Id: I0da6d9cbfad26c89bf5dab564071ef97acaf44f9

6 years agoFix return in Preprocessor::cacheSetTree
Umherirrender [Sat, 9 Sep 2017 20:54:39 +0000 (22:54 +0200)]
Fix return in Preprocessor::cacheSetTree

Function would not return always a bool,
caller does not expected a value, so remove it.

Change-Id: I506355fbd1bd304a6f3a161ac4c9d0bc765fda4a

6 years agoFix return in ParserTestTopLevelSuite::debug
Umherirrender [Sat, 9 Sep 2017 20:50:23 +0000 (22:50 +0200)]
Fix return in ParserTestTopLevelSuite::debug

wfDebugLog does not return anything

Change-Id: I85274a85342036b76a72ba82bb7de1d05382cf14

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 9 Sep 2017 19:53:59 +0000 (21:53 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I6486b0d6441be32dad0c2404691ce2cd3383f3d2

6 years agoLocalFile: Fix setting $this->description after CommentStore changes
Kunal Mehta [Sat, 9 Sep 2017 09:10:41 +0000 (02:10 -0700)]
LocalFile: Fix setting $this->description after CommentStore changes

Bug: T175444
Bug: T175443
Change-Id: I3447a4129300c2c7dc0d585404e7747b6a5e2b77

6 years agoFeedbackDialog: Improve alignment
Volker E [Sat, 9 Sep 2017 17:44:08 +0000 (10:44 -0700)]
FeedbackDialog: Improve alignment

Improving alignment of FeedbackDialog items and increasing
`line-height` slightly for better readability.

Change-Id: Ic1d569efbdd1340fadb696e76c7a871f29794077

6 years agoQuote $default in PostgresUpdater::setDefault
Reedy [Sat, 9 Sep 2017 16:11:24 +0000 (17:11 +0100)]
Quote $default in PostgresUpdater::setDefault

Bug: T175439
Change-Id: Id5f5f4f34c7b9ff9af4b706e3e126ba8fda6a0d5

6 years agoAdd some devs with significant contributions to core
Ed Sanders [Sat, 9 Sep 2017 12:31:04 +0000 (13:31 +0100)]
Add some devs with significant contributions to core

Change-Id: I2f904c3c6748a4ad42d38dd89166cc5090365f67

6 years agoFancyCaptcha: Align to WikimediaUI Style Guide
Volker E [Sat, 9 Sep 2017 08:39:13 +0000 (01:39 -0700)]
FancyCaptcha: Align to WikimediaUI Style Guide

Aligning FancyCaptcha appearance to WikimediaUI color palette and
guidelines, adding `border-radius`, reducing `padding` slightly to
`8px` base and bring captcha and input closer together.

Bug: T152025
Change-Id: I26d9aadb7456ea6b7ba68a40cb4c624e995d9341

6 years agoReplace outdated greys with WCAG conformant WikimediaUI palette ones
Volker E [Sat, 9 Sep 2017 08:27:16 +0000 (01:27 -0700)]
Replace outdated greys with WCAG conformant WikimediaUI palette ones

Replacing outdated greys with WCAG level AA conformant ones from
WikimediaUI color palette.

Bug: T152025
Change-Id: Ide230784be654def9f120d5242d036f7423e65b2

6 years agopostEdit: Use standard close icon
Volker E [Sat, 9 Sep 2017 05:47:22 +0000 (22:47 -0700)]
postEdit: Use standard close icon

Making use of standard close icon and also prevent screenreaders
from reading 'x' if they ever come across the message.
Also slightly bumping `font-size` to better harmonize
with close icon and clean-up CSS.

Bug: T50067
Change-Id: I82cdad23462f62d5e8ab2eef8632a2b3ac35e93f

6 years agoReplace wfShellExec() with a class
Max Semenik [Thu, 3 Nov 2016 00:27:15 +0000 (17:27 -0700)]
Replace wfShellExec() with a class

This function has gotten so unwieldy that a helper was
introduced. Instead, here's this class that makes
shelling out easier and more readable.

Example usage:
  $result = Shell::command( 'shell command' )
       ->environment( [ 'ENVIRONMENT_VARIABLE' => 'VALUE' ] )
       ->limits( [ 'time' => 300 ] )
       ->execute();

  $exitCode = $result->getExitCode();
  $output = $result->getStdout();

This is a minimal change, so lots of stuff remains
unrefactored - I'd rather limit the scope of this commit.
A future improvement could be an ability to get stderr
separately from stdout.

Caveat: execution errors (proc_open is disabled/returned error) now
throw errors instead of returning a status code. wfShellExec() still
emulates this behavior though.

Competing commit: I7dccb2b67a4173a8a89b035e444fbda9102e4d0f
<legoktm> MaxSem: so you should continue working on your patch and I'll
          probably refactor on top of it later after its merged :P

Change-Id: I8ac9858b80d7908cf7e7981d7e19d0fc9c2265c0

6 years agoRemove deprecated function wfFixSessionID()
Max Semenik [Sat, 9 Sep 2017 01:26:11 +0000 (18:26 -0700)]
Remove deprecated function wfFixSessionID()

Deprecated since 1.27, no callers anywhere.

Change-Id: I2d1019fdb21fe4a9d0aa767a71eb18739f841dfb

6 years agoDeprecate wfUsePHP()
Max Semenik [Sat, 9 Sep 2017 01:03:09 +0000 (18:03 -0700)]
Deprecate wfUsePHP()

No callers anywhere.

Change-Id: I47256448d313983e3cebd713f7c149e3c3a9ab47

6 years agoMerge "registration: Improve error message for invalid "callback" in extension.json"
jenkins-bot [Sat, 9 Sep 2017 00:13:46 +0000 (00:13 +0000)]
Merge "registration: Improve error message for invalid "callback" in extension.json"

6 years agoregistration: Improve error message for invalid "callback" in extension.json
Umherirrender [Wed, 6 Sep 2017 19:44:49 +0000 (21:44 +0200)]
registration: Improve error message for invalid "callback" in extension.json

Getting the following error for an invalid callback is not helpful:
Warning: Invalid argument: function: class not found in
/includes/registration/ExtensionRegistry.php on line 335

Change-Id: I4dfc011cb0a5cd06f1836d73e58f407d468e4546

6 years agoAdd Title::isValid method
daniel [Mon, 12 Jun 2017 19:11:42 +0000 (21:11 +0200)]
Add Title::isValid method

Make the notion of Title objects representing invalid titles explicit.

Bug: T165149
Change-Id: I89aaabdff9614fe63bd1244784a1d677dbc26f9e

6 years agoMerge "RCFilters: Remove getValue and use FormOptions"
jenkins-bot [Fri, 8 Sep 2017 21:33:07 +0000 (21:33 +0000)]
Merge "RCFilters: Remove getValue and use FormOptions"

6 years agoRCFilters: Remove getValue and use FormOptions
Matthew Flaschen [Fri, 8 Sep 2017 20:56:00 +0000 (16:56 -0400)]
RCFilters: Remove getValue and use FormOptions

Ensure the default is boolean, then FormOptions will
do the rest for us.

Bug: T174725
Change-Id: I92f2f77e1225f536a38f592578012855b948050c

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 8 Sep 2017 21:13:33 +0000 (23:13 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I80104ab312390512e35c648847ec49f179e6a046