[MediaWiki-commits] [Gerrit] operations/puppet[production]: Run Lilypond from Firejail
Ebe123 has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/370361 ) Change subject: Run Lilypond from Firejail .. Run Lilypond from Firejail This change adds the python command, encapsulating Lilypond within Firejail, with the `mediawiki-converters` profile, like in similar scripts. See also I5a0579b0e and I926fbe6b3. Bug: T171372 Change-Id: I011db0e9a2d9da825cf3ac02bfba23b562e052f6 --- A modules/mediawiki/files/mediawiki-firejail-lilypond M modules/mediawiki/manifests/init.pp 2 files changed, 14 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/61/370361/1 diff --git a/modules/mediawiki/files/mediawiki-firejail-lilypond b/modules/mediawiki/files/mediawiki-firejail-lilypond new file mode 100644 index 000..cbee57b --- /dev/null +++ b/modules/mediawiki/files/mediawiki-firejail-lilypond @@ -0,0 +1,5 @@ +#! /usr/bin/python +# -*- coding: utf-8 -*- + +import sys, subprocess +subprocess.call(['/usr/bin/firejail', '--profile=/etc/firejail/mediawiki-converters.profile', '/usr/bin/lilypond'] + sys.argv[1:]) diff --git a/modules/mediawiki/manifests/init.pp b/modules/mediawiki/manifests/init.pp index 8b54677..9929fdc 100644 --- a/modules/mediawiki/manifests/init.pp +++ b/modules/mediawiki/manifests/init.pp @@ -32,8 +32,7 @@ # This profile is used to contain the convert command of imagemagick using # firejail Profiles specific to the image/video scalers are handled via -# mediawiki::firejail, but imagemagick is also used on the general purpose -# appscalers for scaling musical typesheets in the Score extension +# mediawiki::firejail file { '/etc/firejail/mediawiki-imagemagick.profile': source => 'puppet:///modules/mediawiki/mediawiki-imagemagick.profile', owner => 'root', @@ -63,6 +62,14 @@ mode => '0555', } +# The Score extension uses Lilypond, which requires the use of Firejail +file { '/usr/local/bin/mediawiki-firejail-lilypond': +source => 'puppet:///modules/mediawiki/mediawiki-firejail-lilypond', +owner => 'root', +group => 'root', +mode => '0555', +} + # /var/log/mediawiki contains log files for the MediaWiki jobrunner # and for various periodic jobs that are managed by cron. file { '/var/log/mediawiki': -- To view, visit https://gerrit.wikimedia.org/r/370361 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I011db0e9a2d9da825cf3ac02bfba23b562e052f6 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ebe123___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Update QUnit tests to use assert.expect() instead
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/370324 ) Change subject: Update QUnit tests to use assert.expect() instead .. Update QUnit tests to use assert.expect() instead This is a baseline to make all our tests more compatible with future QUnit versions. I'm removing all numbers that are super trivial. For example, if there is only one assertion, the test will create a warning anyway if this assertion is not executed. Bug: T170515 Change-Id: Ie59c73f2c3e6687803f8619ca8868869bf903208 --- M lib/tests/qunit/wikibase.sites.tests.js M lib/tests/qunit/wikibase.tests.js M view/tests/qunit/jquery/jquery.util.EventSingletonManager.tests.js M view/tests/qunit/jquery/ui/jquery.ui.closeable.tests.js M view/tests/qunit/jquery/ui/jquery.ui.tagadata.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.aliasesview.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.badgeselector.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.descriptionview.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.entityselector.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.entitytermsforlanguageview.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.labelview.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.pagesuggester.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.sitelinkgroupview.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.sitelinklistview.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.sitelinkview.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.snaklistview.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.statementview.tests.js M view/tests/qunit/jquery/wikibase/toolbar/jquery.wikibase.toolbarbutton.tests.js M view/tests/qunit/wikibase/store/store.CachingEntityStore.tests.js M view/tests/qunit/wikibase/store/store.CombiningEntityStore.tests.js M view/tests/qunit/wikibase/wikibase.getLanguageNameByCode.tests.js 21 files changed, 52 insertions(+), 35 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/tests/qunit/wikibase.sites.tests.js b/lib/tests/qunit/wikibase.sites.tests.js index 08bb363..a907028 100644 --- a/lib/tests/qunit/wikibase.sites.tests.js +++ b/lib/tests/qunit/wikibase.sites.tests.js @@ -53,7 +53,7 @@ } } ) ); - QUnit.test( 'basic', 1, function ( assert ) { + QUnit.test( 'basic', function ( assert ) { assert.ok( wb.sites instanceof Object, 'initiated wikibase object' @@ -118,7 +118,7 @@ } ); } ); - QUnit.test( 'wikibase.sites.getSite()', 2, function ( assert ) { + QUnit.test( 'wikibase.sites.getSite()', function ( assert ) { assert.ok( wb.sites.getSite( 'nnwiki' ) instanceof Site, 'trying to get a known site by its ID returns a site object' @@ -131,7 +131,7 @@ ); } ); - QUnit.test( 'wikibase.sites.hasSite()', 2, function ( assert ) { + QUnit.test( 'wikibase.sites.hasSite()', function ( assert ) { assert.strictEqual( wb.sites.hasSite( 'nnwiki' ), true, @@ -145,7 +145,7 @@ ); } ); - QUnit.test( 'wikibase.sites.getSiteGroups()', 2 + TEST_SITE_GROUPS.length, function ( assert ) { + QUnit.test( 'wikibase.sites.getSiteGroups()', function ( assert ) { assert.expect( 4 ); var siteGroups = wb.sites.getSiteGroups(); diff --git a/lib/tests/qunit/wikibase.tests.js b/lib/tests/qunit/wikibase.tests.js index 919ecd6..e0019af 100644 --- a/lib/tests/qunit/wikibase.tests.js +++ b/lib/tests/qunit/wikibase.tests.js @@ -18,7 +18,7 @@ QUnit.module( 'wikibase' ); - QUnit.test( 'basic', 1, function ( assert ) { + QUnit.test( 'basic', function ( assert ) { assert.ok( wb instanceof Object, 'initiated wikibase object' diff --git a/view/tests/qunit/jquery/jquery.util.EventSingletonManager.tests.js b/view/tests/qunit/jquery/jquery.util.EventSingletonManager.tests.js index 78c28ae..fc175e7 100644 --- a/view/tests/qunit/jquery/jquery.util.EventSingletonManager.tests.js +++ b/view/tests/qunit/jquery/jquery.util.EventSingletonManager.tests.js @@ -7,7 +7,8 @@ QUnit.module( 'jquery.util.EventSingletonManager' ); - QUnit.test( 'register() & unregister() (single source)', 2, function ( assert ) { + QUnit.test( 'register() & unregister() (single source)', function ( assert ) { + assert.expect( 2 ); var manager = new $.util.EventSingletonManager(), $source = $( '' ), $target = $( '' ), @@
[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Page: add support for retrieving the page image
Strainu has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/370359 ) Change subject: Page: add support for retrieving the page image .. Page: add support for retrieving the page image Bug: T172625 Change-Id: I1fea9c17aaea560765dc76787ac9475d6cd5d4e4 --- M pywikibot/data/api.py M pywikibot/page.py M pywikibot/site.py 3 files changed, 30 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/59/370359/1 diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py index 7f4c80b..64c693b 100644 --- a/pywikibot/data/api.py +++ b/pywikibot/data/api.py @@ -3242,6 +3242,9 @@ coords.append(coord) page._coords = coords +if "pageimage" in pagedict: +page._pageimage = pywikibot.FilePage(page.site, pagedict['pageimage']) + if "pageprops" in pagedict: page._pageprops = pagedict['pageprops'] diff --git a/pywikibot/page.py b/pywikibot/page.py index bb8b224..344a2ff 100644 --- a/pywikibot/page.py +++ b/pywikibot/page.py @@ -162,7 +162,8 @@ '_text', '_pageid', '_catinfo', '_templates', '_protection', '_contentmodel', '_langlinks', '_isredir', '_coords', '_preloadedtext', '_timestamp', '_applicable_protections', -'_flowinfo', '_quality', '_pageprops', '_revid', '_quality_text' +'_flowinfo', '_quality', '_pageprops', '_revid', '_quality_text', +'_pageimage' ) def __init__(self, source, title=u"", ns=0): @@ -1622,6 +1623,21 @@ else: return self._coords +def pageImage(self): +""" +Return a most appropriate image on the page. + +Uses the MediaWiki extension PageImages. + +@return: A FilePage object +@rtype: FilePage +""" +if not hasattr(self, '_pageimage'): +self._pageimage = None +self.site.loadpageimages(self) + +return self._pageimage + def getRedirectTarget(self): """ Return a Page object for the target this Page redirects to. diff --git a/pywikibot/site.py b/pywikibot/site.py index e2bc6cc..84e542f 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -2978,6 +2978,16 @@ coprimary='all') self._update_page(page, query) +def loadpageimages(self, page): +"""Load [[mw:Extension:PageImages]] info.""" +title = page.title(withSection=False) +query = self._generator(api.PropertyGenerator, +type_arg="pageimages", +titles=title.encode(self.encoding()), +piprop=['name'], +pithumbsize='50') +self._update_page(page, query) + def loadpageprops(self, page): """Load page props for the given page.""" title = page.title(withSection=False) -- To view, visit https://gerrit.wikimedia.org/r/370359 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1fea9c17aaea560765dc76787ac9475d6cd5d4e4 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Strainu___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Cargo[master]: gitignore for the Composer files
Seb35 has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/370360 ) Change subject: gitignore for the Composer files .. gitignore for the Composer files Change-Id: I669685e653a5d8b65421494aae3e745f1c144298 --- M .gitignore 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo refs/changes/60/370360/1 diff --git a/.gitignore b/.gitignore index 3c3629e..a8799a0 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ node_modules +/composer.lock +/vendor -- To view, visit https://gerrit.wikimedia.org/r/370360 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I669685e653a5d8b65421494aae3e745f1c144298 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Cargo Gerrit-Branch: master Gerrit-Owner: Seb35___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Run Lilypond from Firejail
Ebe123 has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/370358 ) Change subject: Run Lilypond from Firejail .. Run Lilypond from Firejail This change changes the path to the Lilypond executable to a script provided by Puppet encapsulating it with Firejail. Should not be merged until the equivalent puppet patch is merged. Bug: T171372 Change-Id: I5a0579b0e5adf4b4498cd8663bcb878ef0f34626 --- M wmf-config/CommonSettings.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/58/370358/1 diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index 32e6f83..4fa9333 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -1068,6 +1068,7 @@ if ( $wmgUseScore ) { wfLoadExtension( 'Score' ); + $wgScoreLilypond = '/usr/local/bin/mediawiki-firejail-lilypond'; $wgScoreFileBackend = $wmgScoreFileBackend; $wgScorePath = $wmgScorePath; } -- To view, visit https://gerrit.wikimedia.org/r/370358 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5a0579b0e5adf4b4498cd8663bcb878ef0f34626 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Ebe123___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Contest[master]: Add apihelp messages to pass unit tests
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/369916 ) Change subject: Add apihelp messages to pass unit tests .. Add apihelp messages to pass unit tests Bug: T155020 Change-Id: I75e4624f151d3435484ad6e36edeb41ea0b83668 --- M api/ApiContestQuery.php M api/ApiDeleteContest.php M api/ApiMailContestants.php M api/ApiQueryChallenges.php M api/ApiQueryContestComments.php M api/ApiQueryContestants.php M api/ApiQueryContests.php M i18n/en.json M i18n/qqq.json 9 files changed, 113 insertions(+), 85 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/api/ApiContestQuery.php b/api/ApiContestQuery.php index 9889d02..a3af486 100644 --- a/api/ApiContestQuery.php +++ b/api/ApiContestQuery.php @@ -194,32 +194,22 @@ 'props' => array( ApiBase::PARAM_TYPE => array_merge( $this->getClass()->getFieldNames(), array( '*' ) ), ApiBase::PARAM_ISMULTI => true, - ApiBase::PARAM_DFLT => '*' + ApiBase::PARAM_DFLT => '*', + ApiBase::PARAM_HELP_MSG => 'apihelp-query+contestbase-param-props', ), 'limit' => array( ApiBase::PARAM_DFLT => 20, ApiBase::PARAM_TYPE => 'limit', ApiBase::PARAM_MIN => 1, ApiBase::PARAM_MAX => ApiBase::LIMIT_BIG1, - ApiBase::PARAM_MAX2 => ApiBase::LIMIT_BIG2 + ApiBase::PARAM_MAX2 => ApiBase::LIMIT_BIG2, + ApiBase::PARAM_HELP_MSG => 'apihelp-query+contestbase-param-limit', ), - 'continue' => null, + 'continue' => array( + ApiBase::PARAM_HELP_MSG => 'apihelp-query+contestbase-param-continue', + ), ); return array_merge( $this->getClass()->getAPIParams(), $params ); - } - - /** -* (non-PHPdoc) -* @see includes/api/ApiBase#getParamDescription() -*/ - public function getParamDescription() { - $descs = array ( - 'props' => 'Fields to query', - 'continue' => 'Offset number from where to continue the query', - 'limit' => 'Max amount of rows to return', - ); - - return array_merge( $this->getClass()->getFieldDescriptions(), $descs ); } } diff --git a/api/ApiDeleteContest.php b/api/ApiDeleteContest.php index 95f8ef8..092ee79 100644 --- a/api/ApiDeleteContest.php +++ b/api/ApiDeleteContest.php @@ -72,19 +72,6 @@ ); } - public function getParamDescription() { - return array( - 'ids' => 'The IDs of the contests to delete', - 'token' => 'Edit token, salted with the contest id', - ); - } - - public function getDescription() { - return array( - 'API module for deleting contests.' - ); - } - protected function getExamples() { return array( 'api.php?action=deletecontest=42', diff --git a/api/ApiMailContestants.php b/api/ApiMailContestants.php index 93a9a4e..d9d4a40 100644 --- a/api/ApiMailContestants.php +++ b/api/ApiMailContestants.php @@ -154,25 +154,6 @@ ); } - public function getParamDescription() { - return array( -// 'page' => 'Name of the page from which to pull content for the email body', - 'ids' => 'The IDs of the contestants to mail', - 'contestids' => 'The IDs of the contests where of the contestants should be mailed', - 'contestnames' => 'The names of the contests where of the contestants should be mailed', - 'challengeids' => 'The IDs of the challenges where of the contestants should be mailed', - 'challengetitles' => 'The titles of the challenges where of the contestants should be mailed', - 'token' => 'Edit token', - ); - } - - public function getDescription() { - return array( - 'API module for mailing contestants. Selection criteria will be joined with AND, - except for the challange ids/titles and contest ids/names pairs, which will be joined with OR.' - ); - } - protected function getExamples() { return array(
[MediaWiki-commits] [Gerrit] integration/config[master]: [Contest] Make unit tests voting
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/369935 ) Change subject: [Contest] Make unit tests voting .. [Contest] Make unit tests voting Needed after I75e4624f151d3435484ad6e36edeb41ea0b83668 Change-Id: I879ace3291659064588c03de3ebbdff0f16bd81c --- M zuul/layout.yaml 1 file changed, 1 insertion(+), 2 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/zuul/layout.yaml b/zuul/layout.yaml index dd885ce..4500995 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -4171,8 +4171,7 @@ - name: mediawiki/extensions/Contest template: - - name: mwgate-composer - - name: extension-unittests-non-voting + - name: extension-unittests-generic - name: mwgate-npm - name: mediawiki/extensions/Contributors -- To view, visit https://gerrit.wikimedia.org/r/369935 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I879ace3291659064588c03de3ebbdff0f16bd81c Gerrit-PatchSet: 4 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: UmherirrenderGerrit-Reviewer: Hashar Gerrit-Reviewer: Paladox Gerrit-Reviewer: Thcipriani Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix and make some types in PHPDoc and JSDoc tags more specific
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/366823 ) Change subject: Fix and make some types in PHPDoc and JSDoc tags more specific .. Fix and make some types in PHPDoc and JSDoc tags more specific Change-Id: I7c109067579f570ecccaabc75b0b4db7eac4e6c2 --- M includes/api/ApiBase.php M includes/libs/StatusValue.php M includes/specials/SpecialSearch.php M languages/Language.php 4 files changed, 12 insertions(+), 7 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index bc3def8..44a2280 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -2857,7 +2857,7 @@ * Return the error message related to a certain array * @deprecated since 1.29 * @param array|string|MessageSpecifier $error Element of a getUserPermissionsErrors()-style array -* @return [ 'code' => code, 'info' => info ] +* @return array [ 'code' => code, 'info' => info ] */ public function parseMsg( $error ) { // Check whether someone passed the whole array, instead of one element as diff --git a/includes/libs/StatusValue.php b/includes/libs/StatusValue.php index e860ec4..f9dcc1b 100644 --- a/includes/libs/StatusValue.php +++ b/includes/libs/StatusValue.php @@ -40,17 +40,22 @@ * @since 1.25 */ class StatusValue { + /** @var bool */ protected $ok = true; - /** @var array */ + + /** @var array[] */ protected $errors = []; /** @var mixed */ public $value; - /** @var array Map of (key => bool) to indicate success of each part of batch operations */ + + /** @var bool[] Map of (key => bool) to indicate success of each part of batch operations */ public $success = []; + /** @var int Counter for batch operations */ public $successCount = 0; + /** @var int Counter for batch operations */ public $failCount = 0; @@ -138,7 +143,7 @@ * * Each error is a (message:string or MessageSpecifier,params:array) map * -* @return array +* @return array[] */ public function getErrors() { return $this->errors; @@ -230,7 +235,7 @@ * - params: array list of parameters * * @param string $type -* @return array +* @return array[] */ public function getErrorsByType( $type ) { $result = []; diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index eeb8823..8afea0b 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -352,7 +352,7 @@ $out->addHTML( $dymWidget->render( $term, $textMatches ) ); } - $hasErrors = $textStatus && $textStatus->getErrors(); + $hasErrors = $textStatus && $textStatus->getErrors() !== []; $hasOtherResults = $textMatches && $textMatches->hasInterwikiResults( SearchResultSet::INLINE_RESULTS ); diff --git a/languages/Language.php b/languages/Language.php index 83dff65..f319d38 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -1092,7 +1092,7 @@ * MMDDHHMMSS * 01234567890123 * @param DateTimeZone $zone Timezone of $ts -* @param[out] int $ttl The amount of time (in seconds) the output may be cached for. +* @param int &$ttl The amount of time (in seconds) the output may be cached for. * Only makes sense if $ts is the current time. * @todo handling of "o" format character for Iranian, Hebrew, Hijri & Thai? * -- To view, visit https://gerrit.wikimedia.org/r/366823 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7c109067579f570ecccaabc75b0b4db7eac4e6c2 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE)Gerrit-Reviewer: Addshore Gerrit-Reviewer: Anomie Gerrit-Reviewer: Hoo man Gerrit-Reviewer: Jack Phoenix Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Thiemo Mättig (WMDE) Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] oojs/ui[master]: Align code comment references to Phabricator tasks
VolkerE has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/370347 ) Change subject: Align code comment references to Phabricator tasks .. Align code comment references to Phabricator tasks Also updating reference from Bugzilla. Change-Id: Ibb3b611afa228cd62b0185098e51d789f2e2912b --- M src/Element.js M src/WindowManager.js M src/layouts/BookletLayout.js M src/layouts/IndexLayout.js M src/layouts/TabPanelLayout.js M src/mixins/ClippableElement.js M src/styles/common.less M src/themes/apex/elements.less M src/themes/wikimediaui/common.less M src/themes/wikimediaui/widgets.less M src/widgets/InputWidget.js M src/widgets/TextInputWidget.js 12 files changed, 29 insertions(+), 29 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/47/370347/1 diff --git a/src/Element.js b/src/Element.js index 5f61429..e4c7ff3 100644 --- a/src/Element.js +++ b/src/Element.js @@ -103,7 +103,7 @@ OO.ui.Element.static.infuse = function ( idOrNode ) { var obj = OO.ui.Element.static.unsafeInfuse( idOrNode, false ); // Verify that the type matches up. - // FIXME: uncomment after T89721 is fixed (see T90929) + // FIXME: uncomment after T89721 is fixed, see T90929. /* if ( !( obj instanceof this['class'] ) ) { throw new Error( 'Infusion type mismatch!' ); @@ -240,7 +240,7 @@ if ( $elem[ 0 ] !== obj.$element[ 0 ] ) { $elem.replaceWith( obj.$element ); // This element is now gone from the DOM, but if anyone is holding a reference to it, - // let's allow them to OO.ui.infuse() it and do what they expect (T105828). + // let's allow them to OO.ui.infuse() it and do what they expect, see T105828. // Do not use jQuery.data(), as using it on detached nodes leaks memory in 1.x line by design. $elem[ 0 ].oouiInfused = obj.$element; } diff --git a/src/WindowManager.js b/src/WindowManager.js index 1a256d3..62ebb4d 100644 --- a/src/WindowManager.js +++ b/src/WindowManager.js @@ -341,7 +341,7 @@ * @return {OO.ui.WindowInstance|jQuery.Promise} A lifecycle object representing this particular * opening of the window. For backwards-compatibility, then object is also a Thenable that is resolved * when the window is done opening, with nested promise for when closing starts. This behaviour - * is deprecated and is not compatible with jQuery 3 (T163510). + * is deprecated and is not compatible with jQuery 3. See T163510. * @fires opening */ OO.ui.WindowManager.prototype.openWindow = function ( win, data, lifecycle, compatOpening ) { @@ -356,7 +356,7 @@ compatOpening = compatOpening || $.Deferred(); // Turn lifecycle into a Thenable for backwards-compatibility with - // the deprecated nested-promise behaviour (T163510). + // the deprecated nested-promise behaviour, see T163510. [ 'state', 'always', 'catch', 'pipe', 'then', 'promise', 'progress', 'done', 'fail' ] .forEach( function ( method ) { lifecycle[ method ] = function () { @@ -444,7 +444,7 @@ * @param {Object} [data] Window closing data * @return {OO.ui.WindowInstance|jQuery.Promise} A lifecycle object representing this particular * opening of the window. For backwards-compatibility, the object is also a Thenable that is resolved - * when the window is done closing (T163510). + * when the window is done closing, see T163510. * @fires closing */ OO.ui.WindowManager.prototype.closeWindow = function ( win, data ) { @@ -482,7 +482,7 @@ } // Turn lifecycle into a Thenable for backwards-compatibility with - // the deprecated nested-promise behaviour (T163510). + // the deprecated nested-promise behaviour, see T163510. [ 'state', 'always', 'catch', 'pipe', 'then', 'promise', 'progress', 'done', 'fail' ] .forEach( function ( method ) { lifecycle[ method ] = function () { diff --git a/src/layouts/BookletLayout.js b/src/layouts/BookletLayout.js index c1999c9..a2c4638 100644 --- a/src/layouts/BookletLayout.js +++ b/src/layouts/BookletLayout.js @@ -281,8 +281,8 @@ this.outlineVisible = show; this.toggleMenu( show ); if ( show && this.editable ) { - // HACK: When the sidebar stops animating, kill dumb scrollbars (T161798). Only necessary when - // outline controls are present, The delay matches transition on `.oo-ui-menuLayout-menu`. + // HACK: Kill dumb scrollbars when the sidebar stops animating, see T161798. Only necessary when + // outline controls are present, delay matches transition on `.oo-ui-menuLayout-menu`.
[MediaWiki-commits] [Gerrit] mediawiki...News[master]: Check Title::canHaveTalkPage before calling getTalkPage()
Daniel Kinzler has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/370326 ) Change subject: Check Title::canHaveTalkPage before calling getTalkPage() .. Check Title::canHaveTalkPage before calling getTalkPage() Bug: T172146 Change-Id: Iba8616448b8219109277e24d1af10345c49b5ee9 --- M NewsRenderer.php 1 file changed, 8 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/News refs/changes/26/370326/1 diff --git a/NewsRenderer.php b/NewsRenderer.php index 50057bc..8db7151 100644 --- a/NewsRenderer.php +++ b/NewsRenderer.php @@ -380,6 +380,11 @@ return $html; } + /** +* @param FeedItem $item +* +* @return string +*/ function renderFeedItem( $item ) { global $wgContLang; @@ -401,9 +406,9 @@ $html .= $item->raw_text; $html .= ''; $html .= ''; - if ( $item->getComments() ) { + if ( $item->getComments() && $item->comment_object ) { $html .= '('; - $html .= ''.htmlspecialchars($item->title_object->getTalkPage()->getPrefixedText()).''; + $html .= ''.htmlspecialchars( $item->comment_object->getPrefixedText() ).''; $html .= ')'; } $html .= ''; @@ -458,8 +463,7 @@ //XXX: ugly hack - things used by preview $item->raw_text = $text; //needed because FeedItem holds text html-encoded internally. wtf - $item->raw_comment = $title->getTalkPage()->getFullURL(); //needed because FeedItem holds text html-encoded internally. wtf - $item->raw_title = $name; //needed because FeedItem holds text html-encoded internally. wtf + $item->comment_object = $title->canHaveTalkPage() ? $title->getTalkPage() : null; //needed because FeedItem holds text html-encoded internally. wtf $item->title_object = $title; //title object return $item; } -- To view, visit https://gerrit.wikimedia.org/r/370326 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iba8616448b8219109277e24d1af10345c49b5ee9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/News Gerrit-Branch: master Gerrit-Owner: Daniel Kinzler___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Wikidata[master]: Revert "New Wikidata Build - 2017-08-05T10:00:01+0000"
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/370325 ) Change subject: Revert "New Wikidata Build - 2017-08-05T10:00:01+" .. Revert "New Wikidata Build - 2017-08-05T10:00:01+" This reverts commit e1fed35b658072bd77c1a98974bd029c4f605398. Change-Id: I5ac0072a77245887287213031508fcec5ffea390 --- M composer.lock M extensions/ArticlePlaceholder/includes/ItemNotabilityFilter.php M extensions/ArticlePlaceholder/includes/SearchHookHandler.php M extensions/ArticlePlaceholder/includes/specials/SpecialAboutTopic.php M extensions/ArticlePlaceholder/tests/phpunit/includes/AboutTopicRendererTest.php M extensions/ArticlePlaceholder/tests/phpunit/includes/BaseTemplateToolboxHookHandlerTest.php M extensions/ArticlePlaceholder/tests/phpunit/includes/specials/SpecialAboutTopicTest.php M extensions/Constraints/tests/phpunit/Api/CheckConstraintsTest.php M extensions/Constraints/tests/phpunit/DelegatingConstraintCheckerTest.php M extensions/Wikibase/.mailmap M extensions/Wikibase/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php M extensions/Wikibase/client/tests/phpunit/includes/ChangeNotificationJobTest.php M extensions/Wikibase/client/tests/phpunit/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibraryTest.php M extensions/Wikibase/client/tests/phpunit/includes/DataAccess/StatementTransclusionInteractorTest.php M extensions/Wikibase/data-access/src/DispatchingServiceFactory.php M extensions/Wikibase/data-access/src/RepositoryServiceContainer.php M extensions/Wikibase/data-access/tests/phpunit/DispatchingServiceFactoryTest.php M extensions/Wikibase/data-access/tests/phpunit/RepositoryServiceContainerTest.php M extensions/Wikibase/lib/includes/Store/CachingEntityRevisionLookup.php M extensions/Wikibase/lib/includes/Store/DispatchingEntityRevisionLookup.php M extensions/Wikibase/lib/includes/Store/EntityRevision.php M extensions/Wikibase/lib/includes/Store/EntityRevisionLookup.php M extensions/Wikibase/lib/includes/Store/EntityStore.php M extensions/Wikibase/lib/includes/Store/EntityStoreWatcher.php M extensions/Wikibase/lib/includes/Store/Sql/PrefetchingWikiPageEntityMetaDataAccessor.php M extensions/Wikibase/lib/includes/Store/Sql/WikiPageEntityMetaDataLookup.php M extensions/Wikibase/lib/includes/Store/Sql/WikiPageEntityRevisionLookup.php M extensions/Wikibase/lib/tests/phpunit/EntityRevisionLookupTest.php M extensions/Wikibase/lib/tests/phpunit/MockRepository.php M extensions/Wikibase/lib/tests/phpunit/MockRepositoryTest.php M extensions/Wikibase/lib/tests/phpunit/Store/CachingEntityRevisionLookupTest.php M extensions/Wikibase/lib/tests/phpunit/Store/DispatchingEntityRevisionLookupTest.php M extensions/Wikibase/lib/tests/phpunit/Store/DispatchingTermBufferTest.php M extensions/Wikibase/lib/tests/phpunit/Store/EntityRevisionTest.php M extensions/Wikibase/lib/tests/phpunit/Store/PrefetchingWikiPageEntityMetaDataAccessorTest.php M extensions/Wikibase/lib/tests/phpunit/Store/Sql/SqlEntityInfoBuilderTest.php M extensions/Wikibase/repo/Wikibase.hooks.php M extensions/Wikibase/repo/i18n/ca.json M extensions/Wikibase/repo/i18n/cs.json M extensions/Wikibase/repo/i18n/lb.json M extensions/Wikibase/repo/includes/Api/EntityLoadingHelper.php M extensions/Wikibase/repo/includes/Api/GetEntities.php M extensions/Wikibase/repo/includes/Api/MergeItems.php M extensions/Wikibase/repo/includes/Api/ResultBuilder.php M extensions/Wikibase/repo/includes/Content/EntityContent.php M extensions/Wikibase/repo/includes/EditEntity.php M extensions/Wikibase/repo/includes/Hooks/OutputPageBeforeHTMLHookHandler.php M extensions/Wikibase/repo/includes/LinkedData/EntityDataRequestHandler.php M extensions/Wikibase/repo/includes/LinkedData/EntityDataSerializationService.php M extensions/Wikibase/repo/includes/Specials/SpecialMergeItems.php M extensions/Wikibase/repo/includes/Specials/SpecialModifyEntity.php M extensions/Wikibase/repo/includes/Store/DispatchingEntityStoreWatcher.php M extensions/Wikibase/repo/includes/Store/Sql/WikiPageEntityStore.php M extensions/Wikibase/repo/tests/phpunit/includes/Actions/ActionTestCase.php M extensions/Wikibase/repo/tests/phpunit/includes/Api/ApiFormatTestCase.php M extensions/Wikibase/repo/tests/phpunit/includes/Api/EntityLoadingHelperTest.php M extensions/Wikibase/repo/tests/phpunit/includes/Api/ResultBuilderTest.php M extensions/Wikibase/repo/tests/phpunit/includes/ChangeOp/SiteLinkChangeOpFactoryTest.php M extensions/Wikibase/repo/tests/phpunit/includes/Dumpers/RdfDumpGeneratorTest.php M extensions/Wikibase/repo/tests/phpunit/includes/Hooks/OutputPageBeforeHTMLHookHandlerTest.php M extensions/Wikibase/repo/tests/phpunit/includes/ItemMoveTest.php M extensions/Wikibase/repo/tests/phpunit/includes/LinkedData/EntityDataSerializationServiceTest.php M extensions/Wikibase/repo/tests/phpunit/includes/LinkedData/EntityDataTestProvider.php M
[MediaWiki-commits] [Gerrit] mediawiki...Wikidata[master]: Revert "New Wikidata Build - 2017-08-05T10:00:01+0000"
Hello WikidataBuilder, jenkins-bot, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/370325 to review the following change. Change subject: Revert "New Wikidata Build - 2017-08-05T10:00:01+" .. Revert "New Wikidata Build - 2017-08-05T10:00:01+" This reverts commit e1fed35b658072bd77c1a98974bd029c4f605398. Change-Id: I5ac0072a77245887287213031508fcec5ffea390 --- M composer.lock M extensions/ArticlePlaceholder/includes/ItemNotabilityFilter.php M extensions/ArticlePlaceholder/includes/SearchHookHandler.php M extensions/ArticlePlaceholder/includes/specials/SpecialAboutTopic.php M extensions/ArticlePlaceholder/tests/phpunit/includes/AboutTopicRendererTest.php M extensions/ArticlePlaceholder/tests/phpunit/includes/BaseTemplateToolboxHookHandlerTest.php M extensions/ArticlePlaceholder/tests/phpunit/includes/specials/SpecialAboutTopicTest.php M extensions/Constraints/tests/phpunit/Api/CheckConstraintsTest.php M extensions/Constraints/tests/phpunit/DelegatingConstraintCheckerTest.php M extensions/Wikibase/.mailmap M extensions/Wikibase/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php M extensions/Wikibase/client/tests/phpunit/includes/ChangeNotificationJobTest.php M extensions/Wikibase/client/tests/phpunit/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibraryTest.php M extensions/Wikibase/client/tests/phpunit/includes/DataAccess/StatementTransclusionInteractorTest.php M extensions/Wikibase/data-access/src/DispatchingServiceFactory.php M extensions/Wikibase/data-access/src/RepositoryServiceContainer.php M extensions/Wikibase/data-access/tests/phpunit/DispatchingServiceFactoryTest.php M extensions/Wikibase/data-access/tests/phpunit/RepositoryServiceContainerTest.php M extensions/Wikibase/lib/includes/Store/CachingEntityRevisionLookup.php M extensions/Wikibase/lib/includes/Store/DispatchingEntityRevisionLookup.php M extensions/Wikibase/lib/includes/Store/EntityRevision.php M extensions/Wikibase/lib/includes/Store/EntityRevisionLookup.php M extensions/Wikibase/lib/includes/Store/EntityStore.php M extensions/Wikibase/lib/includes/Store/EntityStoreWatcher.php M extensions/Wikibase/lib/includes/Store/Sql/PrefetchingWikiPageEntityMetaDataAccessor.php M extensions/Wikibase/lib/includes/Store/Sql/WikiPageEntityMetaDataLookup.php M extensions/Wikibase/lib/includes/Store/Sql/WikiPageEntityRevisionLookup.php M extensions/Wikibase/lib/tests/phpunit/EntityRevisionLookupTest.php M extensions/Wikibase/lib/tests/phpunit/MockRepository.php M extensions/Wikibase/lib/tests/phpunit/MockRepositoryTest.php M extensions/Wikibase/lib/tests/phpunit/Store/CachingEntityRevisionLookupTest.php M extensions/Wikibase/lib/tests/phpunit/Store/DispatchingEntityRevisionLookupTest.php M extensions/Wikibase/lib/tests/phpunit/Store/DispatchingTermBufferTest.php M extensions/Wikibase/lib/tests/phpunit/Store/EntityRevisionTest.php M extensions/Wikibase/lib/tests/phpunit/Store/PrefetchingWikiPageEntityMetaDataAccessorTest.php M extensions/Wikibase/lib/tests/phpunit/Store/Sql/SqlEntityInfoBuilderTest.php M extensions/Wikibase/repo/Wikibase.hooks.php M extensions/Wikibase/repo/i18n/ca.json M extensions/Wikibase/repo/i18n/cs.json M extensions/Wikibase/repo/i18n/lb.json M extensions/Wikibase/repo/includes/Api/EntityLoadingHelper.php M extensions/Wikibase/repo/includes/Api/GetEntities.php M extensions/Wikibase/repo/includes/Api/MergeItems.php M extensions/Wikibase/repo/includes/Api/ResultBuilder.php M extensions/Wikibase/repo/includes/Content/EntityContent.php M extensions/Wikibase/repo/includes/EditEntity.php M extensions/Wikibase/repo/includes/Hooks/OutputPageBeforeHTMLHookHandler.php M extensions/Wikibase/repo/includes/LinkedData/EntityDataRequestHandler.php M extensions/Wikibase/repo/includes/LinkedData/EntityDataSerializationService.php M extensions/Wikibase/repo/includes/Specials/SpecialMergeItems.php M extensions/Wikibase/repo/includes/Specials/SpecialModifyEntity.php M extensions/Wikibase/repo/includes/Store/DispatchingEntityStoreWatcher.php M extensions/Wikibase/repo/includes/Store/Sql/WikiPageEntityStore.php M extensions/Wikibase/repo/tests/phpunit/includes/Actions/ActionTestCase.php M extensions/Wikibase/repo/tests/phpunit/includes/Api/ApiFormatTestCase.php M extensions/Wikibase/repo/tests/phpunit/includes/Api/EntityLoadingHelperTest.php M extensions/Wikibase/repo/tests/phpunit/includes/Api/ResultBuilderTest.php M extensions/Wikibase/repo/tests/phpunit/includes/ChangeOp/SiteLinkChangeOpFactoryTest.php M extensions/Wikibase/repo/tests/phpunit/includes/Dumpers/RdfDumpGeneratorTest.php M extensions/Wikibase/repo/tests/phpunit/includes/Hooks/OutputPageBeforeHTMLHookHandlerTest.php M extensions/Wikibase/repo/tests/phpunit/includes/ItemMoveTest.php M extensions/Wikibase/repo/tests/phpunit/includes/LinkedData/EntityDataSerializationServiceTest.php M
[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Update QUnit tests to use assert.expect() instead
Thiemo Mättig (WMDE) has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/370324 ) Change subject: Update QUnit tests to use assert.expect() instead .. Update QUnit tests to use assert.expect() instead This is a baseline to make all our tests more compatible with future QUnit versions. I'm removing all numbers that are super trivial. For example, if there is only one assertion, the test will create a warning anyway if this assertion is not executed. Bug: T170515 Change-Id: Ie59c73f2c3e6687803f8619ca8868869bf903208 --- M lib/tests/qunit/wikibase.sites.tests.js M lib/tests/qunit/wikibase.tests.js M view/tests/qunit/jquery/jquery.util.EventSingletonManager.tests.js M view/tests/qunit/jquery/ui/jquery.ui.closeable.tests.js M view/tests/qunit/jquery/ui/jquery.ui.tagadata.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.aliasesview.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.badgeselector.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.descriptionview.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.entityselector.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.entitytermsforlanguageview.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.labelview.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.pagesuggester.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.sitelinkgroupview.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.sitelinklistview.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.sitelinkview.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.snaklistview.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.statementview.tests.js M view/tests/qunit/jquery/wikibase/toolbar/jquery.wikibase.toolbarbutton.tests.js M view/tests/qunit/wikibase/store/store.CachingEntityStore.tests.js M view/tests/qunit/wikibase/store/store.CombiningEntityStore.tests.js M view/tests/qunit/wikibase/wikibase.getLanguageNameByCode.tests.js 21 files changed, 52 insertions(+), 35 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/24/370324/1 diff --git a/lib/tests/qunit/wikibase.sites.tests.js b/lib/tests/qunit/wikibase.sites.tests.js index 08bb363..a907028 100644 --- a/lib/tests/qunit/wikibase.sites.tests.js +++ b/lib/tests/qunit/wikibase.sites.tests.js @@ -53,7 +53,7 @@ } } ) ); - QUnit.test( 'basic', 1, function ( assert ) { + QUnit.test( 'basic', function ( assert ) { assert.ok( wb.sites instanceof Object, 'initiated wikibase object' @@ -118,7 +118,7 @@ } ); } ); - QUnit.test( 'wikibase.sites.getSite()', 2, function ( assert ) { + QUnit.test( 'wikibase.sites.getSite()', function ( assert ) { assert.ok( wb.sites.getSite( 'nnwiki' ) instanceof Site, 'trying to get a known site by its ID returns a site object' @@ -131,7 +131,7 @@ ); } ); - QUnit.test( 'wikibase.sites.hasSite()', 2, function ( assert ) { + QUnit.test( 'wikibase.sites.hasSite()', function ( assert ) { assert.strictEqual( wb.sites.hasSite( 'nnwiki' ), true, @@ -145,7 +145,7 @@ ); } ); - QUnit.test( 'wikibase.sites.getSiteGroups()', 2 + TEST_SITE_GROUPS.length, function ( assert ) { + QUnit.test( 'wikibase.sites.getSiteGroups()', function ( assert ) { assert.expect( 4 ); var siteGroups = wb.sites.getSiteGroups(); diff --git a/lib/tests/qunit/wikibase.tests.js b/lib/tests/qunit/wikibase.tests.js index 919ecd6..e0019af 100644 --- a/lib/tests/qunit/wikibase.tests.js +++ b/lib/tests/qunit/wikibase.tests.js @@ -18,7 +18,7 @@ QUnit.module( 'wikibase' ); - QUnit.test( 'basic', 1, function ( assert ) { + QUnit.test( 'basic', function ( assert ) { assert.ok( wb instanceof Object, 'initiated wikibase object' diff --git a/view/tests/qunit/jquery/jquery.util.EventSingletonManager.tests.js b/view/tests/qunit/jquery/jquery.util.EventSingletonManager.tests.js index 78c28ae..fc175e7 100644 --- a/view/tests/qunit/jquery/jquery.util.EventSingletonManager.tests.js +++ b/view/tests/qunit/jquery/jquery.util.EventSingletonManager.tests.js @@ -7,7 +7,8 @@ QUnit.module( 'jquery.util.EventSingletonManager' ); - QUnit.test( 'register() & unregister() (single source)', 2, function ( assert ) { + QUnit.test( 'register() & unregister() (single source)', function ( assert ) { + assert.expect( 2 ); var manager = new $.util.EventSingletonManager(), $source = $( '' ),
[MediaWiki-commits] [Gerrit] mediawiki...WikidataPageBanner[master]: Make QUnit test more compatible by using expect()
Thiemo Mättig (WMDE) has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/370323 ) Change subject: Make QUnit test more compatible by using expect() .. Make QUnit test more compatible by using expect() Change-Id: I3abd06180d04aa681cc82a06778ce77421683b32 --- M tests/qunit/ext.WikidataPageBanner.positionBanner/test_ext.WikidataPageBanner.positionBanner.js 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataPageBanner refs/changes/23/370323/1 diff --git a/tests/qunit/ext.WikidataPageBanner.positionBanner/test_ext.WikidataPageBanner.positionBanner.js b/tests/qunit/ext.WikidataPageBanner.positionBanner/test_ext.WikidataPageBanner.positionBanner.js index 5a60398..d429026 100644 --- a/tests/qunit/ext.WikidataPageBanner.positionBanner/test_ext.WikidataPageBanner.positionBanner.js +++ b/tests/qunit/ext.WikidataPageBanner.positionBanner/test_ext.WikidataPageBanner.positionBanner.js @@ -1,6 +1,7 @@ ( function ( mw, $ ) { QUnit.module( 'ext.WikidataPageBanner.positionBanner', QUnit.newMwEnvironment() ); - QUnit.test( 'testFocus', 10, function ( assert ) { + QUnit.test( 'testFocus', function ( assert ) { + assert.expect( 10 ); this.$wpbBannerImageContainer = $( '', { width: 600, height: 300 -- To view, visit https://gerrit.wikimedia.org/r/370323 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3abd06180d04aa681cc82a06778ce77421683b32 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikidataPageBanner Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE)___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Remove redirect handling
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/370233 ) Change subject: Remove redirect handling .. Remove redirect handling RESTBase handles redirects for us. So, there is no point in MCS having its own redirect handling or testing it. Bug: T172548 Change-Id: Icf8eca957e7bd320dedc98032332b7d0b8b24bd4 --- M lib/mwapi.js M routes/mobile-sections.js M test/features/mobile-sections/pagecontent.js M test/features/mobile-sections/shared.js 4 files changed, 16 insertions(+), 65 deletions(-) Approvals: Ppchelko: Looks good to me, but someone else must approve jenkins-bot: Verified Jdlrobson: Looks good to me, approved diff --git a/lib/mwapi.js b/lib/mwapi.js index ce3c6fc..796adeb 100644 --- a/lib/mwapi.js +++ b/lib/mwapi.js @@ -8,7 +8,6 @@ const api = require('./api-util'); const HTTPError = sUtil.HTTPError; const Title = require('mediawiki-title').Title; -const anchorencode = require('./anchorencode'); const mwapi = {}; @@ -171,7 +170,6 @@ inprop: ['protection'].join('|'), rvprop: ['ids', 'timestamp', 'user', 'contentmodel'].join('|'), titles: req.params.title, -redirects: 1, prop: props.join('|') }); @@ -208,12 +206,7 @@ && body.query.normalized && body.query.normalized[0] && body.query.normalized[0].to; const displayTitle = pageprops && pageprops.displaytitle; - const redirectInfo = body.query.redirects && body.query.redirects[0]; - let redirected = redirectInfo && redirectInfo.to; - const title = redirected || page.title; - if (redirectInfo && redirectInfo.tofragment) { - redirected += `#${anchorencode(redirectInfo.tofragment)}`; - } + const title = page.title; const thumbUrl = page.thumbnail && page.thumbnail.source; const thumb = thumbUrl ? { url: thumbUrl.replace('https:', '') @@ -234,7 +227,6 @@ title: page.title, displaytitle: displayTitle || title, normalizedtitle: normalized || title, - redirected, pageprops, image, id: page.pageid, diff --git a/routes/mobile-sections.js b/routes/mobile-sections.js index 6110b35..645e927 100644 --- a/routes/mobile-sections.js +++ b/routes/mobile-sections.js @@ -124,7 +124,6 @@ lastmodifier: input.meta.lastmodifier, displaytitle: input.meta.displaytitle, normalizedtitle: input.meta.normalizedtitle, -redirected: input.meta.redirected, wikibase_item: input.meta.pageprops && input.meta.pageprops.wikibase_item, disambiguation, description: input.meta.description, diff --git a/test/features/mobile-sections/pagecontent.js b/test/features/mobile-sections/pagecontent.js index 35d5ec0..01f9c07 100644 --- a/test/features/mobile-sections/pagecontent.js +++ b/test/features/mobile-sections/pagecontent.js @@ -129,61 +129,6 @@ }); }); -it('Page with HTML entity in redirected page title should load', () => { -const title = `User:BSitzmann_%28WMF%29%2FMCS%2FTest%2FA%26B_redirect`; -const uri = localUri(title, 'test.wikipedia.org'); -return preq.get({ uri }) -.then((res) => { -const lead = res.body.lead; -const redirectTitle = 'User:BSitzmann (WMF)/MCS/Test/A redirect'; -assert.equal(res.status, 200); -assert.equal(lead.normalizedtitle, redirectTitle); -assert.equal(lead.displaytitle, 'User:BSitzmann (WMF)/MCS/Test/A'); -assert.equal(lead.redirected, 'User:BSitzmann (WMF)/MCS/Test/A'); -}); -}); - -it('Page with % in redirected page title should load [beta cluster]', () => { -const title = `User:Pchelolo%2fRedirect_Test`; -const uri = localUri(title, 'en.wikipedia.beta.wmflabs.org'); -return preq.get({ uri }) -.then((res) => { -assert.equal(res.status, 200); -assert.equal(res.body.lead.normalizedtitle, 'User:Pchelolo/Redirect Test'); -assert.equal(res.body.lead.displaytitle, 'User:Pchelolo/Redirect Target %'); -assert.equal(res.body.lead.redirected, 'User:Pchelolo/Redirect Target %'); -}); -}); - -it('Page with % in redirected page title should load 2', () => { -const title = `User:BSitzmann_%28WMF%29%2FMCS%2FTest%2Fredirect_test2`; -const normalizedTitle = 'User:BSitzmann (WMF)/MCS/Test/redirect test2'; -const displayTitle = 'User:BSitzmann (WMF)/MCS/Test/redirect test2 target %'; -const uri = localUri(title, 'test.wikipedia.org'); -return preq.get({ uri }) -.then((res) => { -assert.equal(res.status, 200); -
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Revert "Bring back anchorencode and locutus dependency"
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/370234 ) Change subject: Revert "Bring back anchorencode and locutus dependency" .. Revert "Bring back anchorencode and locutus dependency" This reverts commit e3b9910 Bug: T172548 Change-Id: Ifd2b8cec2376dda0c4fe77746548f8f0934ad318 --- D lib/anchorencode.js M package.json D test/lib/anchorencode/anchorencode-test.js 3 files changed, 0 insertions(+), 65 deletions(-) Approvals: jenkins-bot: Verified Jdlrobson: Looks good to me, approved diff --git a/lib/anchorencode.js b/lib/anchorencode.js deleted file mode 100644 index bfe2c53..000 --- a/lib/anchorencode.js +++ /dev/null @@ -1,23 +0,0 @@ -'use strict'; - -const urlencode = require('locutus/php/url/urlencode'); - -/** - * Encodes an input string so that it can be used as an HTML anchor id - * (e.g. for a section in a page: ). - * See https://www.mediawiki.org/wiki/Manual:PAGENAMEE_encoding#Encodings_compared - * https://www.mediawiki.org/wiki/Special:Code/MediaWiki/16279 - * core/include/parser/CoreParserFunctions.php - * https://phabricator.wikimedia.org/T9059 - * https://gerrit.wikimedia.org/r/#/c/226032/ - * @param {!string} input the input string (usually the heading text of a section heading) - * @return {!string} the sanitized version of the input string so it can be used as an anchor. - */ -function anchorencode(input) { -const id = input.replace(/\s+/g, '_'); -return urlencode(id) -.replace(/%3A/g, ':') -.replace(/%/g, '.'); -} - -module.exports = anchorencode; diff --git a/package.json b/package.json index 6dbcb37..ace1ab6 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,6 @@ "express": "^4.14.0", "js-yaml": "^3.7.0", "mediawiki-title": "^0.6.3", -"locutus": "^2.0.5", "preq": "^0.5.1", "service-runner": "^2.2.5", "swagger-router": "^0.5.5", diff --git a/test/lib/anchorencode/anchorencode-test.js b/test/lib/anchorencode/anchorencode-test.js deleted file mode 100644 index 9c23c1c..000 --- a/test/lib/anchorencode/anchorencode-test.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; - -const assert = require('../../utils/assert.js'); -const anchorencode = require('../../../lib/anchorencode'); - -describe('lib:anchorencode', function() { - -this.timeout(2); // eslint-disable-line no-invalid-this - -it('anchorencode(empty) should return an empty string', () => { -assert.deepEqual(anchorencode(''), ''); -}); - -it('anchorencode("a") should return a', () => { -assert.deepEqual(anchorencode('a'), 'a'); -}); - -it('anchorencode("Z") should return Z', () => { -assert.deepEqual(anchorencode('Z'), 'Z'); -}); - -it('anchorencode(" Z ") should return Z', () => { -assert.deepEqual(anchorencode(' Z '), 'Z'); -}); - -it('anchorencode("a b c") should return a_b_c', () => { -assert.deepEqual(anchorencode('a b c'), 'a_b_c'); -}); - -it('anchorencode("a b c") should return a_b_c', () => { -assert.deepEqual(anchorencode('a b c'), 'a_b_c'); -}); - -it('anchorencode("!@#$%^&*()") should return 21.40.23.24.25.5E.26.2A.28.29', () => { -assert.deepEqual(anchorencode('!@#$%^&*()'), '21.40.23.24.25.5E.26.2A.28.29'); -}); - -it('anchorencode(":") should not be converted', () => { -assert.deepEqual(anchorencode(':'), ':'); -}); -}); -- To view, visit https://gerrit.wikimedia.org/r/370234 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifd2b8cec2376dda0c4fe77746548f8f0934ad318 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: BearNDGerrit-Reviewer: Dbrant Gerrit-Reviewer: Fjalapeno Gerrit-Reviewer: GWicke Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Jhernandez Gerrit-Reviewer: Mholloway Gerrit-Reviewer: Mhurd Gerrit-Reviewer: Mobrovac Gerrit-Reviewer: Niedzielski Gerrit-Reviewer: Ppchelko Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Quiz[master]: Use CSS and jQuery, JavaScript hook instead of window.onload
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/362793 ) Change subject: Use CSS and jQuery, JavaScript hook instead of window.onload .. Use CSS and jQuery, JavaScript hook instead of window.onload Rewrite the JavaScript file using jQuery, use the `wikipage.content` hook instead of `window.onload` to make it work in certain situations like live preview or after VisualEditor save. Change style attributes added by JavaScript and PHP to CSS classes; also make CSS work in JavaScript-less environment. Make JavaScript and CSS available on mobile (MobileFrontend). Bug: T146370 Change-Id: I0872fafce8cd50aafbc1f1c134eb89236f16c16a --- M Question.php M Quiz.class.php M extension.json M modules/ext.quiz.css M modules/ext.quiz.js M templates/Answer.mustache M templates/Question.mustache M templates/Quiz.mustache M templates/Setting.mustache M tests/phpunit/QuestionTest.php M tests/phpunit/QuizTest.php 11 files changed, 247 insertions(+), 244 deletions(-) Approvals: jenkins-bot: Verified Mvolz: Looks good to me, approved diff --git a/Question.php b/Question.php index 4868061..f6916b6 100644 --- a/Question.php +++ b/Question.php @@ -174,7 +174,9 @@ $typeId = substr( $this->mType, 0, 1 ); $typeId .= array_key_exists( 1, $matches ) ? 'c' : 'n'; foreach ( $matches as $signId => $sign ) { - $title = $disabled = $inputStyle = ''; + $attribs = []; + $attribs['type'] = $inputType; + $attribs['class'] = 'check'; // Determine the input's name and value. switch ( $typeId ) { case 'mn': @@ -195,9 +197,9 @@ break; } // Determine if the input had to be checked. - $checked = $this->mBeingCorrected && $this->mRequest->getVal( $name ) == $value - ? 'checked="checked"' - : null; + if ( $this->mBeingCorrected && $this->mRequest->getVal( $name ) == $value ) { + $attribs['checked'] = 'checked'; + } // Determine the color of the cell and modify the state of the question. switch ( $sign ) { case '+': @@ -205,42 +207,30 @@ // A single choice object with many correct proposal is a syntax error. if ( $this->mType == 'singleChoice' && $expectOn > 1 ) { $this->setState( 'error' ); - $inputStyle = 'style="outline: ' . Quiz::getColor( 'error' ) . - ' solid 3px; *border: 3px solid ' . Quiz::getColor( 'error' ) . - ';"'; - $title = 'title="' . - wfMessage( 'quiz_colorError' )->escaped() . '"'; - $disabled = 'disabled="disabled"'; + $attribs['class'] .= ' error'; + $attribs['title'] = wfMessage( 'quiz_colorError' )->escaped(); + $attribs['disabled'] = 'disabled'; } if ( $this->mBeingCorrected ) { - if ( $checked ) { + if ( array_key_exists( 'checked', $attribs ) ) { $checkedCount++; $this->setState( 'right' ); - $inputStyle = 'style="outline: ' . Quiz::getColor( 'right' ) . -
[MediaWiki-commits] [Gerrit] mediawiki...PoolCounter[master]: Show the hostname in error messages
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/366983 ) Change subject: Show the hostname in error messages .. Show the hostname in error messages It's helpful for the system administrator to know which PC server is giving connection errors and the like. Error messages from the core will not give the hostname, but they are less likely to be specific to a PC server. Bug: T65027 Change-Id: Ic8bfc927b6fa6086b7ae9cc694e848f5808ff58b --- M PoolCounterClient_body.php M PoolCounter_ConnectionManager.php M i18n/en.json M i18n/qqq.json 4 files changed, 24 insertions(+), 17 deletions(-) Approvals: Platonides: Looks good to me, approved jenkins-bot: Verified diff --git a/PoolCounterClient_body.php b/PoolCounterClient_body.php index 52066e9..07a51c8 100644 --- a/PoolCounterClient_body.php +++ b/PoolCounterClient_body.php @@ -8,6 +8,11 @@ private $conn; /** +* @var string The server host name +*/ + private $hostName; + + /** * @var PoolCounter_ConnectionManager */ static private $manager; @@ -35,7 +40,8 @@ if ( !$status->isOK() ) { return $status; } - $this->conn = $status->value; + $this->conn = $status->value['conn']; + $this->hostName = $status->value['hostName']; // Set the read timeout to be 1.5 times the pool timeout. // This allows the server to time out gracefully before we give up on it. @@ -58,11 +64,11 @@ $conn = $status->value; wfDebug( "Sending pool counter command: $cmd\n" ); if ( fwrite( $conn, "$cmd\n" ) === false ) { - return Status::newFatal( 'poolcounter-write-error' ); + return Status::newFatal( 'poolcounter-write-error', $this->hostName ); } $response = fgets( $conn ); if ( $response === false ) { - return Status::newFatal( 'poolcounter-read-error' ); + return Status::newFatal( 'poolcounter-read-error', $this->hostName ); } $response = rtrim( $response, "\r\n" ); wfDebug( "Got pool counter response: $response\n" ); @@ -85,7 +91,7 @@ default: $parts = explode( ' ', $parts[1], 2 ); $errorMsg = isset( $parts[1] ) ? $parts[1] : '(no message given)'; - return Status::newFatal( 'poolcounter-remote-error', $errorMsg ); + return Status::newFatal( 'poolcounter-remote-error', $errorMsg, $this->hostName ); } return Status::newGood( constant( "PoolCounter::$responseType" ) ); } diff --git a/PoolCounter_ConnectionManager.php b/PoolCounter_ConnectionManager.php index a1f5b62..91df439 100644 --- a/PoolCounter_ConnectionManager.php +++ b/PoolCounter_ConnectionManager.php @@ -29,12 +29,13 @@ $hashes[$hostName] = md5( $hostName . $key ); } asort( $hashes ); - $errno = $errstr = ''; + $errno = $errstr = $hostName = ''; $conn = null; foreach ( $hashes as $hostName => $hash ) { if ( isset( $this->conns[$hostName] ) ) { $this->refCounts[$hostName]++; - return Status::newGood( $this->conns[$hostName] ); + return Status::newGood( + [ 'conn' => $this->conns[$hostName], 'hostName' => $hostName ] ); } $parts = explode( ':', $hostName, 2 ); if ( count( $parts ) < 2 ) { @@ -48,12 +49,12 @@ } } if ( !$conn ) { - return Status::newFatal( 'poolcounter-connection-error', $errstr ); + return Status::newFatal( 'poolcounter-connection-error', $errstr, $hostName ); } wfDebug( "Connected to pool counter server: $hostName\n" ); $this->conns[$hostName] = $conn; $this->refCounts[$hostName] = 1; - return Status::newGood( $conn ); + return Status::newGood( [ 'conn' => $conn, 'hostName' => $hostName ] ); } /** diff --git a/i18n/en.json b/i18n/en.json index 2190e6a..10e180a 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -5,8 +5,8 @@ ] }, "poolcounter-desc": "MediaWiki client for the pool counter daemon", - "poolcounter-connection-error": "Error
[MediaWiki-commits] [Gerrit] analytics/refinery[master]: [WIP] Don't merge this
Milimetric has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/370322 ) Change subject: [WIP] Don't merge this .. [WIP] Don't merge this This change that allows us to run one-off _private snapshots more easily. I'm not sure whether you can set private_suffix to an empty string, and I haven't tested that yet. I'm just going to use this change to run the 2017-07_private snapshot, and we can decide what to do when Joseph's back. Change-Id: Ib63f27430c15872de1966fa51728211dfe6b3486 --- M oozie/mediawiki/history/datasets.xml M oozie/mediawiki/history/datasets_raw.xml M oozie/mediawiki/history/denormalize/coordinator.properties M oozie/mediawiki/history/denormalize/coordinator.xml 4 files changed, 18 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/refinery refs/changes/22/370322/1 diff --git a/oozie/mediawiki/history/datasets.xml b/oozie/mediawiki/history/datasets.xml index c2232d8..08bab57 100644 --- a/oozie/mediawiki/history/datasets.xml +++ b/oozie/mediawiki/history/datasets.xml @@ -22,7 +22,7 @@ frequency="${coord:months(1)}" initial-instance="${start_time}" timezone="Universal"> - ${mw_directory}/user_history/snapshot=${YEAR}-${MONTH} + ${mw_directory}/user_history/snapshot=${YEAR}-${MONTH}${private_suffix} _SUCCESS @@ -30,7 +30,7 @@ frequency="${coord:months(1)}" initial-instance="${start_time}" timezone="Universal"> - ${mw_directory}/page_history/snapshot=${YEAR}-${MONTH} + ${mw_directory}/page_history/snapshot=${YEAR}-${MONTH}${private_suffix} _SUCCESS @@ -38,7 +38,7 @@ frequency="${coord:months(1)}" initial-instance="${start_time}" timezone="Universal"> - ${mw_directory}/history/snapshot=${YEAR}-${MONTH} + ${mw_directory}/history/snapshot=${YEAR}-${MONTH}${private_suffix} _SUCCESS @@ -48,7 +48,7 @@ frequency="${coord:months(1)}" initial-instance="${start_time}" timezone="Universal"> - ${mw_directory}/user_history/snapshot=${YEAR}-${MONTH} + ${mw_directory}/user_history/snapshot=${YEAR}-${MONTH}${private_suffix} _PARTITIONED @@ -56,7 +56,7 @@ frequency="${coord:months(1)}" initial-instance="${start_time}" timezone="Universal"> - ${mw_directory}/page_history/snapshot=${YEAR}-${MONTH} + ${mw_directory}/page_history/snapshot=${YEAR}-${MONTH}${private_suffix} _PARTITIONED @@ -64,7 +64,7 @@ frequency="${coord:months(1)}" initial-instance="${start_time}" timezone="Universal"> - ${mw_directory}/history/snapshot=${YEAR}-${MONTH} + ${mw_directory}/history/snapshot=${YEAR}-${MONTH}${private_suffix} _PARTITIONED @@ -73,7 +73,7 @@ frequency="${coord:months(1)}" initial-instance="${start_time}" timezone="Universal"> - ${mw_directory}/metrics/snapshot=${YEAR}-${MONTH} + ${mw_directory}/metrics/snapshot=${YEAR}-${MONTH}${private_suffix} _SUCCESS diff --git a/oozie/mediawiki/history/datasets_raw.xml b/oozie/mediawiki/history/datasets_raw.xml index a672a0e..931d5e3 100644 --- a/oozie/mediawiki/history/datasets_raw.xml +++ b/oozie/mediawiki/history/datasets_raw.xml @@ -25,7 +25,7 @@ frequency="${coord:months(1)}" initial-instance="${start_time}" timezone="Universal"> - ${mw_raw_directory}/tables/archive/snapshot=${YEAR}-${MONTH} + ${mw_raw_directory}/tables/archive/snapshot=${YEAR}-${MONTH}${private_suffix} _SUCCESS @@ -33,7 +33,7 @@ frequency="${coord:months(1)}" initial-instance="${start_time}" timezone="Universal"> - ${mw_raw_directory}/tables/logging/snapshot=${YEAR}-${MONTH} + ${mw_raw_directory}/tables/logging/snapshot=${YEAR}-${MONTH}${private_suffix} _SUCCESS @@ -41,7 +41,7 @@ frequency="${coord:months(1)}" initial-instance="${start_time}" timezone="Universal"> - ${mw_raw_directory}/tables/page/snapshot=${YEAR}-${MONTH} + ${mw_raw_directory}/tables/page/snapshot=${YEAR}-${MONTH}${private_suffix} _SUCCESS @@ -49,7 +49,7 @@ frequency="${coord:months(1)}" initial-instance="${start_time}" timezone="Universal"> - ${mw_raw_directory}/tables/revision/snapshot=${YEAR}-${MONTH} + ${mw_raw_directory}/tables/revision/snapshot=${YEAR}-${MONTH}${private_suffix} _SUCCESS @@ -57,7 +57,7 @@ frequency="${coord:months(1)}" initial-instance="${start_time}"
[MediaWiki-commits] [Gerrit] mediawiki...codesniffer[master]: Enable Squiz.WhiteSpace.OperatorSpacing
Umherirrender has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/370321 ) Change subject: Enable Squiz.WhiteSpace.OperatorSpacing .. Enable Squiz.WhiteSpace.OperatorSpacing The new sniffs are autofixable Added a test case and fix failure in this repository Bug: T171393 Change-Id: Iad652c1e767bc55d5cb8f1f2cb380e7a2ae4b003 --- M MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php M MediaWiki/Sniffs/ControlStructures/AssignmentInControlStructuresSniff.php M MediaWiki/Sniffs/NamingConventions/LowerCamelFunctionsNameSniff.php M MediaWiki/Sniffs/NamingConventions/ValidGlobalNameSniff.php M MediaWiki/Sniffs/Usage/ReferenceThisSniff.php M MediaWiki/Sniffs/WhiteSpace/MultipleEmptyLinesSniff.php M MediaWiki/Sniffs/WhiteSpace/SpaceBeforeClassBraceSniff.php M MediaWiki/Sniffs/WhiteSpace/SpaceBeforeControlStructureBraceSniff.php M MediaWiki/Sniffs/WhiteSpace/SpaceBeforeSingleLineCommentSniff.php M MediaWiki/Tests/files/Usage/goto_usage.php M MediaWiki/Tests/files/generic_fail.php M MediaWiki/Tests/files/generic_fail.php.expect M MediaWiki/Tests/files/generic_fail.php.fixed M MediaWiki/ruleset.xml 14 files changed, 88 insertions(+), 43 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/codesniffer refs/changes/21/370321/1 diff --git a/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php b/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php index 443da15..4717a98 100644 --- a/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php +++ b/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php @@ -63,7 +63,7 @@ return; } $tokens = $phpcsFile->getTokens(); - $funcName = $tokens[$stackPtr+2]; + $funcName = $tokens[$stackPtr + 2]; if ( in_array( $funcName['content'], $this->skipStandardMethods ) ) { // Don't require documentation for an obvious method return; @@ -88,7 +88,7 @@ } } - $find = Tokens::$methodPrefixes; + $find = Tokens::$methodPrefixes; $find[] = T_WHITESPACE; $commentEnd = $phpcsFile->findPrevious( $find, ( $stackPtr - 1 ), null, true ); if ( $tokens[$commentEnd]['code'] === T_COMMENT ) { @@ -174,7 +174,7 @@ continue; } if ( $token['code'] === T_RETURN ) { - if ( isset( $tokens[$i+1] ) && $tokens[$i+1]['code'] === T_SEMICOLON ) { + if ( isset( $tokens[$i + 1] ) && $tokens[$i + 1]['code'] === T_SEMICOLON ) { // This is a `return;` so it doesn't need documentation continue; } @@ -256,7 +256,7 @@ continue; } $exception = null; - $comment = null; + $comment = null; if ( $tokens[( $tag + 2 )]['code'] === T_DOC_COMMENT_STRING ) { $matches = []; preg_match( '/([^\s]+)(?:\s+(.*))?/', $tokens[( $tag + 2 )]['content'], $matches ); @@ -285,38 +285,38 @@ */ protected function processParams( File $phpcsFile, $stackPtr, $commentStart ) { $tokens = $phpcsFile->getTokens(); - $params = []; + $params = []; $maxType = 0; - $maxVar = 0; + $maxVar = 0; foreach ( $tokens[$commentStart]['comment_tags'] as $pos => $tag ) { if ( $tokens[$tag]['content'] !== '@param' ) { continue; } - $type = ''; + $type = ''; $typeSpace = 0; - $var = ''; - $varSpace = 0; - $comment = ''; + $var = ''; + $varSpace = 0; + $comment = ''; if ( $tokens[( $tag + 2 )]['code'] === T_DOC_COMMENT_STRING ) { $matches = []; preg_match( '/([^$&.]+)(?:((?:\.\.\.)?(?:\$|&)[^\s]+)(?:(\s+)(.*))?)?/', $tokens[( $tag + 2 )]['content'], $matches ); - $typeLen = strlen( $matches[1] ); - $type = trim( $matches[1] ); + $typeLen = strlen( $matches[1] ); + $type = trim( $matches[1] ); $typeSpace = ( $typeLen - strlen( $type ) ); -
[MediaWiki-commits] [Gerrit] analytics/refinery[master]: Disable nonexistent wikis
Milimetric has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/370320 ) Change subject: Disable nonexistent wikis .. Disable nonexistent wikis Change-Id: I0fa4d90fe4a5a70e708f18f4b2eec5a49a8434f9 --- M static_data/mediawiki/grouped_wikis/prod_grouped_wikis.csv 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Milimetric: Verified; Looks good to me, approved diff --git a/static_data/mediawiki/grouped_wikis/prod_grouped_wikis.csv b/static_data/mediawiki/grouped_wikis/prod_grouped_wikis.csv index ea96b33..1921782 100644 --- a/static_data/mediawiki/grouped_wikis/prod_grouped_wikis.csv +++ b/static_data/mediawiki/grouped_wikis/prod_grouped_wikis.csv @@ -734,5 +734,5 @@ arwikimedia,13,224 cnwikimedia,13,155 loginwiki,13,17 -labtestwiki,13,0 -labswiki,13,0 +# labtestwiki,13,0 +# labswiki,13,0 -- To view, visit https://gerrit.wikimedia.org/r/370320 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0fa4d90fe4a5a70e708f18f4b2eec5a49a8434f9 Gerrit-PatchSet: 1 Gerrit-Project: analytics/refinery Gerrit-Branch: master Gerrit-Owner: MilimetricGerrit-Reviewer: Milimetric ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] analytics/refinery[master]: Disable nonexistent wikis
Milimetric has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/370320 ) Change subject: Disable nonexistent wikis .. Disable nonexistent wikis Change-Id: I0fa4d90fe4a5a70e708f18f4b2eec5a49a8434f9 --- M static_data/mediawiki/grouped_wikis/prod_grouped_wikis.csv 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/refinery refs/changes/20/370320/1 diff --git a/static_data/mediawiki/grouped_wikis/prod_grouped_wikis.csv b/static_data/mediawiki/grouped_wikis/prod_grouped_wikis.csv index ea96b33..1921782 100644 --- a/static_data/mediawiki/grouped_wikis/prod_grouped_wikis.csv +++ b/static_data/mediawiki/grouped_wikis/prod_grouped_wikis.csv @@ -734,5 +734,5 @@ arwikimedia,13,224 cnwikimedia,13,155 loginwiki,13,17 -labtestwiki,13,0 -labswiki,13,0 +# labtestwiki,13,0 +# labswiki,13,0 -- To view, visit https://gerrit.wikimedia.org/r/370320 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0fa4d90fe4a5a70e708f18f4b2eec5a49a8434f9 Gerrit-PatchSet: 1 Gerrit-Project: analytics/refinery Gerrit-Branch: master Gerrit-Owner: Milimetric___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...WikimediaMaintenance[wmf/1.30.0-wmf.12]: Add OAuth
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/370319 ) Change subject: Add OAuth .. Add OAuth Minor stylisation Change-Id: Ie039ecff45b0b0ecf2780e3b00f2acd54126bc6d (cherry picked from commit 00ff0703768b3110c31c0c6eecfc013cf6f23add) --- M createExtensionTables.php 1 file changed, 8 insertions(+), 6 deletions(-) Approvals: Reedy: Looks good to me, approved jenkins-bot: Verified diff --git a/createExtensionTables.php b/createExtensionTables.php index 2acb4eb..8b97b84 100644 --- a/createExtensionTables.php +++ b/createExtensionTables.php @@ -44,6 +44,7 @@ $files = [ 'babel.sql' ]; $path = "$IP/extensions/Babel"; break; + case 'echo': $this->output( "Using special database connection for Echo" ); $dbw = MWEchoDbFactory::newFromDefault()->getEchoDb( DB_MASTER ); @@ -86,10 +87,13 @@ break; case 'oathauth': - $files = [ - 'tables.sql', - ]; + $files = [ 'tables.sql' ]; $path = "$IP/extensions/OATHAuth/sql/mysql"; + break; + + case 'oauth': + $files = [ 'OAuth.sql' ]; + $path = "$IP/extensions/OAuth/backend/schema/mysql"; break; case 'ores': @@ -109,9 +113,7 @@ break; case 'shorturl': - $files = [ - 'shorturls.sql', - ]; + $files = [ 'shorturls.sql' ]; $path = "$IP/extensions/ShortUrl/schemas"; break; -- To view, visit https://gerrit.wikimedia.org/r/370319 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie039ecff45b0b0ecf2780e3b00f2acd54126bc6d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikimediaMaintenance Gerrit-Branch: wmf/1.30.0-wmf.12 Gerrit-Owner: ReedyGerrit-Reviewer: Reedy Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...WikimediaMaintenance[wmf/1.30.0-wmf.12]: Add OAuth
Reedy has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/370319 ) Change subject: Add OAuth .. Add OAuth Minor stylisation Change-Id: Ie039ecff45b0b0ecf2780e3b00f2acd54126bc6d (cherry picked from commit 00ff0703768b3110c31c0c6eecfc013cf6f23add) --- M createExtensionTables.php 1 file changed, 8 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaMaintenance refs/changes/19/370319/1 diff --git a/createExtensionTables.php b/createExtensionTables.php index 2acb4eb..8b97b84 100644 --- a/createExtensionTables.php +++ b/createExtensionTables.php @@ -44,6 +44,7 @@ $files = [ 'babel.sql' ]; $path = "$IP/extensions/Babel"; break; + case 'echo': $this->output( "Using special database connection for Echo" ); $dbw = MWEchoDbFactory::newFromDefault()->getEchoDb( DB_MASTER ); @@ -86,10 +87,13 @@ break; case 'oathauth': - $files = [ - 'tables.sql', - ]; + $files = [ 'tables.sql' ]; $path = "$IP/extensions/OATHAuth/sql/mysql"; + break; + + case 'oauth': + $files = [ 'OAuth.sql' ]; + $path = "$IP/extensions/OAuth/backend/schema/mysql"; break; case 'ores': @@ -109,9 +113,7 @@ break; case 'shorturl': - $files = [ - 'shorturls.sql', - ]; + $files = [ 'shorturls.sql' ]; $path = "$IP/extensions/ShortUrl/schemas"; break; -- To view, visit https://gerrit.wikimedia.org/r/370319 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie039ecff45b0b0ecf2780e3b00f2acd54126bc6d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikimediaMaintenance Gerrit-Branch: wmf/1.30.0-wmf.12 Gerrit-Owner: Reedy___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...WikimediaMaintenance[master]: Add OAuth
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/370318 ) Change subject: Add OAuth .. Add OAuth Minor stylisation Change-Id: Ie039ecff45b0b0ecf2780e3b00f2acd54126bc6d --- M createExtensionTables.php 1 file changed, 8 insertions(+), 6 deletions(-) Approvals: Reedy: Looks good to me, approved jenkins-bot: Verified diff --git a/createExtensionTables.php b/createExtensionTables.php index 2acb4eb..8b97b84 100644 --- a/createExtensionTables.php +++ b/createExtensionTables.php @@ -44,6 +44,7 @@ $files = [ 'babel.sql' ]; $path = "$IP/extensions/Babel"; break; + case 'echo': $this->output( "Using special database connection for Echo" ); $dbw = MWEchoDbFactory::newFromDefault()->getEchoDb( DB_MASTER ); @@ -86,10 +87,13 @@ break; case 'oathauth': - $files = [ - 'tables.sql', - ]; + $files = [ 'tables.sql' ]; $path = "$IP/extensions/OATHAuth/sql/mysql"; + break; + + case 'oauth': + $files = [ 'OAuth.sql' ]; + $path = "$IP/extensions/OAuth/backend/schema/mysql"; break; case 'ores': @@ -109,9 +113,7 @@ break; case 'shorturl': - $files = [ - 'shorturls.sql', - ]; + $files = [ 'shorturls.sql' ]; $path = "$IP/extensions/ShortUrl/schemas"; break; -- To view, visit https://gerrit.wikimedia.org/r/370318 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie039ecff45b0b0ecf2780e3b00f2acd54126bc6d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikimediaMaintenance Gerrit-Branch: master Gerrit-Owner: ReedyGerrit-Reviewer: Reedy Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix return hint type in DatabaseSqlite::makeUpdateOptionsArray
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/370237 ) Change subject: Fix return hint type in DatabaseSqlite::makeUpdateOptionsArray .. Fix return hint type in DatabaseSqlite::makeUpdateOptionsArray Change-Id: Id45ddcef9212dfa8fd9545b70aff67cd29dda1d9 --- M includes/libs/rdbms/database/DatabaseSqlite.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Umherirrender: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/libs/rdbms/database/DatabaseSqlite.php b/includes/libs/rdbms/database/DatabaseSqlite.php index 9242414d..870fc3e 100644 --- a/includes/libs/rdbms/database/DatabaseSqlite.php +++ b/includes/libs/rdbms/database/DatabaseSqlite.php @@ -567,7 +567,7 @@ /** * @param array $options -* @return string +* @return array */ protected function makeUpdateOptionsArray( $options ) { $options = parent::makeUpdateOptionsArray( $options ); -- To view, visit https://gerrit.wikimedia.org/r/370237 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id45ddcef9212dfa8fd9545b70aff67cd29dda1d9 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: ReedyGerrit-Reviewer: Umherirrender Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...WikimediaMaintenance[master]: Add OAuth
Reedy has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/370318 ) Change subject: Add OAuth .. Add OAuth Minor stylisation Change-Id: Ie039ecff45b0b0ecf2780e3b00f2acd54126bc6d --- M createExtensionTables.php 1 file changed, 8 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaMaintenance refs/changes/18/370318/1 diff --git a/createExtensionTables.php b/createExtensionTables.php index 2acb4eb..8b97b84 100644 --- a/createExtensionTables.php +++ b/createExtensionTables.php @@ -44,6 +44,7 @@ $files = [ 'babel.sql' ]; $path = "$IP/extensions/Babel"; break; + case 'echo': $this->output( "Using special database connection for Echo" ); $dbw = MWEchoDbFactory::newFromDefault()->getEchoDb( DB_MASTER ); @@ -86,10 +87,13 @@ break; case 'oathauth': - $files = [ - 'tables.sql', - ]; + $files = [ 'tables.sql' ]; $path = "$IP/extensions/OATHAuth/sql/mysql"; + break; + + case 'oauth': + $files = [ 'OAuth.sql' ]; + $path = "$IP/extensions/OAuth/backend/schema/mysql"; break; case 'ores': @@ -109,9 +113,7 @@ break; case 'shorturl': - $files = [ - 'shorturls.sql', - ]; + $files = [ 'shorturls.sql' ]; $path = "$IP/extensions/ShortUrl/schemas"; break; -- To view, visit https://gerrit.wikimedia.org/r/370318 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie039ecff45b0b0ecf2780e3b00f2acd54126bc6d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikimediaMaintenance Gerrit-Branch: master Gerrit-Owner: Reedy___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix type hints for parameter documentation
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/370226 ) Change subject: Fix type hints for parameter documentation .. Fix type hints for parameter documentation Fix double space Change-Id: Ied34a05b2043a3354ff0629d8bb47a1176d8a74e --- M includes/installer/DatabaseUpdater.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Umherirrender: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/installer/DatabaseUpdater.php b/includes/installer/DatabaseUpdater.php index 7b6ac5e..8f5858b 100644 --- a/includes/installer/DatabaseUpdater.php +++ b/includes/installer/DatabaseUpdater.php @@ -940,10 +940,10 @@ * * @param string $table Name of the table to modify * @param string $patch Name of the patch file to apply -* @param string $fullpath Whether to treat $patch path as relative or not, defaults to false +* @param string|bool $fullpath Whether to treat $patch path as relative or not, defaults to false * @return bool False if this was skipped because of schema changes being skipped */ - public function modifyTable( $table, $patch, $fullpath = false ) { + public function modifyTable( $table, $patch, $fullpath = false ) { if ( !$this->doTable( $table ) ) { return true; } -- To view, visit https://gerrit.wikimedia.org/r/370226 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ied34a05b2043a3354ff0629d8bb47a1176d8a74e Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: ReedyGerrit-Reviewer: Umherirrender Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: [ReadingLists] Register extension
Raimond Spekking has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/370317 ) Change subject: [ReadingLists] Register extension .. [ReadingLists] Register extension Change-Id: I09cecd997d3434201254f115bb38913ecd9c1ed7 --- M groups/MediaWiki/mediawiki-extensions.txt 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/17/370317/1 diff --git a/groups/MediaWiki/mediawiki-extensions.txt b/groups/MediaWiki/mediawiki-extensions.txt index 5a5a8b1..a25511e 100644 --- a/groups/MediaWiki/mediawiki-extensions.txt +++ b/groups/MediaWiki/mediawiki-extensions.txt @@ -2116,6 +2116,8 @@ file = ReaderFeedback/i18n/ratinghistory/%CODE%.json descmsg = ratinghistory +Reading Lists + Reassign Edits aliasfile = ReassignEdits/ReassignEdits.alias.php -- To view, visit https://gerrit.wikimedia.org/r/370317 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I09cecd997d3434201254f115bb38913ecd9c1ed7 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Raimond Spekking___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: [ReadingLists] Register extension
Raimond Spekking has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/370317 ) Change subject: [ReadingLists] Register extension .. [ReadingLists] Register extension Change-Id: I09cecd997d3434201254f115bb38913ecd9c1ed7 --- M groups/MediaWiki/mediawiki-extensions.txt 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Raimond Spekking: Verified; Looks good to me, approved diff --git a/groups/MediaWiki/mediawiki-extensions.txt b/groups/MediaWiki/mediawiki-extensions.txt index 5a5a8b1..a25511e 100644 --- a/groups/MediaWiki/mediawiki-extensions.txt +++ b/groups/MediaWiki/mediawiki-extensions.txt @@ -2116,6 +2116,8 @@ file = ReaderFeedback/i18n/ratinghistory/%CODE%.json descmsg = ratinghistory +Reading Lists + Reassign Edits aliasfile = ReassignEdits/ReassignEdits.alias.php -- To view, visit https://gerrit.wikimedia.org/r/370317 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I09cecd997d3434201254f115bb38913ecd9c1ed7 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Raimond SpekkingGerrit-Reviewer: Raimond Spekking ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: [CategoryWatch] Register extension
Raimond Spekking has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/370316 ) Change subject: [CategoryWatch] Register extension .. [CategoryWatch] Register extension Change-Id: Ib70488cb7d41b5c17c1c90f2902b6912581b8fa0 --- M groups/MediaWiki/mediawiki-extensions.txt 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Raimond Spekking: Verified; Looks good to me, approved diff --git a/groups/MediaWiki/mediawiki-extensions.txt b/groups/MediaWiki/mediawiki-extensions.txt index 3cc4732..5a5a8b1 100644 --- a/groups/MediaWiki/mediawiki-extensions.txt +++ b/groups/MediaWiki/mediawiki-extensions.txt @@ -570,6 +570,8 @@ ignored = categorytree-collapse-bullet, categorytree-page-bullet, categorytree-member-num optional = categorytree-expand-bullet, categorytree-empty-bullet +Category Watch + Central Auth aliasfile = CentralAuth/CentralAuth.alias.php optional = centralauth-editset-grouplink, centralauth-listusers-item -- To view, visit https://gerrit.wikimedia.org/r/370316 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib70488cb7d41b5c17c1c90f2902b6912581b8fa0 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Raimond SpekkingGerrit-Reviewer: Raimond Spekking ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: [CategoryWatch] Register extension
Raimond Spekking has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/370316 ) Change subject: [CategoryWatch] Register extension .. [CategoryWatch] Register extension Change-Id: Ib70488cb7d41b5c17c1c90f2902b6912581b8fa0 --- M groups/MediaWiki/mediawiki-extensions.txt 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/16/370316/1 diff --git a/groups/MediaWiki/mediawiki-extensions.txt b/groups/MediaWiki/mediawiki-extensions.txt index 3cc4732..5a5a8b1 100644 --- a/groups/MediaWiki/mediawiki-extensions.txt +++ b/groups/MediaWiki/mediawiki-extensions.txt @@ -570,6 +570,8 @@ ignored = categorytree-collapse-bullet, categorytree-page-bullet, categorytree-member-num optional = categorytree-expand-bullet, categorytree-empty-bullet +Category Watch + Central Auth aliasfile = CentralAuth/CentralAuth.alias.php optional = centralauth-editset-grouplink, centralauth-listusers-item -- To view, visit https://gerrit.wikimedia.org/r/370316 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib70488cb7d41b5c17c1c90f2902b6912581b8fa0 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Raimond Spekking___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: mediawiki: Another increase of batch size in dispatchChanges...
Ladsgroup has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/370315 ) Change subject: mediawiki: Another increase of batch size in dispatchChanges cronjob .. mediawiki: Another increase of batch size in dispatchChanges cronjob The load on terbium is fine and the original increase helped but still some increase is needed to fully handle the flow Bug: T171263 Change-Id: I6777ac7af03c624182a81345f1867e41902b2156 --- M modules/mediawiki/manifests/maintenance/wikidata.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/15/370315/1 diff --git a/modules/mediawiki/manifests/maintenance/wikidata.pp b/modules/mediawiki/manifests/maintenance/wikidata.pp index 6d6abe7..80b6075 100644 --- a/modules/mediawiki/manifests/maintenance/wikidata.pp +++ b/modules/mediawiki/manifests/maintenance/wikidata.pp @@ -6,7 +6,7 @@ # This handles inserting jobs into client job queue, which then process the changes cron { 'wikibase-dispatch-changes4': ensure => $ensure, -command => '/usr/local/bin/mwscript extensions/Wikidata/extensions/Wikibase/repo/maintenance/dispatchChanges.php --wiki wikidatawiki --max-time 540 --batch-size 350 --dispatch-interval 25 --lock-grace-interval 200 >/dev/null 2>&1', +command => '/usr/local/bin/mwscript extensions/Wikidata/extensions/Wikibase/repo/maintenance/dispatchChanges.php --wiki wikidatawiki --max-time 540 --batch-size 420 --dispatch-interval 25 --lock-grace-interval 200 >/dev/null 2>&1', user=> $::mediawiki::users::web, minute => '*/3', } -- To view, visit https://gerrit.wikimedia.org/r/370315 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6777ac7af03c624182a81345f1867e41902b2156 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ladsgroup___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: [SemanticFormsInputs] Unregister: Read only since a while
Raimond Spekking has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/370314 ) Change subject: [SemanticFormsInputs] Unregister: Read only since a while .. [SemanticFormsInputs] Unregister: Read only since a while Change-Id: Ic885a724f1e8fca211c39ab4643226217b00f46d --- M groups/MediaWiki/mediawiki-extensions.txt 1 file changed, 1 insertion(+), 3 deletions(-) Approvals: Raimond Spekking: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/groups/MediaWiki/mediawiki-extensions.txt b/groups/MediaWiki/mediawiki-extensions.txt index 96d67a5..3cc4732 100644 --- a/groups/MediaWiki/mediawiki-extensions.txt +++ b/groups/MediaWiki/mediawiki-extensions.txt @@ -2231,7 +2231,7 @@ Semantic Expressiveness magicfile = SemanticExpressiveness/SemanticExpressiveness.i18n.magic.php -Semantic Forms Inputs +# Semantic Forms Inputs // Read only Semantic Genealogy optional = semanticgenealogy-gedcomexport-link @@ -2332,8 +2332,6 @@ Smooth Gallery magicfile = SmoothGallery/SmoothGallery.i18n.magic.php ignored = smoothgallery-pagetext - -# Snippet // No message documentation, inactive per T154220 Social Profile aliasfile = SocialProfile/SocialProfile.alias.php -- To view, visit https://gerrit.wikimedia.org/r/370314 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic885a724f1e8fca211c39ab4643226217b00f46d Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Raimond SpekkingGerrit-Reviewer: Raimond Spekking Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: [SemanticFormsInputs] Unregister: Read only since a while
Raimond Spekking has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/370314 ) Change subject: [SemanticFormsInputs] Unregister: Read only since a while .. [SemanticFormsInputs] Unregister: Read only since a while Change-Id: Ic885a724f1e8fca211c39ab4643226217b00f46d --- M groups/MediaWiki/mediawiki-extensions.txt 1 file changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/14/370314/1 diff --git a/groups/MediaWiki/mediawiki-extensions.txt b/groups/MediaWiki/mediawiki-extensions.txt index 96d67a5..3cc4732 100644 --- a/groups/MediaWiki/mediawiki-extensions.txt +++ b/groups/MediaWiki/mediawiki-extensions.txt @@ -2231,7 +2231,7 @@ Semantic Expressiveness magicfile = SemanticExpressiveness/SemanticExpressiveness.i18n.magic.php -Semantic Forms Inputs +# Semantic Forms Inputs // Read only Semantic Genealogy optional = semanticgenealogy-gedcomexport-link @@ -2332,8 +2332,6 @@ Smooth Gallery magicfile = SmoothGallery/SmoothGallery.i18n.magic.php ignored = smoothgallery-pagetext - -# Snippet // No message documentation, inactive per T154220 Social Profile aliasfile = SocialProfile/SocialProfile.alias.php -- To view, visit https://gerrit.wikimedia.org/r/370314 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic885a724f1e8fca211c39ab4643226217b00f46d Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Raimond Spekking___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Wikidata[master]: New Wikidata Build - 2017-08-05T10:00:01+0000
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/370309 ) Change subject: New Wikidata Build - 2017-08-05T10:00:01+ .. New Wikidata Build - 2017-08-05T10:00:01+ Change-Id: I471052fcc34ed9ed598f22c32db4d2e82a35bb63 --- M composer.lock M extensions/ArticlePlaceholder/includes/ItemNotabilityFilter.php M extensions/ArticlePlaceholder/includes/SearchHookHandler.php M extensions/ArticlePlaceholder/includes/specials/SpecialAboutTopic.php M extensions/ArticlePlaceholder/tests/phpunit/includes/AboutTopicRendererTest.php M extensions/ArticlePlaceholder/tests/phpunit/includes/BaseTemplateToolboxHookHandlerTest.php M extensions/ArticlePlaceholder/tests/phpunit/includes/specials/SpecialAboutTopicTest.php M extensions/Constraints/tests/phpunit/Api/CheckConstraintsTest.php M extensions/Constraints/tests/phpunit/DelegatingConstraintCheckerTest.php M extensions/Wikibase/.mailmap M extensions/Wikibase/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php M extensions/Wikibase/client/tests/phpunit/includes/ChangeNotificationJobTest.php M extensions/Wikibase/client/tests/phpunit/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibraryTest.php M extensions/Wikibase/client/tests/phpunit/includes/DataAccess/StatementTransclusionInteractorTest.php M extensions/Wikibase/data-access/src/DispatchingServiceFactory.php M extensions/Wikibase/data-access/src/RepositoryServiceContainer.php M extensions/Wikibase/data-access/tests/phpunit/DispatchingServiceFactoryTest.php M extensions/Wikibase/data-access/tests/phpunit/RepositoryServiceContainerTest.php M extensions/Wikibase/lib/includes/Store/CachingEntityRevisionLookup.php M extensions/Wikibase/lib/includes/Store/DispatchingEntityRevisionLookup.php M extensions/Wikibase/lib/includes/Store/EntityRevision.php M extensions/Wikibase/lib/includes/Store/EntityRevisionLookup.php M extensions/Wikibase/lib/includes/Store/EntityStore.php M extensions/Wikibase/lib/includes/Store/EntityStoreWatcher.php M extensions/Wikibase/lib/includes/Store/Sql/PrefetchingWikiPageEntityMetaDataAccessor.php M extensions/Wikibase/lib/includes/Store/Sql/WikiPageEntityMetaDataLookup.php M extensions/Wikibase/lib/includes/Store/Sql/WikiPageEntityRevisionLookup.php M extensions/Wikibase/lib/tests/phpunit/EntityRevisionLookupTest.php M extensions/Wikibase/lib/tests/phpunit/MockRepository.php M extensions/Wikibase/lib/tests/phpunit/MockRepositoryTest.php M extensions/Wikibase/lib/tests/phpunit/Store/CachingEntityRevisionLookupTest.php M extensions/Wikibase/lib/tests/phpunit/Store/DispatchingEntityRevisionLookupTest.php M extensions/Wikibase/lib/tests/phpunit/Store/DispatchingTermBufferTest.php M extensions/Wikibase/lib/tests/phpunit/Store/EntityRevisionTest.php M extensions/Wikibase/lib/tests/phpunit/Store/PrefetchingWikiPageEntityMetaDataAccessorTest.php M extensions/Wikibase/lib/tests/phpunit/Store/Sql/SqlEntityInfoBuilderTest.php M extensions/Wikibase/repo/Wikibase.hooks.php M extensions/Wikibase/repo/i18n/ca.json M extensions/Wikibase/repo/i18n/cs.json M extensions/Wikibase/repo/i18n/lb.json M extensions/Wikibase/repo/includes/Api/EntityLoadingHelper.php M extensions/Wikibase/repo/includes/Api/GetEntities.php M extensions/Wikibase/repo/includes/Api/MergeItems.php M extensions/Wikibase/repo/includes/Api/ResultBuilder.php M extensions/Wikibase/repo/includes/Content/EntityContent.php M extensions/Wikibase/repo/includes/EditEntity.php M extensions/Wikibase/repo/includes/Hooks/OutputPageBeforeHTMLHookHandler.php M extensions/Wikibase/repo/includes/LinkedData/EntityDataRequestHandler.php M extensions/Wikibase/repo/includes/LinkedData/EntityDataSerializationService.php M extensions/Wikibase/repo/includes/Specials/SpecialMergeItems.php M extensions/Wikibase/repo/includes/Specials/SpecialModifyEntity.php M extensions/Wikibase/repo/includes/Store/DispatchingEntityStoreWatcher.php M extensions/Wikibase/repo/includes/Store/Sql/WikiPageEntityStore.php M extensions/Wikibase/repo/tests/phpunit/includes/Actions/ActionTestCase.php M extensions/Wikibase/repo/tests/phpunit/includes/Api/ApiFormatTestCase.php M extensions/Wikibase/repo/tests/phpunit/includes/Api/EntityLoadingHelperTest.php M extensions/Wikibase/repo/tests/phpunit/includes/Api/ResultBuilderTest.php M extensions/Wikibase/repo/tests/phpunit/includes/ChangeOp/SiteLinkChangeOpFactoryTest.php M extensions/Wikibase/repo/tests/phpunit/includes/Dumpers/RdfDumpGeneratorTest.php M extensions/Wikibase/repo/tests/phpunit/includes/Hooks/OutputPageBeforeHTMLHookHandlerTest.php M extensions/Wikibase/repo/tests/phpunit/includes/ItemMoveTest.php M extensions/Wikibase/repo/tests/phpunit/includes/LinkedData/EntityDataSerializationServiceTest.php M extensions/Wikibase/repo/tests/phpunit/includes/LinkedData/EntityDataTestProvider.php M extensions/Wikibase/repo/tests/phpunit/includes/ParserOutput/PageImagesDataUpdaterTest.php M
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Translate sitename for nl.wikinews
MarcoAurelio has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/370313 ) Change subject: Translate sitename for nl.wikinews .. Translate sitename for nl.wikinews Bug: T172594 Change-Id: I1735529ca755d208e9cf1897ba4fa3e5b9f3d734 --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/13/370313/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index bea92dc..25adc51 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -2279,6 +2279,7 @@ 'newiki' => 'विकिपीडिया', 'newikibooks' => 'विकिपुस्तक', // T124881 'nlwiktionary' => 'WikiWoordenboek', + 'nlwikinews' => 'Wikinieuws', // T172594 'noboard_chapterswikimedia' => 'Wikimedia Norway Internal Board', 'nostalgiawiki' => 'Wikipedia', 'nowikibooks' => 'Wikibøker', -- To view, visit https://gerrit.wikimedia.org/r/370313 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1735529ca755d208e9cf1897ba4fa3e5b9f3d734 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: MarcoAurelio___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...codesniffer[master]: Added OpeningKeywordBraceSniff
Umherirrender has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/370312 ) Change subject: Added OpeningKeywordBraceSniff .. Added OpeningKeywordBraceSniff The OpeningKeywordBraceSniff checks if isset/unset/list does not have a space before the open parenthesis. The sniff is autofixable Change-Id: I3a6682463f94b6962aa2218ad7ae8c7835e6762c --- A MediaWiki/Sniffs/WhiteSpace/OpeningKeywordBraceSniff.php A MediaWiki/Tests/files/WhiteSpace/opening_keyword_braces.php A MediaWiki/Tests/files/WhiteSpace/opening_keyword_braces.php.expect A MediaWiki/Tests/files/WhiteSpace/opening_keyword_braces.php.fixed 4 files changed, 145 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/codesniffer refs/changes/12/370312/1 diff --git a/MediaWiki/Sniffs/WhiteSpace/OpeningKeywordBraceSniff.php b/MediaWiki/Sniffs/WhiteSpace/OpeningKeywordBraceSniff.php new file mode 100644 index 000..253589b --- /dev/null +++ b/MediaWiki/Sniffs/WhiteSpace/OpeningKeywordBraceSniff.php @@ -0,0 +1,79 @@ +http://www.gnu.org/copyleft/gpl.html + * + * @file + */ + +namespace MediaWiki\Sniffs\WhiteSpace; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class OpeningKeywordBraceSniff implements Sniff { + /** +* @return array +*/ + public function register() { + return [ + T_EMPTY, + T_EVAL, + T_EXIT, + T_ISSET, + T_LIST, + T_UNSET, + // also check for array(), when not replaced with short syntax + T_ARRAY, + ]; + } + + /** +* @param File $phpcsFile File object +* @param int $stackPtr Index of registered keywords +*/ + public function process( File $phpcsFile, $stackPtr ) { + $tokens = $phpcsFile->getTokens(); + $next = $stackPtr + 1; + + $openParenthesis = $phpcsFile->findNext( T_WHITESPACE, $next, null, true ); + if ( $openParenthesis === false || + $tokens[$openParenthesis]['code'] !== T_OPEN_PARENTHESIS + ) { + // no parenthesis found + return; + } + + if ( $next === $openParenthesis ) { + // no whitespaces found + return; + } + + $whitespaces = $phpcsFile->getTokensAsString( $next, $openParenthesis - $next ); + $fix = $phpcsFile->addFixableError( + 'Expected no space before opening brace; found %s', + $openParenthesis, + 'WrongWhitespaceBeforeParenthesis', + strlen( $whitespaces ) + ); + if ( $fix ) { + $phpcsFile->fixer->beginChangeset(); + for ( $i = $next; $i < $openParenthesis; $i++ ) { + $phpcsFile->fixer->replaceToken( $i, '' ); + } + $phpcsFile->fixer->endChangeset(); + } + } +} diff --git a/MediaWiki/Tests/files/WhiteSpace/opening_keyword_braces.php b/MediaWiki/Tests/files/WhiteSpace/opening_keyword_braces.php new file mode 100644 index 000..6abc4ad --- /dev/null +++ b/MediaWiki/Tests/files/WhiteSpace/opening_keyword_braces.php @@ -0,0 +1,30 @@ +https://gerrit.wikimedia.org/r/370312 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3a6682463f94b6962aa2218ad7ae8c7835e6762c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/codesniffer Gerrit-Branch: master Gerrit-Owner: Umherirrender___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Grant 'autopatrol' to 'editor' in en.wikibooks
MarcoAurelio has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/370311 ) Change subject: Grant 'autopatrol' to 'editor' in en.wikibooks .. Grant 'autopatrol' to 'editor' in en.wikibooks Bug: T172561 Change-Id: I6dd9a79f708571f44f37a5eeea92fa8472f078f8 --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/11/370311/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index bea92dc..9e27824 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -8271,6 +8271,7 @@ '+enwikibooks' => [ // 'rollbacker' => [ 'rollback' => true ], // 'patroller' => [ 'patrol' => true, 'autopatrol' => true ], + 'editor' => [ 'autopatrol' => true ], // T172561 'flood' => [ 'bot' => true ], 'uploader' => [ 'upload' => true, 'reupload' => true ], ], -- To view, visit https://gerrit.wikimedia.org/r/370311 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6dd9a79f708571f44f37a5eeea92fa8472f078f8 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: MarcoAurelio___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Update .mailmap file
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/370307 ) Change subject: Update .mailmap file .. Update .mailmap file Fix cases and orders in my name Also updates CREDITS by running maintenance/updateCredits.php Change-Id: I230208132e3fc89286d7184b2cc5876d6c8fdc30 --- M .mailmap M CREDITS 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Umherirrender: Looks good to me, approved jenkins-bot: Verified diff --git a/.mailmap b/.mailmap index 2134fc5..5a76fb9 100644 --- a/.mailmap +++ b/.mailmap @@ -63,6 +63,7 @@ Audrey TangAudrey Tang ayush_garg +Bae Junehyeon Bahodir Mansurov Bartosz Dziewoński Bartosz Dziewoński @@ -227,7 +228,6 @@ Jon Robson Juliusz Gonera Juliusz Gonera -JuneHyeon Bae Jure Kajzer Jure Kajzer Justin Du diff --git a/CREDITS b/CREDITS index 14c454e..c38c3fc 100644 --- a/CREDITS +++ b/CREDITS @@ -78,6 +78,7 @@ * awu42 * ayush_garg * Azliq7 +* Bae Junehyeon * Bagariavivek * Bahodir Mansurov * balloonguy @@ -312,7 +313,6 @@ * Julian Ostrow * Juliano F. Ravasi * Juliusz Gonera -* JuneHyeon Bae * Jure Kajzer * Justin Du * Kai Nissen -- To view, visit https://gerrit.wikimedia.org/r/370307 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I230208132e3fc89286d7184b2cc5876d6c8fdc30 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: devunt Gerrit-Reviewer: Umherirrender Gerrit-Reviewer: devunt Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Replace remaining uses of deprecated DB_SLAVE with DB_REPLICA
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/370242 ) Change subject: Replace remaining uses of deprecated DB_SLAVE with DB_REPLICA .. Replace remaining uses of deprecated DB_SLAVE with DB_REPLICA Change 950cf6016c10953213e5f985dfc18a32d8673197 took care of the most, but a few remain, either outside of includes/ and maintenance/ directories (which that change was limited to), or in code introduced afterwards. Change-Id: I9c363d0219ea7e71cde520faba39406949a36d27 --- M docs/database.txt M includes/specials/SpecialUncategorizedcategories.php M languages/Language.php M profileinfo.php M tests/phpunit/MediaWikiTestCase.php M tests/phpunit/includes/RevisionStorageTest.php M tests/phpunit/includes/WatchedItemQueryServiceUnitTest.php M tests/phpunit/includes/WatchedItemStoreUnitTest.php M tests/phpunit/includes/db/LBFactoryTest.php M tests/phpunit/includes/page/WikiPageTest.php 10 files changed, 19 insertions(+), 19 deletions(-) Approvals: Umherirrender: Looks good to me, approved jenkins-bot: Verified diff --git a/docs/database.txt b/docs/database.txt index 44ec764..dbc9204 100644 --- a/docs/database.txt +++ b/docs/database.txt @@ -17,7 +17,7 @@ To make a read query, something like this usually suffices: -$dbr = wfGetDB( DB_SLAVE ); +$dbr = wfGetDB( DB_REPLICA ); $res = $dbr->select( /* ...see docs... */ ); foreach ( $res as $row ) { ... diff --git a/includes/specials/SpecialUncategorizedcategories.php b/includes/specials/SpecialUncategorizedcategories.php index 77b6926..5ff9e04 100644 --- a/includes/specials/SpecialUncategorizedcategories.php +++ b/includes/specials/SpecialUncategorizedcategories.php @@ -68,7 +68,7 @@ } public function getQueryInfo() { - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $query = parent::getQueryInfo(); $exceptionList = $this->getExceptionList(); if ( $exceptionList ) { diff --git a/languages/Language.php b/languages/Language.php index 12f26c3..941f4b8 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -4537,7 +4537,7 @@ public function formatExpiry( $expiry, $format = true, $infinity = 'infinity' ) { static $dbInfinity; if ( $dbInfinity === null ) { - $dbInfinity = wfGetDB( DB_SLAVE )->getInfinity(); + $dbInfinity = wfGetDB( DB_REPLICA )->getInfinity(); } if ( $expiry == '' || $expiry === 'infinity' || $expiry == $dbInfinity ) { diff --git a/profileinfo.php b/profileinfo.php index 466f26a..83ae193 100644 --- a/profileinfo.php +++ b/profileinfo.php @@ -150,7 +150,7 @@ exit( 1 ); } -$dbr = wfGetDB( DB_SLAVE ); +$dbr = wfGetDB( DB_REPLICA ); if ( !$dbr->tableExists( 'profiling' ) ) { echo 'No profiling table exists, so we can\'t show you anything.' diff --git a/tests/phpunit/MediaWikiTestCase.php b/tests/phpunit/MediaWikiTestCase.php index 215d292..4afe710 100644 --- a/tests/phpunit/MediaWikiTestCase.php +++ b/tests/phpunit/MediaWikiTestCase.php @@ -1490,7 +1490,7 @@ ' method should return true. Use @group Database or $this->tablesUsed.' ); } - $db = wfGetDB( DB_SLAVE ); + $db = wfGetDB( DB_REPLICA ); $res = $db->select( $table, $fields, $condition, wfGetCaller(), [ 'ORDER BY' => $fields ] ); $this->assertNotEmpty( $res, "query failed: " . $db->lastError() ); diff --git a/tests/phpunit/includes/RevisionStorageTest.php b/tests/phpunit/includes/RevisionStorageTest.php index 642ada2..3ba82a6 100644 --- a/tests/phpunit/includes/RevisionStorageTest.php +++ b/tests/phpunit/includes/RevisionStorageTest.php @@ -145,7 +145,7 @@ public function testConstructFromRow() { $orig = $this->makeRevision(); - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $res = $dbr->select( 'revision', '*', [ 'rev_id' => $orig->getId() ] ); $this->assertTrue( is_object( $res ), 'query failed' ); @@ -163,7 +163,7 @@ public function testNewFromRow() { $orig = $this->makeRevision(); - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $res = $dbr->select( 'revision', '*', [ 'rev_id' => $orig->getId() ] ); $this->assertTrue( is_object( $res ), 'query failed' ); @@ -187,7 +187,7 @@ $orig = $page->getRevision(); $page->doDeleteArticle( 'test Revision::newFromArchiveRow' ); - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $res = $dbr->select( 'archive', '*', [ 'ar_rev_id' => $orig->getId() ] );
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Enabling OAuth on foundationwiki
MarcoAurelio has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/370310 ) Change subject: Enabling OAuth on foundationwiki .. Enabling OAuth on foundationwiki Bug: T170301 Change-Id: I6c1193e3f1f7df7d10c79c1da2473d10adcb2332 --- M wmf-config/CommonSettings.php M wmf-config/InitialiseSettings.php 2 files changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/10/370310/1 diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index 32e6f83..8cec77f 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -3315,8 +3315,9 @@ if ( $wmgUseOAuth ) { wfLoadExtension( 'OAuth' ); - if ( in_array( $wgDBname, [ 'labswiki', 'labtestwiki' ] ) ) { + if ( in_array( $wgDBname, [ 'labswiki', 'labtestwiki', 'foundationwiki' ] ) ) { // Wikitech and its testing variant use local OAuth tables + // WMF wiki uses OAuth tables of its own - T170301 $wgMWOAuthCentralWiki = false; } else { $wgMWOAuthCentralWiki = 'metawiki'; diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index bea92dc..43b71c9 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -12510,6 +12510,7 @@ 'default' => true, 'private' => false, 'fishbowl' => false, + 'foundationwiki' => true, // T170301 ], # @} -- To view, visit https://gerrit.wikimedia.org/r/370310 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6c1193e3f1f7df7d10c79c1da2473d10adcb2332 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: MarcoAurelio___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Wikidata[master]: New Wikidata Build - 2017-08-05T10:00:01+0000
WikidataBuilder has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/370309 ) Change subject: New Wikidata Build - 2017-08-05T10:00:01+ .. New Wikidata Build - 2017-08-05T10:00:01+ Change-Id: I471052fcc34ed9ed598f22c32db4d2e82a35bb63 --- M composer.lock M extensions/ArticlePlaceholder/includes/ItemNotabilityFilter.php M extensions/ArticlePlaceholder/includes/SearchHookHandler.php M extensions/ArticlePlaceholder/includes/specials/SpecialAboutTopic.php M extensions/ArticlePlaceholder/tests/phpunit/includes/AboutTopicRendererTest.php M extensions/ArticlePlaceholder/tests/phpunit/includes/BaseTemplateToolboxHookHandlerTest.php M extensions/ArticlePlaceholder/tests/phpunit/includes/specials/SpecialAboutTopicTest.php M extensions/Constraints/tests/phpunit/Api/CheckConstraintsTest.php M extensions/Constraints/tests/phpunit/DelegatingConstraintCheckerTest.php M extensions/Wikibase/.mailmap M extensions/Wikibase/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php M extensions/Wikibase/client/tests/phpunit/includes/ChangeNotificationJobTest.php M extensions/Wikibase/client/tests/phpunit/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibraryTest.php M extensions/Wikibase/client/tests/phpunit/includes/DataAccess/StatementTransclusionInteractorTest.php M extensions/Wikibase/data-access/src/DispatchingServiceFactory.php M extensions/Wikibase/data-access/src/RepositoryServiceContainer.php M extensions/Wikibase/data-access/tests/phpunit/DispatchingServiceFactoryTest.php M extensions/Wikibase/data-access/tests/phpunit/RepositoryServiceContainerTest.php M extensions/Wikibase/lib/includes/Store/CachingEntityRevisionLookup.php M extensions/Wikibase/lib/includes/Store/DispatchingEntityRevisionLookup.php M extensions/Wikibase/lib/includes/Store/EntityRevision.php M extensions/Wikibase/lib/includes/Store/EntityRevisionLookup.php M extensions/Wikibase/lib/includes/Store/EntityStore.php M extensions/Wikibase/lib/includes/Store/EntityStoreWatcher.php M extensions/Wikibase/lib/includes/Store/Sql/PrefetchingWikiPageEntityMetaDataAccessor.php M extensions/Wikibase/lib/includes/Store/Sql/WikiPageEntityMetaDataLookup.php M extensions/Wikibase/lib/includes/Store/Sql/WikiPageEntityRevisionLookup.php M extensions/Wikibase/lib/tests/phpunit/EntityRevisionLookupTest.php M extensions/Wikibase/lib/tests/phpunit/MockRepository.php M extensions/Wikibase/lib/tests/phpunit/MockRepositoryTest.php M extensions/Wikibase/lib/tests/phpunit/Store/CachingEntityRevisionLookupTest.php M extensions/Wikibase/lib/tests/phpunit/Store/DispatchingEntityRevisionLookupTest.php M extensions/Wikibase/lib/tests/phpunit/Store/DispatchingTermBufferTest.php M extensions/Wikibase/lib/tests/phpunit/Store/EntityRevisionTest.php M extensions/Wikibase/lib/tests/phpunit/Store/PrefetchingWikiPageEntityMetaDataAccessorTest.php M extensions/Wikibase/lib/tests/phpunit/Store/Sql/SqlEntityInfoBuilderTest.php M extensions/Wikibase/repo/Wikibase.hooks.php M extensions/Wikibase/repo/i18n/ca.json M extensions/Wikibase/repo/i18n/cs.json M extensions/Wikibase/repo/i18n/lb.json M extensions/Wikibase/repo/includes/Api/EntityLoadingHelper.php M extensions/Wikibase/repo/includes/Api/GetEntities.php M extensions/Wikibase/repo/includes/Api/MergeItems.php M extensions/Wikibase/repo/includes/Api/ResultBuilder.php M extensions/Wikibase/repo/includes/Content/EntityContent.php M extensions/Wikibase/repo/includes/EditEntity.php M extensions/Wikibase/repo/includes/Hooks/OutputPageBeforeHTMLHookHandler.php M extensions/Wikibase/repo/includes/LinkedData/EntityDataRequestHandler.php M extensions/Wikibase/repo/includes/LinkedData/EntityDataSerializationService.php M extensions/Wikibase/repo/includes/Specials/SpecialMergeItems.php M extensions/Wikibase/repo/includes/Specials/SpecialModifyEntity.php M extensions/Wikibase/repo/includes/Store/DispatchingEntityStoreWatcher.php M extensions/Wikibase/repo/includes/Store/Sql/WikiPageEntityStore.php M extensions/Wikibase/repo/tests/phpunit/includes/Actions/ActionTestCase.php M extensions/Wikibase/repo/tests/phpunit/includes/Api/ApiFormatTestCase.php M extensions/Wikibase/repo/tests/phpunit/includes/Api/EntityLoadingHelperTest.php M extensions/Wikibase/repo/tests/phpunit/includes/Api/ResultBuilderTest.php M extensions/Wikibase/repo/tests/phpunit/includes/ChangeOp/SiteLinkChangeOpFactoryTest.php M extensions/Wikibase/repo/tests/phpunit/includes/Dumpers/RdfDumpGeneratorTest.php M extensions/Wikibase/repo/tests/phpunit/includes/Hooks/OutputPageBeforeHTMLHookHandlerTest.php M extensions/Wikibase/repo/tests/phpunit/includes/ItemMoveTest.php M extensions/Wikibase/repo/tests/phpunit/includes/LinkedData/EntityDataSerializationServiceTest.php M extensions/Wikibase/repo/tests/phpunit/includes/LinkedData/EntityDataTestProvider.php M extensions/Wikibase/repo/tests/phpunit/includes/ParserOutput/PageImagesDataUpdaterTest.php M
[MediaWiki-commits] [Gerrit] mediawiki...LanguageTool[master]: build: bump grunt-jscs to 2.1.0
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/369345 ) Change subject: build: bump grunt-jscs to 2.1.0 .. build: bump grunt-jscs to 2.1.0 Avoid a peer dependency incompatibility with grunt. Ignore requireSpacesInsideBrackets for sake of simplicitly. Inline ignore for requireVarDeclFirst to make it easier to follow code. Explicitly set a 'return null' to please jsdoc or it would not let us document the @return {NULL}. Change-Id: If81ad41eaf4b3ea9405f15b8a2d20c4b83ba5a56 --- M .jscsrc M modules/ext.LanguageToolDialog.js M package.json 3 files changed, 6 insertions(+), 3 deletions(-) Approvals: Umherirrender: Looks good to me, approved jenkins-bot: Verified diff --git a/.jscsrc b/.jscsrc index 9d22e3f..ee570d1 100644 --- a/.jscsrc +++ b/.jscsrc @@ -1,3 +1,5 @@ { - "preset": "wikimedia" + "preset": "wikimedia", + "requireSpacesInsideBrackets": false, + "verbose": true } diff --git a/modules/ext.LanguageToolDialog.js b/modules/ext.LanguageToolDialog.js index 4debc15..c22760f 100644 --- a/modules/ext.LanguageToolDialog.js +++ b/modules/ext.LanguageToolDialog.js @@ -97,6 +97,7 @@ label: ve.msg( 'visualeditor-find-and-replace-replace-button' ) } ); + // jscs:disable requireVarDeclFirst var optionsGroup = new OO.ui.ButtonGroupWidget( { classes: [ 've-ui-findAndReplaceDialog-cell' ], items: [ @@ -493,7 +494,7 @@ } ).done( function ( responseXML ) { self.openDialog.apply( self, [ responseXML, mapper ] ); } ); - return; + return null; }; mw.LanguageToolDialog.prototype.openDialog = function ( responseXML, mapper ) { diff --git a/package.json b/package.json index ff8bbd1..0481945 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "grunt": "1.0.1", "grunt-banana-checker": "0.4.0", "grunt-contrib-jshint": "0.11.3", -"grunt-jscs": "1.8.0", +"grunt-jscs": "2.1.0", "grunt-jsonlint": "1.1.0" } } -- To view, visit https://gerrit.wikimedia.org/r/369345 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If81ad41eaf4b3ea9405f15b8a2d20c4b83ba5a56 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/LanguageTool Gerrit-Branch: master Gerrit-Owner: HasharGerrit-Reviewer: Hashar Gerrit-Reviewer: Paladox Gerrit-Reviewer: Umherirrender Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ImportArticles[master]: build: bump grunt-jscs to 2.1.0
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/369344 ) Change subject: build: bump grunt-jscs to 2.1.0 .. build: bump grunt-jscs to 2.1.0 Avoid a peer dependency incompatibility with grunt Update file comment /** -> /*! per T119193 Ignore requireSpacesInsideBrackets for sake of simplicity. Update param/returns doc in resources/importarticles.js Change-Id: If81ad41eaf4b3ea9405f15b8a2d20c4b83ba5a56 --- M .jscsrc M package.json M resources/importarticles.js 3 files changed, 12 insertions(+), 10 deletions(-) Approvals: Umherirrender: Looks good to me, approved jenkins-bot: Verified diff --git a/.jscsrc b/.jscsrc index 9d22e3f..713de07 100644 --- a/.jscsrc +++ b/.jscsrc @@ -1,3 +1,4 @@ { - "preset": "wikimedia" + "preset": "wikimedia", + "requireSpacesInsideBrackets": false } diff --git a/package.json b/package.json index 47a6b83..978f941 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "grunt": "1.0.1", "grunt-banana-checker": "0.4.0", "grunt-contrib-jshint": "0.11.2", -"grunt-jscs": "1.8.0", +"grunt-jscs": "2.1.0", "grunt-jsonlint": "1.1.0" } } diff --git a/resources/importarticles.js b/resources/importarticles.js index c74e21d..76ee067 100644 --- a/resources/importarticles.js +++ b/resources/importarticles.js @@ -1,4 +1,4 @@ -/** +/*! * Import JavaScript and Stylesheet articles. * * @version 1.3 @@ -9,9 +9,9 @@ /** * Call the api and send the data then output the return * - * @param {Array} The data to use. - * @param String The method to use: either 'GET' or 'POST'. - * @param Function The function to call back to. + * @param {Array} data The data to use. + * @param {string} method The method to use: either 'GET' or 'POST'. + * @param {Function} callback The function to call back to. */ function callAPI( data, method, callback ) { data.format = 'json'; @@ -49,9 +49,9 @@ * ] * }); * - * @param String The type to load: Either 'script' or 'style'. - * @param (String/{Array}) The file(s) to load. - * @returns Boolean Whether success or fail + * @param {string} type The type to load: Either 'script' or 'style'. + * @param {string|Array} pages The file(s) to load. + * @return {boolean} Whether success or fail */ function importArticles( type, pages ) { var page, @@ -80,7 +80,8 @@ query, 'GET', function ( response ) { - for ( var i = 0; i < response.query.pageids.length; i++ ) { + var i; + for ( i = 0; i < response.query.pageids.length; i++ ) { page = response.query.pages[response.query.pageids[i]]; if ( response.query.pageids[i] === '-1' ) { mw.error( 'The page does not exist: ' + page.title ); -- To view, visit https://gerrit.wikimedia.org/r/369344 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If81ad41eaf4b3ea9405f15b8a2d20c4b83ba5a56 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/ImportArticles Gerrit-Branch: master Gerrit-Owner: HasharGerrit-Reviewer: Cblair91 Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Reedy Gerrit-Reviewer: Umherirrender Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ImageMetrics[master]: build: mark package.json as private
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/369333 ) Change subject: build: mark package.json as private .. build: mark package.json as private We do not release a npm package for this repository, the package.json is solely for CI/build purposes. Change-Id: I3da11273ff7876e83fdb278a504f9b1589e69991 --- M package.json 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Umherirrender: Looks good to me, approved jenkins-bot: Verified diff --git a/package.json b/package.json index ac39615..ae6016f 100644 --- a/package.json +++ b/package.json @@ -1,4 +1,5 @@ { + "private": true, "scripts": { "test": "grunt test" }, -- To view, visit https://gerrit.wikimedia.org/r/369333 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3da11273ff7876e83fdb278a504f9b1589e69991 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/ImageMetrics Gerrit-Branch: master Gerrit-Owner: HasharGerrit-Reviewer: Umherirrender Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ImageMetrics[master]: build: bump grunt-jscs to 2.1.0
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/369341 ) Change subject: build: bump grunt-jscs to 2.1.0 .. build: bump grunt-jscs to 2.1.0 Avoids a peer dependency incompatibility with grunt Update file comments /** -> /*! per T119193 Add new lines in comments Ignore a jscs-jsdoc issue with return values since it does not detect class inheritance: https://github.com/jscs-dev/jscs-jsdoc/issues/31 Change-Id: If81ad41eaf4b3ea9405f15b8a2d20c4b83ba5a56 --- M package.json M resources/head.js M resources/loader.js M resources/logger/LoadingTimeLogger.js M resources/logger/Logger.js 5 files changed, 23 insertions(+), 7 deletions(-) Approvals: Umherirrender: Looks good to me, approved jenkins-bot: Verified diff --git a/package.json b/package.json index 5e4e1fc..ac39615 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "grunt": "1.0.1", "grunt-banana-checker": "0.4.0", "grunt-contrib-jshint": "0.11.3", -"grunt-jscs": "1.8.0", +"grunt-jscs": "2.1.0", "grunt-jsonlint": "1.0.7" } } diff --git a/resources/head.js b/resources/head.js index c92df69..44b935a 100644 --- a/resources/head.js +++ b/resources/head.js @@ -1,6 +1,7 @@ -/** +/*! * JavaScript module for image-related metrics. * Top-loaded on every request to measure timing of events which might happen before normal script load. + * * @see https://mediawiki.org/wiki/Extension:ImageMetrics * * @licence GNU GPL v2 or later diff --git a/resources/loader.js b/resources/loader.js index f14adca..905f404 100644 --- a/resources/loader.js +++ b/resources/loader.js @@ -1,4 +1,4 @@ -/** +/*! * JavaScript module for image-related metrics. * This module will be loaded on every request to perform sampling and load the real module if needed. * @see https://mediawiki.org/wiki/Extension:ImageMetrics @@ -17,6 +17,7 @@ /** * Makes a random decision (based on samplingRatio) whether an event should be logged. * Returns true with 1/samplingRatio probability, or false if samplingRatio is not a number or smaller than 1. +* * @param {number|boolean} samplingRatio * @return {boolean} */ diff --git a/resources/logger/LoadingTimeLogger.js b/resources/logger/LoadingTimeLogger.js index 8a2cd4e..6d686e2 100644 --- a/resources/logger/LoadingTimeLogger.js +++ b/resources/logger/LoadingTimeLogger.js @@ -1,4 +1,4 @@ -/** +/*! * JavaScript module for image-related metrics. * @see https://mediawiki.org/wiki/Extension:ImageMetrics * @@ -45,17 +45,22 @@ /** * Factory function to take care of dependency injection. +* * @static * @param {number} samplingFactor sampling factor * @return {mw.imageMetrics.LoadingTimeLogger} */ LoadingTimeLogger.create = function ( samplingFactor ) { + // https://github.com/jscs-dev/jscs-jsdoc/issues/31 + // jscs:disable return new LoadingTimeLogger( samplingFactor, window.location, mw.config, window.Geo, mw.eventLog, window.performance ); + // jscs:enable }; /** * Installs the event handler which will perform the logging. +* * @static * @param {number} samplingFactor sampling factor */ @@ -100,17 +105,19 @@ /** * Adds navigation type (reload, back etc) to the log data from the NavigationTiming API. +* * @param {Object} data */ LoadingTimeLogger.prototype.addNavigationTimingData = function ( data ) { if ( this.performance.navigation && this.performance.navigation.type in this.navigationTypes ) { - data.navigationType = this.navigationTypes[this.performance.navigation.type]; + data.navigationType = this.navigationTypes[ this.performance.navigation.type ]; } }; /** * Returns timing data about the given file. * Requires ResourceTiming support - http://caniuse.com/resource-timing +* * @param {jQuery} $file jQuery object containing the img element * @return {PerformanceResourceTiming|boolean} timing object or false if not supported */ @@ -122,7 +129,7 @@ } url = $file.prop( 'src' ); // attr() might be relative, prop() is always absolute - timing = this.performance.getEntriesByName( url )[0]; + timing = this.performance.getEntriesByName( url )[ 0 ]; if ( !timing ) { return false; } @@ -136,6 +143,7 @@ * - ownLoadingTime: net time it took the browser to load the image (PerformanceResourceTiming.duration) * - fullLoadingTime: total time from opening the page to finishing the image
[MediaWiki-commits] [Gerrit] mediawiki...PronunciationRecording[master]: build: Replace jshint/jscs with eslint and csslint with styl...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/370118 ) Change subject: build: Replace jshint/jscs with eslint and csslint with stylelint .. build: Replace jshint/jscs with eslint and csslint with stylelint Also upgrade banana and jsonlint to latest. Change-Id: Ief51508b119300abc64a42260ccb72505e4b52dd --- D .csslintrc A .eslintrc.json D .jscsrc D .jshintignore D .jshintrc A .stylelintrc M Gruntfile.js M package.json M resources/ext.pronunciationRecording.pronunciationRecorder.js M resources/ext.pronunciationRecording.specialPage.js 10 files changed, 63 insertions(+), 90 deletions(-) Approvals: Umherirrender: Looks good to me, approved jenkins-bot: Verified diff --git a/.csslintrc b/.csslintrc deleted file mode 100644 index e777c7f..000 --- a/.csslintrc +++ /dev/null @@ -1,11 +0,0 @@ -{ - "adjoining-classes": false, - "box-model": false, - "box-sizing": false, - "fallback-colors": false, - "important": false, - "outline-none": false, - "qualified-headings": false, - "universal-selector": false, - "unqualified-attributes": false -} diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 000..b8371ee --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,13 @@ +{ + "extends": "wikimedia", + "env": { + "browser": true, + "jquery": true, + "qunit": true + }, + "globals": { + "mediaWiki": false, + "Recorder": false + }, + "rules": {} +} diff --git a/.jscsrc b/.jscsrc deleted file mode 100644 index 9d22e3f..000 --- a/.jscsrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "preset": "wikimedia" -} diff --git a/.jshintignore b/.jshintignore deleted file mode 100644 index a1581ce..000 --- a/.jshintignore +++ /dev/null @@ -1,2 +0,0 @@ -resources/mediawiki.libs.recorderjs -node_modules diff --git a/.jshintrc b/.jshintrc deleted file mode 100644 index b44b4e7..000 --- a/.jshintrc +++ /dev/null @@ -1,25 +0,0 @@ -{ - // Enforcing - "bitwise": true, - "eqeqeq": true, - "freeze": true, - "latedef": true, - "noarg": true, - "nonew": true, - "undef": true, - "unused": true, - "strict": false, - - // Relaxing - "es5": false, - - // Environment - "browser": true, - "jquery": true, - - "globals": { - "mediaWiki": false, - "Recorder": false, - "AudioContext": false - } -} diff --git a/.stylelintrc b/.stylelintrc new file mode 100644 index 000..0fc57dc --- /dev/null +++ b/.stylelintrc @@ -0,0 +1,3 @@ +{ +"extends": "stylelint-config-wikimedia" +} diff --git a/Gruntfile.js b/Gruntfile.js index 362c2f7..1246162 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -4,49 +4,45 @@ * @package PronunciationRecording */ -/*jshint node:true */ +/* eslint-env node, es6 */ module.exports = function ( grunt ) { grunt.loadNpmTasks( 'grunt-banana-checker' ); - grunt.loadNpmTasks( 'grunt-contrib-csslint' ); - grunt.loadNpmTasks( 'grunt-contrib-jshint' ); grunt.loadNpmTasks( 'grunt-contrib-watch' ); - grunt.loadNpmTasks( 'grunt-jscs' ); + grunt.loadNpmTasks( 'grunt-eslint' ); grunt.loadNpmTasks( 'grunt-jsonlint' ); + grunt.loadNpmTasks( 'grunt-stylelint' ); grunt.initConfig( { - jshint: { - options: { - jshintrc: true - }, + eslint: { all: [ '*.js', 'resources/**/*.js', '!resources/mediawiki.libs.recorderjs/*' ] }, - jscs: { - src: '<%= jshint.all %>' - }, - csslint: { + stylelint: { src: 'resources/**/*.css' - }, - jsonlint: { - all: 'i18n/*.json' }, banana: { all: 'i18n/' }, + jsonlint: { + all: [ + '*.json', + '.stylelintrc', + 'i18n/*.json' + ] + }, watch: { files: [ - '.{jshintignore,jshintrc,jscsrc,csslintrc}', - '<%= jshint.all %>', - '<%= csslint.all %>', - '<%= jsonlint.all %>' + '.{stylelintrc,eslintrc.json}', + '<%= eslint.all %>', + '<%=
[MediaWiki-commits] [Gerrit] mediawiki...Quiz[master]: Add class field to input type in Answer.mustache
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/369822 ) Change subject: Add class field to input type in Answer.mustache .. Add class field to input type in Answer.mustache The class attribute is used to give class value (numbers/words) to textfield object in the template.The patch adds the missing value to the input type. Bug:T172355 Change-Id: Ib28b88950d2c6566a8fec2c9ff723e5772ca034b --- M templates/Answer.mustache M tests/phpunit/QuestionTest.php 2 files changed, 11 insertions(+), 10 deletions(-) Approvals: jenkins-bot: Verified Mvolz: Looks good to me, approved diff --git a/templates/Answer.mustache b/templates/Answer.mustache index 9f1082e..1025a13 100644 --- a/templates/Answer.mustache +++ b/templates/Answer.mustache @@ -4,7 +4,7 @@ {{{ possibility }}} {{/if}} - + {{ big }} diff --git a/tests/phpunit/QuestionTest.php b/tests/phpunit/QuestionTest.php index a5c6975..4f90b9f 100644 --- a/tests/phpunit/QuestionTest.php +++ b/tests/phpunit/QuestionTest.php @@ -175,7 +175,7 @@ . "\n\t\t\t" . ' StageiraPlatoGreece' . "\n\t\t\t" . '' . "\n\t\t\t" . '' . "\n\t\t\t\t" -. '' . "\n\t\t\t\t\t" . '▼' . "\n\t\t\t\t\t" . '' . "\n\t\t\t" . '' . "\n\t\n" . '' . "\n", @@ -187,9 +187,10 @@ '' . "\n\t\n\t\t" . '' . "\n\t\t\t" . '' . " \n\t\t\t" . '' . "\n\t\t\t" . '' . "\n\t\t\t\t" -. '' -. "\n\t\t\t\t\t" . '' . "\n\t\t\t\t\t" . '' . "\n\t\t\t" -. '' . "\n\t\n" . '' . "\n", +. '' . "\n\t\t\t\t\t" . '' +. "\n\t\t\t\t\t" . '' . "\n\t\t\t" . '' . "\n\t\n" . '' . "\n" +, '' ], // test case when no user input is provided to case insensitive answer @@ -198,7 +199,7 @@ '' . "\n\t\n\t\t" . '' . "\n\t\t\t" . ' Plato' . "\n\t\t\t" . '' . "\n\t\t\t" . '' . "\n\t\t\t\t" -. '' . "\n\t\t\t\t\t" . '▼' . "\n\t\t\t\t\t" . '' . "\n\t\t\t" . '' . "\n\t\n" . '' . "\n", @@ -209,7 +210,7 @@ '' . "\n\t\n\t\t" . '' . "\n\t\t\t" . ' StageiraPlatoGreece'. "\n\t\t\t" . '' . "\n\t\t\t" . '' . "\n\t\t\t\t" -. '' . "\n\t\t\t\t\t" . '▼' . "\n\t\t\t\t\t" . '' . "\n\t\t\t" . '' . "\n\t\n" . '' . "\n", @@ -221,7 +222,7 @@ '' . "\n\t\n\t\t" . '' . "\n\t\t\t" . ' Plato' . "\n\t\t\t" . '' . "\n\t\t\t" . '' . "\n\t\t\t\t" -. '' . "\n\t\t\t\t\t" . '▼' . "\n\t\t\t\t\t" . '' . "\n\t\t\t" . '' . "\n\t\n" . '' . "\n", @@ -233,7 +234,7 @@ '' . "\n\t\n\t\t" . '' . "\n\t\t\t" . '' . "\n\t\t\t" . '' . "\n\t\t\t" . '' . "\n\t\t\t\t" -. '' . "\n\t\t\t\t\t" . '' . "\n\t\t\t\t\t" . '' . "\n\t\t\t" . '' . "\n\t\n" . '' . "\n", @@ -245,7 +246,7 @@ '' . "\n\t\n\t\t" . '' . "\n\t\t\t" . ' 0' . "\n\t\t\t" . '' . "\n\t\t\t" . '' . "\n\t\t\t\t" -. '' . "\n\t\t\t\t\t" . '▼' . "\n\t\t\t\t\t" . '' . "\n\t\t\t" . '' . "\n\t\n" . '' . "\n", -- To view, visit https://gerrit.wikimedia.org/r/369822 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib28b88950d2c6566a8fec2c9ff723e5772ca034b Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Quiz Gerrit-Branch: master Gerrit-Owner: HarjotsinghGerrit-Reviewer: Mvolz Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [cleanup] code cleanup
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/370177 ) Change subject: [cleanup] code cleanup .. [cleanup] code cleanup - WelcomeBot._checkQueue is never used and can be removed - set self.welcomed_users only once when needed Change-Id: Icc2c90b23bf813e757d3f77fe0f6867c9850d4cb --- M scripts/welcome.py 1 file changed, 1 insertion(+), 5 deletions(-) Approvals: Mpaa: Looks good to me, approved jenkins-bot: Verified diff --git a/scripts/welcome.py b/scripts/welcome.py index 6496438..c974023 100755 --- a/scripts/welcome.py +++ b/scripts/welcome.py @@ -431,8 +431,6 @@ if globalvar.randomSign: self.defineSign(True) -if __name__ != '__main__': # use only in module call -self._checkQueue = [] def check_managed_sites(self): """Check that site is managed by welcome.py.""" @@ -812,9 +810,7 @@ pywikibot.output( u'Putting the log of the latest %d users...' % welcomed_count) -if self.makelogpage(self.welcomed_users): -self.welcomed_users = [] -else: +if not self.makelogpage(self.welcomed_users): continue self.welcomed_users = [] if hasattr(self, '_BAQueue'): -- To view, visit https://gerrit.wikimedia.org/r/370177 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icc2c90b23bf813e757d3f77fe0f6867c9850d4cb Gerrit-PatchSet: 2 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: XqtGerrit-Reviewer: Magul Gerrit-Reviewer: Mpaa Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Adding 6 new monolingual codes and sorting them all
Mbch331 has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/370308 ) Change subject: Adding 6 new monolingual codes and sorting them all .. Adding 6 new monolingual codes and sorting them all Bug: T155372 Bug: T155423 Bug: T155426 Bug: T155429 Bug: T155433 Bug: T155435 Change-Id: I2db80bb82f254b8bf9e66741fa76517c8f203951 --- M repo/includes/WikibaseRepo.php 1 file changed, 21 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/08/370308/1 diff --git a/repo/includes/WikibaseRepo.php b/repo/includes/WikibaseRepo.php index 025bd48..0c9df51 100644 --- a/repo/includes/WikibaseRepo.php +++ b/repo/includes/WikibaseRepo.php @@ -1812,14 +1812,14 @@ // T125066 'ett', 'fkv', 'koy', 'lkt', 'lld', - // T137115 - 'non', - // T137808 'mnc', // T137809 'otk', + + // T137115 + 'non', // T138131 'hai', @@ -1842,18 +1842,36 @@ // T155373 'gez', + // T155372 + 'eya', + // T155376 'quc', // T155377 'kjh', + // T155423 + 'ood', + + // T155426 + 'pjt', + + // T155429 + 'fuf', + // T155430 'nr', // T160531 'umu', + // T155433 + 'yap', + + // T155435 + 'zun', + // T161983 'lag', -- To view, visit https://gerrit.wikimedia.org/r/370308 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2db80bb82f254b8bf9e66741fa76517c8f203951 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Mbch331___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits