[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Dev: Lint on pre-commit, not when running unit tests
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395155 ) Change subject: Dev: Lint on pre-commit, not when running unit tests .. Dev: Lint on pre-commit, not when running unit tests Linting is important but can be a nuisance during a rapid debugging and testing cycle if run alongside the unit tests. This patch moves the lint command to a pre-commit hook to ameliorate this problem. Change-Id: Ie78d3bed3608adcc2c4bbf38bd0fd981b8c91702 --- M package.json 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified diff --git a/package.json b/package.json index 99133cf..9e916e9 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "./app.js", "scripts": { "start": "service-runner", -"test": "npm run -s lint && PREQ_CONNECT_TIMEOUT=15 mocha && nsp check", +"test": "PREQ_CONNECT_TIMEOUT=15 mocha && nsp check", "test:unit": "PREQ_CONNECT_TIMEOUT=15 mocha test/lib", "lint": "eslint --cache --max-warnings 0 --ext .js --ext .json .", "docker-start": "service-runner docker-start", @@ -13,6 +13,9 @@ "test-build": "service-runner docker-test && service-runner build --deploy-repo --force", "coverage": "istanbul cover _mocha -- -R spec" }, + "pre-commit": [ +"lint" + ], "repository": { "type": "git", "url": "https://gerrit.wikimedia.org/r/mediawiki/services/mobileapps; -- To view, visit https://gerrit.wikimedia.org/r/395155 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie78d3bed3608adcc2c4bbf38bd0fd981b8c91702 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: MhollowayGerrit-Reviewer: BearND Gerrit-Reviewer: Fjalapeno Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Mhurd 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...OAuth[master]: Fix class name typo
Gergő Tisza has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395871 ) Change subject: Fix class name typo .. Fix class name typo Change-Id: I3608eea69820dfab37eb0c003b7b51f5498e2c0d --- M frontend/specialpages/SpecialMWOAuth.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OAuth refs/changes/71/395871/1 diff --git a/frontend/specialpages/SpecialMWOAuth.php b/frontend/specialpages/SpecialMWOAuth.php index 1d2e414..043c533 100644 --- a/frontend/specialpages/SpecialMWOAuth.php +++ b/frontend/specialpages/SpecialMWOAuth.php @@ -208,7 +208,7 @@ if ( !$cmr ) { $this->showError( wfMessage( 'mwoauth-bad-request-invalid-action', - \Linked::makeExternalLink( + \Linker::makeExternalLink( 'https://www.mediawiki.org/wiki/Help:OAuth/Errors#E002', 'E002', true -- To view, visit https://gerrit.wikimedia.org/r/395871 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3608eea69820dfab37eb0c003b7b51f5498e2c0d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OAuth Gerrit-Branch: master Gerrit-Owner: Gergő Tisza___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Summary 2.0: Mark disambiguation pages
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/391746 ) Change subject: Summary 2.0: Mark disambiguation pages .. Summary 2.0: Mark disambiguation pages This just identifies them for now as a starting point. Later, we'll devise a way to add links to disambiguated pages. Bug: T171052 Change-Id: Ic74b5ad42af065d3116ede183223d9a4a65aaf0f --- M lib/mobile-util.js M routes/mobile-sections.js M spec.yaml 3 files changed, 68 insertions(+), 16 deletions(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/mobile-util.js b/lib/mobile-util.js index e93e453..46a6c66 100644 --- a/lib/mobile-util.js +++ b/lib/mobile-util.js @@ -192,9 +192,10 @@ * @param {!String} domain the request domain * @param {!Object} title a mediawiki-title object for the page title * @param {!Object} pageData raw page data for the page + * @param {?boolean} disambiguation whether the page is a disambiguation page * @return {!Object} a summary 2.0 spec-compliant page summary object */ -mUtil.buildSummary = function(domain, title, pageData) { +mUtil.buildSummary = function(domain, title, pageData, disambiguation = false) { let summary = {}; const page = pageData.page; const meta = pageData.meta; @@ -227,7 +228,7 @@ } return Object.assign({ code: 200, -type: 'standard', +type : disambiguation ? 'disambiguation' : 'standard', title: meta.normalizedtitle, displaytitle: meta.displaytitle, namespace: { id: meta.ns, text: meta.nsText }, diff --git a/routes/mobile-sections.js b/routes/mobile-sections.js index 81fe3ea..039ee7b 100644 --- a/routes/mobile-sections.js +++ b/routes/mobile-sections.js @@ -8,6 +8,7 @@ const parsoid = require('../lib/parsoid-access'); const sUtil = require('../lib/util'); const transforms = require('../lib/transforms'); +const Title = require('mediawiki-title').Title; /** * The main router object @@ -392,22 +393,21 @@ */ router.get('/summary/:title/:revision?/:tid?', (req, res) => { return BBPromise.props({ -title: mwapi.getTitleObj(app, req), -pageData: _collectRawPageData(req, false) +pageData: _collectRawPageData(req, false), +siteinfo: mwapi.getSiteInfo(app, req) }).then((response) => { -const summary = mUtil.buildSummary(req.params.domain, response.title, response.pageData); -if (summary) { -res.status(summary.code); -if (summary.code === 200) { -delete summary.code; -mUtil.setETag(res, summary.revision, summary.tid); -mUtil.setContentType(res, mUtil.CONTENT_TYPES.summary); -res.send(JSON.stringify(summary)); -} -res.end(); -} else { -res.status(404); +const title = Title.newFromText(req.params.title, response.siteinfo); +const pageProps = response.pageData.meta && response.pageData.meta.pageprops; +const disambig = pageProps && {}.hasOwnProperty.call(pageProps, 'disambiguation'); +const summary = mUtil.buildSummary(req.params.domain, title, response.pageData, disambig); +res.status(summary.code); +if (summary.code === 200) { +delete summary.code; +mUtil.setETag(res, summary.revision, summary.tid); +mUtil.setContentType(res, mUtil.CONTENT_TYPES.summary); +res.send(summary); } +res.end(); }); }); diff --git a/spec.yaml b/spec.yaml index 3d315d1..ed54015 100644 --- a/spec.yaml +++ b/spec.yaml @@ -725,6 +725,56 @@ talk_page_html: /.+/ extract: /.+/ extract_html: /.+/ +- title: Get summary for 2nd Earl of Derby + request: +params: + domain: en.wikipedia.org + title: 2nd_Earl_of_Derby + response: +status: 200 +headers: + etag: /.+/ + content-type: /^application\/json/ +body: + type: disambiguation + title: /.+/ + displaytitle: /.+/ + namespace: +id: /.+/ +text: /.*/ + titles: +canonical: /.+/ +normalized: /.+/ +display: /.+/ + pageid: /.+/ + lang: /.+/ + dir: /.+/ + revision: /.+/ + tid: /.+/ + timestamp: /.+/ + description: /.+/ + content_urls: +desktop: + page: /.+/ + revisions: /.+/ + edit: /.+/ + talk: /.+/ +mobile: + page: /.+/ + revisions: /.+/ + edit: /.+/ + talk: /.+/ +
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Allow Organization merge to resolve casing on organization_name
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395858 ) Change subject: Allow Organization merge to resolve casing on organization_name .. Allow Organization merge to resolve casing on organization_name Bug: T18108 Change-Id: I31f9cd0cb539f7e9dcbd2f1921906a9d7ca6d5a5 --- M sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php M sites/all/modules/wmf_civicrm/wmf_civicrm.module 2 files changed, 26 insertions(+), 1 deletion(-) Approvals: Mepps: Looks good to me, approved XenoRyet: Looks good to me, approved jenkins-bot: Verified diff --git a/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php b/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php index e5eb6cb..7a0051c 100644 --- a/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php +++ b/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php @@ -915,6 +915,31 @@ } /** + * Test that a conflict on casing in first names is handled for organization_name. + */ + public function testBatchMergeConflictNameCasingOrgs() { +$rule_group_id = civicrm_api3('RuleGroup', 'getvalue', array( + 'contact_type' => 'Organization', + 'used' => 'Unsupervised', + 'return' => 'id', + 'options' => array('limit' => 1), +)); + +// Do a pre-merge to get us to a known 'no mergeable contacts' state. +$this->callAPISuccess('Job', 'process_batch_merge', array('mode' => 'safe', 'rule_group_id' => $rule_group_id)); + +$org1 = $this->callAPISuccess('Contact', 'create', array('organization_name' => 'donald duck', 'contact_type' => 'Organization')); +$org2 = $this->callAPISuccess('Contact', 'create', array('organization_name' => 'Donald Duck', 'contact_type' => 'Organization')); + +$result = $this->callAPISuccess('Job', 'process_batch_merge', array('mode' => 'safe', 'rule_group_id' => $rule_group_id)); +$this->assertEquals(0, count($result['values']['skipped'])); +$this->assertEquals(1, count($result['values']['merged'])); + +$contact = $this->callAPISuccess('Contact', 'get', array('id' => $org1['id'], 'sequential' => 1)); +$this->assertEquals('Donald Duck', $contact['values'][0]['organization_name']); + } + + /** * Make sure José whomps Jose. * * Test diacritic matches are resolved to the one using 'authentic' characters. diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module b/sites/all/modules/wmf_civicrm/wmf_civicrm.module index d1c525d..1ad487d 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module @@ -2543,7 +2543,7 @@ * @return bool */ function _wmf_civicrm_merge_resolve_casing_conflict($fieldName, &$moveFieldValue, &$valueToKeep, &$valueToOverwrite) { - $fieldsToResolveCasingFor = array('last_name', 'first_name'); + $fieldsToResolveCasingFor = array('last_name', 'first_name', 'organization_name'); if (!in_array(str_replace('move_', '', $fieldName), $fieldsToResolveCasingFor)) { return FALSE; } -- To view, visit https://gerrit.wikimedia.org/r/395858 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I31f9cd0cb539f7e9dcbd2f1921906a9d7ca6d5a5 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: EileenGerrit-Reviewer: Ejegg Gerrit-Reviewer: Mepps Gerrit-Reviewer: XenoRyet 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...PageImages[master]: Re-enable "MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395865 ) Change subject: Re-enable "MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" sniff .. Re-enable "MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" sniff Bug: T170583 Change-Id: Ib55d299da9c52da02246037fd8be899372758f11 --- M .phpcs.xml M includes/ApiQueryPageImages.php M includes/LinksUpdateHookHandler.php 3 files changed, 6 insertions(+), 5 deletions(-) Approvals: jenkins-bot: Verified Jdlrobson: Looks good to me, approved diff --git a/.phpcs.xml b/.phpcs.xml index 18d84eb..2851e8d 100644 --- a/.phpcs.xml +++ b/.phpcs.xml @@ -8,7 +8,6 @@ - . diff --git a/includes/ApiQueryPageImages.php b/includes/ApiQueryPageImages.php index 6c3a94b..405767b 100644 --- a/includes/ApiQueryPageImages.php +++ b/includes/ApiQueryPageImages.php @@ -142,8 +142,8 @@ $fileName = $row->pp_value; $this->setResultValues( $prop, $pageId, $fileName, $size ); } - - } // End page props image extraction + // End page props image extraction + } // Extract images from file namespace pages. In this case we just use // the file itself rather than searching for a page_image. (Bug 50252) diff --git a/includes/LinksUpdateHookHandler.php b/includes/LinksUpdateHookHandler.php index a14e7ae..ec776db 100644 --- a/includes/LinksUpdateHookHandler.php +++ b/includes/LinksUpdateHookHandler.php @@ -191,8 +191,10 @@ protected function fetchFileMetadata( $file ) { $format = new FormatMetadata; $context = new DerivativeContext( $format->getContext() ); - $format->setSingleLanguage( true ); // we don't care and it's slightly faster - $context->setLanguage( 'en' ); // we don't care so avoid splitting the cache + // we don't care about the language, and specifying singleLanguage is slightly faster + $format->setSingleLanguage( true ); + // we don't care about the language, so avoid splitting the cache by selecting English + $context->setLanguage( 'en' ); $format->setContext( $context ); return $format->fetchExtendedMetadata( $file ); } -- To view, visit https://gerrit.wikimedia.org/r/395865 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib55d299da9c52da02246037fd8be899372758f11 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PageImages Gerrit-Branch: master Gerrit-Owner: PpperyGerrit-Reviewer: Jdlrobson Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: site: fix "spare" -> "spare::system" for conf100[456]
Dzahn has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395869 ) Change subject: site: fix "spare" -> "spare::system" for conf100[456] .. site: fix "spare" -> "spare::system" for conf100[456] follow-up Ia41d4594fce3b The role is spare::system, not just 'spare'. Change-Id: I926cd1f2cb7ff428b85cc6f71aa1b2de72d9f047 --- M manifests/site.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/manifests/site.pp b/manifests/site.pp index a550543..5bcd9c6 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -171,7 +171,7 @@ # coming soon, see T166081 node /^conf100[456]\.eqiad\.wmnet$/ { -role(spare) +role(spare::system) } # conf200x are etcd/zookeeper service nodes in codfw -- To view, visit https://gerrit.wikimedia.org/r/395869 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I926cd1f2cb7ff428b85cc6f71aa1b2de72d9f047 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: DzahnGerrit-Reviewer: Dzahn Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: site: fix "spare" -> "spare::system" for conf100[456]
Dzahn has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395869 ) Change subject: site: fix "spare" -> "spare::system" for conf100[456] .. site: fix "spare" -> "spare::system" for conf100[456] follow-up Ia41d4594fce3b The role is spare::system, not just 'spare'. Change-Id: I926cd1f2cb7ff428b85cc6f71aa1b2de72d9f047 --- M manifests/site.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/69/395869/1 diff --git a/manifests/site.pp b/manifests/site.pp index a550543..5bcd9c6 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -171,7 +171,7 @@ # coming soon, see T166081 node /^conf100[456]\.eqiad\.wmnet$/ { -role(spare) +role(spare::system) } # conf200x are etcd/zookeeper service nodes in codfw -- To view, visit https://gerrit.wikimedia.org/r/395869 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I926cd1f2cb7ff428b85cc6f71aa1b2de72d9f047 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: fix text centering of error message
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395860 ) Change subject: fix text centering of error message .. fix text centering of error message When the error message in WikiErrorView grows to two ore more lines due to localization, it was not centered any more. This commits fixes that. Change-Id: Ib2216df7d7924e3f208f9bec40d266c491f080d0 --- M app/src/main/res/layout/view_wiki_error.xml 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Dbrant: Looks good to me, approved jenkins-bot: Verified diff --git a/app/src/main/res/layout/view_wiki_error.xml b/app/src/main/res/layout/view_wiki_error.xml index b946f9a..e9cc0e0 100644 --- a/app/src/main/res/layout/view_wiki_error.xml +++ b/app/src/main/res/layout/view_wiki_error.xml @@ -43,7 +43,9 @@ android:id="@+id/view_wiki_error_text" android:layout_width="wrap_content" android:layout_height="wrap_content" +android:lineSpacingMultiplier="1.2" android:text="@string/error_message_generic" +android:textAlignment="center" android:textColor="@color/base30" android:textSize="16sp" /> -- To view, visit https://gerrit.wikimedia.org/r/395860 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib2216df7d7924e3f208f9bec40d266c491f080d0 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: ConnyDuckGerrit-Reviewer: Brion VIBBER Gerrit-Reviewer: ConnyDuck Gerrit-Reviewer: Cooltey Gerrit-Reviewer: Dbrant Gerrit-Reviewer: Sharvaniharan 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...PageImages[master]: Re-enable "MediaWiki.NamingConventions.LowerCamelFunctionsNa...
Pppery has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395868 ) Change subject: Re-enable "MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName" sniff .. Re-enable "MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName" sniff Bug: T170583 Change-Id: I76ed85cf960269c5692e9ec8c92877bcb13e4100 --- M .phpcs.xml M tests/phpunit/PageImagesTest.php 2 files changed, 2 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageImages refs/changes/68/395868/1 diff --git a/.phpcs.xml b/.phpcs.xml index 18d84eb..f3dd6e9 100644 --- a/.phpcs.xml +++ b/.phpcs.xml @@ -7,7 +7,6 @@ - . diff --git a/tests/phpunit/PageImagesTest.php b/tests/phpunit/PageImagesTest.php index e3cb719..26fe9e4 100644 --- a/tests/phpunit/PageImagesTest.php +++ b/tests/phpunit/PageImagesTest.php @@ -30,7 +30,7 @@ $this->assertInstanceOf( 'PageImages', $pageImages ); } - public function testGivenNonExistingPage_getPageImageReturnsFalse() { + public function testGivenNonExistingPageGetPageImageReturnsFalse() { $title = $this->newTitle(); $this->assertFalse( PageImages::getPageImage( $title ) ); } @@ -40,7 +40,7 @@ $this->assertSame( 'page_image_free', PageImages::getPropName( true ) ); } - public function testGivenNonExistingPage_onBeforePageDisplayDoesNotAddMeta() { + public function testGivenNonExistingPageOnBeforePageDisplayDoesNotAddMeta() { $context = $this->getMock( IContextSource::class ); $context->method( 'getTitle' ) ->will( $this->returnValue( $this->newTitle() ) ); -- To view, visit https://gerrit.wikimedia.org/r/395868 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I76ed85cf960269c5692e9ec8c92877bcb13e4100 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PageImages Gerrit-Branch: master Gerrit-Owner: Pppery___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Fix ruwiki news template
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395867 ) Change subject: Fix ruwiki news template .. Fix ruwiki news template The template was renamed. https://ru.wikipedia.org/w/index.php?title=%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:%D0%A2%D0%B5%D0%BA%D1%83%D1%89%D0%B8%D0%B5_%D1%81%D0%BE%D0%B1%D1%8B%D1%82%D0%B8%D1%8F_%D0%BD%D0%B0_%D0%B7%D0%B0%D0%B3%D0%BB%D0%B0%D0%B2%D0%BD%D0%BE%D0%B9_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B5=history Change-Id: I1c1025f42a84a4b5f8ca850db01dbc76ae3d82c2 --- M etc/feed/news-sites.js 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified diff --git a/etc/feed/news-sites.js b/etc/feed/news-sites.js index 7e6f627..ea32f50 100644 --- a/etc/feed/news-sites.js +++ b/etc/feed/news-sites.js @@ -64,7 +64,8 @@ pl: new NewsSite('Szablon:Aktualności', 'ul:last-of-type > li', TOPIC_SELECTOR_BOLD_LINK), pt: new NewsSite('Portal:Eventos_atuais', 'table:nth-child(3) ul > li', TOPIC_SELECTOR_BOLD_LINK), -ru: new NewsSite('Шаблон:Актуальные_события', 'body > ul > li', TOPIC_SELECTOR_BOLD_LINK), +// eslint-disable-next-line max-len +ru: new NewsSite('Шаблон:Текущие_события_на_заглавной_странице', 'body > ul > li', TOPIC_SELECTOR_BOLD_LINK), sco: new NewsSite('Template:In_the_news', 'ul[id^=mw] li', TOPIC_SELECTOR_BOLD_LINK), // see en sv: new NewsSite('Portal:Huvudsida/Aktuella händelser', 'body > ul > li', TOPIC_SELECTOR_BOLD_LINK), -- To view, visit https://gerrit.wikimedia.org/r/395867 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1c1025f42a84a4b5f8ca850db01dbc76ae3d82c2 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: MhollowayGerrit-Reviewer: BearND Gerrit-Reviewer: Fjalapeno Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Mhurd 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] operations/puppet[production]: site: add conf100[456] with role spare
Dzahn has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395863 ) Change subject: site: add conf100[456] with role spare .. site: add conf100[456] with role spare These are running and automatically get "standard" from the default in site.pp, but they are not explicitly listed with any role yet since it's in the middle of provisioning. This means that Ganglia gets installed and i don't want that, they popped up during by Ganglia decom efforts. Also we want all servers to have a role for other reasons. Adding the role(spare) will automatically remove ganglia and will be sufficient for now until they can actually use role(configcluster) like the others. Bug: T166081 Bug: T177225 Change-Id: Ia41d4594fcec3b8256007290202d5c4fbd0b2c4a --- M manifests/site.pp 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/manifests/site.pp b/manifests/site.pp index c1e433d..a550543 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -169,6 +169,11 @@ role(configcluster) } +# coming soon, see T166081 +node /^conf100[456]\.eqiad\.wmnet$/ { +role(spare) +} + # conf200x are etcd/zookeeper service nodes in codfw node /^conf200[123]\.codfw\.wmnet$/ { role(configcluster) -- To view, visit https://gerrit.wikimedia.org/r/395863 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia41d4594fcec3b8256007290202d5c4fbd0b2c4a Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: DzahnGerrit-Reviewer: Dzahn Gerrit-Reviewer: Elukey Gerrit-Reviewer: Giuseppe Lavagetto 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...mobileapps[master]: Fix ruwiki news template
Mholloway has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395867 ) Change subject: Fix ruwiki news template .. Fix ruwiki news template The template was renamed. https://ru.wikipedia.org/w/index.php?title=%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:%D0%A2%D0%B5%D0%BA%D1%83%D1%89%D0%B8%D0%B5_%D1%81%D0%BE%D0%B1%D1%8B%D1%82%D0%B8%D1%8F_%D0%BD%D0%B0_%D0%B7%D0%B0%D0%B3%D0%BB%D0%B0%D0%B2%D0%BD%D0%BE%D0%B9_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B5=history Change-Id: I1c1025f42a84a4b5f8ca850db01dbc76ae3d82c2 --- M etc/feed/news-sites.js 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps refs/changes/67/395867/1 diff --git a/etc/feed/news-sites.js b/etc/feed/news-sites.js index 7e6f627..e4d3374 100644 --- a/etc/feed/news-sites.js +++ b/etc/feed/news-sites.js @@ -47,6 +47,8 @@ /** * @type {{Object.}} A map of Wikipedia site languages codes * to NewsSites + * + * eslint-disable max-len */ module.exports = { da: new NewsSite('Skabelon:Forside_aktuelle_begivenheder', 'div > li', @@ -64,7 +66,8 @@ pl: new NewsSite('Szablon:Aktualności', 'ul:last-of-type > li', TOPIC_SELECTOR_BOLD_LINK), pt: new NewsSite('Portal:Eventos_atuais', 'table:nth-child(3) ul > li', TOPIC_SELECTOR_BOLD_LINK), -ru: new NewsSite('Шаблон:Актуальные_события', 'body > ul > li', TOPIC_SELECTOR_BOLD_LINK), +// eslint-disable-next-line max-len +ru: new NewsSite('Шаблон:Текущие_события_на_заглавной_странице', 'body > ul > li', TOPIC_SELECTOR_BOLD_LINK), sco: new NewsSite('Template:In_the_news', 'ul[id^=mw] li', TOPIC_SELECTOR_BOLD_LINK), // see en sv: new NewsSite('Portal:Huvudsida/Aktuella händelser', 'body > ul > li', TOPIC_SELECTOR_BOLD_LINK), -- To view, visit https://gerrit.wikimedia.org/r/395867 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1c1025f42a84a4b5f8ca850db01dbc76ae3d82c2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: Mholloway ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCLFilters: display target page as a title
Sbisson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395866 ) Change subject: RCLFilters: display target page as a title .. RCLFilters: display target page as a title * Url decode target param * Pass through mw.Title to convert underscores to spaces Bug: T182164 Change-Id: Iabb0d8ea2b9f93f943e8493ee0a29d3bee3b3682 --- M resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.ItemModel.js M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.RclTargetPageWidget.js 2 files changed, 7 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/66/395866/1 diff --git a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.ItemModel.js b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.ItemModel.js index d1e40ca..4980e36 100644 --- a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.ItemModel.js +++ b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.ItemModel.js @@ -182,7 +182,11 @@ * @return {*} */ mw.rcfilters.dm.ItemModel.prototype.coerceValue = function ( value ) { - return this.getGroupModel().getType() === 'any_value' ? value : !!value; + if ( this.getGroupModel().getType() === 'any_value' ) { + return decodeURIComponent( value ); + } else { + return !!value; + } }; /** diff --git a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.RclTargetPageWidget.js b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.RclTargetPageWidget.js index 6673c08..9e63030 100644 --- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.RclTargetPageWidget.js +++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.RclTargetPageWidget.js @@ -71,6 +71,7 @@ * Respond to the model being updated */ mw.rcfilters.ui.RclTargetPageWidget.prototype.updateUiBasedOnModel = function () { - this.titleSearch.setValue( this.model.getValue() ); + var title = new mw.Title( this.model.getValue() ); + this.titleSearch.setValue( title.toText() ); }; }( mediaWiki ) ); -- To view, visit https://gerrit.wikimedia.org/r/395866 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iabb0d8ea2b9f93f943e8493ee0a29d3bee3b3682 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Sbisson___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: [Config] Update how we calculate if-unmodified-since for tra...
Ppchelko has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395864 ) Change subject: [Config] Update how we calculate if-unmodified-since for transclusions .. [Config] Update how we calculate if-unmodified-since for transclusions See https://github.com/wikimedia/change-propagation/pull/218 Bug: T182216 Change-Id: Ibd39791543a51fa364280fff54aadcec7599014b --- M scap/templates/config.yaml.j2 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/change-propagation/deploy refs/changes/64/395864/1 diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2 index 8f3356c..bca8e38 100644 --- a/scap/templates/config.yaml.j2 +++ b/scap/templates/config.yaml.j2 @@ -354,7 +354,7 @@ uri: '<%= restbase_uri %>/{{message.meta.domain}}/v1/page/html/{{match.meta.uri.title}}' headers: cache-control: no-cache -if-unmodified-since: '{{date(message.meta.dt)}}' +if-unmodified-since: '{{date(message.root_event.dt)}}' x-restbase-mode: '{{message.tags[1]}}' query: redirect: false @@ -411,7 +411,7 @@ uri: '<%= restbase_uri %>/{{message.meta.domain}}/v1/page/html/{{match.meta.uri.title}}' headers: cache-control: no-cache -if-unmodified-since: '{{date(message.meta.dt)}}' +if-unmodified-since: '{{date(message.root_event.dt)}}' x-restbase-mode: '{{message.tags[1]}}' query: redirect: false -- To view, visit https://gerrit.wikimedia.org/r/395864 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibd39791543a51fa364280fff54aadcec7599014b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/change-propagation/deploy Gerrit-Branch: master Gerrit-Owner: Ppchelko___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...WikidataPageBanner[wmf/1.31.0-wmf.11]: ParserOutput::setRawText() isn't a function
Chad has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395857 ) Change subject: ParserOutput::setRawText() isn't a function .. ParserOutput::setRawText() isn't a function It's just called setText(). Change-Id: Ibedaf28661667d19b689bf85afade5f7c9bf638e (cherry picked from commit 70d55219809df7fea9e33178d62e6c01b296be6e) --- M includes/WikidataPageBanner.hooks.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Chad: Verified; Looks good to me, approved diff --git a/includes/WikidataPageBanner.hooks.php b/includes/WikidataPageBanner.hooks.php index 990ef32..d3a11b8 100644 --- a/includes/WikidataPageBanner.hooks.php +++ b/includes/WikidataPageBanner.hooks.php @@ -158,7 +158,7 @@ $options['toc'] = str_replace( 'class="toc"', '', $options['toc'] ); } // Remove default TOC - $pOut->setRawText( preg_replace( + $pOut->setText( preg_replace( '#' . preg_quote( Parser::TOC_START, '#' ) . '.*?' . preg_quote( Parser::TOC_END, '#' ) . '#s', '', $pOut->getRawText() -- To view, visit https://gerrit.wikimedia.org/r/395857 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibedaf28661667d19b689bf85afade5f7c9bf638e Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/WikidataPageBanner Gerrit-Branch: wmf/1.31.0-wmf.11 Gerrit-Owner: LegoktmGerrit-Reviewer: Chad 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...PageImages[master]: Re-enable "MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment...
Pppery has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395865 ) Change subject: Re-enable "MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" sniff .. Re-enable "MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" sniff Bug: T170583 Change-Id: Ib55d299da9c52da02246037fd8be899372758f11 --- M .phpcs.xml M includes/ApiQueryPageImages.php M includes/LinksUpdateHookHandler.php 3 files changed, 6 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageImages refs/changes/65/395865/1 diff --git a/.phpcs.xml b/.phpcs.xml index 18d84eb..2851e8d 100644 --- a/.phpcs.xml +++ b/.phpcs.xml @@ -8,7 +8,6 @@ - . diff --git a/includes/ApiQueryPageImages.php b/includes/ApiQueryPageImages.php index 6c3a94b..405767b 100644 --- a/includes/ApiQueryPageImages.php +++ b/includes/ApiQueryPageImages.php @@ -142,8 +142,8 @@ $fileName = $row->pp_value; $this->setResultValues( $prop, $pageId, $fileName, $size ); } - - } // End page props image extraction + // End page props image extraction + } // Extract images from file namespace pages. In this case we just use // the file itself rather than searching for a page_image. (Bug 50252) diff --git a/includes/LinksUpdateHookHandler.php b/includes/LinksUpdateHookHandler.php index a14e7ae..ec776db 100644 --- a/includes/LinksUpdateHookHandler.php +++ b/includes/LinksUpdateHookHandler.php @@ -191,8 +191,10 @@ protected function fetchFileMetadata( $file ) { $format = new FormatMetadata; $context = new DerivativeContext( $format->getContext() ); - $format->setSingleLanguage( true ); // we don't care and it's slightly faster - $context->setLanguage( 'en' ); // we don't care so avoid splitting the cache + // we don't care about the language, and specifying singleLanguage is slightly faster + $format->setSingleLanguage( true ); + // we don't care about the language, so avoid splitting the cache by selecting English + $context->setLanguage( 'en' ); $format->setContext( $context ); return $format->fetchExtendedMetadata( $file ); } -- To view, visit https://gerrit.wikimedia.org/r/395865 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib55d299da9c52da02246037fd8be899372758f11 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PageImages Gerrit-Branch: master Gerrit-Owner: Pppery___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: site: add conf100[456] with role spare
Dzahn has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395863 ) Change subject: site: add conf100[456] with role spare .. site: add conf100[456] with role spare These are running and automatically get "standard" from the default in site.pp, but they are not explicitly listed with any role yet since it's in the middle of provisioning. This means that Ganglia gets installed and i don't want that, they popped up during by Ganglia decom efforts. Also we want all servers to have a role for other reasons. Adding the role(spare) will automatically remove ganglia and will be sufficient for now until they can actually use role(configcluster) like the others. Bug: T166081 Bug: T177225 Change-Id: Ia41d4594fcec3b8256007290202d5c4fbd0b2c4a --- M manifests/site.pp 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/63/395863/1 diff --git a/manifests/site.pp b/manifests/site.pp index c1e433d..a550543 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -169,6 +169,11 @@ role(configcluster) } +# coming soon, see T166081 +node /^conf100[456]\.eqiad\.wmnet$/ { +role(spare) +} + # conf200x are etcd/zookeeper service nodes in codfw node /^conf200[123]\.codfw\.wmnet$/ { role(configcluster) -- To view, visit https://gerrit.wikimedia.org/r/395863 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia41d4594fcec3b8256007290202d5c4fbd0b2c4a Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...WikidataPageBanner[master]: ParserOutput::setRawText() isn't a function
Chad has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395834 ) Change subject: ParserOutput::setRawText() isn't a function .. ParserOutput::setRawText() isn't a function It's just called setText(). Change-Id: Ibedaf28661667d19b689bf85afade5f7c9bf638e --- M includes/WikidataPageBanner.hooks.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Hoo man: Looks good to me, but someone else must approve Chad: Verified; Looks good to me, approved diff --git a/includes/WikidataPageBanner.hooks.php b/includes/WikidataPageBanner.hooks.php index 990ef32..d3a11b8 100644 --- a/includes/WikidataPageBanner.hooks.php +++ b/includes/WikidataPageBanner.hooks.php @@ -158,7 +158,7 @@ $options['toc'] = str_replace( 'class="toc"', '', $options['toc'] ); } // Remove default TOC - $pOut->setRawText( preg_replace( + $pOut->setText( preg_replace( '#' . preg_quote( Parser::TOC_START, '#' ) . '.*?' . preg_quote( Parser::TOC_END, '#' ) . '#s', '', $pOut->getRawText() -- To view, visit https://gerrit.wikimedia.org/r/395834 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibedaf28661667d19b689bf85afade5f7c9bf638e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikidataPageBanner Gerrit-Branch: master Gerrit-Owner: LegoktmGerrit-Reviewer: Chad Gerrit-Reviewer: Hoo man Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "Revert "Group1 to wmf.11""
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395862 ) Change subject: Revert "Revert "Group1 to wmf.11"" .. Revert "Revert "Group1 to wmf.11"" This reverts commit f41513ce933181c2604ea9d1121b9a2c970fb646. Change-Id: Ie4ae461630bd26a0173fc3cceb895cfa89e45ff6 --- M php M wikiversions.json 2 files changed, 488 insertions(+), 488 deletions(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/php b/php index ac3c670..444a591 12 --- a/php +++ b/php @@ -1 +1 @@ -php-1.31.0-wmf.10 \ No newline at end of file +php-1.31.0-wmf.11 \ No newline at end of file diff --git a/wikiversions.json b/wikiversions.json index df83ab8..d045277 100644 --- a/wikiversions.json +++ b/wikiversions.json @@ -8,9 +8,9 @@ "advisorywiki": "php-1.31.0-wmf.11", "adywiki": "php-1.31.0-wmf.10", "afwiki": "php-1.31.0-wmf.10", -"afwikibooks": "php-1.31.0-wmf.10", -"afwikiquote": "php-1.31.0-wmf.10", -"afwiktionary": "php-1.31.0-wmf.10", +"afwikibooks": "php-1.31.0-wmf.11", +"afwikiquote": "php-1.31.0-wmf.11", +"afwiktionary": "php-1.31.0-wmf.11", "akwiki": "php-1.31.0-wmf.10", "akwikibooks": "php-1.31.0-wmf.11", "akwiktionary": "php-1.31.0-wmf.11", @@ -19,16 +19,16 @@ "alswikiquote": "php-1.31.0-wmf.11", "alswiktionary": "php-1.31.0-wmf.11", "amwiki": "php-1.31.0-wmf.10", -"amwikimedia": "php-1.31.0-wmf.10", +"amwikimedia": "php-1.31.0-wmf.11", "amwikiquote": "php-1.31.0-wmf.11", -"amwiktionary": "php-1.31.0-wmf.10", +"amwiktionary": "php-1.31.0-wmf.11", "angwiki": "php-1.31.0-wmf.10", "angwikibooks": "php-1.31.0-wmf.11", "angwikiquote": "php-1.31.0-wmf.11", "angwikisource": "php-1.31.0-wmf.11", -"angwiktionary": "php-1.31.0-wmf.10", +"angwiktionary": "php-1.31.0-wmf.11", "anwiki": "php-1.31.0-wmf.10", -"anwiktionary": "php-1.31.0-wmf.10", +"anwiktionary": "php-1.31.0-wmf.11", "arbcom_cswiki": "php-1.31.0-wmf.10", "arbcom_dewiki": "php-1.31.0-wmf.10", "arbcom_enwiki": "php-1.31.0-wmf.10", @@ -36,55 +36,55 @@ "arbcom_nlwiki": "php-1.31.0-wmf.10", "arcwiki": "php-1.31.0-wmf.10", "arwiki": "php-1.31.0-wmf.10", -"arwikibooks": "php-1.31.0-wmf.10", -"arwikimedia": "php-1.31.0-wmf.10", -"arwikinews": "php-1.31.0-wmf.10", -"arwikiquote": "php-1.31.0-wmf.10", -"arwikisource": "php-1.31.0-wmf.10", -"arwikiversity": "php-1.31.0-wmf.10", -"arwiktionary": "php-1.31.0-wmf.10", +"arwikibooks": "php-1.31.0-wmf.11", +"arwikimedia": "php-1.31.0-wmf.11", +"arwikinews": "php-1.31.0-wmf.11", +"arwikiquote": "php-1.31.0-wmf.11", +"arwikisource": "php-1.31.0-wmf.11", +"arwikiversity": "php-1.31.0-wmf.11", +"arwiktionary": "php-1.31.0-wmf.11", "arzwiki": "php-1.31.0-wmf.10", "astwiki": "php-1.31.0-wmf.10", "astwikibooks": "php-1.31.0-wmf.11", "astwikiquote": "php-1.31.0-wmf.11", -"astwiktionary": "php-1.31.0-wmf.10", +"astwiktionary": "php-1.31.0-wmf.11", "aswiki": "php-1.31.0-wmf.10", "aswikibooks": "php-1.31.0-wmf.11", -"aswikisource": "php-1.31.0-wmf.10", +"aswikisource": "php-1.31.0-wmf.11", "aswiktionary": "php-1.31.0-wmf.11", "atjwiki": "php-1.31.0-wmf.10", -"auditcomwiki": "php-1.31.0-wmf.10", +"auditcomwiki": "php-1.31.0-wmf.11", "avwiki": "php-1.31.0-wmf.10", "avwiktionary": "php-1.31.0-wmf.11", "aywiki": "php-1.31.0-wmf.10", "aywikibooks": "php-1.31.0-wmf.11", -"aywiktionary": "php-1.31.0-wmf.10", +"aywiktionary": "php-1.31.0-wmf.11", "azbwiki": "php-1.31.0-wmf.10", "azwiki": "php-1.31.0-wmf.10", -"azwikibooks": "php-1.31.0-wmf.10", -"azwikiquote": "php-1.31.0-wmf.10", -"azwikisource": "php-1.31.0-wmf.10", -"azwiktionary": "php-1.31.0-wmf.10", +"azwikibooks": "php-1.31.0-wmf.11", +"azwikiquote": "php-1.31.0-wmf.11", +"azwikisource": "php-1.31.0-wmf.11", +"azwiktionary": "php-1.31.0-wmf.11", "barwiki": "php-1.31.0-wmf.10", "bat_smgwiki": "php-1.31.0-wmf.10", "bawiki": "php-1.31.0-wmf.10", -"bawikibooks": "php-1.31.0-wmf.10", +"bawikibooks": "php-1.31.0-wmf.11", "bclwiki": "php-1.31.0-wmf.10", -"bdwikimedia": "php-1.31.0-wmf.10", +"bdwikimedia": "php-1.31.0-wmf.11", "be_x_oldwiki": "php-1.31.0-wmf.10", -"betawikiversity": "php-1.31.0-wmf.10", +"betawikiversity": "php-1.31.0-wmf.11", "bewiki": "php-1.31.0-wmf.10", -"bewikibooks": "php-1.31.0-wmf.10", -"bewikimedia": "php-1.31.0-wmf.10", -"bewikiquote": "php-1.31.0-wmf.10", -"bewikisource": "php-1.31.0-wmf.10", -"bewiktionary": "php-1.31.0-wmf.10", +"bewikibooks": "php-1.31.0-wmf.11", +"bewikimedia": "php-1.31.0-wmf.11", +"bewikiquote": "php-1.31.0-wmf.11", +"bewikisource": "php-1.31.0-wmf.11", +"bewiktionary":
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "Revert "Group1 to wmf.11""
Hello jenkins-bot, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/395862 to review the following change. Change subject: Revert "Revert "Group1 to wmf.11"" .. Revert "Revert "Group1 to wmf.11"" This reverts commit f41513ce933181c2604ea9d1121b9a2c970fb646. Change-Id: Ie4ae461630bd26a0173fc3cceb895cfa89e45ff6 --- M php M wikiversions.json 2 files changed, 488 insertions(+), 488 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/62/395862/1 diff --git a/php b/php index ac3c670..444a591 12 --- a/php +++ b/php @@ -1 +1 @@ -php-1.31.0-wmf.10 \ No newline at end of file +php-1.31.0-wmf.11 \ No newline at end of file diff --git a/wikiversions.json b/wikiversions.json index df83ab8..d045277 100644 --- a/wikiversions.json +++ b/wikiversions.json @@ -8,9 +8,9 @@ "advisorywiki": "php-1.31.0-wmf.11", "adywiki": "php-1.31.0-wmf.10", "afwiki": "php-1.31.0-wmf.10", -"afwikibooks": "php-1.31.0-wmf.10", -"afwikiquote": "php-1.31.0-wmf.10", -"afwiktionary": "php-1.31.0-wmf.10", +"afwikibooks": "php-1.31.0-wmf.11", +"afwikiquote": "php-1.31.0-wmf.11", +"afwiktionary": "php-1.31.0-wmf.11", "akwiki": "php-1.31.0-wmf.10", "akwikibooks": "php-1.31.0-wmf.11", "akwiktionary": "php-1.31.0-wmf.11", @@ -19,16 +19,16 @@ "alswikiquote": "php-1.31.0-wmf.11", "alswiktionary": "php-1.31.0-wmf.11", "amwiki": "php-1.31.0-wmf.10", -"amwikimedia": "php-1.31.0-wmf.10", +"amwikimedia": "php-1.31.0-wmf.11", "amwikiquote": "php-1.31.0-wmf.11", -"amwiktionary": "php-1.31.0-wmf.10", +"amwiktionary": "php-1.31.0-wmf.11", "angwiki": "php-1.31.0-wmf.10", "angwikibooks": "php-1.31.0-wmf.11", "angwikiquote": "php-1.31.0-wmf.11", "angwikisource": "php-1.31.0-wmf.11", -"angwiktionary": "php-1.31.0-wmf.10", +"angwiktionary": "php-1.31.0-wmf.11", "anwiki": "php-1.31.0-wmf.10", -"anwiktionary": "php-1.31.0-wmf.10", +"anwiktionary": "php-1.31.0-wmf.11", "arbcom_cswiki": "php-1.31.0-wmf.10", "arbcom_dewiki": "php-1.31.0-wmf.10", "arbcom_enwiki": "php-1.31.0-wmf.10", @@ -36,55 +36,55 @@ "arbcom_nlwiki": "php-1.31.0-wmf.10", "arcwiki": "php-1.31.0-wmf.10", "arwiki": "php-1.31.0-wmf.10", -"arwikibooks": "php-1.31.0-wmf.10", -"arwikimedia": "php-1.31.0-wmf.10", -"arwikinews": "php-1.31.0-wmf.10", -"arwikiquote": "php-1.31.0-wmf.10", -"arwikisource": "php-1.31.0-wmf.10", -"arwikiversity": "php-1.31.0-wmf.10", -"arwiktionary": "php-1.31.0-wmf.10", +"arwikibooks": "php-1.31.0-wmf.11", +"arwikimedia": "php-1.31.0-wmf.11", +"arwikinews": "php-1.31.0-wmf.11", +"arwikiquote": "php-1.31.0-wmf.11", +"arwikisource": "php-1.31.0-wmf.11", +"arwikiversity": "php-1.31.0-wmf.11", +"arwiktionary": "php-1.31.0-wmf.11", "arzwiki": "php-1.31.0-wmf.10", "astwiki": "php-1.31.0-wmf.10", "astwikibooks": "php-1.31.0-wmf.11", "astwikiquote": "php-1.31.0-wmf.11", -"astwiktionary": "php-1.31.0-wmf.10", +"astwiktionary": "php-1.31.0-wmf.11", "aswiki": "php-1.31.0-wmf.10", "aswikibooks": "php-1.31.0-wmf.11", -"aswikisource": "php-1.31.0-wmf.10", +"aswikisource": "php-1.31.0-wmf.11", "aswiktionary": "php-1.31.0-wmf.11", "atjwiki": "php-1.31.0-wmf.10", -"auditcomwiki": "php-1.31.0-wmf.10", +"auditcomwiki": "php-1.31.0-wmf.11", "avwiki": "php-1.31.0-wmf.10", "avwiktionary": "php-1.31.0-wmf.11", "aywiki": "php-1.31.0-wmf.10", "aywikibooks": "php-1.31.0-wmf.11", -"aywiktionary": "php-1.31.0-wmf.10", +"aywiktionary": "php-1.31.0-wmf.11", "azbwiki": "php-1.31.0-wmf.10", "azwiki": "php-1.31.0-wmf.10", -"azwikibooks": "php-1.31.0-wmf.10", -"azwikiquote": "php-1.31.0-wmf.10", -"azwikisource": "php-1.31.0-wmf.10", -"azwiktionary": "php-1.31.0-wmf.10", +"azwikibooks": "php-1.31.0-wmf.11", +"azwikiquote": "php-1.31.0-wmf.11", +"azwikisource": "php-1.31.0-wmf.11", +"azwiktionary": "php-1.31.0-wmf.11", "barwiki": "php-1.31.0-wmf.10", "bat_smgwiki": "php-1.31.0-wmf.10", "bawiki": "php-1.31.0-wmf.10", -"bawikibooks": "php-1.31.0-wmf.10", +"bawikibooks": "php-1.31.0-wmf.11", "bclwiki": "php-1.31.0-wmf.10", -"bdwikimedia": "php-1.31.0-wmf.10", +"bdwikimedia": "php-1.31.0-wmf.11", "be_x_oldwiki": "php-1.31.0-wmf.10", -"betawikiversity": "php-1.31.0-wmf.10", +"betawikiversity": "php-1.31.0-wmf.11", "bewiki": "php-1.31.0-wmf.10", -"bewikibooks": "php-1.31.0-wmf.10", -"bewikimedia": "php-1.31.0-wmf.10", -"bewikiquote": "php-1.31.0-wmf.10", -"bewikisource": "php-1.31.0-wmf.10", -"bewiktionary": "php-1.31.0-wmf.10", +"bewikibooks": "php-1.31.0-wmf.11", +"bewikimedia": "php-1.31.0-wmf.11", +"bewikiquote": "php-1.31.0-wmf.11",
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCLFilters: Make 'target' and 'to/from' sticky
Sbisson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395861 ) Change subject: RCLFilters: Make 'target' and 'to/from' sticky .. RCLFilters: Make 'target' and 'to/from' sticky Make these parameters sticky to exclude them from Saved Queries and related features (empty, restoreDefaults). Bug: T172161 Change-Id: Ib8b3ecd34c6af9e0983573586485a9a9f503c060 --- M resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js M resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js 2 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/61/395861/1 diff --git a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js index 1950b93..f4cdae3 100644 --- a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js +++ b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js @@ -786,7 +786,7 @@ var state = {}; this.getItems().forEach( function ( filterItem ) { - state[ filterItem.getName() ] = filterItem.isSelected(); + state[ filterItem.getName() ] = filterItem.getValue(); } ); return state; diff --git a/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js b/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js index 8d5b815..eec4f4b 100644 --- a/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js +++ b/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js @@ -195,7 +195,7 @@ type: 'any_value', title: '', hidden: true, - isSticky: false, + sticky: true, filters: [ { name: 'target', @@ -208,7 +208,7 @@ type: 'boolean', title: '', hidden: true, - isSticky: false, + sticky: true, filters: [ { name: 'showlinkedto', -- To view, visit https://gerrit.wikimedia.org/r/395861 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib8b3ecd34c6af9e0983573586485a9a9f503c060 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Sbisson___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: fix text centering of error message
ConnyDuck has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395860 ) Change subject: fix text centering of error message .. fix text centering of error message When the error message in WikiErrorView grows to two ore more lines due to localization, it was not centered any more. This commits fixes that. Change-Id: Ib2216df7d7924e3f208f9bec40d266c491f080d0 --- M app/src/main/res/layout/view_wiki_error.xml 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/60/395860/1 diff --git a/app/src/main/res/layout/view_wiki_error.xml b/app/src/main/res/layout/view_wiki_error.xml index b946f9a..e9cc0e0 100644 --- a/app/src/main/res/layout/view_wiki_error.xml +++ b/app/src/main/res/layout/view_wiki_error.xml @@ -43,7 +43,9 @@ android:id="@+id/view_wiki_error_text" android:layout_width="wrap_content" android:layout_height="wrap_content" +android:lineSpacingMultiplier="1.2" android:text="@string/error_message_generic" +android:textAlignment="center" android:textColor="@color/base30" android:textSize="16sp" /> -- To view, visit https://gerrit.wikimedia.org/r/395860 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib2216df7d7924e3f208f9bec40d266c491f080d0 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: ConnyDuck___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update mobileapps to ee50d59
Mholloway has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395859 ) Change subject: Update mobileapps to ee50d59 .. Update mobileapps to ee50d59 List of changes: 4f0d18e tag-deploy: push only the created tag f8ef398 Batch MW API query requests dc44d64 Get derivatives from Parsoid HTML and call imageinfo for metadata 48255b0 Add diff test for the media endpoint 621b41d Add audio files to response 9788357 Add on-wiki captions to media response fbf06a2 Add thumb_mime and duration to media output 0d5db1c Media: move extmetadata properties of interest into the top level 19f078f Report image properties in standard image objects 969e277 Media: Add thumb_time to video items, if it exists c346c71 Hygiene: Remove NSP workaround for moment.js 9a896c2 Media: Mark spoken WP files with audio_type: spoken 0e94a9e Media: exclude 'width' and 'height' properties from audio items c9f0480 Hygiene: Add media selector unit tests f247cd5 Media: Unit testing for metadata and derivatives parsing fb876d1 Media: Add pronunciation audio files abd03a8 Hygiene: Fix fixVideoAnchor test 71fde87 Hygiene: Consolidate media selectors cdda9f6 Fix: restore video derivatives 764f838 Hygiene: remove adjustMemberKeys and fillInMemberKeys from mobile-util f14174d Fix broken tests bbaa87b Media endpoint output tweaks, pt. 1 d30f725 Media endpoint output tweaks, pt. 2: derivatives 1c6e047 Media: Add page count for paged items (PDF, TIFF, DjVu, etc.) d9b7665 Media: Exclude .noviewer and .metadata items c49685a Hygiene: Use Element.closest where appropriate ee50d59 Version number for the media endpoint xxx Update node module dependencies Change-Id: I070e692c96484d46b3096b79b8bc28049a7a806d --- M node_modules/abbrev/LICENSE M node_modules/abbrev/package.json M node_modules/ajv/dist/ajv.bundle.js M node_modules/ajv/dist/ajv.min.js M node_modules/ajv/dist/ajv.min.js.map M node_modules/ajv/dist/nodent.min.js M node_modules/ajv/dist/regenerator.min.js M node_modules/ajv/lib/ajv.js M node_modules/ajv/package.json M node_modules/aproba/index.js M node_modules/aproba/package.json A node_modules/are-we-there-yet/CHANGES.md~ M node_modules/are-we-there-yet/package.json M node_modules/block-stream/package.json A node_modules/console-control-strings/README.md~ M node_modules/console-control-strings/package.json M node_modules/cryptiles/.npmignore M node_modules/deep-extend/package.json M node_modules/delegates/package.json M node_modules/esprima/dist/esprima.js M node_modules/fs.realpath/package.json M node_modules/fstream-ignore/package.json M node_modules/fstream/package.json M node_modules/gauge/package.json M node_modules/gc-stats/.travis.yml M node_modules/gc-stats/appveyor.yml D node_modules/gc-stats/build/gcstats/v1.0.2/Release/node-v48-linux-x64/gcstats.node A node_modules/gc-stats/build/gcstats/v1.1.0/Release/node-v48-linux-x64/gcstats.node D node_modules/gc-stats/node_modules/.bin/mkdirp D node_modules/gc-stats/node_modules/.bin/uuid D node_modules/gc-stats/node_modules/ajv/.tonic_example.js D node_modules/gc-stats/node_modules/ajv/LICENSE D node_modules/gc-stats/node_modules/ajv/dist/ajv.bundle.js D node_modules/gc-stats/node_modules/ajv/dist/ajv.min.js D node_modules/gc-stats/node_modules/ajv/dist/ajv.min.js.map D node_modules/gc-stats/node_modules/ajv/dist/nodent.min.js D node_modules/gc-stats/node_modules/ajv/dist/regenerator.min.js D node_modules/gc-stats/node_modules/ajv/lib/ajv.d.ts D node_modules/gc-stats/node_modules/ajv/lib/ajv.js D node_modules/gc-stats/node_modules/ajv/lib/async.js D node_modules/gc-stats/node_modules/ajv/lib/cache.js D node_modules/gc-stats/node_modules/ajv/lib/compile/_rules.js D node_modules/gc-stats/node_modules/ajv/lib/compile/equal.js D node_modules/gc-stats/node_modules/ajv/lib/compile/formats.js D node_modules/gc-stats/node_modules/ajv/lib/compile/index.js D node_modules/gc-stats/node_modules/ajv/lib/compile/resolve.js D node_modules/gc-stats/node_modules/ajv/lib/compile/rules.js D node_modules/gc-stats/node_modules/ajv/lib/compile/schema_obj.js D node_modules/gc-stats/node_modules/ajv/lib/compile/ucs2length.js D node_modules/gc-stats/node_modules/ajv/lib/compile/util.js D node_modules/gc-stats/node_modules/ajv/lib/compile/validation_error.js D node_modules/gc-stats/node_modules/ajv/lib/dot/_limit.jst D node_modules/gc-stats/node_modules/ajv/lib/dot/_limitItems.jst D node_modules/gc-stats/node_modules/ajv/lib/dot/_limitLength.jst D node_modules/gc-stats/node_modules/ajv/lib/dot/_limitProperties.jst D node_modules/gc-stats/node_modules/ajv/lib/dot/allOf.jst D node_modules/gc-stats/node_modules/ajv/lib/dot/anyOf.jst D node_modules/gc-stats/node_modules/ajv/lib/dot/coerce.def D node_modules/gc-stats/node_modules/ajv/lib/dot/custom.jst D node_modules/gc-stats/node_modules/ajv/lib/dot/defaults.def D node_modules/gc-stats/node_modules/ajv/lib/dot/definitions.def D
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Allow Organization merge to resolve casing on organization_name
Eileen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395858 ) Change subject: Allow Organization merge to resolve casing on organization_name .. Allow Organization merge to resolve casing on organization_name Bug: T18108 Change-Id: I31f9cd0cb539f7e9dcbd2f1921906a9d7ca6d5a5 --- M sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php M sites/all/modules/wmf_civicrm/wmf_civicrm.module 2 files changed, 26 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/58/395858/1 diff --git a/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php b/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php index e5eb6cb..7a0051c 100644 --- a/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php +++ b/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php @@ -915,6 +915,31 @@ } /** + * Test that a conflict on casing in first names is handled for organization_name. + */ + public function testBatchMergeConflictNameCasingOrgs() { +$rule_group_id = civicrm_api3('RuleGroup', 'getvalue', array( + 'contact_type' => 'Organization', + 'used' => 'Unsupervised', + 'return' => 'id', + 'options' => array('limit' => 1), +)); + +// Do a pre-merge to get us to a known 'no mergeable contacts' state. +$this->callAPISuccess('Job', 'process_batch_merge', array('mode' => 'safe', 'rule_group_id' => $rule_group_id)); + +$org1 = $this->callAPISuccess('Contact', 'create', array('organization_name' => 'donald duck', 'contact_type' => 'Organization')); +$org2 = $this->callAPISuccess('Contact', 'create', array('organization_name' => 'Donald Duck', 'contact_type' => 'Organization')); + +$result = $this->callAPISuccess('Job', 'process_batch_merge', array('mode' => 'safe', 'rule_group_id' => $rule_group_id)); +$this->assertEquals(0, count($result['values']['skipped'])); +$this->assertEquals(1, count($result['values']['merged'])); + +$contact = $this->callAPISuccess('Contact', 'get', array('id' => $org1['id'], 'sequential' => 1)); +$this->assertEquals('Donald Duck', $contact['values'][0]['organization_name']); + } + + /** * Make sure José whomps Jose. * * Test diacritic matches are resolved to the one using 'authentic' characters. diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module b/sites/all/modules/wmf_civicrm/wmf_civicrm.module index d1c525d..1ad487d 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module @@ -2543,7 +2543,7 @@ * @return bool */ function _wmf_civicrm_merge_resolve_casing_conflict($fieldName, &$moveFieldValue, &$valueToKeep, &$valueToOverwrite) { - $fieldsToResolveCasingFor = array('last_name', 'first_name'); + $fieldsToResolveCasingFor = array('last_name', 'first_name', 'organization_name'); if (!in_array(str_replace('move_', '', $fieldName), $fieldsToResolveCasingFor)) { return FALSE; } -- To view, visit https://gerrit.wikimedia.org/r/395858 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I31f9cd0cb539f7e9dcbd2f1921906a9d7ca6d5a5 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Eileen___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...WikidataPageBanner[wmf/1.31.0-wmf.11]: ParserOutput::setRawText() isn't a function
Legoktm has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395857 ) Change subject: ParserOutput::setRawText() isn't a function .. ParserOutput::setRawText() isn't a function It's just called setText(). Change-Id: Ibedaf28661667d19b689bf85afade5f7c9bf638e --- M includes/WikidataPageBanner.hooks.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataPageBanner refs/changes/57/395857/1 diff --git a/includes/WikidataPageBanner.hooks.php b/includes/WikidataPageBanner.hooks.php index 990ef32..d3a11b8 100644 --- a/includes/WikidataPageBanner.hooks.php +++ b/includes/WikidataPageBanner.hooks.php @@ -158,7 +158,7 @@ $options['toc'] = str_replace( 'class="toc"', '', $options['toc'] ); } // Remove default TOC - $pOut->setRawText( preg_replace( + $pOut->setText( preg_replace( '#' . preg_quote( Parser::TOC_START, '#' ) . '.*?' . preg_quote( Parser::TOC_END, '#' ) . '#s', '', $pOut->getRawText() -- To view, visit https://gerrit.wikimedia.org/r/395857 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibedaf28661667d19b689bf85afade5f7c9bf638e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikidataPageBanner Gerrit-Branch: wmf/1.31.0-wmf.11 Gerrit-Owner: Legoktm___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[wmf/1.31.0-wmf.10]: Make EntityChange truly forward compatible with compact diffs
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395850 ) Change subject: Make EntityChange truly forward compatible with compact diffs .. Make EntityChange truly forward compatible with compact diffs This part was taken from: https://gerrit.wikimedia.org/r/#/c/393791/5/lib/includes/Changes/EntityChange.php and I also applied fa26a00ca113b112b029b11541ba68aa1e945ec4. Bug: T182243 Change-Id: Ic426abde22c5cd53db1390a3ba962a1b03946423 --- M lib/includes/Changes/EntityChange.php 1 file changed, 12 insertions(+), 0 deletions(-) Approvals: Hoo man: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/includes/Changes/EntityChange.php b/lib/includes/Changes/EntityChange.php index 9c62ac9..8180cdd 100644 --- a/lib/includes/Changes/EntityChange.php +++ b/lib/includes/Changes/EntityChange.php @@ -3,6 +3,7 @@ namespace Wikibase; use Deserializers\Deserializer; +use Diff\DiffOp\Diff\Diff; use Diff\DiffOp\DiffOp; use Diff\DiffOpFactory; use MWException; @@ -16,6 +17,7 @@ use Wikibase\DataModel\Entity\BasicEntityIdParser; use Wikibase\DataModel\Services\Diff\EntityTypeAwareDiffOpFactory; use Wikibase\DataModel\Statement\Statement; +use Wikibase\Lib\Changes\EntityDiffChangedAspectsFactory; use Wikibase\Repo\WikibaseRepo; /** @@ -363,6 +365,16 @@ $info['diff'] = $factory->newFromArray( $info['diff'] ); } + if ( isset( $info['compactDiff'] ) && is_string( $info['compactDiff'] ) && + $info['compactDiff'] + ) { + $compactDiff = ( new EntityDiffChangedAspectsFactory() )->newFromEntityDiff( + new Diff() + ); + $compactDiff->unserialize( $info['compactDiff'] ); + $info['compactDiff'] = $compactDiff; + } + return $info; } -- To view, visit https://gerrit.wikimedia.org/r/395850 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic426abde22c5cd53db1390a3ba962a1b03946423 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: wmf/1.31.0-wmf.10 Gerrit-Owner: Hoo manGerrit-Reviewer: Hoo man Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] search/xgboost[master]: [DNM] Test xgboost4j-spark with fast hist tree maker
EBernhardson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395856 ) Change subject: [DNM] Test xgboost4j-spark with fast hist tree maker .. [DNM] Test xgboost4j-spark with fast hist tree maker Change-Id: If8cda596953182a62485df9d8f370f7e6d800b51 --- M jvm-packages/xgboost4j-spark/src/main/scala/ml/dmlc/xgboost4j/scala/spark/XGBoost.scala 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/search/xgboost refs/changes/56/395856/1 diff --git a/jvm-packages/xgboost4j-spark/src/main/scala/ml/dmlc/xgboost4j/scala/spark/XGBoost.scala b/jvm-packages/xgboost4j-spark/src/main/scala/ml/dmlc/xgboost4j/scala/spark/XGBoost.scala index ea18ff2..a0024a7 100644 --- a/jvm-packages/xgboost4j-spark/src/main/scala/ml/dmlc/xgboost4j/scala/spark/XGBoost.scala +++ b/jvm-packages/xgboost4j-spark/src/main/scala/ml/dmlc/xgboost4j/scala/spark/XGBoost.scala @@ -316,10 +316,10 @@ eval: EvalTrait = null, useExternalMemory: Boolean = false, missing: Float = Float.NaN): XGBoostModel = { -if (params.contains("tree_method")) { - require(params("tree_method") != "hist", "xgboost4j-spark does not support fast histogram" + - " for now") -} +// if (params.contains("tree_method")) { +// require(params("tree_method") != "hist", "xgboost4j-spark does not support fast" + +// " histogram for now") +// } require(nWorkers > 0, "you must specify more than 0 workers") if (obj != null) { require(params.get("obj_type").isDefined, "parameter \"obj_type\" is not defined," + -- To view, visit https://gerrit.wikimedia.org/r/395856 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If8cda596953182a62485df9d8f370f7e6d800b51 Gerrit-PatchSet: 1 Gerrit-Project: search/xgboost Gerrit-Branch: master Gerrit-Owner: EBernhardson___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Bump editquality and ores submodules
Awight has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395855 ) Change subject: Bump editquality and ores submodules .. Bump editquality and ores submodules Change-Id: I81ffbf89bd3d6090e642d7481e9427501bd0c804 --- M submodules/editquality M submodules/ores 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Awight: Verified; Looks good to me, approved diff --git a/submodules/editquality b/submodules/editquality index ac3042e..15d5283 16 --- a/submodules/editquality +++ b/submodules/editquality @@ -1 +1 @@ -Subproject commit ac3042ee681242c64c078ca67f2dc4a4699b6bbd +Subproject commit 15d5283b7422919d85203b5ba907027f9356e421 diff --git a/submodules/ores b/submodules/ores index f3a4a63..b7413d6 16 --- a/submodules/ores +++ b/submodules/ores @@ -1 +1 @@ -Subproject commit f3a4a6394dbc231e8ddde80b23340f42fb4b7328 +Subproject commit b7413d6abf80688d44b42da4a7d3a4d1a80ca150 -- To view, visit https://gerrit.wikimedia.org/r/395855 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I81ffbf89bd3d6090e642d7481e9427501bd0c804 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/ores/deploy Gerrit-Branch: master Gerrit-Owner: AwightGerrit-Reviewer: Awight ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Bump editquality and ores submodules
Awight has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395855 ) Change subject: Bump editquality and ores submodules .. Bump editquality and ores submodules Change-Id: I81ffbf89bd3d6090e642d7481e9427501bd0c804 --- M submodules/editquality M submodules/ores 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/ores/deploy refs/changes/55/395855/1 diff --git a/submodules/editquality b/submodules/editquality index ac3042e..15d5283 16 --- a/submodules/editquality +++ b/submodules/editquality @@ -1 +1 @@ -Subproject commit ac3042ee681242c64c078ca67f2dc4a4699b6bbd +Subproject commit 15d5283b7422919d85203b5ba907027f9356e421 diff --git a/submodules/ores b/submodules/ores index f3a4a63..b7413d6 16 --- a/submodules/ores +++ b/submodules/ores @@ -1 +1 @@ -Subproject commit f3a4a6394dbc231e8ddde80b23340f42fb4b7328 +Subproject commit b7413d6abf80688d44b42da4a7d3a4d1a80ca150 -- To view, visit https://gerrit.wikimedia.org/r/395855 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I81ffbf89bd3d6090e642d7481e9427501bd0c804 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/ores/deploy Gerrit-Branch: master Gerrit-Owner: Awight___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Version number for the media endpoint
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395849 ) Change subject: Version number for the media endpoint .. Version number for the media endpoint Bug: T177430 Change-Id: I426d97e2c36b0071bc3a6191fb79e0ee48efec33 --- M lib/mobile-util.js M routes/media.js 2 files changed, 2 insertions(+), 1 deletion(-) Approvals: jenkins-bot: Verified Mholloway: Looks good to me, approved diff --git a/lib/mobile-util.js b/lib/mobile-util.js index 41f3e3c..e93e453 100644 --- a/lib/mobile-util.js +++ b/lib/mobile-util.js @@ -11,6 +11,7 @@ mUtil.CONTENT_TYPES = { mobileSections: { name: 'mobile-sections', version: '0.13.0' }, +media: { name: 'Media', version: '1.0.0' }, readHtml: { name: 'ReadHtml', version: '0.1.0' }, summary: { name: 'Summary', version: '1.3.0' }, definition: { name: 'definition', version: '0.7.2' }, diff --git a/routes/media.js b/routes/media.js index fb39932..68c0c13 100644 --- a/routes/media.js +++ b/routes/media.js @@ -41,7 +41,7 @@ }); }); mUtil.setETag(res, revTid.revision, revTid.tid); -mUtil.setContentType(res, mUtil.CONTENT_TYPES.unpublished); +mUtil.setContentType(res, mUtil.CONTENT_TYPES.media); res.send({ items: mediaList.filter(item => media.filterResult(item)) }); }); }); -- To view, visit https://gerrit.wikimedia.org/r/395849 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I426d97e2c36b0071bc3a6191fb79e0ee48efec33 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: BearNDGerrit-Reviewer: Fjalapeno Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Mholloway Gerrit-Reviewer: Mhurd 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] translatewiki[master]: Rename BS SMW Connector to Blue Spice SMW Connector
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395790 ) Change subject: Rename BS SMW Connector to Blue Spice SMW Connector .. Rename BS SMW Connector to Blue Spice SMW Connector Both have the same message keys Bug: T182223 Change-Id: I44bb4bfba8e95a8d81fb91b4d586b983681c3b48 --- M groups/MediaWiki/mediawiki-extensions.txt 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Robert Vogel: Looks good to me, but someone else must approve Raimond Spekking: Looks good to me, approved jenkins-bot: Verified diff --git a/groups/MediaWiki/mediawiki-extensions.txt b/groups/MediaWiki/mediawiki-extensions.txt index 033b01b..6292730 100644 --- a/groups/MediaWiki/mediawiki-extensions.txt +++ b/groups/MediaWiki/mediawiki-extensions.txt @@ -371,6 +371,10 @@ Blue Spice Smartlist descmsg = bs-smartlist-desc +Blue Spice SMW Connector +descmsg = bs-bssmwconnector-desc +optional = bs-bssmwconnector-nmmngr-label-smw + Blue Spice Sub Page Tree descmsg = bs-subpagetree-desc @@ -396,10 +400,6 @@ Bread Crumbs # Brickipedia Extra // no message prefix, Brickipedia-specific - -BS SMW Connector -descmsg = bs-bssmwconnector-desc -optional = bs-bssmwconnector-nmmngr-label-smw # Debugging extension # Buggy -- To view, visit https://gerrit.wikimedia.org/r/395790 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I44bb4bfba8e95a8d81fb91b4d586b983681c3b48 Gerrit-PatchSet: 2 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: UmherirrenderGerrit-Reviewer: Raimond Spekking Gerrit-Reviewer: Robert Vogel Gerrit-Reviewer: Siebrand 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[wmf/1.31.0-wmf.10]: Make EntityChange truly forward compatible with compact diffs
Hoo man has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395850 ) Change subject: Make EntityChange truly forward compatible with compact diffs .. Make EntityChange truly forward compatible with compact diffs This part was taken from: https://gerrit.wikimedia.org/r/#/c/393791/5/lib/includes/Changes/EntityChange.php and I also applied fa26a00ca113b112b029b11541ba68aa1e945ec4. Change-Id: Ic426abde22c5cd53db1390a3ba962a1b03946423 --- M lib/includes/Changes/EntityChange.php 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/50/395850/1 diff --git a/lib/includes/Changes/EntityChange.php b/lib/includes/Changes/EntityChange.php index 9c62ac9..8180cdd 100644 --- a/lib/includes/Changes/EntityChange.php +++ b/lib/includes/Changes/EntityChange.php @@ -3,6 +3,7 @@ namespace Wikibase; use Deserializers\Deserializer; +use Diff\DiffOp\Diff\Diff; use Diff\DiffOp\DiffOp; use Diff\DiffOpFactory; use MWException; @@ -16,6 +17,7 @@ use Wikibase\DataModel\Entity\BasicEntityIdParser; use Wikibase\DataModel\Services\Diff\EntityTypeAwareDiffOpFactory; use Wikibase\DataModel\Statement\Statement; +use Wikibase\Lib\Changes\EntityDiffChangedAspectsFactory; use Wikibase\Repo\WikibaseRepo; /** @@ -363,6 +365,16 @@ $info['diff'] = $factory->newFromArray( $info['diff'] ); } + if ( isset( $info['compactDiff'] ) && is_string( $info['compactDiff'] ) && + $info['compactDiff'] + ) { + $compactDiff = ( new EntityDiffChangedAspectsFactory() )->newFromEntityDiff( + new Diff() + ); + $compactDiff->unserialize( $info['compactDiff'] ); + $info['compactDiff'] = $compactDiff; + } + return $info; } -- To view, visit https://gerrit.wikimedia.org/r/395850 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic426abde22c5cd53db1390a3ba962a1b03946423 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: wmf/1.31.0-wmf.10 Gerrit-Owner: Hoo man___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Version number for the media endpoint
BearND has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395849 ) Change subject: Version number for the media endpoint .. Version number for the media endpoint Bug: T177430 Change-Id: I426d97e2c36b0071bc3a6191fb79e0ee48efec33 --- M lib/mobile-util.js M routes/media.js 2 files changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps refs/changes/49/395849/1 diff --git a/lib/mobile-util.js b/lib/mobile-util.js index 41f3e3c..e93e453 100644 --- a/lib/mobile-util.js +++ b/lib/mobile-util.js @@ -11,6 +11,7 @@ mUtil.CONTENT_TYPES = { mobileSections: { name: 'mobile-sections', version: '0.13.0' }, +media: { name: 'Media', version: '1.0.0' }, readHtml: { name: 'ReadHtml', version: '0.1.0' }, summary: { name: 'Summary', version: '1.3.0' }, definition: { name: 'definition', version: '0.7.2' }, diff --git a/routes/media.js b/routes/media.js index fb39932..68c0c13 100644 --- a/routes/media.js +++ b/routes/media.js @@ -41,7 +41,7 @@ }); }); mUtil.setETag(res, revTid.revision, revTid.tid); -mUtil.setContentType(res, mUtil.CONTENT_TYPES.unpublished); +mUtil.setContentType(res, mUtil.CONTENT_TYPES.media); res.send({ items: mediaList.filter(item => media.filterResult(item)) }); }); }); -- To view, visit https://gerrit.wikimedia.org/r/395849 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I426d97e2c36b0071bc3a6191fb79e0ee48efec33 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: BearND___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Hygiene: Use Element.closest where appropriate
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395781 ) Change subject: Hygiene: Use Element.closest where appropriate .. Hygiene: Use Element.closest where appropriate Change-Id: Ia2182efe3f8c2877674b042f72ff583b566392fc --- M lib/media.js M lib/mobile-util.js M lib/parseProperty.js M lib/selectors.js 4 files changed, 4 insertions(+), 14 deletions(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/media.js b/lib/media.js index 136aa86..6e6f81b 100644 --- a/lib/media.js +++ b/lib/media.js @@ -2,7 +2,6 @@ const domino = require('domino'); const api = require('./api-util'); -const mUtil = require('./mobile-util'); const Title = require('mediawiki-title').Title; const Selectors = require('./selectors').MediaSelectors; const Blacklist = require('./selectors').MediaBlacklist; @@ -92,12 +91,8 @@ }; }); } else if (mediaType === Audio) { -let parent = elem.parentNode; -while (parent) { -if (mUtil.isElement(parent) && parent.id === SpokenWikipediaId) { -audioType = 'spoken'; -} -parent = parent.parentNode; +if (elem.closest(SpokenWikipediaId)) { +audioType = 'spoken'; } } else if (mediaType === Pronunciation) { title = `File:${elem.getAttribute('title')}`; diff --git a/lib/mobile-util.js b/lib/mobile-util.js index ee28266..41f3e3c 100644 --- a/lib/mobile-util.js +++ b/lib/mobile-util.js @@ -5,7 +5,6 @@ const uuid = require('cassandra-uuid').TimeUuid; const HTTPError = require('./util').HTTPError; const transforms = require('./transforms'); -const NodeType = require('./nodeType'); const mUtil = {}; const NS_MAIN = 0; @@ -50,10 +49,6 @@ }; mUtil.isNonempty = underscore.negate(mUtil.isEmpty); - -mUtil.isElement = function(node) { -return node.nodeType === NodeType.ELEMENT_NODE; -}; /** * @param {*} val input value diff --git a/lib/parseProperty.js b/lib/parseProperty.js index caa9550..36bd474 100644 --- a/lib/parseProperty.js +++ b/lib/parseProperty.js @@ -33,7 +33,7 @@ * https://en.wikipedia.org/wiki/Wikipedia:WikiProject_Spoken_Wikipedia/Template_guidelines */ function parseSpokenWikipedia(doc, page) { -const spokenSectionDiv = doc.querySelector(`div#${SpokenWikipediaId}`); +const spokenSectionDiv = doc.querySelector(`div${SpokenWikipediaId}`); if (spokenSectionDiv) { const dataMW = spokenSectionDiv.getAttribute('data-mw'); const parsedData = dataMW && JSON.parse(dataMW); diff --git a/lib/selectors.js b/lib/selectors.js index 3e66897..0aa87b9 100644 --- a/lib/selectors.js +++ b/lib/selectors.js @@ -22,7 +22,7 @@ const VideoSelectors = MediaSelectors.filter(selector => selector.includes('Video')); const PronunciationSelector = MediaSelectors.filter(selector => selector.includes('IPA'))[0]; -const SpokenWikipediaId = 'section_SpokenWikipedia'; +const SpokenWikipediaId = '#section_SpokenWikipedia'; module.exports = { -- To view, visit https://gerrit.wikimedia.org/r/395781 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia2182efe3f8c2877674b042f72ff583b566392fc Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: MhollowayGerrit-Reviewer: BearND Gerrit-Reviewer: Fjalapeno Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Mhurd 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...mobileapps[master]: Media: Exclude .noviewer and .metadata items
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395653 ) Change subject: Media: Exclude .noviewer and .metadata items .. Media: Exclude .noviewer and .metadata items Looks like this mostly overlaps with our size- and mime-based filtering. Bug: T177430 Change-Id: Idfe8664cf187e0811a27dbce94a1f361e42cb910 --- M lib/media.js M lib/selectors.js M test/diff/results/page_media-enwiki-Hummingbird.json M test/lib/media/media-test.js 4 files changed, 14 insertions(+), 50 deletions(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/media.js b/lib/media.js index aeae4e8..136aa86 100644 --- a/lib/media.js +++ b/lib/media.js @@ -4,7 +4,8 @@ const api = require('./api-util'); const mUtil = require('./mobile-util'); const Title = require('mediawiki-title').Title; -const MediaSelectors = require('./selectors').MediaSelectors; +const Selectors = require('./selectors').MediaSelectors; +const Blacklist = require('./selectors').MediaBlacklist; const SpokenWikipediaId = require('./selectors').SpokenWikipediaId; const MIN_IMAGE_SIZE = 64; @@ -55,8 +56,8 @@ function getMediaItemInfoFromPage(html) { const doc = domino.createDocument(html); // todo: handle Mathoid-rendered math images -const selection = doc.querySelectorAll(MediaSelectors.join()); -return [].map.call(selection, (elem) => { +const elems = doc.querySelectorAll(Selectors.join()).filter(e => !e.closest(Blacklist.join())); +return [].map.call(elems, (elem) => { const mediaType = getMediaType(elem); const resource = mediaType.selector && elem.querySelector(mediaType.selector); const figCaption = elem.querySelector('figcaption'); diff --git a/lib/selectors.js b/lib/selectors.js index 835aac7..3e66897 100644 --- a/lib/selectors.js +++ b/lib/selectors.js @@ -13,6 +13,11 @@ 'span.IPA+small a[rel=mw:MediaLink]' ]; +const MediaBlacklist = [ +'.noviewer', +'.metadata' +]; + const ImageSelectors = MediaSelectors.filter(selector => selector.includes('Image')); const VideoSelectors = MediaSelectors.filter(selector => selector.includes('Video')); const PronunciationSelector = MediaSelectors.filter(selector => selector.includes('IPA'))[0]; @@ -22,6 +27,7 @@ module.exports = { MediaSelectors, +MediaBlacklist, ImageSelectors, VideoSelectors, PronunciationSelector, diff --git a/test/diff/results/page_media-enwiki-Hummingbird.json b/test/diff/results/page_media-enwiki-Hummingbird.json index 1bf7b9c..e3a50d5 100644 --- a/test/diff/results/page_media-enwiki-Hummingbird.json +++ b/test/diff/results/page_media-enwiki-Hummingbird.json @@ -826,52 +826,6 @@ "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0;, "description": "A female Anna's Hummingbird Calypte anna perched on a small branch." -}, -{ - "type": "image", - "titles": { -"canonical": "File:Caribou_from_Wagon_Trails.jpg", -"normalized": "File:Caribou from Wagon Trails.jpg", -"display": "File:Caribou from Wagon Trails.jpg" - }, - "thumbnail": { -"source": "https://upload.wikimedia.org/wikipedia/commons/thumb/e/e0/Caribou_from_Wagon_Trails.jpg/320px-Caribou_from_Wagon_Trails.jpg;, -"width": 320, -"height": 219, -"mime": "image/jpeg" - }, - "original": { -"source": "https://upload.wikimedia.org/wikipedia/commons/e/e0/Caribou_from_Wagon_Trails.jpg;, -"width": 2064, -"height": 1413, -"mime": "image/jpeg" - }, - "file_page": "https://commons.wikimedia.org/wiki/File:Caribou_from_Wagon_Trails.jpg;, - "license": "CC BY-SA 2.5", - "license_url": "https://creativecommons.org/licenses/by-sa/2.5; -}, -{ - "type": "image", - "titles": { -"canonical": "File:Issoria_lathonia.jpg", -"normalized": "File:Issoria lathonia.jpg", -"display": "File:Issoria lathonia.jpg" - }, - "thumbnail": { -"source": "https://upload.wikimedia.org/wikipedia/commons/thumb/2/2d/Issoria_lathonia.jpg/320px-Issoria_lathonia.jpg;, -"width": 320, -"height": 226, -"mime": "image/jpeg" - }, - "original": { -"source": "https://upload.wikimedia.org/wikipedia/commons/2/2d/Issoria_lathonia.jpg;, -"width": 629, -"height": 445, -"mime": "image/jpeg" - }, - "file_page": "https://commons.wikimedia.org/wiki/File:Issoria_lathonia.jpg;, - "license": "CC-BY-SA-3.0", - "license_url": "http://creativecommons.org/licenses/by-sa/3.0/; } ] } \ No newline at end of file diff --git a/test/lib/media/media-test.js b/test/lib/media/media-test.js index 7ab95bd..c4ea7eb 100644 --- a/test/lib/media/media-test.js +++ b/test/lib/media/media-test.js @@ -29,12 +29,15 @@ const
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Media: Add page count for paged items (PDF, TIFF, DjVu, etc.)
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395643 ) Change subject: Media: Add page count for paged items (PDF, TIFF, DjVu, etc.) .. Media: Add page count for paged items (PDF, TIFF, DjVu, etc.) Bug: T177430 Change-Id: I94b5c6222a99c7474b019191255e7bb179e23f41 --- M lib/media.js M spec.yaml M test/diff/results/page_media-enwiki-Hummingbird.json M test/diff/results/page_media-enwiki-Ko%C5%A1ice.json 4 files changed, 7 insertions(+), 0 deletions(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/media.js b/lib/media.js index dce92e6..aeae4e8 100644 --- a/lib/media.js +++ b/lib/media.js @@ -148,6 +148,7 @@ height: info.mediatype === 'AUDIO' ? undefined : info.height, mime: info.mime, }, +page_count: info.pagecount, file_page: `https://commons.wikimedia.org/wiki/${canonical}`, duration: meta && (meta.length || meta.playtime_seconds) || undefined, artist: ext && ext.Artist && ext.Artist.value, @@ -184,6 +185,7 @@ 'url', 'dimensions', 'mime', +'size', 'thumbmime', 'mediatype', 'metadata', diff --git a/spec.yaml b/spec.yaml index aabb1dc..3d315d1 100644 --- a/spec.yaml +++ b/spec.yaml @@ -1285,6 +1285,9 @@ size: type: integer description: the original file size in bytes (sizes are not provided for video derivatives) + page_count: +type: integer +description: page count, if the item is a paged item (PDF, TIFF, DjVu, etc.) file_page: type: string description: Full URL to the file page for the item on Wikimedia Commons diff --git a/test/diff/results/page_media-enwiki-Hummingbird.json b/test/diff/results/page_media-enwiki-Hummingbird.json index b62bb3f..1bf7b9c 100644 --- a/test/diff/results/page_media-enwiki-Hummingbird.json +++ b/test/diff/results/page_media-enwiki-Hummingbird.json @@ -320,6 +320,7 @@ "height": 2083, "mime": "image/tiff" }, + "page_count": 1, "file_page": "https://commons.wikimedia.org/wiki/File:Velvet-purple_coronets_sequence.tif;, "artist": "Unherdable", "credit": "Own work", diff --git a/test/diff/results/page_media-enwiki-Ko%C5%A1ice.json b/test/diff/results/page_media-enwiki-Ko%C5%A1ice.json index 40c38e8..a2eca8a 100644 --- a/test/diff/results/page_media-enwiki-Ko%C5%A1ice.json +++ b/test/diff/results/page_media-enwiki-Ko%C5%A1ice.json @@ -23,6 +23,7 @@ "height": 2202, "mime": "image/tiff" }, + "page_count": 1, "file_page": "https://commons.wikimedia.org/wiki/File:Fő_utcza,_Kassa_-_1902_(1).tif", "artist": "Unknown photographer (scanned by Derzsi Elekes Andor)", "credit": "Courtesy of Derzsi Elekes Andor", -- To view, visit https://gerrit.wikimedia.org/r/395643 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I94b5c6222a99c7474b019191255e7bb179e23f41 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: MhollowayGerrit-Reviewer: BearND Gerrit-Reviewer: Fjalapeno Gerrit-Reviewer: Gergő Tisza Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Mhurd 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...mobileapps[master]: Media endpoint output tweaks, pt. 2: derivatives
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395599 ) Change subject: Media endpoint output tweaks, pt. 2: derivatives .. Media endpoint output tweaks, pt. 2: derivatives * Change 'derivatives' property name to 'sources' * Remove 'original' property for videos since the original is present in the sources * Split 'type' property into 'mime' and 'codecs' * Rename 'title' and 'short_title' to 'name' and 'short_name' Bug: T177430 Change-Id: I411925b4db1bcb698dc0e5198fac617eef54d65b --- M lib/media.js M routes/media.js M spec.yaml M test/diff/results/page_media-enwiki-Hummingbird.json M test/lib/media/media-test.js 5 files changed, 135 insertions(+), 93 deletions(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/media.js b/lib/media.js index 7bf9c20..dce92e6 100644 --- a/lib/media.js +++ b/lib/media.js @@ -69,7 +69,7 @@ let endTime; let thumbTime; let audioType; -let derivatives; +let sources; if (mediaType === Video) { const dataMw = JSON.parse(elem.getAttribute('data-mw')); if (dataMw) { @@ -77,19 +77,19 @@ endTime = dataMw.endtime; thumbTime = dataMw.thumbtime; } -const sources = elem.getElementsByTagName('source'); -if (sources.length) { -derivatives = [].map.call(sources, (source) => { -return { -source: source.getAttribute('src'), -type: source.getAttribute('type'), -title: source.getAttribute('data-title'), -short_title: source.getAttribute('data-shorttitle'), -width: source.getAttribute('data-file-width') || undefined, -height: source.getAttribute('data-file-height') || undefined -}; -}); -} +const sourceElems = elem.getElementsByTagName('source'); +sources = [].map.call(sourceElems, (source) => { +return { +source: source.getAttribute('src'), +mime: source.getAttribute('type').split('; ')[0], +// eslint-disable-next-line no-useless-escape +codecs: source.getAttribute('type').split('; ')[1].split('\"')[1].split(', '), +name: source.getAttribute('data-title'), +short_name: source.getAttribute('data-shorttitle'), +width: source.getAttribute('data-file-width') || undefined, +height: source.getAttribute('data-file-height') || undefined +}; +}); } else if (mediaType === Audio) { let parent = elem.parentNode; while (parent) { @@ -110,7 +110,7 @@ end_time: endTime, thumb_time: thumbTime, audio_type: audioType, -derivatives +sources }; }); } @@ -163,7 +163,7 @@ // Reject gallery items if they're too small. // Also reject SVG and PNG items by default, because they're likely to be // logos and/or presentational images. -return item.original && item.original.source +return item.sources || item.original && item.original.source && (item.type === Audio.name || item.original.width >= MIN_IMAGE_SIZE) && (item.type === Audio.name || item.original.height >= MIN_IMAGE_SIZE) && !item.original.mime.includes('svg') diff --git a/routes/media.js b/routes/media.js index cea40bc..fb39932 100644 --- a/routes/media.js +++ b/routes/media.js @@ -32,6 +32,11 @@ if (mediaItem.title === metadataItem.titles.canonical) { Object.assign(mediaItem, metadataItem); delete mediaItem.title; + +// delete 'original' property for videos +if (mediaItem.sources) { +delete mediaItem.original; +} } }); }); diff --git a/spec.yaml b/spec.yaml index 32c97ee..aabb1dc 100644 --- a/spec.yaml +++ b/spec.yaml @@ -597,11 +597,6 @@ width: /.+/ height: /.+/ mime: /.+/ - original: -source: /.+/ -width: /.+/ -height: /.+/ -mime: /.+/ license: /.+/ # from routes/definition.js @@ -1315,7 +1310,7 @@ duration: type: number description: the playback duration in seconds (for audio and video items) - derivatives: + sources: type: array description: a list of derivatives of the original file
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: media: Ensure there ie enough data to extract software version
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/383959 ) Change subject: media: Ensure there ie enough data to extract software version .. media: Ensure there ie enough data to extract software version The Software EXIF / other metadata field was expected to contain the software name followed by the version number. There are occurences in Wikimedia production logs of errors showing that's not always the case. Bug: T178130 Change-Id: I4187a41b5fd8d7b5574ab50523668d8feb11bccc --- M includes/media/FormatMetadata.php M tests/phpunit/includes/media/FormatMetadataTest.php 2 files changed, 53 insertions(+), 2 deletions(-) Approvals: Umherirrender: Looks good to me, approved Matthias Mullie: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/includes/media/FormatMetadata.php b/includes/media/FormatMetadata.php index 6661965..b008a22 100644 --- a/includes/media/FormatMetadata.php +++ b/includes/media/FormatMetadata.php @@ -740,8 +740,13 @@ case 'Software': if ( is_array( $val ) ) { - // if its a software, version array. - $val = $this->msg( 'exif-software-version-value', $val[0], $val[1] )->text(); + if ( count( $val ) > 1 ) { + // if its a software, version array. + $val = $this->msg( 'exif-software-version-value', $val[0], $val[1] )->text(); + } else { + // https://phabricator.wikimedia.org/T178130 + $val = $this->exifMsg( $tag, '', $val[0] ); + } } else { $val = $this->exifMsg( $tag, '', $val ); } diff --git a/tests/phpunit/includes/media/FormatMetadataTest.php b/tests/phpunit/includes/media/FormatMetadataTest.php index e9fc84e..16ae193 100644 --- a/tests/phpunit/includes/media/FormatMetadataTest.php +++ b/tests/phpunit/includes/media/FormatMetadataTest.php @@ -95,4 +95,50 @@ ], ]; } + + /** +* @param mixed $input +* @param mixed $output +* @dataProvider provideGetFormattedData +* @covers FormatMetadata::getFormattedData +*/ + public function testGetFormattedData( $input, $output ) { + $this->assertEquals( $output, FormatMetadata::getFormattedData( $input ) ); + } + + public function provideGetFormattedData() { + return [ + [ + [ 'Software' => 'Adobe Photoshop CS6 (Macintosh)' ], + [ 'Software' => 'Adobe Photoshop CS6 (Macintosh)' ], + ], + [ + [ 'Software' => [ 'FotoWare FotoStation' ] ], + [ 'Software' => 'FotoWare FotoStation' ], + ], + [ + [ 'Software' => [ [ 'Capture One PRO', '3.7.7' ] ] ], + [ 'Software' => 'Capture One PRO (Version 3.7.7)' ], + ], + [ + [ 'Software' => [ [ 'FotoWare ColorFactory', '' ] ] ], + [ 'Software' => 'FotoWare ColorFactory (Version )' ], + ], + [ + [ 'Software' => [ 'x-default' => 'paint.net 4.0.12', '_type' => 'lang' ] ], + [ 'Software' => ''. + ''. + 'paint.net 4.0.12'. + "\n". + '' + ], + ], + [ + // https://phabricator.wikimedia.org/T178130 + // WebMHandler.php turns both 'muxingapp' & 'writingapp' to 'Software' + [ 'Software' => [ [ 'Lavf57.25.100' ], [ 'Lavf57.25.100' ] ] ], + [ 'Software' => "Lavf57.25.100\nLavf57.25.100" ], + ], + ]; + } } -- To view, visit https://gerrit.wikimedia.org/r/383959 To
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Fix broken tests
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395840 ) Change subject: Fix broken tests .. Fix broken tests These tests should point at the real page and not the redirect page since we're not testing redirect handling. This fixes the build; let's figure out why they were failing later. Change-Id: If7017392c2869d6115d3cab4adea568bc791050d --- M test/features/mobile-sections-lead/pagecontent.js M test/features/mobile-sections/pagecontent-v2.js 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified diff --git a/test/features/mobile-sections-lead/pagecontent.js b/test/features/mobile-sections-lead/pagecontent.js index 7f093b1..9c276d4 100644 --- a/test/features/mobile-sections-lead/pagecontent.js +++ b/test/features/mobile-sections-lead/pagecontent.js @@ -212,7 +212,7 @@ }); }); it('Enwiki hatnotes are promoted to the lead object', () => { -const title = `Chivalric%20order`; +const title = `Order_of_chivalry`; const uri = `${server.config.uri}${wikiSectionsLead}${title}/699553745`; const anchor = ``; return preq.get({ uri }) diff --git a/test/features/mobile-sections/pagecontent-v2.js b/test/features/mobile-sections/pagecontent-v2.js index 439a24d..05ae604 100644 --- a/test/features/mobile-sections/pagecontent-v2.js +++ b/test/features/mobile-sections/pagecontent-v2.js @@ -33,7 +33,7 @@ // special it('Hatnotes do not appear in the lead object', () => { -const title = 'Chivalric%20order/699553745'; +const title = 'Order_of_chivalry/699553745'; const uri = `${server.config.uri}en.wikipedia.org/v1/page/formatted/${title}`; const anchor = ''; return preq.get({ uri }) -- To view, visit https://gerrit.wikimedia.org/r/395840 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If7017392c2869d6115d3cab4adea568bc791050d Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: MhollowayGerrit-Reviewer: BearND Gerrit-Reviewer: Fjalapeno Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Mhurd 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...PageImages[master]: Re-enable "MediaWiki.Commenting.FunctionComment.MissingRetur...
Pppery has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395848 ) Change subject: Re-enable "MediaWiki.Commenting.FunctionComment.MissingReturn" sniff .. Re-enable "MediaWiki.Commenting.FunctionComment.MissingReturn" sniff Bug: T175083 Change-Id: Iad521de387dce704db5552168b18f2653cd3e291 --- M .phpcs.xml M includes/ApiQueryPageImages.php 2 files changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageImages refs/changes/48/395848/1 diff --git a/.phpcs.xml b/.phpcs.xml index 18d84eb..e305f8c 100644 --- a/.phpcs.xml +++ b/.phpcs.xml @@ -2,7 +2,6 @@ - diff --git a/includes/ApiQueryPageImages.php b/includes/ApiQueryPageImages.php index 6c3a94b..cff096f 100644 --- a/includes/ApiQueryPageImages.php +++ b/includes/ApiQueryPageImages.php @@ -282,6 +282,7 @@ /** * @see ApiBase::getExamplesMessages() +* @return array */ protected function getExamplesMessages() { return [ -- To view, visit https://gerrit.wikimedia.org/r/395848 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iad521de387dce704db5552168b18f2653cd3e291 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PageImages Gerrit-Branch: master Gerrit-Owner: Pppery___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Change EnqueueJob docs to discourage obsolete use-cases
Aaron Schulz has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395847 ) Change subject: Change EnqueueJob docs to discourage obsolete use-cases .. Change EnqueueJob docs to discourage obsolete use-cases Bug: T181216 Change-Id: I9332d26ae9a74c3721cff9c497d5356f05efb428 --- M includes/jobqueue/jobs/EnqueueJob.php 1 file changed, 4 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/47/395847/1 diff --git a/includes/jobqueue/jobs/EnqueueJob.php b/includes/jobqueue/jobs/EnqueueJob.php index 5ffb01b..e1a9491 100644 --- a/includes/jobqueue/jobs/EnqueueJob.php +++ b/includes/jobqueue/jobs/EnqueueJob.php @@ -24,11 +24,10 @@ /** * Router job that takes jobs and enqueues them to their proper queues * - * This can be used for several things: - * - a) Making multi-job enqueues more robust by atomically enqueueing - *a single job that pushes the actual jobs (with retry logic) - * - b) Masking the latency of pushing jobs to different queues/wikis - * - c) Low-latency enqueues to push jobs from warm to hot datacenters + * This can be used for getting sets of multiple jobs or sets of jobs intended for multiple + * queues to be inserted more robustly. This is a single job that, upon running, enqueues the + * wrapped jobs. If some of those fail to enqueue then the EnqueueJob will be retried. Due to + * the possibility of deplicate enqueues, the wrapped jobs should be idempotent. * * @ingroup JobQueue * @since 1.25 -- To view, visit https://gerrit.wikimedia.org/r/395847 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9332d26ae9a74c3721cff9c497d5356f05efb428 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Fix broken tests
Mholloway has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395840 ) Change subject: Fix broken tests .. Fix broken tests These tests should point at the real page and not the redirect page since we're not testing redirect handling. This fixes the build; let's figure out why they were failing later. Change-Id: If7017392c2869d6115d3cab4adea568bc791050d --- M test/features/mobile-sections-lead/pagecontent.js M test/features/mobile-sections/pagecontent-v2.js 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps refs/changes/40/395840/1 diff --git a/test/features/mobile-sections-lead/pagecontent.js b/test/features/mobile-sections-lead/pagecontent.js index 7f093b1..a5ec47a 100644 --- a/test/features/mobile-sections-lead/pagecontent.js +++ b/test/features/mobile-sections-lead/pagecontent.js @@ -212,7 +212,7 @@ }); }); it('Enwiki hatnotes are promoted to the lead object', () => { -const title = `Chivalric%20order`; +const title = `Order%20of%20chivalry`; const uri = `${server.config.uri}${wikiSectionsLead}${title}/699553745`; const anchor = ``; return preq.get({ uri }) diff --git a/test/features/mobile-sections/pagecontent-v2.js b/test/features/mobile-sections/pagecontent-v2.js index 439a24d..d8a0ae5 100644 --- a/test/features/mobile-sections/pagecontent-v2.js +++ b/test/features/mobile-sections/pagecontent-v2.js @@ -33,7 +33,7 @@ // special it('Hatnotes do not appear in the lead object', () => { -const title = 'Chivalric%20order/699553745'; +const title = 'Order%20of%20chivalry/699553745'; const uri = `${server.config.uri}en.wikipedia.org/v1/page/formatted/${title}`; const anchor = ''; return preq.get({ uri }) -- To view, visit https://gerrit.wikimedia.org/r/395840 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If7017392c2869d6115d3cab4adea568bc791050d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: Mholloway___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...PageImages[master]: Re-enable "MediaWiki.Commenting.FunctionComment.MissingParam...
Pppery has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395838 ) Change subject: Re-enable "MediaWiki.Commenting.FunctionComment.MissingParamComment" sniff .. Re-enable "MediaWiki.Commenting.FunctionComment.MissingParamComment" sniff Bug: T170583 Change-Id: I3a5a849c168aed7ab6ea479bab5ec7d9b809dd6f --- M .phpcs.xml M includes/ApiQueryPageImages.php M includes/LinksUpdateHookHandler.php M includes/PageImages.php M includes/ParserFileProcessingHookHandlers.php 5 files changed, 33 insertions(+), 31 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageImages refs/changes/38/395838/1 diff --git a/.phpcs.xml b/.phpcs.xml index 18d84eb..f3c7d44 100644 --- a/.phpcs.xml +++ b/.phpcs.xml @@ -1,7 +1,6 @@ - diff --git a/includes/ApiQueryPageImages.php b/includes/ApiQueryPageImages.php index 6c3a94b..2a66d90 100644 --- a/includes/ApiQueryPageImages.php +++ b/includes/ApiQueryPageImages.php @@ -24,8 +24,8 @@ const PARAM_LICENSE_ANY = 'any'; /** -* @param ApiQuery $query -* @param string $moduleName +* @param ApiQuery $query API query module +* @param string $moduleName Name of this query module */ public function __construct( ApiQuery $query, $moduleName ) { parent::__construct( $query, $moduleName, 'pi' ); @@ -160,7 +160,8 @@ * otherwise both free and non-free property names will be returned. That's * because we save the image name only once if it's free and the best image. * -* @param string $license +* @param string $license either PARAM_LISENCE_FREE or PARAM_LISENCE_ANY, +* specifying whether to reruen the non-free property name or not * @return string|array */ protected static function getPropNames( $license ) { diff --git a/includes/LinksUpdateHookHandler.php b/includes/LinksUpdateHookHandler.php index a14e7ae..cfb71d0 100644 --- a/includes/LinksUpdateHookHandler.php +++ b/includes/LinksUpdateHookHandler.php @@ -25,7 +25,7 @@ * * @see https://www.mediawiki.org/wiki/Manual:Hooks/LinksUpdate * -* @param LinksUpdate $linksUpdate +* @param LinksUpdate $linksUpdate the LinksUpdate object that this hook is parsing */ public static function onLinksUpdate( LinksUpdate $linksUpdate ) { $handler = new self(); @@ -35,7 +35,8 @@ /** * Returns a list of page image candidates for consideration * for scoring algorithm. -* @param LinksUpdate $linksUpdate +* @param LinksUpdate $linksUpdate LinksUpdate object used to determine what page +* to get page images for * @return array $image Associative array describing an image */ public function getPageImageCandidates( LinksUpdate $linksUpdate ) { @@ -63,7 +64,7 @@ } /** -* @param LinksUpdate $linksUpdate +* @param LinksUpdate $linksUpdate the LinksUpdate object that was passed to the handler */ public function doLinksUpdate( LinksUpdate $linksUpdate ) { $images = $this->getPageImageCandidates( $linksUpdate ); @@ -147,8 +148,9 @@ /** * Returns score based on table of ranges * -* @param int $value -* @param int[] $scores +* @param int $value The number that the various bounds are compared against +* to calculate the score +* @param int[] $scores Table of scores for different ranges of $value * * @return int */ @@ -185,7 +187,7 @@ /** * Fetch file metadata * -* @param File $file +* @param File $file File to fetch metadata from * @return array */ protected function fetchFileMetadata( $file ) { @@ -200,7 +202,7 @@ /** * Returns width/height ratio of an image as displayed or 0 is not available * -* @param array $image +* @param array $image Array representing the image to get the aspect ratio from * * @return float|int */ diff --git a/includes/PageImages.php b/includes/PageImages.php index bb412ae..072bffa 100644 --- a/includes/PageImages.php +++ b/includes/PageImages.php @@ -71,8 +71,8 @@ * * @see https://www.mediawiki.org/wiki/Manual:Hooks/InfoAction * -* @param IContextSource $context -* @param array[] &$pageInfo +* @param IContextSource $context Context, used to extract the title of the page +* @param array[] &$pageInfo Auxillary information about the page. Ignored */ public static function onInfoAction( IContextSource $context, &$pageInfo ) { global $wgThumbLimits; @@ -106,7 +106,7
[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[wmf/1.31.0-wmf.11]: Revert "Transmit compact diff instead of suppressed diff"
Hoo man has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395837 ) Change subject: Revert "Transmit compact diff instead of suppressed diff" .. Revert "Transmit compact diff instead of suppressed diff" At least for wmf11 we need to keep transmitting the old diff, wmf10 client's can't yet read the new one. This is because https://gerrit.wikimedia.org/r/393780 and https://gerrit.wikimedia.org/r/394432 are needed on all wikis first. This reverts commit f77b47c5e30c297a43e4ce354c1dfb4a29a638fa. Bug: T182243 Change-Id: Icc06c9949aa4c708fc615feee35639786e99ddca --- M client/includes/Changes/AffectedPagesFinder.php M client/tests/phpunit/includes/Changes/ChangeRunCoalescerTest.php M lib/includes/Changes/DiffChange.php M lib/includes/Changes/EntityChange.php M lib/includes/Changes/EntityChangeFactory.php M lib/tests/phpunit/Changes/EntityChangeFactoryTest.php 6 files changed, 72 insertions(+), 57 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/37/395837/1 diff --git a/client/includes/Changes/AffectedPagesFinder.php b/client/includes/Changes/AffectedPagesFinder.php index a5450e2..4794df7 100644 --- a/client/includes/Changes/AffectedPagesFinder.php +++ b/client/includes/Changes/AffectedPagesFinder.php @@ -122,7 +122,7 @@ $aspects = []; $info = $change->getInfo(); - // We might unserialize old EntityChange which doesn't have getCompactDiff method + // We might unserialize old EntityChange which doesn't have getAspectsDiff method if ( array_key_exists( 'compactDiff', $info ) ) { $diffAspects = $info['compactDiff']; } else { @@ -240,7 +240,7 @@ if ( $change instanceof ItemChange && in_array( EntityUsage::TITLE_USAGE, $changedAspects ) ) { $info = $change->getInfo(); - // We might unserialize old EntityChange which doesn't have getCompactDiff method + // We might unserialize old EntityChange which doesn't have getAspectsDiff method if ( array_key_exists( 'compactDiff', $info ) ) { $diffChangedAspects = $info['compactDiff']; } else { diff --git a/client/tests/phpunit/includes/Changes/ChangeRunCoalescerTest.php b/client/tests/phpunit/includes/Changes/ChangeRunCoalescerTest.php index 8081361..4bc5c1c 100644 --- a/client/tests/phpunit/includes/Changes/ChangeRunCoalescerTest.php +++ b/client/tests/phpunit/includes/Changes/ChangeRunCoalescerTest.php @@ -2,6 +2,8 @@ namespace Wikibase\Client\Tests\Changes; +use Diff\DiffOp\AtomicDiffOp; +use Traversable; use Wikibase\Change; use Wikibase\Client\Changes\ChangeRunCoalescer; use Wikibase\DataModel\Entity\Item; @@ -10,7 +12,6 @@ use Wikibase\DataModel\SiteLink; use Wikibase\EntityChange; use Wikibase\ItemChange; -use Wikibase\Lib\Changes\EntityDiffChangedAspectsFactory; use Wikibase\Lib\Store\EntityRevisionLookup; use Wikibase\Lib\Tests\MockRepository; use Wikibase\Lib\Tests\Changes\TestChanges; @@ -132,8 +133,7 @@ } $change->setEntityId( new ItemId( $values['object_id'] ) ); - $diffAspects = ( new EntityDiffChangedAspectsFactory() )->newFromEntityDiff( $diff ); - $change->setCompactDiff( $diffAspects ); + $change->setDiff( $diff ); return $change; } @@ -192,10 +192,29 @@ $this->assertArrayEquals( $expected->getMetadata(), $actual->getMetadata(), false, true ); } - $this->assertSame( - $expected->getCompactDiff()->toArray(), - $actual->getCompactDiff()->toArray() - ); + $this->assertDiffsEqual( $expected->getDiff(), $actual->getDiff() ); + } + + private function assertDiffsEqual( $expected, $actual, $path = '' ) { + if ( $expected instanceof AtomicDiffOp ) { + //$this->assertEquals( $expected->getType(), $actual->getType(), $path . ' DiffOp.type' ); + $this->assertEquals( serialize( $expected ), serialize( $actual ), $path . ' DiffOp' ); + return; + } + + if ( $expected instanceof Traversable ) { + $expected = iterator_to_array( $expected ); + $actual = iterator_to_array( $actual ); + } + + foreach ( $expected as $key => $expectedValue ) { + $currentPath = "$path/$key"; + $this->assertArrayHasKey( $key, $actual, $currentPath . " missing key" ); + $this->assertDiffsEqual( $expectedValue, $actual[$key], $currentPath ); + } + +
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: alswiki: Set wgRestrictDisplayTitle = false
EddieGP has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395835 ) Change subject: alswiki: Set wgRestrictDisplayTitle = false .. alswiki: Set wgRestrictDisplayTitle = false Per request, enable {{DISPLAYNAME}} to change the page name to something that differs from the page name in more than capitalisation. Bug: T182154 Change-Id: Ie025dba1a514e799f058c81b40d5009e6f3af4ab --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/35/395835/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 42e9e89..4bc5a01 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -11985,6 +11985,7 @@ 'wikimania' => false, // Individual wikis + 'alswiki => false, // T182154 'aswiki' => false, 'bewikimedia' => false, 'bnwiki' => false, -- To view, visit https://gerrit.wikimedia.org/r/395835 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie025dba1a514e799f058c81b40d5009e6f3af4ab Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: EddieGP___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...WikidataPageBanner[master]: ParserOutput::setRawText() isn't a function
Legoktm has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395834 ) Change subject: ParserOutput::setRawText() isn't a function .. ParserOutput::setRawText() isn't a function It's just called setText(). Change-Id: Ibedaf28661667d19b689bf85afade5f7c9bf638e --- M includes/WikidataPageBanner.hooks.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataPageBanner refs/changes/34/395834/1 diff --git a/includes/WikidataPageBanner.hooks.php b/includes/WikidataPageBanner.hooks.php index 990ef32..d3a11b8 100644 --- a/includes/WikidataPageBanner.hooks.php +++ b/includes/WikidataPageBanner.hooks.php @@ -158,7 +158,7 @@ $options['toc'] = str_replace( 'class="toc"', '', $options['toc'] ); } // Remove default TOC - $pOut->setRawText( preg_replace( + $pOut->setText( preg_replace( '#' . preg_quote( Parser::TOC_START, '#' ) . '.*?' . preg_quote( Parser::TOC_END, '#' ) . '#s', '', $pOut->getRawText() -- To view, visit https://gerrit.wikimedia.org/r/395834 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibedaf28661667d19b689bf85afade5f7c9bf638e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikidataPageBanner Gerrit-Branch: master Gerrit-Owner: Legoktm___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Revert "Transmit compact diff instead of suppressed diff"
Hello Ladsgroup, jenkins-bot, Thiemo Mättig (WMDE), I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/395833 to review the following change. Change subject: Revert "Transmit compact diff instead of suppressed diff" .. Revert "Transmit compact diff instead of suppressed diff" At least for wmf11 we need to keep transmitting the old diff, wmf10 client's can't yet read the new one. This is because https://gerrit.wikimedia.org/r/393780 and https://gerrit.wikimedia.org/r/394432 are needed on all wikis first. This reverts commit f77b47c5e30c297a43e4ce354c1dfb4a29a638fa. Change-Id: I9e7c8f18be89b6bea17286c9e5014d330f310002 --- M client/includes/Changes/AffectedPagesFinder.php M client/tests/phpunit/includes/Changes/ChangeRunCoalescerTest.php M lib/includes/Changes/DiffChange.php M lib/includes/Changes/EntityChange.php M lib/includes/Changes/EntityChangeFactory.php M lib/tests/phpunit/Changes/EntityChangeFactoryTest.php 6 files changed, 72 insertions(+), 65 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/33/395833/1 diff --git a/client/includes/Changes/AffectedPagesFinder.php b/client/includes/Changes/AffectedPagesFinder.php index 9b0850e..cec0eeb 100644 --- a/client/includes/Changes/AffectedPagesFinder.php +++ b/client/includes/Changes/AffectedPagesFinder.php @@ -122,7 +122,7 @@ $aspects = []; $info = $change->getInfo(); - // We might unserialize old EntityChange which doesn't have getCompactDiff method + // We might unserialize old EntityChange which doesn't have getAspectsDiff method if ( array_key_exists( 'compactDiff', $info ) ) { $diffAspects = $info['compactDiff']; } else { @@ -218,7 +218,7 @@ if ( $change instanceof ItemChange && in_array( EntityUsage::TITLE_USAGE, $changedAspects ) ) { $info = $change->getInfo(); - // We might unserialize old EntityChange which doesn't have getCompactDiff method + // We might unserialize old EntityChange which doesn't have getAspectsDiff method if ( array_key_exists( 'compactDiff', $info ) ) { $diffChangedAspects = $info['compactDiff']; } else { diff --git a/client/tests/phpunit/includes/Changes/ChangeRunCoalescerTest.php b/client/tests/phpunit/includes/Changes/ChangeRunCoalescerTest.php index 8081361..4bc5c1c 100644 --- a/client/tests/phpunit/includes/Changes/ChangeRunCoalescerTest.php +++ b/client/tests/phpunit/includes/Changes/ChangeRunCoalescerTest.php @@ -2,6 +2,8 @@ namespace Wikibase\Client\Tests\Changes; +use Diff\DiffOp\AtomicDiffOp; +use Traversable; use Wikibase\Change; use Wikibase\Client\Changes\ChangeRunCoalescer; use Wikibase\DataModel\Entity\Item; @@ -10,7 +12,6 @@ use Wikibase\DataModel\SiteLink; use Wikibase\EntityChange; use Wikibase\ItemChange; -use Wikibase\Lib\Changes\EntityDiffChangedAspectsFactory; use Wikibase\Lib\Store\EntityRevisionLookup; use Wikibase\Lib\Tests\MockRepository; use Wikibase\Lib\Tests\Changes\TestChanges; @@ -132,8 +133,7 @@ } $change->setEntityId( new ItemId( $values['object_id'] ) ); - $diffAspects = ( new EntityDiffChangedAspectsFactory() )->newFromEntityDiff( $diff ); - $change->setCompactDiff( $diffAspects ); + $change->setDiff( $diff ); return $change; } @@ -192,10 +192,29 @@ $this->assertArrayEquals( $expected->getMetadata(), $actual->getMetadata(), false, true ); } - $this->assertSame( - $expected->getCompactDiff()->toArray(), - $actual->getCompactDiff()->toArray() - ); + $this->assertDiffsEqual( $expected->getDiff(), $actual->getDiff() ); + } + + private function assertDiffsEqual( $expected, $actual, $path = '' ) { + if ( $expected instanceof AtomicDiffOp ) { + //$this->assertEquals( $expected->getType(), $actual->getType(), $path . ' DiffOp.type' ); + $this->assertEquals( serialize( $expected ), serialize( $actual ), $path . ' DiffOp' ); + return; + } + + if ( $expected instanceof Traversable ) { + $expected = iterator_to_array( $expected ); + $actual = iterator_to_array( $actual ); + } + + foreach ( $expected as $key => $expectedValue ) { + $currentPath = "$path/$key"; + $this->assertArrayHasKey( $key, $actual, $currentPath . " missing key" ); + $this->assertDiffsEqual(
[MediaWiki-commits] [Gerrit] operations/puppet[production]: puppetmaster: add proxypassmatch rules for puppet 4 url vari...
Herron has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395832 ) Change subject: puppetmaster: add proxypassmatch rules for puppet 4 url variants .. puppetmaster: add proxypassmatch rules for puppet 4 url variants Add ProxyPassMatch rules to continue pinning puppet certificate, file bucket and volatile requests to the primary puppet master (puppetmaster1001) when using puppet 4 agents. Bug: T177254 Change-Id: Icea73010598f4e51278309562d76de30be440774 --- M modules/puppetmaster/templates/web-frontend.conf.erb 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/32/395832/1 diff --git a/modules/puppetmaster/templates/web-frontend.conf.erb b/modules/puppetmaster/templates/web-frontend.conf.erb index 35fcecf..7b64457 100644 --- a/modules/puppetmaster/templates/web-frontend.conf.erb +++ b/modules/puppetmaster/templates/web-frontend.conf.erb @@ -28,11 +28,15 @@ SetEnv proxy-initial-not-pooled 1 # Certificates requests should only be in the master. ProxyPassMatch ^/([^/]+/certificate.*)$ https://<%= @master %>:8141 +ProxyPassMatch ^/(puppet-ca/.*)$ https://<%= @master %>:8141 # File buckets should only be in one place. Choosing the frontend by default for simplicity ProxyPassMatch ^/([^/]+/file_bucket_file/md5/.*)$ https://<%= @fqdn %>:8141 +ProxyPassMatch ^/(puppet/v3/file_bucket_file/md5/.*)$ https://<%= @fqdn %>:8141 # Volatile should only be in one place. Choosing the master by default for simplicity ProxyPassMatch ^/([^/]+/file_metadata(s)?/volatile/.*)$ https://<%= @master %>:8141 +ProxyPassMatch ^/(puppet/v3/file_metadata(s)?/volatile.*)$ https://<%= @master %>:8141 ProxyPassMatch ^/([^/]+/file_content/volatile/.*)$ https://<%= @master %>:8141 +ProxyPassMatch ^/(puppet/v3/file_content/volatile/.*)$ https://<%= @master %>:8141 # The rest gets balanced ProxyPass / balancer://mycluster/ -- To view, visit https://gerrit.wikimedia.org/r/395832 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icea73010598f4e51278309562d76de30be440774 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Herron___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Cargo[master]: Moved "Hide" link for minimized text to beginning of text
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395828 ) Change subject: Moved "Hide" link for minimized text to beginning of text .. Moved "Hide" link for minimized text to beginning of text Change-Id: Ic0a9e0fc73de129f6af8f8548257901051951f5a --- M libs/Cargo.js 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Yaron Koren: Looks good to me, approved jenkins-bot: Verified diff --git a/libs/Cargo.js b/libs/Cargo.js index fce9838..022f361 100644 --- a/libs/Cargo.js +++ b/libs/Cargo.js @@ -13,11 +13,11 @@ $('span.cargoMinimizedText') .hide() - .parent().append('' + showText + ''); + .parent().prepend('' + showText + ' '); $('a.cargoToggle').click( function() { if ( $(this).text() == showText ) { - $(this).siblings('.cargoMinimizedText').show(400); + $(this).siblings('.cargoMinimizedText').show(400).css('display', 'inline'); $(this).text(hideText); } else { $(this).siblings('.cargoMinimizedText').hide(400); -- To view, visit https://gerrit.wikimedia.org/r/395828 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic0a9e0fc73de129f6af8f8548257901051951f5a Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Cargo Gerrit-Branch: master Gerrit-Owner: Yaron KorenGerrit-Reviewer: Yaron Koren Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labs...ZppixBot[master]: Documentation on how to make a module
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395827 ) Change subject: Documentation on how to make a module .. Documentation on how to make a module Change-Id: I9cbf79ba1c417ad88b4b61bcafdfab49a06c76e7 --- M public_html/documentation.html 1 file changed, 98 insertions(+), 2 deletions(-) Approvals: Zppix: Looks good to me, approved jenkins-bot: Verified diff --git a/public_html/documentation.html b/public_html/documentation.html index 4a8038b..bf083fb 100644 --- a/public_html/documentation.html +++ b/public_html/documentation.html @@ -1,5 +1,10 @@ -List of Commands -ZppixBot -Commands +Documentation -ZppixBot +Table of contents + +List of commands +Module Development + +List of commands @@ -349,4 +354,95 @@ +Module development +If you decided to extend ZppixBot with some functionality, you will need to create a new module. +This instruction will guide you through the process of custom module development +First of all, create a new file in modules directory with name your_module.py +Bot modules are python scripts, so we shall start with importing required libraries (bot is using sopel) for your module to work. Here is the list of imports typically used: + +from __future__ import unicode_literals, absolute_import, print_function, division +import sopel +import sopel.module +import requests +import sopel.tools +from sopel.module import rule, priority, thread, commands, example + + +Let's define a function, which replies to ".hi" command with a greeting: + +@commands('hi') +def bot_hi(bot, trigger): +bot.say('Hi ' + trigger.nick + '!') + +Explanation: using @commands we specify which command bot should react to (in our case ".hi") +Handler function has two parameters: + +bot - bot instance, we use it to interact with chat (i.e. to send messages) +trigger - provides us info about incoming command (text, sender, etc) + +So in our example, we use bot.say to send message to the chat saying "hi, your_name!" +This is minimum required code for your module to function. You may try running it now. + + +Unluckily, our bot will react only to ".hi" messages, but you may want it to react to ".hello" and ".hey" as well +In order to achieve that, we may set multiple command variations bot will respond to by specifying all of them in the decorator: + +@commands('hi', 'hello', 'hey') +def bot_hi(bot, trigger): +bot.say('Hi ' + trigger.nick + '!') + +You may try running that code and see that bot will react to all commands mentioned by saying "hi" to message sender. + + +Finally, you may want bot to accept some input from user. To demonstrate how to achieve that, let's develop a function which will welcome chat newcomers +For example, if John joins your chat, you may ask bot to welcome him with command ".welcome John" and bot will send a message saying "Welcome, John! Enjoy yourself in this chat!" +Similarly, you may ask bot to welcome Bob my saying ".welcome Bob" and bot will say "Welcome, Bob! Enjoy yourself in this chat!" +Let's also use @example decorator to provide command usage example: + +@commands('welcome') +@example('.welcome John') +def bot_welcome(bot, trigger): +bot.say('Welcome ' + trigger.group(2) + '! Enjoy yourself in this chat!') + +Explanation: we use trigger.group(2) to get the text after the command (in our example - name of user to welcome) + + +Additionally, you may use bot.reply, which is similar to bot.say, but puts message sender name in the beginning of the message +To demonstrate that, let's create an "echo" function - it will send back to you your message, which will be starting with you name (i.e mention you): + +@commands('echo') +@example('.echo hello world!') +def bot_welcome(bot, trigger): +bot.reply('You said: ' + trigger.group(2)) + + + +That was an example of simple module. We recommend you visiting https://github.com/sopel-irc/sopel/wiki;>Sopel Wiki for more info on this topic. + + +Complete source code of this example (file simple_module.py): + +from __future__ import unicode_literals, absolute_import, print_function, division +import sopel +import sopel.module +import requests +import sopel.tools +from sopel.module import rule, priority, thread, commands, example + +@commands('hi', 'hello', 'hey') +def bot_hi(bot, trigger): +bot.say('Hi ' + trigger.nick + '!') + + +commands('welcome') +@example('.welcome John') +def bot_welcome(bot, trigger): +bot.say('Welcome ' + trigger.group(2) + '! Enjoy yourself in this chat!') + + +@commands('echo') +@example('.echo hello world!') +def bot_welcome(bot, trigger): +bot.reply('You said: ' + trigger.group(2)) + -- To view, visit https://gerrit.wikimedia.org/r/395827 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9cbf79ba1c417ad88b4b61bcafdfab49a06c76e7 Gerrit-PatchSet: 1 Gerrit-Project:
[MediaWiki-commits] [Gerrit] mediawiki...ReadingLists[master]: Increase rl_title length to account for namespace
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395673 ) Change subject: Increase rl_title length to account for namespace .. Increase rl_title length to account for namespace Bug: T180092 Change-Id: I30c122b21eb0caf935fabff718eb6bc6f9fdf9fc --- M i18n/en.json A sql/patches/05-increase-rle_title-length.sql M sql/readinglists.sql M src/Doc/ReadingListEntryRow.php M src/HookHandler.php M src/ReadingListRepository.php 6 files changed, 19 insertions(+), 6 deletions(-) Approvals: jenkins-bot: Verified Mholloway: Looks good to me, approved diff --git a/i18n/en.json b/i18n/en.json index ce2fbaa..487064b 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -76,7 +76,7 @@ "apihelp-readinglists+createentry-extended-description": "List entries must be unique. Pages are not limited to the wiki where the API is accessed. The user must have fewer than $1 (non-deleted) {{PLURAL:$1|entry|entries}} in the list.", "apihelp-readinglists+createentry-param-list": "List ID.", "apihelp-readinglists+createentry-param-project": "Project name of the wiki hosting the page. (Typically this is the domain name of the wiki.)", - "apihelp-readinglists+createentry-param-title": "Page title.", + "apihelp-readinglists+createentry-param-title": "Page title (including the localised namespace name). Human-readable format (spaces not underscores) is recommended. The API treats titles as raw strings; normalization (such as title casing) is left to the clients.", "apihelp-readinglists+createentry-example-1": "Add the page Dog from project en.wikipedia.org to the list with ID 33.", "apihelp-readinglists+deleteentry-summary": "Delete a page from a list belonging to the current user.", "apihelp-readinglists+deleteentry-param-entry": "Entry ID.", diff --git a/sql/patches/05-increase-rle_title-length.sql b/sql/patches/05-increase-rle_title-length.sql new file mode 100644 index 000..55a6ae4 --- /dev/null +++ b/sql/patches/05-increase-rle_title-length.sql @@ -0,0 +1,2 @@ +ALTER TABLE reading_list_entry +MODIFY rle_title VARCHAR(383) BINARY NOT NULL; \ No newline at end of file diff --git a/sql/readinglists.sql b/sql/readinglists.sql index bd61d74..854b4e4 100644 --- a/sql/readinglists.sql +++ b/sql/readinglists.sql @@ -48,10 +48,15 @@ rle_user_id INTEGER UNSIGNED NOT NULL, -- Reference to reading_list_project.rlp_id. rle_rlp_id INTEGER UNSIGNED NOT NULL, --- Page title. +-- Page title (including localised namespace name). -- We can't easily use page ids due to the cross-wiki nature of the project; -- also, page ids don't age well when content is deleted/moved. -rle_title VARCHAR(255) BINARY NOT NULL, +-- We also can't easily use namespace IDs since most APIs expect the namespace name so that's +-- what we need to provide to clients; and there is no easy way to map IDs to names of a +-- different wiki. +-- Titles are <=255 byte; we allow 128 more bytes for the namespace name, just to be on the +-- safe side. +rle_title VARCHAR(383) BINARY NOT NULL, -- Creation timestamp. rle_date_created BINARY(14) NOT NULL default '1970010100', -- Last modification timestamp. diff --git a/src/Doc/ReadingListEntryRow.php b/src/Doc/ReadingListEntryRow.php index 277c5e9..c19b637 100644 --- a/src/Doc/ReadingListEntryRow.php +++ b/src/Doc/ReadingListEntryRow.php @@ -33,9 +33,12 @@ public $rlp_project; /** -* Page title. +* Page title (including the localised namespace name). * We can't easily use page ids due to the cross-wiki nature of the project; * also, page ids don't age well when content is deleted/moved. +* We also can't easily use namespace IDs since most APIs expect the namespace name so that's +* what we need to provide to clients; and there is no easy way to map IDs to names of a +* different wiki. * @var string */ public $rle_title; diff --git a/src/HookHandler.php b/src/HookHandler.php index 5ef6357..5f10e8e 100644 --- a/src/HookHandler.php +++ b/src/HookHandler.php @@ -51,6 +51,8 @@ "$patchDir/03-add-sort-indexes.sql" ); $updater->dropExtensionField( 'reading_list', 'rl_color', "$patchDir/04-drop-metadata-columns.sql" ); + $updater->modifyExtensionField( 'reading_list_entry', 'rle_title', + "$patchDir/05-increase-rle_title-length.sql" ); } return true; } diff --git a/src/ReadingListRepository.php b/src/ReadingListRepository.php index f541074..edcac9d 100644 --- a/src/ReadingListRepository.php +++ b/src/ReadingListRepository.php @@ -47,7 +47,7 @@ 'rl_name' => 255,
[MediaWiki-commits] [Gerrit] mediawiki...ReadingLists[master]: Use lazy connection references
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395686 ) Change subject: Use lazy connection references .. Use lazy connection references Since we always create both read and write DB handles, but most endpoints only use one of them, we make unnecessary connections and cause some logspam. Using lazy references should fix that. Change-Id: Ifd4ff81b9b04132512866300157316f8b95d2665 --- M src/Utils.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: jenkins-bot: Verified Mholloway: Looks good to me, approved diff --git a/src/Utils.php b/src/Utils.php index 46d3fff..10136b9 100644 --- a/src/Utils.php +++ b/src/Utils.php @@ -26,7 +26,7 @@ $loadBalancer = $cluster ? $loadBalancerFactory->getExternalLB( $cluster ) : $loadBalancerFactory->getMainLB( $database ); - return $loadBalancer->getConnectionRef( $db, [], $database ); + return $loadBalancer->getLazyConnectionRef( $db, [], $database ); } /** -- To view, visit https://gerrit.wikimedia.org/r/395686 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifd4ff81b9b04132512866300157316f8b95d2665 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ReadingLists Gerrit-Branch: master Gerrit-Owner: Gergő TiszaGerrit-Reviewer: Mholloway 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...ReadingLists[master]: Discard unused metadata from schema
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395666 ) Change subject: Discard unused metadata from schema .. Discard unused metadata from schema Drop columns for color, image, icon. Bug: T180092 Change-Id: Icc712cb8abc025b992ed25afbf4f67d4e67386f9 --- M i18n/en.json M i18n/qqq.json A sql/patches/04-drop-metadata-columns.sql M sql/readinglists.sql M src/Api/ApiQueryReadingLists.php M src/Api/ApiReadingListsCreate.php M src/Api/ApiReadingListsUpdate.php M src/Doc/ReadingListRow.php M src/HookHandler.php M src/ReadingListRepository.php M tests/src/ReadingListRepositoryTest.php 11 files changed, 13 insertions(+), 129 deletions(-) Approvals: jenkins-bot: Verified Mholloway: Looks good to me, approved diff --git a/i18n/en.json b/i18n/en.json index f3acfe8..ce2fbaa 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -62,18 +62,11 @@ "apihelp-readinglists+create-extended-description": "The user must have fewer than $1 (non-deleted) {{PLURAL:$1|list|lists}}.", "apihelp-readinglists+create-param-name": "List name.", "apihelp-readinglists+create-param-description": "List description.", - "apihelp-readinglists+create-param-color": "List color. (The meaning and range of values is left to the clients.)", - "apihelp-readinglists+create-param-image": "List image. (The meaning and format of values is left to the clients.)", - "apihelp-readinglists+create-param-icon": "List icon. (The meaning and format of values is left to the clients.)", "apihelp-readinglists+create-example-1": "Create a new reading list.", - "apihelp-readinglists+create-example-2": "Create a new reading list with custom appearance.", "apihelp-readinglists+update-summary": "Update a list belonging to the current user.", "apihelp-readinglists+update-param-list": "List ID.", "apihelp-readinglists+update-param-name": "New list name.", "apihelp-readinglists+update-param-description": "New list description.", - "apihelp-readinglists+update-param-color": "New list color.", - "apihelp-readinglists+update-param-image": "New list image.", - "apihelp-readinglists+update-param-icon": "New list icon.", "apihelp-readinglists+update-example-1": "Change the name of the reading list with ID 42.", "apihelp-readinglists+delete-summary": "Delete a list belonging to the current user.", "apihelp-readinglists+delete-extended-description": "Deleted lists remain available for some amount of time through the [[Special:ApiHelp/query+readinglists|readinglists]] and [[Special:ApiHelp/query+readinglistentries|readinglistentries]] modules (via the $1changedsince parameter). There is no way to undelete.", diff --git a/i18n/qqq.json b/i18n/qqq.json index b79480e..878682b 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -63,18 +63,11 @@ "apihelp-readinglists+create-extended-description": "{{doc-apihelp-extended-description|readinglists+create|params=* $1 - Maximum number of lists per user.|paramstart=2}}", "apihelp-readinglists+create-param-name": "{{doc-apihelp-param|readinglists+create|name}}", "apihelp-readinglists+create-param-description": "{{doc-apihelp-param|readinglists+create|description}}", - "apihelp-readinglists+create-param-color": "{{doc-apihelp-param|readinglists+create|color}}", - "apihelp-readinglists+create-param-image": "{{doc-apihelp-param|readinglists+create|image}}", - "apihelp-readinglists+create-param-icon": "{{doc-apihelp-param|readinglists+create|icon}}", "apihelp-readinglists+create-example-1": "{{doc-apihelp-example|readinglists+create}}", - "apihelp-readinglists+create-example-2": "{{doc-apihelp-example|readinglists+create}}", "apihelp-readinglists+update-summary": "{{doc-apihelp-summary|readinglists+update}}", "apihelp-readinglists+update-param-list": "{{doc-apihelp-param|readinglists+update|list}}", "apihelp-readinglists+update-param-name": "{{doc-apihelp-param|readinglists+update|name}}", "apihelp-readinglists+update-param-description": "{{doc-apihelp-param|readinglists+update|description}}", - "apihelp-readinglists+update-param-color": "{{doc-apihelp-param|readinglists+update|color}}", - "apihelp-readinglists+update-param-image": "{{doc-apihelp-param|readinglists+update|image}}", - "apihelp-readinglists+update-param-icon": "{{doc-apihelp-param|readinglists+update|icon}}", "apihelp-readinglists+update-example-1": "{{doc-apihelp-example|readinglists+update}}", "apihelp-readinglists+delete-summary": "{{doc-apihelp-summary|readinglists+delete}}", "apihelp-readinglists+delete-extended-description": "{{doc-apihelp-extended-description|readinglists+delete}}", diff --git a/sql/patches/04-drop-metadata-columns.sql
[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Strip legacy section IDs from inside headings
C. Scott Ananian has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395831 ) Change subject: Strip legacy section IDs from inside headings .. Strip legacy section IDs from inside headings We emit inside headings when necessary to provide backward compatibility with pre-HTML5 section ids. These are mostly harmless inside VE --- they become hidden alienated nodes, which are then safely ignored by Parsoid during html2wt even if they manage to migrate outside of a heading --- but it's a little safer to strip them. Change-Id: I07d0fcf54427ab02d4930cff183d3e5579a99306 --- M modules/ve-mw/ce/nodes/ve.ce.MWTransclusionNode.js M modules/ve-mw/init/ve.init.mw.Target.js M modules/ve-mw/ve.MWutils.js 3 files changed, 18 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/31/395831/1 diff --git a/modules/ve-mw/ce/nodes/ve.ce.MWTransclusionNode.js b/modules/ve-mw/ce/nodes/ve.ce.MWTransclusionNode.js index cd5028b..2d0567b 100644 --- a/modules/ve-mw/ce/nodes/ve.ce.MWTransclusionNode.js +++ b/modules/ve-mw/ce/nodes/ve.ce.MWTransclusionNode.js @@ -101,6 +101,7 @@ // Unwrap Parsoid sections (which probably shouldn't exist: T181226) contentNodes.forEach( function ( node ) { wrapper.appendChild( node ); } ); ve.unwrapParsoidSections( wrapper ); + ve.stripLegacyHeadingIds( wrapper ); contentNodes = Array.prototype.slice.call( wrapper.childNodes ); function isAutoGenerated( node ) { diff --git a/modules/ve-mw/init/ve.init.mw.Target.js b/modules/ve-mw/init/ve.init.mw.Target.js index 682e786..f08ca5e 100644 --- a/modules/ve-mw/init/ve.init.mw.Target.js +++ b/modules/ve-mw/init/ve.init.mw.Target.js @@ -198,6 +198,8 @@ doc = ve.parseXhtml( documentString ); // Strip Parsoid sections ve.unwrapParsoidSections( doc.body ); + // Strip legacy section IDs + ve.stripLegacyHeadingIds( doc.body ); } // Fix relative or missing base URL if needed this.fixBase( doc ); diff --git a/modules/ve-mw/ve.MWutils.js b/modules/ve-mw/ve.MWutils.js index 40d239e..732b08f 100644 --- a/modules/ve-mw/ve.MWutils.js +++ b/modules/ve-mw/ve.MWutils.js @@ -44,3 +44,18 @@ parent.removeChild( section ); } ); }; + +/** + * Strip legacy (non-HTML5) section IDs from inside headings. + * + * @param {HTMLElement} element Parent element, e.g. document body + */ +ve.stripLegacyHeadingIds = function ( element ) { + return; + Array.prototype.forEach.call( element.querySelectorAll( 'span[typeof="mw:FallbackId"][id]:first-child:empty' ), function ( legacySpan ) { + var parent = legacySpan.parentNode; + if ( /^H[1-6]$/.test(parent.tagName || '') ) { + parent.removeChild( legacySpan ); + } + } ); +}; -- To view, visit https://gerrit.wikimedia.org/r/395831 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I07d0fcf54427ab02d4930cff183d3e5579a99306 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: C. Scott Ananian___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "Group1 to wmf.11"
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395829 ) Change subject: Revert "Group1 to wmf.11" .. Revert "Group1 to wmf.11" This reverts commit e25b96ec5f64389258c0c73cff3d57e47ce02c47. Change-Id: I5bbe8074df81ffd602da6bb5d625f95557b27ffb --- M php M wikiversions.json 2 files changed, 488 insertions(+), 488 deletions(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/php b/php index 444a591..ac3c670 12 --- a/php +++ b/php @@ -1 +1 @@ -php-1.31.0-wmf.11 \ No newline at end of file +php-1.31.0-wmf.10 \ No newline at end of file diff --git a/wikiversions.json b/wikiversions.json index d045277..df83ab8 100644 --- a/wikiversions.json +++ b/wikiversions.json @@ -8,9 +8,9 @@ "advisorywiki": "php-1.31.0-wmf.11", "adywiki": "php-1.31.0-wmf.10", "afwiki": "php-1.31.0-wmf.10", -"afwikibooks": "php-1.31.0-wmf.11", -"afwikiquote": "php-1.31.0-wmf.11", -"afwiktionary": "php-1.31.0-wmf.11", +"afwikibooks": "php-1.31.0-wmf.10", +"afwikiquote": "php-1.31.0-wmf.10", +"afwiktionary": "php-1.31.0-wmf.10", "akwiki": "php-1.31.0-wmf.10", "akwikibooks": "php-1.31.0-wmf.11", "akwiktionary": "php-1.31.0-wmf.11", @@ -19,16 +19,16 @@ "alswikiquote": "php-1.31.0-wmf.11", "alswiktionary": "php-1.31.0-wmf.11", "amwiki": "php-1.31.0-wmf.10", -"amwikimedia": "php-1.31.0-wmf.11", +"amwikimedia": "php-1.31.0-wmf.10", "amwikiquote": "php-1.31.0-wmf.11", -"amwiktionary": "php-1.31.0-wmf.11", +"amwiktionary": "php-1.31.0-wmf.10", "angwiki": "php-1.31.0-wmf.10", "angwikibooks": "php-1.31.0-wmf.11", "angwikiquote": "php-1.31.0-wmf.11", "angwikisource": "php-1.31.0-wmf.11", -"angwiktionary": "php-1.31.0-wmf.11", +"angwiktionary": "php-1.31.0-wmf.10", "anwiki": "php-1.31.0-wmf.10", -"anwiktionary": "php-1.31.0-wmf.11", +"anwiktionary": "php-1.31.0-wmf.10", "arbcom_cswiki": "php-1.31.0-wmf.10", "arbcom_dewiki": "php-1.31.0-wmf.10", "arbcom_enwiki": "php-1.31.0-wmf.10", @@ -36,55 +36,55 @@ "arbcom_nlwiki": "php-1.31.0-wmf.10", "arcwiki": "php-1.31.0-wmf.10", "arwiki": "php-1.31.0-wmf.10", -"arwikibooks": "php-1.31.0-wmf.11", -"arwikimedia": "php-1.31.0-wmf.11", -"arwikinews": "php-1.31.0-wmf.11", -"arwikiquote": "php-1.31.0-wmf.11", -"arwikisource": "php-1.31.0-wmf.11", -"arwikiversity": "php-1.31.0-wmf.11", -"arwiktionary": "php-1.31.0-wmf.11", +"arwikibooks": "php-1.31.0-wmf.10", +"arwikimedia": "php-1.31.0-wmf.10", +"arwikinews": "php-1.31.0-wmf.10", +"arwikiquote": "php-1.31.0-wmf.10", +"arwikisource": "php-1.31.0-wmf.10", +"arwikiversity": "php-1.31.0-wmf.10", +"arwiktionary": "php-1.31.0-wmf.10", "arzwiki": "php-1.31.0-wmf.10", "astwiki": "php-1.31.0-wmf.10", "astwikibooks": "php-1.31.0-wmf.11", "astwikiquote": "php-1.31.0-wmf.11", -"astwiktionary": "php-1.31.0-wmf.11", +"astwiktionary": "php-1.31.0-wmf.10", "aswiki": "php-1.31.0-wmf.10", "aswikibooks": "php-1.31.0-wmf.11", -"aswikisource": "php-1.31.0-wmf.11", +"aswikisource": "php-1.31.0-wmf.10", "aswiktionary": "php-1.31.0-wmf.11", "atjwiki": "php-1.31.0-wmf.10", -"auditcomwiki": "php-1.31.0-wmf.11", +"auditcomwiki": "php-1.31.0-wmf.10", "avwiki": "php-1.31.0-wmf.10", "avwiktionary": "php-1.31.0-wmf.11", "aywiki": "php-1.31.0-wmf.10", "aywikibooks": "php-1.31.0-wmf.11", -"aywiktionary": "php-1.31.0-wmf.11", +"aywiktionary": "php-1.31.0-wmf.10", "azbwiki": "php-1.31.0-wmf.10", "azwiki": "php-1.31.0-wmf.10", -"azwikibooks": "php-1.31.0-wmf.11", -"azwikiquote": "php-1.31.0-wmf.11", -"azwikisource": "php-1.31.0-wmf.11", -"azwiktionary": "php-1.31.0-wmf.11", +"azwikibooks": "php-1.31.0-wmf.10", +"azwikiquote": "php-1.31.0-wmf.10", +"azwikisource": "php-1.31.0-wmf.10", +"azwiktionary": "php-1.31.0-wmf.10", "barwiki": "php-1.31.0-wmf.10", "bat_smgwiki": "php-1.31.0-wmf.10", "bawiki": "php-1.31.0-wmf.10", -"bawikibooks": "php-1.31.0-wmf.11", +"bawikibooks": "php-1.31.0-wmf.10", "bclwiki": "php-1.31.0-wmf.10", -"bdwikimedia": "php-1.31.0-wmf.11", +"bdwikimedia": "php-1.31.0-wmf.10", "be_x_oldwiki": "php-1.31.0-wmf.10", -"betawikiversity": "php-1.31.0-wmf.11", +"betawikiversity": "php-1.31.0-wmf.10", "bewiki": "php-1.31.0-wmf.10", -"bewikibooks": "php-1.31.0-wmf.11", -"bewikimedia": "php-1.31.0-wmf.11", -"bewikiquote": "php-1.31.0-wmf.11", -"bewikisource": "php-1.31.0-wmf.11", -"bewiktionary": "php-1.31.0-wmf.11", +"bewikibooks": "php-1.31.0-wmf.10", +"bewikimedia": "php-1.31.0-wmf.10", +"bewikiquote": "php-1.31.0-wmf.10", +"bewikisource": "php-1.31.0-wmf.10", +"bewiktionary": "php-1.31.0-wmf.10",
[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Prefer wiki.mainpage to defaultPageName
Arlolra has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395830 ) Change subject: Prefer wiki.mainpage to defaultPageName .. Prefer wiki.mainpage to defaultPageName Change-Id: I24610c34f7b2d0d8769fba3a3d774efcb3ca3510 --- M bin/parse.js M bin/parserTests.js M lib/api/internal.js M lib/api/routes.js M lib/config/MWParserEnvironment.js M tools/sync-baseconfig.js 6 files changed, 7 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/30/395830/1 diff --git a/bin/parse.js b/bin/parse.js index 5d97a24..e9ddc7a 100755 --- a/bin/parse.js +++ b/bin/parse.js @@ -156,7 +156,7 @@ 'pageName': { description: 'The page name, returned for {{PAGENAME}}. If no input is given (ie. empty/stdin closed), it downloads and parses the page. This should be the actual title of the article (that is, not including any URL-encoding that might be necessary in wikitext).', 'boolean': false, - 'default': ParserEnvProto.defaultPageName, + 'default': '', }, 'pageBundle': { description: 'Output pagebundle JSON', diff --git a/bin/parserTests.js b/bin/parserTests.js index cd03108..1a4bf04 100755 --- a/bin/parserTests.js +++ b/bin/parserTests.js @@ -683,7 +683,7 @@ // Since we are reusing the 'env' object, set it to the default // so that relative link prefix is back to "./" - this.env.initializeForPageName(this.env.defaultPageName); + this.env.initializeForPageName(this.env.conf.wiki.mainpage); if (item.options.subpage !== undefined) { this.env.conf.wiki.namespacesWithSubpages[0] = true; @@ -693,7 +693,7 @@ !Array.isArray(item.options.title)) { // This sets the page name as well as the relative link prefix // for the rest of the parse. Do this redundantly with the above - // so that we start from the defaultPageName when resolving + // so that we start from the wiki.mainpage when resolving // absolute subpages. this.env.initializeForPageName(item.options.title); } diff --git a/lib/api/internal.js b/lib/api/internal.js index 0823b83..cef8744 100644 --- a/lib/api/internal.js +++ b/lib/api/internal.js @@ -65,7 +65,7 @@ return apiUtils.errorResponse(res, text, 404); } res.locals.iwp = iwp; - res.locals.pageName = req.params.title || 'Main_Page'; + res.locals.pageName = req.params.title || ''; res.locals.oldid = req.body.oldid || req.query.oldid || null; // "body" flag to return just the body (instead of the entire HTML doc) res.locals.bodyOnly = !!(req.query.body || req.body.body); diff --git a/lib/api/routes.js b/lib/api/routes.js index f7969db..4253180 100644 --- a/lib/api/routes.js +++ b/lib/api/routes.js @@ -54,7 +54,7 @@ routes.v3Middle = function(req, res, next) { res.locals.titleMissing = !req.params.title; - res.locals.pageName = req.params.title || 'Main_Page'; + res.locals.pageName = req.params.title || ''; res.locals.oldid = req.params.revision || null; // "body_only" flag to return just the body (instead of the entire HTML doc) diff --git a/lib/config/MWParserEnvironment.js b/lib/config/MWParserEnvironment.js index d448823..3fac953 100644 --- a/lib/config/MWParserEnvironment.js +++ b/lib/config/MWParserEnvironment.js @@ -31,7 +31,6 @@ */ var MWParserEnvironment = function(parsoidConfig, options) { options = options || {}; - var self = this; // page information this.page = (function() { @@ -42,7 +41,7 @@ /** * @property {String} name */ - Page.prototype.name = self.defaultPageName; + Page.prototype.name = ''; /** * Any leading ..?/ strings that will be necessary for building links. @@ -149,7 +148,7 @@ this.lintLogger = new LintLogger(this); this.configureLogging(); - this.initializeForPageName(options.pageName || this.defaultPageName); + this.initializeForPageName(options.pageName || this.conf.wiki.mainpage); this.pipelineFactory = new ParserPipelineFactory(this); @@ -297,9 +296,6 @@ // Configure backends logger.registerLoggingBackends(defaultLogLevels, this.conf.parsoid, this.lintLogger); }; - -// The default page name (true name, without wikitext url encoding) -MWParserEnvironment.prototype.defaultPageName = "Main Page"; // Cache for wiki configurations,
[MediaWiki-commits] [Gerrit] operations/puppet[production]: phabricator: Add gerrit.googlesource.com and gitlab.com to P...
Dzahn has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/394640 ) Change subject: phabricator: Add gerrit.googlesource.com and gitlab.com to Phab proxy whitelist .. phabricator: Add gerrit.googlesource.com and gitlab.com to Phab proxy whitelist Bug: T181835 Change-Id: I048b4c2e2ad4be402d14d8e7fc0985e5e165928d --- M modules/phabricator/templates/vcs/system.gitconfig.erb 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/modules/phabricator/templates/vcs/system.gitconfig.erb b/modules/phabricator/templates/vcs/system.gitconfig.erb index d678e4b..2ee079c 100644 --- a/modules/phabricator/templates/vcs/system.gitconfig.erb +++ b/modules/phabricator/templates/vcs/system.gitconfig.erb @@ -1,5 +1,9 @@ +[http "https://gerrit.googlesource.com;] +proxy = <%= @proxy %> [http "https://github.com;] proxy = <%= @proxy %> +[http "https://gitlab.com;] +proxy = <%= @proxy %> [http "https://gerrit.wikimedia.org;] proxy = [http "https://phabricator.wikimedia.org;] -- To view, visit https://gerrit.wikimedia.org/r/394640 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I048b4c2e2ad4be402d14d8e7fc0985e5e165928d Gerrit-PatchSet: 4 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: ChadGerrit-Reviewer: 20after4 Gerrit-Reviewer: Dzahn Gerrit-Reviewer: Halfak 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...Cargo[master]: Moved "Hide" link for minimized text to beginning of text
Yaron Koren has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395828 ) Change subject: Moved "Hide" link for minimized text to beginning of text .. Moved "Hide" link for minimized text to beginning of text Change-Id: Ic0a9e0fc73de129f6af8f8548257901051951f5a --- M libs/Cargo.js 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo refs/changes/28/395828/2 diff --git a/libs/Cargo.js b/libs/Cargo.js index fce9838..022f361 100644 --- a/libs/Cargo.js +++ b/libs/Cargo.js @@ -13,11 +13,11 @@ $('span.cargoMinimizedText') .hide() - .parent().append('' + showText + ''); + .parent().prepend('' + showText + ' '); $('a.cargoToggle').click( function() { if ( $(this).text() == showText ) { - $(this).siblings('.cargoMinimizedText').show(400); + $(this).siblings('.cargoMinimizedText').show(400).css('display', 'inline'); $(this).text(hideText); } else { $(this).siblings('.cargoMinimizedText').hide(400); -- To view, visit https://gerrit.wikimedia.org/r/395828 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic0a9e0fc73de129f6af8f8548257901051951f5a Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Cargo Gerrit-Branch: master Gerrit-Owner: Yaron KorenGerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "Group1 to wmf.11"
Chad has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395829 ) Change subject: Revert "Group1 to wmf.11" .. Revert "Group1 to wmf.11" This reverts commit e25b96ec5f64389258c0c73cff3d57e47ce02c47. Change-Id: I5bbe8074df81ffd602da6bb5d625f95557b27ffb --- M php M wikiversions.json 2 files changed, 488 insertions(+), 488 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/29/395829/1 diff --git a/php b/php index 444a591..ac3c670 12 --- a/php +++ b/php @@ -1 +1 @@ -php-1.31.0-wmf.11 \ No newline at end of file +php-1.31.0-wmf.10 \ No newline at end of file diff --git a/wikiversions.json b/wikiversions.json index d045277..df83ab8 100644 --- a/wikiversions.json +++ b/wikiversions.json @@ -8,9 +8,9 @@ "advisorywiki": "php-1.31.0-wmf.11", "adywiki": "php-1.31.0-wmf.10", "afwiki": "php-1.31.0-wmf.10", -"afwikibooks": "php-1.31.0-wmf.11", -"afwikiquote": "php-1.31.0-wmf.11", -"afwiktionary": "php-1.31.0-wmf.11", +"afwikibooks": "php-1.31.0-wmf.10", +"afwikiquote": "php-1.31.0-wmf.10", +"afwiktionary": "php-1.31.0-wmf.10", "akwiki": "php-1.31.0-wmf.10", "akwikibooks": "php-1.31.0-wmf.11", "akwiktionary": "php-1.31.0-wmf.11", @@ -19,16 +19,16 @@ "alswikiquote": "php-1.31.0-wmf.11", "alswiktionary": "php-1.31.0-wmf.11", "amwiki": "php-1.31.0-wmf.10", -"amwikimedia": "php-1.31.0-wmf.11", +"amwikimedia": "php-1.31.0-wmf.10", "amwikiquote": "php-1.31.0-wmf.11", -"amwiktionary": "php-1.31.0-wmf.11", +"amwiktionary": "php-1.31.0-wmf.10", "angwiki": "php-1.31.0-wmf.10", "angwikibooks": "php-1.31.0-wmf.11", "angwikiquote": "php-1.31.0-wmf.11", "angwikisource": "php-1.31.0-wmf.11", -"angwiktionary": "php-1.31.0-wmf.11", +"angwiktionary": "php-1.31.0-wmf.10", "anwiki": "php-1.31.0-wmf.10", -"anwiktionary": "php-1.31.0-wmf.11", +"anwiktionary": "php-1.31.0-wmf.10", "arbcom_cswiki": "php-1.31.0-wmf.10", "arbcom_dewiki": "php-1.31.0-wmf.10", "arbcom_enwiki": "php-1.31.0-wmf.10", @@ -36,55 +36,55 @@ "arbcom_nlwiki": "php-1.31.0-wmf.10", "arcwiki": "php-1.31.0-wmf.10", "arwiki": "php-1.31.0-wmf.10", -"arwikibooks": "php-1.31.0-wmf.11", -"arwikimedia": "php-1.31.0-wmf.11", -"arwikinews": "php-1.31.0-wmf.11", -"arwikiquote": "php-1.31.0-wmf.11", -"arwikisource": "php-1.31.0-wmf.11", -"arwikiversity": "php-1.31.0-wmf.11", -"arwiktionary": "php-1.31.0-wmf.11", +"arwikibooks": "php-1.31.0-wmf.10", +"arwikimedia": "php-1.31.0-wmf.10", +"arwikinews": "php-1.31.0-wmf.10", +"arwikiquote": "php-1.31.0-wmf.10", +"arwikisource": "php-1.31.0-wmf.10", +"arwikiversity": "php-1.31.0-wmf.10", +"arwiktionary": "php-1.31.0-wmf.10", "arzwiki": "php-1.31.0-wmf.10", "astwiki": "php-1.31.0-wmf.10", "astwikibooks": "php-1.31.0-wmf.11", "astwikiquote": "php-1.31.0-wmf.11", -"astwiktionary": "php-1.31.0-wmf.11", +"astwiktionary": "php-1.31.0-wmf.10", "aswiki": "php-1.31.0-wmf.10", "aswikibooks": "php-1.31.0-wmf.11", -"aswikisource": "php-1.31.0-wmf.11", +"aswikisource": "php-1.31.0-wmf.10", "aswiktionary": "php-1.31.0-wmf.11", "atjwiki": "php-1.31.0-wmf.10", -"auditcomwiki": "php-1.31.0-wmf.11", +"auditcomwiki": "php-1.31.0-wmf.10", "avwiki": "php-1.31.0-wmf.10", "avwiktionary": "php-1.31.0-wmf.11", "aywiki": "php-1.31.0-wmf.10", "aywikibooks": "php-1.31.0-wmf.11", -"aywiktionary": "php-1.31.0-wmf.11", +"aywiktionary": "php-1.31.0-wmf.10", "azbwiki": "php-1.31.0-wmf.10", "azwiki": "php-1.31.0-wmf.10", -"azwikibooks": "php-1.31.0-wmf.11", -"azwikiquote": "php-1.31.0-wmf.11", -"azwikisource": "php-1.31.0-wmf.11", -"azwiktionary": "php-1.31.0-wmf.11", +"azwikibooks": "php-1.31.0-wmf.10", +"azwikiquote": "php-1.31.0-wmf.10", +"azwikisource": "php-1.31.0-wmf.10", +"azwiktionary": "php-1.31.0-wmf.10", "barwiki": "php-1.31.0-wmf.10", "bat_smgwiki": "php-1.31.0-wmf.10", "bawiki": "php-1.31.0-wmf.10", -"bawikibooks": "php-1.31.0-wmf.11", +"bawikibooks": "php-1.31.0-wmf.10", "bclwiki": "php-1.31.0-wmf.10", -"bdwikimedia": "php-1.31.0-wmf.11", +"bdwikimedia": "php-1.31.0-wmf.10", "be_x_oldwiki": "php-1.31.0-wmf.10", -"betawikiversity": "php-1.31.0-wmf.11", +"betawikiversity": "php-1.31.0-wmf.10", "bewiki": "php-1.31.0-wmf.10", -"bewikibooks": "php-1.31.0-wmf.11", -"bewikimedia": "php-1.31.0-wmf.11", -"bewikiquote": "php-1.31.0-wmf.11", -"bewikisource": "php-1.31.0-wmf.11", -"bewiktionary": "php-1.31.0-wmf.11", +"bewikibooks": "php-1.31.0-wmf.10", +"bewikimedia": "php-1.31.0-wmf.10", +"bewikiquote": "php-1.31.0-wmf.10", +"bewikisource": "php-1.31.0-wmf.10", +"bewiktionary":
[MediaWiki-commits] [Gerrit] labs...ZppixBot[master]: Documentation on how to make a module
Phantom42 has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395827 ) Change subject: Documentation on how to make a module .. Documentation on how to make a module Change-Id: I9cbf79ba1c417ad88b4b61bcafdfab49a06c76e7 --- M public_html/documentation.html 1 file changed, 98 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/tools/ZppixBot refs/changes/27/395827/1 diff --git a/public_html/documentation.html b/public_html/documentation.html index 4a8038b..bf083fb 100644 --- a/public_html/documentation.html +++ b/public_html/documentation.html @@ -1,5 +1,10 @@ -List of Commands -ZppixBot -Commands +Documentation -ZppixBot +Table of contents + +List of commands +Module Development + +List of commands @@ -349,4 +354,95 @@ +Module development +If you decided to extend ZppixBot with some functionality, you will need to create a new module. +This instruction will guide you through the process of custom module development +First of all, create a new file in modules directory with name your_module.py +Bot modules are python scripts, so we shall start with importing required libraries (bot is using sopel) for your module to work. Here is the list of imports typically used: + +from __future__ import unicode_literals, absolute_import, print_function, division +import sopel +import sopel.module +import requests +import sopel.tools +from sopel.module import rule, priority, thread, commands, example + + +Let's define a function, which replies to ".hi" command with a greeting: + +@commands('hi') +def bot_hi(bot, trigger): +bot.say('Hi ' + trigger.nick + '!') + +Explanation: using @commands we specify which command bot should react to (in our case ".hi") +Handler function has two parameters: + +bot - bot instance, we use it to interact with chat (i.e. to send messages) +trigger - provides us info about incoming command (text, sender, etc) + +So in our example, we use bot.say to send message to the chat saying "hi, your_name!" +This is minimum required code for your module to function. You may try running it now. + + +Unluckily, our bot will react only to ".hi" messages, but you may want it to react to ".hello" and ".hey" as well +In order to achieve that, we may set multiple command variations bot will respond to by specifying all of them in the decorator: + +@commands('hi', 'hello', 'hey') +def bot_hi(bot, trigger): +bot.say('Hi ' + trigger.nick + '!') + +You may try running that code and see that bot will react to all commands mentioned by saying "hi" to message sender. + + +Finally, you may want bot to accept some input from user. To demonstrate how to achieve that, let's develop a function which will welcome chat newcomers +For example, if John joins your chat, you may ask bot to welcome him with command ".welcome John" and bot will send a message saying "Welcome, John! Enjoy yourself in this chat!" +Similarly, you may ask bot to welcome Bob my saying ".welcome Bob" and bot will say "Welcome, Bob! Enjoy yourself in this chat!" +Let's also use @example decorator to provide command usage example: + +@commands('welcome') +@example('.welcome John') +def bot_welcome(bot, trigger): +bot.say('Welcome ' + trigger.group(2) + '! Enjoy yourself in this chat!') + +Explanation: we use trigger.group(2) to get the text after the command (in our example - name of user to welcome) + + +Additionally, you may use bot.reply, which is similar to bot.say, but puts message sender name in the beginning of the message +To demonstrate that, let's create an "echo" function - it will send back to you your message, which will be starting with you name (i.e mention you): + +@commands('echo') +@example('.echo hello world!') +def bot_welcome(bot, trigger): +bot.reply('You said: ' + trigger.group(2)) + + + +That was an example of simple module. We recommend you visiting https://github.com/sopel-irc/sopel/wiki;>Sopel Wiki for more info on this topic. + + +Complete source code of this example (file simple_module.py): + +from __future__ import unicode_literals, absolute_import, print_function, division +import sopel +import sopel.module +import requests +import sopel.tools +from sopel.module import rule, priority, thread, commands, example + +@commands('hi', 'hello', 'hey') +def bot_hi(bot, trigger): +bot.say('Hi ' + trigger.nick + '!') + + +commands('welcome') +@example('.welcome John') +def bot_welcome(bot, trigger): +bot.say('Welcome ' + trigger.group(2) + '! Enjoy yourself in this chat!') + + +@commands('echo') +@example('.echo hello world!') +def bot_welcome(bot, trigger): +bot.reply('You said: ' + trigger.group(2)) + -- To view, visit https://gerrit.wikimedia.org/r/395827 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9cbf79ba1c417ad88b4b61bcafdfab49a06c76e7 Gerrit-PatchSet: 1
[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Simple hack to override mlr model from query string
EBernhardson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395826 ) Change subject: Simple hack to override mlr model from query string .. Simple hack to override mlr model from query string This is a rather naive attempt to allow us to do a sanity check on an MLR model before we roll it out. With the new cirrusMLRModel query parameter we can upload a model to elasticsearch and try a couple queries by specifying the model name before we ship a config cange to enable the model for everyone. Change-Id: Id258c4ad295eab8cac543f14e9135a1bdb87533a --- M includes/Search/RescoreBuilders.php 1 file changed, 11 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/26/395826/1 diff --git a/includes/Search/RescoreBuilders.php b/includes/Search/RescoreBuilders.php index 76a4fac..3119a01 100644 --- a/includes/Search/RescoreBuilders.php +++ b/includes/Search/RescoreBuilders.php @@ -127,6 +127,17 @@ * @return AbstractQuery */ private function buildLtrQuery( $model ) { + // This is a bit fragile, and makes the bold assumption + // only a single level of rescore will be used. This is + // strictly for debugging/testing before shipping a model + // live so shouldn't be a big deal. + $override = \RequestContext::getMain() + ->getRequest() + ->getVal( 'cirrusMLRModel' ); + if ( $override ) { + $model = $override; + } + $bool = new \Elastica\Query\BoolQuery(); // the ltr query can return negative scores, which mucks with elasticsearch // sorting as that will put these results below documents set to 0. Fix -- To view, visit https://gerrit.wikimedia.org/r/395826 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id258c4ad295eab8cac543f14e9135a1bdb87533a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: EBernhardson___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Cargo[master]: Made "table" format top-aligned
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395825 ) Change subject: Made "table" format top-aligned .. Made "table" format top-aligned Change-Id: I43e668c4ba55e38bdd96ca533f28877b44ecb6f1 --- M Cargo.css 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Yaron Koren: Looks good to me, approved jenkins-bot: Verified diff --git a/Cargo.css b/Cargo.css index 009eb41..6bd5b6b 100644 --- a/Cargo.css +++ b/Cargo.css @@ -15,6 +15,7 @@ } table.cargoTable td { + vertical-align: top; padding: 5px; border: #ccc 1px solid; } -- To view, visit https://gerrit.wikimedia.org/r/395825 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I43e668c4ba55e38bdd96ca533f28877b44ecb6f1 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Cargo Gerrit-Branch: master Gerrit-Owner: Yaron KorenGerrit-Reviewer: Yaron Koren Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Group1 to wmf.11
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395823 ) Change subject: Group1 to wmf.11 .. Group1 to wmf.11 Change-Id: Ief1f839716ce68dc88cf5234ce1f5715f33fef3a --- M php M wikiversions.json 2 files changed, 488 insertions(+), 488 deletions(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/php b/php index ac3c670..444a591 12 --- a/php +++ b/php @@ -1 +1 @@ -php-1.31.0-wmf.10 \ No newline at end of file +php-1.31.0-wmf.11 \ No newline at end of file diff --git a/wikiversions.json b/wikiversions.json index df83ab8..d045277 100644 --- a/wikiversions.json +++ b/wikiversions.json @@ -8,9 +8,9 @@ "advisorywiki": "php-1.31.0-wmf.11", "adywiki": "php-1.31.0-wmf.10", "afwiki": "php-1.31.0-wmf.10", -"afwikibooks": "php-1.31.0-wmf.10", -"afwikiquote": "php-1.31.0-wmf.10", -"afwiktionary": "php-1.31.0-wmf.10", +"afwikibooks": "php-1.31.0-wmf.11", +"afwikiquote": "php-1.31.0-wmf.11", +"afwiktionary": "php-1.31.0-wmf.11", "akwiki": "php-1.31.0-wmf.10", "akwikibooks": "php-1.31.0-wmf.11", "akwiktionary": "php-1.31.0-wmf.11", @@ -19,16 +19,16 @@ "alswikiquote": "php-1.31.0-wmf.11", "alswiktionary": "php-1.31.0-wmf.11", "amwiki": "php-1.31.0-wmf.10", -"amwikimedia": "php-1.31.0-wmf.10", +"amwikimedia": "php-1.31.0-wmf.11", "amwikiquote": "php-1.31.0-wmf.11", -"amwiktionary": "php-1.31.0-wmf.10", +"amwiktionary": "php-1.31.0-wmf.11", "angwiki": "php-1.31.0-wmf.10", "angwikibooks": "php-1.31.0-wmf.11", "angwikiquote": "php-1.31.0-wmf.11", "angwikisource": "php-1.31.0-wmf.11", -"angwiktionary": "php-1.31.0-wmf.10", +"angwiktionary": "php-1.31.0-wmf.11", "anwiki": "php-1.31.0-wmf.10", -"anwiktionary": "php-1.31.0-wmf.10", +"anwiktionary": "php-1.31.0-wmf.11", "arbcom_cswiki": "php-1.31.0-wmf.10", "arbcom_dewiki": "php-1.31.0-wmf.10", "arbcom_enwiki": "php-1.31.0-wmf.10", @@ -36,55 +36,55 @@ "arbcom_nlwiki": "php-1.31.0-wmf.10", "arcwiki": "php-1.31.0-wmf.10", "arwiki": "php-1.31.0-wmf.10", -"arwikibooks": "php-1.31.0-wmf.10", -"arwikimedia": "php-1.31.0-wmf.10", -"arwikinews": "php-1.31.0-wmf.10", -"arwikiquote": "php-1.31.0-wmf.10", -"arwikisource": "php-1.31.0-wmf.10", -"arwikiversity": "php-1.31.0-wmf.10", -"arwiktionary": "php-1.31.0-wmf.10", +"arwikibooks": "php-1.31.0-wmf.11", +"arwikimedia": "php-1.31.0-wmf.11", +"arwikinews": "php-1.31.0-wmf.11", +"arwikiquote": "php-1.31.0-wmf.11", +"arwikisource": "php-1.31.0-wmf.11", +"arwikiversity": "php-1.31.0-wmf.11", +"arwiktionary": "php-1.31.0-wmf.11", "arzwiki": "php-1.31.0-wmf.10", "astwiki": "php-1.31.0-wmf.10", "astwikibooks": "php-1.31.0-wmf.11", "astwikiquote": "php-1.31.0-wmf.11", -"astwiktionary": "php-1.31.0-wmf.10", +"astwiktionary": "php-1.31.0-wmf.11", "aswiki": "php-1.31.0-wmf.10", "aswikibooks": "php-1.31.0-wmf.11", -"aswikisource": "php-1.31.0-wmf.10", +"aswikisource": "php-1.31.0-wmf.11", "aswiktionary": "php-1.31.0-wmf.11", "atjwiki": "php-1.31.0-wmf.10", -"auditcomwiki": "php-1.31.0-wmf.10", +"auditcomwiki": "php-1.31.0-wmf.11", "avwiki": "php-1.31.0-wmf.10", "avwiktionary": "php-1.31.0-wmf.11", "aywiki": "php-1.31.0-wmf.10", "aywikibooks": "php-1.31.0-wmf.11", -"aywiktionary": "php-1.31.0-wmf.10", +"aywiktionary": "php-1.31.0-wmf.11", "azbwiki": "php-1.31.0-wmf.10", "azwiki": "php-1.31.0-wmf.10", -"azwikibooks": "php-1.31.0-wmf.10", -"azwikiquote": "php-1.31.0-wmf.10", -"azwikisource": "php-1.31.0-wmf.10", -"azwiktionary": "php-1.31.0-wmf.10", +"azwikibooks": "php-1.31.0-wmf.11", +"azwikiquote": "php-1.31.0-wmf.11", +"azwikisource": "php-1.31.0-wmf.11", +"azwiktionary": "php-1.31.0-wmf.11", "barwiki": "php-1.31.0-wmf.10", "bat_smgwiki": "php-1.31.0-wmf.10", "bawiki": "php-1.31.0-wmf.10", -"bawikibooks": "php-1.31.0-wmf.10", +"bawikibooks": "php-1.31.0-wmf.11", "bclwiki": "php-1.31.0-wmf.10", -"bdwikimedia": "php-1.31.0-wmf.10", +"bdwikimedia": "php-1.31.0-wmf.11", "be_x_oldwiki": "php-1.31.0-wmf.10", -"betawikiversity": "php-1.31.0-wmf.10", +"betawikiversity": "php-1.31.0-wmf.11", "bewiki": "php-1.31.0-wmf.10", -"bewikibooks": "php-1.31.0-wmf.10", -"bewikimedia": "php-1.31.0-wmf.10", -"bewikiquote": "php-1.31.0-wmf.10", -"bewikisource": "php-1.31.0-wmf.10", -"bewiktionary": "php-1.31.0-wmf.10", +"bewikibooks": "php-1.31.0-wmf.11", +"bewikimedia": "php-1.31.0-wmf.11", +"bewikiquote": "php-1.31.0-wmf.11", +"bewikisource": "php-1.31.0-wmf.11", +"bewiktionary": "php-1.31.0-wmf.11", "bgwiki": "php-1.31.0-wmf.10", -"bgwikibooks": "php-1.31.0-wmf.10", -
[MediaWiki-commits] [Gerrit] mediawiki...Cargo[master]: Made "table" format top-aligned
Yaron Koren has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395825 ) Change subject: Made "table" format top-aligned .. Made "table" format top-aligned Change-Id: I43e668c4ba55e38bdd96ca533f28877b44ecb6f1 --- M Cargo.css 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo refs/changes/25/395825/2 diff --git a/Cargo.css b/Cargo.css index 009eb41..6bd5b6b 100644 --- a/Cargo.css +++ b/Cargo.css @@ -15,6 +15,7 @@ } table.cargoTable td { + vertical-align: top; padding: 5px; border: #ccc 1px solid; } -- To view, visit https://gerrit.wikimedia.org/r/395825 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I43e668c4ba55e38bdd96ca533f28877b44ecb6f1 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Cargo Gerrit-Branch: master Gerrit-Owner: Yaron Koren___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] oojs/ui[master]: PHP TextInputWidget: Remove remaining type 'search' specific...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395092 ) Change subject: PHP TextInputWidget: Remove remaining type 'search' specific code .. PHP TextInputWidget: Remove remaining type 'search' specific code TextInputWidget `type='search'` support was removed in JS in I4fbe336fafaaa6c9e228802e4e9463d11009be72 but some PHP code remained. Let's get rid of it. Change-Id: I8ae76d24582493dc069578137d53c497016f0a85 --- M php/widgets/TextInputWidget.php 1 file changed, 1 insertion(+), 16 deletions(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/php/widgets/TextInputWidget.php b/php/widgets/TextInputWidget.php index 14e68f6..9b84d8e 100644 --- a/php/widgets/TextInputWidget.php +++ b/php/widgets/TextInputWidget.php @@ -41,12 +41,8 @@ /** * @param array $config Configuration options -* @param string $config['type'] HTML tag `type` attribute: 'text', 'password', 'search', 'email', +* @param string $config['type'] HTML tag `type` attribute: 'text', 'password', 'email', * 'url' or 'number'. Ignored if `multiline` is true. (default: 'text') -* -* Some values of `type` result in additional behaviors: -* - `search`: implies `icon: 'search'` and `indicator: 'clear'`; when clicked, the indicator -* empties the text field * @param string $config['placeholder'] Placeholder text * @param bool $config['autofocus'] Ask the browser to focus this widget, using the 'autofocus' * HTML attribute (default: false) @@ -70,11 +66,6 @@ 'required' => false, 'autocomplete' => true, ], $config ); - if ( $config['type'] === 'search' ) { - if ( !array_key_exists( 'icon', $config ) ) { - $config['icon'] = 'search'; - } - } // Parent constructor parent::__construct( $config ); @@ -87,12 +78,6 @@ Element::warnDeprecation( 'The TextInputWidget "multiline" option is deprecated as of OOjs UI v0.22.2. ' . 'Use MultilineTextInputWidget instead.' - ); - } - if ( $config['type'] === 'search' && !( $this instanceof SearchInputWidget ) ) { - Element::warnDeprecation( - 'The TextInputWidget "type" => "search" is deprecated as of OOjs UI v0.22.2. ' . - 'Use SearchInputWidget instead.' ); } -- To view, visit https://gerrit.wikimedia.org/r/395092 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8ae76d24582493dc069578137d53c497016f0a85 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: VolkerEGerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Prtksxna Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] analytics...deploy[master]: chmod 755 init_superset.sh
Ottomata has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395824 ) Change subject: chmod 755 init_superset.sh .. chmod 755 init_superset.sh Change-Id: I9d4cfa754c26cf669576fe6d3acc55e37ac7934e --- M init_superset.sh 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Ottomata: Verified; Looks good to me, approved diff --git a/init_superset.sh b/init_superset.sh old mode 100644 new mode 100755 -- To view, visit https://gerrit.wikimedia.org/r/395824 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9d4cfa754c26cf669576fe6d3acc55e37ac7934e Gerrit-PatchSet: 1 Gerrit-Project: analytics/superset/deploy Gerrit-Branch: master Gerrit-Owner: OttomataGerrit-Reviewer: Ottomata ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] analytics...deploy[master]: chmod 755 init_superset.sh
Ottomata has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395824 ) Change subject: chmod 755 init_superset.sh .. chmod 755 init_superset.sh Change-Id: I9d4cfa754c26cf669576fe6d3acc55e37ac7934e --- M init_superset.sh 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/superset/deploy refs/changes/24/395824/1 diff --git a/init_superset.sh b/init_superset.sh old mode 100644 new mode 100755 -- To view, visit https://gerrit.wikimedia.org/r/395824 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9d4cfa754c26cf669576fe6d3acc55e37ac7934e Gerrit-PatchSet: 1 Gerrit-Project: analytics/superset/deploy Gerrit-Branch: master Gerrit-Owner: Ottomata___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Group1 to wmf.11
Chad has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395823 ) Change subject: Group1 to wmf.11 .. Group1 to wmf.11 Change-Id: Ief1f839716ce68dc88cf5234ce1f5715f33fef3a --- M php M wikiversions.json 2 files changed, 488 insertions(+), 488 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/23/395823/1 diff --git a/php b/php index ac3c670..444a591 12 --- a/php +++ b/php @@ -1 +1 @@ -php-1.31.0-wmf.10 \ No newline at end of file +php-1.31.0-wmf.11 \ No newline at end of file diff --git a/wikiversions.json b/wikiversions.json index df83ab8..d045277 100644 --- a/wikiversions.json +++ b/wikiversions.json @@ -8,9 +8,9 @@ "advisorywiki": "php-1.31.0-wmf.11", "adywiki": "php-1.31.0-wmf.10", "afwiki": "php-1.31.0-wmf.10", -"afwikibooks": "php-1.31.0-wmf.10", -"afwikiquote": "php-1.31.0-wmf.10", -"afwiktionary": "php-1.31.0-wmf.10", +"afwikibooks": "php-1.31.0-wmf.11", +"afwikiquote": "php-1.31.0-wmf.11", +"afwiktionary": "php-1.31.0-wmf.11", "akwiki": "php-1.31.0-wmf.10", "akwikibooks": "php-1.31.0-wmf.11", "akwiktionary": "php-1.31.0-wmf.11", @@ -19,16 +19,16 @@ "alswikiquote": "php-1.31.0-wmf.11", "alswiktionary": "php-1.31.0-wmf.11", "amwiki": "php-1.31.0-wmf.10", -"amwikimedia": "php-1.31.0-wmf.10", +"amwikimedia": "php-1.31.0-wmf.11", "amwikiquote": "php-1.31.0-wmf.11", -"amwiktionary": "php-1.31.0-wmf.10", +"amwiktionary": "php-1.31.0-wmf.11", "angwiki": "php-1.31.0-wmf.10", "angwikibooks": "php-1.31.0-wmf.11", "angwikiquote": "php-1.31.0-wmf.11", "angwikisource": "php-1.31.0-wmf.11", -"angwiktionary": "php-1.31.0-wmf.10", +"angwiktionary": "php-1.31.0-wmf.11", "anwiki": "php-1.31.0-wmf.10", -"anwiktionary": "php-1.31.0-wmf.10", +"anwiktionary": "php-1.31.0-wmf.11", "arbcom_cswiki": "php-1.31.0-wmf.10", "arbcom_dewiki": "php-1.31.0-wmf.10", "arbcom_enwiki": "php-1.31.0-wmf.10", @@ -36,55 +36,55 @@ "arbcom_nlwiki": "php-1.31.0-wmf.10", "arcwiki": "php-1.31.0-wmf.10", "arwiki": "php-1.31.0-wmf.10", -"arwikibooks": "php-1.31.0-wmf.10", -"arwikimedia": "php-1.31.0-wmf.10", -"arwikinews": "php-1.31.0-wmf.10", -"arwikiquote": "php-1.31.0-wmf.10", -"arwikisource": "php-1.31.0-wmf.10", -"arwikiversity": "php-1.31.0-wmf.10", -"arwiktionary": "php-1.31.0-wmf.10", +"arwikibooks": "php-1.31.0-wmf.11", +"arwikimedia": "php-1.31.0-wmf.11", +"arwikinews": "php-1.31.0-wmf.11", +"arwikiquote": "php-1.31.0-wmf.11", +"arwikisource": "php-1.31.0-wmf.11", +"arwikiversity": "php-1.31.0-wmf.11", +"arwiktionary": "php-1.31.0-wmf.11", "arzwiki": "php-1.31.0-wmf.10", "astwiki": "php-1.31.0-wmf.10", "astwikibooks": "php-1.31.0-wmf.11", "astwikiquote": "php-1.31.0-wmf.11", -"astwiktionary": "php-1.31.0-wmf.10", +"astwiktionary": "php-1.31.0-wmf.11", "aswiki": "php-1.31.0-wmf.10", "aswikibooks": "php-1.31.0-wmf.11", -"aswikisource": "php-1.31.0-wmf.10", +"aswikisource": "php-1.31.0-wmf.11", "aswiktionary": "php-1.31.0-wmf.11", "atjwiki": "php-1.31.0-wmf.10", -"auditcomwiki": "php-1.31.0-wmf.10", +"auditcomwiki": "php-1.31.0-wmf.11", "avwiki": "php-1.31.0-wmf.10", "avwiktionary": "php-1.31.0-wmf.11", "aywiki": "php-1.31.0-wmf.10", "aywikibooks": "php-1.31.0-wmf.11", -"aywiktionary": "php-1.31.0-wmf.10", +"aywiktionary": "php-1.31.0-wmf.11", "azbwiki": "php-1.31.0-wmf.10", "azwiki": "php-1.31.0-wmf.10", -"azwikibooks": "php-1.31.0-wmf.10", -"azwikiquote": "php-1.31.0-wmf.10", -"azwikisource": "php-1.31.0-wmf.10", -"azwiktionary": "php-1.31.0-wmf.10", +"azwikibooks": "php-1.31.0-wmf.11", +"azwikiquote": "php-1.31.0-wmf.11", +"azwikisource": "php-1.31.0-wmf.11", +"azwiktionary": "php-1.31.0-wmf.11", "barwiki": "php-1.31.0-wmf.10", "bat_smgwiki": "php-1.31.0-wmf.10", "bawiki": "php-1.31.0-wmf.10", -"bawikibooks": "php-1.31.0-wmf.10", +"bawikibooks": "php-1.31.0-wmf.11", "bclwiki": "php-1.31.0-wmf.10", -"bdwikimedia": "php-1.31.0-wmf.10", +"bdwikimedia": "php-1.31.0-wmf.11", "be_x_oldwiki": "php-1.31.0-wmf.10", -"betawikiversity": "php-1.31.0-wmf.10", +"betawikiversity": "php-1.31.0-wmf.11", "bewiki": "php-1.31.0-wmf.10", -"bewikibooks": "php-1.31.0-wmf.10", -"bewikimedia": "php-1.31.0-wmf.10", -"bewikiquote": "php-1.31.0-wmf.10", -"bewikisource": "php-1.31.0-wmf.10", -"bewiktionary": "php-1.31.0-wmf.10", +"bewikibooks": "php-1.31.0-wmf.11", +"bewikimedia": "php-1.31.0-wmf.11", +"bewikiquote": "php-1.31.0-wmf.11", +"bewikisource": "php-1.31.0-wmf.11", +"bewiktionary": "php-1.31.0-wmf.11", "bgwiki": "php-1.31.0-wmf.10", -"bgwikibooks":
[MediaWiki-commits] [Gerrit] analytics...deploy[master]: Move common vars to profile.sh, add init_superset.sh
Ottomata has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395822 ) Change subject: Move common vars to profile.sh, add init_superset.sh .. Move common vars to profile.sh, add init_superset.sh Change-Id: I087486bca35cad224e139989c1397ac1cd7d2a37 --- M build_wheels.sh M create_virtualenv.sh A init_superset.sh A profile.sh M scap/checks.yaml 5 files changed, 40 insertions(+), 14 deletions(-) Approvals: Ottomata: Verified; Looks good to me, approved diff --git a/build_wheels.sh b/build_wheels.sh index 55af781..ce54dc2 100755 --- a/build_wheels.sh +++ b/build_wheels.sh @@ -1,6 +1,9 @@ # Install all dependencies into artifacts/$dist. This should only be run # on a build server. +# source common variables +source $(dirname $0)/profile.sh + sudo apt-get --yes install \ python-pip \ python-wheel \ @@ -18,8 +21,6 @@ # will be byte for byte identical. export SOURCE_DATE_EPOCH=1512574740 -dist=$(lsb_release --codename --short) -wheels_dir=$(dirname $0)/artifacts/$dist rm -rf $wheels_dir mkdir -p $wheels_dir diff --git a/create_virtualenv.sh b/create_virtualenv.sh index b7c75b1..80d25a9 100755 --- a/create_virtualenv.sh +++ b/create_virtualenv.sh @@ -1,14 +1,5 @@ -dist=$(lsb_release --codename --short) -deploy_dir=$(dirname $0) -wheels_dir=$deploy_dir/artifacts/$dist - -# Default deploy directory, should exist in production. -if [ -e /srv/deployment/analytics/superset ]; then -venv=/srv/deployment/analytics/superset/venv -# Else just use ../superset-venv for testing. -else -venv=$deploy_dir/../superset-venv -fi +# source common variables +source $(dirname $0)/profile.sh # remove any existing virtualenv rm -rfv $venv diff --git a/init_superset.sh b/init_superset.sh new file mode 100644 index 000..eedb2ba --- /dev/null +++ b/init_superset.sh @@ -0,0 +1,21 @@ +# source common variables +source $(dirname $0)/profile.sh + +admin_user=${1:-admin} +admin_pass=${2:-admin} + +# If /etc/superset exists, assume that superset configs are here. +# Putting this directory in PYTHONPATH will make superset use them. +test -e /etc/superset && export PYTHONPATH=/etc/superset + +# Initialize superset. +# See: https://superset.incubator.apache.org/installation.html + +# Create a Flask admin user. +$venv/bin/fabmanager create-admin --app superset --username $admin_user --password $admin_pass --firstname Admin --lastname User --email analytics-ale...@wikimedia.org + +# Initialize the database +$venv/bin/superset db upgrade + +# Create default roles and permissions +$venv/bin/superset init diff --git a/profile.sh b/profile.sh new file mode 100644 index 000..ba38b9f --- /dev/null +++ b/profile.sh @@ -0,0 +1,13 @@ +# Common variables for build and deploy scripts. + +deploy_dir=$(dirname $0) +dist=$(lsb_release --codename --short) +wheels_dir=$deploy_dir/artifacts/$dist + +# Default deploy directory, should exist in production. +if [ -e /srv/deployment/analytics/superset ]; then +venv=/srv/deployment/analytics/superset/venv +# Else just use ../superset-venv for testing. +else +venv=$deploy_dir/../superset-venv +fi diff --git a/scap/checks.yaml b/scap/checks.yaml index 99dca85..121943a 100644 --- a/scap/checks.yaml +++ b/scap/checks.yaml @@ -1,5 +1,5 @@ checks: - build_virtualenv: + create_virtualenv: type: command stage: promote timeout: 300 -- To view, visit https://gerrit.wikimedia.org/r/395822 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I087486bca35cad224e139989c1397ac1cd7d2a37 Gerrit-PatchSet: 1 Gerrit-Project: analytics/superset/deploy Gerrit-Branch: master Gerrit-Owner: OttomataGerrit-Reviewer: Ottomata ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] analytics...deploy[master]: Move common vars to profile.sh, add init_superset.sh
Ottomata has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395822 ) Change subject: Move common vars to profile.sh, add init_superset.sh .. Move common vars to profile.sh, add init_superset.sh Change-Id: I087486bca35cad224e139989c1397ac1cd7d2a37 --- M build_wheels.sh M create_virtualenv.sh A init_superset.sh A profile.sh M scap/checks.yaml 5 files changed, 40 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/superset/deploy refs/changes/22/395822/1 diff --git a/build_wheels.sh b/build_wheels.sh index 55af781..ce54dc2 100755 --- a/build_wheels.sh +++ b/build_wheels.sh @@ -1,6 +1,9 @@ # Install all dependencies into artifacts/$dist. This should only be run # on a build server. +# source common variables +source $(dirname $0)/profile.sh + sudo apt-get --yes install \ python-pip \ python-wheel \ @@ -18,8 +21,6 @@ # will be byte for byte identical. export SOURCE_DATE_EPOCH=1512574740 -dist=$(lsb_release --codename --short) -wheels_dir=$(dirname $0)/artifacts/$dist rm -rf $wheels_dir mkdir -p $wheels_dir diff --git a/create_virtualenv.sh b/create_virtualenv.sh index b7c75b1..80d25a9 100755 --- a/create_virtualenv.sh +++ b/create_virtualenv.sh @@ -1,14 +1,5 @@ -dist=$(lsb_release --codename --short) -deploy_dir=$(dirname $0) -wheels_dir=$deploy_dir/artifacts/$dist - -# Default deploy directory, should exist in production. -if [ -e /srv/deployment/analytics/superset ]; then -venv=/srv/deployment/analytics/superset/venv -# Else just use ../superset-venv for testing. -else -venv=$deploy_dir/../superset-venv -fi +# source common variables +source $(dirname $0)/profile.sh # remove any existing virtualenv rm -rfv $venv diff --git a/init_superset.sh b/init_superset.sh new file mode 100644 index 000..eedb2ba --- /dev/null +++ b/init_superset.sh @@ -0,0 +1,21 @@ +# source common variables +source $(dirname $0)/profile.sh + +admin_user=${1:-admin} +admin_pass=${2:-admin} + +# If /etc/superset exists, assume that superset configs are here. +# Putting this directory in PYTHONPATH will make superset use them. +test -e /etc/superset && export PYTHONPATH=/etc/superset + +# Initialize superset. +# See: https://superset.incubator.apache.org/installation.html + +# Create a Flask admin user. +$venv/bin/fabmanager create-admin --app superset --username $admin_user --password $admin_pass --firstname Admin --lastname User --email analytics-ale...@wikimedia.org + +# Initialize the database +$venv/bin/superset db upgrade + +# Create default roles and permissions +$venv/bin/superset init diff --git a/profile.sh b/profile.sh new file mode 100644 index 000..ba38b9f --- /dev/null +++ b/profile.sh @@ -0,0 +1,13 @@ +# Common variables for build and deploy scripts. + +deploy_dir=$(dirname $0) +dist=$(lsb_release --codename --short) +wheels_dir=$deploy_dir/artifacts/$dist + +# Default deploy directory, should exist in production. +if [ -e /srv/deployment/analytics/superset ]; then +venv=/srv/deployment/analytics/superset/venv +# Else just use ../superset-venv for testing. +else +venv=$deploy_dir/../superset-venv +fi diff --git a/scap/checks.yaml b/scap/checks.yaml index 99dca85..121943a 100644 --- a/scap/checks.yaml +++ b/scap/checks.yaml @@ -1,5 +1,5 @@ checks: - build_virtualenv: + create_virtualenv: type: command stage: promote timeout: 300 -- To view, visit https://gerrit.wikimedia.org/r/395822 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I087486bca35cad224e139989c1397ac1cd7d2a37 Gerrit-PatchSet: 1 Gerrit-Project: analytics/superset/deploy Gerrit-Branch: master Gerrit-Owner: Ottomata___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add edit tags to list=watchlist
Umherirrender has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395821 ) Change subject: Add edit tags to list=watchlist .. Add edit tags to list=watchlist It is using the same query as list=recentchanges by left joining tag_summary Bug: T181975 Change-Id: I9e9ab9753ec0f813e9e555106cc81fd15ad9fb4a --- M includes/api/ApiQueryWatchlist.php M includes/watcheditem/WatchedItemQueryService.php 2 files changed, 27 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/21/395821/1 diff --git a/includes/api/ApiQueryWatchlist.php b/includes/api/ApiQueryWatchlist.php index 1e3b2c7..fdac261 100644 --- a/includes/api/ApiQueryWatchlist.php +++ b/includes/api/ApiQueryWatchlist.php @@ -53,7 +53,7 @@ $fld_flags = false, $fld_timestamp = false, $fld_user = false, $fld_comment = false, $fld_parsedcomment = false, $fld_sizes = false, $fld_notificationtimestamp = false, $fld_userid = false, - $fld_loginfo = false; + $fld_loginfo = false, $fld_tags; /** * @param ApiPageSet $resultPageSet @@ -82,6 +82,7 @@ $this->fld_patrol = isset( $prop['patrol'] ); $this->fld_notificationtimestamp = isset( $prop['notificationtimestamp'] ); $this->fld_loginfo = isset( $prop['loginfo'] ); + $this->fld_tags = isset( $prop['tags'] ); if ( $this->fld_patrol ) { if ( !$user->useRCPatrol() && !$user->useNPPatrol() ) { @@ -243,6 +244,9 @@ if ( $this->fld_loginfo ) { $includeFields[] = WatchedItemQueryService::INCLUDE_LOG_INFO; } + if ( $this->fld_tags ) { + $includeFields[] = WatchedItemQueryService::INCLUDE_TAGS; + } return $includeFields; } @@ -391,6 +395,16 @@ } } + if ( $this->fld_tags ) { + if ( $recentChangeInfo['rc_tags'] ) { + $tags = explode( ',', $recentChangeInfo['rc_tags'] ); + ApiResult::setIndexedTagName( $tags, 'tag' ); + $vals['tags'] = $tags; + } else { + $vals['tags'] = []; + } + } + if ( $anyHidden && ( $recentChangeInfo['rc_deleted'] & Revision::DELETED_RESTRICTED ) ) { $vals['suppressed'] = true; } @@ -453,6 +467,7 @@ 'sizes', 'notificationtimestamp', 'loginfo', + 'tags' ] ], 'show' => [ diff --git a/includes/watcheditem/WatchedItemQueryService.php b/includes/watcheditem/WatchedItemQueryService.php index d0f45be..3478b08 100644 --- a/includes/watcheditem/WatchedItemQueryService.php +++ b/includes/watcheditem/WatchedItemQueryService.php @@ -27,6 +27,7 @@ const INCLUDE_PATROL_INFO = 'patrol'; const INCLUDE_SIZES = 'sizes'; const INCLUDE_LOG_INFO = 'loginfo'; + const INCLUDE_TAGS = 'tags'; // FILTER_* constants are part of public API (are used in ApiQueryWatchlist and // ApiQueryWatchlistRaw classes) and should not be changed. @@ -335,6 +336,9 @@ if ( in_array( self::INCLUDE_COMMENT, $options['includeFields'] ) ) { $tables += $this->getCommentStore()->getJoin()['tables']; } + if ( in_array( self::INCLUDE_TAGS, $options['includeFields'] ) ) { + $tables[] = 'tag_summary'; + } return $tables; } @@ -383,6 +387,10 @@ } if ( in_array( self::INCLUDE_LOG_INFO, $options['includeFields'] ) ) { $fields = array_merge( $fields, [ 'rc_logid', 'rc_log_type', 'rc_log_action', 'rc_params' ] ); + } + if ( in_array( self::INCLUDE_TAGS, $options['includeFields'] ) ) { + // prefixed with rc_ to include the field in getRecentChangeFieldsFromRow + $fields['rc_tags'] = 'ts_tags'; } return $fields; @@ -678,6 +686,9 @@ if ( in_array( self::INCLUDE_COMMENT, $options['includeFields'] ) ) { $joinConds += $this->getCommentStore()->getJoin()['joins']; } + if ( in_array( self::INCLUDE_TAGS, $options['includeFields'] ) ) { + $joinConds['tag_summary'] = [ 'LEFT JOIN',
[MediaWiki-commits] [Gerrit] integration/config[master]: Archive the ActionEditSubmit extension
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/394033 ) Change subject: Archive the ActionEditSubmit extension .. Archive the ActionEditSubmit extension Bug: T180808 Change-Id: I978198418786081e3625d129f9e2d6f0efe21f56 --- M zuul/layout.yaml 1 file changed, 1 insertion(+), 2 deletions(-) Approvals: Umherirrender: Looks good to me, but someone else must approve Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/zuul/layout.yaml b/zuul/layout.yaml index 49e6683..6a2bd45 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -4182,8 +4182,7 @@ - name: mediawiki/extensions/ActionEditSubmit template: - - name: extension-unittests-generic - - name: mwgate-npm + - name: archived - name: mediawiki/extensions/AddHTMLMetaAndTitle template: -- To view, visit https://gerrit.wikimedia.org/r/394033 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I978198418786081e3625d129f9e2d6f0efe21f56 Gerrit-PatchSet: 3 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: MarcoAurelioGerrit-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] operations...gerrit[master]: Gerrit 2.14.6
Chad has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395820 ) Change subject: Gerrit 2.14.6 .. Gerrit 2.14.6 Change-Id: Ia671a72eef92682e31ef61806c3ce02207d0fc31 --- M gerrit.war M plugins/commit-message-length-validator.jar M plugins/delete-project.jar M plugins/download-commands.jar M plugins/its-phabricator.jar M plugins/lfs.jar M plugins/replication.jar M plugins/reviewnotes.jar 8 files changed, 8 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/software/gerrit refs/changes/20/395820/1 diff --git a/gerrit.war b/gerrit.war index ca023c5..0271641 100644 --- a/gerrit.war +++ b/gerrit.war @@ -1 +1 @@ -#$# git-fat ffe0a60170ad298e9525df9238fc4ebde1d533a4 52560761 +#$# git-fat 5ccd8e98ad19bcaf4872b63e4cb96de0eec33b7c 87515969 diff --git a/plugins/commit-message-length-validator.jar b/plugins/commit-message-length-validator.jar index 362a51d..a50cf28 100644 --- a/plugins/commit-message-length-validator.jar +++ b/plugins/commit-message-length-validator.jar @@ -1 +1 @@ -#$# git-fat 26aa79661819ad2f4d6a185d12cf6ba6384a2c54 4315 +#$# git-fat 2ee37bec0997442a406805e463f92632d0b6b89b 5396 diff --git a/plugins/delete-project.jar b/plugins/delete-project.jar index 5d78c84..23edb94 100644 --- a/plugins/delete-project.jar +++ b/plugins/delete-project.jar @@ -1 +1 @@ -#$# git-fat 80e2bb180b9a3f655b854cba2c86885e3dcd6d0146873 +#$# git-fat 661df989630b7cdc19b08724c9688220d8d02cc549004 diff --git a/plugins/download-commands.jar b/plugins/download-commands.jar index ff58052..6c5a7d1 100644 --- a/plugins/download-commands.jar +++ b/plugins/download-commands.jar @@ -1 +1 @@ -#$# git-fat 310414c4ed82d4b7a6505800b240be02fdb11e7b24970 +#$# git-fat cdf10d423a762371af126f98926fad283f1bfb4d26723 diff --git a/plugins/its-phabricator.jar b/plugins/its-phabricator.jar index 55f5102..9c32079 100644 --- a/plugins/its-phabricator.jar +++ b/plugins/its-phabricator.jar @@ -1 +1 @@ -#$# git-fat f2dfa16182f8e4468c2b80a5e0b965b738d49866 1445881 +#$# git-fat 379af2caef8ed13a2b1039a3fc20a0a6b70639c9 119865 diff --git a/plugins/lfs.jar b/plugins/lfs.jar index f9625b7..9cbfadd 100644 --- a/plugins/lfs.jar +++ b/plugins/lfs.jar @@ -1 +1 @@ -#$# git-fat 2aba41977391d0b9691ec652ef7d1620436556b9 141175 +#$# git-fat 1e22db8ef371601755b6279256f4400a8735400f 195965 diff --git a/plugins/replication.jar b/plugins/replication.jar index 6deac4c..c18c063 100644 --- a/plugins/replication.jar +++ b/plugins/replication.jar @@ -1 +1 @@ -#$# git-fat 3acc66f2cf5283f5b5f79198855e4a16ac4b9394 210135 +#$# git-fat 0e5539a9453a583a36034aa59a906674dc814fcb 220675 diff --git a/plugins/reviewnotes.jar b/plugins/reviewnotes.jar index eb964c7..28591ab 100644 --- a/plugins/reviewnotes.jar +++ b/plugins/reviewnotes.jar @@ -1 +1 @@ -#$# git-fat 0e6f882616c654644320b510b2748434ca2daff724583 +#$# git-fat 3644ce3621d696d514031ba229f5e21d859f3ab524758 -- To view, visit https://gerrit.wikimedia.org/r/395820 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia671a72eef92682e31ef61806c3ce02207d0fc31 Gerrit-PatchSet: 1 Gerrit-Project: operations/software/gerrit Gerrit-Branch: master Gerrit-Owner: Chad___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCLFilters: UI tweaks
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395778 ) Change subject: RCLFilters: UI tweaks .. RCLFilters: UI tweaks Follow-up to I96af7ba583d03e6ff9833ac3b5f4b80cfd0ee626 * Reword 'Recentchangeslinked-summary' * Bold ToOrFrom selector label * Bold 'FROM' in 'rcfilters-filter-showlinkedfrom-option-label' * Bold 'TO' in 'rcfilters-filter-showlinkedto-option-label' * Reword target page selector placeholder * Prevent title suggestions from showing duplicate entries * Show a specific message when there is no results because no target page is specified. Bug: T172161 Change-Id: I1b1ee793b3eff4183039acc27fe6cca042ee57d0 --- M includes/specials/SpecialRecentchangeslinked.php M languages/i18n/en.json M languages/i18n/qqq.json M resources/Resources.php M resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js M resources/src/mediawiki.rcfilters/mw.rcfilters.init.js M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.RclToOrFromWidget.less M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.RclTargetPageWidget.js M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.RclToOrFromWidget.js 11 files changed, 62 insertions(+), 25 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/specials/SpecialRecentchangeslinked.php b/includes/specials/SpecialRecentchangeslinked.php index 2eeeb0b..9e0daf5 100644 --- a/includes/specials/SpecialRecentchangeslinked.php +++ b/includes/specials/SpecialRecentchangeslinked.php @@ -310,4 +310,16 @@ return parent::getPageTitle( $subpage ); } + + protected function outputNoResults() { + if ( $this->getTargetTitle() === false ) { + $this->getOutput()->addHTML( + '' . + $this->msg( 'recentchanges-notargetpage' )->parse() . + '' + ); + } else { + parent::outputNoResults(); + } + } } diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 7254b92..4b65fbc 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -1343,6 +1343,7 @@ "recentchanges-noresult": "No changes during the given period match these criteria.", "recentchanges-timeout": "This search has timed out. You may wish to try different search parameters.", "recentchanges-network": "Due to a technical error, no results could be loaded. Please try refreshing the page.", + "recentchanges-notargetpage": "Enter a page name above to see changes related to that page.", "recentchanges-feed-description": "Track the most recent changes to the wiki in this feed.", "recentchanges-label-newpage": "This edit created a new page", "recentchanges-label-minor": "This is a minor edit", @@ -1480,11 +1481,11 @@ "rcfilters-watchlist-showupdated": "Changes to pages you haven't visited since the changes occurred are in bold, with solid markers.", "rcfilters-preference-label": "Hide the improved version of Recent Changes", "rcfilters-preference-help": "Rolls back the 2017 interface redesign and all tools added then and since.", - "rcfilters-filter-showlinkedfrom-label": "Show changes on pages linked from:", - "rcfilters-filter-showlinkedfrom-option-label": "Show changes on pages linked FROM a page", - "rcfilters-filter-showlinkedto-label": "Show changes on pages linked to:", - "rcfilters-filter-showlinkedto-option-label": "Show changes on pages linked TO a page", - "rcfilters-target-page-placeholder": "Select a page", + "rcfilters-filter-showlinkedfrom-label": "Show changes on pages linked from", + "rcfilters-filter-showlinkedfrom-option-label": "Show changes on pages linked FROM a page", + "rcfilters-filter-showlinkedto-label": "Show changes on pages linked to", + "rcfilters-filter-showlinkedto-option-label": "Show changes on pages linked TO a page", + "rcfilters-target-page-placeholder": "Enter a page name", "rcnotefrom": "Below {{PLURAL:$5|is the change|are the changes}} since $3, $4 (up to $1 shown).", "rclistfromreset": "Reset date selection", "rclistfrom": "Show new changes starting from $2, $3", @@ -1532,7 +1533,7 @@ "recentchangeslinked-feed": "Related changes", "recentchangeslinked-toolbox": "Related changes", "recentchangeslinked-title": "Changes related to \"$1\"", - "recentchangeslinked-summary": "This is a list of changes made recently to pages linked from a specified page (or to members of a specified category).\nPages on [[Special:Watchlist|your
[MediaWiki-commits] [Gerrit] operations/dns[master]: Removing lingering dns entries of ms-fe1003 and ms-fe1004
Cmjohnson has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395819 ) Change subject: Removing lingering dns entries of ms-fe1003 and ms-fe1004 .. Removing lingering dns entries of ms-fe1003 and ms-fe1004 Change-Id: I84aaef2d13a9f75b594428de575ef0be6b0c6d3c --- M templates/10.in-addr.arpa 1 file changed, 2 insertions(+), 3 deletions(-) Approvals: Cmjohnson: Looks good to me, approved jenkins-bot: Verified diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa index dbdd32c..a4636d9 100644 --- a/templates/10.in-addr.arpa +++ b/templates/10.in-addr.arpa @@ -598,7 +598,7 @@ 147 1H IN PTR cerium.eqiad.wmnet. 148 1H IN PTR dbproxy1004.eqiad.wmnet. 149 1H IN PTR praseodymium.eqiad.wmnet. -150 1H IN PTR ms-fe1003.eqiad.wmnet. + 151 1H IN PTR ruthenium.eqiad.wmnet. 152 1H IN PTR poolcounter1002.eqiad.wmnet. 153 1H IN PTR cerium-a.eqiad.wmnet. @@ -790,7 +790,6 @@ 82 1H IN PTR cam1-c-eqiad.eqiad.wmnet. 83 1H IN PTR cam2-c-eqiad.eqiad.wmnet. -92 1H IN PTR ms-fe1004.eqiad.wmnet. 93 1H IN PTR osm-web1001.eqiad.wmnet. 94 1H IN PTR osm-web1002.eqiad.wmnet. 95 1H IN PTR osm-web1003.eqiad.wmnet. @@ -840,7 +839,7 @@ 149 1H IN PTR snapshot1006.eqiad.wmnet. 150 1H IN PTR iridium.eqiad.wmnet. 151 1H IN PTR ocg1001.eqiad.wmnet. -152 1H IN PTR ms-fe1003.eqiad.wmnet. + 153 1H IN PTR scb1003.eqiad.wmnet. 154 1H IN PTR lithium.eqiad.wmnet. 155 1H IN PTR graphite1001.eqiad.wmnet. -- To view, visit https://gerrit.wikimedia.org/r/395819 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I84aaef2d13a9f75b594428de575ef0be6b0c6d3c Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: CmjohnsonGerrit-Reviewer: Cmjohnson Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: gerritbot: bolden `merged` on Phabricator comments
Dzahn has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/394748 ) Change subject: gerritbot: bolden `merged` on Phabricator comments .. gerritbot: bolden `merged` on Phabricator comments Bug: T181886 Change-Id: I1263ba334374e033712493bfd494d0621d4ccc12 --- M modules/gerrit/files/etc/its/templates/PatchSetMerged.soy M modules/gerrit/files/etc/its/templates/PatchSetMerged.vm 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/modules/gerrit/files/etc/its/templates/PatchSetMerged.soy b/modules/gerrit/files/etc/its/templates/PatchSetMerged.soy index 9919ce2..fb85801 100644 --- a/modules/gerrit/files/etc/its/templates/PatchSetMerged.soy +++ b/modules/gerrit/files/etc/its/templates/PatchSetMerged.soy @@ -28,7 +28,7 @@ * */ {template .PatchSetMerged autoescape="strict" kind="text"} - Change {$changeNumber} merged by {$submitterName}:{\n} + Change {$changeNumber} **merged** by {$submitterName}:{\n} [{$project}@{$branch}] {$subject|escapeUri}{\n}{\n} {$formatChangeUrl} diff --git a/modules/gerrit/files/etc/its/templates/PatchSetMerged.vm b/modules/gerrit/files/etc/its/templates/PatchSetMerged.vm index 7753138..4219fdd 100644 --- a/modules/gerrit/files/etc/its/templates/PatchSetMerged.vm +++ b/modules/gerrit/files/etc/its/templates/PatchSetMerged.vm @@ -1,4 +1,4 @@ -Change $change-number merged by $submitter-name: +Change $change-number **merged** by $submitter-name: [$project@$branch] $subject ${its.formatLink($change-url)} -- To view, visit https://gerrit.wikimedia.org/r/394748 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1263ba334374e033712493bfd494d0621d4ccc12 Gerrit-PatchSet: 6 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: MarcoAurelioGerrit-Reviewer: Chad Gerrit-Reviewer: Dzahn Gerrit-Reviewer: Framawiki Gerrit-Reviewer: Giuseppe Lavagetto Gerrit-Reviewer: MarcoAurelio Gerrit-Reviewer: Paladox Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/dns[master]: Removing lingering dns entries of ms-fe1003 and ms-fe1004
Cmjohnson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395819 ) Change subject: Removing lingering dns entries of ms-fe1003 and ms-fe1004 .. Removing lingering dns entries of ms-fe1003 and ms-fe1004 Change-Id: I84aaef2d13a9f75b594428de575ef0be6b0c6d3c --- M templates/10.in-addr.arpa 1 file changed, 2 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/19/395819/1 diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa index dbdd32c..a4636d9 100644 --- a/templates/10.in-addr.arpa +++ b/templates/10.in-addr.arpa @@ -598,7 +598,7 @@ 147 1H IN PTR cerium.eqiad.wmnet. 148 1H IN PTR dbproxy1004.eqiad.wmnet. 149 1H IN PTR praseodymium.eqiad.wmnet. -150 1H IN PTR ms-fe1003.eqiad.wmnet. + 151 1H IN PTR ruthenium.eqiad.wmnet. 152 1H IN PTR poolcounter1002.eqiad.wmnet. 153 1H IN PTR cerium-a.eqiad.wmnet. @@ -790,7 +790,6 @@ 82 1H IN PTR cam1-c-eqiad.eqiad.wmnet. 83 1H IN PTR cam2-c-eqiad.eqiad.wmnet. -92 1H IN PTR ms-fe1004.eqiad.wmnet. 93 1H IN PTR osm-web1001.eqiad.wmnet. 94 1H IN PTR osm-web1002.eqiad.wmnet. 95 1H IN PTR osm-web1003.eqiad.wmnet. @@ -840,7 +839,7 @@ 149 1H IN PTR snapshot1006.eqiad.wmnet. 150 1H IN PTR iridium.eqiad.wmnet. 151 1H IN PTR ocg1001.eqiad.wmnet. -152 1H IN PTR ms-fe1003.eqiad.wmnet. + 153 1H IN PTR scb1003.eqiad.wmnet. 154 1H IN PTR lithium.eqiad.wmnet. 155 1H IN PTR graphite1001.eqiad.wmnet. -- To view, visit https://gerrit.wikimedia.org/r/395819 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I84aaef2d13a9f75b594428de575ef0be6b0c6d3c Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Cmjohnson___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Prevent results from wiggling
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395652 ) Change subject: Prevent results from wiggling .. Prevent results from wiggling The patch Ifecaaff572 introduces clearing to the right for the first result list item, when grouping is disabled. The difference between cleared vs non-cleared result becomes visible when legend is toggled, causing really small (around a pixel), but annoying wiggle. Change-Id: Ida6fb6f8ad0caf666258e3f1e770c6da9e24af58 --- M resources/src/mediawiki.special/mediawiki.special.changeslist.css 1 file changed, 5 insertions(+), 2 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/src/mediawiki.special/mediawiki.special.changeslist.css b/resources/src/mediawiki.special/mediawiki.special.changeslist.css index 734666f..9521a2b 100644 --- a/resources/src/mediawiki.special/mediawiki.special.changeslist.css +++ b/resources/src/mediawiki.special/mediawiki.special.changeslist.css @@ -45,8 +45,12 @@ display: none; } +.mw-changeslist-legend.mw-collapsed { + margin: 0; +} + /* Prevent pushing down of content if legend is initially collapsed */ -.mw-changeslist-legend.mw-collapsed ~ ul.special > li:first-child { +.mw-changeslist-legend.mw-collapsed ~ ul:first-of-type > li:first-child { clear: right; } @@ -55,5 +59,4 @@ background-color: #fff; position: absolute; right: 0; - margin-top: -0.5em; } -- To view, visit https://gerrit.wikimedia.org/r/395652 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ida6fb6f8ad0caf666258e3f1e770c6da9e24af58 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Petar.petkovicGerrit-Reviewer: Catrope Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Enable ORES filters on simplewiki
Catrope has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395818 ) Change subject: Enable ORES filters on simplewiki .. Enable ORES filters on simplewiki Using the same thresholds as on enwiki. Bug: T182012 Change-Id: Ie8d2f8bc67db27a93d67a40121f50dc53d497aa0 --- M wmf-config/InitialiseSettings-labs.php M wmf-config/InitialiseSettings.php 2 files changed, 15 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/18/395818/1 diff --git a/wmf-config/InitialiseSettings-labs.php b/wmf-config/InitialiseSettings-labs.php index 383c120..3045515 100644 --- a/wmf-config/InitialiseSettings-labs.php +++ b/wmf-config/InitialiseSettings-labs.php @@ -692,21 +692,5 @@ 'wmgUseORES' => [ 'simplewiki' => true, // T181848 ], - 'wgOresFiltersThresholds' => [ - 'simplewiki' => [ // Follows enwiki - 'damaging' => [ - 'likelygood' => [ 'min' => 0, 'max' => 'recall_at_precision(min_precision=0.99)' ], - 'maybebad' => [ 'min' => 'recall_at_precision(min_precision=0.15)', 'max' => 1 ], - 'likelybad' => [ 'min' => 'recall_at_precision(min_precision=0.45)', 'max' => 1 ], - // verylikelybad uses default - ], - 'goodfaith' => [ - 'likelygood' => [ 'min' => 'recall_at_precision(min_precision=0.99)', 'max' => 1 ], - 'maybebad' => [ 'min' => 0, 'max' => 'recall_at_precision(min_precision=0.15)' ], - // likelybad uses default - 'verylikelybad' => [ 'min' => 0, 'max' => 'recall_at_precision(min_precision=0.9)' ], - ], - ], - ], ]; } # wmflLabsSettings() diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 42e9e89..32b46ed 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -18998,6 +18998,21 @@ 'verylikelybad' => [ 'min' => 0, 'max' => 'recall_at_precision(min_precision=0.9)' ], ], ], + 'simplewiki' => [ + // Same as enwiki + 'damaging' => [ + 'likelygood' => [ 'min' => 0, 'max' => 'recall_at_precision(min_precision=0.99)' ], + 'maybebad' => [ 'min' => 'recall_at_precision(min_precision=0.15)', 'max' => 1 ], + 'likelybad' => [ 'min' => 'recall_at_precision(min_precision=0.45)', 'max' => 1 ], + // verylikelybad uses default + ], + 'goodfaith' => [ + 'likelygood' => [ 'min' => 'recall_at_precision(min_precision=0.99)', 'max' => 1 ], + 'maybebad' => [ 'min' => 0, 'max' => 'recall_at_precision(min_precision=0.15)' ], + // likelybad uses default + 'verylikelybad' => [ 'min' => 0, 'max' => 'recall_at_precision(min_precision=0.9)' ], + ], + ], 'plwiki' => [ 'damaging' => [ // likelygood uses default -- To view, visit https://gerrit.wikimedia.org/r/395818 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie8d2f8bc67db27a93d67a40121f50dc53d497aa0 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Catrope___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Reserve space between filters and results
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395788 ) Change subject: RCFilters: Reserve space between filters and results .. RCFilters: Reserve space between filters and results - Add bottom margin to RCFilters head. There is no more reserved space for "View newest changes" link, so we need to make sure we have enough white space separator between head and results. Bug: T182149 Change-Id: I592ab7bb1f12785d5bd802bb16f11b4e74fb26b7 --- M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less 1 file changed, 9 insertions(+), 13 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less index 74b81fa..84b4654 100644 --- a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less +++ b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less @@ -2,9 +2,10 @@ @import 'mediawiki.ui/variables'; @import 'mw.rcfilters.mixins'; -@rcfilters-spinner-width: 70px; -@rcfilters-head-min-height: 250px; -@rcfilters-wl-head-min-height: 320px; +@rcfilters-spinner-size: 12px; +@rcfilters-head-min-height: 210px; +@rcfilters-head-margin-bottom: 20px; +@rcfilters-wl-head-min-height: 300px; // Corrections for the standard special page .client-js { @@ -15,6 +16,7 @@ // Reserve space for the UI while it loads .rcfilters-head { min-height: @rcfilters-head-min-height; + margin-bottom: @rcfilters-head-margin-bottom; } // On the watchlist, reserve a bit more @@ -65,11 +67,6 @@ } } - .rcfilters-container { - min-height: 100px; - margin: 0; - } - .mw-changeslist { // Reserve space for the highlight circles ul, @@ -93,9 +90,8 @@ display: none; position: absolute; left: 50%; - width: @rcfilters-spinner-width; // Make sure the middle of the spinner is centered, rather than its left edge - margin-left: -@rcfilters-spinner-width/2; + margin-left: -3 * @rcfilters-spinner-size / 2; opacity: 0.8; white-space: nowrap; @@ -105,8 +101,8 @@ &:after { content: ''; display: inline-block; - width: 12px; - height: 12px; + width: @rcfilters-spinner-size; + height: @rcfilters-spinner-size; background-color: @colorGray12; border-radius: 100%; .animation( rcfiltersBouncedelay 1.5s ease-in-out -0.16s infinite both ); @@ -123,7 +119,7 @@ body:not( .mw-rcfilters-ui-initialized ) .rcfilters-spinner { display: block; // When initializing, display the spinner on top of the area where the UI will appear - margin-top: -@rcfilters-head-min-height/2; + margin-top: -( @rcfilters-head-min-height + @rcfilters-head-margin-bottom ) / 2; } body.mw-rcfilters-ui-loading .rcfilters-spinner { display: block; -- To view, visit https://gerrit.wikimedia.org/r/395788 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I592ab7bb1f12785d5bd802bb16f11b4e74fb26b7 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Petar.petkovicGerrit-Reviewer: Catrope Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Bump versionCode.
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395816 ) Change subject: Bump versionCode. .. Bump versionCode. Actually bump it by a few numbers, to make room for possible updates for APKs that are specific to API <19. Change-Id: I89c3a0d60d4a063713fb8464c8b5096f4a1ec691 --- M app/build.gradle 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Dbrant: Looks good to me, approved jenkins-bot: Verified diff --git a/app/build.gradle b/app/build.gradle index e6f4d2e..a3be82a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -55,7 +55,7 @@ applicationId 'org.wikipedia' minSdkVersion 19 targetSdkVersion 26 -versionCode 208 +versionCode 220 testApplicationId 'org.wikipedia.test' testInstrumentationRunner 'org.wikipedia.test.AndroidTestRunner' vectorDrawables.useSupportLibrary = true -- To view, visit https://gerrit.wikimedia.org/r/395816 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I89c3a0d60d4a063713fb8464c8b5096f4a1ec691 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: DbrantGerrit-Reviewer: Dbrant Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Adding dhcpd entriesf or db111[12]
Cmjohnson has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395814 ) Change subject: Adding dhcpd entriesf or db111[12] .. Adding dhcpd entriesf or db111[12] Change-Id: Ic4ddc31f54da319d6ff93014eeda8677c7c7d2a1 --- M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 1 file changed, 10 insertions(+), 0 deletions(-) Approvals: Cmjohnson: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 index 79b6a87..6d9e9f1 100644 --- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -1298,6 +1298,16 @@ fixed-address db1110.eqiad.wmnet; } +host db { +hardware ethernet 80:18:44:DF:D4:D0; +fixed-address db.eqiad.wmnet; +} + +host db1112 { +hardware ethernet 80:18:44:DF:D2:14; +fixed-address db1112.eqiad.wmnet; +} + host db2011 { hardware ethernet 78:2b:cb:66:aa:3e; fixed-address db2011.codfw.wmnet; -- To view, visit https://gerrit.wikimedia.org/r/395814 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic4ddc31f54da319d6ff93014eeda8677c7c7d2a1 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: CmjohnsonGerrit-Reviewer: Cmjohnson 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...MassAction[master]: Internationalize hardcoded strings from View Task
Albert221 has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395817 ) Change subject: Internationalize hardcoded strings from View Task .. Internationalize hardcoded strings from View Task It's a part of T96418. Change-Id: I4129f57f465dc7fad40d8883e207b7456db3ddd7 --- M i18n/en.json M i18n/qqq.json M src/MassActionSpecialPage.php 3 files changed, 65 insertions(+), 20 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MassAction refs/changes/17/395817/1 diff --git a/i18n/en.json b/i18n/en.json index 7b0ae63..be46c4a 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -27,5 +27,23 @@ "massaction-regexreplace-desc": "Performs a regex replace on the content using the pattern", "massaction-titleregexmatcher-desc": "Matches pages with titles matching regex \"$1\"", "massaction-titleregexmatcher-enabled": "Title regex matcher enabled?", - "massaction-titleregexmatcher-label": "Title regex" + "massaction-titleregexmatcher-label": "Title regex", + "massaction-task-id": "Task Id", + "massaction-view-task-submit": "View Task", + "massaction-view-task-title": "View Task", + "massaction-view-task-no-tasks": "No task exists with the id: $1", + "massaction-view-task-id": "Task $1", + "massaction-view-task-summary": "Summary: $1", + "massaction-view-task-user": "User: $1", + "massaction-view-task-target-type": "Target Type: $1", + "massaction-view-task-date-created": "Date Created: $1", + "massaction-view-task-state": "State: $1", + "massaction-view-task-actions": "Actions ($1)", + "massaction-view-task-matchers": "Matchers ($1)", + "massaction-view-task-targets": "Targets ($1)", + "massaction-view-task-save-all": "Save All", + "massaction-view-task-target-identifier": "Identifier", + "massaction-view-task-target-name": "Name", + "massaction-view-task-target-state": "State", + "massaction-view-task-target-save": "Save" } diff --git a/i18n/qqq.json b/i18n/qqq.json index 856145a..53b2535 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -29,5 +29,23 @@ "massaction-regexreplace-desc": "Description for the action that replaces the following regex pattern", "massaction-titleregexmatcher-desc": "Description for the matcher that matches the following regex pattern in titles. Parameters:\n* $1 - the regex pattern that is being matched", "massaction-titleregexmatcher-enabled": "Label for whether or not the matcher for title regex is enabled", - "massaction-titleregexmatcher-label": "Label for the title regex matcher" + "massaction-titleregexmatcher-label": "Label for the title regex matcher", + "massaction-task-id": "Placeholder for task id", + "massaction-view-task-submit": "Text displayed in submit button", + "massaction-view-task-title": "Title for page displaing tasks", + "massaction-view-task-no-tasks": "Text displayed when no tasks can be displayed for given id. Parameters:\n* $1 - given task id", + "massaction-view-task-id": "Title for page displaying task with given id. Parameters:\n* $1 - given task id", + "massaction-view-task-summary": "Text that shows summary of task. Parameters:\n* $1 - task summary", + "massaction-view-task-user": "Text that shows user of task. Parameters:\n* $1 - task user name", + "massaction-view-task-target-type": "Text that shows target type of task. Parameters:\n* $1 - task target type", + "massaction-view-task-date-created": "Text that shows creation date of task. Parameters:\n* $ - task creation date", + "massaction-view-task-state": "Text that shows state of task. Parameters:\n* $1 - task state", + "massaction-view-task-actions": "Title for actions with their count. Parameters:\n* $1 - actions count", + "massaction-view-task-matchers": "Title for matchers with their count. Parameters:\n* $1 - matchers count", + "massaction-view-task-targets": "Title for targets with their count. Parameters:\n* $1 - targets count", + "massaction-view-task-save-all": "Text that shows in submit button for saving all targets changes", + "massaction-view-task-target-identifier": "Text that shows in table heading for target identifier", + "massaction-view-task-target-name": "Text that shows in table heading for target name", + "massaction-view-task-target-state": "Text that shows in table heading for target state", + "massaction-view-task-target-save": "Text that shows in submit button for saving target changes" } diff --git a/src/MassActionSpecialPage.php b/src/MassActionSpecialPage.php index ece1dc1..5556c11 100644 --- a/src/MassActionSpecialPage.php +++ b/src/MassActionSpecialPage.php @@ -84,11 +84,11 @@ $formDescriptor = array( 'viewid' =>
[MediaWiki-commits] [Gerrit] analytics...deploy[master]: Use -e instead of -d for checking for deploy dir, in case it...
Ottomata has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395807 ) Change subject: Use -e instead of -d for checking for deploy dir, in case it is a symlink .. Use -e instead of -d for checking for deploy dir, in case it is a symlink Change-Id: I4793c4c648b78cb120c242efacb2fe3fe14c1e28 --- M create_virtualenv.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Ottomata: Verified; Looks good to me, approved diff --git a/create_virtualenv.sh b/create_virtualenv.sh index 6ff9b30..b7c75b1 100755 --- a/create_virtualenv.sh +++ b/create_virtualenv.sh @@ -3,7 +3,7 @@ wheels_dir=$deploy_dir/artifacts/$dist # Default deploy directory, should exist in production. -if [ -d /srv/deployment/analytics/superset ]; then +if [ -e /srv/deployment/analytics/superset ]; then venv=/srv/deployment/analytics/superset/venv # Else just use ../superset-venv for testing. else -- To view, visit https://gerrit.wikimedia.org/r/395807 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4793c4c648b78cb120c242efacb2fe3fe14c1e28 Gerrit-PatchSet: 1 Gerrit-Project: analytics/superset/deploy Gerrit-Branch: master Gerrit-Owner: OttomataGerrit-Reviewer: Ottomata ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Bump versionCode.
Dbrant has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395816 ) Change subject: Bump versionCode. .. Bump versionCode. Actually bump it by a few numbers, to make room for possible updates for APKs that are specific to API <19. Change-Id: I89c3a0d60d4a063713fb8464c8b5096f4a1ec691 --- M app/build.gradle 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/16/395816/1 diff --git a/app/build.gradle b/app/build.gradle index e6f4d2e..a3be82a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -55,7 +55,7 @@ applicationId 'org.wikipedia' minSdkVersion 19 targetSdkVersion 26 -versionCode 208 +versionCode 220 testApplicationId 'org.wikipedia.test' testInstrumentationRunner 'org.wikipedia.test.AndroidTestRunner' vectorDrawables.useSupportLibrary = true -- To view, visit https://gerrit.wikimedia.org/r/395816 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I89c3a0d60d4a063713fb8464c8b5096f4a1ec691 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Dbrant___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Document entity storage on wiki pages.
Daniel Kinzler has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395815 ) Change subject: Document entity storage on wiki pages. .. Document entity storage on wiki pages. This clarifies the relationship between entity revisions and page revisions, among other things. Change-Id: If6d1b62a1acd39491f377c83f68eb3f7788a46cb --- A docs/entity-storage.wiki M lib/includes/Store/EntityRevision.php M repo/includes/Content/EntityContent.php M repo/includes/Store/Sql/WikiPageEntityStore.php M repo/includes/Store/WikiPageEntityStorePermissionChecker.php 5 files changed, 55 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/15/395815/1 diff --git a/docs/entity-storage.wiki b/docs/entity-storage.wiki new file mode 100644 index 000..6d26ce9 --- /dev/null +++ b/docs/entity-storage.wiki @@ -0,0 +1,34 @@ +This page describes how wikibase entities are represented and stored inside MediaWiki. + + +== Storage == + +Entities (or more precisely, entity description documents) are stored as MediaWiki page content, serialized according to JSON binding of the Wikibase data model. The JSON structure encodes an EntityDocument, EntityContent and EntityHandler provide the necessary glue to allow MediaWIki to handle EntityDocument as page content. + +In order to store entities on wiki pages, a mapping between entity IDs and page titles is required. In the simplest case, the entity ID is used as the page title directly, with the appropriate namespace prefix. For this purpose, and entity type is associated with a namespace. Since entity IDs encode the entity type, this in principle allows multiple entity types to share the same namespace. However, support for multiple entity types sharing the same namespace directly is currently not implemented,at least not for top-level entities (see below for details). + +In some cases, it may be desirable to store multiple entities on the same page - conceptually, this may be interpreted as a top-level entity containing several sub-entities (or "inner" entities) which are similar to the idea of sections in MediaWiki. Just as with sections, the ID of such an inner entity has to contain the ID of the parent (top level) entity, so it can be used as an address for finding the inner entity in the database. + +This implies that the relationship between entity IDs and page titles is unique only in one direction: each entity ID is associated with a single page, but multiple entity IDs can map to the same page (or sections of the same page, depending on interpretation). The same is true for the relationship between entity types and mediaWiki namespaces. + + +== Enumeration == + +As a consequence of the above principles, efficient enumeration of all entity IDs can be achieved by enumerating all titles in a namespace, but this is only possible for top-level entities. In order to enumerate sub-entities contained within top-level entities, it may be required to load each top-level entity. + + +== Redirects == + +Some entity types may support redirects. A MediaWiki redirect from one page title to another shall be interpreted as the two entity IDs referring to the same entity (indeed, the same entity as well as the same entity description). The titles of redirect pages correspond to secondary IDs of the entity, while the title of the page that actually contains the entity description corresponds to the canonical entity ID. The entity description will typically only contain the canonical ID. + + +== Versioning == + +Wikibase supports the concepts of versioning through EntityRevisions. These roughly correspond to MediaWiki page revisions, with one notable difference: the revision ID is considered to be unique only relative to a given entity ID, not globally, as in MediaWiki. + +In particular, updating a single sub-entity will create a new revision of the page that contains that sub-entity. This implies that it also creates a new revision for every other entity contained on that page, including the top level entity. These "incidental" entity revisions correspond to the concept of "null revisions" in MediaWiki: between the new revision and its parent, only the (sub-)entities touched by the intentional edit change; all other entities on the page remain unchanged between the old and the new revision. + + +== Permissions == + +The permission to perform actions on entities are mapped to MediaWiki page permissions by an EntityPermissionChecker. This means that the same permissions apply to all entities on a page, and page protection (restrictions) aso apply to all entities. However, the same operation (like changing a label) can be mapped to different actions for different entity types (e.g. item-term and property-term), which in effect allows permissions and restrictions to be managed per entity type on a page (but
[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[wmf/1.31.0-wmf.11]: dispatch: track how long client selecting takes
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395786 ) Change subject: dispatch: track how long client selecting takes .. dispatch: track how long client selecting takes Change-Id: I84b674841396ecbe9e1f58bf1ebb9ff25a60ec0c --- M repo/maintenance/dispatchChanges.php 1 file changed, 7 insertions(+), 2 deletions(-) Approvals: Hoo man: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/maintenance/dispatchChanges.php b/repo/maintenance/dispatchChanges.php index d296672..0f88637 100644 --- a/repo/maintenance/dispatchChanges.php +++ b/repo/maintenance/dispatchChanges.php @@ -258,12 +258,17 @@ } $wikiState = null; - $runStartTime = microtime( true ); + $passStartTime = microtime( true ); $c++; try { $this->trace( "Picking a client wiki..." ); + $selectClientStartTime = microtime( true ); $wikiState = $dispatcher->selectClient(); + $stats->timing( + 'wikibase.repo.dispatchChanges.selectClient-time', + ( microtime( true ) - $selectClientStartTime ) * 1000 + ); if ( $wikiState ) { $dispatchedChanges = $dispatcher->dispatchTo( $wikiState ); @@ -299,7 +304,7 @@ } $t = ( microtime( true ) - $startTime ); - $stats->timing( 'wikibase.repo.dispatchChanges.pass-time', ( microtime( true ) - $runStartTime ) * 1000 ); + $stats->timing( 'wikibase.repo.dispatchChanges.pass-time', ( microtime( true ) - $passStartTime ) * 1000 ); } $stats->timing( 'wikibase.repo.dispatchChanges.execute-time', $t * 1000 ); -- To view, visit https://gerrit.wikimedia.org/r/395786 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I84b674841396ecbe9e1f58bf1ebb9ff25a60ec0c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: wmf/1.31.0-wmf.11 Gerrit-Owner: AddshoreGerrit-Reviewer: Hoo man 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...Cargo[master]: Fixes for display of main Cargo CSS, JS
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395813 ) Change subject: Fixes for display of main Cargo CSS, JS .. Fixes for display of main Cargo CSS, JS Change-Id: Iaceb32d40cfdec9d6b66046bf3f1891c3404b137 --- M Cargo.php M extension.json M formats/CargoTableFormat.php 3 files changed, 2 insertions(+), 4 deletions(-) Approvals: Yaron Koren: Looks good to me, approved jenkins-bot: Verified diff --git a/Cargo.php b/Cargo.php index 5ccba75..4e92ccf 100644 --- a/Cargo.php +++ b/Cargo.php @@ -177,7 +177,6 @@ 'show', 'hide' ), - 'position' => 'top', 'localBasePath' => __DIR__, 'remoteExtPath' => 'Cargo' ), diff --git a/extension.json b/extension.json index 5a0debe..a503672 100644 --- a/extension.json +++ b/extension.json @@ -119,8 +119,7 @@ "messages": [ "show", "hide" - ], - "position": "top" + ] }, "ext.cargo.recreatedata": { "scripts": [ diff --git a/formats/CargoTableFormat.php b/formats/CargoTableFormat.php index b21628f..37f8fdf 100644 --- a/formats/CargoTableFormat.php +++ b/formats/CargoTableFormat.php @@ -59,7 +59,7 @@ * @return string HTML */ function display( $valuesTable, $formattedValuesTable, $fieldDescriptions, $displayParams ) { - $this->mOutput->addModuleStyles( 'ext.cargo.main' ); + $this->mOutput->addModules( 'ext.cargo.main' ); $mergeSimilarCells = false; if ( array_key_exists( 'merge similar cells', $displayParams ) ) { -- To view, visit https://gerrit.wikimedia.org/r/395813 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iaceb32d40cfdec9d6b66046bf3f1891c3404b137 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Cargo Gerrit-Branch: master Gerrit-Owner: Yaron KorenGerrit-Reviewer: Yaron Koren 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...Cargo[master]: Fixes for display of main Cargo CSS, JS
Yaron Koren has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395813 ) Change subject: Fixes for display of main Cargo CSS, JS .. Fixes for display of main Cargo CSS, JS Change-Id: Iaceb32d40cfdec9d6b66046bf3f1891c3404b137 --- M Cargo.php M extension.json M formats/CargoTableFormat.php 3 files changed, 2 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo refs/changes/13/395813/2 diff --git a/Cargo.php b/Cargo.php index 5ccba75..4e92ccf 100644 --- a/Cargo.php +++ b/Cargo.php @@ -177,7 +177,6 @@ 'show', 'hide' ), - 'position' => 'top', 'localBasePath' => __DIR__, 'remoteExtPath' => 'Cargo' ), diff --git a/extension.json b/extension.json index 5a0debe..a503672 100644 --- a/extension.json +++ b/extension.json @@ -119,8 +119,7 @@ "messages": [ "show", "hide" - ], - "position": "top" + ] }, "ext.cargo.recreatedata": { "scripts": [ diff --git a/formats/CargoTableFormat.php b/formats/CargoTableFormat.php index b21628f..37f8fdf 100644 --- a/formats/CargoTableFormat.php +++ b/formats/CargoTableFormat.php @@ -59,7 +59,7 @@ * @return string HTML */ function display( $valuesTable, $formattedValuesTable, $fieldDescriptions, $displayParams ) { - $this->mOutput->addModuleStyles( 'ext.cargo.main' ); + $this->mOutput->addModules( 'ext.cargo.main' ); $mergeSimilarCells = false; if ( array_key_exists( 'merge similar cells', $displayParams ) ) { -- To view, visit https://gerrit.wikimedia.org/r/395813 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaceb32d40cfdec9d6b66046bf3f1891c3404b137 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Cargo Gerrit-Branch: master Gerrit-Owner: Yaron KorenGerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Adding dhcpd entriesf or db111[12]
Cmjohnson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395814 ) Change subject: Adding dhcpd entriesf or db111[12] .. Adding dhcpd entriesf or db111[12] Change-Id: Ic4ddc31f54da319d6ff93014eeda8677c7c7d2a1 --- M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 1 file changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/14/395814/1 diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 index 79b6a87..6d9e9f1 100644 --- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -1298,6 +1298,16 @@ fixed-address db1110.eqiad.wmnet; } +host db { +hardware ethernet 80:18:44:DF:D4:D0; +fixed-address db.eqiad.wmnet; +} + +host db1112 { +hardware ethernet 80:18:44:DF:D2:14; +fixed-address db1112.eqiad.wmnet; +} + host db2011 { hardware ethernet 78:2b:cb:66:aa:3e; fixed-address db2011.codfw.wmnet; -- To view, visit https://gerrit.wikimedia.org/r/395814 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic4ddc31f54da319d6ff93014eeda8677c7c7d2a1 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Cmjohnson___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[wmf/1.31.0-wmf.10]: dispatch: track how long client selecting takes
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395785 ) Change subject: dispatch: track how long client selecting takes .. dispatch: track how long client selecting takes Change-Id: I84b674841396ecbe9e1f58bf1ebb9ff25a60ec0c --- M repo/maintenance/dispatchChanges.php 1 file changed, 7 insertions(+), 2 deletions(-) Approvals: Hoo man: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/maintenance/dispatchChanges.php b/repo/maintenance/dispatchChanges.php index 973ffa2..212c27f 100644 --- a/repo/maintenance/dispatchChanges.php +++ b/repo/maintenance/dispatchChanges.php @@ -261,12 +261,17 @@ } $wikiState = null; - $runStartTime = microtime( true ); + $passStartTime = microtime( true ); $c++; try { $this->trace( "Picking a client wiki..." ); + $selectClientStartTime = microtime( true ); $wikiState = $dispatcher->selectClient(); + $stats->timing( + 'wikibase.repo.dispatchChanges.selectClient-time', + ( microtime( true ) - $selectClientStartTime ) * 1000 + ); if ( $wikiState ) { $dispatchedChanges = $dispatcher->dispatchTo( $wikiState ); @@ -302,7 +307,7 @@ } $t = ( microtime( true ) - $startTime ); - $stats->timing( 'wikibase.repo.dispatchChanges.pass-time', ( microtime( true ) - $runStartTime ) * 1000 ); + $stats->timing( 'wikibase.repo.dispatchChanges.pass-time', ( microtime( true ) - $passStartTime ) * 1000 ); } $stats->timing( 'wikibase.repo.dispatchChanges.execute-time', $t * 1000 ); -- To view, visit https://gerrit.wikimedia.org/r/395785 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I84b674841396ecbe9e1f58bf1ebb9ff25a60ec0c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: wmf/1.31.0-wmf.10 Gerrit-Owner: AddshoreGerrit-Reviewer: Hoo man 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...jobqueue-deploy[master]: Update change-propagation to 62f7bf2
Mobrovac has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395812 ) Change subject: Update change-propagation to 62f7bf2 .. Update change-propagation to 62f7bf2 List of changes: 24d675e Fixed eslint-related dependencies e20fb17 Fixed unhandledRejection in metadata refresh 62f7bf2 Dedupe based on sha1 as well as on event ID xxx Update node module dependencies Change-Id: I246a873010bb652a4fa68f8bbc1f2e045f9e0bff --- M node_modules/abbrev/LICENSE M node_modules/abbrev/package.json M node_modules/aproba/index.js M node_modules/aproba/package.json C node_modules/are-we-there-yet/node_modules/isarray/.npmignore C node_modules/are-we-there-yet/node_modules/isarray/.travis.yml C node_modules/are-we-there-yet/node_modules/isarray/Makefile C node_modules/are-we-there-yet/node_modules/isarray/component.json C node_modules/are-we-there-yet/node_modules/isarray/index.js A node_modules/are-we-there-yet/node_modules/isarray/package.json C node_modules/are-we-there-yet/node_modules/isarray/test.js C node_modules/are-we-there-yet/node_modules/readable-stream/.npmignore C node_modules/are-we-there-yet/node_modules/readable-stream/.travis.yml C node_modules/are-we-there-yet/node_modules/readable-stream/LICENSE C node_modules/are-we-there-yet/node_modules/readable-stream/duplex-browser.js C node_modules/are-we-there-yet/node_modules/readable-stream/duplex.js C node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_duplex.js C node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_passthrough.js A node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_readable.js C node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_transform.js A node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_writable.js A node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/BufferList.js C node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/destroy.js C node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/stream-browser.js C node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/stream.js A node_modules/are-we-there-yet/node_modules/readable-stream/package.json C node_modules/are-we-there-yet/node_modules/readable-stream/passthrough.js C node_modules/are-we-there-yet/node_modules/readable-stream/readable-browser.js C node_modules/are-we-there-yet/node_modules/readable-stream/readable.js C node_modules/are-we-there-yet/node_modules/readable-stream/transform.js C node_modules/are-we-there-yet/node_modules/readable-stream/writable-browser.js C node_modules/are-we-there-yet/node_modules/readable-stream/writable.js C node_modules/are-we-there-yet/node_modules/string_decoder/.npmignore C node_modules/are-we-there-yet/node_modules/string_decoder/LICENSE C node_modules/are-we-there-yet/node_modules/string_decoder/lib/string_decoder.js A node_modules/are-we-there-yet/node_modules/string_decoder/package.json M node_modules/are-we-there-yet/package.json M node_modules/block-stream/package.json M node_modules/console-control-strings/package.json M node_modules/debug/component.json R node_modules/debug/node_modules/ms/index.js A node_modules/debug/node_modules/ms/package.json M node_modules/debug/package.json A node_modules/debug/src/inspector-log.js M node_modules/debug/src/node.js M node_modules/deep-extend/package.json M node_modules/delegates/package.json M node_modules/fs.realpath/package.json M node_modules/fstream-ignore/package.json M node_modules/fstream/package.json M node_modules/gauge/package.json M node_modules/gc-stats/.travis.yml M node_modules/gc-stats/appveyor.yml D node_modules/gc-stats/build/gcstats/v1.0.2/Release/node-v48-linux-x64/gcstats.node A node_modules/gc-stats/build/gcstats/v1.1.0/Release/node-v48-linux-x64/gcstats.node D node_modules/gc-stats/node_modules/.bin/mkdirp D node_modules/gc-stats/node_modules/.bin/uuid D node_modules/gc-stats/node_modules/ajv/.tonic_example.js D node_modules/gc-stats/node_modules/ajv/LICENSE D node_modules/gc-stats/node_modules/ajv/dist/ajv.bundle.js D node_modules/gc-stats/node_modules/ajv/dist/ajv.min.js D node_modules/gc-stats/node_modules/ajv/dist/ajv.min.js.map D node_modules/gc-stats/node_modules/ajv/dist/nodent.min.js D node_modules/gc-stats/node_modules/ajv/dist/regenerator.min.js D node_modules/gc-stats/node_modules/ajv/lib/ajv.d.ts D node_modules/gc-stats/node_modules/ajv/lib/ajv.js D node_modules/gc-stats/node_modules/ajv/lib/async.js D node_modules/gc-stats/node_modules/ajv/lib/cache.js D node_modules/gc-stats/node_modules/ajv/lib/compile/_rules.js D node_modules/gc-stats/node_modules/ajv/lib/compile/equal.js D node_modules/gc-stats/node_modules/ajv/lib/compile/formats.js D node_modules/gc-stats/node_modules/ajv/lib/compile/index.js D
[MediaWiki-commits] [Gerrit] mediawiki...jobqueue-deploy[master]: Update change-propagation to 62f7bf2
Ppchelko has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395812 ) Change subject: Update change-propagation to 62f7bf2 .. Update change-propagation to 62f7bf2 List of changes: 24d675e Fixed eslint-related dependencies e20fb17 Fixed unhandledRejection in metadata refresh 62f7bf2 Dedupe based on sha1 as well as on event ID xxx Update node module dependencies Change-Id: I246a873010bb652a4fa68f8bbc1f2e045f9e0bff --- M node_modules/abbrev/LICENSE M node_modules/abbrev/package.json M node_modules/aproba/index.js M node_modules/aproba/package.json C node_modules/are-we-there-yet/node_modules/isarray/.npmignore C node_modules/are-we-there-yet/node_modules/isarray/.travis.yml C node_modules/are-we-there-yet/node_modules/isarray/Makefile C node_modules/are-we-there-yet/node_modules/isarray/component.json C node_modules/are-we-there-yet/node_modules/isarray/index.js A node_modules/are-we-there-yet/node_modules/isarray/package.json C node_modules/are-we-there-yet/node_modules/isarray/test.js C node_modules/are-we-there-yet/node_modules/readable-stream/.npmignore C node_modules/are-we-there-yet/node_modules/readable-stream/.travis.yml C node_modules/are-we-there-yet/node_modules/readable-stream/LICENSE C node_modules/are-we-there-yet/node_modules/readable-stream/duplex-browser.js C node_modules/are-we-there-yet/node_modules/readable-stream/duplex.js C node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_duplex.js C node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_passthrough.js A node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_readable.js C node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_transform.js A node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_writable.js A node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/BufferList.js C node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/destroy.js C node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/stream-browser.js C node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/stream.js A node_modules/are-we-there-yet/node_modules/readable-stream/package.json C node_modules/are-we-there-yet/node_modules/readable-stream/passthrough.js C node_modules/are-we-there-yet/node_modules/readable-stream/readable-browser.js C node_modules/are-we-there-yet/node_modules/readable-stream/readable.js C node_modules/are-we-there-yet/node_modules/readable-stream/transform.js C node_modules/are-we-there-yet/node_modules/readable-stream/writable-browser.js C node_modules/are-we-there-yet/node_modules/readable-stream/writable.js C node_modules/are-we-there-yet/node_modules/string_decoder/.npmignore C node_modules/are-we-there-yet/node_modules/string_decoder/LICENSE C node_modules/are-we-there-yet/node_modules/string_decoder/lib/string_decoder.js A node_modules/are-we-there-yet/node_modules/string_decoder/package.json M node_modules/are-we-there-yet/package.json M node_modules/block-stream/package.json M node_modules/console-control-strings/package.json M node_modules/debug/component.json R node_modules/debug/node_modules/ms/index.js A node_modules/debug/node_modules/ms/package.json M node_modules/debug/package.json A node_modules/debug/src/inspector-log.js M node_modules/debug/src/node.js M node_modules/deep-extend/package.json M node_modules/delegates/package.json M node_modules/fs.realpath/package.json M node_modules/fstream-ignore/package.json M node_modules/fstream/package.json M node_modules/gauge/package.json M node_modules/gc-stats/.travis.yml M node_modules/gc-stats/appveyor.yml D node_modules/gc-stats/build/gcstats/v1.0.2/Release/node-v48-linux-x64/gcstats.node A node_modules/gc-stats/build/gcstats/v1.1.0/Release/node-v48-linux-x64/gcstats.node D node_modules/gc-stats/node_modules/.bin/mkdirp D node_modules/gc-stats/node_modules/.bin/uuid D node_modules/gc-stats/node_modules/ajv/.tonic_example.js D node_modules/gc-stats/node_modules/ajv/LICENSE D node_modules/gc-stats/node_modules/ajv/dist/ajv.bundle.js D node_modules/gc-stats/node_modules/ajv/dist/ajv.min.js D node_modules/gc-stats/node_modules/ajv/dist/ajv.min.js.map D node_modules/gc-stats/node_modules/ajv/dist/nodent.min.js D node_modules/gc-stats/node_modules/ajv/dist/regenerator.min.js D node_modules/gc-stats/node_modules/ajv/lib/ajv.d.ts D node_modules/gc-stats/node_modules/ajv/lib/ajv.js D node_modules/gc-stats/node_modules/ajv/lib/async.js D node_modules/gc-stats/node_modules/ajv/lib/cache.js D node_modules/gc-stats/node_modules/ajv/lib/compile/_rules.js D node_modules/gc-stats/node_modules/ajv/lib/compile/equal.js D node_modules/gc-stats/node_modules/ajv/lib/compile/formats.js D node_modules/gc-stats/node_modules/ajv/lib/compile/index.js D node_modules/gc-stats/node_modules/ajv/lib/compile/resolve.js D
[MediaWiki-commits] [Gerrit] mediawiki...Cargo[master]: New query param, 'max display chars'
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395805 ) Change subject: New query param, 'max display chars' .. New query param, 'max display chars' Change-Id: Ib7cb0d8bfae7c1fbbb3fff2869580137470708aa --- M includes/CargoQueryDisplayer.php M specials/CargoTables.php 2 files changed, 14 insertions(+), 15 deletions(-) Approvals: Yaron Koren: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/CargoQueryDisplayer.php b/includes/CargoQueryDisplayer.php index 7ca23ab..b5e384d 100644 --- a/includes/CargoQueryDisplayer.php +++ b/includes/CargoQueryDisplayer.php @@ -155,6 +155,14 @@ } else { $text = self::formatFieldValue( $value, $fieldType, $fieldDescription, $this->mParser ); } + + if ( array_key_exists( 'max display chars', $this->mDisplayParams ) && ( $fieldType == 'Text' || $fieldType == 'Wikitext' ) ) { + $maxDisplayChars = $this->mDisplayParams['max display chars']; + if ( strlen( $text ) > $maxDisplayChars && strlen( strip_tags( $text ) ) > $maxDisplayChars ) { + $text = '' . $text . ''; + } + } + if ( $text != '' ) { $formattedQueryResults[$rowNum][$fieldName] = $text; } diff --git a/specials/CargoTables.php b/specials/CargoTables.php index 5ad69ac..9fef7fd 100644 --- a/specials/CargoTables.php +++ b/specials/CargoTables.php @@ -176,22 +176,13 @@ $queryResults = $sqlQuery->run(); - $queryDisplayer = CargoQueryDisplayer::newFromSQLQuery( $sqlQuery ); - $formattedQueryResults = $queryDisplayer->getFormattedQueryResults( $queryResults ); - - // Modify values to minimize cells that have more than a - // certain number of characters, to make the table more - // readable. - $maxChars = 300; - foreach ( $formattedQueryResults as $rowNum => $row ) { - foreach ( $row as $colNum => $value ) { - if ( strlen( $value ) > $maxChars && strlen( strip_tags( $value ) ) > $maxChars ) { - $formattedQueryResults[$rowNum][$colNum] = '' . $value . ''; - } - } - } - $displayParams = array(); + $displayParams['max display chars'] = 300; + + + $queryDisplayer = CargoQueryDisplayer::newFromSQLQuery( $sqlQuery ); + $queryDisplayer->mDisplayParams = $displayParams; + $formattedQueryResults = $queryDisplayer->getFormattedQueryResults( $queryResults ); $tableFormat = new CargoTableFormat( $this->getOutput() ); $text = $tableFormat->display( $queryResults, $formattedQueryResults, -- To view, visit https://gerrit.wikimedia.org/r/395805 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib7cb0d8bfae7c1fbbb3fff2869580137470708aa Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Cargo Gerrit-Branch: master Gerrit-Owner: Yaron KorenGerrit-Reviewer: Yaron Koren 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...ORES[master]: Join decomposition of ores_model table
Ladsgroup has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395811 ) Change subject: Join decomposition of ores_model table .. Join decomposition of ores_model table It improves performance Bug: T181334 Change-Id: I39ef26b8d69a0d0dbb69086b7e732f50df8d5dd0 --- M extension.json M includes/ApiQueryORES.php M includes/Hooks.php M includes/Hooks/ApiHooksHandler.php A includes/Storage/HashModelLookup.php M includes/WatchedItemQueryServiceExtension.php M tests/phpunit/includes/Hooks/ChangesListHooksHandlerTest.php M tests/phpunit/includes/Hooks/ContributionsHookHandlerTest.php 8 files changed, 122 insertions(+), 75 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ORES refs/changes/11/395811/1 diff --git a/extension.json b/extension.json index 0310457..9d349aa 100644 --- a/extension.json +++ b/extension.json @@ -20,6 +20,7 @@ "ORES\\Range": "includes/Range.php", "ORES\\Scoring": "includes/Scoring.php", "ORES\\ThresholdLookup": "includes/ThresholdLookup.php", + "ORES\\Storage\\HashModelLookup": "includes/Storage/HashModelLookup.php", "ORES\\Storage\\ModelLookup": "includes/Storage/ModelLookup.php", "ORES\\Storage\\SqlModelLookup": "includes/Storage/SqlModelLookup.php", "ORES\\ApiQueryORES": "includes/ApiQueryORES.php", diff --git a/includes/ApiQueryORES.php b/includes/ApiQueryORES.php index 12b4764..10c8057 100644 --- a/includes/ApiQueryORES.php +++ b/includes/ApiQueryORES.php @@ -19,6 +19,7 @@ use ApiResult; use ApiQuery; use ApiQueryBase; +use MediaWiki\MediaWikiServices; /** * A query action to return meta information about ORES models and @@ -50,14 +51,12 @@ ApiResult::setArrayType( $data['models'], 'assoc' ); ApiResult::setIndexedTagName( $data['namespaces'], 'ns' ); - $this->addTables( 'ores_model' ); - $this->addFields( [ 'oresm_name', 'oresm_version', 'oresm_is_current' ] ); - $this->addWhere( [ 'oresm_is_current' => 1 ] ); - $res = $this->select( __METHOD__ ); + $models = MediaWikiServices::getInstance()->getService( 'ORESModelLookup' ) + ->getModels(); - foreach ( $res as $row ) { - $data['models'][$row->oresm_name] = [ - 'version' => $row->oresm_version, + foreach ( $models as $modelName => $modelData ) { + $data['models'][$modelName] = [ + 'version' => $modelData['version'], ]; } diff --git a/includes/Hooks.php b/includes/Hooks.php index cdb8c59..a24c0cd 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -356,17 +356,15 @@ ); } - $tables["ores_${type}_mdl"] = 'ores_model'; + $modelId = MediaWikiServices::getInstance()->getService( 'ORESModelLookup' )->getModelId( + $type + ); $tables["ores_${type}_cls"] = 'ores_classification'; $fields["ores_${type}_score"] = "ores_${type}_cls.oresc_probability"; - $join_conds["ores_${type}_mdl"] = [ 'LEFT JOIN', [ - "ores_${type}_mdl.oresm_is_current" => 1, - "ores_${type}_mdl.oresm_name" => $type, - ] ]; $join_conds["ores_${type}_cls"] = [ 'LEFT JOIN', [ - "ores_${type}_cls.oresc_model = ores_${type}_mdl.oresm_id", + "ores_${type}_cls.oresc_model = ${modelId}", "$revIdField = ores_${type}_cls.oresc_rev", "ores_${type}_cls.oresc_class" => 1 ] ]; diff --git a/includes/Hooks/ApiHooksHandler.php b/includes/Hooks/ApiHooksHandler.php index 87d2f63..9a6ee57 100644 --- a/includes/Hooks/ApiHooksHandler.php +++ b/includes/Hooks/ApiHooksHandler.php @@ -30,6 +30,7 @@ use DeferredUpdates; use JobQueueGroup; use MediaWiki\Logger\LoggerFactory; +use MediaWiki\MediaWikiServices; use ORES\Cache; use ORES\FetchScoreJob; use ORES\Hooks; @@ -137,7 +138,6 @@ $threshold = Hooks::getThreshold( 'damaging', $module->getUser(), $module->getTitle() ); $dbr = \wfGetDB( DB_REPLICA ); - $tables[] = 'ores_model'; $tables[] = 'ores_classification'; if ( isset( $show['oresreview'] ) ) { @@ -158,11 +158,10 @@ ], $dbr::LIST_OR ); } - $joinConds['ores_model'] = [ $join, - 'oresm_name = ' . $dbr->addQuotes( 'damaging' ) . ' AND oresm_is_current = 1' - ]; +
[MediaWiki-commits] [Gerrit] marvin[master]: Chore: rename PageResolver
Niedzielski has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395810 ) Change subject: Chore: rename PageResolver .. Chore: rename PageResolver • Rename PageResolver from verb to noun, RequestPageModule. • Use request / response instead of get or import to indicate that a module is requested, the request may fail, and the implementation may not be via import. Use page instead of name to match Route.page() naming. • Move RequestPageModule to the top of the file since the type is used quite near the top. • Add typing to requestPageModuleChunk since it otherwise returns a Promise and it's also top-level (although not exported). Change-Id: I6983d1610fc7bf1744770e205aa74370e0288100 --- M docs/development.md M src/common/router/router.test.ts M src/common/router/router.ts 3 files changed, 20 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/10/395810/1 diff --git a/docs/development.md b/docs/development.md index 3a4863f..9bba644 100644 --- a/docs/development.md +++ b/docs/development.md @@ -176,6 +176,8 @@ - Static constants should be written in `SHOUTING_SNAKE_CASE`. All other variables should be written in `camelCase`. - Preact components should be written in PascalCase. +- Functions should be verbs like `request` or `get`, not `requester` or + `getter`. ### CSS diff --git a/src/common/router/router.test.ts b/src/common/router/router.test.ts index 58a1f1e..b301a69 100644 --- a/src/common/router/router.test.ts +++ b/src/common/router/router.test.ts @@ -39,7 +39,7 @@ // eslint-disable-next-line max-len it("throws redirect errors up for handling on the server/client environment", done => { // Page module that throws a redirect - const page: PageModule= { + const module: PageModule = { default: { getInitialProps() { // Trick TS and eslint for tests @@ -50,9 +50,9 @@ } }; - const getPage = (name: string) => -name === "redirect" - ? Promise.resolve(page) + const requestPageModule = (page: string) => +page === "redirect" + ? Promise.resolve(module) : Promise.reject(new Error("No page found")); const routes = [ @@ -62,7 +62,7 @@ }) ]; - newRouter(routes, getPage) + newRouter(routes, requestPageModule) .route("/redirect") .catch(err => { assert.ok( diff --git a/src/common/router/router.ts b/src/common/router/router.ts index c4b8f45..f208e5b 100644 --- a/src/common/router/router.ts +++ b/src/common/router/router.ts @@ -18,6 +18,10 @@ props: Props; } +interface RequestPageModule { + (name: string): Promise >; +} + function getInitialProps ( module: PageComponent , params: Params @@ -29,18 +33,20 @@ /** * Imports a page module from common/pages/* and names the chunk pages/* so that - * the router can tell the server the name of the chunks to preload + * the router can tell the server the name of the chunks to preload. + * @param {string} page The page chunk basename with no extension. Corresponds + * to Route.page. */ -function getChunk(name: string) { - return import(/* webpackChunkName: "pages/[request]" */ `../pages/${name}`); +function requestPageModuleChunk(page: string): Promise > { + return import(/* webpackChunkName: "pages/[request]" */ `../pages/${page}`); } function respond ( - getPage: PageResolver, + requestPageModule: RequestPageModule, route: Route, params: Params ): Promise { - return getPage(route.page).then(module => + return requestPageModule(route.page).then(module => getInitialProps( module.default, params @@ -67,20 +73,16 @@ }; } -interface PageResolver { - (name: string): Promise >; -} - export const newRouter = ( routes: AnyRoute[], - getPage: PageResolver = getChunk + requestPageModule: RequestPageModule = requestPageModuleChunk ) => { return { route(path: string): Promise { for (const route of routes) { const params = route.toParams(path); if (params) { - return respond(getPage, route, params).catch(respondError); + return respond(requestPageModule, route, params).catch(respondError); } } return Promise.resolve({ -- To view, visit https://gerrit.wikimedia.org/r/395810 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6983d1610fc7bf1744770e205aa74370e0288100 Gerrit-PatchSet: 1 Gerrit-Project: marvin Gerrit-Branch: master Gerrit-Owner: Niedzielski Gerrit-Reviewer: Sniedzielski
[MediaWiki-commits] [Gerrit] mediawiki...Cargo[master]: New query param, 'max display chars'
Yaron Koren has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395805 ) Change subject: New query param, 'max display chars' .. New query param, 'max display chars' Change-Id: Ib7cb0d8bfae7c1fbbb3fff2869580137470708aa --- M includes/CargoQueryDisplayer.php M specials/CargoTables.php 2 files changed, 14 insertions(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo refs/changes/05/395805/2 diff --git a/includes/CargoQueryDisplayer.php b/includes/CargoQueryDisplayer.php index 7ca23ab..b5e384d 100644 --- a/includes/CargoQueryDisplayer.php +++ b/includes/CargoQueryDisplayer.php @@ -155,6 +155,14 @@ } else { $text = self::formatFieldValue( $value, $fieldType, $fieldDescription, $this->mParser ); } + + if ( array_key_exists( 'max display chars', $this->mDisplayParams ) && ( $fieldType == 'Text' || $fieldType == 'Wikitext' ) ) { + $maxDisplayChars = $this->mDisplayParams['max display chars']; + if ( strlen( $text ) > $maxDisplayChars && strlen( strip_tags( $text ) ) > $maxDisplayChars ) { + $text = '' . $text . ''; + } + } + if ( $text != '' ) { $formattedQueryResults[$rowNum][$fieldName] = $text; } diff --git a/specials/CargoTables.php b/specials/CargoTables.php index 5ad69ac..9fef7fd 100644 --- a/specials/CargoTables.php +++ b/specials/CargoTables.php @@ -176,22 +176,13 @@ $queryResults = $sqlQuery->run(); - $queryDisplayer = CargoQueryDisplayer::newFromSQLQuery( $sqlQuery ); - $formattedQueryResults = $queryDisplayer->getFormattedQueryResults( $queryResults ); - - // Modify values to minimize cells that have more than a - // certain number of characters, to make the table more - // readable. - $maxChars = 300; - foreach ( $formattedQueryResults as $rowNum => $row ) { - foreach ( $row as $colNum => $value ) { - if ( strlen( $value ) > $maxChars && strlen( strip_tags( $value ) ) > $maxChars ) { - $formattedQueryResults[$rowNum][$colNum] = '' . $value . ''; - } - } - } - $displayParams = array(); + $displayParams['max display chars'] = 300; + + + $queryDisplayer = CargoQueryDisplayer::newFromSQLQuery( $sqlQuery ); + $queryDisplayer->mDisplayParams = $displayParams; + $formattedQueryResults = $queryDisplayer->getFormattedQueryResults( $queryResults ); $tableFormat = new CargoTableFormat( $this->getOutput() ); $text = $tableFormat->display( $queryResults, $formattedQueryResults, -- To view, visit https://gerrit.wikimedia.org/r/395805 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib7cb0d8bfae7c1fbbb3fff2869580137470708aa Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Cargo Gerrit-Branch: master Gerrit-Owner: Yaron KorenGerrit-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]: Make lockmanager-fail-openlock more helpful
Freddy2001 has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395809 ) Change subject: Make lockmanager-fail-openlock more helpful .. Make lockmanager-fail-openlock more helpful Message lockmanager-fail-openlock was unhelpful and should be more descriptive/helpful to help users to solve the problem. T181453 Task at Google Code-in: https://codein.withgoogle.com/dashboard/tasks/4977199914418176/ Change-Id: I36b1580f0b28868e28eafa04ba32376d8f17370d --- M languages/i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/09/395809/1 diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 7254b92..c166196 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -1711,7 +1711,7 @@ "lockmanager-fail-closelock": "Could not close lock file for \"$1\".", "lockmanager-fail-deletelock": "Could not delete lock file for \"$1\".", "lockmanager-fail-acquirelock": "Could not acquire lock for \"$1\".", - "lockmanager-fail-openlock": "Could not open lock file for \"$1\".", + "lockmanager-fail-openlock": "Could not open lock file for \"$1\". Make sure your upload directory is configured correctly and your web server has permission to write to that directory. See https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgUploadDirectory for more information.", "lockmanager-fail-releaselock": "Could not release lock for \"$1\".", "lockmanager-fail-db-bucket": "Could not contact enough lock databases in bucket $1.", "lockmanager-fail-db-release": "Could not release locks on database $1.", -- To view, visit https://gerrit.wikimedia.org/r/395809 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I36b1580f0b28868e28eafa04ba32376d8f17370d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Freddy2001___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: [WIP] Add DatePicker on on-this-day full screen
Sharvaniharan has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395808 ) Change subject: [WIP] Add DatePicker on on-this-day full screen .. [WIP] Add DatePicker on on-this-day full screen - Date Picker has been added - Todo: resolve SSLHandshakeException Bug: T180372 Change-Id: I8f7569eec17779b6d72b0665938e0f2ac28ff496 --- M app/src/main/java/org/wikipedia/feed/onthisday/OnThisDayFragment.java A app/src/main/java/org/wikipedia/views/DatePickerFragment.java 2 files changed, 61 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/08/395808/1 diff --git a/app/src/main/java/org/wikipedia/feed/onthisday/OnThisDayFragment.java b/app/src/main/java/org/wikipedia/feed/onthisday/OnThisDayFragment.java index 948fcac..3222672 100644 --- a/app/src/main/java/org/wikipedia/feed/onthisday/OnThisDayFragment.java +++ b/app/src/main/java/org/wikipedia/feed/onthisday/OnThisDayFragment.java @@ -14,6 +14,7 @@ import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.Toolbar; +import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -29,6 +30,7 @@ import org.wikipedia.util.DimenUtil; import org.wikipedia.util.ResourceUtil; import org.wikipedia.util.log.L; +import org.wikipedia.views.DatePickerFragment; import org.wikipedia.views.DontInterceptTouchListener; import org.wikipedia.views.HeaderMarginItemDecoration; import org.wikipedia.views.MarginItemDecoration; @@ -39,6 +41,7 @@ import butterknife.BindView; import butterknife.ButterKnife; +import butterknife.OnClick; import butterknife.Unbinder; import retrofit2.Call; import retrofit2.Callback; @@ -46,7 +49,7 @@ import static org.wikipedia.feed.onthisday.OnThisDayActivity.AGE; -public class OnThisDayFragment extends Fragment { +public class OnThisDayFragment extends Fragment implements DatePickerFragment.Callback{ @BindView(R.id.day) TextView dayText; @BindView(R.id.collapsing_toolbar_layout) CollapsingToolbarLayout collapsingToolbarLayout; @BindView(R.id.day_info_text_view) TextView dayInfoTextView; @@ -210,6 +213,21 @@ recycler.setClipToPadding(false); } +@Override +public void onDatePicked(int year, int month, int day) { +eventsRecycler.setVisibility(View.GONE); +progressBar.setVisibility(View.VISIBLE); +date.set(year, month, day, 0, 0); +requestEvents(month, day); +} + +@OnClick(R.id.calendar) +public void onCalendarClicked() { +DatePickerFragment newFragment = new DatePickerFragment(); +newFragment.setCallback(OnThisDayFragment.this); +newFragment.show(getFragmentManager(), "date picker"); +} + private class RecyclerAdapter extends RecyclerView.Adapter { private static final int VIEW_TYPE_ITEM = 0; private static final int VIEW_TYPE_FOOTER = 1; diff --git a/app/src/main/java/org/wikipedia/views/DatePickerFragment.java b/app/src/main/java/org/wikipedia/views/DatePickerFragment.java new file mode 100644 index 000..6b2d1fc --- /dev/null +++ b/app/src/main/java/org/wikipedia/views/DatePickerFragment.java @@ -0,0 +1,42 @@ +package org.wikipedia.views; + +import android.app.DatePickerDialog; +import android.app.Dialog; +import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.v4.app.DialogFragment; +import android.widget.DatePicker; + +import org.wikipedia.R; + +import java.util.Calendar; + +public class DatePickerFragment extends DialogFragment { +public interface Callback { +void onDatePicked(int year, int month, int day); +} +private Callback callback; +@Override +@NonNull +public Dialog onCreateDialog(Bundle savedInstanceState) { +final Calendar c = Calendar.getInstance(); +int year = c.get(Calendar.YEAR); +int month = c.get(Calendar.MONTH); +int day = c.get(Calendar.DAY_OF_MONTH); +DatePickerDialog datePickerDialog = new DatePickerDialog(getActivity(), R.style.DialogLight, dateSetListener, year, month, day); +datePickerDialog.setCanceledOnTouchOutside(true); +return datePickerDialog; +} +private DatePickerDialog.OnDateSetListener dateSetListener = +new DatePickerDialog.OnDateSetListener() { +public void onDateSet(DatePicker view, int year, int month, int day) { +if (callback != null) { +callback.onDatePicked(year, month, day); +} +} +}; +public void setCallback(Callback callback) { +this.callback = callback; +} +} + -- To view, visit https://gerrit.wikimedia.org/r/395808 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType:
[MediaWiki-commits] [Gerrit] analytics...deploy[master]: Use -e instead of -d for checking for deploy dir, in case it...
Ottomata has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395807 ) Change subject: Use -e instead of -d for checking for deploy dir, in case it is a symlink .. Use -e instead of -d for checking for deploy dir, in case it is a symlink Change-Id: I4793c4c648b78cb120c242efacb2fe3fe14c1e28 --- M create_virtualenv.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/superset/deploy refs/changes/07/395807/1 diff --git a/create_virtualenv.sh b/create_virtualenv.sh index 6ff9b30..b7c75b1 100755 --- a/create_virtualenv.sh +++ b/create_virtualenv.sh @@ -3,7 +3,7 @@ wheels_dir=$deploy_dir/artifacts/$dist # Default deploy directory, should exist in production. -if [ -d /srv/deployment/analytics/superset ]; then +if [ -e /srv/deployment/analytics/superset ]; then venv=/srv/deployment/analytics/superset/venv # Else just use ../superset-venv for testing. else -- To view, visit https://gerrit.wikimedia.org/r/395807 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4793c4c648b78cb120c242efacb2fe3fe14c1e28 Gerrit-PatchSet: 1 Gerrit-Project: analytics/superset/deploy Gerrit-Branch: master Gerrit-Owner: Ottomata___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits