[MediaWiki-commits] [Gerrit] mediawiki...RSS[master]: Don't use deprecated Article interface.
jenkins-bot has submitted this change and it was merged. Change subject: Don't use deprecated Article interface. .. Don't use deprecated Article interface. Bug: T145735 Change-Id: I2bb703ff2262ae0dd0296a29d3461d0673f23b4c --- M RSSParser.php 1 file changed, 9 insertions(+), 2 deletions(-) Approvals: Florianschmidtwelzow: Looks good to me, approved jenkins-bot: Verified diff --git a/RSSParser.php b/RSSParser.php index 405802c..5d5759d 100644 --- a/RSSParser.php +++ b/RSSParser.php @@ -103,8 +103,15 @@ if ( isset( $args['template'] ) ) { $itemTemplateTitleObject = Title::newFromText( $args['template'], NS_TEMPLATE ); - $itemTemplateArticleObject = new Article( $itemTemplateTitleObject, 0 ); - $this->itemTemplate = $itemTemplateArticleObject->fetchContent(); + + if ( $itemTemplateTitleObject->exists() ) { + $itemTemplatePageObject = WikiPage::factory( $itemTemplateTitleObject ); + $itemTemplateContentObject = $itemTemplatePageObject->getContent(); + + if ( $itemTemplateContentObject instanceof TextContent ) { + $this->itemTemplate = $itemTemplateContentObject->getNativeData(); + } + } } else { if ( isset( $args['templatename'] ) ) { $feedTemplatePagename = $args['templatename']; -- To view, visit https://gerrit.wikimedia.org/r/311470 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2bb703ff2262ae0dd0296a29d3461d0673f23b4c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/RSS Gerrit-Branch: master Gerrit-Owner: Daniel KinzlerGerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Reedy Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Fix moderation controller
jenkins-bot has submitted this change and it was merged. Change subject: Fix moderation controller .. Fix moderation controller The change to use DeferredUpdates had a missing use. Change-Id: Ied72608c9b3aa597627aa5ea069c257f506c3c1b --- M includes/controller/ModerationController.php 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/controller/ModerationController.php b/includes/controller/ModerationController.php index 0c45357..27241b4 100644 --- a/includes/controller/ModerationController.php +++ b/includes/controller/ModerationController.php @@ -24,12 +24,12 @@ $affectedUserIds = $notificationMapper->fetchUsersWithNotificationsForEvents( $eventIds ); $eventMapper->toggleDeleted( $eventIds, $moderate ); - DeferredUpdates::addCallableUpdate( function () { - // This udate runs after than main transaction round commits. - // Wait for the events deletions to be propagated to replica DBs + DeferredUpdates::addCallableUpdate( function () use ( $affectedUserIds ) { + // This update runs after the main transaction round commits. + // Wait for the event deletions to be propagated to replica DBs $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory(); $lbFactory->waitForReplication( [ 'timeout' => 5 ] ); - $lbFactory->flushReplicaSnapshots( __METHOD__ ); + $lbFactory->flushReplicaSnapshots( 'EchoModerationController::moderate' ); // Recompute the notification count for the // users whose notifications have been moderated. foreach ( $affectedUserIds as $userId ) { -- To view, visit https://gerrit.wikimedia.org/r/311653 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ied72608c9b3aa597627aa5ea069c257f506c3c1b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: MattflaschenGerrit-Reviewer: Aaron Schulz Gerrit-Reviewer: Catrope Gerrit-Reviewer: Sbisson 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...Echo[master]: Fix moderation controller
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/311653 Change subject: Fix moderation controller .. Fix moderation controller The change to use DeferredUpdates had a missing use. Change-Id: Ied72608c9b3aa597627aa5ea069c257f506c3c1b --- M includes/controller/ModerationController.php 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/53/311653/1 diff --git a/includes/controller/ModerationController.php b/includes/controller/ModerationController.php index 0c45357..27241b4 100644 --- a/includes/controller/ModerationController.php +++ b/includes/controller/ModerationController.php @@ -24,12 +24,12 @@ $affectedUserIds = $notificationMapper->fetchUsersWithNotificationsForEvents( $eventIds ); $eventMapper->toggleDeleted( $eventIds, $moderate ); - DeferredUpdates::addCallableUpdate( function () { - // This udate runs after than main transaction round commits. - // Wait for the events deletions to be propagated to replica DBs + DeferredUpdates::addCallableUpdate( function () use ( $affectedUserIds ) { + // This update runs after the main transaction round commits. + // Wait for the event deletions to be propagated to replica DBs $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory(); $lbFactory->waitForReplication( [ 'timeout' => 5 ] ); - $lbFactory->flushReplicaSnapshots( __METHOD__ ); + $lbFactory->flushReplicaSnapshots( 'EchoModerationController::moderate' ); // Recompute the notification count for the // users whose notifications have been moderated. foreach ( $affectedUserIds as $userId ) { -- To view, visit https://gerrit.wikimedia.org/r/311653 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ied72608c9b3aa597627aa5ea069c257f506c3c1b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Mattflaschen___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Clean up === false comparisons
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/311651 Change subject: Clean up === false comparisons .. Clean up === false comparisons Change-Id: Ib56fba798e6ebeba4879201890c038251089e32f --- M includes/Hooks.php 1 file changed, 12 insertions(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ORES refs/changes/51/311651/1 diff --git a/includes/Hooks.php b/includes/Hooks.php index 5729887..fee726d 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -83,7 +83,7 @@ * @return bool */ public static function onChangesListSpecialPageFilters( ChangesListSpecialPage $clsp, &$filters ) { - if ( self::oresEnabled( $clsp->getUser() ) === false ) { + if ( !self::oresEnabled( $clsp->getUser() ) ) { return true; } @@ -125,7 +125,7 @@ array &$query_options, array &$join_conds, FormOptions $opts ) { global $wgUser; - if ( self::oresEnabled( $wgUser ) === false ) { + if ( !self::oresEnabled( $wgUser ) ) { return true; } @@ -181,7 +181,7 @@ public static function onEnhancedChangesListModifyLineData( EnhancedChangesList $ecl, array &$data, array $block, RCCacheEntry $rcObj, array &$classes ) { - if ( self::oresEnabled( $ecl->getUser() ) === false ) { + if ( !self::oresEnabled( $ecl->getUser() ) ) { return true; } @@ -201,7 +201,7 @@ public static function onEnhancedChangesListModifyBlockLineData( EnhancedChangesList $ecl, array &$data, RCCacheEntry $rcObj ) { - if ( self::oresEnabled( $ecl->getUser() ) === false ) { + if ( !self::oresEnabled( $ecl->getUser() ) ) { return true; } @@ -224,7 +224,7 @@ public static function onOldChangesListRecentChangesLine( ChangesList &$changesList, &$s, $rc, &$classes = [] ) { - if ( self::oresEnabled( $changesList->getUser() ) === false ) { + if ( !self::oresEnabled( $changesList->getUser() ) ) { return true; } @@ -250,7 +250,7 @@ * @param array $query */ public static function onContribsGetQueryInfo( ContribsPager $pager, &$query ) { - if ( self::oresEnabled( $pager->getUser() ) === false ) { + if ( !self::oresEnabled( $pager->getUser() ) ) { return true; } @@ -292,7 +292,7 @@ public static function onSpecialContributionsFormatRowFlags( RequestContext $context, $row, array &$flags ) { - if ( self::oresEnabled( $context->getUser() ) === false ) { + if ( !self::oresEnabled( $context->getUser() ) ) { return true; } @@ -310,7 +310,7 @@ public static function onContributionsLineEnding( ContribsPager $pager, &$ret, $row, array &$classes ) { - if ( self::oresEnabled( $pager->getUser() ) === false ) { + if ( !self::oresEnabled( $pager->getUser() ) ) { return true; } @@ -331,7 +331,7 @@ public static function onSpecialContributionsGetFormFilters( SpecialContributions $page, array &$filters ) { - if ( self::oresEnabled( $page->getUser() ) === false ) { + if ( !self::oresEnabled( $page->getUser() ) ) { return true; } @@ -402,7 +402,7 @@ public static function onGetPreferences( $user, &$preferences ) { global $wgOresDamagingThresholds; - if ( self::oresEnabled( $user ) === false ) { + if ( !self::oresEnabled( $user ) ) { return true; } @@ -440,7 +440,7 @@ * Add CSS styles to output page */ public static function onBeforePageDisplay( OutputPage &$out, Skin &$skin ) { - if ( self::oresEnabled( $out->getUser() ) === false ) { + if ( !self::oresEnabled( $out->getUser() ) ) { return true; } $out->addModuleStyles( 'ext.ores.styles' ); @@ -472,10 +472,7 @@ * @return bool */ private static function oresEnabled( User $user ) { - if ( BetaFeatures::isFeatureEnabled( $user, 'ores-enabled' ) ) { - return true; - } - return false; + return BetaFeatures::isFeatureEnabled( $user, 'ores-enabled' ); } /** -- To view, visit
[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: [WIP] Refactor and simplify changeslist/contribs queries a bit
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/311652 Change subject: [WIP] Refactor and simplify changeslist/contribs queries a bit .. [WIP] Refactor and simplify changeslist/contribs queries a bit Change-Id: Ic19ad7dd2ca10bdfab48a95c7deb1247dc655d47 --- M includes/Hooks.php 1 file changed, 20 insertions(+), 34 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ORES refs/changes/52/311652/1 diff --git a/includes/Hooks.php b/includes/Hooks.php index fee726d..ffa8ad3 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -132,32 +132,25 @@ $threshold = self::getDamagingThreshold( $wgUser ); $dbr = \wfGetDB( DB_REPLICA ); - $tables[] = 'ores_classification'; $tables[] = 'ores_model'; + $tables[] = 'ores_classification'; $fields[] = 'oresc_probability'; // Add user-based threshold $fields[] = $dbr->addQuotes( $threshold ) . ' AS ores_threshold'; - $conds[] = '(oresm_name = ' . $dbr->addQuotes( 'damaging' ) . - ' OR oresm_name IS NULL)'; + $join_conds['ores_model'] = [ 'LEFT JOIN', [ + 'oresm_is_current' => 1, + 'oresm_name' => 'damaging' + ] ]; + $join_conds['ores_classification'] = [ 'LEFT JOIN', [ + 'oresc_model = oresm_id', + 'rc_this_oldid = oresc_rev', + 'oresc_class' => 1 + ] ]; - $conds[] = '(oresm_is_current != 0 OR oresm_is_current IS NULL)'; - - $join_conds['ores_classification'] = [ 'LEFT JOIN', - 'rc_this_oldid = oresc_rev ' . - 'AND oresc_class = 1' ]; - - $join_conds['ores_model'] = [ 'LEFT JOIN', - 'oresc_model = oresm_id ' . - 'AND oresm_is_current = 1' - ]; if ( self::isModelEnabled( 'damaging' ) && $opts->getValue( 'hidenondamaging' ) ) { - // Override the join conditions. - $join_conds['ores_classification'] = [ 'INNER JOIN', - 'rc_this_oldid = oresc_rev ' . - 'AND oresc_class = 1' ]; // Filter out non-damaging edits. $conds[] = 'oresc_probability > ' @@ -257,32 +250,25 @@ $threshold = self::getDamagingThreshold( $pager->getUser() ); $dbr = \wfGetDB( DB_REPLICA ); - $query['tables'][] = 'ores_classification'; $query['tables'][] = 'ores_model'; + $query['tables'][] = 'ores_classification'; $query['fields'][] = 'oresc_probability'; // Add user-based threshold $query['fields'][] = $dbr->addQuotes( $threshold ) . ' AS ores_threshold'; - $query['conds'][] = '(oresm_name = ' . $dbr->addQuotes( 'damaging' ) . - ' OR oresm_name IS NULL)'; + $query['join_conds']['ores_model'] = [ 'LEFT JOIN', [ + 'oresm_is_current' => 1, + 'oresm_name' => 'damaging', + ] ]; - $query['conds'][] = '(oresm_is_current != 0 OR oresm_is_current IS NULL)'; - - $query['join_conds']['ores_classification'] = [ 'LEFT JOIN', - 'rev_id = oresc_rev ' . - 'AND oresc_class = 1' ]; - - $query['join_conds']['ores_model'] = [ 'LEFT JOIN', - 'oresc_model = oresm_id ' . - 'AND oresm_is_current = 1' ]; + $query['join_conds']['ores_classification'] = [ 'LEFT JOIN', [ + 'oresc_model = oresm_id', + 'rev_id = oresc_rev', + 'oresc_class' => 1 + ]; if ( self::isModelEnabled( 'damaging' ) && $pager->getContext()->getRequest()->getVal( 'hidenondamaging' ) ) { - // Override the join conditions. - $join_conds['ores_classification'] = [ 'INNER JOIN', - 'rc_this_oldid = oresc_rev ' . - 'AND oresc_class = 1' ]; - // Filter out non-damaging edits. $query['conds'][] = 'oresc_probability > ' . $dbr->addQuotes( $threshold ); -- To view, visit https://gerrit.wikimedia.org/r/311652 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic19ad7dd2ca10bdfab48a95c7deb1247dc655d47 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ORES Gerrit-Branch: master
[MediaWiki-commits] [Gerrit] mediawiki...Graph[master]: Restore wordcloud vega plugin
jenkins-bot has submitted this change and it was merged. Change subject: Restore wordcloud vega plugin .. Restore wordcloud vega plugin wordcloud support has been restored in vega by https://github.com/vega/vega/pull/317 Bug: T16 Change-Id: Iffdf231e4bb82b12691d72a7bb1e819767959547 --- M extension.json A lib/d3.layout.cloud.js 2 files changed, 506 insertions(+), 0 deletions(-) Approvals: Yurik: Looks good to me, approved jenkins-bot: Verified diff --git a/extension.json b/extension.json index 028bfee..336b229 100644 --- a/extension.json +++ b/extension.json @@ -70,6 +70,7 @@ "scripts": [ "lib/d3.js", "lib/d3-global.js", + "lib/d3.layout.cloud.js", "lib/vega2/vega.js", "lib/graph2.compiled.js" ], diff --git a/lib/d3.layout.cloud.js b/lib/d3.layout.cloud.js new file mode 100644 index 000..8165a41 --- /dev/null +++ b/lib/d3.layout.cloud.js @@ -0,0 +1,505 @@ +(function(f){if(typeof exports==="object"& module!=="undefined"){module.exports=f()}else if(typeof define==="function"&){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g=(g.d3||(g.d3 = {}));g=(g.layout||(g.layout = {}));g.cloud = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&if(!u&)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&for(var o=0;o> 5, +ch = 1 << 11; + +module.exports = function() { + var size = [256, 256], + text = cloudText, + font = cloudFont, + fontSize = cloudFontSize, + fontStyle = cloudFontNormal, + fontWeight = cloudFontNormal, + rotate = cloudRotate, + padding = cloudPadding, + spiral = archimedeanSpiral, + words = [], + timeInterval = Infinity, + event = dispatch("word", "end"), + timer = null, + random = Math.random, + cloud = {}, + canvas = cloudCanvas; + + cloud.canvas = function(_) { +return arguments.length ? (canvas = functor(_), cloud) : canvas; + }; + + cloud.start = function() { +var contextAndRatio = getContext(canvas()), +board = zeroArray((size[0] >> 5) * size[1]), +bounds = null, +n = words.length, +i = -1, +tags = [], +data = words.map(function(d, i) { + d.text = text.call(this, d, i); + d.font = font.call(this, d, i); + d.style = fontStyle.call(this, d, i); + d.weight = fontWeight.call(this, d, i); + d.rotate = rotate.call(this, d, i); + d.size = ~~fontSize.call(this, d, i); + d.padding = padding.call(this, d, i); + return d; +}).sort(function(a, b) { return b.size - a.size; }); + +if (timer) clearInterval(timer); +timer = setInterval(step, 0); +step(); + +return cloud; + +function step() { + var start = Date.now(); + while (Date.now() - start < timeInterval && ++i < n && timer) { +var d = data[i]; +d.x = (size[0] * (random() + .5)) >> 1; +d.y = (size[1] * (random() + .5)) >> 1; +cloudSprite(contextAndRatio, d, data, i); +if (d.hasText && place(board, d, bounds)) { + tags.push(d); + event.word(d); + if (bounds) cloudBounds(bounds, d); + else bounds = [{x: d.x + d.x0, y: d.y + d.y0}, {x: d.x + d.x1, y: d.y + d.y1}]; + // Temporary hack + d.x -= size[0] >> 1; + d.y -= size[1] >> 1; +} + } + if (i >= n) { +cloud.stop(); +event.end(tags, bounds); + } +} + } + + cloud.stop = function() { +if (timer) { + clearInterval(timer); + timer = null; +} +return cloud; + }; + + function getContext(canvas) { +canvas.width = canvas.height = 1; +var ratio = Math.sqrt(canvas.getContext("2d").getImageData(0, 0, 1, 1).data.length >> 2); +canvas.width = (cw << 5) / ratio; +canvas.height = ch / ratio; + +var context = canvas.getContext("2d"); +context.fillStyle = context.strokeStyle = "red"; +context.textAlign = "center"; + +
[MediaWiki-commits] [Gerrit] mediawiki...cxserver[master]: Update Apertium pairs for Jessie
KartikMistry has uploaded a new change for review. https://gerrit.wikimedia.org/r/311650 Change subject: Update Apertium pairs for Jessie .. Update Apertium pairs for Jessie Also added missing pairs in Beta. New pairs: * an <-> ca * it -> sc * nb <-> da * nb <-> sv * nn <-> sv * se -> nb Bug: T144588 Change-Id: Ie22c2c9d8d6dcdbb9ea2ec7606586f5c7f7ef704 --- M registry.wikimedia.yaml M registry.yaml 2 files changed, 28 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/cxserver refs/changes/50/311650/1 diff --git a/registry.wikimedia.yaml b/registry.wikimedia.yaml index a3076ba..0ef3926 100644 --- a/registry.wikimedia.yaml +++ b/registry.wikimedia.yaml @@ -571,6 +571,7 @@ af: - nl an: + - ca - es ar: - mt @@ -581,6 +582,7 @@ br: - fr ca: + - an - eo - es - fr @@ -628,6 +630,7 @@ it: - ca - es + - sc kk: - tt mk: @@ -637,13 +640,16 @@ - id mt: - ar +nb: + - da + - nn + - sv nl: - af -nb: - - nn nn: - da - nb + - sv oc: - ca - es @@ -653,6 +659,8 @@ - gl ro: - es +se: + - nb sh: - simple - sl @@ -668,6 +676,8 @@ sv: - da - is + - nb + - nn tt: - kk ur: diff --git a/registry.yaml b/registry.yaml index 4f67cad..3778d85 100644 --- a/registry.yaml +++ b/registry.yaml @@ -571,6 +571,7 @@ af: - nl an: + - ca - es ar: - mt @@ -578,10 +579,13 @@ - es bg: - mk +br: + - fr ca: + - an - en - - es - eo + - es - fr - oc - pt @@ -621,6 +625,7 @@ gl: - en - es + - pt - simple hi: - ur @@ -632,6 +637,7 @@ it: - ca - es + - sc kk: - tt mk: @@ -641,13 +647,16 @@ - id mt: - ar +nb: + - da + - nn + - sv nl: - af -nb: - - nn nn: - da - nb + - sv oc: - ca - es @@ -657,6 +666,8 @@ - gl ro: - es +se: + - nb sh: - en - simple @@ -673,6 +684,8 @@ sv: - da - is + - nb + - nn tt: - kk ur: -- To view, visit https://gerrit.wikimedia.org/r/311650 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie22c2c9d8d6dcdbb9ea2ec7606586f5c7f7ef704 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/cxserver Gerrit-Branch: master Gerrit-Owner: KartikMistry___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...cxserver[master]: Add sc->srd mapping for Sardinian
KartikMistry has uploaded a new change for review. https://gerrit.wikimedia.org/r/311649 Change subject: Add sc->srd mapping for Sardinian .. Add sc->srd mapping for Sardinian Change-Id: I345afe65b781d177e6754e29dba6d3ced9f49d37 --- M mt/Apertium.languagenames.json 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/cxserver refs/changes/49/311649/1 diff --git a/mt/Apertium.languagenames.json b/mt/Apertium.languagenames.json index 2a5bd5f..368c66e 100644 --- a/mt/Apertium.languagenames.json +++ b/mt/Apertium.languagenames.json @@ -32,6 +32,7 @@ "oc": "oci", "pt": "por", "ro": "ron", + "sc": "srd", "se": "sme", "sh": "hbs", "simple": "eng", -- To view, visit https://gerrit.wikimedia.org/r/311649 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I345afe65b781d177e6754e29dba6d3ced9f49d37 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/cxserver Gerrit-Branch: master Gerrit-Owner: KartikMistry___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Replace repeated UseMod rewrites in apache config with exist...
Alex Monk has uploaded a new change for review. https://gerrit.wikimedia.org/r/311648 Change subject: Replace repeated UseMod rewrites in apache config with existing include .. Replace repeated UseMod rewrites in apache config with existing include Change-Id: I69b04931029099962c66df32dbf952176dd1e359 --- M modules/mediawiki/files/apache/sites/main.conf M modules/mediawiki/files/apache/sites/remnant.conf 2 files changed, 9 insertions(+), 45 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/48/311648/1 diff --git a/modules/mediawiki/files/apache/sites/main.conf b/modules/mediawiki/files/apache/sites/main.conf index 92d65c2..1516ae9 100644 --- a/modules/mediawiki/files/apache/sites/main.conf +++ b/modules/mediawiki/files/apache/sites/main.conf @@ -34,11 +34,7 @@ Include "sites-enabled/api-rewrites.incl" Include "sites-enabled/public-wiki-rewrites.incl" - -# UseMod compatibility URLs -RewriteCond %{QUERY_STRING} ([^&;]+) -RewriteRule ^/wiki\.cgi$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php?title=%1 [R=301,L] -RewriteRule ^/wiki\.cgi$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php [R=301,L] +Include "sites-enabled/wikimedia-legacy.incl" # Early phase 2 compatibility URLs RewriteRule ^/wiki\.phtml$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php [R=301,L] @@ -134,11 +130,6 @@ Alias /wiki /srv/mediawiki/docroot/wiktionary.org/w/index.php RewriteRule ^/w/$ /w/index.php -# UseMod compatibility URLs -RewriteCond %{QUERY_STRING} ([^&;]+) -RewriteRule ^/wiki\.cgi$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php?title=%1 [R=301,L] -RewriteRule ^/wiki\.cgi$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php [R=301,L] - # Early phase 2 compatibility URLs RewriteRule ^/wiki\.phtml$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php [R=301,L] @@ -146,6 +137,7 @@ Include "sites-enabled/api-rewrites.incl" Include "sites-enabled/public-wiki-rewrites.incl" +Include "sites-enabled/wikimedia-legacy.incl" # Variant aliases Alias /sr /srv/mediawiki/docroot/wiktionary.org/w/index.php @@ -196,11 +188,7 @@ Include "sites-enabled/api-rewrites.incl" Include "sites-enabled/public-wiki-rewrites.incl" - -# UseMod compatibility URLs -RewriteCond %{QUERY_STRING} ([^&;]+) -RewriteRule ^/wiki\.cgi$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php?title=%1 [R=301,L] -RewriteRule ^/wiki\.cgi$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php [R=301,L] +Include "sites-enabled/wikimedia-legacy.incl" # Early phase 2 compatibility URLs RewriteRule ^/wiki\.phtml$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php [R=301,L] @@ -295,11 +283,7 @@ Include "sites-enabled/api-rewrites.incl" Include "sites-enabled/public-wiki-rewrites.incl" - -# UseMod compatibility URLs -RewriteCond %{QUERY_STRING} ([^&;]+) -RewriteRule ^/wiki\.cgi$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php?title=%1 [R=301,L] -RewriteRule ^/wiki\.cgi$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php [R=301,L] +Include "sites-enabled/wikimedia-legacy.incl" # Early phase 2 compatibility URLs RewriteRule ^/wiki\.phtml$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php [R=301,L] @@ -361,11 +345,7 @@ Include "sites-enabled/api-rewrites.incl" Include "sites-enabled/public-wiki-rewrites.incl" - -# UseMod compatibility URLs -RewriteCond %{QUERY_STRING} ([^&;]+) -RewriteRule ^/wiki\.cgi$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php?title=%1 [R=301,L] -RewriteRule ^/wiki\.cgi$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php [R=301,L] +Include "sites-enabled/wikimedia-legacy.incl" # Early phase 2 compatibility URLs RewriteRule ^/wiki\.phtml$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php [R=301,L] @@ -421,11 +401,7 @@ Include "sites-enabled/api-rewrites.incl" Include "sites-enabled/public-wiki-rewrites.incl" - -# UseMod compatibility URLs -RewriteCond %{QUERY_STRING} ([^&;]+) -RewriteRule ^/wiki\.cgi$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php?title=%1 [R=301,L] -RewriteRule ^/wiki\.cgi$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php [R=301,L] +Include "sites-enabled/wikimedia-legacy.incl" # Early phase 2 compatibility URLs RewriteRule ^/wiki\.phtml$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php [R=301,L] @@ -480,11 +456,6 @@ Alias /wiki /srv/mediawiki/docroot/wikinews.org/w/index.php RewriteRule ^/w/$ /w/index.php -# UseMod compatibility URLs -RewriteCond %{QUERY_STRING} ([^&;]+) -RewriteRule ^/wiki\.cgi$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php?title=%1 [R=301,L] -RewriteRule ^/wiki\.cgi$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php [R=301,L] - # Early phase 2 compatibility URLs RewriteRule ^/wiki\.phtml$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php [R=301,L] @@ -492,6 +463,7 @@
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Follow-up Ifa2cc187: Add ShortUrl support on wikimedia.org d...
Alex Monk has uploaded a new change for review. https://gerrit.wikimedia.org/r/311647 Change subject: Follow-up Ifa2cc187: Add ShortUrl support on wikimedia.org docroot sites .. Follow-up Ifa2cc187: Add ShortUrl support on wikimedia.org docroot sites This is almost certainly not the last wiki site without support for it. Bug: T146014 Change-Id: If258a076ea02e26dbe2beac23081246eca8b5a2a --- M modules/mediawiki/templates/apache/sites/wikimedia-common.incl.erb 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/47/311647/1 diff --git a/modules/mediawiki/templates/apache/sites/wikimedia-common.incl.erb b/modules/mediawiki/templates/apache/sites/wikimedia-common.incl.erb index d84d442..36c6ce0 100644 --- a/modules/mediawiki/templates/apache/sites/wikimedia-common.incl.erb +++ b/modules/mediawiki/templates/apache/sites/wikimedia-common.incl.erb @@ -5,6 +5,7 @@ ProxyPass /wiki fcgi://127.0.0.1:9000/srv/mediawiki/docroot/wikimedia.org/w/index.php retry=0 ProxyPass /w/thumb_handler.php fcgi://127.0.0.1:9000/srv/mediawiki/docroot/wikimedia.org/w/thumb_handler.php retry=0 +ProxyPass /s/ fcgi://127.0.0.1:9000/srv/mediawiki/docroot/wikimedia.org/w/index.php ProxyPass /w/extensions! ProxyPassMatch ^/w/(.*\.(php|hh))$ fcgi://127.0.0.1:9000/srv/mediawiki/docroot/wikimedia.org/w/$1 retry=0 RewriteRule ^/$ fcgi://127.0.0.1:9000/srv/mediawiki/docroot/wikimedia.org/w/index.php[P] @@ -12,6 +13,8 @@ RewriteRule ^/favicon\.ico$ fcgi://127.0.0.1:9000/srv/mediawiki/docroot/wikimedia.org/w/favicon.php [P] # /w/wiki.phtml is severely underperforming on HHVM RewriteRule ^/w/wiki.phtml$ /w/index.php [L,QSA,NE] +# ShortURL redirect RT-2121 +RewriteRule ^/s/.*$ /w/index.php # Primary wiki redirector: Alias /wiki /srv/mediawiki/docroot/wikimedia.org/w/index.php -- To view, visit https://gerrit.wikimedia.org/r/311647 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If258a076ea02e26dbe2beac23081246eca8b5a2a Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alex Monk___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Further fix on address merging to support form override
jenkins-bot has submitted this change and it was merged. Change subject: Further fix on address merging to support form override .. Further fix on address merging to support form override Bypass hook on form-merge I tested this againt batch merges by logged in user steps below and confirmed those activate the batch path - create 2 contacts called qw...@wert.com first name & last name = qwert - one contact has a contribution from today and an address that says 'today' - other was 'last year' in both contribution & address - Find & merge duplicate contacts - using a smart group (I created of 'qwerts'). - check the box & do a batch merge of selected contacts - I tried this with both the lower id having the more recent contact & vice versa Bug: T10 Change-Id: I3608f16bc0d21c02408b5774f7db00e094c64f1d --- M sites/all/modules/wmf_civicrm/wmf_civicrm.module 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Eileen: Looks good to me, approved jenkins-bot: Verified diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module b/sites/all/modules/wmf_civicrm/wmf_civicrm.module index 41825e1..21d09d9 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module @@ -2071,6 +2071,7 @@ case 'batch' : case 'form' : +$refs['migration_info']['context'] = $type; CRM_Core_DAO::executeQuery('SET @uniqueID = %1', array(1 => array(uniqid() . CRM_Utils_String::createRandom(CRM_Utils_String::ALPHANUMERIC, 4), 'String'))); if (isset($refs['fields_in_conflict'])){ $wmfCalculatedFields = wmf_civicrm_get_calculated_fields(); @@ -2263,6 +2264,10 @@ */ function wmf_civicrm_civicrm_alterLocationMergeData(&$blocksDAO, $mainId, $otherId, $migrationInfo) { + // If we are dealing with a manual merge do not intervene. + if ($migrationInfo['context'] == 'form') { +return; + } $lastDonor = civicrm_api3('Contribution', 'get', array( 'return' => 'contact_id', 'contact_id' => array('IN' => array($mainId, $otherId)), -- To view, visit https://gerrit.wikimedia.org/r/311646 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3608f16bc0d21c02408b5774f7db00e094c64f1d Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: deployment Gerrit-Owner: EileenGerrit-Reviewer: Eileen Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Further fix on address merging to support form override
Eileen has uploaded a new change for review. https://gerrit.wikimedia.org/r/311646 Change subject: Further fix on address merging to support form override .. Further fix on address merging to support form override Bypass hook on form-merge I tested this againt batch merges by logged in user steps below and confirmed those activate the batch path - create 2 contacts called qw...@wert.com first name & last name = qwert - one contact has a contribution from today and an address that says 'today' - other was 'last year' in both contribution & address - Find & merge duplicate contacts - using a smart group (I created of 'qwerts'). - check the box & do a batch merge of selected contacts - I tried this with both the lower id having the more recent contact & vice versa Bug: T10 Change-Id: I3608f16bc0d21c02408b5774f7db00e094c64f1d --- M sites/all/modules/wmf_civicrm/wmf_civicrm.module 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/46/311646/1 diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module b/sites/all/modules/wmf_civicrm/wmf_civicrm.module index 41825e1..21d09d9 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module @@ -2071,6 +2071,7 @@ case 'batch' : case 'form' : +$refs['migration_info']['context'] = $type; CRM_Core_DAO::executeQuery('SET @uniqueID = %1', array(1 => array(uniqid() . CRM_Utils_String::createRandom(CRM_Utils_String::ALPHANUMERIC, 4), 'String'))); if (isset($refs['fields_in_conflict'])){ $wmfCalculatedFields = wmf_civicrm_get_calculated_fields(); @@ -2263,6 +2264,10 @@ */ function wmf_civicrm_civicrm_alterLocationMergeData(&$blocksDAO, $mainId, $otherId, $migrationInfo) { + // If we are dealing with a manual merge do not intervene. + if ($migrationInfo['context'] == 'form') { +return; + } $lastDonor = civicrm_api3('Contribution', 'get', array( 'return' => 'contact_id', 'contact_id' => array('IN' => array($mainId, $otherId)), -- To view, visit https://gerrit.wikimedia.org/r/311646 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3608f16bc0d21c02408b5774f7db00e094c64f1d Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: deployment Gerrit-Owner: Eileen___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Further fix on address merging to support form override
jenkins-bot has submitted this change and it was merged. Change subject: Further fix on address merging to support form override .. Further fix on address merging to support form override Bypass hook on form-merge I tested this againt batch merges by logged in user steps below and confirmed those activate the batch path - create 2 contacts called qw...@wert.com first name & last name = qwert - one contact has a contribution from today and an address that says 'today' - other was 'last year' in both contribution & address - Find & merge duplicate contacts - using a smart group (I created of 'qwerts'). - check the box & do a batch merge of selected contacts - I tried this with both the lower id having the more recent contact & vice versa Bug: T10 Change-Id: I3608f16bc0d21c02408b5774f7db00e094c64f1d --- M sites/all/modules/wmf_civicrm/wmf_civicrm.module 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Ejegg: Looks good to me, approved jenkins-bot: Verified diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module b/sites/all/modules/wmf_civicrm/wmf_civicrm.module index 41825e1..21d09d9 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module @@ -2071,6 +2071,7 @@ case 'batch' : case 'form' : +$refs['migration_info']['context'] = $type; CRM_Core_DAO::executeQuery('SET @uniqueID = %1', array(1 => array(uniqid() . CRM_Utils_String::createRandom(CRM_Utils_String::ALPHANUMERIC, 4), 'String'))); if (isset($refs['fields_in_conflict'])){ $wmfCalculatedFields = wmf_civicrm_get_calculated_fields(); @@ -2263,6 +2264,10 @@ */ function wmf_civicrm_civicrm_alterLocationMergeData(&$blocksDAO, $mainId, $otherId, $migrationInfo) { + // If we are dealing with a manual merge do not intervene. + if ($migrationInfo['context'] == 'form') { +return; + } $lastDonor = civicrm_api3('Contribution', 'get', array( 'return' => 'contact_id', 'contact_id' => array('IN' => array($mainId, $otherId)), -- To view, visit https://gerrit.wikimedia.org/r/311597 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3608f16bc0d21c02408b5774f7db00e094c64f1d Gerrit-PatchSet: 3 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: EileenGerrit-Reviewer: Awight Gerrit-Reviewer: Cdentinger Gerrit-Reviewer: Eileen Gerrit-Reviewer: Ejegg Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...civicrm[master]: Fix url for batch merge link
Eileen has uploaded a new change for review. https://gerrit.wikimedia.org/r/311645 Change subject: Fix url for batch merge link .. Fix url for batch merge link This is a fix that is upstream but must have regressed when we last merged with upstream due to whitespace discrepancies. Next release we should be able to just have the upstream version Change-Id: Ic00851a1c99b5151997a85a27e259e3d866803cc --- M templates/CRM/Contact/Page/DedupeFind.tpl 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm refs/changes/45/311645/1 diff --git a/templates/CRM/Contact/Page/DedupeFind.tpl b/templates/CRM/Contact/Page/DedupeFind.tpl index cefab17..2811f79 100644 --- a/templates/CRM/Contact/Page/DedupeFind.tpl +++ b/templates/CRM/Contact/Page/DedupeFind.tpl @@ -156,8 +156,8 @@ {capture assign=backURL}{crmURL p="civicrm/contact/dedupemerge" q="`$urlQuery`=map" a=1}{/capture} {ts}Batch Merge Selected Duplicates{/ts} - {capture assign=backURL}{crmURL p="civicrm/contact/dedupefind" q="`$urlQuery`=renew" a=1}{/capture} -{ts}Batch Merge All Duplicates{/ts} +{capture assign=backURL}{crmURL p="civicrm/contact/dedupemerge" q=$urlQuery a=1}{/capture} + {ts}Batch Merge All Duplicates{/ts} {ts}Flip Selected Duplicates{/ts} -- To view, visit https://gerrit.wikimedia.org/r/311645 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic00851a1c99b5151997a85a27e259e3d866803cc Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm/civicrm 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...SemanticForms[master]: Added Balloon.css CSS library
Yaron Koren has submitted this change and it was merged. Change subject: Added Balloon.css CSS library .. Added Balloon.css CSS library Change-Id: Ib11a9b659c7b526ed335179eb93ae57b367db18f --- M README M SemanticForms.php M extension.json A skins/balloon.css 4 files changed, 185 insertions(+), 1 deletion(-) Approvals: Yaron Koren: Looks good to me, approved jenkins-bot: Verified diff --git a/README b/README index 50dfcf0..94c701e 100644 --- a/README +++ b/README @@ -73,5 +73,9 @@ * Select2 (https://select2.github.io) by Igor Vaynberg, distributed under both the Apache and GPL licenses. +It also includes the Balloon.css CSS library +(https://kazzkiq.github.io/balloon.css/) by Claudio Holanda, +distributed under the MIT license. + Semantic Forms also makes extensive use of the jQuery and jQuery UI -JavaScript libraries, included within MediaWiki. +JavaScript libraries, included within MediaWiki. \ No newline at end of file diff --git a/SemanticForms.php b/SemanticForms.php index e9a6ab2..547f774 100644 --- a/SemanticForms.php +++ b/SemanticForms.php @@ -411,6 +411,11 @@ 'htmlform-no', ), ), + 'ext.semanticforms.balloon' => $sfgResourceTemplate + array( + 'styles' => array( + 'skins/balloon.css', + ), + ), 'ext.semanticforms' => $sfgResourceTemplate + array( 'scripts' => array( 'libs/ext.sf.js', diff --git a/extension.json b/extension.json index 0f05319..5b75c87 100644 --- a/extension.json +++ b/extension.json @@ -302,6 +302,11 @@ "htmlform-no" ] }, + "ext.semanticforms.balloon": { + "styles": [ + "skins/balloon.css" + ] + }, "ext.semanticforms": { "scripts": [ "libs/ext.sf.js" diff --git a/skins/balloon.css b/skins/balloon.css new file mode 100644 index 000..dd85c99 --- /dev/null +++ b/skins/balloon.css @@ -0,0 +1,170 @@ +button[data-balloon] { + overflow: visible; +} +[data-balloon] { + position: relative; +} +[data-balloon]:before, +[data-balloon]:after { + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; + filter: alpha(opacity=0); + -khtml-opacity: 0; + -moz-opacity: 0; + opacity: 0; + pointer-events: none; + -webkit-transition: all 0.18s ease-out 0.18s; + transition: all 0.18s ease-out 0.18s; + bottom: 100%; + left: 50%; + position: absolute; + z-index: 10; + -webkit-transform: translate(-50%, 10px); + -ms-transform: translate(-50%, 10px); + transform: translate(-50%, 10px); + -webkit-transform-origin: top; + -ms-transform-origin: top; + transform-origin: top; +} +[data-balloon]:after { + background: rgba(17, 17, 17, 0.9); + border-radius: 4px; + color: #fff; + content: attr(data-balloon); + font-size: 12px; + padding: .5em 1em; + white-space: nowrap; + margin-bottom: 11px; +} +[data-balloon]:before { + background: url('data:image/svg+xml;utf8,http://www.w3.org/2000/svg; width="36px" height="12px">') no-repeat; + background-size: 100% auto; + height: 6px; + width: 18px; + content: ""; + margin-bottom: 5px; +} +[data-balloon]:hover:before, +[data-balloon][data-balloon-visible]:before, +[data-balloon]:hover:after, +[data-balloon][data-balloon-visible]:after { + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; + filter: alpha(opacity=100); + -khtml-opacity: 1; + -moz-opacity: 1; + opacity: 1; + pointer-events: auto; + -webkit-transform: translate(-50%, 0); + -ms-transform: translate(-50%, 0); + transform: translate(-50%, 0); +} +[data-balloon][data-balloon-break]:after { + white-space: normal; +} +[data-balloon-pos="down"]:before, +[data-balloon-pos="down"]:after { + bottom: auto; + left: 50%; + top: 100%; + -webkit-transform: translate(-50%, -10px); + -ms-transform: translate(-50%, -10px); + transform: translate(-50%, -10px); +} +[data-balloon-pos="down"]:after { + margin-top: 11px; +} +[data-balloon-pos="down"]:before { + background: url('data:image/svg+xml;utf8,http://www.w3.org/2000/svg; width="36px" height="12px">') no-repeat; + background-size: 100% auto; + height: 6px; + width: 18px; + margin-top: 5px; + margin-bottom: 0; +} +[data-balloon-pos="down"]:hover:before, +[data-balloon-pos="down"][data-balloon-visible]:before, +[data-balloon-pos="down"]:hover:after, +[data-balloon-pos="down"][data-balloon-visible]:after { + -webkit-transform: translate(-50%, 0); + -ms-transform: translate(-50%, 0); + transform: translate(-50%, 0); +} +[data-balloon-pos="left"]:before, +[data-balloon-pos="left"]:after { + bottom: auto; + left: auto; + right: 100%; + top: 50%; + -webkit-transform: translate(10px, -50%); + -ms-transform:
[MediaWiki-commits] [Gerrit] operations/puppet[production]: labs: Make puppet-enc read from the config file
Yuvipanda has submitted this change and it was merged. Change subject: labs: Make puppet-enc read from the config file .. labs: Make puppet-enc read from the config file Change-Id: I2e2bf176993f22c6c805f8118147f6e961f70655 --- M modules/role/files/labs/puppet-enc.py 1 file changed, 5 insertions(+), 1 deletion(-) Approvals: Yuvipanda: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/role/files/labs/puppet-enc.py b/modules/role/files/labs/puppet-enc.py index 8e29e1d..83b4c49 100644 --- a/modules/role/files/labs/puppet-enc.py +++ b/modules/role/files/labs/puppet-enc.py @@ -43,6 +43,9 @@ print('Invalid hostname', hostname) sys.exit(-1) +with open('/etc/puppet-enc.yaml', encoding='utf-8') as f: +encconfig = yaml.safe_load(f) + with open('/etc/ldap.yaml', encoding='utf-8') as f: ldapconfig = yaml.safe_load(f) @@ -75,7 +78,8 @@ attrs = conn.response[0]['attributes'] classes.update(attrs.get('puppetClass', [])) -url = 'http://localhost:8100/v1/{project}/node/{fqdn}'.format( +url = 'http://{host}:8100/v1/{project}/node/{fqdn}'.format( +host=encconfig['host'], project=hostname.split('.')[1], fqdn=hostname ) -- To view, visit https://gerrit.wikimedia.org/r/311644 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2e2bf176993f22c6c805f8118147f6e961f70655 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: YuvipandaGerrit-Reviewer: Yuvipanda 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]: labs: Make puppet-enc read from the config file
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/311644 Change subject: labs: Make puppet-enc read from the config file .. labs: Make puppet-enc read from the config file Change-Id: I2e2bf176993f22c6c805f8118147f6e961f70655 --- M modules/role/files/labs/puppet-enc.py 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/44/311644/1 diff --git a/modules/role/files/labs/puppet-enc.py b/modules/role/files/labs/puppet-enc.py index 8e29e1d..83b4c49 100644 --- a/modules/role/files/labs/puppet-enc.py +++ b/modules/role/files/labs/puppet-enc.py @@ -43,6 +43,9 @@ print('Invalid hostname', hostname) sys.exit(-1) +with open('/etc/puppet-enc.yaml', encoding='utf-8') as f: +encconfig = yaml.safe_load(f) + with open('/etc/ldap.yaml', encoding='utf-8') as f: ldapconfig = yaml.safe_load(f) @@ -75,7 +78,8 @@ attrs = conn.response[0]['attributes'] classes.update(attrs.get('puppetClass', [])) -url = 'http://localhost:8100/v1/{project}/node/{fqdn}'.format( +url = 'http://{host}:8100/v1/{project}/node/{fqdn}'.format( +host=encconfig['host'], project=hostname.split('.')[1], fqdn=hostname ) -- To view, visit https://gerrit.wikimedia.org/r/311644 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2e2bf176993f22c6c805f8118147f6e961f70655 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: labs: Add config for the puppet enc
Yuvipanda has submitted this change and it was merged. Change subject: labs: Add config for the puppet enc .. labs: Add config for the puppet enc Contains info on the host on which the rest backend lives Change-Id: I56fe1945e10e1771292b2a2305408a105eb92d6d --- M hieradata/codfw/labtest-instances.yaml M hieradata/labs.yaml M modules/role/manifests/labs/puppetmaster.pp 3 files changed, 11 insertions(+), 0 deletions(-) Approvals: Yuvipanda: Looks good to me, approved jenkins-bot: Verified diff --git a/hieradata/codfw/labtest-instances.yaml b/hieradata/codfw/labtest-instances.yaml index 8bc25c7..6f251fc 100644 --- a/hieradata/codfw/labtest-instances.yaml +++ b/hieradata/codfw/labtest-instances.yaml @@ -1,5 +1,6 @@ puppetmaster: "labtestcontrol2001.wikimedia.org" saltmaster: "labtestcontrol2001.wikimedia.org" +labs_puppet_master: "labtestcontrol2001.wikimedia.org" ldap_host: "labtestservices2001.wikimedia.org" labsdnsconfig: diff --git a/hieradata/labs.yaml b/hieradata/labs.yaml index a14f351..8af7c5f 100644 --- a/hieradata/labs.yaml +++ b/hieradata/labs.yaml @@ -118,6 +118,7 @@ nrpe::allowed_hosts: '10.68.16.195' ssh::server::disable_agent_forwarding: false +labs_puppet_master: "labs-puppetmaster-eqiad.wikimedia.org" puppetmaster: "labs-puppetmaster-eqiad.wikimedia.org" saltmaster: "labs-puppetmaster-eqiad.wikimedia.org" mysql::server::use_apparmor: false # The images we have for debian don't support it diff --git a/modules/role/manifests/labs/puppetmaster.pp b/modules/role/manifests/labs/puppetmaster.pp index 90a3f49..d85e09e 100644 --- a/modules/role/manifests/labs/puppetmaster.pp +++ b/modules/role/manifests/labs/puppetmaster.pp @@ -26,6 +26,15 @@ include ldap::yamlcreds +file { '/etc/puppet-enc.yaml': +content => ordered_yaml({ +host => hiera('labs_puppet_master'), +}), +mode=> '0444', +owner => 'root', +group => 'root', +} + file { '/usr/local/bin/puppet-enc': source => 'puppet:///modules/role/labs/puppet-enc.py', mode => '0555', -- To view, visit https://gerrit.wikimedia.org/r/311643 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I56fe1945e10e1771292b2a2305408a105eb92d6d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: YuvipandaGerrit-Reviewer: Yuvipanda 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]: labs: Add config for the puppet enc
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/311643 Change subject: labs: Add config for the puppet enc .. labs: Add config for the puppet enc Contains info on the host on which the rest backend lives Change-Id: I56fe1945e10e1771292b2a2305408a105eb92d6d --- M hieradata/codfw/labtest-instances.yaml M hieradata/labs.yaml M modules/role/manifests/labs/puppetmaster.pp 3 files changed, 11 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/43/311643/1 diff --git a/hieradata/codfw/labtest-instances.yaml b/hieradata/codfw/labtest-instances.yaml index 8bc25c7..6f251fc 100644 --- a/hieradata/codfw/labtest-instances.yaml +++ b/hieradata/codfw/labtest-instances.yaml @@ -1,5 +1,6 @@ puppetmaster: "labtestcontrol2001.wikimedia.org" saltmaster: "labtestcontrol2001.wikimedia.org" +labs_puppet_master: "labtestcontrol2001.wikimedia.org" ldap_host: "labtestservices2001.wikimedia.org" labsdnsconfig: diff --git a/hieradata/labs.yaml b/hieradata/labs.yaml index a14f351..8af7c5f 100644 --- a/hieradata/labs.yaml +++ b/hieradata/labs.yaml @@ -118,6 +118,7 @@ nrpe::allowed_hosts: '10.68.16.195' ssh::server::disable_agent_forwarding: false +labs_puppet_master: "labs-puppetmaster-eqiad.wikimedia.org" puppetmaster: "labs-puppetmaster-eqiad.wikimedia.org" saltmaster: "labs-puppetmaster-eqiad.wikimedia.org" mysql::server::use_apparmor: false # The images we have for debian don't support it diff --git a/modules/role/manifests/labs/puppetmaster.pp b/modules/role/manifests/labs/puppetmaster.pp index 90a3f49..d85e09e 100644 --- a/modules/role/manifests/labs/puppetmaster.pp +++ b/modules/role/manifests/labs/puppetmaster.pp @@ -26,6 +26,15 @@ include ldap::yamlcreds +file { '/etc/puppet-enc.yaml': +content => ordered_yaml({ +host => hiera('labs_puppet_master'), +}), +mode=> '0444', +owner => 'root', +group => 'root', +} + file { '/usr/local/bin/puppet-enc': source => 'puppet:///modules/role/labs/puppet-enc.py', mode => '0555', -- To view, visit https://gerrit.wikimedia.org/r/311643 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I56fe1945e10e1771292b2a2305408a105eb92d6d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...SemanticForms[master]: Added Balloon.css CSS library
Yaron Koren has uploaded a new change for review. https://gerrit.wikimedia.org/r/311642 Change subject: Added Balloon.css CSS library .. Added Balloon.css CSS library Change-Id: Ib11a9b659c7b526ed335179eb93ae57b367db18f --- M README M SemanticForms.php M extension.json 3 files changed, 15 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticForms refs/changes/42/311642/2 diff --git a/README b/README index 50dfcf0..94c701e 100644 --- a/README +++ b/README @@ -73,5 +73,9 @@ * Select2 (https://select2.github.io) by Igor Vaynberg, distributed under both the Apache and GPL licenses. +It also includes the Balloon.css CSS library +(https://kazzkiq.github.io/balloon.css/) by Claudio Holanda, +distributed under the MIT license. + Semantic Forms also makes extensive use of the jQuery and jQuery UI -JavaScript libraries, included within MediaWiki. +JavaScript libraries, included within MediaWiki. \ No newline at end of file diff --git a/SemanticForms.php b/SemanticForms.php index e9a6ab2..547f774 100644 --- a/SemanticForms.php +++ b/SemanticForms.php @@ -411,6 +411,11 @@ 'htmlform-no', ), ), + 'ext.semanticforms.balloon' => $sfgResourceTemplate + array( + 'styles' => array( + 'skins/balloon.css', + ), + ), 'ext.semanticforms' => $sfgResourceTemplate + array( 'scripts' => array( 'libs/ext.sf.js', diff --git a/extension.json b/extension.json index 0f05319..5b75c87 100644 --- a/extension.json +++ b/extension.json @@ -302,6 +302,11 @@ "htmlform-no" ] }, + "ext.semanticforms.balloon": { + "styles": [ + "skins/balloon.css" + ] + }, "ext.semanticforms": { "scripts": [ "libs/ext.sf.js" -- To view, visit https://gerrit.wikimedia.org/r/311642 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib11a9b659c7b526ed335179eb93ae57b367db18f Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/SemanticForms 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]: mail.wikimedia.org cert expires on Thursday 2016-09-22
RobH has uploaded a new change for review. https://gerrit.wikimedia.org/r/311641 Change subject: mail.wikimedia.org cert expires on Thursday 2016-09-22 .. mail.wikimedia.org cert expires on Thursday 2016-09-22 This cert should be pushed into service along with the private key. private key is in private repo as new.mail.wikimedia.org.key replacing the contents of mail.wikimedia.org.key Bug:T144568 Change-Id: I97774fc76af953805a7deddc49abf5aa8325bb8f --- M files/ssl/mail.wikimedia.org.crt 1 file changed, 29 insertions(+), 31 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/41/311641/1 diff --git a/files/ssl/mail.wikimedia.org.crt b/files/ssl/mail.wikimedia.org.crt index 525fe4b..436229b 100644 --- a/files/ssl/mail.wikimedia.org.crt +++ b/files/ssl/mail.wikimedia.org.crt @@ -1,33 +1,31 @@ -BEGIN CERTIFICATE- -MIIFnjCCBIagAwIBAgISESF0Wc8iUHLjme6ek+epUIa9MA0GCSqGSIb3DQEBCwUA -MGYxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMTwwOgYD -VQQDEzNHbG9iYWxTaWduIE9yZ2FuaXphdGlvbiBWYWxpZGF0aW9uIENBIC0gU0hB -MjU2IC0gRzIwHhcNMTUwOTIyMTgwMTEzWhcNMTYwOTIyMTgwMTEzWjB8MQswCQYD -VQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZyYW5j -aXNjbzEjMCEGA1UEChMaV2lraW1lZGlhIEZvdW5kYXRpb24sIEluYy4xGzAZBgNV -BAMTEm1haWwud2lraW1lZGlhLm9yZzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC -AQoCggEBAKGQx0pHDwyOUbCEqSFxUV/33Wz4JxHi1ynljGFpLNIR3OJ+0NR1zBYG -yCsjEnbcof8UhgxCc6u/GAA4A4CGKb1zbfG3xq8ZUyzc6QsOKsgPPiBsN85NRtna -iDN0teDB5HeU+/F1e0QrrYdeEVDp/K3H0pIpoPNncIs3/t3qFdKJzVhZW6Mj1yRG -0RcLoI+uz7pbsJobEUkNYx0Ycx8LYII3gunwwWbq7QwNGYzELhyBAAY/Vm1XMCKM -MJ0pkcbTXoU+04Yo6DC4LjU2Tz1cjJCOmc8ddhPSFOtw7XwOXqgnA8SGxXhKaUiW -xYw7jWzN5D6fSumRoFJ4s8ZfQioEd58CAwEAAaOCAi4wggIqMA4GA1UdDwEB/wQE -AwIFoDBJBgNVHSAEQjBAMD4GBmeBDAECAjA0MDIGCCsGAQUFBwIBFiZodHRwczov -L3d3dy5nbG9iYWxzaWduLmNvbS9yZXBvc2l0b3J5LzB1BgNVHREEbjBsghJtYWls -Lndpa2ltZWRpYS5vcmeCFG14MTAwMS53aWtpbWVkaWEub3JnghRteDEwMDIud2lr -aW1lZGlhLm9yZ4IUbXgyMDAxLndpa2ltZWRpYS5vcmeCFG14MjAwMi53aWtpbWVk -aWEub3JnMAkGA1UdEwQCMAAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMC -MEkGA1UdHwRCMEAwPqA8oDqGOGh0dHA6Ly9jcmwuZ2xvYmFsc2lnbi5jb20vZ3Mv -Z3Nvcmdhbml6YXRpb252YWxzaGEyZzIuY3JsMIGgBggrBgEFBQcBAQSBkzCBkDBN -BggrBgEFBQcwAoZBaHR0cDovL3NlY3VyZS5nbG9iYWxzaWduLmNvbS9jYWNlcnQv -Z3Nvcmdhbml6YXRpb252YWxzaGEyZzJyMS5jcnQwPwYIKwYBBQUHMAGGM2h0dHA6 -Ly9vY3NwMi5nbG9iYWxzaWduLmNvbS9nc29yZ2FuaXphdGlvbnZhbHNoYTJnMjAd -BgNVHQ4EFgQUj485M4wC9Myee9NKPSHdIo9McFYwHwYDVR0jBBgwFoAUlt5h8b0c -FilTHMDMfTuDAEDmGnwwDQYJKoZIhvcNAQELBQADggEBAAl74GQp8Lmuih2t2PlL -AaEwp3W6BIVJYherqMbvA6etMqGxg9KLwPkLCZZoHf55dVDzKST+ZTh3RRGlMfXF -N9TDVAudAdOS8dcpdFRRDfJfdHyoUMnAK7jE+Lhco8VLOKOSeQRXaHsmnkRYbfgN -vBE3UkQTzdVx1Ptf+YUQX3DmSlhyajgJIGidiZOS1pNM526y5fyMm4meYIR3bulz -dqsCOZL9BZTAGOAkWYNytOETB3Lnr2MLk+bV7vXqEtbg9jfTv7RX8lqDuYVeaDoA -G7MrwPCgww3dcWgeKveGnFgjOR/gwee/iEnYyEIkM05sqP+aNQ9W+jJeE6DAM6uC -+nw= +MIIFTTCCBDWgAwIBAgIMAOhVY5Vcimwzo676MA0GCSqGSIb3DQEBCwUAMGYxCzAJ +BgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMTwwOgYDVQQDEzNH +bG9iYWxTaWduIE9yZ2FuaXphdGlvbiBWYWxpZGF0aW9uIENBIC0gU0hBMjU2IC0g +RzIwHhcNMTYwOTIwMDAyNjA0WhcNMTcxMDIzMTgwMTEzWjB8MQswCQYDVQQGEwJV +UzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZyYW5jaXNjbzEj +MCEGA1UEChMaV2lraW1lZGlhIEZvdW5kYXRpb24sIEluYy4xGzAZBgNVBAMTEm1h +aWwud2lraW1lZGlhLm9yZzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB +AMvUhWvscn/OVVP4xFZLnfrcjYGSe2YJ3GqTqgm4QjGif/1gAIge7Q373JaTAFYh +wO+EkAg1LvPRTl9/+NrYG69h/GlAiwj1/Z5iL2ISLGWNbDm2Fj/DS7HpYCE+deE0 +L7/cYiQzEcL6uvDNuXYMpXlexYrbI/dPj/EfYiZ0cPzqrJEWri7jIJ6bU9XLJg+S +/a0/rS1c2NjW3xRwwdRqY894/QzGHtxlYUQuJLEndW112SHtjznC23tAaGrOkX5G +H0t4EA0RZMvegRF6q1DCg2pmfzfO/99GafkFAHxW4MTzXrAaYp24BctfGOOS1JEO +S6VppM/hoBCmMnNvbqGmgjcCAwEAAaOCAeMwggHfMA4GA1UdDwEB/wQEAwIFoDCB +oAYIKwYBBQUHAQEEgZMwgZAwTQYIKwYBBQUHMAKGQWh0dHA6Ly9zZWN1cmUuZ2xv +YmFsc2lnbi5jb20vY2FjZXJ0L2dzb3JnYW5pemF0aW9udmFsc2hhMmcycjEuY3J0 +MD8GCCsGAQUFBzABhjNodHRwOi8vb2NzcDIuZ2xvYmFsc2lnbi5jb20vZ3Nvcmdh +bml6YXRpb252YWxzaGEyZzIwVgYDVR0gBE8wTTBBBgkrBgEEAaAyARQwNDAyBggr +BgEFBQcCARYmaHR0cHM6Ly93d3cuZ2xvYmFsc2lnbi5jb20vcmVwb3NpdG9yeS8w +CAYGZ4EMAQICMAkGA1UdEwQCMAAwSQYDVR0fBEIwQDA+oDygOoY4aHR0cDovL2Ny +bC5nbG9iYWxzaWduLmNvbS9ncy9nc29yZ2FuaXphdGlvbnZhbHNoYTJnMi5jcmww +HQYDVR0RBBYwFIISbWFpbC53aWtpbWVkaWEub3JnMB0GA1UdJQQWMBQGCCsGAQUF +BwMBBggrBgEFBQcDAjAdBgNVHQ4EFgQUWTam7c+w5HlQxiAOEjHiU7LQEdEwHwYD +VR0jBBgwFoAUlt5h8b0cFilTHMDMfTuDAEDmGnwwDQYJKoZIhvcNAQELBQADggEB +AEya+wdisoC5TtjH4mb8NZch6nZ4etWthvGIssDtf6sOmyBdFOPGM5deirKju9wK +eic+UeQM0oTMS+mxUat5qiyk0ji98BFr8zDhQhM8cBkMWdTGB83aKJhOc39d+2SP +YoDPFUzcrMRRIXY2L3GVYgxn+3dK7cvRBXeG9xLSKtaJPB1bIjyKu36BB/edfeyT +JWm6xsDTa1VHdgnEaAKmAmNUXhCesmWiiy9VDOe+jxd1/G7W7VAKKTVE2qEZoOEC +LQdDtrTcjgQztHg+1aY+IXwTtZlPRQ4nrOf7HuNOh+prMKMNFfJfuAotAZ2ZPmOl +aaty4PPE/aaLUw8MJ3rKOYQ= -END CERTIFICATE- -- To view, visit https://gerrit.wikimedia.org/r/311641 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange
[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Merge transclusion and transclusion.core RL modules
jenkins-bot has submitted this change and it was merged. Change subject: Merge transclusion and transclusion.core RL modules .. Merge transclusion and transclusion.core RL modules No real need for separation here. Change-Id: Ic97bb0a049c1c77e3063732911e2b690e8a3a317 --- M extension.json 1 file changed, 4 insertions(+), 17 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/extension.json b/extension.json index 45666c1..88f2bf4 100644 --- a/extension.json +++ b/extension.json @@ -1578,24 +1578,10 @@ "mobile" ] }, - "ext.visualEditor.mwtransclusion.core": { - "scripts": [ - "modules/ve-mw/dm/nodes/ve.dm.MWTransclusionNode.js", - "modules/ve-mw/ce/nodes/ve.ce.MWTransclusionNode.js" - ], - "styles": [ - "modules/ve-mw/ce/styles/nodes/ve.ce.MWTransclusionNode.css" - ], - "dependencies": [ - "ext.visualEditor.mwcore" - ], - "targets": [ - "desktop", - "mobile" - ] - }, "ext.visualEditor.mwtransclusion": { "scripts": [ + "modules/ve-mw/dm/nodes/ve.dm.MWTransclusionNode.js", + "modules/ve-mw/ce/nodes/ve.ce.MWTransclusionNode.js", "modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js", "modules/ve-mw/dm/models/ve.dm.MWTransclusionPartModel.js", "modules/ve-mw/dm/models/ve.dm.MWTransclusionContentModel.js", @@ -1621,6 +1607,7 @@ "modules/ve-mw/ui/contextitems/ve.ui.MWTransclusionContextItem.js" ], "styles": [ + "modules/ve-mw/ce/styles/nodes/ve.ce.MWTransclusionNode.css", "modules/ve-mw/ui/styles/widgets/ve.ui.MWParameterResultWidget.css", "modules/ve-mw/ui/styles/widgets/ve.ui.MWMoreParametersResultWidget.css", "modules/ve-mw/ui/styles/widgets/ve.ui.MWNoParametersResultWidget.css", @@ -1639,7 +1626,7 @@ ] }, "dependencies": [ - "ext.visualEditor.mwtransclusion.core", + "ext.visualEditor.mwcore", "mediawiki.jqueryMsg", "mediawiki.language", "mediawiki.widgets.UserInputWidget" -- To view, visit https://gerrit.wikimedia.org/r/309475 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic97bb0a049c1c77e3063732911e2b690e8a3a317 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: EsandersGerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] oojs/core[master]: core: Improve error message when inheritClass/mixinClass cal...
jenkins-bot has submitted this change and it was merged. Change subject: core: Improve error message when inheritClass/mixinClass called with 'undefined' .. core: Improve error message when inheritClass/mixinClass called with 'undefined' Currently, calling `OO.inheritClass( MyClass, OO.Foo )` (where OO.Foo is undefined because you forgot to specify a dependency) results in a fairly confusing exception like "Right-hand side of 'instanceof' is not an object". I've debugged issues like this at least two times in the past so I think the extra check is worth it. Bug: T145315 Change-Id: I317ddaa50245aeed4a8eaf299dd38808fdd357e0 --- M src/core.js M tests/unit/core.test.js 2 files changed, 16 insertions(+), 1 deletion(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/src/core.js b/src/core.js index 94a3201..933bcad 100644 --- a/src/core.js +++ b/src/core.js @@ -78,8 +78,11 @@ oo.inheritClass = function ( targetFn, originFn ) { var targetConstructor; + if ( !originFn ) { + throw new Error( 'inheritClass: Origin is not a function (actually ' + originFn + ')' ); + } if ( targetFn.prototype instanceof originFn ) { - throw new Error( 'Target already inherits from origin' ); + throw new Error( 'inheritClass: Target already inherits from origin' ); } targetConstructor = targetFn.prototype.constructor; @@ -139,6 +142,10 @@ oo.mixinClass = function ( targetFn, originFn ) { var key; + if ( !originFn ) { + throw new Error( 'mixinClass: Origin is not a function (actually ' + originFn + ')' ); + } + // Copy prototype properties for ( key in originFn.prototype ) { if ( key !== 'constructor' && hasOwn.call( originFn.prototype, key ) ) { diff --git a/tests/unit/core.test.js b/tests/unit/core.test.js index 32fd165..603f5ec 100644 --- a/tests/unit/core.test.js +++ b/tests/unit/core.test.js @@ -81,6 +81,10 @@ oo.inheritClass( Child, Object ); }, 'Throw if target already inherits from source (naturally, Object)' ); + assert.throws( function () { + oo.inheritClass( Child, undefined ); + }, /Origin is not a function/, 'Throw if source is undefined (e.g. due to missing dependency)' ); + enumKeys = []; for ( key in child ) { enumKeys.push( key ); @@ -173,6 +177,10 @@ obj = new Mixer(); assert.strictEqual( obj.protoFunction2(), 'Child', 'method works as expected' ); + + assert.throws( function () { + oo.mixinClass( Mixer, undefined ); + }, /Origin is not a function/, 'Throw if source is undefined (e.g. due to missing dependency)' ); } ); QUnit.test( 'isSubclass', function ( assert ) { -- To view, visit https://gerrit.wikimedia.org/r/309987 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I317ddaa50245aeed4a8eaf299dd38808fdd357e0 Gerrit-PatchSet: 2 Gerrit-Project: oojs/core Gerrit-Branch: master Gerrit-Owner: Bartosz DziewońskiGerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Krinkle 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...VisualEditor[master]: Simplify and fix category popup widget checks
jenkins-bot has submitted this change and it was merged. Change subject: Simplify and fix category popup widget checks .. Simplify and fix category popup widget checks Bug: T86357 Change-Id: I9a85267f6da0077e2167a92f25a8dc41074e6548 --- M modules/ve-mw/ui/widgets/ve.ui.MWCategoryItemWidget.js M modules/ve-mw/ui/widgets/ve.ui.MWCategoryPopupWidget.js M modules/ve-mw/ui/widgets/ve.ui.MWCategoryWidget.js 3 files changed, 4 insertions(+), 44 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWCategoryItemWidget.js b/modules/ve-mw/ui/widgets/ve.ui.MWCategoryItemWidget.js index 1407bef..866ffcb 100644 --- a/modules/ve-mw/ui/widgets/ve.ui.MWCategoryItemWidget.js +++ b/modules/ve-mw/ui/widgets/ve.ui.MWCategoryItemWidget.js @@ -38,11 +38,6 @@ this.isHidden = config.hidden; this.isMissing = config.missing; - // Events - this.$button.on( { - mousedown: this.onMouseDown.bind( this ) - } ); - // Initialization this.setLabel( config.redirectTo || this.value ); if ( config.redirectTo ) { @@ -66,10 +61,6 @@ /* Events */ /** - * @event savePopupState - */ - -/** * @event togglePopupMenu * @param {ve.ui.MWCategoryItemWidget} item Item to load into popup */ @@ -77,25 +68,11 @@ /* Methods */ /** - * Handle mouse down events. - * - * @method - * @param {jQuery.Event} e Mouse down event - * @fires savePopupState on mousedown. - */ -ve.ui.MWCategoryItemWidget.prototype.onMouseDown = function () { - this.emit( 'savePopupState' ); - - // Parent method - return ve.ui.MWCategoryItemWidget.super.prototype.onMouseDown.apply( this, arguments ); -}; - -/** * Handle mouse click events. * * @method * @param {jQuery.Event} e Mouse click event - * @fires togglePopupMenu on mousedown. + * @fires togglePopupMenu on click. */ ve.ui.MWCategoryItemWidget.prototype.onClick = function () { this.emit( 'togglePopupMenu', this ); diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWCategoryPopupWidget.js b/modules/ve-mw/ui/widgets/ve.ui.MWCategoryPopupWidget.js index 1293ec5..2cde3ce 100644 --- a/modules/ve-mw/ui/widgets/ve.ui.MWCategoryPopupWidget.js +++ b/modules/ve-mw/ui/widgets/ve.ui.MWCategoryPopupWidget.js @@ -164,6 +164,7 @@ ve.ui.MWCategoryPopupWidget.prototype.closePopup = function () { this.toggle( false ); this.popupOpen = false; + this.category = null; }; /** diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWCategoryWidget.js b/modules/ve-mw/ui/widgets/ve.ui.MWCategoryWidget.js index c6671d5..05cb30c 100644 --- a/modules/ve-mw/ui/widgets/ve.ui.MWCategoryWidget.js +++ b/modules/ve-mw/ui/widgets/ve.ui.MWCategoryWidget.js @@ -37,8 +37,6 @@ this.categoryRedirects = {}; // Title cache - will contain entries even if title is already normalized this.normalizedTitles = {}; - this.popupState = false; - this.savedPopupState = false; this.popup = new ve.ui.MWCategoryPopupWidget(); this.input = new ve.ui.MWCategoryInputWidget( this, { $overlay: config.$overlay } ); this.forceCapitalization = mw.config.get( 'wgCaseSensitiveNamespaces' ).indexOf( categoryNamespace ) === -1; @@ -48,8 +46,7 @@ this.input.connect( this, { choose: 'onInputChoose' } ); this.popup.connect( this, { removeCategory: 'onRemoveCategory', - updateSortkey: 'onUpdateSortkey', - hide: 'onPopupHide' + updateSortkey: 'onUpdateSortkey' } ); this.connect( this, { drag: 'onDrag' @@ -210,27 +207,13 @@ }; /** - * Sets popup state when popup is hidden - */ -ve.ui.MWCategoryWidget.prototype.onPopupHide = function () { - this.popupState = false; -}; - -/** - * Saves current popup state - */ -ve.ui.MWCategoryWidget.prototype.onSavePopupState = function () { - this.savedPopupState = this.popupState; -}; - -/** * Toggles popup menu per category item * * @param {Object} item */ ve.ui.MWCategoryWidget.prototype.onTogglePopupMenu = function ( item ) { // Close open popup. - if ( this.savedPopupState === false || item.value !== this.popup.category ) { + if ( item.value !== this.popup.category ) { this.popup.openPopup( item ); } else { // Handle toggle @@ -367,7 +350,6 @@ categoryItem = new ve.ui.MWCategoryItemWidget( config ); categoryItem.connect( widget, { - savePopupState: 'onSavePopupState', togglePopupMenu: 'onTogglePopupMenu' } ); -- To view, visit https://gerrit.wikimedia.org/r/310191 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id:
[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Open meta dialog to edit categories when user clicks on the ...
jenkins-bot has submitted this change and it was merged. Change subject: Open meta dialog to edit categories when user clicks on the category footer .. Open meta dialog to edit categories when user clicks on the category footer Bug: T145267 Change-Id: Ie88c4d9c6327baffdb83c1affbc0515a68c0fc03 --- M modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init.css M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js 2 files changed, 22 insertions(+), 7 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init.css b/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init.css index 7299a8e..983a2ad 100644 --- a/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init.css +++ b/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init.css @@ -40,13 +40,12 @@ overflow: hidden; } +/* Once activated, everything except the progress bar, the edit target, and the category footer */ +.ve-activated .ve-init-mw-desktopArticleTarget-uneditableContent :not([id='catlinks']), /* While loading, everything except the progress bar */ -.ve-loading #content > :not( .ve-init-mw-desktopArticleTarget-loading-overlay ), -/* Once activated, everything except the progress bar and the edit target */ -.ve-activated .ve-init-mw-desktopArticleTarget-uneditableContent { +.ve-loading #content > :not( .ve-init-mw-desktopArticleTarget-loading-overlay ) { /* IE9 is supported with JS events */ /* stylelint-disable no-unsupported-browser-features */ - opacity: 0.5; pointer-events: none; -webkit-user-select: none; -moz-user-select: none; @@ -55,6 +54,13 @@ /* stylelint-enable no-unsupported-browser-features */ } +/* While loading, everything except the progress bar */ +.ve-loading #content > :not( .ve-init-mw-desktopArticleTarget-loading-overlay ), +/* Once activated, everything except the progress bar and the edit target */ +.ve-activated .ve-init-mw-desktopArticleTarget-uneditableContent { + opacity: 0.5; +} + /* Progress bar mimicking OOUI */ .ve-activated #content { diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js index a6eb3ce..f16a6bc 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js @@ -1176,7 +1176,8 @@ * Page modifications for switching to edit mode. */ ve.init.mw.DesktopArticleTarget.prototype.transformPage = function () { - var $content; + var target = this, + $content; this.updateTabs( true ); this.emit( 'transformPage' ); @@ -1193,8 +1194,16 @@ $content.nextAll().addClass( 've-init-mw-desktopArticleTarget-uneditableContent' ); $content = $content.parent(); } - // Support IE9: Disable links - $( '.ve-init-mw-desktopArticleTarget-uneditableContent' ).on( 'click.ve-target', function () { return false; } ); + $( '.ve-init-mw-desktopArticleTarget-uneditableContent' ).on( 'click.ve-target', function () { + var windowAction; + if ( $( this ).attr( 'id' ) === 'catlinks' ) { + windowAction = ve.ui.actionFactory.create( 'window', target.getSurface() ); + windowAction.open( 'meta', { page: 'categories' } ); + return false; + } + // Support IE9: Disable links + return false; + } ); this.updateHistoryState(); }; -- To view, visit https://gerrit.wikimedia.org/r/310467 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie88c4d9c6327baffdb83c1affbc0515a68c0fc03 Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Alex MonkGerrit-Reviewer: Jforrester 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...VisualEditor[master]: Update `progressive` color to WCAG 2.0 level AA compliant co...
jenkins-bot has submitted this change and it was merged. Change subject: Update `progressive` color to WCAG 2.0 level AA compliant color palette .. Update `progressive` color to WCAG 2.0 level AA compliant color palette Aligning instances of `progressive` color to WCAG 2.0 level AA compliant color palette similar to changes in I6fdb90af8b9dc5e5e026eb0c1bd13138c73da4cd Change-Id: I2eda190f0a68de6dc8aa33724f2c8975327a061f --- M modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init-vector.css M modules/ve-mw/ui/styles/dialogs/ve.ui.MWGalleryDialog.css M modules/ve-mw/ui/styles/tools/ve.ui.MWEducationPopupTool.css M modules/ve-mw/ui/styles/widgets/ve.ui.MWAceEditorWidget.css 4 files changed, 7 insertions(+), 7 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init-vector.css b/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init-vector.css index c936ed5..2fcc73c 100644 --- a/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init-vector.css +++ b/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init-vector.css @@ -7,7 +7,7 @@ .ve-init-mw-desktopArticleTarget-progress { height: 0.75em; - border: 1px solid #347bff; + border: 1px solid #36c; background: #fff; border-radius: 2px; box-shadow: 0 0.1em 0 0 rgba( 0, 0, 0, 0.15 ); @@ -15,5 +15,5 @@ .ve-init-mw-desktopArticleTarget-progress-bar { height: 0.75em; - background: #347bff; + background: #36c; } diff --git a/modules/ve-mw/ui/styles/dialogs/ve.ui.MWGalleryDialog.css b/modules/ve-mw/ui/styles/dialogs/ve.ui.MWGalleryDialog.css index ba447cf..2b48a72 100644 --- a/modules/ve-mw/ui/styles/dialogs/ve.ui.MWGalleryDialog.css +++ b/modules/ve-mw/ui/styles/dialogs/ve.ui.MWGalleryDialog.css @@ -22,8 +22,8 @@ } .ve-ui-mwGalleryDialog-image-container-highlighted { - border-color: #347bff; - box-shadow: inset 0 0 0 0.1em #347bff; + border-color: #36c; + box-shadow: inset 0 0 0 0.1em #36c; } .ve-ui-mwGalleryDialog-highlighted-image { diff --git a/modules/ve-mw/ui/styles/tools/ve.ui.MWEducationPopupTool.css b/modules/ve-mw/ui/styles/tools/ve.ui.MWEducationPopupTool.css index 784916e..a86cbc6 100644 --- a/modules/ve-mw/ui/styles/tools/ve.ui.MWEducationPopupTool.css +++ b/modules/ve-mw/ui/styles/tools/ve.ui.MWEducationPopupTool.css @@ -9,7 +9,7 @@ width: 2.5em; height: 2.5em; border-radius: 50%; - background-color: #347bff; + background-color: #36c; position: absolute; opacity: 0; /* stylelint-disable no-unsupported-browser-features */ @@ -26,7 +26,7 @@ width: 0.8em; height: 0.8em; border-radius: 50%; - background-color: #347bff; + background-color: #36c; position: absolute; } diff --git a/modules/ve-mw/ui/styles/widgets/ve.ui.MWAceEditorWidget.css b/modules/ve-mw/ui/styles/widgets/ve.ui.MWAceEditorWidget.css index f4edb0d..4f81e64 100644 --- a/modules/ve-mw/ui/styles/widgets/ve.ui.MWAceEditorWidget.css +++ b/modules/ve-mw/ui/styles/widgets/ve.ui.MWAceEditorWidget.css @@ -15,7 +15,7 @@ .ve-ui-mwAceEditorWidget .ace_focus { /* TODO: Move to mediawiki theme only */ - border-color: #347bff; + border-color: #36c; /* HACK: Make border grow out as inset doesn't overlap absolute positioned children */ border-width: 2px; margin: 0; -- To view, visit https://gerrit.wikimedia.org/r/311617 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2eda190f0a68de6dc8aa33724f2c8975327a061f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: VolkerEGerrit-Reviewer: DLynch Gerrit-Reviewer: Esanders Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Nirzar Gerrit-Reviewer: Pginer Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: mediawiki.UI: Make colors' contrast compliant to WCAG 2.0 le...
jenkins-bot has submitted this change and it was merged. Change subject: mediawiki.UI: Make colors' contrast compliant to WCAG 2.0 level AA .. mediawiki.UI: Make colors' contrast compliant to WCAG 2.0 level AA Establishing Web Accessibility Guidelines level AA color contrast compliance by aligning to improved color palette, similar to I6fdb90af8b9dc5e5e026eb0c1bd13138c73da4cd Bug: T109915 Change-Id: I191f8ec731eeef0827124741200c51cb42ba99f8 --- M resources/src/mediawiki.less/mediawiki.ui/mixins.less M resources/src/mediawiki.less/mediawiki.ui/variables.less M resources/src/mediawiki.special/mediawiki.special.userlogin.login.css M resources/src/mediawiki.widgets.datetime/mediawiki.widgets.datetime.definitions.less M resources/src/mediawiki.widgets/mw.widgets.CalendarWidget.less M resources/src/mediawiki.widgets/mw.widgets.DateInputWidget.less M resources/src/mediawiki/mediawiki.Upload.BookletLayout.css 7 files changed, 49 insertions(+), 48 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/src/mediawiki.less/mediawiki.ui/mixins.less b/resources/src/mediawiki.less/mediawiki.ui/mixins.less index f29897c..3cc94b8 100644 --- a/resources/src/mediawiki.less/mediawiki.ui/mixins.less +++ b/resources/src/mediawiki.less/mediawiki.ui/mixins.less @@ -23,7 +23,7 @@ height: auto; margin: 0 0.1em 0 0; padding: 0; - border: 1px solid @colorFieldBorder; + border: 1px solid @colorGray7; cursor: pointer; } } @@ -61,7 +61,7 @@ .button-colors( @bgColor, @highlightColor, @activeColor ) when ( lightness( @bgColor ) >= 70% ) { color: @colorButtonText; - border: 1px solid @colorGray12; + border: 1px solid @colorFieldBorder; &:hover, &:active, @@ -109,12 +109,11 @@ .button-colors-quiet( @textColor, @highlightColor, @activeColor ) { // Quiet buttons all start gray, and reveal // constructive/progressive/destructive color on hover and active. - color: @colorButtonText; + color: @textColor; - &:hover, - &:focus { + &:hover { background-color: transparent; - color: @textColor; + color: @highlightColor; } &:active, @@ -122,6 +121,11 @@ color: @activeColor; } + &:focus { + background-color: transparent; + color: @textColor; + } + &:disabled { color: @colorDisabledText; } diff --git a/resources/src/mediawiki.less/mediawiki.ui/variables.less b/resources/src/mediawiki.less/mediawiki.ui/variables.less index b6f6568..77e80b0 100644 --- a/resources/src/mediawiki.less/mediawiki.ui/variables.less +++ b/resources/src/mediawiki.less/mediawiki.ui/variables.less @@ -2,13 +2,13 @@ // Although this defines many shades, be parsimonious in your own use of grays. Prefer // colors already in use in MediaWiki. Prefer semantic color names such as "@colorText". -@colorGray1: #111; // darkest +@colorGray1: #000; // darkest @colorGray2: #222; @colorGray3: #333; @colorGray4: #444; @colorGray5: #555; @colorGray6: #666; -@colorGray7: #777; +@colorGray7: #72777d; @colorGray8: #888; @colorGray9: #999; @colorGray10: #aaa; @@ -16,27 +16,23 @@ @colorGray12: #ccc; @colorGray13: #ddd; @colorGray14: #eee; -@colorGray15: #f9f9f9; // lightest +@colorGray15: #f8f9fa; // lightest // Semantic background colors // Blue; for contextual use of a continuing action -@colorProgressive: #347bff; -@colorProgressiveHighlight: #2962cc; -@colorProgressiveActive: #2962cc; -// Green; for contextual use of a positive finalizing action -@colorConstructive: #00af89; -@colorConstructiveHighlight: #008c6d; -@colorConstructiveActive: #008c6d; +@colorProgressive: #36c; +@colorProgressiveHighlight: #447ff5; +@colorProgressiveActive: #2a4b8d; // Orange; for contextual use of returning to a past action @colorRegressive: #ff5d00; // Red; for contextual use of a negative action of high severity -@colorDestructive: #d11d13; -@colorDestructiveHighlight: #a7170f; -@colorDestructiveActive: #a7170f; +@colorDestructive: #c33; +@colorDestructiveHighlight: #e53939; +@colorDestructiveActive: #873636; // Orange; for contextual use of a potentially negative action of medium severity @colorMediumSevere: #ff5d00; // Yellow; for contextual use of a potentially negative action of low severity -@colorLowSevere: #ffb50d; +@colorLowSevere: #fc3; // Used in mixins to darken contextual colors by the same amount (eg. focus) @colorDarkenPercentage: 13.5%; @@ -46,26 +42,18 @@ // Text colors @colorText: @colorGray2; @colorTextLight: @colorGray6; -@colorButtonText: @colorGray5; -@colorButtonTextHighlight: @colorGray7; -@colorButtonTextActive: @colorGray7; +@colorButtonText: @colorGray2;
[MediaWiki-commits] [Gerrit] mediawiki...CentralNotice[master]: campaignManager: jquery.throttle-debounce dependency
AndyRussG has uploaded a new change for review. https://gerrit.wikimedia.org/r/311640 Change subject: campaignManager: jquery.throttle-debounce dependency .. campaignManager: jquery.throttle-debounce dependency Bug: T145447 Change-Id: Ic28aa8d60aacbec5b3fabc434edbe7eaf1b8afb9 --- M extension.json 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice refs/changes/40/311640/1 diff --git a/extension.json b/extension.json index 6f5bf16..553a463 100644 --- a/extension.json +++ b/extension.json @@ -186,6 +186,7 @@ "ext.centralNotice.adminUi", "jquery.ui.dialog", "jquery.ui.slider", + "jquery.throttle-debounce", "mediawiki.template", "mediawiki.template.mustache" ], -- To view, visit https://gerrit.wikimedia.org/r/311640 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic28aa8d60aacbec5b3fabc434edbe7eaf1b8afb9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralNotice Gerrit-Branch: master Gerrit-Owner: AndyRussG___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: letsencrypt: acme_tiny: Skip my ignore-HTTPS-validation code...
Alex Monk has uploaded a new change for review. https://gerrit.wikimedia.org/r/311639 Change subject: letsencrypt: acme_tiny: Skip my ignore-HTTPS-validation code for old versions of python .. letsencrypt: acme_tiny: Skip my ignore-HTTPS-validation code for old versions of python We don't need it, and it broke on precise (e.g. carbon) Change-Id: I55032bf7573ab006d4b9e441421bc0ca35fc9450 --- M modules/letsencrypt/files/acme_tiny.py 1 file changed, 8 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/39/311639/1 diff --git a/modules/letsencrypt/files/acme_tiny.py b/modules/letsencrypt/files/acme_tiny.py index 0427a16..96441bb 100644 --- a/modules/letsencrypt/files/acme_tiny.py +++ b/modules/letsencrypt/files/acme_tiny.py @@ -137,9 +137,14 @@ wellknown_url = "http://{0}/.well-known/acme-challenge/{1}".format(domain, token) # allow invalid https redirect - this would usually be served over http so it's fine -ctx = ssl.create_default_context() -ctx.check_hostname = False -ctx.verify_mode = ssl.CERT_NONE +if 'create_default_context' in dir(ssl): +# This is only needed for Python 2.7.9+, earlier versions didn't check certs by default +# And they didn't have ssl.create_default_context +ctx = ssl.create_default_context() +ctx.check_hostname = False +ctx.verify_mode = ssl.CERT_NONE +else: +ctx = None try: resp = urlopen(wellknown_url, context=ctx) -- To view, visit https://gerrit.wikimedia.org/r/311639 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I55032bf7573ab006d4b9e441421bc0ca35fc9450 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alex Monk___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...RevisionSlider[master]: Use word-break to avoid horizontal scrollbars inside popups
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/311638 Change subject: Use word-break to avoid horizontal scrollbars inside popups .. Use word-break to avoid horizontal scrollbars inside popups Bug: T144267 Change-Id: If946b2a71dfede4cf33a513b3fad974517d4359f --- M modules/ext.RevisionSlider.css 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RevisionSlider refs/changes/38/311638/1 diff --git a/modules/ext.RevisionSlider.css b/modules/ext.RevisionSlider.css index 725f660..34eb0f8 100644 --- a/modules/ext.RevisionSlider.css +++ b/modules/ext.RevisionSlider.css @@ -128,6 +128,8 @@ .mw-revslider-tooltip { font-size: 0.8em; + word-break: break-word; + word-wrap: break-word; } .mw-revslider-revision-tooltip .mw-revslider-change-positive { -- To view, visit https://gerrit.wikimedia.org/r/311638 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If946b2a71dfede4cf33a513b3fad974517d4359f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/RevisionSlider Gerrit-Branch: master Gerrit-Owner: Esanders___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Use STRAIGHT_JOIN to work around optimizer bug for hidenonda...
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/311637 Change subject: Use STRAIGHT_JOIN to work around optimizer bug for hidenondamaging=1 .. Use STRAIGHT_JOIN to work around optimizer bug for hidenondamaging=1 Bug: T146111 Change-Id: Ia6fa8d7ad439373b69659bd282951902a4baea78 --- M includes/Hooks.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ORES refs/changes/37/311637/1 diff --git a/includes/Hooks.php b/includes/Hooks.php index 790f255..7692089 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -161,6 +161,7 @@ $conds[] = 'oresc_probability > ' . $dbr->addQuotes( $threshold ); $conds['rc_patrolled'] = 0; + $query_options[] = 'STRAIGHT_JOIN'; } return true; -- To view, visit https://gerrit.wikimedia.org/r/311637 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia6fa8d7ad439373b69659bd282951902a4baea78 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ORES 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...SemanticForms[master]: Default field label for display=table
Yaron Koren has submitted this change and it was merged. Change subject: Default field label for display=table .. Default field label for display=table Change-Id: I6cd805c4253d49a37de625868912dcf51bd463b9 --- M includes/SF_FormPrinter.php 1 file changed, 6 insertions(+), 1 deletion(-) Approvals: Yaron Koren: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/SF_FormPrinter.php b/includes/SF_FormPrinter.php index c408089..303b23f 100644 --- a/includes/SF_FormPrinter.php +++ b/includes/SF_FormPrinter.php @@ -402,9 +402,14 @@ } $sfgFieldNum++; + if ( $formField->getLabel() !== null ) { + $labelText = $formField->getLabel(); + } else { + $labelText = $fieldName . ': '; + } $label = Html::element( 'label', array( 'for' => "input_$sfgFieldNum" ), - $formField->getLabel() ); + $labelText ); $labelCell = Html::rawElement( 'th', null, $label ); $inputCell = Html::rawElement( 'td', null, $this->formFieldHTML( $formField, $curValue ) ); $html .= Html::rawElement( 'tr', null, $labelCell . $inputCell ) . "\n"; -- To view, visit https://gerrit.wikimedia.org/r/311636 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6cd805c4253d49a37de625868912dcf51bd463b9 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/SemanticForms 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...SemanticForms[master]: Default field label for display=table
Yaron Koren has uploaded a new change for review. https://gerrit.wikimedia.org/r/311636 Change subject: Default field label for display=table .. Default field label for display=table Change-Id: I6cd805c4253d49a37de625868912dcf51bd463b9 --- M includes/SF_FormPrinter.php 1 file changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticForms refs/changes/36/311636/2 diff --git a/includes/SF_FormPrinter.php b/includes/SF_FormPrinter.php index c408089..303b23f 100644 --- a/includes/SF_FormPrinter.php +++ b/includes/SF_FormPrinter.php @@ -402,9 +402,14 @@ } $sfgFieldNum++; + if ( $formField->getLabel() !== null ) { + $labelText = $formField->getLabel(); + } else { + $labelText = $fieldName . ': '; + } $label = Html::element( 'label', array( 'for' => "input_$sfgFieldNum" ), - $formField->getLabel() ); + $labelText ); $labelCell = Html::rawElement( 'th', null, $label ); $inputCell = Html::rawElement( 'td', null, $this->formFieldHTML( $formField, $curValue ) ); $html .= Html::rawElement( 'tr', null, $labelCell . $inputCell ) . "\n"; -- To view, visit https://gerrit.wikimedia.org/r/311636 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6cd805c4253d49a37de625868912dcf51bd463b9 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/SemanticForms 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...RevisionSlider[master]: Follow-up I9fe75a04: Use natural language for beta feature t...
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/311635 Change subject: Follow-up I9fe75a04: Use natural language for beta feature title .. Follow-up I9fe75a04: Use natural language for beta feature title Change-Id: Ib97977e2c448ec4ec1fd4c41d0f982d05bf56437 --- M i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RevisionSlider refs/changes/35/311635/1 diff --git a/i18n/en.json b/i18n/en.json index b8db63d..48dd3d1 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -6,7 +6,7 @@ }, "revisionslider": "RevisionSlider", "revisionslider-desc": "Shows a slider allowing selecting and comparing of revisions on a diff page", -"revisionslider-beta-feature-message": "RevisionSlider", +"revisionslider-beta-feature-message": "Revision slider", "revisionslider-beta-feature-description": "Show a revision slider when comparing two revisions of a page.", "revisionslider-toggle-label": "Browse history", "revisionslider-page-size": "$1 {{PLURAL:$2|byte|bytes}}", -- To view, visit https://gerrit.wikimedia.org/r/311635 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib97977e2c448ec4ec1fd4c41d0f982d05bf56437 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/RevisionSlider Gerrit-Branch: master Gerrit-Owner: Esanders___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: refactor feed CardView listener to file
Niedzielski has uploaded a new change for review. https://gerrit.wikimedia.org/r/311633 Change subject: Hygiene: refactor feed CardView listener to file .. Hygiene: refactor feed CardView listener to file Move HorizontalScrollingListCardView.DontInterceptTouchListener to new file. The listener is large and independent enough to separate. Change-Id: Idbfbfa1a8c4025566b1a8357e6d36da034f8fdda --- M app/src/main/java/org/wikipedia/feed/view/HorizontalScrollingListCardView.java A app/src/main/java/org/wikipedia/views/DontInterceptTouchListener.java 2 files changed, 59 insertions(+), 55 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/33/311633/1 diff --git a/app/src/main/java/org/wikipedia/feed/view/HorizontalScrollingListCardView.java b/app/src/main/java/org/wikipedia/feed/view/HorizontalScrollingListCardView.java index 914faa2..1db791f 100644 --- a/app/src/main/java/org/wikipedia/feed/view/HorizontalScrollingListCardView.java +++ b/app/src/main/java/org/wikipedia/feed/view/HorizontalScrollingListCardView.java @@ -3,18 +3,16 @@ import android.content.Context; import android.support.annotation.NonNull; import android.support.annotation.Nullable; -import android.support.v4.view.MotionEventCompat; import android.support.v7.widget.CardView; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; -import android.view.MotionEvent; import android.view.View; -import android.view.ViewConfiguration; import android.view.ViewGroup; import org.wikipedia.R; import org.wikipedia.views.DefaultRecyclerAdapter; import org.wikipedia.views.DefaultViewHolder; +import org.wikipedia.views.DontInterceptTouchListener; import org.wikipedia.views.MarginItemDecoration; import org.wikipedia.views.ViewUtil; @@ -87,57 +85,5 @@ int viewType) { return new DefaultViewHolder<>(new HorizontalScrollingListCardItemView(parent.getContext())); } -} - -private static class DontInterceptTouchListener implements RecyclerView.OnItemTouchListener { -private int pointerId = Integer.MIN_VALUE; -private float x = Float.MIN_VALUE; -private float y = Float.MIN_VALUE; -private boolean disallowInterception; - -@Override public boolean onInterceptTouchEvent(RecyclerView view, MotionEvent event) { -int action = MotionEventCompat.getActionMasked(event); -switch(action) { -case MotionEvent.ACTION_DOWN: -pointerId = MotionEventCompat.getPointerId(event, 0); -x = event.getX(); -y = event.getY(); -break; -case MotionEvent.ACTION_MOVE: -if (disallowInterception) { -break; -} - -int pointerIndex = MotionEventCompat.findPointerIndex(event, pointerId); -if (pointerIndex < 0) { - view.getParent().requestDisallowInterceptTouchEvent(false); -break; -} - -float dy = Math.abs(y - MotionEventCompat.getY(event, pointerIndex)); -float dx = Math.abs(x - MotionEventCompat.getX(event, pointerIndex)); -int slop = ViewConfiguration.get(view.getContext()).getScaledTouchSlop(); - -if (dx > slop) { -disallowInterception = true; -} else if (dy > slop) { - view.getParent().requestDisallowInterceptTouchEvent(false); -break; -} - -view.getParent().requestDisallowInterceptTouchEvent(true); -break; -default: -this.pointerId = Integer.MIN_VALUE; -x = Float.MIN_VALUE; -y = Float.MIN_VALUE; -disallowInterception = false; -break; -} -return false; -} - -@Override public void onTouchEvent(RecyclerView view, MotionEvent event) { } -@Override public void onRequestDisallowInterceptTouchEvent(boolean disallowIntercept) { } } } diff --git a/app/src/main/java/org/wikipedia/views/DontInterceptTouchListener.java b/app/src/main/java/org/wikipedia/views/DontInterceptTouchListener.java new file mode 100644 index 000..78f288d --- /dev/null +++ b/app/src/main/java/org/wikipedia/views/DontInterceptTouchListener.java @@ -0,0 +1,58 @@ +package org.wikipedia.views; + +import android.support.v4.view.MotionEventCompat; +import android.support.v7.widget.RecyclerView; +import android.view.MotionEvent; +import android.view.ViewConfiguration; + +public class
[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: remove duplicate code in ListCardView
Niedzielski has uploaded a new change for review. https://gerrit.wikimedia.org/r/311634 Change subject: Hygiene: remove duplicate code in ListCardView .. Hygiene: remove duplicate code in ListCardView Refactor HorizontalScrollingListCardView to subclass ListCardView. The current @Override mechanism seems clumsy and could probably be further improved but is preferable to the nearly identical code in ListCardView. Change-Id: Ib54e329104f7e7a635e06c81a3dc929b33fd3b73 --- M app/src/main/java/org/wikipedia/feed/view/HorizontalScrollingListCardView.java M app/src/main/java/org/wikipedia/feed/view/ListCardView.java D app/src/main/res/layout/view_horizontal_scrolling_list_card.xml 3 files changed, 11 insertions(+), 71 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/34/311634/1 diff --git a/app/src/main/java/org/wikipedia/feed/view/HorizontalScrollingListCardView.java b/app/src/main/java/org/wikipedia/feed/view/HorizontalScrollingListCardView.java index 1db791f..ce6bfaa 100644 --- a/app/src/main/java/org/wikipedia/feed/view/HorizontalScrollingListCardView.java +++ b/app/src/main/java/org/wikipedia/feed/view/HorizontalScrollingListCardView.java @@ -2,69 +2,25 @@ import android.content.Context; import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v7.widget.CardView; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; -import android.view.View; import android.view.ViewGroup; import org.wikipedia.R; +import org.wikipedia.util.DimenUtil; import org.wikipedia.views.DefaultRecyclerAdapter; import org.wikipedia.views.DefaultViewHolder; import org.wikipedia.views.DontInterceptTouchListener; import org.wikipedia.views.MarginItemDecoration; -import org.wikipedia.views.ViewUtil; import java.util.List; -import butterknife.BindView; -import butterknife.ButterKnife; - -public abstract class HorizontalScrollingListCardView extends CardView { -@BindView(R.id.view_horizontal_scrolling_list_card_header) View headerView; -@BindView(R.id.view_horizontal_scrolling_list_card_list) RecyclerView recyclerView; - -@Nullable private FeedViewCallback callback; - -@Nullable -public FeedViewCallback callback() { -return callback; -} - +public abstract class HorizontalScrollingListCardView extends ListCardView { public HorizontalScrollingListCardView(@NonNull Context context) { super(context); -inflate(getContext(), R.layout.view_horizontal_scrolling_list_card, this); -ButterKnife.bind(this); -initRecycler(); } -@NonNull public HorizontalScrollingListCardView setCallback(@Nullable FeedViewCallback callback) { -this.callback = callback; -return this; -} - -protected void update() { -if (recyclerView.getAdapter() != null) { -recyclerView.getAdapter().notifyDataSetChanged(); -} -} - -protected void header(@NonNull View view) { -ViewUtil.replace(headerView, view); -headerView = view; -} - -@Nullable -public FeedViewCallback getCallback() { -return callback; -} - -protected void set(@Nullable RecyclerAdapter adapter) { -recyclerView.setAdapter(adapter); -} - -private void initRecycler() { +@Override protected void initRecycler(@NonNull RecyclerView recyclerView) { recyclerView.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL, false)); recyclerView.addItemDecoration(new MarginItemDecoration(getContext(), R.dimen.view_horizontal_scrolling_list_card_item_margin_horizontal, @@ -73,6 +29,12 @@ R.dimen.view_horizontal_scrolling_list_card_item_margin_vertical)); recyclerView.addOnItemTouchListener(new DontInterceptTouchListener()); recyclerView.setNestedScrollingEnabled(false); +recyclerView.setClipChildren(false); +MarginLayoutParams params = (MarginLayoutParams) recyclerView.getLayoutParams(); +final int height = DimenUtil.roundedDpToPx(228); +params.height = height; +final int margin = DimenUtil.roundedDpToPx(12); +params.setMargins(margin, 0, margin, 0); } protected abstract static class RecyclerAdapter diff --git a/app/src/main/java/org/wikipedia/feed/view/ListCardView.java b/app/src/main/java/org/wikipedia/feed/view/ListCardView.java index 50ef6b8..9e3f35c 100644 --- a/app/src/main/java/org/wikipedia/feed/view/ListCardView.java +++ b/app/src/main/java/org/wikipedia/feed/view/ListCardView.java @@ -25,7 +25,7 @@ inflate(getContext(), R.layout.view_list_card, this); ButterKnife.bind(this); -initRecycler(); +initRecycler(recyclerView); } protected void set(@Nullable
[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Make sure bundledNotifications is an array
jenkins-bot has submitted this change and it was merged. Change subject: Make sure bundledNotifications is an array .. Make sure bundledNotifications is an array - Make sure that even if internal values of the array are null, the end-result is a valid array (with sequential keys) - Verify that the API sent the UI an actual array, and if not, output an error to the console. Bug: T145825 Change-Id: Ibdf17c58fe88e3e2547dde62cd4d3d06e089cbc8 --- M includes/DataOutputFormatter.php M modules/controller/mw.echo.Controller.js 2 files changed, 13 insertions(+), 3 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/DataOutputFormatter.php b/includes/DataOutputFormatter.php index d7b866e..f00013f 100644 --- a/includes/DataOutputFormatter.php +++ b/includes/DataOutputFormatter.php @@ -142,14 +142,14 @@ $output['*'] = $formatted; if ( $notification->getBundledNotifications() && self::isBundleExpandable( $event->getType() ) ) { - $output['bundledNotifications'] = array_filter( array_map( function ( EchoNotification $notification ) use ( $format, $user, $lang ) { + $output['bundledNotifications'] = array_values( array_filter( array_map( function ( EchoNotification $notification ) use ( $format, $user, $lang ) { // remove nested notifications to // - ensure they are formatted as single notifications (not bundled) // - prevent further re-entrance on the current notification $notification->setBundledNotifications( array() ); $notification->getEvent()->setBundledEvents( array() ); return self::formatOutput( $notification, $format, $user, $lang ); - }, array_merge( array( $notification ), $notification->getBundledNotifications() ) ) ); + }, array_merge( array( $notification ), $notification->getBundledNotifications() ) ) ) ); } } diff --git a/modules/controller/mw.echo.Controller.js b/modules/controller/mw.echo.Controller.js index 59cb771..9ea2e27 100644 --- a/modules/controller/mw.echo.Controller.js +++ b/modules/controller/mw.echo.Controller.js @@ -315,7 +315,8 @@ notifData.sources[ source ] ); } - } else if ( newNotifData.bundledNotifications ) { + + } else if ( Array.isArray( newNotifData.bundledNotifications ) ) { // local bundle newNotifData.modelName = 'bundle_' + notifData.id; itemModel = new mw.echo.dm.BundleNotificationItem( @@ -333,6 +334,15 @@ idArray.push( notifData.id ); localItems.push( itemModel ); + + if ( newNotifData.bundledNotifications ) { + // This means that bundledNotifications is truthy + // but is not an array. We should log this in the console + mw.log.warn( + 'newNotifData.bundledNotifications is expected to be an array,' + + 'but instead received "' + $.type( newNotifData.bundledNotifications ) + '"' + ); + } } } -- To view, visit https://gerrit.wikimedia.org/r/311050 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibdf17c58fe88e3e2547dde62cd4d3d06e089cbc8 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: MooeypooGerrit-Reviewer: Catrope Gerrit-Reviewer: Mattflaschen Gerrit-Reviewer: Sbisson Gerrit-Reviewer: jenkins-bot <>
[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Fix useSelser in the http api
jenkins-bot has submitted this change and it was merged. Change subject: Fix useSelser in the http api .. Fix useSelser in the http api * Reverts some of cbc3d196a52a1f0be69efb503d640b472f9cde7c Change-Id: I20a0b24b765332fe176465e74c422a4c256b4685 --- M lib/api/routes.js 1 file changed, 8 insertions(+), 5 deletions(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/api/routes.js b/lib/api/routes.js index f11aa70..92fbad5 100644 --- a/lib/api/routes.js +++ b/lib/api/routes.js @@ -559,10 +559,6 @@ var startTimers = new Map(); env.page.reset(); - // As per https://www.mediawiki.org/wiki/Parsoid/API#v1_API_entry_points - // "Both it and the oldid parameter are needed for - //clean round-tripping of HTML retrieved earlier with" - // So, no oldid => no selser env.page.meta.revision.revid = res.locals.oldid; env.bumpSerializerResourceUse('htmlSize', html.length); @@ -657,7 +653,14 @@ } } - return DU.serializeDOM(env, doc.body, env.conf.parsoid.useSelser) + // As per https://www.mediawiki.org/wiki/Parsoid/API#v1_API_entry_points + // "Both it and the oldid parameter are needed for + //clean round-tripping of HTML retrieved earlier with" + // So, no oldid => no selser + var hasOldId = !!env.page.meta.revision.revid; + var useSelser = hasOldId && env.conf.parsoid.useSelser; + + return DU.serializeDOM(env, doc.body, useSelser) // .timeout(REQ_TIMEOUT) .then(function(output) { if (metrics) { -- To view, visit https://gerrit.wikimedia.org/r/311626 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I20a0b24b765332fe176465e74c422a4c256b4685 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: ArlolraGerrit-Reviewer: Arlolra Gerrit-Reviewer: Subramanya Sastry 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...varnish4[debian-wmf]: add VCL variable "uptime"
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/311632 Change subject: add VCL variable "uptime" .. add VCL variable "uptime" This is useful for avoiding N-hit-wonder VCL code for a short period after cache restart. Change-Id: I53d367647b949cb7ff05c6d00029341ca2fd --- A debian/patches/0005-vcl-uptime.patch M debian/patches/series 2 files changed, 40 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/debs/varnish4 refs/changes/32/311632/1 diff --git a/debian/patches/0005-vcl-uptime.patch b/debian/patches/0005-vcl-uptime.patch new file mode 100644 index 000..c32b932 --- /dev/null +++ b/debian/patches/0005-vcl-uptime.patch @@ -0,0 +1,39 @@ +diff --git a/bin/varnishd/cache/cache_vrt.c b/bin/varnishd/cache/cache_vrt.c +index a73489b..f406fdf 100644 +--- a/bin/varnishd/cache/cache_vrt.c b/bin/varnishd/cache/cache_vrt.c +@@ -297,6 +297,16 @@ VRT_r_now(VRT_CTX) + + /**/ + ++double ++VRT_r_uptime(VRT_CTX) ++{ ++ ++ (void)ctx; ++ return (double)VSC_C_main->uptime; ++} ++ ++/**/ ++ + char * + VRT_IP_string(VRT_CTX, VCL_IP ip) + { +diff --git a/lib/libvcc/generate.py b/lib/libvcc/generate.py +index 7f2b50b..b0c806a 100755 +--- a/lib/libvcc/generate.py b/lib/libvcc/generate.py +@@ -724,6 +724,13 @@ sp_variables = [ + used in string context it returns a formatted string. + """ + ), ++ ('uptime', ++ 'DURATION', ++ ( 'all',), ++ ( ), """ ++ The time the cache child process has been up in seconds. ++ """ ++ ), + ] + + # Backwards compatibility: diff --git a/debian/patches/series b/debian/patches/series index f218f25..cf5e6c6 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ 0001-varnishd-persistent-addrarg.patch 0002-varnishd-persistent-fallocate.patch 0004-varnishd-persistent-mmap-exit.patch +0005-vcl-uptime.patch -- To view, visit https://gerrit.wikimedia.org/r/311632 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I53d367647b949cb7ff05c6d00029341ca2fd Gerrit-PatchSet: 1 Gerrit-Project: operations/debs/varnish4 Gerrit-Branch: debian-wmf Gerrit-Owner: BBlack___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix undefined getDelimiter() call in sql.php
jenkins-bot has submitted this change and it was merged. Change subject: Fix undefined getDelimiter() call in sql.php .. Fix undefined getDelimiter() call in sql.php * Fixes regression from 4ef4438739. * Also fixed numerous IDEA warnings. Change-Id: Id41faff835ca25399ce1ceb10a19d19ffc914689 --- M maintenance/sql.php 1 file changed, 15 insertions(+), 11 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/maintenance/sql.php b/maintenance/sql.php index e6a30a3..a9fe45a 100644 --- a/maintenance/sql.php +++ b/maintenance/sql.php @@ -44,6 +44,8 @@ } public function execute() { + global $IP; + // We wan't to allow "" for the wikidb, meaning don't call select_db() $wiki = $this->hasOption( 'wikidb' ) ? $this->getOption( 'wikidb' ) : false; // Get the appropriate load balancer (for this wiki) @@ -66,12 +68,13 @@ } } if ( $index === null ) { - $this->error( "No replica DB server configured with the name '$server'.", 1 ); + $this->error( "No replica DB server configured with the name '$replicaDB'.", 1 ); } } else { $index = DB_MASTER; } - // Get a DB handle (with this wiki's DB selected) from the appropriate load balancer + + /** @var Database $db DB handle for the appropriate cluster/wiki */ $db = $lb->getConnection( $index, [], $wiki ); if ( $replicaDB != '' && $db->getLBInfo( 'master' ) !== null ) { $this->error( "The server selected ({$db->getServer()}) is not a replica DB.", 1 ); @@ -98,14 +101,15 @@ return; } - $useReadline = function_exists( 'readline_add_history' ) - && Maintenance::posix_isatty( 0 /*STDIN*/ ); - - if ( $useReadline ) { - global $IP; + if ( + function_exists( 'readline_add_history' ) && + Maintenance::posix_isatty( 0 /*STDIN*/ ) + ) { $historyFile = isset( $_ENV['HOME'] ) ? "{$_ENV['HOME']}/.mwsql_history" : "$IP/maintenance/.mwsql_history"; readline_read_history( $historyFile ); + } else { + $historyFile = null; } $wholeLine = ''; @@ -126,10 +130,10 @@ $prompt = '-> '; continue; } - if ( $useReadline ) { + if ( $historyFile ) { # Delimiter is eated by streamStatementEnd, we add it # up in the history (bug 37020) - readline_add_history( $wholeLine . $db->getDelimiter() ); + readline_add_history( $wholeLine . ';' ); readline_write_history( $historyFile ); } $this->sqlDoQuery( $db, $wholeLine, $doDie ); @@ -139,7 +143,7 @@ wfWaitForSlaves(); } - protected function sqlDoQuery( $db, $line, $dieOnError ) { + protected function sqlDoQuery( IDatabase $db, $line, $dieOnError ) { try { $res = $db->query( $line ); $this->sqlPrintResult( $res, $db ); @@ -151,7 +155,7 @@ /** * Print the results, callback for $db->sourceStream() * @param ResultWrapper $res The results object -* @param DatabaseBase $db +* @param IDatabase $db */ public function sqlPrintResult( $res, $db ) { if ( !$res ) { -- To view, visit https://gerrit.wikimedia.org/r/311592 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id41faff835ca25399ce1ceb10a19d19ffc914689 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron SchulzGerrit-Reviewer: Legoktm Gerrit-Reviewer: Parent5446 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...BiblioPlus[master]: Updated qTip2 Library to v 2.2.1 Required to support latest ...
jenkins-bot has submitted this change and it was merged. Change subject: Updated qTip2 Library to v 2.2.1 Required to support latest version of jQuery in Mediawiki v1.24.1. Added our own css file to make modifications to the style of the tooltip keeping it very close to the same as before this update. .. Updated qTip2 Library to v 2.2.1 Required to support latest version of jQuery in Mediawiki v1.24.1. Added our own css file to make modifications to the style of the tooltip keeping it very close to the same as before this update. Change-Id: Id3115c3b7bad7f50d5c42582800f7efb790793e0 --- M BiblioPlus.php A resources/ext.biblioPlus.min.css M resources/ext.biblioPlus.qtip.config.js M resources/ext.biblioPlus.qtip/ext.biblioPlus.qtip.min.css M resources/ext.biblioPlus.qtip/ext.biblioPlus.qtip.min.js 5 files changed, 26 insertions(+), 6 deletions(-) Approvals: jenkins-bot: Verified KarenEddy: Verified; Looks good to me, approved diff --git a/BiblioPlus.php b/BiblioPlus.php index ad7269a..7ede8e5 100644 --- a/BiblioPlus.php +++ b/BiblioPlus.php @@ -156,7 +156,7 @@ define('CACHE_TTL', 3600 * 24); $wgBiblioPlusForce = true; -$wgBiblioPlusVersion = "1.1.0"; +$wgBiblioPlusVersion = "1.2.0"; $dir = dirname(__FILE__) . '/'; $wgAutoloadClasses['BiblioXml'] = $dir . 'BiblioXml.php'; diff --git a/resources/ext.biblioPlus.min.css b/resources/ext.biblioPlus.min.css new file mode 100644 index 000..ae6de54 --- /dev/null +++ b/resources/ext.biblioPlus.min.css @@ -0,0 +1,17 @@ +/* BiblioPlus v1.2.0 | Licensed GPL */ + +/* Enlarge the max width of the tooltip from default 280px */ +.qtip { +max-width: 400px; +} + +/* Shrink the line height a bit from default 20px */ +.qtip-bootstrap { +line-height: 18px; +} + +/* Shrink the font-size a bit from default 14px */ +.qtip-content { +font-size: 0.95em; +} + diff --git a/resources/ext.biblioPlus.qtip.config.js b/resources/ext.biblioPlus.qtip.config.js index 73d9e26..9e34445 100644 --- a/resources/ext.biblioPlus.qtip.config.js +++ b/resources/ext.biblioPlus.qtip.config.js @@ -13,8 +13,7 @@ } }, style: { - classes: 'ui-tooltip-shadow ui-tooltip-bootstrap', - width: 400 + classes: 'qtip-shadow qtip-bootstrap' }, hide: { fixed: true, diff --git a/resources/ext.biblioPlus.qtip/ext.biblioPlus.qtip.min.css b/resources/ext.biblioPlus.qtip/ext.biblioPlus.qtip.min.css index 0c4a012..880d880 100644 --- a/resources/ext.biblioPlus.qtip/ext.biblioPlus.qtip.min.css +++ b/resources/ext.biblioPlus.qtip/ext.biblioPlus.qtip.min.css @@ -1 +1,3 @@ -.ui-tooltip,.qtip{position:absolute;left:-28000px;top:-28000px;display:none;max-width:1000px;min-width:50px;font-size:10.5px;line-height:12px;border-style:solid;border-width:1px;}.ui-tooltip-fluid{display:block;visibility:hidden;position:static!important;float:left!important;}.ui-tooltip-content{position:relative;overflow:hidden;text-align:left;word-wrap:break-word;padding:5px 9px;}.ui-tooltip-titlebar{position:relative;min-height:14px;overflow:hidden;font-weight:700;border-width:0 0 1px;padding:5px 35px 5px 10px;}.ui-tooltip-titlebar + .ui-tooltip-content{border-top-width:0!important;}.ui-tooltip-titlebar .ui-state-default{position:absolute;right:4px;top:50%;margin-top:-9px;cursor:pointer;outline:medium none;border-style:solid;border-width:1px;}* html .ui-tooltip-titlebar .ui-state-default{top:16px;}.ui-tooltip-titlebar .ui-icon,.ui-tooltip-icon .ui-icon{display:block;text-indent:-1000em;direction:ltr;}.ui-tooltip-icon,.ui-tooltip-icon .ui-icon{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;text-decoration:none;}.ui-tooltip-icon .ui-icon{width:18px;height:14px;text-align:center;text-indent:0;font:normal bold 10px/13px Tahoma,sans-serif;color:inherit;background:transparent none no-repeat -100em -100em;}.ui-tooltip-default{background-color:#A3;color:#555;border-color:#F1D031;}.ui-tooltip-default .ui-tooltip-titlebar{background-color:#FFEF93;}.ui-tooltip-default .ui-tooltip-icon{background:#F1F1F1;color:#777;border-color:#CCC;}.ui-tooltip-default .ui-tooltip-titlebar .ui-state-hover{color:#111;border-color:#AAA;}.ui-tooltip-light{background-color:#FFF;color:#454545;border-color:#E2E2E2;}.ui-tooltip-light .ui-tooltip-titlebar{background-color:#f1f1f1;}.ui-tooltip-dark{background-color:#505050;color:#f3f3f3;border-color:#303030;}.ui-tooltip-dark .ui-tooltip-titlebar{background-color:#404040;}.ui-tooltip-dark .ui-tooltip-icon{border-color:#444;}.ui-tooltip-cream{background-color:#FBF7AA;color:#A27D35;border-color:#F9E98E;}.ui-tooltip-cream .ui-tooltip-titlebar{background-color:#F0DE7D;}.ui-tooltip-cream .ui-state-default .ui-tooltip-icon{background-position:-82px
[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: remove dead feed CardView code
Niedzielski has uploaded a new change for review. https://gerrit.wikimedia.org/r/311631 Change subject: Hygiene: remove dead feed CardView code .. Hygiene: remove dead feed CardView code Remove unused code in HorizontalScrollingListCardView. Change-Id: I0feb7d5373594ab29735c655d52228adb8b926ff --- M app/src/main/java/org/wikipedia/feed/view/HorizontalScrollingListCardView.java M app/src/main/res/layout/view_horizontal_scrolling_list_card.xml 2 files changed, 0 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/31/311631/1 diff --git a/app/src/main/java/org/wikipedia/feed/view/HorizontalScrollingListCardView.java b/app/src/main/java/org/wikipedia/feed/view/HorizontalScrollingListCardView.java index 965d23a..914faa2 100644 --- a/app/src/main/java/org/wikipedia/feed/view/HorizontalScrollingListCardView.java +++ b/app/src/main/java/org/wikipedia/feed/view/HorizontalScrollingListCardView.java @@ -25,7 +25,6 @@ public abstract class HorizontalScrollingListCardView extends CardView { @BindView(R.id.view_horizontal_scrolling_list_card_header) View headerView; -@BindView(R.id.view_horizontal_scrolling_list_card_footer) View footerView; @BindView(R.id.view_horizontal_scrolling_list_card_list) RecyclerView recyclerView; @Nullable private FeedViewCallback callback; @@ -56,11 +55,6 @@ protected void header(@NonNull View view) { ViewUtil.replace(headerView, view); headerView = view; -} - -protected void footer(@NonNull View view) { -ViewUtil.replace(footerView, view); -footerView = view; } @Nullable diff --git a/app/src/main/res/layout/view_horizontal_scrolling_list_card.xml b/app/src/main/res/layout/view_horizontal_scrolling_list_card.xml index d3f082e..7285592 100644 --- a/app/src/main/res/layout/view_horizontal_scrolling_list_card.xml +++ b/app/src/main/res/layout/view_horizontal_scrolling_list_card.xml @@ -19,9 +19,4 @@ android:layout_marginRight="12dp" android:clipChildren="false"/> - - \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/311631 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0feb7d5373594ab29735c655d52228adb8b926ff Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Niedzielski___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Update ORES role for Id2feaf
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/311630 Change subject: Update ORES role for Id2feaf .. Update ORES role for Id2feaf Change-Id: I0b10259ed8eeecb59b99b6509f5920b5b9df43ff --- M puppet/modules/role/manifests/ores.pp 1 file changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/30/311630/1 diff --git a/puppet/modules/role/manifests/ores.pp b/puppet/modules/role/manifests/ores.pp index 52a9b10..14b5f09 100644 --- a/puppet/modules/role/manifests/ores.pp +++ b/puppet/modules/role/manifests/ores.pp @@ -17,9 +17,7 @@ # Point at some fake data with flat probability distribution. wgOresWikiId => 'testwiki', -# This parameter is supposed to be an array, but we're working -# around T121378 and a limitation in the testwiki pseudomodels. -wgOresModels => 'damaging', +'wgOresModels["damaging"]' => true, }, } -- To view, visit https://gerrit.wikimedia.org/r/311630 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0b10259ed8eeecb59b99b6509f5920b5b9df43ff Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant 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]: Database class parameter and documentation cleanups
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/311629 Change subject: Database class parameter and documentation cleanups .. Database class parameter and documentation cleanups Change-Id: Icc1037efa1eee7ae6fdd2919f60001e6e29ae55c --- M includes/libs/rdbms/database/Database.php M includes/libs/rdbms/lbfactory/LBFactory.php M includes/libs/rdbms/lbfactory/LBFactoryMulti.php M includes/libs/rdbms/lbfactory/LBFactorySimple.php M includes/libs/rdbms/loadbalancer/ILoadBalancer.php 5 files changed, 143 insertions(+), 93 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/29/311629/1 diff --git a/includes/libs/rdbms/database/Database.php b/includes/libs/rdbms/database/Database.php index f9e9296..fd5cc25 100644 --- a/includes/libs/rdbms/database/Database.php +++ b/includes/libs/rdbms/database/Database.php @@ -231,16 +231,12 @@ protected $trxProfiler; /** -* Constructor. -* -* FIXME: It is possible to construct a Database object with no associated -* connection object, by specifying no parameters to __construct(). This -* feature is deprecated and should be removed. +* Constructor and database handle and attempt to connect to the DB server * * IDatabase classes should not be constructed directly in external -* code. DatabaseBase::factory() should be used instead. +* code. Database::factory() should be used instead. * -* @param array $params Parameters passed from DatabaseBase::factory() +* @param array $params Parameters passed from Database::factory() */ function __construct( array $params ) { $server = $params['host']; @@ -285,39 +281,60 @@ ? $params['queryLogger'] : new \Psr\Log\NullLogger(); - if ( $user ) { - $this->open( $server, $user, $password, $dbName ); + if ( !$user ) { + throw new InvalidArgumentException( "No database user provided." ); } + $this->open( $server, $user, $password, $dbName ); + // Set the domain object after open() sets the relevant fields $this->currentDomain = ( $this->mDBname != '' ) ? new DatabaseDomain( $this->mDBname, null, $this->mTablePrefix ) : DatabaseDomain::newUnspecified(); } /** -* Given a DB type, construct the name of the appropriate child class of -* IDatabase. This is designed to replace all of the manual stuff like: -*$class = 'Database' . ucfirst( strtolower( $dbType ) ); -* as well as validate against the canonical list of DB types we have +* Construct a Database subclass instance given a database type and parameters * -* This factory function is mostly useful for when you need to connect to a -* database other than the MediaWiki default (such as for external auth, -* an extension, et cetera). Do not use this to connect to the MediaWiki -* database. Example uses in core: -* @see LoadBalancer::reallyOpenConnection() -* @see ForeignDBRepo::getMasterDB() -* @see WebInstallerDBConnect::execute() +* This also connects to the database immediately upon object construction * -* @since 1.18 -* -* @param string $dbType A possible DB type -* @param array $p An array of options to pass to the constructor. -*Valid options are: host, user, password, dbname, flags, tablePrefix, schema, driver -* @return IDatabase|null If the database driver or extension cannot be found +* @param string $dbType A possible DB type (sqlite, mysql, postgres) +* @param array $p Parameter map with keys: +* - host : The hostname of the DB server +* - user : The name of the database user the client operates under +* - password : The password for the database user +* - dbname : The name of the database to use where queries do not specify one. +* The database must exist or an error might be thrown. Setting this to the empty string +* will avoid any such errors and make the handle have no implicit database scope. This is +* useful for queries like SHOW STATUS, CREATE DATABASE, or DROP DATABASE. Note that a +* "database" in Postgres is rougly equivalent to an entire MySQL server. This the domain +* in which user names and such are defined, e.g. users are database-specific in Postgres. +* - schema : The database schema to use (if supported). A "schema" in Postgres is roughly +* equivalent to a "database" in MySQL. Note that MySQL and
[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Avoid Fragment IllegalStateException
Niedzielski has uploaded a new change for review. https://gerrit.wikimedia.org/r/311628 Change subject: Avoid Fragment IllegalStateException .. Avoid Fragment IllegalStateException Allowing state loss isn't best practice but custom handling of Fragments rarely works well. This workaround was intended for f96ce1f and should be eliminated in T145834. java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=65581, result=-1, data=Intent { (has extras) }} to activity {org.wikipedia.beta/org.wikipedia.MainActivity}: java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState at android.app.ActivityThread.deliverResults(ActivityThread.java:3384) at android.app.ActivityThread.handleSendResult(ActivityThread.java:3427) at android.app.ActivityThread.access$1300(ActivityThread.java:139) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1248) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5103) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:606) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState at android.support.v4.app.FragmentManagerImpl.checkStateLoss(FragmentManager.java:1527) at android.support.v4.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:1545) at android.support.v4.app.BackStackRecord.commitInternal(BackStackRecord.java:654) at android.support.v4.app.BackStackRecord.commit(BackStackRecord.java:621) at org.wikipedia.MainFragment.openSearchFragment(MainFragment.java:423) at org.wikipedia.MainFragment.onActivityResult(MainFragment.java:129) at android.support.v4.app.FragmentActivity.onActivityResult(FragmentActivity.java:165) at android.app.Activity.dispatchActivityResult(Activity.java:5467) at android.app.ActivityThread.deliverResults(ActivityThread.java:3380) ... 11 more https://rink.hockeyapp.net/manage/apps/226650/app_versions/48/crash_reasons/137015016 Change-Id: I6ebdeea38b7925f230060f681828bea0cdcfb508 --- M app/src/main/java/org/wikipedia/MainFragment.java M app/src/main/java/org/wikipedia/page/PageActivity.java 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/28/311628/1 diff --git a/app/src/main/java/org/wikipedia/MainFragment.java b/app/src/main/java/org/wikipedia/MainFragment.java index 73e486d..4aafa42 100644 --- a/app/src/main/java/org/wikipedia/MainFragment.java +++ b/app/src/main/java/org/wikipedia/MainFragment.java @@ -420,7 +420,7 @@ getChildFragmentManager() .beginTransaction() .add(R.id.fragment_main_container, fragment) -.commit(); +.commitNowAllowingStateLoss(); } } diff --git a/app/src/main/java/org/wikipedia/page/PageActivity.java b/app/src/main/java/org/wikipedia/page/PageActivity.java index 5e5b3ba..ddc3c7c 100644 --- a/app/src/main/java/org/wikipedia/page/PageActivity.java +++ b/app/src/main/java/org/wikipedia/page/PageActivity.java @@ -958,7 +958,7 @@ getSupportFragmentManager() .beginTransaction() .add(R.id.activity_page_container, fragment) -.commit(); +.commitNowAllowingStateLoss(); } } -- To view, visit https://gerrit.wikimedia.org/r/311628 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6ebdeea38b7925f230060f681828bea0cdcfb508 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Niedzielski___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CiteThisPage[master]: Rewrite to avoid messing with global state
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/311627 Change subject: Rewrite to avoid messing with global state .. Rewrite to avoid messing with global state The main goal of this rewrite is to not use or mess with any global state. The ParserGetVariableValueTs and ParserGetVariableValueVarCache hooks were replaced with setting the timestamp via ParserOptions::setTimestamp(). This also means that {{#time:...}} from ParserFunctions extension will correctly use the page's timestamp instead of the current one. Disabling tidy is also done using ParserOptions instead of changing global state. Change-Id: Ib2810aa5891c57831380a1a4718656cc09932b96 --- M SpecialCiteThisPage.php M i18n/en.json M i18n/qqq.json 3 files changed, 93 insertions(+), 86 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CiteThisPage refs/changes/27/311627/1 diff --git a/SpecialCiteThisPage.php b/SpecialCiteThisPage.php index 5e1cae9..4db4f91 100644 --- a/SpecialCiteThisPage.php +++ b/SpecialCiteThisPage.php @@ -1,18 +1,17 @@ tags to - // be generated around the output of the CiteThisPageOutput - // class TODO FIXME. - $wgUseTidy = false; - $this->setHeaders(); $this->outputHeader(); @@ -23,8 +22,7 @@ if ( $title && $title->exists() ) { $id = $this->getRequest()->getInt( 'id' ); - $cout = new CiteThisPageOutput( $title, $id ); - $cout->execute(); + $this->showCitations( $title, $id ); } } @@ -84,54 +82,61 @@ protected function getGroupName() { return 'pagetools'; } -} -class CiteThisPageOutput { - /** -* @var Title -*/ - public $mTitle; + private function showCitations( Title $title, $revId ) { + if ( !$revId ) { + $revId = $title->getLatestRevID(); + } - /** -* @var Article -*/ - public $mArticle; + $out = $this->getOutput(); - public $mId; + $revision = Revision::newFromTitle( $title, $revId ); + if ( !$revision ) { + $out->wrapWikiMsg( '$1', [ 'citethispage-badrevision', $title->getPrefixedText(), $revId ] ); + return; + } - /** -* @var Parser -*/ - public $mParser; + $parserOptions = $this->getParserOptions(); + // Set the overall timestamp to the revision's timestamp + $parserOptions->setTimestamp( $revision->getTimestamp() ); - /** -* @var ParserOptions -*/ - public $mParserOptions; + $parser = $this->getParser(); + // Register our tag which just parses using a different + // context + $parser->setHook( 'citation', [ $this, 'citationTag' ] ); + // Also hold on to a separate Parser instance for tag parsing + // since we can't parse in a parse using the same Parser + $this->citationParser = $this->getParser(); - public $mSpTitle; + $ret = $parser->parse( + $this->getContentText(), + $title, + $parserOptions, + /* $linestart = */ false, + /* $clearstate = */ true, + $revId + ); - function __construct( $title, $id ) { - global $wgHooks, $wgParser; + $this->getOutput()->addModuleStyles( 'ext.citeThisPage' ); + $this->getOutput()->addParserOutputContent( $ret ); - $this->mTitle = $title; - $this->mArticle = new Article( $title ); - $this->mId = $id; - - $wgHooks['ParserGetVariableValueVarCache'][] = [ $this, 'varCache' ]; - - $this->genParserOptions(); - $this->genParser(); - - $wgParser->setHook( 'citation', [ $this, 'citationTagParse' ] ); } - function execute() { - global $wgOut, $wgParser, $wgHooks; + /** +* @return Parser +*/ + private function getParser() { + $parserConf = $this->getConfig()->get( 'ParserConf' ); + return new $parserConf['class']( $parserConf ); + } - $wgHooks['ParserGetVariableValueTs'][] = [ $this, 'timestamp' ]; - - $msg = wfMessage( 'citethispage-content' )->inContentLanguage()->plain(); + /** +* Get the content to parse +* +* @return string +*/ + private function getContentText() { + $msg = $this->msg( 'citethispage-content'
[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Move entity usage from basic to properties section in action...
jenkins-bot has submitted this change and it was merged. Change subject: Move entity usage from basic to properties section in action=info .. Move entity usage from basic to properties section in action=info Change-Id: I28f0b0cf1bc0fd01ec938bd81db926148618ed3e --- M client/includes/Hooks/InfoActionHookHandler.php M client/tests/phpunit/includes/Hooks/InfoActionHookHandlerTest.php 2 files changed, 5 insertions(+), 3 deletions(-) Approvals: Aude: Looks good to me, approved Ladsgroup: Looks good to me, approved jenkins-bot: Verified diff --git a/client/includes/Hooks/InfoActionHookHandler.php b/client/includes/Hooks/InfoActionHookHandler.php index d5880ad..db662aa 100644 --- a/client/includes/Hooks/InfoActionHookHandler.php +++ b/client/includes/Hooks/InfoActionHookHandler.php @@ -70,7 +70,7 @@ } if ( $usage ) { - $pageInfo['header-basic'][] = $this->formatEntityUsage( $context, $usage ); + $pageInfo['header-properties'][] = $this->formatEntityUsage( $context, $usage ); } return $pageInfo; diff --git a/client/tests/phpunit/includes/Hooks/InfoActionHookHandlerTest.php b/client/tests/phpunit/includes/Hooks/InfoActionHookHandlerTest.php index b5728fb..a8f0cee 100644 --- a/client/tests/phpunit/includes/Hooks/InfoActionHookHandlerTest.php +++ b/client/tests/phpunit/includes/Hooks/InfoActionHookHandlerTest.php @@ -47,6 +47,8 @@ $context->msg( 'wikibase-pageinfo-entity-id' )->escaped(), 'https://www.wikidata.org/wiki/Q4' ), + ), + 'header-properties' => array( array( $context->msg( 'wikibase-pageinfo-entity-usage' )->escaped(), "https://www.wikidata.org/wiki/Q4Sitelink", @@ -58,7 +60,7 @@ ); $cases[] = array( - array( 'header-basic' => array( + array( 'header-properties' => array( array( $context->msg( 'wikibase-pageinfo-entity-usage' )->escaped(), "https://www.wikidata.org/wiki/Q4Sitelink", @@ -66,7 +68,7 @@ ) ), $context, - array( 'header-basic' => array() ), + array( 'header-properties' => array() ), false, new ItemId( 'Q4' ), 'namespace does not have wikibase enabled' -- To view, visit https://gerrit.wikimedia.org/r/311328 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I28f0b0cf1bc0fd01ec938bd81db926148618ed3e Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: LadsgroupGerrit-Reviewer: Aude Gerrit-Reviewer: Daniel Kinzler Gerrit-Reviewer: Ladsgroup Gerrit-Reviewer: Thiemo Mättig (WMDE) Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Fix useSelser in the http api
Arlolra has uploaded a new change for review. https://gerrit.wikimedia.org/r/311626 Change subject: Fix useSelser in the http api .. Fix useSelser in the http api * Reverts some of cbc3d196a52a1f0be69efb503d640b472f9cde7c Change-Id: I20a0b24b765332fe176465e74c422a4c256b4685 --- M lib/api/routes.js 1 file changed, 8 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/26/311626/1 diff --git a/lib/api/routes.js b/lib/api/routes.js index f11aa70..92fbad5 100644 --- a/lib/api/routes.js +++ b/lib/api/routes.js @@ -559,10 +559,6 @@ var startTimers = new Map(); env.page.reset(); - // As per https://www.mediawiki.org/wiki/Parsoid/API#v1_API_entry_points - // "Both it and the oldid parameter are needed for - //clean round-tripping of HTML retrieved earlier with" - // So, no oldid => no selser env.page.meta.revision.revid = res.locals.oldid; env.bumpSerializerResourceUse('htmlSize', html.length); @@ -657,7 +653,14 @@ } } - return DU.serializeDOM(env, doc.body, env.conf.parsoid.useSelser) + // As per https://www.mediawiki.org/wiki/Parsoid/API#v1_API_entry_points + // "Both it and the oldid parameter are needed for + //clean round-tripping of HTML retrieved earlier with" + // So, no oldid => no selser + var hasOldId = !!env.page.meta.revision.revid; + var useSelser = hasOldId && env.conf.parsoid.useSelser; + + return DU.serializeDOM(env, doc.body, useSelser) // .timeout(REQ_TIMEOUT) .then(function(output) { if (metrics) { -- To view, visit https://gerrit.wikimedia.org/r/311626 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I20a0b24b765332fe176465e74c422a4c256b4685 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Arlolra___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: push to origin in make-release
Niedzielski has uploaded a new change for review. https://gerrit.wikimedia.org/r/311625 Change subject: push to origin in make-release .. push to origin in make-release Bug: T141314 Change-Id: I064bff17d83de7c6ffee04d9484dc74ecbcbad04 --- M scripts/make-release.py 1 file changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/25/311625/1 diff --git a/scripts/make-release.py b/scripts/make-release.py index 485dcf3..39ccb55 100755 --- a/scripts/make-release.py +++ b/scripts/make-release.py @@ -9,7 +9,7 @@ Step 2: (e.g., --beta --push): - Creates an annotated tag called 'releases/versionName' -- Pushes the git tag to gerrit for history +- Pushes the git tag to origin for history - TODO (Not implemented yet): Uploads certain bits to releases.mediawiki.org: releasesprod, beta To run @@ -66,13 +66,13 @@ sh.git.tag('-a', get_git_tag_name(target, version_name), '-m', target) -def push_to_gerrit(target, version_name): +def git_push_tag(target, version_name): """ -Pushes the git tag to gerrit +Pushes the git tag to origin """ tag_name = get_git_tag_name(target, version_name) print('pushing tag ' + tag_name) -sh.git.push('gerrit', tag_name) +sh.git.push('origin', tag_name) def make_release(flavors, custom_channel): @@ -172,7 +172,7 @@ help='Step 1: Custom versionName OEMs w/ Play') group.add_argument('--app', help='Step 1: Custom versionName OEMs wout/ Play.') -parser.add_argument('--push', help='Step 2: create git tag to gerrit remote.', +parser.add_argument('--push', help='Step 2: create git tag to origin.', action='store_true') args = parser.parse_args() custom_channel = 'ignore' @@ -206,7 +206,7 @@ version_name = get_version_name_from_apk(apk_file) for target in targets: git_tag(target, version_name) -push_to_gerrit(target, version_name) +git_push_tag(target, version_name) else: make_release(flavors, custom_channel) copy_artifacts(flavors[0]) -- To view, visit https://gerrit.wikimedia.org/r/311625 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I064bff17d83de7c6ffee04d9484dc74ecbcbad04 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Niedzielski___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...MediaWikiFarm[master]: Improvement of CLI scripts
Seb35 has submitted this change and it was merged. Change subject: Improvement of CLI scripts .. Improvement of CLI scripts Code: * In case of error, exit codes in CLI were wrongly the same as HTTP return codes, but exit codes in CLI can only be between 0 and 255, so documented some standard codes and implemented it (0=success, 1=missing wiki, 4=user error, 5=internal error) * Deleted the method AbstractMediaWikiFarmScript::postmain which was not really useful * Now AbstractMediaWikiFarmScript::premain and ::main return a boolean about success (and detailled error is in status property) * Added methods AbstractMediaWikiFarmScript::rmdirr and ::copyr to recursively delete and copy directories, it will be useful to manage extensions with Composer * Removed the use of "new static", which is not PHP 5.2 compatible, this temporarily break the performance test Bugs: * When a global array does not exist and we add some elements, a warning was trigerred in MediaWikiFarm::loadMediaWikiConfig * Be sure wg* variables are syntactically correct for PHP, it was not the case for "wgUseExtensionConfirmEdit/QuestyCaptcha" but slash must be here in wfLoadExtension('ConfirmEdit/QuestyCaptcha') so remove the slash and any incorrect character after detecting extension loading mechanism Change-Id: I02db05b939b968fca4b63fe57ea1bd8804c25b78 --- M .gitignore M bin/mwscript.php M src/AbstractMediaWikiFarmScript.php M src/MediaWikiFarm.php M src/MediaWikiFarmScript.php M tests/phpunit/ConfigurationTest.php M tests/phpunit/InstallationIndependantTest.php M tests/phpunit/LoadingTest.php M tests/phpunit/MediaWikiFarmScriptTest.php M tests/phpunit/MediaWikiFarmTestCase.php M tests/phpunit/data/config/extensionssettings.php M tests/phpunit/data/config/settings.php 12 files changed, 298 insertions(+), 63 deletions(-) Approvals: Seb35: Verified; Looks good to me, approved diff --git a/.gitignore b/.gitignore index 49fc920..fa4674d 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,8 @@ .swp .*.swp *~ +.DS_Store +*.kate-swp # Composer & npm /composer.lock diff --git a/bin/mwscript.php b/bin/mwscript.php index 0cc21ee..14751bf 100644 --- a/bin/mwscript.php +++ b/bin/mwscript.php @@ -21,9 +21,7 @@ $wgMediaWikiFarmScript->load(); -$wgMediaWikiFarmScript->main(); - -if( $wgMediaWikiFarmScript->status == 200 ) { +if( $wgMediaWikiFarmScript->main() ) { # Execute the script require $wgMediaWikiFarmScript->argv[0]; diff --git a/src/AbstractMediaWikiFarmScript.php b/src/AbstractMediaWikiFarmScript.php index 1c0e972..328930b 100644 --- a/src/AbstractMediaWikiFarmScript.php +++ b/src/AbstractMediaWikiFarmScript.php @@ -16,6 +16,13 @@ * Using a class instead of a raw script it better for testability purposes and to use * less global variables (in fact none; the only global variable written are for * compatibility purposes, e.g. PHPUnit expects $_SERVER['argv']). + * + * It is recommended to use the following values for status (in CLI, it must be a number + * between 0 and 255) and explain it in long help: + * - 0 = success + * - 1 = missing wiki (similar to HTTP 404) + * - 4 = user error, like a missing parameter (similar to HTTP 400) + * - 5 = internal error in farm configuration (similar to HTTP 500) */ abstract class AbstractMediaWikiFarmScript { @@ -152,9 +159,7 @@ @include_once dirname( dirname( __FILE__ ) ) . '/config/MediaWikiFarmDirectories.php'; # Load MediaWikiFarm class symbol - // @codingStandardsIgnoreStart MediaWiki.Usage.DirUsage.FunctionFound require_once dirname( dirname( __FILE__ ) ) . '/src/MediaWikiFarm.php'; - // @codingStandardsIgnoreEnd } /** @@ -162,7 +167,7 @@ * * NB: although it can be seen as superfluous, this is required in some cases to wipe off * the presence of MediaWikiFarm. The MediaWiki script 'tests/phpunit/phpunit.php' and PHPUnit -* need it (precisely $_SERVER['argv']; the other are for consistency). +* need it (precisely $_SERVER['argv']; the others are for consistency). * Perhaps in the future some other globals will be changed, like in $_SERVER: PWD, PHP_SELF, * SCRIPT_NAME, SCRIPT_FILENAME, PATH_TRANSLATED, if it is needed. * @@ -182,42 +187,28 @@ /** * Main program for the script, preliminary part. * -* Although it returns void, the 'status' property can say if there was an error or not, -* and if it becomes different than 0, the main program will (should) return. -* -* @return void. +* @return bool If false, the main program should return. */ function premain() { # Return usage if( $this->argc == 2 && ( $this->argv[1] == '-h' || $this->argv[1] == '--help' ) ) {
[MediaWiki-commits] [Gerrit] mediawiki...MediaWikiFarm[master]: Improvement of CLI scripts
Seb35 has uploaded a new change for review. https://gerrit.wikimedia.org/r/311624 Change subject: Improvement of CLI scripts .. Improvement of CLI scripts Code: * In case of error, exit codes in CLI were wrongly the same as HTTP return codes, but exit codes in CLI can only be between 0 and 255, so documented some standard codes and implemented it (0=success, 1=missing wiki, 4=user error, 5=internal error) * Deleted the method AbstractMediaWikiFarmScript::postmain which was not really useful * Now AbstractMediaWikiFarmScript::premain and ::main return a boolean about success (and detailled error is in status property) * Added methods AbstractMediaWikiFarmScript::rmdirr and ::copyr to recursively delete and copy directories, it will be useful to manage extensions with Composer * Removed the use of "new static", which is not PHP 5.2 compatible, this temporarily break the performance test Bugs: * When a global array does not exist and we add some elements, a warning was trigerred in MediaWikiFarm::loadMediaWikiConfig * Be sure wg* variables are syntactically correct for PHP, it was not the case for "wgUseExtensionConfirmEdit/QuestyCaptcha" but slash must be here in wfLoadExtension('ConfirmEdit/QuestyCaptcha') so remove the slash and any incorrect character after detecting extension loading mechanism Change-Id: I02db05b939b968fca4b63fe57ea1bd8804c25b78 --- M .gitignore M bin/mwscript.php M src/AbstractMediaWikiFarmScript.php M src/MediaWikiFarm.php M src/MediaWikiFarmScript.php M tests/phpunit/ConfigurationTest.php M tests/phpunit/InstallationIndependantTest.php M tests/phpunit/LoadingTest.php M tests/phpunit/MediaWikiFarmScriptTest.php M tests/phpunit/MediaWikiFarmTestCase.php M tests/phpunit/data/config/extensionssettings.php M tests/phpunit/data/config/settings.php 12 files changed, 298 insertions(+), 63 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MediaWikiFarm refs/changes/24/311624/1 diff --git a/.gitignore b/.gitignore index 49fc920..fa4674d 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,8 @@ .swp .*.swp *~ +.DS_Store +*.kate-swp # Composer & npm /composer.lock diff --git a/bin/mwscript.php b/bin/mwscript.php index 0cc21ee..14751bf 100644 --- a/bin/mwscript.php +++ b/bin/mwscript.php @@ -21,9 +21,7 @@ $wgMediaWikiFarmScript->load(); -$wgMediaWikiFarmScript->main(); - -if( $wgMediaWikiFarmScript->status == 200 ) { +if( $wgMediaWikiFarmScript->main() ) { # Execute the script require $wgMediaWikiFarmScript->argv[0]; diff --git a/src/AbstractMediaWikiFarmScript.php b/src/AbstractMediaWikiFarmScript.php index 1c0e972..328930b 100644 --- a/src/AbstractMediaWikiFarmScript.php +++ b/src/AbstractMediaWikiFarmScript.php @@ -16,6 +16,13 @@ * Using a class instead of a raw script it better for testability purposes and to use * less global variables (in fact none; the only global variable written are for * compatibility purposes, e.g. PHPUnit expects $_SERVER['argv']). + * + * It is recommended to use the following values for status (in CLI, it must be a number + * between 0 and 255) and explain it in long help: + * - 0 = success + * - 1 = missing wiki (similar to HTTP 404) + * - 4 = user error, like a missing parameter (similar to HTTP 400) + * - 5 = internal error in farm configuration (similar to HTTP 500) */ abstract class AbstractMediaWikiFarmScript { @@ -152,9 +159,7 @@ @include_once dirname( dirname( __FILE__ ) ) . '/config/MediaWikiFarmDirectories.php'; # Load MediaWikiFarm class symbol - // @codingStandardsIgnoreStart MediaWiki.Usage.DirUsage.FunctionFound require_once dirname( dirname( __FILE__ ) ) . '/src/MediaWikiFarm.php'; - // @codingStandardsIgnoreEnd } /** @@ -162,7 +167,7 @@ * * NB: although it can be seen as superfluous, this is required in some cases to wipe off * the presence of MediaWikiFarm. The MediaWiki script 'tests/phpunit/phpunit.php' and PHPUnit -* need it (precisely $_SERVER['argv']; the other are for consistency). +* need it (precisely $_SERVER['argv']; the others are for consistency). * Perhaps in the future some other globals will be changed, like in $_SERVER: PWD, PHP_SELF, * SCRIPT_NAME, SCRIPT_FILENAME, PATH_TRANSLATED, if it is needed. * @@ -182,42 +187,28 @@ /** * Main program for the script, preliminary part. * -* Although it returns void, the 'status' property can say if there was an error or not, -* and if it becomes different than 0, the main program will (should) return. -* -* @return void. +* @return bool If false, the main program should return. */ function premain() { # Return usage if(
[MediaWiki-commits] [Gerrit] wikimedia/portals[master]: Add `:focus` state to language button
jenkins-bot has submitted this change and it was merged. Change subject: Add `:focus` state to language button .. Add `:focus` state to language button Adding `:focus` state to language button and also showing it only when JS is enabled. Bug: T143127 Change-Id: I775c9ed7082ae4b74c6e129cf0ff3fb0a404685d --- M dev/wikipedia.org/assets/postcss/_lang-dropdown.css 1 file changed, 10 insertions(+), 4 deletions(-) Approvals: VolkerE: Looks good to me, approved jenkins-bot: Verified diff --git a/dev/wikipedia.org/assets/postcss/_lang-dropdown.css b/dev/wikipedia.org/assets/postcss/_lang-dropdown.css index 0069ee0..47f7af1 100644 --- a/dev/wikipedia.org/assets/postcss/_lang-dropdown.css +++ b/dev/wikipedia.org/assets/postcss/_lang-dropdown.css @@ -18,15 +18,19 @@ overflow: hidden; max-height: 0; width: 80%; -transition: max-height 0.5s ease-out; background-color: var( --ss-c-grey-hover ); +transition: max-height 0.5s ease-out, visibility 0.5s ease-in 1s; +} + +.js-enabled .lang-list-container { +visibility: hidden; } .lang-list-active .lang-list-container, .no-js .lang-list-container { +visibility: visible; max-height: 1px; -transition: max-height 1s ease-in; -transition-delay: 0.2s; +transition: max-height 1s ease-in 0.2s, visibility 1s ease-in 0s; } .no-js .lang-list-button { @@ -50,6 +54,7 @@ z-index: 1; background-color: #fff; border: 1px solid #ccc; +border-radius: 2px; outline: 1rem solid #fff; transition: outline-width 0.05s ease-in; transition-delay: 0.5s; @@ -78,7 +83,8 @@ } .lang-list-button:focus { -box-shadow: none; +border: 1px solid var( --c-primary ); +box-shadow: inset 0 0 0 1px var( --c-primary ); } .no-js .lang-list-button, -- To view, visit https://gerrit.wikimedia.org/r/310505 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I775c9ed7082ae4b74c6e129cf0ff3fb0a404685d Gerrit-PatchSet: 6 Gerrit-Project: wikimedia/portals Gerrit-Branch: master Gerrit-Owner: JdrewniakGerrit-Reviewer: JGirault Gerrit-Reviewer: VolkerE Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...rainbow[master]: Switch to WMF-hosted MathJax
Bearloga has submitted this change and it was merged. Change subject: Switch to WMF-hosted MathJax .. Switch to WMF-hosted MathJax Loads MathJax from Wikimedia ToolLabs CDNjs (http://tools.wmflabs.org/cdnjs/) to comply with ToS and Privacy Policy. Change-Id: I9f2c06b9627340a5eacbbce484fa4fad6cffac5f --- M ui.R 1 file changed, 13 insertions(+), 8 deletions(-) Approvals: Bearloga: Verified; Looks good to me, approved diff --git a/ui.R b/ui.R index 75d69b0..1d951a2 100644 --- a/ui.R +++ b/ui.R @@ -2,6 +2,17 @@ library(shinydashboard) library(dygraphs) +with_wikimedia_mathjax <- function() { + # Modified version of withMathJax() Keeping this + # here for now. If another dashboard needs to + # render LaTeX, we'll have to put this in polloi. + return(tagList( +tags$script(src = "https://tools-static.wmflabs.org/cdnjs/ajax/libs/mathjax/2.6.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML;, type = "text/javascript"), +tags$script(HTML("if (window.MathJax) MathJax.Hub.Queue([\"Typeset\", MathJax.Hub]);")), +tags$script(HTML("MathJax.Hub.Config({ tex2jax: {inlineMath: [['$','$']]} });"), type = "text/x-mathjax-config") + )) +} + function(request) { dashboardPage( @@ -10,7 +21,8 @@ dashboardSidebar( tags$head( tags$link(rel = "stylesheet", type = "text/css", href = "stylesheet.css"), -tags$script(src = "custom.js") +tags$script(src = "custom.js"), +with_wikimedia_mathjax() ), sidebarMenu(id = "tabs", menuItem(text = "KPIs", @@ -148,13 +160,6 @@ dygraphOutput("paulscore_approx_plot_fulltext"), div(id = "paulscore_approx_legend", style = "text-align: center;"), dygraphOutput("paulscore_approx_plot_autocomplete"), -withMathJax(), -tags$div(HTML(" - -MathJax.Hub.Config({ - tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]} -}); - ")), includeHTML("./tab_documentation/paulscore_approx.html")), tabItem(tabName = "mobile_events", fluidRow( -- To view, visit https://gerrit.wikimedia.org/r/311621 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9f2c06b9627340a5eacbbce484fa4fad6cffac5f Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/discovery/rainbow Gerrit-Branch: master Gerrit-Owner: BearlogaGerrit-Reviewer: Bearloga ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: varnish-backend-restart: increase sleep times
BBlack has submitted this change and it was merged. Change subject: varnish-backend-restart: increase sleep times .. varnish-backend-restart: increase sleep times We still see very small 503 spikes on most of the cron-automated restarts, and insufficient sleep is a likely reason why. Change-Id: Ifebc99a932440dc03650012be528f04b5c03b083 --- M modules/varnish/files/varnish-backend-restart 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: BBlack: Verified; Looks good to me, approved diff --git a/modules/varnish/files/varnish-backend-restart b/modules/varnish/files/varnish-backend-restart index 4a3f333..31645e0 100644 --- a/modules/varnish/files/varnish-backend-restart +++ b/modules/varnish/files/varnish-backend-restart @@ -7,14 +7,14 @@ confctl --quiet select name=`hostname -f`,service='varnish-be-rand' set/pooled=no # Wait a bit for the services to be drained -sleep 15 +sleep 30 # Restart varnish and wipe storage /usr/sbin/service varnish stop rm -f /srv/sd*/varnish* /usr/sbin/service varnish start -sleep 5 +sleep 10 # Fix VSM files permissions and restart ganglia chmod 644 /var/lib/varnish/*/*.vsm -- To view, visit https://gerrit.wikimedia.org/r/311623 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifebc99a932440dc03650012be528f04b5c03b083 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlackGerrit-Reviewer: BBlack ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: varnish-backend-restart: increase sleep times
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/311623 Change subject: varnish-backend-restart: increase sleep times .. varnish-backend-restart: increase sleep times We still see very small 503 spikes on most of the cron-automated restarts, and insufficient sleep is a likely reason why. Change-Id: Ifebc99a932440dc03650012be528f04b5c03b083 --- M modules/varnish/files/varnish-backend-restart 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/23/311623/1 diff --git a/modules/varnish/files/varnish-backend-restart b/modules/varnish/files/varnish-backend-restart index 4a3f333..31645e0 100644 --- a/modules/varnish/files/varnish-backend-restart +++ b/modules/varnish/files/varnish-backend-restart @@ -7,14 +7,14 @@ confctl --quiet select name=`hostname -f`,service='varnish-be-rand' set/pooled=no # Wait a bit for the services to be drained -sleep 15 +sleep 30 # Restart varnish and wipe storage /usr/sbin/service varnish stop rm -f /srv/sd*/varnish* /usr/sbin/service varnish start -sleep 5 +sleep 10 # Fix VSM files permissions and restart ganglia chmod 644 /var/lib/varnish/*/*.vsm -- To view, visit https://gerrit.wikimedia.org/r/311623 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifebc99a932440dc03650012be528f04b5c03b083 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Remove primary link from the bundle of page linked notification
jenkins-bot has submitted this change and it was merged. Change subject: Remove primary link from the bundle of page linked notification .. Remove primary link from the bundle of page linked notification Also, make sure that the bundle follows the same behavior as the xwiki bundle, where if it does not have a primary link, the 'click' event triggers the 'expand' action. Bug: T145902 Change-Id: I456bf76a7bd531ffcad5462708f37cd54d8af99d --- M includes/formatters/PageLinkedPresentationModel.php M modules/ui/mw.echo.ui.BundleNotificationItemWidget.js 2 files changed, 14 insertions(+), 4 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/formatters/PageLinkedPresentationModel.php b/includes/formatters/PageLinkedPresentationModel.php index df9d757..bf7f73d 100644 --- a/includes/formatters/PageLinkedPresentationModel.php +++ b/includes/formatters/PageLinkedPresentationModel.php @@ -22,10 +22,14 @@ } public function getPrimaryLink() { - return array( - 'url' => $this->getPageFrom()->getFullURL(), - 'label' => $this->msg( 'notification-link-text-view-page' )->text(), - ); + if ( $this->isBundled() ) { + return false; + } else { + return array( + 'url' => $this->getPageFrom()->getFullURL(), + 'label' => $this->msg( 'notification-link-text-view-page' )->text(), + ); + } } public function getSecondaryLinks() { diff --git a/modules/ui/mw.echo.ui.BundleNotificationItemWidget.js b/modules/ui/mw.echo.ui.BundleNotificationItemWidget.js index 195280f..870cbc7 100644 --- a/modules/ui/mw.echo.ui.BundleNotificationItemWidget.js +++ b/modules/ui/mw.echo.ui.BundleNotificationItemWidget.js @@ -69,6 +69,12 @@ // Events this.toggleExpandButton.connect( this, { click: 'expand' } ); + if ( !this.model.getPrimaryUrl() ) { + // If there's no primary link, make sure a click + // triggers the 'expand' action + this.$content.on( 'click', this.expand.bind( this ) ); + } + // Initialization this.populateFromModel(); this.toggleExpanded( false ); -- To view, visit https://gerrit.wikimedia.org/r/311198 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I456bf76a7bd531ffcad5462708f37cd54d8af99d Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: MooeypooGerrit-Reviewer: Catrope Gerrit-Reviewer: Mooeypoo 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...Kartographer[master]: Implement ResoureLoader module to get ext map links
jenkins-bot has submitted this change and it was merged. Change subject: Implement ResoureLoader module to get ext map links .. Implement ResoureLoader module to get ext map links For now, something to get us started: * external links are stored in a file externalLinks.json * File must have the following structure: To test: add "ext.kartographer.extlinks" as a new dependency in extension.json's ext.kartographer.box { "services": [ { "name": "openstreetmap", // localization key of the service - as defined in i18n, without the 'kartographer-link-' prefix "links": [ { "type": "map",// can also be: satellite, terrain, other, or anything else defined in i18n without the 'kartographer-linktype-' prefix "url": "http://...;, // this value may include values like {latdegdec}, {londegdec}, etc }, ... Bug: T145667 Change-Id: I99e7d67c9296fe2e1a48a644e60de1ae550f3e59 --- M extension.json A externalLinks.json M i18n/en.json M i18n/qqq.json A includes/DataModuleLinks.php 5 files changed, 436 insertions(+), 0 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/extension.json b/extension.json index a56ab62..969f7ec 100644 --- a/extension.json +++ b/extension.json @@ -27,6 +27,7 @@ "Kartographer\\ApiSanitizeMapData": "includes/ApiSanitizeMapData.php", "Kartographer\\CoordFormatter": "includes/CoordFormatter.php", "Kartographer\\DataModule": "includes/DataModule.php", + "Kartographer\\DataModuleLinks": "includes/DataModuleLinks.php", "Kartographer\\Hooks": "includes/Hooks.php", "Kartographer\\SimpleStyleParser": "includes/SimpleStyleParser.php", "Kartographer\\SpecialMap": "includes/SpecialMap.php", @@ -48,6 +49,9 @@ "ext.kartographer": { "class": "Kartographer\\DataModule" }, + "ext.kartographer.extlinks": { + "class": "Kartographer\\DataModuleLinks" + }, "ext.kartographer.style": { "styles": [ "styles/kartographer.less", diff --git a/externalLinks.json b/externalLinks.json new file mode 100644 index 000..e49cc09 --- /dev/null +++ b/externalLinks.json @@ -0,0 +1,294 @@ +{ + "services": [ + { + "name": "acme-mapper", + "links": [ + { + "type": "map", + "url": "http://mapper.acme.com/?ll={latdegdec},{londegdec}={osmzoom}=M={latdegdec},{londegdec},{titlee}; + }, + { + "type": "satellite", + "url": "http://mapper.acme.com/?ll={latdegdec},{londegdec}={osmzoom}=H={latdegdec},{londegdec},{titlee}; + }, + { + "type": "terrain", + "url": "http://mapper.acme.com/?ll={latdegdec},{londegdec}={osmzoom}=R={latdegdec},{londegdec},{titlee}; + }, + { + "type": "topo", + "url": "http://mapper.acme.com/?ll={latdegdec},{londegdec}={osmzoom}=T={latdegdec},{londegdec},{titlee}; + } + ] + }, + { + "name": "apple-maps", + "links": [ + { + "type": "map", + "url": "https://maps.apple.com/?q={latdegdec},{londegdec}; + }, + { + "type": "satellite", + "url": "https://maps.apple.com/?q={latdegdec},{londegdec}=k; + } + ] + }, + { + "name": "arctic-io", + "links": [ + { + "type": "satellite", + "url": "http://www.arctic.io/wikipedia/?lon={londegdec}={latdegdec}={titlee}; + } + ] + }, + { + "name": "bing-maps", + "featured": true, + "links": [ + { + "type": "map", +
[MediaWiki-commits] [Gerrit] mediawiki...ArticleRatings[master]: Delete the old PHP i18n file for good
Jack Phoenix has uploaded a new change for review. https://gerrit.wikimedia.org/r/311622 Change subject: Delete the old PHP i18n file for good .. Delete the old PHP i18n file for good Bug: T145313 Change-Id: I9bd3062132c71e9865c9aad8bded54f8918b3a40 --- D ArticleRatings.i18n.php 1 file changed, 0 insertions(+), 49 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ArticleRatings refs/changes/22/311622/1 diff --git a/ArticleRatings.i18n.php b/ArticleRatings.i18n.php deleted file mode 100644 index 04a40fd..000 --- a/ArticleRatings.i18n.php +++ /dev/null @@ -1,49 +0,0 @@ - 'ChangeRating', - 'changerating-back' => '< Back to [[$1]].', - 'changerating-intro-text' => "What would you like to change ''$1'''s rating to?", - 'changerating-missing-parameter' => 'No page name was given. The page should be specified in the URL.', - 'changerating-no-such-page' => 'Sorry, the page "$1" does not exist.', - 'changerating-reason' => 'Reason:', - 'changerating-success' => 'Rating changed successfully.', - 'changerating-submit' => 'Submit', - 'massratings' => 'MassRatings', - 'massratings-legend' => 'List pages by rating', - 'log-name-ratings' => 'Rating Change Log', - 'log-description-ratings' => 'This log shows all the recent changes to pages\' ratings.', - 'logentry-ratings-change' => '$1 changed the rating of $3 from $5 to $4', - 'ratings-desc' => 'A complex interface for rating pages', - 'are-disallowed' => 'Ratings have been disallowed for this namespace', - 'are-no-such-page' => 'The page "$1" does not exist.', - 'are-rating-for-page' => 'Rating for "$1":', - 'are-change-rating' => 'Change Rating', - 'are-ratings' => '', - 'group-reviewer' => 'Reviewer', - 'group-reviewer-member' => 'Reviewers', - 'action-change-rating' => 'change article ratings', - 'changerating-log-text' => 'Past rating changes on this article:', - 'changerating-nolog-text' => 'There are no past rating changes on this article.' -); - -/** Vietnamese (Tiếng Việt) - * @author Codyn329 - */ -$message['vi'] = array( - 'changerating' => 'Đánh giá sự thay đổi', - 'massratings' => 'số đông đánh giá', - 'log-name-ratings' => 'sự thay đổi Đánh giá ghi', - 'log-descripiton-ratings' => 'Nhật ký này cho thấy tất cả các thay đổi gần đây để các trang\'s Dánh giá.', - 'logentry-ratings-change' => '$1 thay đổi đánh giá của $3 đến $4', - 'rating-desc' =>'Một giao diện phức tạp để đánh giá các trang' -); -- To view, visit https://gerrit.wikimedia.org/r/311622 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9bd3062132c71e9865c9aad8bded54f8918b3a40 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ArticleRatings Gerrit-Branch: master Gerrit-Owner: Jack Phoenix___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...rainbow[master]: Switch to WMF-hosted MathJax
Bearloga has uploaded a new change for review. https://gerrit.wikimedia.org/r/311621 Change subject: Switch to WMF-hosted MathJax .. Switch to WMF-hosted MathJax Loads MathJax from Wikimedia ToolLabs CDNjs (http://tools.wmflabs.org/cdnjs/) to comply with ToS and Privacy Policy. Change-Id: I9f2c06b9627340a5eacbbce484fa4fad6cffac5f --- M ui.R 1 file changed, 13 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/rainbow refs/changes/21/311621/1 diff --git a/ui.R b/ui.R index 75d69b0..1d951a2 100644 --- a/ui.R +++ b/ui.R @@ -2,6 +2,17 @@ library(shinydashboard) library(dygraphs) +with_wikimedia_mathjax <- function() { + # Modified version of withMathJax() Keeping this + # here for now. If another dashboard needs to + # render LaTeX, we'll have to put this in polloi. + return(tagList( +tags$script(src = "https://tools-static.wmflabs.org/cdnjs/ajax/libs/mathjax/2.6.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML;, type = "text/javascript"), +tags$script(HTML("if (window.MathJax) MathJax.Hub.Queue([\"Typeset\", MathJax.Hub]);")), +tags$script(HTML("MathJax.Hub.Config({ tex2jax: {inlineMath: [['$','$']]} });"), type = "text/x-mathjax-config") + )) +} + function(request) { dashboardPage( @@ -10,7 +21,8 @@ dashboardSidebar( tags$head( tags$link(rel = "stylesheet", type = "text/css", href = "stylesheet.css"), -tags$script(src = "custom.js") +tags$script(src = "custom.js"), +with_wikimedia_mathjax() ), sidebarMenu(id = "tabs", menuItem(text = "KPIs", @@ -148,13 +160,6 @@ dygraphOutput("paulscore_approx_plot_fulltext"), div(id = "paulscore_approx_legend", style = "text-align: center;"), dygraphOutput("paulscore_approx_plot_autocomplete"), -withMathJax(), -tags$div(HTML(" - -MathJax.Hub.Config({ - tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]} -}); - ")), includeHTML("./tab_documentation/paulscore_approx.html")), tabItem(tabName = "mobile_events", fluidRow( -- To view, visit https://gerrit.wikimedia.org/r/311621 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9f2c06b9627340a5eacbbce484fa4fad6cffac5f Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/discovery/rainbow Gerrit-Branch: master Gerrit-Owner: Bearloga___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Puppet Panel: Remove the ?-in-circle
Andrew Bogott has submitted this change and it was merged. Change subject: Puppet Panel: Remove the ?-in-circle .. Puppet Panel: Remove the ?-in-circle This is nice when it works, but most browsers cannot render that icon. After this patch, docs will appear as hover text over the puppet role name. Change-Id: Ic7c7bee8aab7832aaa42d9a6b083a43e28cd90a7 --- M modules/openstack/files/liberty/horizon/puppettab/puppet_roles.py 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Andrew Bogott: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/openstack/files/liberty/horizon/puppettab/puppet_roles.py b/modules/openstack/files/liberty/horizon/puppettab/puppet_roles.py index 69bf466..371d4ff 100644 --- a/modules/openstack/files/liberty/horizon/puppettab/puppet_roles.py +++ b/modules/openstack/files/liberty/horizon/puppettab/puppet_roles.py @@ -113,9 +113,9 @@ obj.docs = newdoc simplename = obj.name.split('role::')[1] -html = '%s ' % ( -escape(simplename), -escape(obj.docs) +html = '%s' % ( +escape(obj.docs), +escape(simplename) ) obj.html_name = mark_safe(html) -- To view, visit https://gerrit.wikimedia.org/r/311618 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic7c7bee8aab7832aaa42d9a6b083a43e28cd90a7 Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew BogottGerrit-Reviewer: Alex Monk Gerrit-Reviewer: Andrew Bogott Gerrit-Reviewer: Volans Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Change DatabaseBase::factory call to Database::factory in Lo...
jenkins-bot has submitted this change and it was merged. Change subject: Change DatabaseBase::factory call to Database::factory in LoadBalancer .. Change DatabaseBase::factory call to Database::factory in LoadBalancer Change-Id: Id4bbc08b5aa913e2e3e47a7873db600fe957c985 --- M includes/libs/rdbms/loadbalancer/LoadBalancer.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/libs/rdbms/loadbalancer/LoadBalancer.php b/includes/libs/rdbms/loadbalancer/LoadBalancer.php index 75ecd27..2bc378a 100644 --- a/includes/libs/rdbms/loadbalancer/LoadBalancer.php +++ b/includes/libs/rdbms/loadbalancer/LoadBalancer.php @@ -848,7 +848,7 @@ // Create a live connection object try { - $db = DatabaseBase::factory( $server['type'], $server ); + $db = Database::factory( $server['type'], $server ); } catch ( DBConnectionError $e ) { // FIXME: This is probably the ugliest thing I have ever done to // PHP. I'm half-expecting it to segfault, just out of disgust. -- TS -- To view, visit https://gerrit.wikimedia.org/r/311493 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id4bbc08b5aa913e2e3e47a7873db600fe957c985 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron SchulzGerrit-Reviewer: Ori.livneh 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...DeepSea[master]: Remove Customs, Ideas, and Meta links from DeepSea left-side...
Jack Phoenix has submitted this change and it was merged. Change subject: Remove Customs, Ideas, and Meta links from DeepSea left-side header .. Remove Customs, Ideas, and Meta links from DeepSea left-side header Bug: T143377 Change-Id: I19606d5f7392e506995181501c51772e168c6c33 --- M DeepSea.skin.php 1 file changed, 0 insertions(+), 12 deletions(-) Approvals: Jack Phoenix: Verified; Looks good to me, approved diff --git a/DeepSea.skin.php b/DeepSea.skin.php index 514e5f3..757d6f7 100644 --- a/DeepSea.skin.php +++ b/DeepSea.skin.php @@ -473,21 +473,9 @@ break; case 'MEDIA': $bmProjectsData = array( - 'meta' => array( - 'name' => 'Meta', - 'hover' => 'Brickimedia\'s coordination site' - ), 'en' => array( 'name' => 'Brickipedia', 'hover' => 'The LEGO Wiki' - ), - 'customs' => array( - 'name' => 'Customs', - 'hover' => 'Upload your own creations' - ), - 'ideas' => array( - 'name' => 'Ideas', - 'hover' => 'The LEGO Ideas Wiki' ), 'gbc' => array( 'name' => 'GBC', -- To view, visit https://gerrit.wikimedia.org/r/311620 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I19606d5f7392e506995181501c51772e168c6c33 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/DeepSea Gerrit-Branch: master Gerrit-Owner: Jack PhoenixGerrit-Reviewer: Jack Phoenix ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...DeepSea[master]: Remove Customs, Ideas, and Meta links from DeepSea left-side...
Jack Phoenix has uploaded a new change for review. https://gerrit.wikimedia.org/r/311620 Change subject: Remove Customs, Ideas, and Meta links from DeepSea left-side header .. Remove Customs, Ideas, and Meta links from DeepSea left-side header Bug: T143377 Change-Id: I19606d5f7392e506995181501c51772e168c6c33 --- M DeepSea.skin.php 1 file changed, 0 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/DeepSea refs/changes/20/311620/1 diff --git a/DeepSea.skin.php b/DeepSea.skin.php index 514e5f3..757d6f7 100644 --- a/DeepSea.skin.php +++ b/DeepSea.skin.php @@ -473,21 +473,9 @@ break; case 'MEDIA': $bmProjectsData = array( - 'meta' => array( - 'name' => 'Meta', - 'hover' => 'Brickimedia\'s coordination site' - ), 'en' => array( 'name' => 'Brickipedia', 'hover' => 'The LEGO Wiki' - ), - 'customs' => array( - 'name' => 'Customs', - 'hover' => 'Upload your own creations' - ), - 'ideas' => array( - 'name' => 'Ideas', - 'hover' => 'The LEGO Ideas Wiki' ), 'gbc' => array( 'name' => 'GBC', -- To view, visit https://gerrit.wikimedia.org/r/311620 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I19606d5f7392e506995181501c51772e168c6c33 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/DeepSea Gerrit-Branch: master Gerrit-Owner: Jack Phoenix___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove unused DatabaseBase::debug() method
jenkins-bot has submitted this change and it was merged. Change subject: Remove unused DatabaseBase::debug() method .. Remove unused DatabaseBase::debug() method This just trivially wrapped getFlags()/setFlags() anyway Change-Id: Iab5b508f6746098b66da00c8bf038215cb2359ef --- M includes/libs/rdbms/database/DatabaseBase.php 1 file changed, 0 insertions(+), 19 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/libs/rdbms/database/DatabaseBase.php b/includes/libs/rdbms/database/DatabaseBase.php index ef72998..e008705 100644 --- a/includes/libs/rdbms/database/DatabaseBase.php +++ b/includes/libs/rdbms/database/DatabaseBase.php @@ -30,25 +30,6 @@ */ abstract class DatabaseBase extends Database { /** -* Boolean, controls output of large amounts of debug information. -* @param bool|null $debug -* - true to enable debugging -* - false to disable debugging -* - omitted or null to do nothing -* -* @return bool Previous value of the flag -* @deprecated since 1.28; use setFlag() -*/ - public function debug( $debug = null ) { - $res = $this->getFlag( DBO_DEBUG ); - if ( $debug !== null ) { - $debug ? $this->setFlag( DBO_DEBUG ) : $this->clearFlag( DBO_DEBUG ); - } - - return $res; - } - - /** * Get search engine class. All subclasses of this need to implement this * if they wish to use searching. * -- To view, visit https://gerrit.wikimedia.org/r/311601 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iab5b508f6746098b66da00c8bf038215cb2359ef Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron SchulzGerrit-Reviewer: MaxSem 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...Collection[master]: Split templates into individual files
jenkins-bot has submitted this change and it was merged. Change subject: Split templates into individual files .. Split templates into individual files Change-Id: I931961fb67acf87781e673fd66056f84a710ace7 --- M Collection.php D Collection.templates.php A templates/CollectionFailedTemplate.php A templates/CollectionFinishedTemplate.php A templates/CollectionListTemplate.php A templates/CollectionLoadOverwriteTemplate.php A templates/CollectionPageTemplate.php A templates/CollectionRenderingTemplate.php A templates/CollectionSaveOverwriteTemplate.php A templates/CollectionSuggestTemplate.php 10 files changed, 674 insertions(+), 631 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/Collection.php b/Collection.php index 4b914e4..504516d 100644 --- a/Collection.php +++ b/Collection.php @@ -180,14 +180,20 @@ $wgAutoloadClasses['CollectionHooks'] = $dir . 'Collection.hooks.php'; $wgAutoloadClasses['CollectionSuggest'] = $dir . 'Collection.suggest.php'; $wgAutoloadClasses['CollectionProposals'] = $dir . 'Collection.suggest.php'; -$wgAutoloadClasses['CollectionPageTemplate'] = $dir . 'Collection.templates.php'; -$wgAutoloadClasses['CollectionListTemplate'] = $dir . 'Collection.templates.php'; -$wgAutoloadClasses['CollectionLoadOverwriteTemplate'] = $dir . 'Collection.templates.php'; -$wgAutoloadClasses['CollectionSaveOverwriteTemplate'] = $dir . 'Collection.templates.php'; -$wgAutoloadClasses['CollectionRenderingTemplate'] = $dir . 'Collection.templates.php'; -$wgAutoloadClasses['CollectionFinishedTemplate'] = $dir . 'Collection.templates.php'; -$wgAutoloadClasses['CollectionFailedTemplate'] = $dir . 'Collection.templates.php'; -$wgAutoloadClasses['CollectionSuggestTemplate'] = $dir . 'Collection.templates.php'; + +$wgAutoloadClasses['CollectionPageTemplate'] = $dir . 'templates/CollectionPageTemplate.php'; +$wgAutoloadClasses['CollectionListTemplate'] = $dir . 'templates/CollectionListTemplate.php'; +$wgAutoloadClasses['CollectionLoadOverwriteTemplate'] = + $dir . 'templates/CollectionLoadOverwriteTemplate.php'; +$wgAutoloadClasses['CollectionSaveOverwriteTemplate'] = + $dir . 'templates/CollectionSaveOverwriteTemplate.php'; +$wgAutoloadClasses['CollectionRenderingTemplate'] = + $dir . 'templates/CollectionRenderingTemplate.php'; +$wgAutoloadClasses['CollectionFinishedTemplate'] = + $dir . 'templates/CollectionFinishedTemplate.php'; +$wgAutoloadClasses['CollectionFailedTemplate'] = $dir . 'templates/CollectionFailedTemplate.php'; +$wgAutoloadClasses['CollectionSuggestTemplate'] = $dir . 'templates/CollectionSuggestTemplate.php'; + $wgAutoloadClasses['CollectionRenderingAPI'] = $dir . 'RenderingAPI.php'; $wgAutoloadClasses['MWServeRenderingAPI'] = $dir . 'RenderingAPI.php'; $wgAutoloadClasses['NewRenderingAPI'] = $dir . 'RenderingAPI.php'; diff --git a/Collection.templates.php b/Collection.templates.php deleted file mode 100644 index 9bab458..000 --- a/Collection.templates.php +++ /dev/null @@ -1,623 +0,0 @@ - $this->data['collection']['title'], - 'collectionSubtitle' => $this->data['collection']['subtitle'], - ); - $fields = array( - 'collectionTitle' => array( - 'type' => 'text', - 'label-message' => 'coll-title', - 'id' => 'titleInput', - 'size' => '', - 'name' => 'collectionTitle', - ), - 'collectionSubtitle' => array( - 'type' => 'text', - 'label-message' => 'coll-subtitle', - 'id' => 'subtitleInput', - 'size' => '', - 'name' => 'collectionSubtitle', - ), - ); - foreach ( $this->data['settings'] as $fieldname => $descriptor ) { - if ( isset( $descriptor['options'] ) && is_array( $descriptor['options'] ) ) { - $options = array(); - foreach ( $descriptor['options'] as $msg => $value ) { - $msg = wfMessage( $msg )->text(); - $options[$msg] = $value; - } - $descriptor['options'] = $options; - } - $descriptor['id'] = "coll-input-setting-$fieldname"; - $descriptor['name'] = $fieldname; - $fields[$fieldname] = $descriptor; - if ( isset( $this->data['collection']['settings'][$fieldname] ) ) { - $data[$fieldname] =
[MediaWiki-commits] [Gerrit] operations/puppet[production]: upload frontend: limit at 256KB
BBlack has submitted this change and it was merged. Change subject: upload frontend: limit at 256KB .. upload frontend: limit at 256KB more ongoing experimentation. 1MB seems to work pretty decently. I've tried 512KB before, but reverted after seeing very little effect. I may not have waited long enough to see it, though. Also, recent data analysis for the backends indicates 256K might be a much better value here anyways. Change-Id: I378525339347361286ef2a5187fb7912244dcd54 --- M modules/varnish/templates/upload-frontend.inc.vcl.erb 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: BBlack: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/varnish/templates/upload-frontend.inc.vcl.erb b/modules/varnish/templates/upload-frontend.inc.vcl.erb index 8e4e2c9..f9cac18 100644 --- a/modules/varnish/templates/upload-frontend.inc.vcl.erb +++ b/modules/varnish/templates/upload-frontend.inc.vcl.erb @@ -98,8 +98,8 @@ <%- end -%> } - // hit-for-pass objects >= 1MB size - if (std.integer(beresp.http.Content-Length, 1048576) >= 1048576 || beresp.http.Content-Length ~ "^[0-9]{9}") { + // hit-for-pass objects >= 256K size + if (std.integer(beresp.http.Content-Length, 262144) >= 262144 || beresp.http.Content-Length ~ "^[0-9]{9}") { set beresp.http.X-CDIS = "pass"; <%- if @varnish_version4 -%> set beresp.uncacheable = true; -- To view, visit https://gerrit.wikimedia.org/r/311619 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I378525339347361286ef2a5187fb7912244dcd54 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlackGerrit-Reviewer: BBlack 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]: upload frontend: limit at 256KB
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/311619 Change subject: upload frontend: limit at 256KB .. upload frontend: limit at 256KB more ongoing experimentation. 1MB seems to work pretty decently. I've tried 512KB before, but reverted after seeing very little effect. I may not have waited long enough to see it, though. Also, recent data analysis for the backends indicates 256K might be a much better value here anyways. Change-Id: I378525339347361286ef2a5187fb7912244dcd54 --- M modules/varnish/templates/upload-frontend.inc.vcl.erb 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/19/311619/1 diff --git a/modules/varnish/templates/upload-frontend.inc.vcl.erb b/modules/varnish/templates/upload-frontend.inc.vcl.erb index 8e4e2c9..f9cac18 100644 --- a/modules/varnish/templates/upload-frontend.inc.vcl.erb +++ b/modules/varnish/templates/upload-frontend.inc.vcl.erb @@ -98,8 +98,8 @@ <%- end -%> } - // hit-for-pass objects >= 1MB size - if (std.integer(beresp.http.Content-Length, 1048576) >= 1048576 || beresp.http.Content-Length ~ "^[0-9]{9}") { + // hit-for-pass objects >= 256K size + if (std.integer(beresp.http.Content-Length, 262144) >= 262144 || beresp.http.Content-Length ~ "^[0-9]{9}") { set beresp.http.X-CDIS = "pass"; <%- if @varnish_version4 -%> set beresp.uncacheable = true; -- To view, visit https://gerrit.wikimedia.org/r/311619 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I378525339347361286ef2a5187fb7912244dcd54 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Puppet Panel: Remove the ?-in-circle
Andrew Bogott has uploaded a new change for review. https://gerrit.wikimedia.org/r/311618 Change subject: Puppet Panel: Remove the ?-in-circle .. Puppet Panel: Remove the ?-in-circle This is nice when it works, but most browsers cannot render that icon. After this patch, docs will appear as hover text over the puppet role name. Change-Id: Ic7c7bee8aab7832aaa42d9a6b083a43e28cd90a7 --- M modules/openstack/files/liberty/horizon/puppettab/puppet_roles.py 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/18/311618/1 diff --git a/modules/openstack/files/liberty/horizon/puppettab/puppet_roles.py b/modules/openstack/files/liberty/horizon/puppettab/puppet_roles.py index 69bf466..0283b58 100644 --- a/modules/openstack/files/liberty/horizon/puppettab/puppet_roles.py +++ b/modules/openstack/files/liberty/horizon/puppettab/puppet_roles.py @@ -113,11 +113,11 @@ obj.docs = newdoc simplename = obj.name.split('role::')[1] -html = '%s ' % ( -escape(simplename), -escape(obj.docs) -) obj.html_name = mark_safe(html) +html = '%s' % ( +escape(obj.docs), +escape(simplename) +) roles.append(obj) -- To view, visit https://gerrit.wikimedia.org/r/311618 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic7c7bee8aab7832aaa42d9a6b083a43e28cd90a7 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew Bogott___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: labspuppetbackend: Set charset explicitly
Yuvipanda has submitted this change and it was merged. Change subject: labspuppetbackend: Set charset explicitly .. labspuppetbackend: Set charset explicitly Also make sure empty checks check for both str and byte Change-Id: Icad5a92bbd5282e0726ffd3071c98d627cf35346 --- M modules/labspuppetbackend/files/labspuppetbackend.py 1 file changed, 6 insertions(+), 2 deletions(-) Approvals: Andrew Bogott: Looks good to me, but someone else must approve Yuvipanda: Verified; Looks good to me, approved diff --git a/modules/labspuppetbackend/files/labspuppetbackend.py b/modules/labspuppetbackend/files/labspuppetbackend.py index c5e43b2..e159f4d 100644 --- a/modules/labspuppetbackend/files/labspuppetbackend.py +++ b/modules/labspuppetbackend/files/labspuppetbackend.py @@ -28,7 +28,8 @@ host=os.environ['MYSQL_HOST'], db=os.environ['MYSQL_DB'], user=os.environ['MYSQL_USERNAME'], -passwd=os.environ['MYSQL_PASSWORD'] +passwd=os.environ['MYSQL_PASSWORD'], +charset='utf8' ) @@ -250,7 +251,10 @@ """, (project, )) # Do the inverse of _preprocess_prefix, so callers get a consistent view return Response( -yaml.safe_dump({'prefixes': ['_' if r[0] == b'' else r[0] for r in cur.fetchall()]}), +yaml.safe_dump({ +'prefixes': +['_' if r[0] == b'' or r[0] == '' + else r[0] for r in cur.fetchall()]}), status=200, mimetype='application/x-yaml' ) -- To view, visit https://gerrit.wikimedia.org/r/311614 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icad5a92bbd5282e0726ffd3071c98d627cf35346 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: YuvipandaGerrit-Reviewer: Andrew Bogott Gerrit-Reviewer: Volans Gerrit-Reviewer: Yuvipanda Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix broken $wgExternalServers example setting
jenkins-bot has submitted this change and it was merged. Change subject: Fix broken $wgExternalServers example setting .. Fix broken $wgExternalServers example setting Just reference $wgDBservers instead, which uses the same format. Change-Id: Iaa32cb067f9487b459925310ac4c52efe3f4a3f1 --- M includes/DefaultSettings.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 135c3e5..f0e9e83 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -2085,7 +2085,7 @@ * Create a cluster named 'cluster1' containing three servers: * @code * $wgExternalServers = [ - * 'cluster1' => [ 'srv28', 'srv29', 'srv30' ] + * 'cluster1' => * ]; * @endcode * -- To view, visit https://gerrit.wikimedia.org/r/311613 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iaa32cb067f9487b459925310ac4c52efe3f4a3f1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron SchulzGerrit-Reviewer: MaxSem 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...parsoid[master]: Skip mock for rt testing bin
jenkins-bot has submitted this change and it was merged. Change subject: Skip mock for rt testing bin .. Skip mock for rt testing bin * Codepath only necessary when supplying a custom wiki. Change-Id: Iae12dbe14884f81549212c3d1b17bbec338ed209 --- M bin/roundtrip-test.js 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified diff --git a/bin/roundtrip-test.js b/bin/roundtrip-test.js index ce55e48..77e5305 100755 --- a/bin/roundtrip-test.js +++ b/bin/roundtrip-test.js @@ -765,6 +765,8 @@ if (argv.apiURL) { serverOpts.mockURL = argv.apiURL; argv.domain = 'customwiki'; + } else { + serverOpts.skipMock = true; } return serviceWrapper.runServices(serverOpts).then(function(ret) { argv.parsoidURL = ret.parsoidURL; -- To view, visit https://gerrit.wikimedia.org/r/311610 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iae12dbe14884f81549212c3d1b17bbec338ed209 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: ArlolraGerrit-Reviewer: Subramanya Sastry 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...VisualEditor[master]: Update `progressive` color to WCAG 2.0 level AA compliant co...
VolkerE has uploaded a new change for review. https://gerrit.wikimedia.org/r/311617 Change subject: Update `progressive` color to WCAG 2.0 level AA compliant color palette .. Update `progressive` color to WCAG 2.0 level AA compliant color palette Aligning instances of `progressive` color to WCAG 2.0 level AA compliant color palette similar to changes in I6fdb90af8b9dc5e5e026eb0c1bd13138c73da4cd Change-Id: I2eda190f0a68de6dc8aa33724f2c8975327a061f --- M modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init-vector.css M modules/ve-mw/ui/styles/dialogs/ve.ui.MWGalleryDialog.css M modules/ve-mw/ui/styles/tools/ve.ui.MWEducationPopupTool.css M modules/ve-mw/ui/styles/widgets/ve.ui.MWAceEditorWidget.css 4 files changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/17/311617/1 diff --git a/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init-vector.css b/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init-vector.css index c936ed5..2fcc73c 100644 --- a/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init-vector.css +++ b/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init-vector.css @@ -7,7 +7,7 @@ .ve-init-mw-desktopArticleTarget-progress { height: 0.75em; - border: 1px solid #347bff; + border: 1px solid #36c; background: #fff; border-radius: 2px; box-shadow: 0 0.1em 0 0 rgba( 0, 0, 0, 0.15 ); @@ -15,5 +15,5 @@ .ve-init-mw-desktopArticleTarget-progress-bar { height: 0.75em; - background: #347bff; + background: #36c; } diff --git a/modules/ve-mw/ui/styles/dialogs/ve.ui.MWGalleryDialog.css b/modules/ve-mw/ui/styles/dialogs/ve.ui.MWGalleryDialog.css index ba447cf..2b48a72 100644 --- a/modules/ve-mw/ui/styles/dialogs/ve.ui.MWGalleryDialog.css +++ b/modules/ve-mw/ui/styles/dialogs/ve.ui.MWGalleryDialog.css @@ -22,8 +22,8 @@ } .ve-ui-mwGalleryDialog-image-container-highlighted { - border-color: #347bff; - box-shadow: inset 0 0 0 0.1em #347bff; + border-color: #36c; + box-shadow: inset 0 0 0 0.1em #36c; } .ve-ui-mwGalleryDialog-highlighted-image { diff --git a/modules/ve-mw/ui/styles/tools/ve.ui.MWEducationPopupTool.css b/modules/ve-mw/ui/styles/tools/ve.ui.MWEducationPopupTool.css index 784916e..a86cbc6 100644 --- a/modules/ve-mw/ui/styles/tools/ve.ui.MWEducationPopupTool.css +++ b/modules/ve-mw/ui/styles/tools/ve.ui.MWEducationPopupTool.css @@ -9,7 +9,7 @@ width: 2.5em; height: 2.5em; border-radius: 50%; - background-color: #347bff; + background-color: #36c; position: absolute; opacity: 0; /* stylelint-disable no-unsupported-browser-features */ @@ -26,7 +26,7 @@ width: 0.8em; height: 0.8em; border-radius: 50%; - background-color: #347bff; + background-color: #36c; position: absolute; } diff --git a/modules/ve-mw/ui/styles/widgets/ve.ui.MWAceEditorWidget.css b/modules/ve-mw/ui/styles/widgets/ve.ui.MWAceEditorWidget.css index f4edb0d..4f81e64 100644 --- a/modules/ve-mw/ui/styles/widgets/ve.ui.MWAceEditorWidget.css +++ b/modules/ve-mw/ui/styles/widgets/ve.ui.MWAceEditorWidget.css @@ -15,7 +15,7 @@ .ve-ui-mwAceEditorWidget .ace_focus { /* TODO: Move to mediawiki theme only */ - border-color: #347bff; + border-color: #36c; /* HACK: Make border grow out as inset doesn't overlap absolute positioned children */ border-width: 2px; margin: 0; -- To view, visit https://gerrit.wikimedia.org/r/311617 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2eda190f0a68de6dc8aa33724f2c8975327a061f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: VolkerE___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: upload storage: no restart cron w/ experiment
BBlack has submitted this change and it was merged. Change subject: upload storage: no restart cron w/ experiment .. upload storage: no restart cron w/ experiment Bug: T145661 Change-Id: I9551d542bea3c1e21cdeac8d01a5c807291eaf30 --- M modules/role/manifests/cache/upload.pp 1 file changed, 13 insertions(+), 6 deletions(-) Approvals: BBlack: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/role/manifests/cache/upload.pp b/modules/role/manifests/cache/upload.pp index c704875..59879c2 100644 --- a/modules/role/manifests/cache/upload.pp +++ b/modules/role/manifests/cache/upload.pp @@ -162,12 +162,19 @@ $be_restart_m = $times['minute'] $be_restart_d = $times['weekday'] -file { '/etc/cron.d/varnish-backend-restart': -mode=> '0444', -owner => 'root', -group => 'root', -content => template('varnish/varnish-backend-restart.cron.erb'), -require => File['/usr/local/sbin/varnish-backend-restart'], +if $upload_storage_experiment { +file { '/etc/cron.d/varnish-backend-restart': +ensure => absent, +} +} +else { +file { '/etc/cron.d/varnish-backend-restart': +mode=> '0444', +owner => 'root', +group => 'root', +content => template('varnish/varnish-backend-restart.cron.erb'), +require => File['/usr/local/sbin/varnish-backend-restart'], +} } } } -- To view, visit https://gerrit.wikimedia.org/r/311615 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9551d542bea3c1e21cdeac8d01a5c807291eaf30 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlackGerrit-Reviewer: BBlack Gerrit-Reviewer: Ema 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]: upload storage: no restart cron w/ experiment
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/311615 Change subject: upload storage: no restart cron w/ experiment .. upload storage: no restart cron w/ experiment Bug: T145661 Change-Id: I9551d542bea3c1e21cdeac8d01a5c807291eaf30 --- M modules/role/manifests/cache/upload.pp 1 file changed, 13 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/15/311615/1 diff --git a/modules/role/manifests/cache/upload.pp b/modules/role/manifests/cache/upload.pp index c704875..59879c2 100644 --- a/modules/role/manifests/cache/upload.pp +++ b/modules/role/manifests/cache/upload.pp @@ -162,12 +162,19 @@ $be_restart_m = $times['minute'] $be_restart_d = $times['weekday'] -file { '/etc/cron.d/varnish-backend-restart': -mode=> '0444', -owner => 'root', -group => 'root', -content => template('varnish/varnish-backend-restart.cron.erb'), -require => File['/usr/local/sbin/varnish-backend-restart'], +if $upload_storage_experiment { +file { '/etc/cron.d/varnish-backend-restart': +ensure => absent, +} +} +else { +file { '/etc/cron.d/varnish-backend-restart': +mode=> '0444', +owner => 'root', +group => 'root', +content => template('varnish/varnish-backend-restart.cron.erb'), +require => File['/usr/local/sbin/varnish-backend-restart'], +} } } } -- To view, visit https://gerrit.wikimedia.org/r/311615 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9551d542bea3c1e21cdeac8d01a5c807291eaf30 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...FileAnnotations[master]: Pull a bunch of code into separate classes
MarkTraceur has uploaded a new change for review. https://gerrit.wikimedia.org/r/311616 Change subject: Pull a bunch of code into separate classes .. Pull a bunch of code into separate classes This was necessary to make error messages make any kind of sense. Hopefully nobody wanted to base code on the previous HEAD, because this basically breaks any possibility for rebasing. Change-Id: Iebd437708e5fcfc6c1bb125b2c5825af3f9e3556 --- M extension.json A resources/src/FileAnnotation.js A resources/src/FileAnnotationEditor.js M resources/src/FileAnnotator.js 4 files changed, 509 insertions(+), 139 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FileAnnotations refs/changes/16/311616/1 diff --git a/extension.json b/extension.json index 0e703bf..96cba07 100644 --- a/extension.json +++ b/extension.json @@ -56,6 +56,7 @@ "resources/src/FileAnnotator.less" ], "dependencies": [ + "ext.fileannotations.FileAnnotation", "mediawiki.Title", "jquery.ui.draggable", "jquery.ui.resizable", @@ -69,6 +70,29 @@ "fileannotations-delete", "fileannotations-commons-see-more" ] + }, + "ext.fileannotations.FileAnnotation": { + "scripts": [ + "resources/src/FileAnnotation.js" + ], + "styles": [ + ], + "dependencies": [ + "ext.fileannotations.FileAnnotationEditor", + "oojs-ui" + ] + }, + "ext.fileannotations.FileAnnotationEditor": { + "scripts": [ + "resources/src/FileAnnotationEditor.js" + ], + "styles": [ + ], + "dependencies": [ + "jquery.ui.draggable", + "jquery.ui.resizable", + "oojs-ui" + ] } }, "ResourceFileModulePaths": { diff --git a/resources/src/FileAnnotation.js b/resources/src/FileAnnotation.js new file mode 100644 index 000..76efa96 --- /dev/null +++ b/resources/src/FileAnnotation.js @@ -0,0 +1,254 @@ +( function ( mw, $, OO ) { + /** +* Single annotation's interface. +* +* @class mw.FileAnnotation +* @mixins OO.EventEmitter +* @constructor +* @param {Object} config +* @cfg {Object} annotation Information including x, y, width, height, index, etc. +* @cfg {Object} file Information including title, sizes, etc. +* @cfg {Object} display Information about the current display of the file - height, width. +* @cfg {jQuery} $container If this is a new annotation, this is where the edit interface is put. +* @cfg {boolean} editing Whether editing is enabled. +*/ + function FileAnnotation( config ) { + OO.EventEmitter.call( this ); + + this.api = config.api; + + this.index = config.annotation.index; + + this.x = config.annotation.x; + this.y = config.annotation.y; + this.width = config.annotation.width; + this.height = config.annotation.height; + + this.text = config.annotation.text; + this.parsed = config.annotation.parsed; + + this.fileTitle = config.file.title; + this.annotationsTitle = mw.Title.newFromText( 'File annotations:' + this.fileTitle.getMain() ); + this.fileWidth = config.file.width; + this.fileHeight = config.file.height; + + this.displayWidth = config.display.width; + this.displayHeight = config.display.height; + + this.adjustRatioX = this.displayWidth / this.fileWidth; + this.adjustRatioY = this.displayHeight / this.fileHeight; + + this.adjustedX = this.x * this.adjustRatioX; + this.adjustedY = this.y * this.adjustRatioY; + this.adjustedWidth = this.width * this.adjustRatioX; + this.adjustedHeight = this.height * this.adjustRatioY; + + this.editing = config.editing; + + if ( this.text && this.parsed ) { + this.$annotation = $( '' ) + .addClass( 'file-annotation' ) + .append( this.parsed ); + + this.$annotation.find(
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix "externalCluster" LBFactorySimple setting in LBFactoryMW
jenkins-bot has submitted this change and it was merged. Change subject: Fix "externalCluster" LBFactorySimple setting in LBFactoryMW .. Fix "externalCluster" LBFactorySimple setting in LBFactoryMW Fixes regression from d175b391ae2a Change-Id: I4bbc875e2fcd021e342959a37475ec356cb58cce --- M includes/db/loadbalancer/LBFactoryMW.php M includes/libs/rdbms/lbfactory/LBFactorySimple.php 2 files changed, 3 insertions(+), 3 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/db/loadbalancer/LBFactoryMW.php b/includes/db/loadbalancer/LBFactoryMW.php index e943a8a..f8647a3 100644 --- a/includes/db/loadbalancer/LBFactoryMW.php +++ b/includes/db/loadbalancer/LBFactoryMW.php @@ -94,8 +94,8 @@ } $lbConf['servers'] = [ $server ]; } - if ( !isset( $lbConf['externalServers'] ) ) { - $lbConf['externalServers'] = $mainConfig->get( 'ExternalServers' ); + if ( !isset( $lbConf['externalClusters'] ) ) { + $lbConf['externalClusters'] = $mainConfig->get( 'ExternalServers' ); } } elseif ( $lbConf['class'] === 'LBFactoryMulti' ) { if ( isset( $lbConf['serverTemplate'] ) ) { diff --git a/includes/libs/rdbms/lbfactory/LBFactorySimple.php b/includes/libs/rdbms/lbfactory/LBFactorySimple.php index 0476cf2..0949092 100644 --- a/includes/libs/rdbms/lbfactory/LBFactorySimple.php +++ b/includes/libs/rdbms/lbfactory/LBFactorySimple.php @@ -87,7 +87,7 @@ */ protected function newExternalLB( $cluster, $domain = false ) { if ( !isset( $this->externalClusters[$cluster] ) ) { - throw new InvalidArgumentException( __METHOD__ . ": Unknown cluster \"$cluster\"" ); + throw new InvalidArgumentException( __METHOD__ . ": Unknown cluster \"$cluster\"." ); } return $this->newLoadBalancer( $this->externalClusters[$cluster] ); -- To view, visit https://gerrit.wikimedia.org/r/311612 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4bbc875e2fcd021e342959a37475ec356cb58cce Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron SchulzGerrit-Reviewer: Catrope Gerrit-Reviewer: Parent5446 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]: labspuppetbackend: Set charset explicitly
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/311614 Change subject: labspuppetbackend: Set charset explicitly .. labspuppetbackend: Set charset explicitly Also make sure empty checks check for both str and byte Change-Id: Icad5a92bbd5282e0726ffd3071c98d627cf35346 --- M modules/labspuppetbackend/files/labspuppetbackend.py 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/14/311614/1 diff --git a/modules/labspuppetbackend/files/labspuppetbackend.py b/modules/labspuppetbackend/files/labspuppetbackend.py index c5e43b2..e159f4d 100644 --- a/modules/labspuppetbackend/files/labspuppetbackend.py +++ b/modules/labspuppetbackend/files/labspuppetbackend.py @@ -28,7 +28,8 @@ host=os.environ['MYSQL_HOST'], db=os.environ['MYSQL_DB'], user=os.environ['MYSQL_USERNAME'], -passwd=os.environ['MYSQL_PASSWORD'] +passwd=os.environ['MYSQL_PASSWORD'], +charset='utf8' ) @@ -250,7 +251,10 @@ """, (project, )) # Do the inverse of _preprocess_prefix, so callers get a consistent view return Response( -yaml.safe_dump({'prefixes': ['_' if r[0] == b'' else r[0] for r in cur.fetchall()]}), +yaml.safe_dump({ +'prefixes': +['_' if r[0] == b'' or r[0] == '' + else r[0] for r in cur.fetchall()]}), status=200, mimetype='application/x-yaml' ) -- To view, visit https://gerrit.wikimedia.org/r/311614 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icad5a92bbd5282e0726ffd3071c98d627cf35346 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix broken $wgExternalServers example setting
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/311613 Change subject: Fix broken $wgExternalServers example setting .. Fix broken $wgExternalServers example setting Just reference $wgDBservers instead, which uses the same format. Change-Id: Iaa32cb067f9487b459925310ac4c52efe3f4a3f1 --- M includes/DefaultSettings.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/13/311613/1 diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 135c3e5..f0e9e83 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -2085,7 +2085,7 @@ * Create a cluster named 'cluster1' containing three servers: * @code * $wgExternalServers = [ - * 'cluster1' => [ 'srv28', 'srv29', 'srv30' ] + * 'cluster1' => * ]; * @endcode * -- To view, visit https://gerrit.wikimedia.org/r/311613 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaa32cb067f9487b459925310ac4c52efe3f4a3f1 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] operations/puppet[production]: upload storage: fix CL comparisons
BBlack has submitted this change and it was merged. Change subject: upload storage: fix CL comparisons .. upload storage: fix CL comparisons Failed to use std.integer(), cleaned up related logic a bit after checking that std.integer() properly handles up to signed 64-bit values on our hosts. Bug: T145661 Change-Id: If79a9ad86d159000e597115ab73712a0e6aed0ad --- M modules/varnish/templates/upload-backend.inc.vcl.erb 1 file changed, 9 insertions(+), 10 deletions(-) Approvals: BBlack: Verified; Looks good to me, approved diff --git a/modules/varnish/templates/upload-backend.inc.vcl.erb b/modules/varnish/templates/upload-backend.inc.vcl.erb index 1a61af2..27a2c11 100644 --- a/modules/varnish/templates/upload-backend.inc.vcl.erb +++ b/modules/varnish/templates/upload-backend.inc.vcl.erb @@ -4,27 +4,26 @@ <%- if @vcl_config.fetch('upload_storage_experiment') -%> sub pick_stevedore { // Select a storage size class/bin - if (beresp.http.Content-Length !~ "^[0-9]+$") { // XXX even possible on upload? + if (beresp.http.Content-Length !~ "^[0-9]+$") { // even possible on upload? set beresp.storage_hint = "bin1"; } - elsif (beresp.http.Content-Length ~ "^[0-9]{10}") { // 1GB+ - set beresp.uncacheable = true; - set beresp.storage_hint = "bin4"; - } - elsif (beresp.http.Content-Length < 1024 * 16) { // 16KB + elsif (std.integer(beresp.http.Content-Length, 0) < 1024 * 16) { // 16KB set beresp.storage_hint = "bin0"; } - elsif (beresp.http.Content-Length < 1024 * 16 * 16) { // 256KB + elsif (std.integer(beresp.http.Content-Length, 0) < 1024 * 16 * 16) { // 256KB set beresp.storage_hint = "bin1"; } - elsif (beresp.http.Content-Length < 1024 * 16 * 16 * 16) { // 4MB + elsif (std.integer(beresp.http.Content-Length, 0) < 1024 * 16 * 16 * 16) { // 4MB set beresp.storage_hint = "bin2"; } - elsif (beresp.http.Content-Length < 1024 * 16 * 16 * 16 * 16) { // 64MB + elsif (std.integer(beresp.http.Content-Length, 0) < 1024 * 16 * 16 * 16 * 16) { // 64MB set beresp.storage_hint = "bin3"; } - else { // 64MB-1GB + else { // >= 64MB set beresp.storage_hint = "bin4"; + if (std.integer(beresp.http.Content-Length, 0) >= 1024 * 16 * 16 * 16 * 16 * 16) { // 1GB + set beresp.uncacheable = true; + } } } <%- else -%> -- To view, visit https://gerrit.wikimedia.org/r/311611 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If79a9ad86d159000e597115ab73712a0e6aed0ad Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlackGerrit-Reviewer: BBlack ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: upload storage: fix CL comparisons
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/311611 Change subject: upload storage: fix CL comparisons .. upload storage: fix CL comparisons Failed to use std.integer(), cleaned up related logic a bit after checking that std.integer() properly handles up to signed 64-bit values on our hosts. Bug: T145661 Change-Id: If79a9ad86d159000e597115ab73712a0e6aed0ad --- M modules/varnish/templates/upload-backend.inc.vcl.erb 1 file changed, 9 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/11/311611/1 diff --git a/modules/varnish/templates/upload-backend.inc.vcl.erb b/modules/varnish/templates/upload-backend.inc.vcl.erb index 1a61af2..27a2c11 100644 --- a/modules/varnish/templates/upload-backend.inc.vcl.erb +++ b/modules/varnish/templates/upload-backend.inc.vcl.erb @@ -4,27 +4,26 @@ <%- if @vcl_config.fetch('upload_storage_experiment') -%> sub pick_stevedore { // Select a storage size class/bin - if (beresp.http.Content-Length !~ "^[0-9]+$") { // XXX even possible on upload? + if (beresp.http.Content-Length !~ "^[0-9]+$") { // even possible on upload? set beresp.storage_hint = "bin1"; } - elsif (beresp.http.Content-Length ~ "^[0-9]{10}") { // 1GB+ - set beresp.uncacheable = true; - set beresp.storage_hint = "bin4"; - } - elsif (beresp.http.Content-Length < 1024 * 16) { // 16KB + elsif (std.integer(beresp.http.Content-Length, 0) < 1024 * 16) { // 16KB set beresp.storage_hint = "bin0"; } - elsif (beresp.http.Content-Length < 1024 * 16 * 16) { // 256KB + elsif (std.integer(beresp.http.Content-Length, 0) < 1024 * 16 * 16) { // 256KB set beresp.storage_hint = "bin1"; } - elsif (beresp.http.Content-Length < 1024 * 16 * 16 * 16) { // 4MB + elsif (std.integer(beresp.http.Content-Length, 0) < 1024 * 16 * 16 * 16) { // 4MB set beresp.storage_hint = "bin2"; } - elsif (beresp.http.Content-Length < 1024 * 16 * 16 * 16 * 16) { // 64MB + elsif (std.integer(beresp.http.Content-Length, 0) < 1024 * 16 * 16 * 16 * 16) { // 64MB set beresp.storage_hint = "bin3"; } - else { // 64MB-1GB + else { // >= 64MB set beresp.storage_hint = "bin4"; + if (std.integer(beresp.http.Content-Length, 0) >= 1024 * 16 * 16 * 16 * 16 * 16) { // 1GB + set beresp.uncacheable = true; + } } } <%- else -%> -- To view, visit https://gerrit.wikimedia.org/r/311611 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If79a9ad86d159000e597115ab73712a0e6aed0ad Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix "externalCluster" LBFactorySimple setting in LBFactoryMW
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/311612 Change subject: Fix "externalCluster" LBFactorySimple setting in LBFactoryMW .. Fix "externalCluster" LBFactorySimple setting in LBFactoryMW Fixes regression from d175b391ae2a Change-Id: I4bbc875e2fcd021e342959a37475ec356cb58cce --- M includes/db/loadbalancer/LBFactoryMW.php M includes/libs/rdbms/lbfactory/LBFactorySimple.php 2 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/12/311612/1 diff --git a/includes/db/loadbalancer/LBFactoryMW.php b/includes/db/loadbalancer/LBFactoryMW.php index e943a8a..f8647a3 100644 --- a/includes/db/loadbalancer/LBFactoryMW.php +++ b/includes/db/loadbalancer/LBFactoryMW.php @@ -94,8 +94,8 @@ } $lbConf['servers'] = [ $server ]; } - if ( !isset( $lbConf['externalServers'] ) ) { - $lbConf['externalServers'] = $mainConfig->get( 'ExternalServers' ); + if ( !isset( $lbConf['externalClusters'] ) ) { + $lbConf['externalClusters'] = $mainConfig->get( 'ExternalServers' ); } } elseif ( $lbConf['class'] === 'LBFactoryMulti' ) { if ( isset( $lbConf['serverTemplate'] ) ) { diff --git a/includes/libs/rdbms/lbfactory/LBFactorySimple.php b/includes/libs/rdbms/lbfactory/LBFactorySimple.php index 0476cf2..0949092 100644 --- a/includes/libs/rdbms/lbfactory/LBFactorySimple.php +++ b/includes/libs/rdbms/lbfactory/LBFactorySimple.php @@ -87,7 +87,7 @@ */ protected function newExternalLB( $cluster, $domain = false ) { if ( !isset( $this->externalClusters[$cluster] ) ) { - throw new InvalidArgumentException( __METHOD__ . ": Unknown cluster \"$cluster\"" ); + throw new InvalidArgumentException( __METHOD__ . ": Unknown cluster \"$cluster\"." ); } return $this->newLoadBalancer( $this->externalClusters[$cluster] ); -- To view, visit https://gerrit.wikimedia.org/r/311612 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4bbc875e2fcd021e342959a37475ec356cb58cce 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...parsoid[master]: Skip mock for rt testing bin
Arlolra has uploaded a new change for review. https://gerrit.wikimedia.org/r/311610 Change subject: Skip mock for rt testing bin .. Skip mock for rt testing bin * Codepath only necessary when supplying a custom wiki. Change-Id: Iae12dbe14884f81549212c3d1b17bbec338ed209 --- M bin/roundtrip-test.js 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/10/311610/1 diff --git a/bin/roundtrip-test.js b/bin/roundtrip-test.js index ce55e48..77e5305 100755 --- a/bin/roundtrip-test.js +++ b/bin/roundtrip-test.js @@ -765,6 +765,8 @@ if (argv.apiURL) { serverOpts.mockURL = argv.apiURL; argv.domain = 'customwiki'; + } else { + serverOpts.skipMock = true; } return serviceWrapper.runServices(serverOpts).then(function(ret) { argv.parsoidURL = ret.parsoidURL; -- To view, visit https://gerrit.wikimedia.org/r/311610 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iae12dbe14884f81549212c3d1b17bbec338ed209 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Arlolra___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Quit deleting from pending queue, stop saying limbo
jenkins-bot has submitted this change and it was merged. Change subject: Quit deleting from pending queue, stop saying limbo .. Quit deleting from pending queue, stop saying limbo Get rid of 'limbo' references and old orphan rectifier. Bug: T133433 Change-Id: Ied22c6057496c550f1283489bc13ca4f81ab639a --- M README.txt M adyen_gateway/adyen.adapter.php M amazon_gateway/amazon.adapter.php M astropay_gateway/astropay.adapter.php M extension.json M gateway_common/gateway.adapter.php D globalcollect_gateway/GlobalCollectOrphanRectifier_pooled.php M globalcollect_gateway/globalcollect.adapter.php D globalcollect_gateway/scripts/orphans.php M paypal_gateway/express_checkout/paypal_express.adapter.php M tests/phpunit/Adapter/GlobalCollect/GlobalCollectTest.php M tests/phpunit/includes/test_gateway/TestingGlobalCollectAdapter.php 12 files changed, 19 insertions(+), 318 deletions(-) Approvals: Awight: Looks good to me, approved jenkins-bot: Verified diff --git a/README.txt b/README.txt index e7b1d48..317bca0 100644 --- a/README.txt +++ b/README.txt @@ -332,16 +332,12 @@ // Incoming donations that we think have been paid for. 'completed' => array(), - // So-called limbo queue for GlobalCollect, where we store donor personal - // information while waiting for the donor to return from iframe or a - // redirect. It's very important that this data is not stored anywhere - // permanent such as logs or the database, until we know this person - // finished making a donation. - // FIXME: Note that this must be an instance of KeyValueStore. - // + // Transactions still needing action before they are settled. + 'pending' => array(), + // Example of a PCI-compliant queue configuration: // - // 'globalcollect-cc-limbo' => array( + // 'pending' => array( // 'type' => 'PHPQueue\Backend\Predis', // # Note that servers cannot be an array, due to some incompatibility // # with aggregate connections. @@ -353,14 +349,10 @@ // // Example of aliasing a queue // - // 'globalcollect-cc-limbo' => array( - // # Point at the main CC limbo queue. - // 'queue' => 'cc-limbo', + // 'pending' => array( + // # Point at a queue named pending-new + // 'queue' => 'pending-new', // ), - - // Transactions still needing action before they are settled. - // FIXME: who reads from this queue? - 'pending' => array(), // Non-critical queues diff --git a/adyen_gateway/adyen.adapter.php b/adyen_gateway/adyen.adapter.php index 7c12752..ae047e3 100644 --- a/adyen_gateway/adyen.adapter.php +++ b/adyen_gateway/adyen.adapter.php @@ -190,7 +190,7 @@ $this->logger->info( "launching external iframe request: " . print_r( $requestParams, true ) ); $this->logPaymentDetails(); - $this->setLimboMessage(); + $this->sendPendingMessage(); break; } } @@ -269,7 +269,6 @@ } } else { - $this->deleteLimboMessage( 'pending' ); $this->finalizeInternalStatus( FinalStatus::FAILED ); $this->logger->info( "Negative response from gateway. Full response: " . print_r( $response, TRUE ) ); } diff --git a/amazon_gateway/amazon.adapter.php b/amazon_gateway/amazon.adapter.php index 3615702..13ccdc1 100644 --- a/amazon_gateway/amazon.adapter.php +++ b/amazon_gateway/amazon.adapter.php @@ -206,7 +206,7 @@ // audit and IPN messages $details = $this->getStompTransaction(); $this->logger->info( 'Got info for Amazon donation: ' . json_encode( $details ) ); - $this->setLimboMessage(); + $this->sendPendingMessage(); } /** @@ -251,7 +251,6 @@ $this->finalizeInternalStatus( $this->capture_status_map[$captureState] ); $this->postProcessDonation(); - $this->deleteLimboMessage( 'pending' ); } /** diff --git a/astropay_gateway/astropay.adapter.php b/astropay_gateway/astropay.adapter.php index 7b971bd..da6b8c8 100644 --- a/astropay_gateway/astropay.adapter.php +++ b/astropay_gateway/astropay.adapter.php @@ -289,7 +289,6 @@ $this->logger->info( "Payment status $status coming back to ResultSwitcher" ); $this->finalizeInternalStatus( $status ); $this->postProcessDonation(); - $this->deleteLimboMessage( 'pending' );
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Move DatabasePostgres to /libs/rdbms
jenkins-bot has submitted this change and it was merged. Change subject: Move DatabasePostgres to /libs/rdbms .. Move DatabasePostgres to /libs/rdbms Fixed all IDEA warnings in the postgres classes too. Change-Id: I06b4c5b2c581fb65552d980cc106aa10fed40285 --- M autoload.php M includes/db/loadbalancer/LBFactoryMW.php R includes/libs/rdbms/database/DatabasePostgres.php A includes/libs/rdbms/database/utils/SavepointPostgres.php A includes/libs/rdbms/field/PostgresField.php 5 files changed, 265 insertions(+), 229 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/autoload.php b/autoload.php index 55c42c6..198e477 100644 --- a/autoload.php +++ b/autoload.php @@ -327,7 +327,7 @@ 'DatabaseMysqlBase' => __DIR__ . '/includes/libs/rdbms/database/DatabaseMysqlBase.php', 'DatabaseMysqli' => __DIR__ . '/includes/libs/rdbms/database/DatabaseMysqli.php', 'DatabaseOracle' => __DIR__ . '/includes/db/DatabaseOracle.php', - 'DatabasePostgres' => __DIR__ . '/includes/db/DatabasePostgres.php', + 'DatabasePostgres' => __DIR__ . '/includes/libs/rdbms/database/DatabasePostgres.php', 'DatabaseSqlite' => __DIR__ . '/includes/libs/rdbms/database/DatabaseSqlite.php', 'DatabaseUpdater' => __DIR__ . '/includes/installer/DatabaseUpdater.php', 'DateFormats' => __DIR__ . '/maintenance/language/date-formats.php', @@ -1071,7 +1071,7 @@ 'PopulateRevisionSha1' => __DIR__ . '/maintenance/populateRevisionSha1.php', 'PostgreSqlLockManager' => __DIR__ . '/includes/filebackend/lockmanager/PostgreSqlLockManager.php', 'PostgresBlob' => __DIR__ . '/includes/libs/rdbms/encasing/PostgresBlob.php', - 'PostgresField' => __DIR__ . '/includes/db/DatabasePostgres.php', + 'PostgresField' => __DIR__ . '/includes/libs/rdbms/field/PostgresField.php', 'PostgresInstaller' => __DIR__ . '/includes/installer/PostgresInstaller.php', 'PostgresUpdater' => __DIR__ . '/includes/installer/PostgresUpdater.php', 'Preferences' => __DIR__ . '/includes/Preferences.php', @@ -1226,7 +1226,7 @@ 'SVGReader' => __DIR__ . '/includes/media/SVGMetadataExtractor.php', 'SamplingStatsdClient' => __DIR__ . '/includes/libs/SamplingStatsdClient.php', 'Sanitizer' => __DIR__ . '/includes/Sanitizer.php', - 'SavepointPostgres' => __DIR__ . '/includes/db/DatabasePostgres.php', + 'SavepointPostgres' => __DIR__ . '/includes/libs/rdbms/database/utils/SavepointPostgres.php', 'ScopedCallback' => __DIR__ . '/includes/libs/ScopedCallback.php', 'ScopedLock' => __DIR__ . '/includes/filebackend/lockmanager/ScopedLock.php', 'SearchApi' => __DIR__ . '/includes/api/SearchApi.php', diff --git a/includes/db/loadbalancer/LBFactoryMW.php b/includes/db/loadbalancer/LBFactoryMW.php index e943a8a..e90cd67 100644 --- a/includes/db/loadbalancer/LBFactoryMW.php +++ b/includes/db/loadbalancer/LBFactoryMW.php @@ -62,6 +62,8 @@ foreach ( $mainConfig->get( 'DBservers' ) as $i => $server ) { if ( $server['type'] === 'sqlite' ) { $server += [ 'dbDirectory' => $mainConfig->get( 'SQLiteDataDir' ) ]; + } elseif ( $server['type'] === 'postgres' ) { + $server += [ 'port' => $mainConfig->get( 'DBport' ) ]; } $lbConf['servers'][$i] = $server + [ 'schema' => $mainConfig->get( 'DBmwschema' ), @@ -91,6 +93,8 @@ ]; if ( $server['type'] === 'sqlite' ) { $server[ 'dbDirectory'] = $mainConfig->get( 'SQLiteDataDir' ); + } elseif ( $server['type'] === 'postgres' ) { + $server['port'] = $mainConfig->get( 'DBport' ); } $lbConf['servers'] = [ $server ]; } diff --git a/includes/db/DatabasePostgres.php b/includes/libs/rdbms/database/DatabasePostgres.php similarity index 85% rename from includes/db/DatabasePostgres.php rename to includes/libs/rdbms/database/DatabasePostgres.php index 1907bab..b07ac16 100644 --- a/includes/db/DatabasePostgres.php +++ b/includes/libs/rdbms/database/DatabasePostgres.php @@ -21,207 +21,31 @@ * @ingroup Database */ -class PostgresField implements Field { - private $name, $tablename, $type, $nullable, $max_length, $deferred, $deferrable, $conname, - $has_default, $default; - - /** -* @param IDatabase $db -* @param string $table -* @param string $field -
[MediaWiki-commits] [Gerrit] mediawiki...CiteThisPage[master]: Remove pre-1.24 compat code
jenkins-bot has submitted this change and it was merged. Change subject: Remove pre-1.24 compat code .. Remove pre-1.24 compat code Extension already requires 1.25+. Change-Id: I3f8453606b92e1a3147af01dee928804a8b910bf --- M SpecialCiteThisPage.php 1 file changed, 1 insertion(+), 6 deletions(-) Approvals: Brian Wolff: Looks good to me, approved jenkins-bot: Verified diff --git a/SpecialCiteThisPage.php b/SpecialCiteThisPage.php index 5c39495..5e1cae9 100644 --- a/SpecialCiteThisPage.php +++ b/SpecialCiteThisPage.php @@ -151,12 +151,7 @@ ); $wgOut->addModuleStyles( 'ext.citeThisPage' ); - # Introduced in 1.24 - if ( method_exists( $wgOut, 'addParserOutputContent' ) ) { - $wgOut->addParserOutputContent( $ret ); - } else { - $wgOut->addHTML( $ret->getText() ); - } + $wgOut->addParserOutputContent( $ret ); } function genParserOptions() { -- To view, visit https://gerrit.wikimedia.org/r/311593 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3f8453606b92e1a3147af01dee928804a8b910bf Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/CiteThisPage Gerrit-Branch: master Gerrit-Owner: LegoktmGerrit-Reviewer: Brian Wolff 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]: upload storage size class experiment
BBlack has submitted this change and it was merged. Change subject: upload storage size class experiment .. upload storage size class experiment This will probably need tweaking. Uses cp1099 as first test host. Bug: T145661 Change-Id: I024b54ed3ae1446743f1a3b15dd3842987a0fda9 --- A hieradata/hosts/cp1099.yaml M modules/role/manifests/cache/upload.pp M modules/varnish/templates/upload-backend.inc.vcl.erb 3 files changed, 75 insertions(+), 20 deletions(-) Approvals: BBlack: Verified; Looks good to me, approved diff --git a/hieradata/hosts/cp1099.yaml b/hieradata/hosts/cp1099.yaml new file mode 100644 index 000..c02abf9 --- /dev/null +++ b/hieradata/hosts/cp1099.yaml @@ -0,0 +1 @@ +upload_storage_experiment: true diff --git a/modules/role/manifests/cache/upload.pp b/modules/role/manifests/cache/upload.pp index 826a269..c704875 100644 --- a/modules/role/manifests/cache/upload.pp +++ b/modules/role/manifests/cache/upload.pp @@ -72,8 +72,11 @@ # Because of this, pass_random does more harm than good in the # upload-frontend case. All tiers of backend share the same policies. +$upload_storage_experiment = hiera('upload_storage_experiment', false) + $be_vcl_config = merge($common_vcl_config, { -'pass_random' => true, +'upload_storage_experiment' => $upload_storage_experiment, +'pass_random' => true, }) $fe_vcl_config = merge($common_vcl_config, { @@ -81,28 +84,47 @@ 'pass_random' => false, }) -if ($::role::cache::2layer::varnish_version4) { -# The persistent storage backend is deprecated and buggy in Varnish 4. -# Use "file" instead. See T142810, T142848 and -# https://www.varnish-cache.org/docs/trunk/phk/persistent.html -$storage_backend = 'file' -$storage_mma_1 = '' -$storage_mma_2 = '' +if $upload_storage_experiment { +$sda = $::role::cache::2layer::storage_parts[0] +$sdb = $::role::cache::2layer::storage_parts[1] +$ssm = $::role::cache::2layer::storage_size * 2 * 1024 +$bin0_size = floor($ssm * 0.03) +$bin1_size = floor($ssm * 0.20) +$bin2_size = floor($ssm * 0.43) +$bin3_size = floor($ssm * 0.30) +$bin4_size = floor($ssm * 0.04) +$upload_storage_args = join([ +"-s bin0=file,/srv/${sda}/varnish.bin0,${bin0_size}M", +"-s bin1=file,/srv/${sdb}/varnish.bin1,${bin1_size}M", +"-s bin2=file,/srv/${sda}/varnish.bin2,${bin2_size}M", +"-s bin3=file,/srv/${sdb}/varnish.bin3,${bin3_size}M", +"-s bin4=file,/srv/${sda}/varnish.bin4,${bin4_size}M", +], ' ') } else { -$storage_backend = 'persistent' -$storage_mma_1 = ",${::role::cache::2layer::mma[0]}" -$storage_mma_2 = ",${::role::cache::2layer::mma[1]}" -} +if ($::role::cache::2layer::varnish_version4) { +# The persistent storage backend is deprecated and buggy in Varnish 4. +# Use "file" instead. See T142810, T142848 and +# https://www.varnish-cache.org/docs/trunk/phk/persistent.html +$storage_backend = 'file' +$storage_mma_1 = '' +$storage_mma_2 = '' +} +else { +$storage_backend = 'persistent' +$storage_mma_1 = ",${::role::cache::2layer::mma[0]}" +$storage_mma_2 = ",${::role::cache::2layer::mma[1]}" +} -$storage_size_bigobj = floor($::role::cache::2layer::storage_size / 6) -$storage_size_up = $::role::cache::2layer::storage_size - $storage_size_bigobj -$upload_storage_args = join([ -"-s main1=${storage_backend},/srv/${::role::cache::2layer::storage_parts[0]}/varnish.main1,${storage_size_up}G${storage_mma_1}", -"-s main2=${storage_backend},/srv/${::role::cache::2layer::storage_parts[1]}/varnish.main2,${storage_size_up}G${storage_mma_2}", -"-s bigobj1=file,/srv/${::role::cache::2layer::storage_parts[0]}/varnish.bigobj1,${storage_size_bigobj}G", -"-s bigobj2=file,/srv/${::role::cache::2layer::storage_parts[1]}/varnish.bigobj2,${storage_size_bigobj}G", -], ' ') +$storage_size_bigobj = floor($::role::cache::2layer::storage_size / 6) +$storage_size_up = $::role::cache::2layer::storage_size - $storage_size_bigobj +$upload_storage_args = join([ +"-s main1=${storage_backend},/srv/${::role::cache::2layer::storage_parts[0]}/varnish.main1,${storage_size_up}G${storage_mma_1}", +"-s main2=${storage_backend},/srv/${::role::cache::2layer::storage_parts[1]}/varnish.main2,${storage_size_up}G${storage_mma_2}", +"-s bigobj1=file,/srv/${::role::cache::2layer::storage_parts[0]}/varnish.bigobj1,${storage_size_bigobj}G", +"-s
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Revert "Fix file/class name mismatch from e2adcc89bbe"
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/311609 Change subject: Revert "Fix file/class name mismatch from e2adcc89bbe" .. Revert "Fix file/class name mismatch from e2adcc89bbe" In order to revert e2adcc89bbe This reverts commit e4948970dd5f0487c9a394d31bd00304de568c3d. Change-Id: Ib31f66a09c6c74f68ccffd4ad7c2748115e11a9c --- M autoload.php R includes/libs/rdbms/lbfactory/LBFactorySingle.php 2 files changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/09/311609/1 diff --git a/autoload.php b/autoload.php index a07df96..7f9671d 100644 --- a/autoload.php +++ b/autoload.php @@ -733,7 +733,7 @@ 'ListVariants' => __DIR__ . '/maintenance/language/listVariants.php', 'ListredirectsPage' => __DIR__ . '/includes/specials/SpecialListredirects.php', 'LoadBalancer' => __DIR__ . '/includes/libs/rdbms/loadbalancer/LoadBalancer.php', - 'LoadBalancerSingle' => __DIR__ . '/includes/libs/rdbms/loadbalancer/LoadBalancerSingle.php', + 'LoadBalancerSingle' => __DIR__ . '/includes/libs/rdbms/lbfactory/LBFactorySingle.php', 'LoadMonitor' => __DIR__ . '/includes/libs/rdbms/loadmonitor/LoadMonitor.php', 'LoadMonitorMySQL' => __DIR__ . '/includes/libs/rdbms/loadmonitor/LoadMonitorMySQL.php', 'LoadMonitorNull' => __DIR__ . '/includes/libs/rdbms/loadmonitor/LoadMonitorNull.php', diff --git a/includes/libs/rdbms/loadbalancer/LoadBalancerSingle.php b/includes/libs/rdbms/lbfactory/LBFactorySingle.php similarity index 100% rename from includes/libs/rdbms/loadbalancer/LoadBalancerSingle.php rename to includes/libs/rdbms/lbfactory/LBFactorySingle.php -- To view, visit https://gerrit.wikimedia.org/r/311609 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib31f66a09c6c74f68ccffd4ad7c2748115e11a9c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core 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] operations/puppet[production]: wmflib: Return default dir when role::puppet::self isn't used
Yuvipanda has submitted this change and it was merged. Change subject: wmflib: Return default dir when role::puppet::self isn't used .. wmflib: Return default dir when role::puppet::self isn't used Bug: T120159 Change-Id: Ia59e587ff56fce628556fe556f9fa9f759b82945 --- M modules/wmflib/lib/puppet/parser/functions/puppet_ssldir.rb 1 file changed, 4 insertions(+), 2 deletions(-) Approvals: Yuvipanda: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/modules/wmflib/lib/puppet/parser/functions/puppet_ssldir.rb b/modules/wmflib/lib/puppet/parser/functions/puppet_ssldir.rb index 58cbad9..d0e8446 100644 --- a/modules/wmflib/lib/puppet/parser/functions/puppet_ssldir.rb +++ b/modules/wmflib/lib/puppet/parser/functions/puppet_ssldir.rb @@ -45,11 +45,13 @@ # Since all self-hosted puppetmasters are in .eqiad.wmflabs, while # the labs masters don't return default if lookupvar('::settings::certname') =~ /\.wikimedia\.org$/ - # Non-self-hosted puppetmasters all use the default ssldir puppetmaster = lookupvar('puppetmaster') puppetmaster ||= function_hiera(['role::puppet::self::master', '']) -if [lookupvar('hostname'), 'localhost', '', nil].include?puppetmaster +if puppetmaster == '' + # Means we aren't using any of role::puppet::self!1! + default +elsif [lookupvar('hostname'), 'localhost', '', nil].include?puppetmaster self_master else self_client -- To view, visit https://gerrit.wikimedia.org/r/307656 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia59e587ff56fce628556fe556f9fa9f759b82945 Gerrit-PatchSet: 7 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: YuvipandaGerrit-Reviewer: Yuvipanda Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Revert "Move LBFactoryMulti to /libs/rdbms"
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/311608 Change subject: Revert "Move LBFactoryMulti to /libs/rdbms" .. Revert "Move LBFactoryMulti to /libs/rdbms" In order to revert I918422ae This reverts commit 57ba462e4bc38bb6a75bdb7eef5cb7d27df59729. Change-Id: Icd3b17c9b8713036d8eed8e3839ba2bc48e2b00f --- M autoload.php R includes/db/loadbalancer/LBFactoryMulti.php M includes/libs/rdbms/lbfactory/LBFactory.php 3 files changed, 42 insertions(+), 39 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/08/311608/1 diff --git a/autoload.php b/autoload.php index 4a72799..52c929a 100644 --- a/autoload.php +++ b/autoload.php @@ -659,7 +659,7 @@ 'KuConverter' => __DIR__ . '/languages/classes/LanguageKu.php', 'LBFactory' => __DIR__ . '/includes/libs/rdbms/lbfactory/LBFactory.php', 'LBFactoryMW' => __DIR__ . '/includes/db/loadbalancer/LBFactoryMW.php', - 'LBFactoryMulti' => __DIR__ . '/includes/libs/rdbms/lbfactory/LBFactoryMulti.php', + 'LBFactoryMulti' => __DIR__ . '/includes/db/loadbalancer/LBFactoryMulti.php', 'LBFactorySimple' => __DIR__ . '/includes/libs/rdbms/lbfactory/LBFactorySimple.php', 'LBFactorySingle' => __DIR__ . '/includes/db/loadbalancer/LBFactorySingle.php', 'LCStore' => __DIR__ . '/includes/cache/localisation/LCStore.php', diff --git a/includes/libs/rdbms/lbfactory/LBFactoryMulti.php b/includes/db/loadbalancer/LBFactoryMulti.php similarity index 86% rename from includes/libs/rdbms/lbfactory/LBFactoryMulti.php rename to includes/db/loadbalancer/LBFactoryMulti.php index 0f1493a..1f7f528 100644 --- a/includes/libs/rdbms/lbfactory/LBFactoryMulti.php +++ b/includes/db/loadbalancer/LBFactoryMulti.php @@ -1,6 +1,6 @@ lowest): @@ -83,7 +83,7 @@ * * @ingroup Database */ -class LBFactoryMulti extends LBFactory { +class LBFactoryMulti extends LBFactoryMW { /** @var array A map of database names to section names */ private $sectionsByDB; @@ -94,8 +94,9 @@ private $sectionLoads; /** -* @var array[] Server info associative array -* @note The host, hostName and load entries will be overridden +* @var array A server info associative array as documented for +* $wgDBservers. The host, hostName and load entries will be +* overridden */ private $serverTemplate; @@ -156,7 +157,7 @@ private $loadMonitorClass; /** @var string */ - private $lastDomain; + private $lastWiki; /** @var string */ private $lastSection; @@ -177,7 +178,7 @@ foreach ( $required as $key ) { if ( !isset( $conf[$key] ) ) { - throw new InvalidArgumentException( __CLASS__ . ": $key is required." ); + throw new InvalidArgumentException( __CLASS__ . ": $key is required in configuration" ); } $this->$key = $conf[$key]; } @@ -190,32 +191,32 @@ } /** -* @param bool|string $domain +* @param bool|string $wiki * @return string */ - private function getSectionForDomain( $domain = false ) { - if ( $this->lastDomain === $domain ) { + private function getSectionForWiki( $wiki = false ) { + if ( $this->lastWiki === $wiki ) { return $this->lastSection; } - list( $dbName, ) = $this->getDBNameAndPrefix( $domain ); + list( $dbName, ) = $this->getDBNameAndPrefix( $wiki ); if ( isset( $this->sectionsByDB[$dbName] ) ) { $section = $this->sectionsByDB[$dbName]; } else { $section = 'DEFAULT'; } $this->lastSection = $section; - $this->lastDomain = $domain; + $this->lastWiki = $wiki; return $section; } /** -* @param bool|string $domain +* @param bool|string $wiki * @return LoadBalancer */ - public function newMainLB( $domain = false ) { - list( $dbName, ) = $this->getDBNameAndPrefix( $domain ); - $section = $this->getSectionForDomain( $domain ); + public function newMainLB( $wiki = false ) { + list( $dbName, ) = $this->getDBNameAndPrefix( $wiki ); + $section = $this->getSectionForWiki( $wiki ); if ( isset( $this->groupLoadsByDB[$dbName] ) ) { $groupLoads = $this->groupLoadsByDB[$dbName]; } else { @@ -223,8 +224,7 @@ } if ( isset( $this->groupLoadsBySection[$section] ) ) { - $groupLoads = array_merge_recursive( -
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "group0 wikis to 1.28.0-wmf.19"
jenkins-bot has submitted this change and it was merged. Change subject: Revert "group0 wikis to 1.28.0-wmf.19" .. Revert "group0 wikis to 1.28.0-wmf.19" This reverts commit b90dc02b4cf3800a7a184fb145811166ebfb9879. Change-Id: Ia9d7ec83a9f93e7ff70508c72e53efe7dbfd000e --- M wikiversions.json 1 file changed, 5 insertions(+), 5 deletions(-) Approvals: Thcipriani: Looks good to me, approved jenkins-bot: Verified diff --git a/wikiversions.json b/wikiversions.json index 0660577..70ebafd 100644 --- a/wikiversions.json +++ b/wikiversions.json @@ -478,7 +478,7 @@ "maiwiki": "php-1.28.0-wmf.18", "map_bmswiki": "php-1.28.0-wmf.18", "mdfwiki": "php-1.28.0-wmf.18", -"mediawikiwiki": "php-1.28.0-wmf.19", +"mediawikiwiki": "php-1.28.0-wmf.18", "metawiki": "php-1.28.0-wmf.18", "mgwiki": "php-1.28.0-wmf.18", "mgwikibooks": "php-1.28.0-wmf.18", @@ -746,9 +746,9 @@ "tawiktionary": "php-1.28.0-wmf.18", "tcywiki": "php-1.28.0-wmf.18", "tenwiki": "php-1.28.0-wmf.18", -"test2wiki": "php-1.28.0-wmf.19", -"testwiki": "php-1.28.0-wmf.19", -"testwikidatawiki": "php-1.28.0-wmf.19", +"test2wiki": "php-1.28.0-wmf.18", +"testwiki": "php-1.28.0-wmf.18", +"testwikidatawiki": "php-1.28.0-wmf.18", "tetwiki": "php-1.28.0-wmf.18", "tewiki": "php-1.28.0-wmf.18", "tewikibooks": "php-1.28.0-wmf.18", @@ -878,7 +878,7 @@ "zawikiquote": "php-1.28.0-wmf.18", "zawiktionary": "php-1.28.0-wmf.18", "zeawiki": "php-1.28.0-wmf.18", -"zerowiki": "php-1.28.0-wmf.19", +"zerowiki": "php-1.28.0-wmf.18", "zh_classicalwiki": "php-1.28.0-wmf.18", "zh_min_nanwiki": "php-1.28.0-wmf.18", "zh_min_nanwikibooks": "php-1.28.0-wmf.18", -- To view, visit https://gerrit.wikimedia.org/r/311606 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia9d7ec83a9f93e7ff70508c72e53efe7dbfd000e Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: ThciprianiGerrit-Reviewer: Thcipriani Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Bump src/ to 0b4163f
jenkins-bot has submitted this change and it was merged. Change subject: Bump src/ to 0b4163f .. Bump src/ to 0b4163f Change-Id: Iccc426fc778dd5d5c27b4381492b4a6334a6b5fa --- M src 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified diff --git a/src b/src index aed15dd..0b4163f 16 --- a/src +++ b/src @@ -1 +1 @@ -Subproject commit aed15dda30cff612ed4e105c37acfee4e38128e3 +Subproject commit 0b4163f00d0e2276b83bde136e0b765c0ebb4284 -- To view, visit https://gerrit.wikimedia.org/r/311604 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iccc426fc778dd5d5c27b4381492b4a6334a6b5fa Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid/deploy Gerrit-Branch: master Gerrit-Owner: ArlolraGerrit-Reviewer: Subramanya Sastry Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Remove unused uses
jenkins-bot has submitted this change and it was merged. Change subject: Remove unused uses .. Remove unused uses Change-Id: I3b188c6d6beb0caa8c424b80145e38b8a7d2476c --- M client/includes/Hooks/InfoActionHookHandler.php M client/includes/Specials/SpecialEntityUsage.php M client/tests/phpunit/includes/Api/ApiListEntityUsageTest.php M repo/includes/Api/GetClaims.php M repo/includes/Api/ModifyEntity.php M repo/tests/phpunit/includes/EditEntityTest.php M repo/tests/phpunit/includes/Store/Sql/WikiPageEntityMetaDataLookupTest.php 7 files changed, 0 insertions(+), 9 deletions(-) Approvals: Addshore: Looks good to me, approved jenkins-bot: Verified diff --git a/client/includes/Hooks/InfoActionHookHandler.php b/client/includes/Hooks/InfoActionHookHandler.php index d5880ad..fa4485d 100644 --- a/client/includes/Hooks/InfoActionHookHandler.php +++ b/client/includes/Hooks/InfoActionHookHandler.php @@ -6,7 +6,6 @@ use IContextSource; use Title; use Wikibase\Client\RepoLinker; -use Wikibase\Client\Usage\Sql\SqlUsageTracker; use Wikibase\Client\Usage\UsageLookup; use Wikibase\DataModel\Entity\ItemId; use Wikibase\Lib\Store\SiteLinkLookup; diff --git a/client/includes/Specials/SpecialEntityUsage.php b/client/includes/Specials/SpecialEntityUsage.php index 496427c..9d97ba8 100644 --- a/client/includes/Specials/SpecialEntityUsage.php +++ b/client/includes/Specials/SpecialEntityUsage.php @@ -9,7 +9,6 @@ use QueryPage; use Skin; use Title; -use Wikibase\Client\WikibaseClient; use Wikibase\Client\Usage\EntityUsage; use Wikibase\DataModel\Entity\ItemId; diff --git a/client/tests/phpunit/includes/Api/ApiListEntityUsageTest.php b/client/tests/phpunit/includes/Api/ApiListEntityUsageTest.php index 6a6b7e0..7bedea4 100644 --- a/client/tests/phpunit/includes/Api/ApiListEntityUsageTest.php +++ b/client/tests/phpunit/includes/Api/ApiListEntityUsageTest.php @@ -3,7 +3,6 @@ namespace Wikibase\Client\Tests\Api; use ApiMain; -use ApiPageSet; use ApiQuery; use FauxRequest; use MediaWikiLangTestCase; diff --git a/repo/includes/Api/GetClaims.php b/repo/includes/Api/GetClaims.php index 5190f11..dfe42de 100644 --- a/repo/includes/Api/GetClaims.php +++ b/repo/includes/Api/GetClaims.php @@ -12,7 +12,6 @@ use Wikibase\DataModel\Services\Statement\StatementGuidValidator; use Wikibase\DataModel\Statement\StatementList; use Wikibase\DataModel\Statement\StatementListProvider; -use Wikibase\Lib\Store\EntityRevisionLookup; use Wikibase\Repo\WikibaseRepo; use Wikibase\StatementRankSerializer; diff --git a/repo/includes/Api/ModifyEntity.php b/repo/includes/Api/ModifyEntity.php index e4a5d6e..4cb362a 100644 --- a/repo/includes/Api/ModifyEntity.php +++ b/repo/includes/Api/ModifyEntity.php @@ -12,9 +12,6 @@ use Wikibase\ChangeOp\ChangeOpException; use Wikibase\ChangeOp\ChangeOpValidationException; use Wikibase\DataModel\Entity\EntityDocument; -use Wikibase\DataModel\Entity\EntityId; -use Wikibase\DataModel\Entity\EntityIdParser; -use Wikibase\DataModel\Entity\EntityIdParsingException; use Wikibase\DataModel\Entity\ItemId; use Wikibase\Lib\Store\EntityRevisionLookup; use Wikibase\Lib\Store\EntityTitleLookup; diff --git a/repo/tests/phpunit/includes/EditEntityTest.php b/repo/tests/phpunit/includes/EditEntityTest.php index 429f567..8bee761 100644 --- a/repo/tests/phpunit/includes/EditEntityTest.php +++ b/repo/tests/phpunit/includes/EditEntityTest.php @@ -19,7 +19,6 @@ use Wikibase\DataModel\Services\Diff\EntityPatcher; use Wikibase\DataModel\Term\Fingerprint; use Wikibase\EditEntity; -use Wikibase\Lib\Store\EntityRevisionLookup; use Wikibase\Lib\Store\EntityTitleLookup; use Wikibase\Lib\Tests\MockRepository; use Wikibase\Repo\Hooks\EditFilterHookRunner; diff --git a/repo/tests/phpunit/includes/Store/Sql/WikiPageEntityMetaDataLookupTest.php b/repo/tests/phpunit/includes/Store/Sql/WikiPageEntityMetaDataLookupTest.php index e7d7fd0..a481e59 100644 --- a/repo/tests/phpunit/includes/Store/Sql/WikiPageEntityMetaDataLookupTest.php +++ b/repo/tests/phpunit/includes/Store/Sql/WikiPageEntityMetaDataLookupTest.php @@ -10,7 +10,6 @@ use Wikibase\EntityRevision; use Wikibase\Lib\Store\EntityNamespaceLookup; use Wikibase\Lib\Store\EntityRevisionLookup; -use Wikibase\Lib\Store\Sql\WikiPageEntityMetaDataAccessor; use Wikibase\Lib\Store\Sql\WikiPageEntityMetaDataLookup; use Wikibase\Repo\WikibaseRepo; -- To view, visit https://gerrit.wikimedia.org/r/311426 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3b188c6d6beb0caa8c424b80145e38b8a7d2476c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE)Gerrit-Reviewer: Addshore Gerrit-Reviewer: Hoo man Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Revert "Move LBFactorySimple to /libs/rdbms"
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/311607 Change subject: Revert "Move LBFactorySimple to /libs/rdbms" .. Revert "Move LBFactorySimple to /libs/rdbms" Breaks login and setting preferences in MW-Vagrant with: InvalidArgumentException from line 90 of /vagrant/mediawiki/includes/libs/rdbms/lbfactory/LBFactorySimple.php: LBFactorySimple::newExternalLB: Unknown cluster "extension1" This reverts commit d175b391ae2a77e3183b2608bb4422782af092a1. Change-Id: I918422aeb8b62a443ae8dfd36c902394312fbdd1 --- M autoload.php M includes/ServiceWiring.php M includes/Setup.php M includes/db/loadbalancer/LBFactoryMW.php M includes/db/loadbalancer/LBFactoryMulti.php A includes/db/loadbalancer/LBFactorySimple.php M includes/libs/rdbms/lbfactory/LBFactory.php D includes/libs/rdbms/lbfactory/LBFactorySimple.php M tests/phpunit/includes/MediaWikiServicesTest.php M tests/phpunit/includes/db/LBFactoryTest.php 10 files changed, 286 insertions(+), 319 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/07/311607/1 diff --git a/autoload.php b/autoload.php index 52c929a..035c152 100644 --- a/autoload.php +++ b/autoload.php @@ -660,7 +660,7 @@ 'LBFactory' => __DIR__ . '/includes/libs/rdbms/lbfactory/LBFactory.php', 'LBFactoryMW' => __DIR__ . '/includes/db/loadbalancer/LBFactoryMW.php', 'LBFactoryMulti' => __DIR__ . '/includes/db/loadbalancer/LBFactoryMulti.php', - 'LBFactorySimple' => __DIR__ . '/includes/libs/rdbms/lbfactory/LBFactorySimple.php', + 'LBFactorySimple' => __DIR__ . '/includes/db/loadbalancer/LBFactorySimple.php', 'LBFactorySingle' => __DIR__ . '/includes/db/loadbalancer/LBFactorySingle.php', 'LCStore' => __DIR__ . '/includes/cache/localisation/LCStore.php', 'LCStoreCDB' => __DIR__ . '/includes/cache/localisation/LCStoreCDB.php', diff --git a/includes/ServiceWiring.php b/includes/ServiceWiring.php index 7a34b3a..4ab412e 100644 --- a/includes/ServiceWiring.php +++ b/includes/ServiceWiring.php @@ -43,53 +43,15 @@ return [ 'DBLoadBalancerFactory' => function( MediaWikiServices $services ) { - $mainConfig = $services->getMainConfig(); + $config = $services->getMainConfig()->get( 'LBFactoryConf' ); - $lbConf = $mainConfig->get( 'LBFactoryConf' ); - $lbConf += [ - 'localDomain' => new DatabaseDomain( - $mainConfig->get( 'DBname' ), null, $mainConfig->get( 'DBprefix' ) ), + $class = LBFactoryMW::getLBFactoryClass( $config ); + if ( !isset( $config['readOnlyReason'] ) ) { // TODO: replace the global wfConfiguredReadOnlyReason() with a service. - 'readOnlyReason' => wfConfiguredReadOnlyReason(), - ]; - - $class = LBFactoryMW::getLBFactoryClass( $lbConf ); - if ( $class === 'LBFactorySimple' ) { - if ( is_array( $mainConfig->get( 'DBservers' ) ) ) { - foreach ( $mainConfig->get( 'DBservers' ) as $i => $server ) { - $lbConf['servers'][$i] = $server + [ - 'schema' => $mainConfig->get( 'DBmwschema' ), - 'tablePrefix' => $mainConfig->get( 'DBprefix' ), - 'flags' => DBO_DEFAULT, - 'sqlMode' => $mainConfig->get( 'SQLMode' ), - 'utf8Mode' => $mainConfig->get( 'DBmysql5' ) - ]; - } - } else { - $flags = DBO_DEFAULT; - $flags |= $mainConfig->get( 'DebugDumpSql' ) ? DBO_DEBUG : 0; - $flags |= $mainConfig->get( 'DBssl' ) ? DBO_SSL : 0; - $flags |= $mainConfig->get( 'DBcompress' ) ? DBO_COMPRESS : 0; - $lbConf['servers'] = [ - [ - 'host' => $mainConfig->get( 'DBserver' ), - 'user' => $mainConfig->get( 'DBuser' ), - 'password' => $mainConfig->get( 'DBpassword' ), - 'dbname' => $mainConfig->get( 'DBname' ), - 'schema' => $mainConfig->get( 'DBmwschema' ), - 'tablePrefix' => $mainConfig->get( 'DBprefix' ), - 'type' => $mainConfig->get( 'DBtype' ), -
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "group0 wikis to 1.28.0-wmf.19"
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/311606 Change subject: Revert "group0 wikis to 1.28.0-wmf.19" .. Revert "group0 wikis to 1.28.0-wmf.19" This reverts commit b90dc02b4cf3800a7a184fb145811166ebfb9879. Change-Id: Ia9d7ec83a9f93e7ff70508c72e53efe7dbfd000e --- M wikiversions.json 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/06/311606/1 diff --git a/wikiversions.json b/wikiversions.json index 0660577..70ebafd 100644 --- a/wikiversions.json +++ b/wikiversions.json @@ -478,7 +478,7 @@ "maiwiki": "php-1.28.0-wmf.18", "map_bmswiki": "php-1.28.0-wmf.18", "mdfwiki": "php-1.28.0-wmf.18", -"mediawikiwiki": "php-1.28.0-wmf.19", +"mediawikiwiki": "php-1.28.0-wmf.18", "metawiki": "php-1.28.0-wmf.18", "mgwiki": "php-1.28.0-wmf.18", "mgwikibooks": "php-1.28.0-wmf.18", @@ -746,9 +746,9 @@ "tawiktionary": "php-1.28.0-wmf.18", "tcywiki": "php-1.28.0-wmf.18", "tenwiki": "php-1.28.0-wmf.18", -"test2wiki": "php-1.28.0-wmf.19", -"testwiki": "php-1.28.0-wmf.19", -"testwikidatawiki": "php-1.28.0-wmf.19", +"test2wiki": "php-1.28.0-wmf.18", +"testwiki": "php-1.28.0-wmf.18", +"testwikidatawiki": "php-1.28.0-wmf.18", "tetwiki": "php-1.28.0-wmf.18", "tewiki": "php-1.28.0-wmf.18", "tewikibooks": "php-1.28.0-wmf.18", @@ -878,7 +878,7 @@ "zawikiquote": "php-1.28.0-wmf.18", "zawiktionary": "php-1.28.0-wmf.18", "zeawiki": "php-1.28.0-wmf.18", -"zerowiki": "php-1.28.0-wmf.19", +"zerowiki": "php-1.28.0-wmf.18", "zh_classicalwiki": "php-1.28.0-wmf.18", "zh_min_nanwiki": "php-1.28.0-wmf.18", "zh_min_nanwikibooks": "php-1.28.0-wmf.18", -- To view, visit https://gerrit.wikimedia.org/r/311606 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia9d7ec83a9f93e7ff70508c72e53efe7dbfd000e Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Thcipriani___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Reimage: improve output in case of errors
Volans has submitted this change and it was merged. Change subject: Reimage: improve output in case of errors .. Reimage: improve output in case of errors Bug: T143536 Change-Id: Idc8fe2152d1684c3a0e32100f975305f61585755 --- M modules/salt/files/wmf_auto_reimage.py 1 file changed, 4 insertions(+), 2 deletions(-) Approvals: Volans: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/salt/files/wmf_auto_reimage.py b/modules/salt/files/wmf_auto_reimage.py index ae24830..460d935 100644 --- a/modules/salt/files/wmf_auto_reimage.py +++ b/modules/salt/files/wmf_auto_reimage.py @@ -1033,8 +1033,10 @@ try: run(args, user) -except Exception: -logger.exception('Unable to run wmf_auto_reimage') +except Exception as e: +message = 'Unable to run wmf_auto_reimage' +print('{message}: {error}'.format(message=message, error=e)) +logger.exception(message) if __name__ == '__main__': -- To view, visit https://gerrit.wikimedia.org/r/311605 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idc8fe2152d1684c3a0e32100f975305f61585755 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: VolansGerrit-Reviewer: Elukey Gerrit-Reviewer: Muehlenhoff Gerrit-Reviewer: Volans 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]: Reimage: improve output in case of errors
Volans has uploaded a new change for review. https://gerrit.wikimedia.org/r/311605 Change subject: Reimage: improve output in case of errors .. Reimage: improve output in case of errors Bug: T143536 Change-Id: Idc8fe2152d1684c3a0e32100f975305f61585755 --- M modules/salt/files/wmf_auto_reimage.py 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/05/311605/1 diff --git a/modules/salt/files/wmf_auto_reimage.py b/modules/salt/files/wmf_auto_reimage.py index ae24830..460d935 100644 --- a/modules/salt/files/wmf_auto_reimage.py +++ b/modules/salt/files/wmf_auto_reimage.py @@ -1033,8 +1033,10 @@ try: run(args, user) -except Exception: -logger.exception('Unable to run wmf_auto_reimage') +except Exception as e: +message = 'Unable to run wmf_auto_reimage' +print('{message}: {error}'.format(message=message, error=e)) +logger.exception(message) if __name__ == '__main__': -- To view, visit https://gerrit.wikimedia.org/r/311605 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idc8fe2152d1684c3a0e32100f975305f61585755 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Volans___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Bump src/ to 0b4163f
Arlolra has uploaded a new change for review. https://gerrit.wikimedia.org/r/311604 Change subject: Bump src/ to 0b4163f .. Bump src/ to 0b4163f Change-Id: Iccc426fc778dd5d5c27b4381492b4a6334a6b5fa --- M src 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid/deploy refs/changes/04/311604/1 diff --git a/src b/src index aed15dd..0b4163f 16 --- a/src +++ b/src @@ -1 +1 @@ -Subproject commit aed15dda30cff612ed4e105c37acfee4e38128e3 +Subproject commit 0b4163f00d0e2276b83bde136e0b765c0ebb4284 -- To view, visit https://gerrit.wikimedia.org/r/311604 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iccc426fc778dd5d5c27b4381492b4a6334a6b5fa Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid/deploy Gerrit-Branch: master Gerrit-Owner: Arlolra___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: I don't actually remember what all I was doing.
Isarra has uploaded a new change for review. https://gerrit.wikimedia.org/r/311603 Change subject: I don't actually remember what all I was doing. .. I don't actually remember what all I was doing. Made a ToC class; partially implemented. Made an icon class, partially used. bug: T140170 Change-Id: I3126a963c603c2bd4ca38b0552eb52e14697eaa2 --- M extension.json M i18n/en.json M i18n/qqq.json M includes/content/CollaborationHubContent.php A includes/content/CollaborationHubTOC.php A includes/content/CollaborationKitIcon.php M modules/ext.CollaborationKit.hub.styles.less 7 files changed, 409 insertions(+), 152 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit refs/changes/03/311603/1 diff --git a/extension.json b/extension.json index 2fd2145..21a2faa 100644 --- a/extension.json +++ b/extension.json @@ -20,6 +20,8 @@ "CollaborationKitHooks": "includes/CollaborationKit.php", "CollaborationHubContent": "includes/content/CollaborationHubContent.php", "CollaborationHubContentHandler": "includes/content/CollaborationHubContentHandler.php", + "CollaborationHubTOC": "includes/content/CollaborationHubTOC.php", + "CollaborationKitIcon": "includes/content/CollaborationKitIcon.php", "CollaborationListContent": "includes/content/CollaborationListContent.php", "CollaborationListContentHandler": "includes/content/CollaborationListContentHandler.php", "SpecialCreateCollaborationHub": "includes/SpecialCreateCollaborationHub.php", diff --git a/i18n/en.json b/i18n/en.json index f7501e5..8f9951b 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -49,5 +49,6 @@ "collaborationkit-hub-subpage-view": "View", "collaborationkit-hub-subpage-remove": "Remove feature", "collaborationkit-hub-edit-apierror": "API edit error: $1", - "collaborationkit-hub-edit-tojsonerror": "Error converting to JSON" + "collaborationkit-hub-edit-tojsonerror": "Error converting to JSON", + "collaborationkit-hub-toc-label": "Project contents" } diff --git a/i18n/qqq.json b/i18n/qqq.json index 3d02923..a830742 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -49,5 +49,6 @@ "collaborationkit-hub-subpage-view": "View link label for subpages on Collaboration Hub mainpages", "collaborationkit-hub-subpage-remove": "Remove link label for subpages on Collaboration Hub mainpages", "collaborationkit-hub-edit-apierror": "Error message for API edit error", - "collaborationkit-hub-edit-tojsonerror": "Error message when something went wrong converting to JSON" + "collaborationkit-hub-edit-tojsonerror": "Error message when something went wrong converting to JSON", + "collaborationkit-hub-toc-label": "Label for the toc on a Collaboration Hub mainpage" } diff --git a/includes/content/CollaborationHubContent.php b/includes/content/CollaborationHubContent.php index f72f9e2..a28c41a 100644 --- a/includes/content/CollaborationHubContent.php +++ b/includes/content/CollaborationHubContent.php @@ -252,7 +252,7 @@ 'div', [ 'class' => 'wp-header-image' ], // TODO move all image stuff to ToC class (what is that class even going to be, anyway?) - $this->getParsedImage( $this->getImage(), 200 ) + $this->getParsedImage( $title, $this->getImage(), 200 ) ); // get members list $html .= Html::rawElement( @@ -270,7 +270,7 @@ $html .= Html::rawElement( 'div', [ 'class' => 'wp-toc' ], - $this->getTableofContents( $title, $options ) + $this->getTableOfContents( $title, $options ) ); // get transcluded content $html .= Html::rawElement( @@ -443,7 +443,7 @@ $text = Html::rawElement( 'div', [ 'class' => 'wp-header-image' ], - $spContent->getParsedImage( $spContent->getImage(), 100 ) + $spContent->getParsedImage( $spTitle, $spContent->getImage(), 100 ) ); $text .= $spContent->getParsedIntroduction( $spTitle, $options ); } elseif ( $spContentModel == 'CollaborationListContent' ) { @@ -636,98 +636,10 @@ * @param ParserOptions $options * @return string */ - protected function getTableofContents( Title $title, ParserOptions $options ) { - // This is going to be
[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Added separate rules to process transcludes-derived events
Ppchelko has uploaded a new change for review. https://gerrit.wikimedia.org/r/311602 Change subject: Added separate rules to process transcludes-derived events .. Added separate rules to process transcludes-derived events Bug: T145804 Change-Id: Iaa4d9225204f0d59c3a50da697bcb5f60881b4fc --- M scap/templates/config.yaml.j2 1 file changed, 17 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/change-propagation/deploy refs/changes/02/311602/1 diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2 index 6eb84b6..7662df3 100644 --- a/scap/templates/config.yaml.j2 +++ b/scap/templates/config.yaml.j2 @@ -112,6 +112,10 @@ headers: cache-control: no-cache +summary_rerender_transcludes: + <<: *summary_rerender_spec + topic: change-prop.transcludes.resource-change + definition_rerender: topic: resource_change match: @@ -131,6 +135,10 @@ headers: cache-control: no-cache +definition_rerender_transcludes: + <<: *definition_rerender_spec + topic: change-prop.transcludes.resource-change + mobile_rerender: topic: resource_change match: @@ -147,7 +155,11 @@ headers: cache-control: no-cache -purge_varnish: +mobile_rerender_transcludes: + <<: *mobile_rerender_spec + topic: change-prop.transcludes.resource-change + +purge_varnish: _varnish_spec topic: resource_change match: meta: @@ -161,6 +173,10 @@ - meta: uri: '//{{message.meta.domain}}/api/rest_v1/{{match.meta.uri.title}}' +purge_varnish_transcludes: + <<: *purge_varnish_spec + topic: change-prop.transcludes.resource-change + # RESTBase update jobs mw_purge: topic: resource_change -- To view, visit https://gerrit.wikimedia.org/r/311602 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaa4d9225204f0d59c3a50da697bcb5f60881b4fc 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/core[master]: Remove unused DatabaseBase::debug() method
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/311601 Change subject: Remove unused DatabaseBase::debug() method .. Remove unused DatabaseBase::debug() method This just trivially wrapped getFlags()/setFlags() anyway Change-Id: Iab5b508f6746098b66da00c8bf038215cb2359ef --- M includes/libs/rdbms/database/DatabaseBase.php 1 file changed, 0 insertions(+), 19 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/01/311601/1 diff --git a/includes/libs/rdbms/database/DatabaseBase.php b/includes/libs/rdbms/database/DatabaseBase.php index ef72998..e008705 100644 --- a/includes/libs/rdbms/database/DatabaseBase.php +++ b/includes/libs/rdbms/database/DatabaseBase.php @@ -30,25 +30,6 @@ */ abstract class DatabaseBase extends Database { /** -* Boolean, controls output of large amounts of debug information. -* @param bool|null $debug -* - true to enable debugging -* - false to disable debugging -* - omitted or null to do nothing -* -* @return bool Previous value of the flag -* @deprecated since 1.28; use setFlag() -*/ - public function debug( $debug = null ) { - $res = $this->getFlag( DBO_DEBUG ); - if ( $debug !== null ) { - $debug ? $this->setFlag( DBO_DEBUG ) : $this->clearFlag( DBO_DEBUG ); - } - - return $res; - } - - /** * Get search engine class. All subclasses of this need to implement this * if they wish to use searching. * -- To view, visit https://gerrit.wikimedia.org/r/311601 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iab5b508f6746098b66da00c8bf038215cb2359ef 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