[MediaWiki-commits] [Gerrit] Fix ULS positioning - change (mediawiki...TwnMainPage)
jenkins-bot has submitted this change and it was merged. Change subject: Fix ULS positioning .. Fix ULS positioning Forcing wgULSPosition to personal to mimick that behavior regardless of the position of the uls trigger in other pages. Change-Id: I8d89f9fc0097e5635995f3b9bb5fa10b6ba38ce6 --- M specials/SpecialTwnMainPage.php 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Santhosh: Looks good to me, approved jenkins-bot: Verified diff --git a/specials/SpecialTwnMainPage.php b/specials/SpecialTwnMainPage.php index ec4ec97..2176e88 100644 --- a/specials/SpecialTwnMainPage.php +++ b/specials/SpecialTwnMainPage.php @@ -37,6 +37,10 @@ $out-addModuleStyles( 'jquery.uls.grid' ); $out-addModuleStyles( 'ext.translate.mainpage' ); $out-addModules( 'ext.translate.mainpage' ); + // Forcing wgULSPosition to personal to mimick that behavior regardless + // of the position of the uls trigger in other pages. + $out-addJsConfigVars( 'wgULSPosition', 'personal' ); + $out-addHTML( $out-headElement( $this-getSkin() ) ); $out-addHTML( Html::openElement( 'div', -- To view, visit https://gerrit.wikimedia.org/r/65967 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8d89f9fc0097e5635995f3b9bb5fa10b6ba38ce6 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/TwnMainPage Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Santhosh santhosh.thottin...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Show main page only for logged in users for now - change (mediawiki...TwnMainPage)
jenkins-bot has submitted this change and it was merged. Change subject: Show main page only for logged in users for now .. Show main page only for logged in users for now Change-Id: Ic511c5f25b72ef50aa5602639553225c0221d79c --- M specials/SpecialTwnMainPage.php 1 file changed, 11 insertions(+), 2 deletions(-) Approvals: Santhosh: Looks good to me, approved jenkins-bot: Verified diff --git a/specials/SpecialTwnMainPage.php b/specials/SpecialTwnMainPage.php index 5dc8732..c08a3e0 100644 --- a/specials/SpecialTwnMainPage.php +++ b/specials/SpecialTwnMainPage.php @@ -23,9 +23,18 @@ } public function execute( $parameters ) { - $this-setHeaders(); - $out = $this-getOutput(); + $user = $this-getUser(); + $request = $this-getRequest(); + + // Temporary hack to display the main page only to logged in + // users while the signup track is not complete. But guard it + // with beta url parameter for testing. + if ( !$user-isLoggedIn() !$request-getBool( 'beta' ) ) { + $out-redirect( Title::newFromText( 'Main_Page' ) ); + } + + $this-setHeaders(); $out-setArticleBodyOnly( true ); // Default modules copied from OutputPage::addDefaultModules $out-addModules( array( -- To view, visit https://gerrit.wikimedia.org/r/65966 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic511c5f25b72ef50aa5602639553225c0221d79c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TwnMainPage Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Santhosh santhosh.thottin...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Customise linktrail for Gujarati (gu) - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Customise linktrail for Gujarati (gu) .. Customise linktrail for Gujarati (gu) Release notes will follow with another commit when this is merged. Bug: 48798 Change-Id: I872a9f141f64a664bc3743fcff5f036634445ba0 --- M languages/messages/MessagesGu.php 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Santhosh: Looks good to me, approved Nemo bis: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/languages/messages/MessagesGu.php b/languages/messages/MessagesGu.php index 5932cd0..ae7d463 100644 --- a/languages/messages/MessagesGu.php +++ b/languages/messages/MessagesGu.php @@ -148,6 +148,8 @@ $digitGroupingPattern = ##,##,###; +$linkTrail = '/^((?:[a-z]|ક્|ખ્|ગ્|ઘ્|ચ્|છ્|જ્|ઝ્|ટ્|ઠ્|ડ્|ઢ્|ણ્|ત્|થ્|દ્|ધ્|ન્|પ્|ફ્|બ્|ભ્|મ્|ય્|ર્|લ્|વ્|સ્|શ્|ષ્|હ્|ળ્|ક્ષ્|જ્ઞ્|અ|આ|ઇ|ઈ|ઉ|ઊ|એ|ઐ|ઓ|ઔ|અં|અઃ|અઁ|ઍ|ઑ|ઋ|ઁ|઼|।|્|ા|િ|ી|ુ|ૂ|ે|ૈ|ો|ૌ|ં|ઃ|ઁ|ૅ|ૉ|ૃ)+)(.*)$/sDu'; + $messages = array( # User preference toggles 'tog-underline' = 'કડીઓની નીચે લીટી (અંડરલાઇન) ઉમેરો:', -- To view, visit https://gerrit.wikimedia.org/r/65449 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I872a9f141f64a664bc3743fcff5f036634445ba0 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Nemo bis federicol...@tiscali.it Gerrit-Reviewer: KartikMistry kartik.mis...@gmail.com Gerrit-Reviewer: Nemo bis federicol...@tiscali.it Gerrit-Reviewer: SPQRobin robinp.1...@gmail.com Gerrit-Reviewer: Santhosh santhosh.thottin...@gmail.com Gerrit-Reviewer: Siebrand siebr...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move cookie-related functionalty from Guiders.js to GuidedTour. - change (mediawiki...GuidedTour)
jenkins-bot has submitted this change and it was merged. Change subject: Move cookie-related functionalty from Guiders.js to GuidedTour. .. Move cookie-related functionalty from Guiders.js to GuidedTour. Change-Id: I2ec41f8c3a7c68a58b1ff264136893fc8d683b4b --- M modules/ext.guidedTour.lib.js M modules/externals/mediawiki.libs.guiders/mediawiki.libs.guiders.submodule M tests/ext.guidedTour.lib.tests.js 3 files changed, 111 insertions(+), 36 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified Objections: Mattflaschen: There's a problem with this change, please improve diff --git a/modules/ext.guidedTour.lib.js b/modules/ext.guidedTour.lib.js index 39a2409..a247734 100644 --- a/modules/ext.guidedTour.lib.js +++ b/modules/ext.guidedTour.lib.js @@ -27,6 +27,7 @@ 'use strict'; var gt, + cookieName, cookieParams, skin = mw.config.get( 'skin' ), messageParser = new mw.jqueryMsg.parser(), // Non-null if user is logged in. @@ -88,6 +89,43 @@ } } + /** +* Record stats of guider being shown, if logging is enabled +* +* @private +* +* @param {Object} guider Guider object to record +* +* @return {void} +*/ + function recordStats ( guider ) { + var tourInfo; + + tourInfo = gt.parseTourId( guider.id ); + if ( tourInfo !== null ) { + pingServer( 'impression', guider.id ); + } + } + + /** +* Handles the onShow call by guiders. May saves to cookie and log, depending +* on settings. +* +* @private +* +* @param {Object} guider Guider object provided by Guiders.js +* +* @return {void} +*/ + function handleOnShow ( guider ) { + //If necessary, save the guider id to a cookie + if ( guider.changeCookie ) { + $.cookie( cookieName, guider.id, cookieParams ); + } + + recordStats( guider ); + } + // XXX (mattflaschen, 2013-01-16): // I'm not sure the clean part is necessary, and the url-encoding should be done // right before an actual URL is constructed. @@ -134,6 +172,23 @@ } /** +* Removes the tour cookie for a given guider ID, +* unless the changeCookie property of the guider is falsy. +* +* @private +* +* @param {string} guiderId id of guider +* +* @return {void} +*/ + function removeCookie( guiderId ) { + var guider = guiders._guiderById( guiderId ); + if ( guider.changeCookie ) { + $.cookie( cookieName, null, cookieParams ); + } + } + + /** * Provides onClose handler called by Guiders on a user-initiated close action. * * Hides guider. If they clicked the 'x' button, also ends the tour, removing the @@ -155,7 +210,9 @@ function handleOnClose( guider, isAlternativeClose, closeType ) { logDismissal(); - return closeType === 'xButton'; + if ( closeType === 'xButton' ) { + removeCookie( guider.id ); + } } /* @@ -189,7 +246,7 @@ // don't parse if already done if ( guider.isParsed ) { - gt.recordStats(guider); + recordStats( guider ); return; } @@ -222,7 +279,7 @@ // guider html is already live so edit it guider.elem.find( '.guider_description' ).html( guider.description ); - gt.recordStats( guider ); + recordStats( guider ); } } @@ -404,7 +461,9 @@ function augmentGuider( defaultOptions, options ) { return $.extend( true, { onClose: $.noop, - allowAutomaticOkay: true + onShow: $.noop, + allowAutomaticOkay: true, + changeCookie: true }, defaultOptions, options ); } @@ -484,10 +543,19 @@ * @throws {mw.guidedTour.TourDefinitionError} On invalid input */ function initializeGuiderInternal( options, shouldFlipHorizontally ) { - var oldOnClose = options.onClose; - options.onClose = function() { - oldOnClose.apply ( this, arguments ); + var passedInOnClose = options.onClose, passedInOnShow; + options.onClose = function () { + passedInOnClose.apply (
[MediaWiki-commits] [Gerrit] Adjustments to the Math extension - change (mediawiki...MathSearch)
Physikerwelt has uploaded a new change for review. https://gerrit.wikimedia.org/r/66065 Change subject: Adjustments to the Math extension .. Adjustments to the Math extension added curl output to the debug page for LaTeXML developers Change-Id: I72b0471d186f4054e8c691a926ab162a2a40e5ec --- M FormulaInfo.php M MathObject.php M MathSearch.alias.php M SpecialMathDebug.php 4 files changed, 33 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MathSearch refs/changes/65/66065/1 diff --git a/FormulaInfo.php b/FormulaInfo.php index 68e4f02..093da30 100644 --- a/FormulaInfo.php +++ b/FormulaInfo.php @@ -66,11 +66,11 @@ $mo = MathObject::constructformpage( $pid, $eid ); $wgOut-addWikiText( Occurences on the following pages: ); wfDebugLog( MathSearch, var_export( $mo-getAllOccurences(), true ) ); - // $wgOut-addWikiText('b:'.var_export($res,true).'/b'); + //$wgOut-addWikiText('b:'.var_export($res,true).'/b'); $wgOut-addWikiText( 'TeX : code' . $mo-getTex() . '/code' ); $wgOut-addWikiText( 'MathML : ', false ); - $wgOut-addHTML( $mo-mathml ); + $wgOut-addHTML( $mo-getMathml() ); $wgOut-addHtml( 'a href=/wiki/Special:MathSearch?pattern=' . urlencode( $mo-getTex() ) . 'searchx=Searchimg src=http://wikidemo.formulasearchengine.com/images/FSE-PIC.png; width=15 height=15/a' ); # $log=htmlspecialchars( $res-math_log ); $wgOut-addWikiText( '==Similar pages==' ); @@ -82,7 +82,7 @@ $wgOut-addWikiText( '==MathML==' ); $wgOut-addHtml( br / ); - $wgOut-addHtml( htmlspecialchars( $mo-mathml ) ); + $wgOut-addHtml( htmlspecialchars( $mo-getMathml() ) ); $wgOut-addHtml( br / ); $wgOut-addHtml( br / ); $wgOut-addHtml( br / ); @@ -90,7 +90,7 @@ $wgOut-addWikiText( '==LOG and Debug==' ); $wgOut-addWikiText( 'Rendered at : code' . $mo-getTimestamp() . '/code an idexed at code' . $mo-getIndexTimestamp() . '/code' ); - $wgOut-addWikiText( 'validxml : code' . $mo-getValidXml() . '/code recheck:', false ); + $wgOut-addWikiText( 'validxml : code' . MathLaTeXML::isValidMathML($mo-getMathml()) . '/code recheck:', false ); $wgOut-addHtml( MathLaTeXML::isValidMathML( $mo-getMathml() ) ? valid:invalid ); $wgOut-addWikiText( 'status : code' . $mo-getStatusCode() . '/code' ); $wgOut-addHtml( htmlspecialchars( $mo-getLog() ) ); diff --git a/MathObject.php b/MathObject.php index dbc158d..73adcbd 100644 --- a/MathObject.php +++ b/MathObject.php @@ -3,6 +3,13 @@ protected $anchorID = 0; protected $pageID = 0; protected $index_timestamp = null; + protected $inputHash = ''; + + private static function DebugPrint($s){ + //$s= Sanitizer::safeEncodeAttribute($s); + wfDebugLog( MathSearch, $s); + } + public function getAnchorID() { return $this-anchorID; } @@ -18,6 +25,15 @@ public function getIndexTimestamp() { return $this-index_timestamp; } + public function getInputHash(){ + wfDebugLog('MathSearch', 'Debugger dies here'); + //die('end of debug toolbar'); + if ($this-inputHash){ + return $this-inputHash; + } else { + return parent::getInputHash(); + } + } public static function constructformpagerow( $res ) { global $wgDebugMath; if ( $res-mathindex_page_id 0 ) { @@ -28,13 +44,14 @@ $instance-index_timestamp = $res-mathindex_timestamp; } $instance-inputHash = $res-mathindex_inputhash; - $instance-readDatabaseEntry(); - wfDebugLog( MathSearch, 'got' . var_export( $instance, true ) ); + $instance-readFromDatabase(); + self::DebugPrint( 'got' . var_export( $instance, true ) ); return $instance; } else { return false; } } + public static function findSimilarPages( $pid ) { global $wgOut; $out = ; @@ -122,7 +139,7 @@ 'mathindex_page_id = ' . $pid . ' AND mathindex_anchor= ' . $eid ); - wfDebugLog( MathSearch, var_export( $res, true ) ); + self::DebugPrint( var_export( $res, true ) ); return self::constructformpagerow( $res ); } @@ -140,7 +157,7
[MediaWiki-commits] [Gerrit] Update formatting - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: Update formatting .. Update formatting Should silence most CodeSniffer checks. Change-Id: Iec54becdb55731fe44bb9caa8f27f55766d1e1ad --- M api/ApiQueryMessageCollection.php 1 file changed, 41 insertions(+), 13 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/api/ApiQueryMessageCollection.php b/api/ApiQueryMessageCollection.php index 5ed1b65..c4885ca 100644 --- a/api/ApiQueryMessageCollection.php +++ b/api/ApiQueryMessageCollection.php @@ -54,7 +54,10 @@ $languages = $group-getTranslatableLanguages(); if ( $languages !== null !isset( $languages[$params['language']] ) ) { - $this-dieUsage( 'Translation to this language is disabled', 'translate-language-disabled' ); + $this-dieUsage( + 'Translation to this language is disabled', + 'translate-language-disabled' + ); } $messages = $group-initCollection( $params['language'] ); @@ -86,7 +89,11 @@ ); $result-addValue( array( 'query', 'metadata' ), 'resultsize', $resultSize ); - $result-addValue( array( 'query', 'metadata' ), 'remaining', $resultSize - $startOffset - $batchSize ); + $result-addValue( + array( 'query', 'metadata' ), + 'remaining', + $resultSize - $startOffset - $batchSize + ); $messages-loadTranslations(); @@ -110,7 +117,10 @@ } if ( is_null( $resultPageSet ) ) { - $result-setIndexedTagName_internal( array( 'query', $this-getModuleName() ), 'message' ); + $result-setIndexedTagName_internal( + array( 'query', $this-getModuleName() ), + 'message' + ); } else { $resultPageSet-populateFromTitles( $pages ); } @@ -202,7 +212,13 @@ ApiBase::PARAM_ISMULTI = true, ), 'prop' = array( - ApiBase::PARAM_TYPE = array( 'definition', 'translation', 'tags', 'revision', 'properties' ), + ApiBase::PARAM_TYPE = array( + 'definition', + 'translation', + 'tags', + 'revision', + 'properties' + ), ApiBase::PARAM_DFLT = 'definition|translation', ApiBase::PARAM_ISMULTI = true, ), @@ -218,19 +234,26 @@ 'prop' = array( 'Which properties to get', 'definition - message definition', - 'translation - current translation (without !!FUZZY!! string if any, use the tags to check for outdated or broken translations)', + 'translation - current translation (without !!FUZZY!! string if any, ' . + 'use the tags to check for outdated or broken translations)', 'tags- message tags, like optional, ignored and fuzzy', - 'properties - message properties, like status, revision, last-translator. Can vary between messages.', + 'properties - message properties, like status, revision, ' . + 'last-translator. Can vary between messages.', 'revision- deprecated! use properties!', ), 'filter' = array( - 'Message collection filters. Use ! to negate condition. For example !fuzzy means list only all non-fuzzy messages. Filters are applied in the order given.', + 'Message collection filters. Use ! to negate condition. For example ' . + '!fuzzy means list only all non-fuzzy messages. Filters are ' . + 'applied in the order given.', 'fuzzy - messages with fuzzy tag', - 'optional - messages which should be translated only if changes are necessary', + 'optional - messages which should be translated only if ' . +
[MediaWiki-commits] [Gerrit] Adjustments to the Math extension - change (mediawiki...MathSearch)
Physikerwelt has submitted this change and it was merged. Change subject: Adjustments to the Math extension .. Adjustments to the Math extension added curl output to the debug page for LaTeXML developers Change-Id: I72b0471d186f4054e8c691a926ab162a2a40e5ec --- M FormulaInfo.php M MathObject.php M MathSearch.alias.php M SpecialMathDebug.php 4 files changed, 33 insertions(+), 10 deletions(-) Approvals: Physikerwelt: Verified; Looks good to me, approved diff --git a/FormulaInfo.php b/FormulaInfo.php index 68e4f02..093da30 100644 --- a/FormulaInfo.php +++ b/FormulaInfo.php @@ -66,11 +66,11 @@ $mo = MathObject::constructformpage( $pid, $eid ); $wgOut-addWikiText( Occurences on the following pages: ); wfDebugLog( MathSearch, var_export( $mo-getAllOccurences(), true ) ); - // $wgOut-addWikiText('b:'.var_export($res,true).'/b'); + //$wgOut-addWikiText('b:'.var_export($res,true).'/b'); $wgOut-addWikiText( 'TeX : code' . $mo-getTex() . '/code' ); $wgOut-addWikiText( 'MathML : ', false ); - $wgOut-addHTML( $mo-mathml ); + $wgOut-addHTML( $mo-getMathml() ); $wgOut-addHtml( 'a href=/wiki/Special:MathSearch?pattern=' . urlencode( $mo-getTex() ) . 'searchx=Searchimg src=http://wikidemo.formulasearchengine.com/images/FSE-PIC.png; width=15 height=15/a' ); # $log=htmlspecialchars( $res-math_log ); $wgOut-addWikiText( '==Similar pages==' ); @@ -82,7 +82,7 @@ $wgOut-addWikiText( '==MathML==' ); $wgOut-addHtml( br / ); - $wgOut-addHtml( htmlspecialchars( $mo-mathml ) ); + $wgOut-addHtml( htmlspecialchars( $mo-getMathml() ) ); $wgOut-addHtml( br / ); $wgOut-addHtml( br / ); $wgOut-addHtml( br / ); @@ -90,7 +90,7 @@ $wgOut-addWikiText( '==LOG and Debug==' ); $wgOut-addWikiText( 'Rendered at : code' . $mo-getTimestamp() . '/code an idexed at code' . $mo-getIndexTimestamp() . '/code' ); - $wgOut-addWikiText( 'validxml : code' . $mo-getValidXml() . '/code recheck:', false ); + $wgOut-addWikiText( 'validxml : code' . MathLaTeXML::isValidMathML($mo-getMathml()) . '/code recheck:', false ); $wgOut-addHtml( MathLaTeXML::isValidMathML( $mo-getMathml() ) ? valid:invalid ); $wgOut-addWikiText( 'status : code' . $mo-getStatusCode() . '/code' ); $wgOut-addHtml( htmlspecialchars( $mo-getLog() ) ); diff --git a/MathObject.php b/MathObject.php index dbc158d..73adcbd 100644 --- a/MathObject.php +++ b/MathObject.php @@ -3,6 +3,13 @@ protected $anchorID = 0; protected $pageID = 0; protected $index_timestamp = null; + protected $inputHash = ''; + + private static function DebugPrint($s){ + //$s= Sanitizer::safeEncodeAttribute($s); + wfDebugLog( MathSearch, $s); + } + public function getAnchorID() { return $this-anchorID; } @@ -18,6 +25,15 @@ public function getIndexTimestamp() { return $this-index_timestamp; } + public function getInputHash(){ + wfDebugLog('MathSearch', 'Debugger dies here'); + //die('end of debug toolbar'); + if ($this-inputHash){ + return $this-inputHash; + } else { + return parent::getInputHash(); + } + } public static function constructformpagerow( $res ) { global $wgDebugMath; if ( $res-mathindex_page_id 0 ) { @@ -28,13 +44,14 @@ $instance-index_timestamp = $res-mathindex_timestamp; } $instance-inputHash = $res-mathindex_inputhash; - $instance-readDatabaseEntry(); - wfDebugLog( MathSearch, 'got' . var_export( $instance, true ) ); + $instance-readFromDatabase(); + self::DebugPrint( 'got' . var_export( $instance, true ) ); return $instance; } else { return false; } } + public static function findSimilarPages( $pid ) { global $wgOut; $out = ; @@ -122,7 +139,7 @@ 'mathindex_page_id = ' . $pid . ' AND mathindex_anchor= ' . $eid ); - wfDebugLog( MathSearch, var_export( $res, true ) ); + self::DebugPrint( var_export( $res, true ) ); return self::constructformpagerow( $res ); } @@ -140,7 +157,7 @@ ); foreach ( $res as $row ) { -
[MediaWiki-commits] [Gerrit] benchmarks: README file having run recommendations - change (mediawiki/core)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/66066 Change subject: benchmarks: README file having run recommendations .. benchmarks: README file having run recommendations In a wikitech thread about benchmarking, Tim Starling has been running benchmarks using CPU binding and raised priority. This patch copy paste Tim recommendations so we do not forget about them. Change-Id: Ic6f2803c005f70a2f0400f28fafc3c8d209e0667 --- A maintenance/benchmarks/README 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/66/66066/1 diff --git a/maintenance/benchmarks/README b/maintenance/benchmarks/README new file mode 100644 index 000..c021abd --- /dev/null +++ b/maintenance/benchmarks/README @@ -0,0 +1,7 @@ +This directory hold several benchmarking scripts used as a proof of speed +or to track PHP performances over time. + +To get somehow accurate result, you might want to bound the PHP process +to a specific CPU with `taskset` and raise its priority with `nice`. Example: + + $ taskset 1 nice -n-10 php bench_wfIsWindows.php -- To view, visit https://gerrit.wikimedia.org/r/66066 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic6f2803c005f70a2f0400f28fafc3c8d209e0667 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Calculate HTTP POST data in separate method for debugging - change (mediawiki...Math)
Physikerwelt has uploaded a new change for review. https://gerrit.wikimedia.org/r/66067 Change subject: Calculate HTTP POST data in separate method for debugging .. Calculate HTTP POST data in separate method for debugging To check if the renderer works correctly it is desired to be able to separate the test of the renderer and the function of the extension PHP code. Therefore the method getPostData can be used to get the values can be sent to the renderer directly via curl –d 'POSTDATA' URL Change-Id: I530f5fcba46364458643914bca81cf0bc1b60a58 --- M MathLaTeXML.php 1 file changed, 10 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Math refs/changes/67/66067/1 diff --git a/MathLaTeXML.php b/MathLaTeXML.php index ee38317..42e25d2 100644 --- a/MathLaTeXML.php +++ b/MathLaTeXML.php @@ -152,14 +152,21 @@ } /** +* Calculates the HTTP POST Data for the request. Depends on the settings +* and the input string only. +* @return string HTTP POST data +*/ + public function getPostData(){ + $texcmd = urlencode( $this-tex ); + return $this-getLaTeXMLSettings() . 'tex=' . $texcmd; + } + /** * Does the actual web request to convert TeX to MathML. * @return boolean */ private function doRender( ) { $host = self::pickHost(); - $texcmd = urlencode( $this-tex ); - $post = $this-getLaTeXMLSettings(); - $post .= 'tex=' . $texcmd; + $post = $this-getPostData(); $this-lastError = ''; if ( $this-makeRequest( $host, $post, $res, $this-lastError ) ) { $result = json_decode( $res ); -- To view, visit https://gerrit.wikimedia.org/r/66067 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I530f5fcba46364458643914bca81cf0bc1b60a58 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Math Gerrit-Branch: master Gerrit-Owner: Physikerwelt w...@physikerwelt.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Calculate HTTP POST data in separate method for debugging - change (mediawiki...Math)
jenkins-bot has submitted this change and it was merged. Change subject: Calculate HTTP POST data in separate method for debugging .. Calculate HTTP POST data in separate method for debugging To check if the renderer works correctly it is desired to be able to separate the test of the renderer and the function of the extension PHP code. Therefore the method getPostData can be used to get the values can be sent to the renderer directly via curl –d 'POSTDATA' URL Change-Id: I530f5fcba46364458643914bca81cf0bc1b60a58 --- M MathLaTeXML.php 1 file changed, 10 insertions(+), 3 deletions(-) Approvals: Mattflaschen: Looks good to me, approved jenkins-bot: Verified diff --git a/MathLaTeXML.php b/MathLaTeXML.php index ee38317..42e25d2 100644 --- a/MathLaTeXML.php +++ b/MathLaTeXML.php @@ -152,14 +152,21 @@ } /** +* Calculates the HTTP POST Data for the request. Depends on the settings +* and the input string only. +* @return string HTTP POST data +*/ + public function getPostData(){ + $texcmd = urlencode( $this-tex ); + return $this-getLaTeXMLSettings() . 'tex=' . $texcmd; + } + /** * Does the actual web request to convert TeX to MathML. * @return boolean */ private function doRender( ) { $host = self::pickHost(); - $texcmd = urlencode( $this-tex ); - $post = $this-getLaTeXMLSettings(); - $post .= 'tex=' . $texcmd; + $post = $this-getPostData(); $this-lastError = ''; if ( $this-makeRequest( $host, $post, $res, $this-lastError ) ) { $result = json_decode( $res ); -- To view, visit https://gerrit.wikimedia.org/r/66067 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I530f5fcba46364458643914bca81cf0bc1b60a58 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Math Gerrit-Branch: master Gerrit-Owner: Physikerwelt w...@physikerwelt.de Gerrit-Reviewer: Cjucovschi jucovs...@gmail.com Gerrit-Reviewer: Mattflaschen mflasc...@wikimedia.org Gerrit-Reviewer: Ori.livneh o...@wikimedia.org Gerrit-Reviewer: TheDJ hartman.w...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [coordinate.js] Implemented coordinate expert widgets - change (mediawiki...DataValues)
Henning Snater has uploaded a new change for review. https://gerrit.wikimedia.org/r/66069 Change subject: [coordinate.js] Implemented coordinate expert widgets .. [coordinate.js] Implemented coordinate expert widgets Change-Id: Id62bc61c51b1b78dbba0799d5ceea0438958bd64 --- M ValueView/ValueView.resources.mw.php M ValueView/ValueView.resources.php M ValueView/ValueView.tests.qunit.php A ValueView/resources/jquery.valueview/valueview.experts/experts.CoordinateInput.js A ValueView/resources/jquery.valueview/valueview.experts/experts.CoordinateValue.js M ValueView/resources/mw.ext.valueView.js A ValueView/tests/qunit/jquery.valueview/valueview.experts/experts.CoordinateInput.tests.js 7 files changed, 309 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues refs/changes/69/66069/1 diff --git a/ValueView/ValueView.resources.mw.php b/ValueView/ValueView.resources.mw.php index 11a4406..3f7bbf3 100644 --- a/ValueView/ValueView.resources.mw.php +++ b/ValueView/ValueView.resources.mw.php @@ -44,6 +44,7 @@ 'dependencies' = array( 'jquery.valueview', 'jquery.valueview.experts.stringvalue', + 'jquery.valueview.experts.coordinatevalue', 'jquery.valueview.experts.timevalue', 'jquery.valueview.experts.commonsmediatype' ), diff --git a/ValueView/ValueView.resources.php b/ValueView/ValueView.resources.php index d40ed0e..e55a3b5 100644 --- a/ValueView/ValueView.resources.php +++ b/ValueView/ValueView.resources.php @@ -9,6 +9,7 @@ * - jQuery.eachchange * - jQuery.inputAutoExpand * - jQuery.ui.suggester + * - jQuery.coordinate.coordinateinput * - jQuery.time.timeinput * - jQuery.ui.toggler * @@ -197,6 +198,34 @@ ), ), + 'jquery.valueview.experts.coordinateinput' = $moduleTemplate + array( + 'scripts' = array( + 'jquery.valueview/valueview.experts/experts.CoordinateInput.js', + ), + 'dependencies' = array( + 'jquery.valueview.experts', + 'jquery.fn.focusAt', + 'jquery.coordinate.coordinateinput', + 'jquery.ui.inputextender', + 'jquery.valueview.preview', + ), + 'messages' = array( + 'valueview-preview-label', + 'valueview-preview-novalue', + ), + ), + + 'jquery.valueview.experts.coordinatevalue' = $moduleTemplate + array( + 'scripts' = array( + 'jquery.valueview/valueview.experts/experts.CoordinateValue.js', + ), + 'dependencies' = array( + 'jquery.valueview.experts.staticdom', + 'jquery.valueview.BifidExpert', + 'jquery.valueview.experts.coordinateinput', + ), + ), + 'jquery.valueview.experts.timeinput' = $moduleTemplate + array( 'scripts' = array( 'jquery.valueview/valueview.experts/experts.TimeInput.js', diff --git a/ValueView/ValueView.tests.qunit.php b/ValueView/ValueView.tests.qunit.php index 0da1fec..b34d455 100644 --- a/ValueView/ValueView.tests.qunit.php +++ b/ValueView/ValueView.tests.qunit.php @@ -157,6 +157,15 @@ ), ), + 'jquery.valueview.experts.coordinateinput.tests' = array( + 'scripts' = array( + $bp/jquery.valueview/valueview.experts/experts.CoordinateInput.tests.js, + ), + 'dependencies' = array( + 'jquery.valueview.experts.coordinateinput', + ), + ), + 'jquery.valueview.experts.timeinput.tests' = array( 'scripts' = array( $bp/jquery.valueview/valueview.experts/experts.TimeInput.tests.js, diff --git a/ValueView/resources/jquery.valueview/valueview.experts/experts.CoordinateInput.js b/ValueView/resources/jquery.valueview/valueview.experts/experts.CoordinateInput.js new file mode 100644 index 000..4fa6ff2 --- /dev/null +++ b/ValueView/resources/jquery.valueview/valueview.experts/experts.CoordinateInput.js @@ -0,0 +1,180 @@ +/** + * @file + * @ingroup ValueView + * @licence GNU GPL v2+ + * + * @author H. Snater
[MediaWiki-commits] [Gerrit] [coordinate.js] Implemented coordinateinput widget - change (mediawiki...DataValues)
Henning Snater has uploaded a new change for review. https://gerrit.wikimedia.org/r/66068 Change subject: [coordinate.js] Implemented coordinateinput widget .. [coordinate.js] Implemented coordinateinput widget The coordinateinput jQuery widget extends an input element with the ability to handle coordinate values. Change-Id: I3cecd8e16719215d633537f57801c79082278328 --- M ValueView/ValueView.resources.mw.php M ValueView/ValueView.tests.qunit.php A ValueView/resources/jquery.coordinate/jquery.coordinate.coordinateinput.js A ValueView/tests/qunit/jquery.coordinate/jquery.coordinate.coordinateinput.tests.js 4 files changed, 216 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues refs/changes/68/66068/1 diff --git a/ValueView/ValueView.resources.mw.php b/ValueView/ValueView.resources.mw.php index 34f707f..11a4406 100644 --- a/ValueView/ValueView.resources.mw.php +++ b/ValueView/ValueView.resources.mw.php @@ -89,6 +89,17 @@ ) ), + 'jquery.coordinate.coordinateinput' = $moduleTemplate + array( + 'scripts' = array( + 'jquery.coordinate/jquery.coordinate.coordinateinput.js', + ), + 'dependencies' = array( + 'jquery.ui.widget', + 'jquery.eachchange', + 'coordinate.js', + ), + ), + 'jquery.time.timeinput' = $moduleTemplate + array( 'scripts' = array( 'jquery.time/jquery.time.timeinput.js', diff --git a/ValueView/ValueView.tests.qunit.php b/ValueView/ValueView.tests.qunit.php index 5760f42..0da1fec 100644 --- a/ValueView/ValueView.tests.qunit.php +++ b/ValueView/ValueView.tests.qunit.php @@ -63,6 +63,15 @@ ), ), + 'jquery.coordinate.coordinateinput.tests' = array( + 'scripts' = array( + $bp/jquery.coordinate/jquery.coordinate.coordinateinput.tests.js, + ), + 'dependencies' = array( + 'jquery.coordinate.coordinateinput', + ), + ), + 'jquery.time.timeinput.tests' = array( 'scripts' = array( $bp/jquery.time/jquery.time.timeinput.tests.js, diff --git a/ValueView/resources/jquery.coordinate/jquery.coordinate.coordinateinput.js b/ValueView/resources/jquery.coordinate/jquery.coordinate.coordinateinput.js new file mode 100644 index 000..82ba4ef --- /dev/null +++ b/ValueView/resources/jquery.coordinate/jquery.coordinate.coordinateinput.js @@ -0,0 +1,110 @@ +/** + * Input element that interprets coordinate values. + * + * @licence GNU GPL v2+ + * @author H. Snater mediaw...@snater.com + * + * @event update: Triggered whenever the widget's value is updated. + *(1) {jQuery.Event} + *(2) {coordinate.Coordinate|null} New value (null for no or an invalid value) the widget's + *value has been changed to. + * + * @dependency jQuery.Widget + * @dependency jQuery.eachchange + * @dependency coordinate.Coordinate + */ +( function( $, Coordinate ) { + 'use strict'; + + $.widget( 'coordinate.coordinateinput', { + /** +* Caches the widget's current value. +* @type {coordinate.Coordinate|null} +*/ + _value: null, + + /** +* @see jQuery.Widget._create +*/ + _create: function() { + var self = this; + + this.element.addClass( this.widgetName ); + + this.element.eachchange( function( event, oldValue ) { + var value = self._parse(); + if( value !== self._value ) { + self._value = value; + self._trigger( 'update', null, [self._value] ); + } + } ); + }, + + /** +* @see jQuery.Widget.destroy +*/ + destroy: function() { + this.element.removeClass( this.widgetName ); + $.Widget.prototype.destroy.call( this ); + }, + + /** +* Parses the current input value. +* +* @return {coordinate.Coordinate|null} Coordinate object when parsing was successful. +*/ + _parse: function() { + var coordinateValue; + +
[MediaWiki-commits] [Gerrit] doc: various updates - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: doc: various updates .. doc: various updates [includes/cache/MessageCache.php] - internal constants - constructor - a few missing @var [includes/clientpool/RedisConnectionPool.php] - group internal settings applying to the pool - misc protected members updates [includes/debug/Debug.php] - missing parameter name in @var statements Change-Id: I6ff0a68d659529d128f40f32b0fd1c1d39af952f --- M includes/cache/MessageCache.php M includes/clientpool/RedisConnectionPool.php M includes/debug/Debug.php 3 files changed, 70 insertions(+), 26 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/cache/MessageCache.php b/includes/cache/MessageCache.php index 49db857..c06383e 100644 --- a/includes/cache/MessageCache.php +++ b/includes/cache/MessageCache.php @@ -22,12 +22,27 @@ */ /** - * + * MediaWiki message cache structure version. + * Bump this whenever the message cache format has changed. + */ +define( 'MSG_CACHE_VERSION', 1 ); + +/** + * Memcached timeout when loading a key. + * See MessageCache::load() */ define( 'MSG_LOAD_TIMEOUT', 60 ); + +/** + * Memcached timeout when locking a key for a writing operation. + * See MessageCache::lock() + */ define( 'MSG_LOCK_TIMEOUT', 30 ); +/** + * Number of times we will try to acquire a lock from Memcached. + * This comes in addition to MSG_LOCK_TIMEOUT. + */ define( 'MSG_WAIT_TIMEOUT', 30 ); -define( 'MSG_CACHE_VERSION', 1 ); /** * Message cache @@ -44,10 +59,16 @@ */ protected $mCache; - // Should mean that database cannot be used, but check + /** +* Should mean that database cannot be used, but check +* @var bool $mDisable +*/ protected $mDisable; - /// Lifetime for cache, used by object caching + /** +* Lifetime for cache, used by object caching. +* Set on construction, see __construct(). +*/ protected $mExpiry; /** @@ -56,18 +77,21 @@ */ protected $mParserOptions, $mParser; - /// Variable for tracking which variables are already loaded + /** +* Variable for tracking which variables are already loaded +* @var array $mLoadedLanguages +*/ protected $mLoadedLanguages = array(); /** * Singleton instance * -* @var MessageCache +* @var MessageCache $instance */ private static $instance; /** -* @var bool +* @var bool $mInParser */ protected $mInParser = false; @@ -98,6 +122,11 @@ self::$instance = null; } + /** +* @param ObjectCache $memCached A cache instance. If none, fall back to CACHE_NONE. +* @param bool $useDB +* @param int $expiry Lifetime for cache. @see $mExpiry. +*/ function __construct( $memCached, $useDB, $expiry ) { if ( !$memCached ) { $memCached = wfGetCache( CACHE_NONE ); @@ -592,7 +621,10 @@ } /** -* Represents a write lock on the messages key +* Represents a write lock on the messages key. +* +* Will retry MessageCache::MSG_WAIT_TIMEOUT times, each operations having +* a timeout of MessageCache::MSG_LOCK_TIMEOUT. * * @param string $key * @return Boolean: success diff --git a/includes/clientpool/RedisConnectionPool.php b/includes/clientpool/RedisConnectionPool.php index 65fe58f..da4621a 100644 --- a/includes/clientpool/RedisConnectionPool.php +++ b/includes/clientpool/RedisConnectionPool.php @@ -36,23 +36,35 @@ * @since 1.21 */ class RedisConnectionPool { - // Settings for all connections in this pool - protected $connectTimeout; // string; connection timeout - protected $persistent; // bool; whether connections persist - protected $password; // string; plaintext auth password - protected $serializer; // integer; the serializer to use (Redis::SERIALIZER_*) + /** +* @name Pool settings. +* Settings there are shared for any connection made in this pool. +* See the singleton() method documentation for more details. +* @{ +*/ + /** @var string Connection timeout in seconds */ + protected $connectTimeout; + /** @var string Plaintext auth password */ + protected $password; + /** @var bool Whether connections persist */ + protected $persistent; + /** @var integer Serializer to use (Redis::SERIALIZER_*) */ + protected $serializer; + /** @} */ - protected $idlePoolSize = 0; // integer; current idle pool size + /** @var integer Current idle pool size */ + protected $idlePoolSize = 0; /** @var Array (server name =
[MediaWiki-commits] [Gerrit] [coordinate.js] Correctly assigning coordinate variable - change (mediawiki...DataValues)
Henning Snater has uploaded a new change for review. https://gerrit.wikimedia.org/r/66070 Change subject: [coordinate.js] Correctly assigning coordinate variable .. [coordinate.js] Correctly assigning coordinate variable Using this to set the global coordinate object to prevent a crash in the ResourceLoader when debug mode is turned off. Change-Id: I7ccdd2e4223fd1b8f92e4cc5f12028222694afeb --- M DataValues/resources/coordinate.js/src/coordinate.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues refs/changes/70/66070/1 diff --git a/DataValues/resources/coordinate.js/src/coordinate.js b/DataValues/resources/coordinate.js/src/coordinate.js index 237c975..b2f30dc 100644 --- a/DataValues/resources/coordinate.js/src/coordinate.js +++ b/DataValues/resources/coordinate.js/src/coordinate.js @@ -12,7 +12,7 @@ * @author Denny Vrandečić * @author H. Snater mediaw...@snater.com */ -var coordinate = ( function() { +this.coordinate = ( function() { 'use strict'; return { -- To view, visit https://gerrit.wikimedia.org/r/66070 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7ccdd2e4223fd1b8f92e4cc5f12028222694afeb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: master Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Merge 'passwordreset-pretext' and 'passwordreset-text' messages - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Merge 'passwordreset-pretext' and 'passwordreset-text' messages .. Merge 'passwordreset-pretext' and 'passwordreset-text' messages It is confusing to have in the same two messages which can be interpreted with different meanings. When there is more than one way of resetting a password, two messages are being show to the user: - 'passwordreset-pretext' saying to fill only one of the fields below - 'passwordreset-text' saying to *complete* the form, which people can interpret as fill all the fields below This already got changed at the English Wikipedia, see https://en.wikipedia.org/wiki/Wikipedia:MediaWiki_messages/Archive_5#Special:PasswordReset_improvements I think it's worth changing MediaWiki too. Change-Id: Ia2f0c889959d11396411ba44ae595ffad5d498d2 --- M includes/specials/SpecialPasswordReset.php M languages/messages/MessagesEn.php M languages/messages/MessagesQqq.php M maintenance/language/messages.inc 4 files changed, 14 insertions(+), 11 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/specials/SpecialPasswordReset.php b/includes/specials/SpecialPasswordReset.php index fd46c03..3b67554 100644 --- a/includes/specials/SpecialPasswordReset.php +++ b/includes/specials/SpecialPasswordReset.php @@ -103,11 +103,8 @@ } public function alterForm( HTMLForm $form ) { - $form-setSubmitTextMsg( 'mailmypassword' ); - } - - protected function preText() { global $wgPasswordResetRoutes; + $i = 0; if ( isset( $wgPasswordResetRoutes['username'] ) $wgPasswordResetRoutes['username'] ) { $i++; @@ -119,7 +116,10 @@ $i++; } - return $this-msg( 'passwordreset-pretext', $i )-parseAsBlock(); + $message = ( $i 1 ) ? 'passwordreset-text-many' : 'passwordreset-text-one'; + + $form-setHeaderText( $this-msg( $message, $i )-parseAsBlock() ); + $form-setSubmitTextMsg( 'mailmypassword' ); } /** diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index bc3a381..7d632ff 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1275,11 +1275,11 @@ # Special:PasswordReset 'passwordreset'= 'Reset password', -'passwordreset-text' = 'Complete this form to reset your password.', +'passwordreset-text-one' = 'Complete this form to reset your password.', +'passwordreset-text-many' = '{{PLURAL:$1|Enter one of the pieces of data to reset your password.}}', 'passwordreset-legend' = 'Reset password', 'passwordreset-disabled' = 'Password resets have been disabled on this wiki.', 'passwordreset-emaildisabled' = 'Email features have been disabled on this wiki.', -'passwordreset-pretext'= '{{PLURAL:$1||Enter one of the pieces of data below}}', 'passwordreset-username' = 'Username:', 'passwordreset-domain' = 'Domain:', 'passwordreset-capture'= 'View the resulting email?', diff --git a/languages/messages/MessagesQqq.php b/languages/messages/MessagesQqq.php index e789898..6cd4acc 100644 --- a/languages/messages/MessagesQqq.php +++ b/languages/messages/MessagesQqq.php @@ -1348,7 +1348,10 @@ # Special:PasswordReset 'passwordreset' = 'Title of [[Special:PasswordReset]]. {{Identical|Reset password}}', -'passwordreset-text' = 'Text on [[Special:PasswordReset]]', +'passwordreset-text-one' = 'Text on [[Special:PasswordReset]] that appears when there is only one way of resetting the password.', +'passwordreset-text-many' = 'Text on [[Special:PasswordReset]] that appears when there are multiple ways of resetting the password. + +* $1 is the number of password reset routes.', 'passwordreset-legend' = '{{Identical|Reset password}}', 'passwordreset-disabled' = 'Used as error message in changing password.', 'passwordreset-emaildisabled' = Used as error message in changing password when site's email feature is disabled., @@ -8684,7 +8687,7 @@ 'specialpages-group-media' = '{{doc-special-group|like=[[Special:FilePath]], [[Special:MIMESearch]] and [[Special:Upload]]}}', 'specialpages-group-users' = '{{doc-special-group|like=[[Special:ActiveUsers]], [[Special:Contributions]] and [[Special:ListGroupRights]]}}', 'specialpages-group-highuse' = '{{doc-special-group|like=[[Special:MostCategories]], [[Special:MostLinked]] and [[Special:MostRevisions]]}}', -'specialpages-group-pages' = '{{doc-special-group|like=[[Special:AllPages]], [[Special:PrefixIndex]], [[Special:Categories]], +'specialpages-group-pages' = '{{doc-special-group|like=[[Special:AllPages]], [[Special:PrefixIndex]], [[Special:Categories]],
[MediaWiki-commits] [Gerrit] mwdocgen.php going to require a LocalSettings.php - change (integration/jenkins)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/66071 Change subject: mwdocgen.php going to require a LocalSettings.php .. mwdocgen.php going to require a LocalSettings.php I have overhauled the old mwdocgen.php script to make it depends on the Maintenance class: https://gerrit.wikimedia.org/r/#/c/64866/ A side effect pointed by PleaseStand, is that the wrapper now requires a LocalSettings.php file. Using touch will create an empty file if it not there. bug: 34436 Change-Id: Ia4ab471f810b352acdc1453a55773a0f99727a53 --- M tools/mwcore-docgen.sh 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins refs/changes/71/66071/1 diff --git a/tools/mwcore-docgen.sh b/tools/mwcore-docgen.sh index 30cfef0..bacad26 100755 --- a/tools/mwcore-docgen.sh +++ b/tools/mwcore-docgen.sh @@ -53,6 +53,10 @@ echo Found target: '$DEST_DIR' +# Craft a dumb LocalSettings.php which is required by Maintenance script +# albeit the mwdocgen.php script does not require it. +touch $WORKSPACE/LocalSettings.php + # Run the MediaWiki documentation wrapper # # We want to make sure both stdin and stderr are logged to publicly accessible -- To view, visit https://gerrit.wikimedia.org/r/66071 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia4ab471f810b352acdc1453a55773a0f99727a53 Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] overhaul maintenance/mwdocgen.php - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: overhaul maintenance/mwdocgen.php .. overhaul maintenance/mwdocgen.php Now based on Maintenance class. Reinstate {{EXCLUDE}} which got removed by 8199984 This is roughly back compatible. bug: 34436 Change-Id: Ic1a2b2c29718054ec740b2ffb90350af700a6a58 --- M maintenance/Doxyfile M maintenance/mwdocgen.php 2 files changed, 98 insertions(+), 235 deletions(-) Approvals: Hashar: Looks good to me, approved PleaseStand: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/maintenance/Doxyfile b/maintenance/Doxyfile index e6862ac..5d40c16 100644 --- a/maintenance/Doxyfile +++ b/maintenance/Doxyfile @@ -176,6 +176,7 @@ *.txt \ README RECURSIVE = YES +EXCLUDE= {{EXCLUDE}} EXCLUDE_SYMLINKS = YES EXCLUDE_PATTERNS = LocalSettings.php AdminSettings.php StartProfiler.php .svn */.git/* {{EXCLUDE_PATTERNS}} EXCLUDE_SYMBOLS= diff --git a/maintenance/mwdocgen.php b/maintenance/mwdocgen.php index 3439b74..9283264 100644 --- a/maintenance/mwdocgen.php +++ b/maintenance/mwdocgen.php @@ -8,12 +8,6 @@ * Usage: * php mwdocgen.php * - * KNOWN BUGS: - * - * - pass_thru seems to always use buffering (even with ob_implicit_flush()), - * that make output slow when doxygen parses language files. - * - the menu doesnt work, got disabled at revision 13740. Need to code it. - * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -39,258 +33,126 @@ * @version first release */ -# -# Variables / Configuration -# - -if ( PHP_SAPI != 'cli' ) { - echo 'Run ' . __FILE__ . ' from the command line.'; - die( -1 ); -} - -/** Figure out the base directory for MediaWiki location */ -$mwPath = dirname( __DIR__ ) . DIRECTORY_SEPARATOR; - -/** doxygen binary script */ -$doxygenBin = 'doxygen'; - -/** doxygen configuration template for mediawiki */ -$doxygenTemplate = $mwPath . 'maintenance/Doxyfile'; - -/** doxygen input filter to tweak source file before they are parsed */ -$doxygenInputFilter = php {$mwPath}maintenance/mwdoc-filter.php; - -/** where Phpdoc should output documentation */ -$doxyOutput = $mwPath . 'docs' . DIRECTORY_SEPARATOR; - -$doxyVersion = 'master'; - -/** MediaWiki subpaths */ -$mwPathI = $mwPath . 'includes/'; -$mwPathL = $mwPath . 'languages/'; -$mwPathM = $mwPath . 'maintenance/'; -$mwPathS = $mwPath . 'skins/'; - -/** Ignored paths relative to $mwPath */ -$mwExcludePaths = array( - 'images', - 'static', -); - -/** Variable to get user input */ -$input = ''; -$excludePatterns = ''; -/** Whether to generates man pages: */ -$doxyGenerateMan = false; - -# -# Functions -# - -define( 'MEDIAWIKI', true ); -require_once $mwPath/includes/GlobalFunctions.php; +require_once __DIR__ . '/Maintenance.php'; /** - * Read a line from the shell - * @param $prompt String - * @return string + * Maintenance script that builds doxygen documentation. + * @ingroup Maintenance */ -function readaline( $prompt = '' ) { - print $prompt; - $fp = fopen( php://stdin, r ); - $resp = trim( fgets( $fp, 1024 ) ); - fclose( $fp ); - return $resp; -} +class MWDocGen extends Maintenance { -/** - * Generate a configuration file given user parameters and return the temporary filename. - * @param $doxygenTemplate String: full path for the template. - * @param $outputDirectory String: directory where the stuff will be output. - * @param $stripFromPath String: path that should be stripped out (usually mediawiki base path). - * @param $currentVersion String: Version number of the software - * @param $input String: Path to analyze. - * @param $exclude String: Additionals path regex to exclude - * @param $excludePatterns String: Additionals path regex to exclude - * (LocalSettings.php, AdminSettings.php, .svn and .git directories are always excluded) - * @param $doxyGenerateMan Boolean - * @return string - */ -function generateConfigFile( $doxygenTemplate, $outputDirectory, $stripFromPath, $currentVersion, $input, $exclude, $excludePatterns, $doxyGenerateMan, $doxygenInputFilter ) { + /** +* Prepare Maintenance class +*/ + public function __construct() { + parent::__construct(); + $this-mDescription = 'Build doxygen documentation'; - $template = file_get_contents( $doxygenTemplate ); - // Replace template placeholders by correct values. - $replacements = array( - '{{OUTPUT_DIRECTORY}}' = $outputDirectory, - '{{STRIP_FROM_PATH}}' = $stripFromPath, - '{{CURRENT_VERSION}}' = $currentVersion, -
[MediaWiki-commits] [Gerrit] (bug 35340) Use SVG for Vector collapsible section arrow - change (mediawiki...Vector)
jenkins-bot has submitted this change and it was merged. Change subject: (bug 35340) Use SVG for Vector collapsible section arrow .. (bug 35340) Use SVG for Vector collapsible section arrow SVG with fallback is used to allow SVG-capable browsers to use hi-resolution graphics in a backwards compatible manner. Change-Id: Icaccdb512916dfc079a023a8453f570ba8781dac --- M modules/ext.vector.collapsibleNav.css M modules/ext.vector.footerCleanup.css A modules/images/closed-ltr.svg A modules/images/closed-rtl.svg A modules/images/open.svg 5 files changed, 135 insertions(+), 0 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ext.vector.collapsibleNav.css b/modules/ext.vector.collapsibleNav.css index b9c2735..f3df584 100644 --- a/modules/ext.vector.collapsibleNav.css +++ b/modules/ext.vector.collapsibleNav.css @@ -17,6 +17,12 @@ font-weight: normal; /* @embed */ background: url(images/open.png) left center no-repeat; + /* SVG support using a transparent gradient to guarantee cross-browser +* compatibility (browsers able to understand gradient syntax support also SVG) */ + /* @embed */ + background-image: -webkit-linear-gradient(transparent, transparent), url(images/open.svg); + /* @embed */ + background-image: linear-gradient(transparent, transparent), url(images/open.svg); padding: 4px 0 3px 1.5em; margin-bottom: 0; } @@ -78,6 +84,12 @@ color: #0645AD; /* @embed */ background: url(images/closed-ltr.png) left center no-repeat; + /* SVG support using a transparent gradient to guarantee cross-browser +* compatibility (browsers able to understand gradient syntax support also SVG) */ + /* @embed */ + background-image: -webkit-linear-gradient(transparent, transparent), url(./images/closed-ltr.svg); + /* @embed */ + background-image: linear-gradient(transparent, transparent), url(./images/closed-ltr.svg); margin-bottom: 0; } diff --git a/modules/ext.vector.footerCleanup.css b/modules/ext.vector.footerCleanup.css index a361346..1afc718 100644 --- a/modules/ext.vector.footerCleanup.css +++ b/modules/ext.vector.footerCleanup.css @@ -27,6 +27,12 @@ float: left; /* @embed */ background-image: url(./images/open.png); + /* SVG support using a transparent gradient to guarantee cross-browser +* compatibility (browsers able to understand gradient syntax support also SVG) */ + /* @embed */ + background-image: -webkit-linear-gradient(transparent, transparent), url(./images/open.svg); + /* @embed */ + background-image: linear-gradient(transparent, transparent), url(./images/open.svg); background-repeat: no-repeat; background-position: 50% 50%; display: block; @@ -37,6 +43,12 @@ .collapsible-list span.collapsed { /* @embed */ background-image: url(./images/closed-ltr.png); + /* SVG support using a transparent gradient to guarantee cross-browser +* compatibility (browsers able to understand gradient syntax support also SVG) */ + /* @embed */ + background-image: -webkit-linear-gradient(transparent, transparent), url(./images/closed-ltr.svg); + /* @embed */ + background-image: linear-gradient(transparent, transparent), url(./images/closed-ltr.svg); } .hiddencats ul, .templatesUsed ul { diff --git a/modules/images/closed-ltr.svg b/modules/images/closed-ltr.svg new file mode 100644 index 000..d0c4729 --- /dev/null +++ b/modules/images/closed-ltr.svg @@ -0,0 +1,37 @@ +?xml version=1.0 encoding=UTF-8 standalone=no? +!-- Created with Inkscape (http://www.inkscape.org/) -- + +svg + xmlns:dc=http://purl.org/dc/elements/1.1/; + xmlns:cc=http://creativecommons.org/ns#; + xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#; + xmlns:svg=http://www.w3.org/2000/svg; + xmlns=http://www.w3.org/2000/svg; + version=1.1 + width=16 + height=16 + id=svg2 + defs + id=defs4 / + metadata + id=metadata7 +rdf:RDF + cc:Work + rdf:about= +dc:formatimage/svg+xml/dc:format +dc:type + rdf:resource=http://purl.org/dc/dcmitype/StillImage; / +dc:title/dc:title + /cc:Work +/rdf:RDF + /metadata + g + transform=translate(0,-1036.0288) + id=layer1 +path + d=M 10.028624,3.7729932 8.1976442,6.9443424 6.349,3.7729932 z + transform=matrix(0,-2.7307791,1.576616,0,0.05143855,1066.4148) + id=path2985 + style=fill:#797979;fill-opacity:1;stroke:none / + /g +/svg diff --git a/modules/images/closed-rtl.svg b/modules/images/closed-rtl.svg new file mode 100644 index 000..8c5e04b --- /dev/null +++ b/modules/images/closed-rtl.svg @@ -0,0 +1,37 @@ +?xml version=1.0 encoding=UTF-8 standalone=no? +!-- Created with
[MediaWiki-commits] [Gerrit] mwdocgen.php going to require a LocalSettings.php - change (integration/jenkins)
Hashar has submitted this change and it was merged. Change subject: mwdocgen.php going to require a LocalSettings.php .. mwdocgen.php going to require a LocalSettings.php I have overhauled the old mwdocgen.php script to make it depends on the Maintenance class: https://gerrit.wikimedia.org/r/#/c/64866/ A side effect pointed by PleaseStand, is that the wrapper now requires a LocalSettings.php file. Using touch will create an empty file if it not there. bug: 34436 Change-Id: Ia4ab471f810b352acdc1453a55773a0f99727a53 --- M tools/mwcore-docgen.sh 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Hashar: Verified; Looks good to me, approved diff --git a/tools/mwcore-docgen.sh b/tools/mwcore-docgen.sh index 30cfef0..bacad26 100755 --- a/tools/mwcore-docgen.sh +++ b/tools/mwcore-docgen.sh @@ -53,6 +53,10 @@ echo Found target: '$DEST_DIR' +# Craft a dumb LocalSettings.php which is required by Maintenance script +# albeit the mwdocgen.php script does not require it. +touch $WORKSPACE/LocalSettings.php + # Run the MediaWiki documentation wrapper # # We want to make sure both stdin and stderr are logged to publicly accessible -- To view, visit https://gerrit.wikimedia.org/r/66071 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia4ab471f810b352acdc1453a55773a0f99727a53 Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] tests: group structures tests in their own directory - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: tests: group structures tests in their own directory .. tests: group structures tests in their own directory The phpunit root directory has two test file: AutoLoaderTest.php StructureTest.php The later was registered in phpunit under the `structure` test suite while the former was not registered and hence never run (bug 47750). This patch moves both files under the `structure` subdirectory and change the suite to look in that directory. That will avoid us having to manually maintain a list of test files. Updated the __DIR__ in StructureTest.php. Change-Id: I419c9157f32bdf7e1ff26a42f4bb3f3922b7be37 --- R tests/phpunit/structure/AutoLoaderTest.php R tests/phpunit/structure/StructureTest.php M tests/phpunit/suite.xml 3 files changed, 3 insertions(+), 3 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/phpunit/AutoLoaderTest.php b/tests/phpunit/structure/AutoLoaderTest.php similarity index 100% rename from tests/phpunit/AutoLoaderTest.php rename to tests/phpunit/structure/AutoLoaderTest.php diff --git a/tests/phpunit/StructureTest.php b/tests/phpunit/structure/StructureTest.php similarity index 92% rename from tests/phpunit/StructureTest.php rename to tests/phpunit/structure/StructureTest.php index a942098..df00d4d 100644 --- a/tests/phpunit/StructureTest.php +++ b/tests/phpunit/structure/StructureTest.php @@ -14,7 +14,7 @@ if ( wfIsWindows() ) { $this-markTestSkipped( 'This test does not work on Windows' ); } - $rootPath = escapeshellarg( __DIR__ ); + $rootPath = escapeshellarg( __DIR__ . '/..' ); $testClassRegex = implode( '|', array( 'ApiFormatTestBase', 'ApiTestCase', @@ -58,6 +58,6 @@ * Filter to remove testUnitTestFileNamesEndWithTest false positives. */ public function filterSuites( $filename ) { - return strpos( $filename, __DIR__ . '/suites/' ) !== 0; + return strpos( $filename, __DIR__ . '/../suites/' ) !== 0; } } diff --git a/tests/phpunit/suite.xml b/tests/phpunit/suite.xml index 56f6447..844c853 100644 --- a/tests/phpunit/suite.xml +++ b/tests/phpunit/suite.xml @@ -29,7 +29,7 @@ directorymaintenance/directory /testsuite testsuite name=structure - fileStructureTest.php/file + directorystructure/directory /testsuite testsuite name=uploadfromurl filesuites/UploadFromUrlTestSuite.php/file -- To view, visit https://gerrit.wikimedia.org/r/64788 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I419c9157f32bdf7e1ff26a42f4bb3f3922b7be37 Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: JanZerebecki jan.wikime...@zerebecki.de Gerrit-Reviewer: Krinkle krinklem...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [coordinate.js] Refactored precision handling - change (mediawiki...DataValues)
Henning Snater has uploaded a new change for review. https://gerrit.wikimedia.org/r/66072 Change subject: [coordinate.js] Refactored precision handling .. [coordinate.js] Refactored precision handling Moved the precision levels into the settings object and removed functions altering the precision from the Coordinate prototype since a Coordinate object is meant to be immutable. Change-Id: I39753f037a0e6a2eca4264da68f041155ebdf6e1 --- M DataValues/resources/coordinate.js/src/coordinate.Coordinate.js M DataValues/resources/coordinate.js/src/coordinate.js M DataValues/resources/coordinate.js/tests/coordinate.Coordinate.tests.js M DataValues/resources/coordinate.js/tests/coordinate.tests.js 4 files changed, 30 insertions(+), 115 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues refs/changes/72/66072/1 diff --git a/DataValues/resources/coordinate.js/src/coordinate.Coordinate.js b/DataValues/resources/coordinate.js/src/coordinate.Coordinate.js index dd532ba..f12b452 100644 --- a/DataValues/resources/coordinate.js/src/coordinate.Coordinate.js +++ b/DataValues/resources/coordinate.js/src/coordinate.Coordinate.js @@ -143,33 +143,6 @@ getPrecision: function() { return this._precision; }, /** -* Sets the precision. -* -* TODO: Make this an immutable object, deprecate this function. -* -* @param {number} precision -*/ - setPrecision: function( precision ) { this._precision = precision; }, - - /** -* Increases the precision by one step. -* -* TODO: Make this an immutable object, deprecate this function. -*/ - increasePrecision: function() { - this._precision = coordinate.increasePrecision( this._precision ); - }, - - /** -* Decreases the precision by one step. -* -* TODO: Make this an immutable object, deprecate this function. -*/ - decreasePrecision: function() { - this._precision = coordinate.decreasePrecision( this._precision ); - }, - - /** * Returns the precision text. * * @return {string} diff --git a/DataValues/resources/coordinate.js/src/coordinate.js b/DataValues/resources/coordinate.js/src/coordinate.js index b2f30dc..3937104 100644 --- a/DataValues/resources/coordinate.js/src/coordinate.js +++ b/DataValues/resources/coordinate.js/src/coordinate.js @@ -30,30 +30,27 @@ degree: '°', minute: '\'', second: '', - precisionTexts: [ - { precision: 1, text: 'to a degree' }, - { precision: 1 / 60, text: 'to an arcminute' }, - { precision: 1 / 3600, text: 'to an arcsecond' }, - { precision: 1 / 36000, text: 'to a tenth of an arcsecond' }, - { precision: 1 / 36, text: 'to the hundredth of an arcsecond' }, - { precision: 1 / 360, text: 'to the thousandth of an arcsecond' } - ] + precision: { + levels: [ + 10, + 1, + 0.1, 1/60, + 0.01, 1/3600, + 0.001, 1/36000, + 0.0001, 1/36, + 0.1, 1/360, + 0.01 + ], + texts: [ + { precision: 1, text: 'to a degree' }, + { precision: 1 / 60, text: 'to an arcminute' }, + { precision: 1 / 3600, text: 'to an arcsecond' }, + { precision: 1 / 36000, text: 'to a tenth of an arcsecond' }, + { precision: 1 / 36, text: 'to the hundredth of an arcsecond' }, + { precision: 1 / 360, text: 'to the thousandth of an arcsecond' } + ] + } }, - - /** -* Default precision levels. -* @type {number[]} -*/ - precisionLevels: [ - 10, - 1, - 0.1, 1/60, -
[MediaWiki-commits] [Gerrit] If the ULS position is interlanguages, always add dummy lang... - change (mediawiki...UniversalLanguageSelector)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/66073 Change subject: If the ULS position is interlanguages, always add dummy language links .. If the ULS position is interlanguages, always add dummy language links So that the cog icon is shown for anon users even if the page has no interlanguage links Bug: 48203 Change-Id: I25e7e77c8b3d3e5dbf8ce4bc9f6bd8ca8aa22d1c --- M UniversalLanguageSelector.hooks.php 1 file changed, 0 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/73/66073/1 diff --git a/UniversalLanguageSelector.hooks.php b/UniversalLanguageSelector.hooks.php index 132d046..1f85332 100644 --- a/UniversalLanguageSelector.hooks.php +++ b/UniversalLanguageSelector.hooks.php @@ -336,10 +336,6 @@ return true; } - if ( !self::isToolbarEnabled( $skin-getUser() ) ) { - return true; - } - // A dummy link, just to make sure that the section appears $template-data['language_urls'][] = array( 'href' = '#', -- To view, visit https://gerrit.wikimedia.org/r/66073 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I25e7e77c8b3d3e5dbf8ce4bc9f6bd8ca8aa22d1c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Install cp1037-1040 as text Varnish - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/66074 Change subject: Install cp1037-1040 as text Varnish .. Install cp1037-1040 as text Varnish Change-Id: I28b87625b42746ea90270b6843900e684b32ec8f --- M files/autoinstall/netboot.cfg M manifests/role/cache.pp M manifests/site.pp 3 files changed, 20 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/74/66074/1 diff --git a/files/autoinstall/netboot.cfg b/files/autoinstall/netboot.cfg index 7b392a3..f3ceb80 100755 --- a/files/autoinstall/netboot.cfg +++ b/files/autoinstall/netboot.cfg @@ -38,7 +38,7 @@ boron|chromium|hydrogen) echo partman/lvm.cfg ;; \ calcium|helium|potassium|tmh1001|tmh1002) echo partman/raid1-1partition.cfg ;; \ capella) echo partman/lvs.cfg ;; \ - cp102[1-9]|cp103[0-6]|cp104[1-4]|cp30[0-9][0-9]|sq6[7-9]|sq70|dysprosium) echo partman/raid1-varnish.cfg ;; \ + cp102[1-9]|cp103[0-9]|cp104[01-4]|cp30[0-9][0-9]|sq6[7-9]|sq70|dysprosium) echo partman/raid1-varnish.cfg ;; \ antimony|barium|caesium|celsus|cerium|europium|gadolinium|holmium|lanthanum|magnesium|neodymium|palladium|promethium|strontium|terbium|titanium|xenon|wtp100[1-4]) echo partman/lvm.cfg ;; \ colby|constable|kuo|lardner|mexia|tola) echo partman/lvm.cfg ;; \ lvs*) echo partman/lvs.cfg ;; \ diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index 5d90662..d815ad2 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -61,6 +61,12 @@ 'cp1019.eqiad.wmnet', 'cp1020.eqiad.wmnet', ], + eqiad-varnish = [ + 'cp1037.eqiad.wmnet', + 'cp1038.eqiad.wmnet', + 'cp1039.eqiad.wmnet', + 'cp1040.eqiad.wmnet', + ], esams = [ knsq23.knams.wikimedia.org, knsq24.knams.wikimedia.org, @@ -355,7 +361,7 @@ } class text { - if ($::site == esams and $::hostname =~ /^amssq(4[7-9]|[56][0-9])$/) or ($::realm == labs and $::hostname =~ /^deployment-cache-text/) { + if ($::hostname in ['cp1037', 'cp1038', 'cp1039', 'cp1040'] or $::hostname =~ /^amssq(4[7-9]|[56][0-9])$/) or ($::realm == labs and $::hostname =~ /^deployment-cache-text/) { # Varnish $cluster = cache_text @@ -370,7 +376,8 @@ $varnish_fe_directors = { # pmtpa is for labs / beta cluster pmtpa = { backend = $role::cache::configuration::active_nodes[$::realm]['text'][$::site] }, - eqiad = { backend = $role::cache::configuration::active_nodes[$::realm]['text'][$::site] }, + # TODO: replace after removing Squid + eqiad = { backend = $role::cache::configuration::active_nodes[$::realm]['text'][${::site}-varnish] }, # TODO: replace after removing Squid esams = { backend = $role::cache::configuration::active_nodes[$::realm]['text'][${::site}-varnish] }, } diff --git a/manifests/site.pp b/manifests/site.pp index 60edd58..e7df2ba 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -333,6 +333,16 @@ include role::cache::upload } +node /^cp10(3[7-9]|40\.eqiad\.wmnet$/ { + if $hostname =~ /^cp103[78]$/ { + $ganglia_aggregator = true + } + + interface_add_ip6_mapped { main: } + + include role::cache::text +} + # eqiad varnish for m.wikipedia.org node /^cp104[1-4]\.(wikimedia\.org|eqiad\.wmnet)$/ { -- To view, visit https://gerrit.wikimedia.org/r/66074 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I28b87625b42746ea90270b6843900e684b32ec8f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Install cp1037-1040 as text Varnish - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Install cp1037-1040 as text Varnish .. Install cp1037-1040 as text Varnish Change-Id: I28b87625b42746ea90270b6843900e684b32ec8f --- M files/autoinstall/netboot.cfg M manifests/role/cache.pp M manifests/site.pp 3 files changed, 20 insertions(+), 3 deletions(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified diff --git a/files/autoinstall/netboot.cfg b/files/autoinstall/netboot.cfg index 7b392a3..f3ceb80 100755 --- a/files/autoinstall/netboot.cfg +++ b/files/autoinstall/netboot.cfg @@ -38,7 +38,7 @@ boron|chromium|hydrogen) echo partman/lvm.cfg ;; \ calcium|helium|potassium|tmh1001|tmh1002) echo partman/raid1-1partition.cfg ;; \ capella) echo partman/lvs.cfg ;; \ - cp102[1-9]|cp103[0-6]|cp104[1-4]|cp30[0-9][0-9]|sq6[7-9]|sq70|dysprosium) echo partman/raid1-varnish.cfg ;; \ + cp102[1-9]|cp103[0-9]|cp104[01-4]|cp30[0-9][0-9]|sq6[7-9]|sq70|dysprosium) echo partman/raid1-varnish.cfg ;; \ antimony|barium|caesium|celsus|cerium|europium|gadolinium|holmium|lanthanum|magnesium|neodymium|palladium|promethium|strontium|terbium|titanium|xenon|wtp100[1-4]) echo partman/lvm.cfg ;; \ colby|constable|kuo|lardner|mexia|tola) echo partman/lvm.cfg ;; \ lvs*) echo partman/lvs.cfg ;; \ diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index 5d90662..d815ad2 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -61,6 +61,12 @@ 'cp1019.eqiad.wmnet', 'cp1020.eqiad.wmnet', ], + eqiad-varnish = [ + 'cp1037.eqiad.wmnet', + 'cp1038.eqiad.wmnet', + 'cp1039.eqiad.wmnet', + 'cp1040.eqiad.wmnet', + ], esams = [ knsq23.knams.wikimedia.org, knsq24.knams.wikimedia.org, @@ -355,7 +361,7 @@ } class text { - if ($::site == esams and $::hostname =~ /^amssq(4[7-9]|[56][0-9])$/) or ($::realm == labs and $::hostname =~ /^deployment-cache-text/) { + if ($::hostname in ['cp1037', 'cp1038', 'cp1039', 'cp1040'] or $::hostname =~ /^amssq(4[7-9]|[56][0-9])$/) or ($::realm == labs and $::hostname =~ /^deployment-cache-text/) { # Varnish $cluster = cache_text @@ -370,7 +376,8 @@ $varnish_fe_directors = { # pmtpa is for labs / beta cluster pmtpa = { backend = $role::cache::configuration::active_nodes[$::realm]['text'][$::site] }, - eqiad = { backend = $role::cache::configuration::active_nodes[$::realm]['text'][$::site] }, + # TODO: replace after removing Squid + eqiad = { backend = $role::cache::configuration::active_nodes[$::realm]['text'][${::site}-varnish] }, # TODO: replace after removing Squid esams = { backend = $role::cache::configuration::active_nodes[$::realm]['text'][${::site}-varnish] }, } diff --git a/manifests/site.pp b/manifests/site.pp index 60edd58..976da54 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -333,6 +333,16 @@ include role::cache::upload } +node /^cp10(3[7-9]|40)\.eqiad\.wmnet$/ { + if $::hostname =~ /^cp103[78]$/ { + $ganglia_aggregator = true + } + + interface_add_ip6_mapped { main: } + + include role::cache::text +} + # eqiad varnish for m.wikipedia.org node /^cp104[1-4]\.(wikimedia\.org|eqiad\.wmnet)$/ { -- To view, visit https://gerrit.wikimedia.org/r/66074 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I28b87625b42746ea90270b6843900e684b32ec8f Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixed IE problem not displaying images and also: - moved the... - change (mediawiki...WikiLexicalData)
Kipcool has uploaded a new change for review. https://gerrit.wikimedia.org/r/66076 Change subject: Fixed IE problem not displaying images and also: - moved the resources directory to the extension root - moved the image resources into resources/images .. Fixed IE problem not displaying images and also: - moved the resources directory to the extension root - moved the image resources into resources/images Change-Id: Iaec54471564f31627fa444bbf96b5b24f59080b5 --- M App.php R resources/images/ArrowButtonDown1px.png R resources/images/Delete.png R resources/images/all_lang.png R resources/images/my_lang.png R resources/omegawiki-ajax.js R resources/omegawiki-edit.js R resources/suggest.css R resources/suggest.js R resources/tables.css R resources/wforms.js 11 files changed, 11 insertions(+), 24 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiLexicalData refs/changes/76/66076/1 diff --git a/App.php b/App.php index b8aaf4c..018b151 100644 --- a/App.php +++ b/App.php @@ -45,28 +45,27 @@ // Resource modules $resourcePathArray = array( - 'localBasePath' = dirname( __FILE__ ), - 'remoteExtPath' = 'Wikidata' + 'localBasePath' = dirname( __FILE__ ) . '/resources', + 'remoteExtPath' = 'WikiLexicalData/resources' ); // separated css with position top to avoid // so-called Flash of unstyled content $wgResourceModules['ext.Wikidata.css'] = $resourcePathArray + array( - 'styles' = array( 'OmegaWiki/resources/suggest.css', 'OmegaWiki/resources/tables.css' ), + 'styles' = array( 'suggest.css', 'tables.css' ), 'position' = 'top' ); $wgResourceModules['ext.Wikidata.ajax'] = $resourcePathArray + array( - 'scripts' = 'OmegaWiki/resources/omegawiki-ajax.js', - 'dependencies' = array( 'jquery.tablesorter' ) + 'scripts' = 'omegawiki-ajax.js' ); $wgResourceModules['ext.Wikidata.edit'] = $resourcePathArray + array( - 'scripts' = 'OmegaWiki/resources/omegawiki-edit.js' + 'scripts' = 'omegawiki-edit.js' ); $wgResourceModules['ext.Wikidata.suggest'] = $resourcePathArray + array( - 'scripts' = 'OmegaWiki/resources/suggest.js', + 'scripts' = 'suggest.js', 'messages' = array( 'ow_suggest_clear', 'ow_suggest_previous', 'ow_suggest_next' ) ); diff --git a/Images/ArrowButtonDown1px.png b/resources/images/ArrowButtonDown1px.png similarity index 100% rename from Images/ArrowButtonDown1px.png rename to resources/images/ArrowButtonDown1px.png Binary files differ diff --git a/Images/Delete.png b/resources/images/Delete.png similarity index 100% rename from Images/Delete.png rename to resources/images/Delete.png Binary files differ diff --git a/Images/all_lang.png b/resources/images/all_lang.png similarity index 100% rename from Images/all_lang.png rename to resources/images/all_lang.png Binary files differ diff --git a/Images/my_lang.png b/resources/images/my_lang.png similarity index 100% rename from Images/my_lang.png rename to resources/images/my_lang.png Binary files differ diff --git a/OmegaWiki/resources/omegawiki-ajax.js b/resources/omegawiki-ajax.js similarity index 100% rename from OmegaWiki/resources/omegawiki-ajax.js rename to resources/omegawiki-ajax.js diff --git a/OmegaWiki/resources/omegawiki-edit.js b/resources/omegawiki-edit.js similarity index 99% rename from OmegaWiki/resources/omegawiki-edit.js rename to resources/omegawiki-edit.js index d76d5d7..f4eee89 100644 --- a/OmegaWiki/resources/omegawiki-edit.js +++ b/resources/omegawiki-edit.js @@ -1,5 +1,5 @@ jQuery(document).ready(function( $ ) { - + // automatically fills in the label when a url is pasted. $(td.url).bind('paste', function() { var tdurl = this ; diff --git a/OmegaWiki/resources/suggest.css b/resources/suggest.css similarity index 84% rename from OmegaWiki/resources/suggest.css rename to resources/suggest.css index c5414e1..ce4eb8a 100644 --- a/OmegaWiki/resources/suggest.css +++ b/resources/suggest.css @@ -8,7 +8,7 @@ border-style: solid; border-color: #7F9DB9; /* @embed */ - background-image: url(../../Images/ArrowButtonDown1px.png); + background: url(images/ArrowButtonDown1px.png); background-repeat: no-repeat; background-position: center right; } @@ -22,18 +22,6 @@ top: 1px; bottom: 0px; background-color: #FF; -} - -/* Internet Explorer hack */ -* html .suggest-link { - /* @embed */ - background-image: url(../../Images/ArrowButtonDown2px.png); -} - -/* Internet Explorer hack */ -* html .wiki-data-table td .suggest-link { - /* @embed */ - background-image: url(../../Images/ArrowButtonDown1px.png); } .suggest-link, diff --git a/OmegaWiki/resources/suggest.js b/resources/suggest.js similarity index 100% rename from OmegaWiki/resources/suggest.js rename to resources/suggest.js diff --git
[MediaWiki-commits] [Gerrit] changed arrows to characters supported by IE7 - change (mediawiki...WikiLexicalData)
Kipcool has uploaded a new change for review. https://gerrit.wikimedia.org/r/66075 Change subject: changed arrows to characters supported by IE7 .. changed arrows to characters supported by IE7 Change-Id: Ic3c3cb8de74ae6495c37e72b24f60d4e1661ba03 --- M OmegaWiki/Editor.php 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiLexicalData refs/changes/75/66075/1 diff --git a/OmegaWiki/Editor.php b/OmegaWiki/Editor.php index a469d48..c822812 100644 --- a/OmegaWiki/Editor.php +++ b/OmegaWiki/Editor.php @@ -310,7 +310,7 @@ // if it is collapsible, continue global $wgLang; - $arrow = ( $wgLang-getDir() == 'ltr' ) ? ▶ : ◀ ; + $arrow = ( $wgLang-getDir() == 'ltr' ) ? ► : ◄ ; $prefix = Html::element('span', array( 'class' = prefix collapse-$class ) , $arrow ) ; @@ -2183,11 +2183,11 @@ $popupShow = Html::element('span', array( 'class' = popupshow - ) , wfMessage( 'showtoc' )-text() . ▿ ) ; + ) , wfMessage( 'showtoc' )-plain() . ▼ ) ; $popupHide = Html::element('span', array( 'class' = popuphide, 'style' = display:none; - ) , wfMessage( 'hidetoc' )-text() . ▵ ) ; + ) , wfMessage( 'hidetoc' )-plain() . ▲ ) ; $result .= $popupShow . $popupHide ; $result .= Html::closeElement('a'); -- To view, visit https://gerrit.wikimedia.org/r/66075 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic3c3cb8de74ae6495c37e72b24f60d4e1661ba03 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikiLexicalData Gerrit-Branch: master Gerrit-Owner: Kipcool kipmas...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Various small code cleanups - change (mediawiki...Parsoid)
GWicke has submitted this change and it was merged. Change subject: Various small code cleanups .. Various small code cleanups * Use JobQueueGroup::push() in updateTitle(). * Made CurlMultiClient::request() return an array if no urls are given. Also cleaned up the options and error checking code a bit. * Code style formatting. * Added some type hints and make use of the 'self' keyword. * Added some TODO/FIXME comments. Change-Id: Iad4de0f0017b3f079971d76523d3a5a5487e9155 --- M php/CurlMultiClient.php M php/Parsoid.hooks.php M php/Parsoid.php M php/ParsoidCacheUpdateJob.php 4 files changed, 100 insertions(+), 92 deletions(-) Approvals: GWicke: Verified; Looks good to me, approved diff --git a/php/CurlMultiClient.php b/php/CurlMultiClient.php index 0ad2619..582a419 100644 --- a/php/CurlMultiClient.php +++ b/php/CurlMultiClient.php @@ -1,6 +1,8 @@ ?php + /** * A simple parallel CURL client helper class + * @TODO: name this ParsoidCurlMultiClient or move to core */ class CurlMultiClient { @@ -10,10 +12,10 @@ * @static * @returns array default options */ - public static function getDefaultOptions () { + public static function getDefaultOptions() { return array( - CURLOPT_HEADER=0, - CURLOPT_RETURNTRANSFER=1 + CURLOPT_HEADER = 0, + CURLOPT_RETURNTRANSFER = 1 ); } @@ -23,11 +25,11 @@ * * @static * @param $requests array requests, each with an url and an optional -* 'headers' member: -*array( -* 'url' = 'http://server.com/foo', -* 'headers' = array( 'X-Foo: Bar' ) -*) +* 'headers' member: +*array( +* 'url' = 'http://server.com/foo', +* 'headers' = array( 'X-Foo: Bar' ) +*) * @param $options array curl options used for each request, default * {CurlMultiClient::getDefaultOptions}. * @returns array An array of arrays containing 'error' and 'data' @@ -35,45 +37,44 @@ * errors, the error member will be null and data will contain the * response data as a string. */ - public static function request($requests, $options=){ - - - if( !count( $requests ) ) return false; + public static function request( $requests, array $options = null ) { + if ( !count( $requests ) ) { + return array(); + } $handles = array(); - if( !$options ) // add default options + if ( $options === null ) { // add default options $options = CurlMultiClient::getDefaultOptions(); + } // add curl options to each handle - foreach( $requests as $k = $row ){ + foreach ( $requests as $k = $row ) { $handle = curl_init(); - $options[CURLOPT_URL] = $row['url']; - wfDebug(adding url: . $row['url']); - if ( array_key_exists( 'headers', $row ) ) { - $options[CURLOPT_HTTPHEADER] = $row['headers']; - } else if ( array_key_exists( CURLOPT_HTTPHEADER, $options ) ) { - unset( $options[CURLOPT_HTTPHEADER] ); + $reqOptions = array( CURLOPT_URL = $row['url'] ) + $options; + wfDebug( adding url: . $row['url'] ); + if ( isset( $row['headers'] ) ) { + $reqOptions[CURLOPT_HTTPHEADER] = $row['headers']; } - curl_setopt_array($handle, $options); + curl_setopt_array( $handle, $reqOptions ); $handles[$k] = $handle; } $mh = curl_multi_init(); - foreach( $handles as $handle ){ - curl_multi_add_handle($mh,$handle); + foreach ( $handles as $handle ) { + curl_multi_add_handle( $mh, $handle ); } $running_handles = null; //execute the handles do { - $status_cme = curl_multi_exec($mh, $running_handles); + $status_cme = curl_multi_exec( $mh, $running_handles ); } while ( $status_cme == CURLM_CALL_MULTI_PERFORM ); while ( $running_handles $status_cme == CURLM_OK ) { - if ( curl_multi_select($mh) != -1 ) { + if ( curl_multi_select( $mh ) != -1 ) {
[MediaWiki-commits] [Gerrit] Add cp1037-1040 as Varnish text - change (operations/mediawiki-config)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/66077 Change subject: Add cp1037-1040 as Varnish text .. Add cp1037-1040 as Varnish text Change-Id: I5b8985048f2520af6e1da8a5700fe54f11641055 --- M wmf-config/squid.php 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/77/66077/1 diff --git a/wmf-config/squid.php b/wmf-config/squid.php index af45b13..84f1422 100644 --- a/wmf-config/squid.php +++ b/wmf-config/squid.php @@ -52,6 +52,11 @@ '10.64.0.141', # cp1019 '10.64.0.142', # cp1020 + '10.64.0.159', # cp1037, Varnish + '10.64.0.160', # cp1038, Varnish + '10.64.0.161', # cp1039, Varnish + '10.64.0.162', # cp1040, Varnish + # esams '91.198.174.33',# knsq23 '91.198.174.34',# knsq24 -- To view, visit https://gerrit.wikimedia.org/r/66077 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5b8985048f2520af6e1da8a5700fe54f11641055 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add cp1037-1040 as Varnish text - change (operations/mediawiki-config)
Mark Bergsma has submitted this change and it was merged. Change subject: Add cp1037-1040 as Varnish text .. Add cp1037-1040 as Varnish text Change-Id: I5b8985048f2520af6e1da8a5700fe54f11641055 --- M wmf-config/squid.php 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/squid.php b/wmf-config/squid.php index af45b13..84f1422 100644 --- a/wmf-config/squid.php +++ b/wmf-config/squid.php @@ -52,6 +52,11 @@ '10.64.0.141', # cp1019 '10.64.0.142', # cp1020 + '10.64.0.159', # cp1037, Varnish + '10.64.0.160', # cp1038, Varnish + '10.64.0.161', # cp1039, Varnish + '10.64.0.162', # cp1040, Varnish + # esams '91.198.174.33',# knsq23 '91.198.174.34',# knsq24 -- To view, visit https://gerrit.wikimedia.org/r/66077 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5b8985048f2520af6e1da8a5700fe54f11641055 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] changed arrows to characters supported by IE7 - change (mediawiki...WikiLexicalData)
Kipcool has submitted this change and it was merged. Change subject: changed arrows to characters supported by IE7 .. changed arrows to characters supported by IE7 Change-Id: Ic3c3cb8de74ae6495c37e72b24f60d4e1661ba03 --- M OmegaWiki/Editor.php 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Kipcool: Verified; Looks good to me, approved diff --git a/OmegaWiki/Editor.php b/OmegaWiki/Editor.php index a469d48..c822812 100644 --- a/OmegaWiki/Editor.php +++ b/OmegaWiki/Editor.php @@ -310,7 +310,7 @@ // if it is collapsible, continue global $wgLang; - $arrow = ( $wgLang-getDir() == 'ltr' ) ? ▶ : ◀ ; + $arrow = ( $wgLang-getDir() == 'ltr' ) ? ► : ◄ ; $prefix = Html::element('span', array( 'class' = prefix collapse-$class ) , $arrow ) ; @@ -2183,11 +2183,11 @@ $popupShow = Html::element('span', array( 'class' = popupshow - ) , wfMessage( 'showtoc' )-text() . ▿ ) ; + ) , wfMessage( 'showtoc' )-plain() . ▼ ) ; $popupHide = Html::element('span', array( 'class' = popuphide, 'style' = display:none; - ) , wfMessage( 'hidetoc' )-text() . ▵ ) ; + ) , wfMessage( 'hidetoc' )-plain() . ▲ ) ; $result .= $popupShow . $popupHide ; $result .= Html::closeElement('a'); -- To view, visit https://gerrit.wikimedia.org/r/66075 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic3c3cb8de74ae6495c37e72b24f60d4e1661ba03 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/WikiLexicalData Gerrit-Branch: master Gerrit-Owner: Kipcool kipmas...@gmail.com Gerrit-Reviewer: Kipcool kipmas...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixed IE problem not displaying images and also: - moved the... - change (mediawiki...WikiLexicalData)
Kipcool has submitted this change and it was merged. Change subject: Fixed IE problem not displaying images and also: - moved the resources directory to the extension root - moved the image resources into resources/images .. Fixed IE problem not displaying images and also: - moved the resources directory to the extension root - moved the image resources into resources/images Change-Id: Iaec54471564f31627fa444bbf96b5b24f59080b5 --- M App.php R resources/images/ArrowButtonDown1px.png R resources/images/Delete.png R resources/images/all_lang.png R resources/images/my_lang.png R resources/omegawiki-ajax.js R resources/omegawiki-edit.js R resources/suggest.css R resources/suggest.js R resources/tables.css R resources/wforms.js 11 files changed, 11 insertions(+), 24 deletions(-) Approvals: Kipcool: Verified; Looks good to me, approved diff --git a/App.php b/App.php index b8aaf4c..018b151 100644 --- a/App.php +++ b/App.php @@ -45,28 +45,27 @@ // Resource modules $resourcePathArray = array( - 'localBasePath' = dirname( __FILE__ ), - 'remoteExtPath' = 'Wikidata' + 'localBasePath' = dirname( __FILE__ ) . '/resources', + 'remoteExtPath' = 'WikiLexicalData/resources' ); // separated css with position top to avoid // so-called Flash of unstyled content $wgResourceModules['ext.Wikidata.css'] = $resourcePathArray + array( - 'styles' = array( 'OmegaWiki/resources/suggest.css', 'OmegaWiki/resources/tables.css' ), + 'styles' = array( 'suggest.css', 'tables.css' ), 'position' = 'top' ); $wgResourceModules['ext.Wikidata.ajax'] = $resourcePathArray + array( - 'scripts' = 'OmegaWiki/resources/omegawiki-ajax.js', - 'dependencies' = array( 'jquery.tablesorter' ) + 'scripts' = 'omegawiki-ajax.js' ); $wgResourceModules['ext.Wikidata.edit'] = $resourcePathArray + array( - 'scripts' = 'OmegaWiki/resources/omegawiki-edit.js' + 'scripts' = 'omegawiki-edit.js' ); $wgResourceModules['ext.Wikidata.suggest'] = $resourcePathArray + array( - 'scripts' = 'OmegaWiki/resources/suggest.js', + 'scripts' = 'suggest.js', 'messages' = array( 'ow_suggest_clear', 'ow_suggest_previous', 'ow_suggest_next' ) ); diff --git a/Images/ArrowButtonDown1px.png b/resources/images/ArrowButtonDown1px.png similarity index 100% rename from Images/ArrowButtonDown1px.png rename to resources/images/ArrowButtonDown1px.png Binary files differ diff --git a/Images/Delete.png b/resources/images/Delete.png similarity index 100% rename from Images/Delete.png rename to resources/images/Delete.png Binary files differ diff --git a/Images/all_lang.png b/resources/images/all_lang.png similarity index 100% rename from Images/all_lang.png rename to resources/images/all_lang.png Binary files differ diff --git a/Images/my_lang.png b/resources/images/my_lang.png similarity index 100% rename from Images/my_lang.png rename to resources/images/my_lang.png Binary files differ diff --git a/OmegaWiki/resources/omegawiki-ajax.js b/resources/omegawiki-ajax.js similarity index 100% rename from OmegaWiki/resources/omegawiki-ajax.js rename to resources/omegawiki-ajax.js diff --git a/OmegaWiki/resources/omegawiki-edit.js b/resources/omegawiki-edit.js similarity index 99% rename from OmegaWiki/resources/omegawiki-edit.js rename to resources/omegawiki-edit.js index d76d5d7..f4eee89 100644 --- a/OmegaWiki/resources/omegawiki-edit.js +++ b/resources/omegawiki-edit.js @@ -1,5 +1,5 @@ jQuery(document).ready(function( $ ) { - + // automatically fills in the label when a url is pasted. $(td.url).bind('paste', function() { var tdurl = this ; diff --git a/OmegaWiki/resources/suggest.css b/resources/suggest.css similarity index 84% rename from OmegaWiki/resources/suggest.css rename to resources/suggest.css index c5414e1..ce4eb8a 100644 --- a/OmegaWiki/resources/suggest.css +++ b/resources/suggest.css @@ -8,7 +8,7 @@ border-style: solid; border-color: #7F9DB9; /* @embed */ - background-image: url(../../Images/ArrowButtonDown1px.png); + background: url(images/ArrowButtonDown1px.png); background-repeat: no-repeat; background-position: center right; } @@ -22,18 +22,6 @@ top: 1px; bottom: 0px; background-color: #FF; -} - -/* Internet Explorer hack */ -* html .suggest-link { - /* @embed */ - background-image: url(../../Images/ArrowButtonDown2px.png); -} - -/* Internet Explorer hack */ -* html .wiki-data-table td .suggest-link { - /* @embed */ - background-image: url(../../Images/ArrowButtonDown1px.png); } .suggest-link, diff --git a/OmegaWiki/resources/suggest.js b/resources/suggest.js similarity index 100% rename from OmegaWiki/resources/suggest.js rename to resources/suggest.js diff --git a/OmegaWiki/resources/tables.css b/resources/tables.css similarity index 96%
[MediaWiki-commits] [Gerrit] Fix demo to convert annotation indexes to actual annotations - change (mediawiki...VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/66078 Change subject: Fix demo to convert annotation indexes to actual annotations .. Fix demo to convert annotation indexes to actual annotations Change-Id: Ib9d4ab87baca2db7e9e8f2b9fc974c3198d9fe28 --- M demos/ve/index.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/78/66078/1 diff --git a/demos/ve/index.php b/demos/ve/index.php index 7630192..0ef4d9b 100644 --- a/demos/ve/index.php +++ b/demos/ve/index.php @@ -425,7 +425,7 @@ if ( annotations ) { $label.append( $( 'span' ).text( - '[' + annotations.get().map( function( ann ) { + '[' + ve.instances[0].model.documentModel.store.values( annotations ).map( function( ann ) { return ann.name; } ).join( ', ' ) + ']' ) -- To view, visit https://gerrit.wikimedia.org/r/66078 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib9d4ab87baca2db7e9e8f2b9fc974c3198d9fe28 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders esand...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix the cluster_tier conditionals - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/66079 Change subject: Fix the cluster_tier conditionals .. Fix the cluster_tier conditionals Change-Id: I5d426395f608ffd1031d51748ab9d5d5af09378e --- M templates/varnish/text-backend.inc.vcl.erb 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/79/66079/1 diff --git a/templates/varnish/text-backend.inc.vcl.erb b/templates/varnish/text-backend.inc.vcl.erb index d735a6b..39e9bae 100644 --- a/templates/varnish/text-backend.inc.vcl.erb +++ b/templates/varnish/text-backend.inc.vcl.erb @@ -5,7 +5,7 @@ sub vcl_recv { call vcl_recv_purge; call restrict_access; -% if cluster_tier == 1 -% +% if vcl_config.fetch(cluster_tier, 1) == 1 -% if ( req.http.host ~ ^test\. ) { set req.backend = test_wikipedia; @@ -20,9 +20,11 @@ } sub vcl_miss { +% if vcl_config.fetch(cluster_tier, 1) == 1 -% /* Restore the original Cookie header for MediaWiki */ set req.http.Cookie = req.http.Orig-Cookie; unset req.http.Orig-Cookie; +% end -% } sub vcl_error { -- To view, visit https://gerrit.wikimedia.org/r/66079 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5d426395f608ffd1031d51748ab9d5d5af09378e Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix the cluster_tier conditionals - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Fix the cluster_tier conditionals .. Fix the cluster_tier conditionals Change-Id: I5d426395f608ffd1031d51748ab9d5d5af09378e --- M templates/varnish/text-backend.inc.vcl.erb 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified diff --git a/templates/varnish/text-backend.inc.vcl.erb b/templates/varnish/text-backend.inc.vcl.erb index d735a6b..39e9bae 100644 --- a/templates/varnish/text-backend.inc.vcl.erb +++ b/templates/varnish/text-backend.inc.vcl.erb @@ -5,7 +5,7 @@ sub vcl_recv { call vcl_recv_purge; call restrict_access; -% if cluster_tier == 1 -% +% if vcl_config.fetch(cluster_tier, 1) == 1 -% if ( req.http.host ~ ^test\. ) { set req.backend = test_wikipedia; @@ -20,9 +20,11 @@ } sub vcl_miss { +% if vcl_config.fetch(cluster_tier, 1) == 1 -% /* Restore the original Cookie header for MediaWiki */ set req.http.Cookie = req.http.Orig-Cookie; unset req.http.Orig-Cookie; +% end -% } sub vcl_error { -- To view, visit https://gerrit.wikimedia.org/r/66079 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5d426395f608ffd1031d51748ab9d5d5af09378e Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Point esams Varnish at eqiad Varnish instead of Squid - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/66080 Change subject: Point esams Varnish at eqiad Varnish instead of Squid .. Point esams Varnish at eqiad Varnish instead of Squid Change-Id: I2c856d7c874622591c553a2214ad978758273fc1 --- M manifests/role/cache.pp 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/80/66080/1 diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index d815ad2..2ff4c47 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -397,7 +397,8 @@ }, esams = { backend = $lvs::configuration::lvs_service_ips[$::realm]['text'][$::mw_primary]['wikipedialb'], - eqiad = $role::cache::configuration::active_nodes[$::realm]['text']['eqiad'], + # TODO: replace after removing Squid + eqiad = $role::cache::configuration::active_nodes[$::realm]['text']['eqiad-varnish'], }, } -- To view, visit https://gerrit.wikimedia.org/r/66080 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2c856d7c874622591c553a2214ad978758273fc1 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Point esams Varnish at eqiad Varnish instead of Squid - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Point esams Varnish at eqiad Varnish instead of Squid .. Point esams Varnish at eqiad Varnish instead of Squid Change-Id: I2c856d7c874622591c553a2214ad978758273fc1 --- M manifests/role/cache.pp 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index d815ad2..2ff4c47 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -397,7 +397,8 @@ }, esams = { backend = $lvs::configuration::lvs_service_ips[$::realm]['text'][$::mw_primary]['wikipedialb'], - eqiad = $role::cache::configuration::active_nodes[$::realm]['text']['eqiad'], + # TODO: replace after removing Squid + eqiad = $role::cache::configuration::active_nodes[$::realm]['text']['eqiad-varnish'], }, } -- To view, visit https://gerrit.wikimedia.org/r/66080 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2c856d7c874622591c553a2214ad978758273fc1 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] JS and PHP code style fixes - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: JS and PHP code style fixes .. JS and PHP code style fixes if( - if ( for(- for ( else if - elseif Lines greater than 120 chars chomped. Change-Id: I909d4fe9785a656481878256830ae5965e48a416 --- M ApiVisualEditor.php M demos/ve/index.php M modules/unicodejs/unicodejs.wordbreak.js 3 files changed, 15 insertions(+), 11 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/ApiVisualEditor.php b/ApiVisualEditor.php index c7c2da7..0613535 100644 --- a/ApiVisualEditor.php +++ b/ApiVisualEditor.php @@ -42,12 +42,12 @@ if ( $status-isOK() ) { $content = $req-getContent(); - } else if ( $status-isGood() ) { + } elseif ( $status-isGood() ) { $this-dieUsage( $req-getContent(), 'parsoidserver-http-'.$req-getStatus() ); - } else if ( $errors = $status-getErrorsByType( 'error' ) ) { + } elseif ( $errors = $status-getErrorsByType( 'error' ) ) { $error = $errors[0]; $code = $error['message']; - if( count( $error['params'] ) ) { + if ( count( $error['params'] ) ) { $message = $error['params'][0]; } else { $message = 'MWHttpRequest error'; @@ -284,7 +284,7 @@ if ( $wikitext === false ) { $this-dieUsage( 'Error contacting the Parsoid server', 'parsoidserver' ); - } else if ( $params['paction'] === 'save' ) { + } elseif ( $params['paction'] === 'save' ) { // Save page $editResult = $this-saveWikitext( $page, $wikitext, $params ); if ( @@ -311,7 +311,7 @@ $result['newrevid'] = intval( $editResult['edit']['newrevid'] ); } } - } else if ( $params['paction'] === 'diff' ) { + } elseif ( $params['paction'] === 'diff' ) { $diff = $this-diffWikitext( $page, $wikitext ); if ( $diff['result'] === 'fail' ) { $this-dieUsage( 'Diff failed', 'difffailed' ); @@ -371,12 +371,15 @@ return array( 'page' = 'The page to perform actions on.', 'paction' = 'Action to perform', - 'oldid' = 'The revision number to use. If zero, the empty string is passed to Parsoid to indicate new page creation.', + 'oldid' = 'The revision number to use. If zero, the empty string is passed to Parsoid' + .' to indicate new page creation.', 'minor' = 'Flag for minor edit.', 'html' = 'HTML to send to parsoid in exchange for wikitext', 'summary' = 'Edit summary', - 'basetimestamp' = 'When saving, set this to the timestamp of the revision that was edited. Used to detect edit conflicts.', - 'starttimestamp' = 'When saving, set this to the timestamp of when the page was loaded. Used to detect edit conflicts.', + 'basetimestamp' = 'When saving, set this to the timestamp of the revision that was' + .' edited. Used to detect edit conflicts.', + 'starttimestamp' = 'When saving, set this to the timestamp of when the page was loaded.' + .' Used to detect edit conflicts.', 'token' = 'Edit token', ); } diff --git a/demos/ve/index.php b/demos/ve/index.php index 7630192..fce8f83 100644 --- a/demos/ve/index.php +++ b/demos/ve/index.php @@ -71,7 +71,8 @@ ?php echo basename( $page, '.html' ); ? /a /li - ?php endforeach; ? + ?php + endforeach; ? /ul div class=ve-demo-editor/div @@ -441,7 +442,7 @@ var getKids = function ( obj ) { var $ol = $( 'ol start=0/ol' ),
[MediaWiki-commits] [Gerrit] Now we've got PHPCS switched on, killing long lines - change (mediawiki...VisualEditor)
Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/66081 Change subject: Now we've got PHPCS switched on, killing long lines .. Now we've got PHPCS switched on, killing long lines Lest PHPCS throws wobblies over unrelated changes in PHP files with underlying issues in their code style. Change-Id: Ifc4aec328d726e9ca62db34af55ea9592c08d9f3 --- M VisualEditor.hooks.php M VisualEditorMessagesModule.php 2 files changed, 12 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/81/66081/1 diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php index 982dada..f78ee4e 100644 --- a/VisualEditor.hooks.php +++ b/VisualEditor.hooks.php @@ -65,7 +65,10 @@ 'isPageWatched' = $out-getUser()-isWatched( $out-getTitle() ), 'pageLanguageCode' = $out-getTitle()-getPageLanguage()-getHtmlCode(), 'pageLanguageDir' = $out-getTitle()-getPageLanguage()-getDir(), - 'magnifyClipIconURL' = $wgStylePath . '/common/images/magnify-clip' . ( $wgContLang-isRTL() ? '-rtl' : '' ) . '.png' // Same as in Linker.php + // Same as in Linker.php + 'magnifyClipIconURL' = $wgStylePath . + '/common/images/magnify-clip' . + ( $wgContLang-isRTL() ? '-rtl' : '' ) . '.png' ); return true; diff --git a/VisualEditorMessagesModule.php b/VisualEditorMessagesModule.php index 6821be6..c82ce00 100644 --- a/VisualEditorMessagesModule.php +++ b/VisualEditorMessagesModule.php @@ -74,7 +74,11 @@ // Normalise to 'copyrightwarning' so we have a consistent key in the front-end. $msgArgs[ 'copyrightwarning' ] = $copywarnMsg; - $msgKeys = array_values( array_unique( array_merge( $msgKeys, array_keys( $msgArgs ), array_keys( $msgVals ) ) ) ); + $msgKeys = array_values( array_unique( array_merge( + $msgKeys, + array_keys( $msgArgs ), + array_keys( $msgVals ) + ) ) ); return array( 'keys' = $msgKeys, @@ -100,8 +104,9 @@ return max( $this-getMsgBlobMtime( $context-getLanguage() ), // Also invalidate this module if this file changes (i.e. when messages were - // added or removed, or when the javascript invocation in getScript is changes). - file_exists( __FILE__ ) ? filemtime( __FILE__ ) : 1 // use 1 because 0 = now, would invalidate continously + // added or removed, or when the JavaScript invocation in getScript is changes). + // Use 1 because 0 = now, would invalidate continously + file_exists( __FILE__ ) ? filemtime( __FILE__ ) : 1 ); } } -- To view, visit https://gerrit.wikimedia.org/r/66081 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifc4aec328d726e9ca62db34af55ea9592c08d9f3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Jforrester jforres...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use individual eqiad backends instead of the LVS (Squid) ser... - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/66082 Change subject: Use individual eqiad backends instead of the LVS (Squid) service IP .. Use individual eqiad backends instead of the LVS (Squid) service IP Change-Id: I3ad27217a6fe67ed0511c3e491e6b7eb33d52da8 --- M templates/varnish/text-backend.inc.vcl.erb 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/82/66082/1 diff --git a/templates/varnish/text-backend.inc.vcl.erb b/templates/varnish/text-backend.inc.vcl.erb index 39e9bae..faa63a0 100644 --- a/templates/varnish/text-backend.inc.vcl.erb +++ b/templates/varnish/text-backend.inc.vcl.erb @@ -5,8 +5,8 @@ sub vcl_recv { call vcl_recv_purge; call restrict_access; -% if vcl_config.fetch(cluster_tier, 1) == 1 -% +% if vcl_config.fetch(cluster_tier, 1) == 1 -% if ( req.http.host ~ ^test\. ) { set req.backend = test_wikipedia; return (pass); @@ -14,6 +14,8 @@ if (req.url ~ ^/w/api.php) { set req.backend = api; } +% else -% + set req.backend = eqiad; % end -% return(lookup); -- To view, visit https://gerrit.wikimedia.org/r/66082 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3ad27217a6fe67ed0511c3e491e6b7eb33d52da8 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use individual eqiad backends instead of the LVS (Squid) ser... - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Use individual eqiad backends instead of the LVS (Squid) service IP .. Use individual eqiad backends instead of the LVS (Squid) service IP Change-Id: I3ad27217a6fe67ed0511c3e491e6b7eb33d52da8 --- M templates/varnish/text-backend.inc.vcl.erb 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified diff --git a/templates/varnish/text-backend.inc.vcl.erb b/templates/varnish/text-backend.inc.vcl.erb index 39e9bae..faa63a0 100644 --- a/templates/varnish/text-backend.inc.vcl.erb +++ b/templates/varnish/text-backend.inc.vcl.erb @@ -5,8 +5,8 @@ sub vcl_recv { call vcl_recv_purge; call restrict_access; -% if vcl_config.fetch(cluster_tier, 1) == 1 -% +% if vcl_config.fetch(cluster_tier, 1) == 1 -% if ( req.http.host ~ ^test\. ) { set req.backend = test_wikipedia; return (pass); @@ -14,6 +14,8 @@ if (req.url ~ ^/w/api.php) { set req.backend = api; } +% else -% + set req.backend = eqiad; % end -% return(lookup); -- To view, visit https://gerrit.wikimedia.org/r/66082 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3ad27217a6fe67ed0511c3e491e6b7eb33d52da8 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix incorrect variable name - change (mediawiki...AWS)
Thaiphan has uploaded a new change for review. https://gerrit.wikimedia.org/r/66083 Change subject: Fix incorrect variable name .. Fix incorrect variable name Change-Id: Ie9cac8dd59ad2fb0a1abd5d97f859f266f06272c --- M s3/AmazonS3FileBackend.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AWS refs/changes/83/66083/1 diff --git a/s3/AmazonS3FileBackend.php b/s3/AmazonS3FileBackend.php index ac93781..851c8cc 100644 --- a/s3/AmazonS3FileBackend.php +++ b/s3/AmazonS3FileBackend.php @@ -86,7 +86,7 @@ $this-memCache = wfGetMainCache(); $this-client = S3Client::factory( array( 'key' = isset( $config['awsKey'] ) ? $config['awsKey'] : $wgAWSCredentials['key'], - 'secret' = isset( $config['awsKey'] ) ? $config['awsKey'] : $wgAWSCredentials['secret'], + 'secret' = isset( $config['awsSecret'] ) ? $config['awsSecret'] : $wgAWSCredentials['secret'], 'region' = isset( $config['awsRegion'] ) ? $config['awsRegion'] : $wgAWSRegion, 'scheme' = $this-useHTTPS ? 'https' : 'http', 'ssl.certificate_authority' = $this-useHTTPS ?: null -- To view, visit https://gerrit.wikimedia.org/r/66083 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie9cac8dd59ad2fb0a1abd5d97f859f266f06272c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AWS Gerrit-Branch: master Gerrit-Owner: Thaiphan t...@outlook.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Avoid setting inline style for the element when reset applied - change (mediawiki...UniversalLanguageSelector)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/66084 Change subject: Avoid setting inline style for the element when reset applied .. Avoid setting inline style for the element when reset applied Followup: Ic3baa18b01a972f08e51e84217e82d0939e674c0 and Iff522e0016d8284dc785580e6eb3dd2967c58289 Bug: 39992 Change-Id: Ifd8c4629f5512f6d54fc0a19d3b8d2bec4db23c0 --- M lib/jquery.webfonts.js 1 file changed, 6 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/84/66084/1 diff --git a/lib/jquery.webfonts.js b/lib/jquery.webfonts.js index 74dab69..58f3cdb 100644 --- a/lib/jquery.webfonts.js +++ b/lib/jquery.webfonts.js @@ -95,21 +95,17 @@ fontStack.unshift( fontFamily ); } + if ( !fontFamily || fontFamily === this.originalFontFamily ) { + // We are resetting the font to original font. + fontStack = []; + // This will cause removing inline fontFamily style. + } + // Set the font of this element if it's not excluded if ( !$element.is( this.options.exclude ) ) { $element.css( 'font-family', fontStack.join() ); } - if ( !fontFamily || fontFamily === this.originalFontFamily ) { - // We are resetting the font to original font. - // Do not explicitly set fontFamily for child nodes. Just remove - // the previous setting. - $element.find( 'textarea, input, button' ) - .not( this.options.exclude ) - .css( 'font-family', '' ); - - return; - } // Set the font of this element's children if they are not excluded. // font-family of input, textarea and button must be changed explicitly. $element.find( 'textarea, input, button' ) -- To view, visit https://gerrit.wikimedia.org/r/66084 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifd8c4629f5512f6d54fc0a19d3b8d2bec4db23c0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Disable Squiz.WhiteSpace.ObjectOperatorSpacing - change (mediawiki...codesniffer)
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/66085 Change subject: Disable Squiz.WhiteSpace.ObjectOperatorSpacing .. Disable Squiz.WhiteSpace.ObjectOperatorSpacing Change-Id: I1b963b6e17c487019affc92878125ffeb04a95b2 --- M MediaWiki/ruleset.xml 1 file changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/codesniffer refs/changes/85/66085/1 diff --git a/MediaWiki/ruleset.xml b/MediaWiki/ruleset.xml index ff21bdd..ad1f88d 100644 --- a/MediaWiki/ruleset.xml +++ b/MediaWiki/ruleset.xml @@ -74,7 +74,13 @@ rule ref=Squiz.WhiteSpace.LanguageConstructSpacing / rule ref=Squiz.WhiteSpace.LogicalOperatorSpacing / !-- rule ref=Squiz.WhiteSpace.MemberVarSpacing / -- - rule ref=Squiz.WhiteSpace.ObjectOperatorSpacing / + !-- + `$foo - bar()` is bad. But we do allow: + $foo + -bar() + -quux(); + rule ref=Squiz.WhiteSpace.ObjectOperatorSpacing / + -- rule ref=Squiz.WhiteSpace.OperatorSpacing / rule ref=Squiz.WhiteSpace.ScopeClosingBrace / rule ref=Squiz.WhiteSpace.ScopeKeywordSpacing / -- To view, visit https://gerrit.wikimedia.org/r/66085 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1b963b6e17c487019affc92878125ffeb04a95b2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/codesniffer Gerrit-Branch: master Gerrit-Owner: Krinkle krinklem...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add IPv6 address to amssq47 - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/66086 Change subject: Add IPv6 address to amssq47 .. Add IPv6 address to amssq47 Change-Id: I75154b7a270adb9694c0d23ea9b003e8cebfa28c --- M manifests/site.pp 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/86/66086/1 diff --git a/manifests/site.pp b/manifests/site.pp index 976da54..711a990 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -122,6 +122,8 @@ # amssq47 is a text varnish node /^amssq47\.esams\.wikimedia\.org$/ { include role::cache::text + + interface_add_ip6_mapped { main: } } # analytics1001.wikimedia.org is the analytics cluster master. -- To view, visit https://gerrit.wikimedia.org/r/66086 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I75154b7a270adb9694c0d23ea9b003e8cebfa28c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Disable Squiz.WhiteSpace.ObjectOperatorSpacing - change (mediawiki...codesniffer)
Krinkle has submitted this change and it was merged. Change subject: Disable Squiz.WhiteSpace.ObjectOperatorSpacing .. Disable Squiz.WhiteSpace.ObjectOperatorSpacing Change-Id: I1b963b6e17c487019affc92878125ffeb04a95b2 --- M MediaWiki/ruleset.xml 1 file changed, 7 insertions(+), 1 deletion(-) Approvals: Krinkle: Verified; Looks good to me, approved diff --git a/MediaWiki/ruleset.xml b/MediaWiki/ruleset.xml index ff21bdd..ad1f88d 100644 --- a/MediaWiki/ruleset.xml +++ b/MediaWiki/ruleset.xml @@ -74,7 +74,13 @@ rule ref=Squiz.WhiteSpace.LanguageConstructSpacing / rule ref=Squiz.WhiteSpace.LogicalOperatorSpacing / !-- rule ref=Squiz.WhiteSpace.MemberVarSpacing / -- - rule ref=Squiz.WhiteSpace.ObjectOperatorSpacing / + !-- + `$foo - bar()` is bad. But we do allow: + $foo + -bar() + -quux(); + rule ref=Squiz.WhiteSpace.ObjectOperatorSpacing / + -- rule ref=Squiz.WhiteSpace.OperatorSpacing / rule ref=Squiz.WhiteSpace.ScopeClosingBrace / rule ref=Squiz.WhiteSpace.ScopeKeywordSpacing / -- To view, visit https://gerrit.wikimedia.org/r/66085 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1b963b6e17c487019affc92878125ffeb04a95b2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/codesniffer Gerrit-Branch: master Gerrit-Owner: Krinkle krinklem...@gmail.com Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: Krinkle krinklem...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add IPv6 address to amssq47 - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Add IPv6 address to amssq47 .. Add IPv6 address to amssq47 Change-Id: I75154b7a270adb9694c0d23ea9b003e8cebfa28c --- M manifests/site.pp 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/site.pp b/manifests/site.pp index 976da54..711a990 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -122,6 +122,8 @@ # amssq47 is a text varnish node /^amssq47\.esams\.wikimedia\.org$/ { include role::cache::text + + interface_add_ip6_mapped { main: } } # analytics1001.wikimedia.org is the analytics cluster master. -- To view, visit https://gerrit.wikimedia.org/r/66086 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I75154b7a270adb9694c0d23ea9b003e8cebfa28c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update tools/mwcodesniffer submodule - change (integration/jenkins)
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/66087 Change subject: Update tools/mwcodesniffer submodule .. Update tools/mwcodesniffer submodule Change-Id: Iefa9da3ff552943928118b0f4fc4cdd09d254b4b --- M tools/mwcodesniffer 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins refs/changes/87/66087/1 diff --git a/tools/mwcodesniffer b/tools/mwcodesniffer index 106143c..e1de64e 16 --- a/tools/mwcodesniffer +++ b/tools/mwcodesniffer -Subproject commit 106143c3efd740344e1b60e8b2f04cc9ff039ea6 +Subproject commit e1de64e4a9c37eee7a3bef2c022dfe789588e82c -- To view, visit https://gerrit.wikimedia.org/r/66087 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iefa9da3ff552943928118b0f4fc4cdd09d254b4b Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins Gerrit-Branch: master Gerrit-Owner: Krinkle krinklem...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update tools/mwcodesniffer submodule - change (integration/jenkins)
Krinkle has submitted this change and it was merged. Change subject: Update tools/mwcodesniffer submodule .. Update tools/mwcodesniffer submodule Change-Id: Iefa9da3ff552943928118b0f4fc4cdd09d254b4b --- M tools/mwcodesniffer 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Krinkle: Verified; Looks good to me, approved diff --git a/tools/mwcodesniffer b/tools/mwcodesniffer index 106143c..e1de64e 16 --- a/tools/mwcodesniffer +++ b/tools/mwcodesniffer -Subproject commit 106143c3efd740344e1b60e8b2f04cc9ff039ea6 +Subproject commit e1de64e4a9c37eee7a3bef2c022dfe789588e82c -- To view, visit https://gerrit.wikimedia.org/r/66087 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iefa9da3ff552943928118b0f4fc4cdd09d254b4b Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins Gerrit-Branch: master Gerrit-Owner: Krinkle krinklem...@gmail.com Gerrit-Reviewer: Krinkle krinklem...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable voting for mwext-VisualEditor-phpcs-HEAD - change (integration/zuul-config)
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/66088 Change subject: Enable voting for mwext-VisualEditor-phpcs-HEAD .. Enable voting for mwext-VisualEditor-phpcs-HEAD Change-Id: Ica1137438a1b9137f01276b4dfe49a82227de518 --- M layout.yaml 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/zuul-config refs/changes/88/66088/1 diff --git a/layout.yaml b/layout.yaml index 47aef0b..a0b61a5 100644 --- a/layout.yaml +++ b/layout.yaml @@ -369,6 +369,8 @@ - name: mwext-TemplateData-phpcs-HEAD voting: true + - name: mwext-VisualEditor-phpcs-HEAD +voting: true - name: mediawiki-core-qunit # Doesn't work in MediaWiki REL1_19 -- To view, visit https://gerrit.wikimedia.org/r/66088 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ica1137438a1b9137f01276b4dfe49a82227de518 Gerrit-PatchSet: 1 Gerrit-Project: integration/zuul-config Gerrit-Branch: master Gerrit-Owner: Krinkle krinklem...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [coordinate.js] Implemented list rotator to set precision - change (mediawiki...DataValues)
Henning Snater has uploaded a new change for review. https://gerrit.wikimedia.org/r/66089 Change subject: [coordinate.js] Implemented list rotator to set precision .. [coordinate.js] Implemented list rotator to set precision A list rotator widget instance may be used to adjust the automatically detected coordinate precision. Change-Id: I00af947ac30a26cdac76fbe7f6eb23d6e3164f05 --- M ValueView/ValueView.i18n.php M ValueView/ValueView.resources.php A ValueView/resources/jquery.valueview/valueview.experts/experts.CoordinateInput.css M ValueView/resources/jquery.valueview/valueview.experts/experts.CoordinateInput.js 4 files changed, 136 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues refs/changes/89/66089/1 diff --git a/ValueView/ValueView.i18n.php b/ValueView/ValueView.i18n.php index e1962c9..b4a93b3 100644 --- a/ValueView/ValueView.i18n.php +++ b/ValueView/ValueView.i18n.php @@ -45,6 +45,9 @@ // EmptyValue expert: 'valueview-expert-emptyvalue-empty' = 'empty', + // CoordinateInput expert: + 'valueview-expert-coordinateinput-precision' = 'Precision:', + // TimeInput expert: 'valueview-expert-timeinput-precision' = 'Precision:', 'valueview-expert-timeinput-calendar' = 'Calendar:', @@ -76,6 +79,7 @@ * $1 - the name of the data type which lacks support', 'valueview-expert-emptyvalue-empty' = 'Message expressing that there is currently no value set in a jQuery valueview. {{Identical|Empty}}', + 'valueview-expert-coordinateinput-precision' = 'Label for the user interface element used to set a specific precision (e.g. 1, 0.1, 0.001) when entering a coordinate value.', 'valueview-expert-timeinput-precision' = 'Label for the user interface element used to set a specific precision (e.g. hour, day, month, year) when entering a time value.', 'valueview-expert-timeinput-calendar' = 'Label for the user interface element used to select a specific calendar (e.g. Gregorian, Julian) entering a time value. diff --git a/ValueView/ValueView.resources.php b/ValueView/ValueView.resources.php index e55a3b5..c1e4f85 100644 --- a/ValueView/ValueView.resources.php +++ b/ValueView/ValueView.resources.php @@ -210,6 +210,7 @@ 'jquery.valueview.preview', ), 'messages' = array( + 'valueview-expert-coordinateinput-precision', 'valueview-preview-label', 'valueview-preview-novalue', ), @@ -219,6 +220,9 @@ 'scripts' = array( 'jquery.valueview/valueview.experts/experts.CoordinateValue.js', ), + 'styles' = array( + 'jquery.valueview/valueview.experts/experts.CoordinateInput.css', + ), 'dependencies' = array( 'jquery.valueview.experts.staticdom', 'jquery.valueview.BifidExpert', diff --git a/ValueView/resources/jquery.valueview/valueview.experts/experts.CoordinateInput.css b/ValueView/resources/jquery.valueview/valueview.experts/experts.CoordinateInput.css new file mode 100644 index 000..cc34775 --- /dev/null +++ b/ValueView/resources/jquery.valueview/valueview.experts/experts.CoordinateInput.css @@ -0,0 +1,23 @@ +/** + * Styles for valueview's CoordinateInput expert. + * + * @since 0.1 + * @file + * @ingroup ValueView + * + * @license GNU GPL v2+ + * @author H. Snater mediaw...@snater.com + */ + +.valueview-expert-coordinateinput-input { + width: 100%; +} + +.ui-inputextender-extension .valueview-expert-coordinateinput-advancedtoggler { + border: none; + background: none; + margin-top: 0.5em; + padding-top: 0.5em; + border-top: 1px dashed #CCC; + width: 100%; +} diff --git a/ValueView/resources/jquery.valueview/valueview.experts/experts.CoordinateInput.js b/ValueView/resources/jquery.valueview/valueview.experts/experts.CoordinateInput.js index 4fa6ff2..9664bf8 100644 --- a/ValueView/resources/jquery.valueview/valueview.experts/experts.CoordinateInput.js +++ b/ValueView/resources/jquery.valueview/valueview.experts/experts.CoordinateInput.js @@ -5,8 +5,12 @@ * * @author H. Snater mediaw...@snater.com */ -( function( dv, vp, $, vv, Coordinate ) { +// TODO: Remove mediaWiki dependency +( function( dv, vp, $, vv, coordinate, mw ) { 'use strict'; + + var Coordinate = coordinate.Coordinate, + coordinateSettings = coordinate.settings; var PARENT = vv.Expert; @@ -41,10 +45,63 @@ preview: null, /** +* Container node for precision input
[MediaWiki-commits] [Gerrit] Fix demo to convert annotation indexes to actual annotations - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Fix demo to convert annotation indexes to actual annotations .. Fix demo to convert annotation indexes to actual annotations Change-Id: Ib9d4ab87baca2db7e9e8f2b9fc974c3198d9fe28 --- M demos/ve/index.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/demos/ve/index.php b/demos/ve/index.php index 7630192..0ef4d9b 100644 --- a/demos/ve/index.php +++ b/demos/ve/index.php @@ -425,7 +425,7 @@ if ( annotations ) { $label.append( $( 'span' ).text( - '[' + annotations.get().map( function( ann ) { + '[' + ve.instances[0].model.documentModel.store.values( annotations ).map( function( ann ) { return ann.name; } ).join( ', ' ) + ']' ) -- To view, visit https://gerrit.wikimedia.org/r/66078 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib9d4ab87baca2db7e9e8f2b9fc974c3198d9fe28 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders esand...@wikimedia.org Gerrit-Reviewer: Catrope roan.katt...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add icon option to ve.ui.TextInputWidget - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Add icon option to ve.ui.TextInputWidget .. Add icon option to ve.ui.TextInputWidget Changes: ve.ui.Widget.css * Add styles for decorated text input widgets and their icon elements ve.ui.TextInputWidget.js * Add icon option which adds an icon before input text Change-Id: Ib48d795391cb5d110e7dc05658d51129792dfc33 --- M modules/ve/ui/styles/ve.ui.Widget.css M modules/ve/ui/widgets/ve.ui.TextInputWidget.js 2 files changed, 27 insertions(+), 0 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve/ui/styles/ve.ui.Widget.css b/modules/ve/ui/styles/ve.ui.Widget.css index ccdbc64..f2e449a 100644 --- a/modules/ve/ui/styles/ve.ui.Widget.css +++ b/modules/ve/ui/styles/ve.ui.Widget.css @@ -268,6 +268,21 @@ text-shadow: 0 1px 1px #fff; } +.ve-ui-textInputWidget-decorated input, +.ve-ui-textInputWidget-decorated textarea { + padding-left: 2em; +} + +.ve-ui-textInputWidget-icon { + position: absolute; + top: 0; + left: 0; + width: 2em; + height: 100%; + background-position: right center; + background-repeat: no-repeat; +} + /* ve.ui.MenuWidget */ .ve-ui-menuWidget { diff --git a/modules/ve/ui/widgets/ve.ui.TextInputWidget.js b/modules/ve/ui/widgets/ve.ui.TextInputWidget.js index df1d599..eb99821 100644 --- a/modules/ve/ui/widgets/ve.ui.TextInputWidget.js +++ b/modules/ve/ui/widgets/ve.ui.TextInputWidget.js @@ -14,6 +14,7 @@ * @constructor * @param {Object} [config] Config options * @cfg {string} [placeholder] Placeholder text + * @cfg {string} [icon] Symbolic name of icon */ ve.ui.TextInputWidget = function VeUiTextInputWidget( config ) { // Parent constructor @@ -21,6 +22,17 @@ // Initialization this.$.addClass( 've-ui-textInputWidget' ); + if ( config.icon ) { + this.$.addClass( 've-ui-textInputWidget-decorated' ); + this.$.append( + $( 'span' ) + .addClass( 've-ui-textInputWidget-icon ve-ui-icon-' + config.icon ) + .mousedown( ve.bind( function () { + this.$input.focus(); + return false; + }, this ) ) + ); + } if ( config.placeholder ) { this.$input.attr( 'placeholder', config.placeholder ); } -- To view, visit https://gerrit.wikimedia.org/r/65963 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib48d795391cb5d110e7dc05658d51129792dfc33 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Trevor Parscal tpars...@wikimedia.org Gerrit-Reviewer: Catrope roan.katt...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable voting for mwext-VisualEditor-phpcs-HEAD - change (integration/zuul-config)
Krinkle has submitted this change and it was merged. Change subject: Enable voting for mwext-VisualEditor-phpcs-HEAD .. Enable voting for mwext-VisualEditor-phpcs-HEAD Change-Id: Ica1137438a1b9137f01276b4dfe49a82227de518 --- M layout.yaml 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/layout.yaml b/layout.yaml index 47aef0b..a0b61a5 100644 --- a/layout.yaml +++ b/layout.yaml @@ -369,6 +369,8 @@ - name: mwext-TemplateData-phpcs-HEAD voting: true + - name: mwext-VisualEditor-phpcs-HEAD +voting: true - name: mediawiki-core-qunit # Doesn't work in MediaWiki REL1_19 -- To view, visit https://gerrit.wikimedia.org/r/66088 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ica1137438a1b9137f01276b4dfe49a82227de518 Gerrit-PatchSet: 1 Gerrit-Project: integration/zuul-config Gerrit-Branch: master Gerrit-Owner: Krinkle krinklem...@gmail.com Gerrit-Reviewer: Krinkle krinklem...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (bug 48308) Change namespace settings for ukwikisource - change (operations/mediawiki-config)
Odder has uploaded a new change for review. https://gerrit.wikimedia.org/r/66090 Change subject: (bug 48308) Change namespace settings for ukwikisource .. (bug 48308) Change namespace settings for ukwikisource This patch follows up I0b05d2f and adds necessary English namespace aliases for the Ukrainian Wikisource for backward compatibility. It also adds the remaining settings for $wgProofreadPageNamespaceIds. Bug: 48308 Change-Id: I7cd012d4643f388c9ebc300f2e976a3977a03de1 --- M wmf-config/InitialiseSettings.php 1 file changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/90/66090/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index e055ad0..abcb1cc 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -3326,6 +3326,12 @@ '+ukwikisource' = array( 'ВД' = NS_PROJECT, 'Обговорення_Wikisource' = NS_PROJECT_TALK, // bug 48308 + 'Author' = 102, // bug 48308 + 'Author_talk' = 103, + 'Page' = 250, + 'Page_talk' = 251, + 'Index' = 252, + 'Index_talk' = 253, ), '+ukwikivoyage' = array( 'Portal' = 100, @@ -3789,6 +3795,10 @@ 'page' = 250, 'index' = 252, ), + 'ukwikisource' = array( // bug 48308 + 'page' = 250, + 'index' = 252, + ), 'vecwikisource' = array( 'page' = 102, 'index' = 104, -- To view, visit https://gerrit.wikimedia.org/r/66090 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7cd012d4643f388c9ebc300f2e976a3977a03de1 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Odder tom...@twkozlowski.net ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] ve.debug: Document why we use global Function#apply+Function... - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: ve.debug: Document why we use global Function#apply+Function#call instead of method.apply .. ve.debug: Document why we use global Function#apply+Function#call instead of method.apply Follows-up 2ad6577 Change-Id: I3e2cc39873bffd08b1404bd54dd392623092847d --- M modules/ve/ve.debug.js 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve/ve.debug.js b/modules/ve/ve.debug.js index 4e6145c..1ba2d73 100644 --- a/modules/ve/ve.debug.js +++ b/modules/ve/ve.debug.js @@ -27,6 +27,9 @@ * @param {Mixed...} [data] Data to log */ ve.log = function () { + // In IE9 console methods are not real functions and as such do not inherit + // from Function.prototype, thus console.log.apply does not exist. + // However it is function-like enough that passing it to Function#apply does work. Function.prototype.apply.call( console.log, console, arguments ); }; -- To view, visit https://gerrit.wikimedia.org/r/65954 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3e2cc39873bffd08b1404bd54dd392623092847d Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Krinkle krinklem...@gmail.com Gerrit-Reviewer: Catrope roan.katt...@gmail.com Gerrit-Reviewer: Trevor Parscal tpars...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Now we've got PHPCS switched on, kill long lines - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Now we've got PHPCS switched on, kill long lines .. Now we've got PHPCS switched on, kill long lines Lest PHPCS throws wobblies over unrelated changes in PHP files with underlying issues in their code style. Change-Id: Ifc4aec328d726e9ca62db34af55ea9592c08d9f3 --- M VisualEditor.hooks.php M VisualEditorMessagesModule.php 2 files changed, 20 insertions(+), 8 deletions(-) Approvals: Catrope: Looks good to me, approved Siebrand: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php index 982dada..e06491c 100644 --- a/VisualEditor.hooks.php +++ b/VisualEditor.hooks.php @@ -65,7 +65,10 @@ 'isPageWatched' = $out-getUser()-isWatched( $out-getTitle() ), 'pageLanguageCode' = $out-getTitle()-getPageLanguage()-getHtmlCode(), 'pageLanguageDir' = $out-getTitle()-getPageLanguage()-getDir(), - 'magnifyClipIconURL' = $wgStylePath . '/common/images/magnify-clip' . ( $wgContLang-isRTL() ? '-rtl' : '' ) . '.png' // Same as in Linker.php + // Same as in Linker.php + 'magnifyClipIconURL' = $wgStylePath . + '/common/images/magnify-clip' . + ( $wgContLang-isRTL() ? '-rtl' : '' ) . '.png' ); return true; @@ -88,7 +91,10 @@ return true; } - public static function onResourceLoaderTestModules( array $testModules, ResourceLoader $resourceLoader ) { + public static function onResourceLoaderTestModules( + array $testModules, + ResourceLoader $resourceLoader + ) { $testModules['qunit']['ext.visualEditor.test'] = array( 'scripts' = array( // QUnit plugin diff --git a/VisualEditorMessagesModule.php b/VisualEditorMessagesModule.php index 6821be6..13eb448 100644 --- a/VisualEditorMessagesModule.php +++ b/VisualEditorMessagesModule.php @@ -33,8 +33,7 @@ } return 've.init.platform.addParsedMessages(' . FormatJson::encode( $parsedMesssages ) . ');'. - 've.init.platform.addMessages(' . FormatJson::encode( $messages ) . ');' - ; + 've.init.platform.addMessages(' . FormatJson::encode( $messages ) . ');'; } protected function getMessageInfo() { @@ -50,7 +49,9 @@ // Override message value $msgVals = array( - 'visualeditor-feedback-link' = wfMessage( 'visualeditor-feedback-link' )-inContentLanguage()-text(), + 'visualeditor-feedback-link' = wfMessage( 'visualeditor-feedback-link' ) + -inContentLanguage() + -text(), ); // Copyright warning (based on EditPage::getCopyrightWarning) @@ -74,7 +75,11 @@ // Normalise to 'copyrightwarning' so we have a consistent key in the front-end. $msgArgs[ 'copyrightwarning' ] = $copywarnMsg; - $msgKeys = array_values( array_unique( array_merge( $msgKeys, array_keys( $msgArgs ), array_keys( $msgVals ) ) ) ); + $msgKeys = array_values( array_unique( array_merge( + $msgKeys, + array_keys( $msgArgs ), + array_keys( $msgVals ) + ) ) ); return array( 'keys' = $msgKeys, @@ -100,8 +105,9 @@ return max( $this-getMsgBlobMtime( $context-getLanguage() ), // Also invalidate this module if this file changes (i.e. when messages were - // added or removed, or when the javascript invocation in getScript is changes). - file_exists( __FILE__ ) ? filemtime( __FILE__ ) : 1 // use 1 because 0 = now, would invalidate continously + // added or removed, or when the Javascript invocation in getScript is changes). + // Use 1 because 0 = now, would invalidate continously + file_exists( __FILE__ ) ? filemtime( __FILE__ ) : 1 ); } } -- To view, visit https://gerrit.wikimedia.org/r/66081 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifc4aec328d726e9ca62db34af55ea9592c08d9f3 Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: Catrope roan.katt...@gmail.com Gerrit-Reviewer: Jforrester
[MediaWiki-commits] [Gerrit] Allow relative inclusions in Main namespace. - change (mediawiki/core)
VitaliyFilippov has uploaded a new change for review. https://gerrit.wikimedia.org/r/66092 Change subject: Allow relative inclusions in Main namespace. .. Allow relative inclusions in Main namespace. In previous versions of MediaWiki, relative inclusions ({{../name}}) were not handled properly in the Main namespace - it tried to include Template:Parent/name instead of just Parent/name article. In other namespaces they worked, though. The patch fixes this inconsistence and allows to use relative inclusions in Main. Change-Id: Ie04f23c180e501631c629a39b997796a1725fb67 --- M includes/parser/Parser.php 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/92/66092/1 diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 840e174..4e61ef6 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -3296,8 +3296,9 @@ $ns = NS_TEMPLATE; # Split the title into page and subpage $subpage = ''; - $part1 = $this-maybeDoSubpageLink( $part1, $subpage ); - if ( $subpage !== '' ) { + $relative = $this-maybeDoSubpageLink( $part1, $subpage ); + if ( $part1 !== $relative ) { + $part1 = $relative; $ns = $this-mTitle-getNamespace(); } $title = Title::newFromText( $part1, $ns ); -- To view, visit https://gerrit.wikimedia.org/r/66092 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie04f23c180e501631c629a39b997796a1725fb67 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] coding conventions (sql queries) - change (mediawiki...WikiLexicalData)
Kipcool has uploaded a new change for review. https://gerrit.wikimedia.org/r/66093 Change subject: coding conventions (sql queries) .. coding conventions (sql queries) Change-Id: Iaf1fd195267c819b5a23f152f96e48f6c951f548 --- M OmegaWiki/OmegaWikiRecordSets.php 1 file changed, 77 insertions(+), 66 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiLexicalData refs/changes/93/66093/1 diff --git a/OmegaWiki/OmegaWikiRecordSets.php b/OmegaWiki/OmegaWikiRecordSets.php index cd65588..cbc4030 100644 --- a/OmegaWiki/OmegaWikiRecordSets.php +++ b/OmegaWiki/OmegaWikiRecordSets.php @@ -11,77 +11,88 @@ function getSynonymSQLForLanguage( $languageId, array $definedMeaningIds ) { $dc = wdGetDataSetContext(); - - # Query building - $frontQuery = SELECT {$dc}_defined_meaning.defined_meaning_id AS defined_meaning_id, {$dc}_expression.spelling AS label . -FROM {$dc}_defined_meaning, {$dc}_syntrans, {$dc}_expression . -WHERE {$dc}_syntrans.remove_transaction_id IS NULL . -AND {$dc}_expression.remove_transaction_id IS NULL . -AND {$dc}_defined_meaning.remove_transaction_id IS NULL . -AND {$dc}_expression.language_id= . $languageId . -AND {$dc}_expression.expression_id={$dc}_syntrans.expression_id . -AND {$dc}_defined_meaning.defined_meaning_id={$dc}_syntrans.defined_meaning_id . -AND {$dc}_syntrans.identical_meaning=1 . -AND {$dc}_defined_meaning.defined_meaning_id = ; + $dbr = wfGetDB( DB_SLAVE ); - # Build atomic queries - $definedMeaningIdsCopy = $definedMeaningIds; - foreach ( $definedMeaningIdsCopy as $value ) { - $value = $frontQuery . $value; - } - unset( $value ); - # Union of the atoms - return implode( ' UNION ', $definedMeaningIdsCopy ); + $sqlQuery = $dbr-selectSQLText( + array( + 'dm' = {$dc}_defined_meaning, + 'synt' = {$dc}_syntrans, + 'exp' = {$dc}_expression + ), array( /* fields to select */ + 'defined_meaning_id' = dm.defined_meaning_id, + 'label' = exp.spelling + ), array( /* where */ + 'dm.defined_meaning_id' = $definedMeaningIds, + 'exp.language_id' = $languageId, + 'synt.identical_meaning' = 1, + 'synt.remove_transaction_id' = null, + 'exp.remove_transaction_id' = null, + 'dm.remove_transaction_id' = null, + 'exp.expression_id = synt.expression_id', + 'dm.defined_meaning_id = synt.defined_meaning_id' + ), __METHOD__ + ); + + return $sqlQuery; } function getSynonymSQLForAnyLanguage( array $definedMeaningIds ) { $dc = wdGetDataSetContext(); + $dbr = wfGetDB( DB_SLAVE ); - # Query building - $frontQuery = SELECT {$dc}_defined_meaning.defined_meaning_id AS defined_meaning_id, {$dc}_expression.spelling AS label . -FROM {$dc}_defined_meaning, {$dc}_syntrans, {$dc}_expression . -WHERE {$dc}_syntrans.remove_transaction_id IS NULL . -AND {$dc}_expression.remove_transaction_id IS NULL . -AND {$dc}_defined_meaning.remove_transaction_id IS NULL . -AND {$dc}_expression.expression_id={$dc}_syntrans.expression_id . -AND {$dc}_defined_meaning.defined_meaning_id={$dc}_syntrans.defined_meaning_id . -AND {$dc}_syntrans.identical_meaning=1 . -AND {$dc}_defined_meaning.defined_meaning_id = ; + $sqlQuery = $dbr-selectSQLText( + array( + 'dm' = {$dc}_defined_meaning, + 'synt' = {$dc}_syntrans, + 'exp' = {$dc}_expression + ), array( /* fields to select */ + 'defined_meaning_id' = dm.defined_meaning_id, + 'label' = exp.spelling + ), array( /* where */ + 'dm.defined_meaning_id' = $definedMeaningIds, + 'synt.identical_meaning' = 1, + 'synt.remove_transaction_id' = null, + 'exp.remove_transaction_id' = null, + 'dm.remove_transaction_id' = null, + 'exp.expression_id = synt.expression_id', + 'dm.defined_meaning_id = synt.defined_meaning_id' + ), __METHOD__ + ); - # Build atomic queries - $definedMeaningIdsCopy = $definedMeaningIds; - foreach ( $definedMeaningIdsCopy as $value ) { - $value =
[MediaWiki-commits] [Gerrit] coding conventions (sql queries) - change (mediawiki...WikiLexicalData)
Kipcool has submitted this change and it was merged. Change subject: coding conventions (sql queries) .. coding conventions (sql queries) Change-Id: Iaf1fd195267c819b5a23f152f96e48f6c951f548 --- M OmegaWiki/OmegaWikiRecordSets.php 1 file changed, 77 insertions(+), 66 deletions(-) Approvals: Kipcool: Verified; Looks good to me, approved diff --git a/OmegaWiki/OmegaWikiRecordSets.php b/OmegaWiki/OmegaWikiRecordSets.php index cd65588..cbc4030 100644 --- a/OmegaWiki/OmegaWikiRecordSets.php +++ b/OmegaWiki/OmegaWikiRecordSets.php @@ -11,77 +11,88 @@ function getSynonymSQLForLanguage( $languageId, array $definedMeaningIds ) { $dc = wdGetDataSetContext(); - - # Query building - $frontQuery = SELECT {$dc}_defined_meaning.defined_meaning_id AS defined_meaning_id, {$dc}_expression.spelling AS label . -FROM {$dc}_defined_meaning, {$dc}_syntrans, {$dc}_expression . -WHERE {$dc}_syntrans.remove_transaction_id IS NULL . -AND {$dc}_expression.remove_transaction_id IS NULL . -AND {$dc}_defined_meaning.remove_transaction_id IS NULL . -AND {$dc}_expression.language_id= . $languageId . -AND {$dc}_expression.expression_id={$dc}_syntrans.expression_id . -AND {$dc}_defined_meaning.defined_meaning_id={$dc}_syntrans.defined_meaning_id . -AND {$dc}_syntrans.identical_meaning=1 . -AND {$dc}_defined_meaning.defined_meaning_id = ; + $dbr = wfGetDB( DB_SLAVE ); - # Build atomic queries - $definedMeaningIdsCopy = $definedMeaningIds; - foreach ( $definedMeaningIdsCopy as $value ) { - $value = $frontQuery . $value; - } - unset( $value ); - # Union of the atoms - return implode( ' UNION ', $definedMeaningIdsCopy ); + $sqlQuery = $dbr-selectSQLText( + array( + 'dm' = {$dc}_defined_meaning, + 'synt' = {$dc}_syntrans, + 'exp' = {$dc}_expression + ), array( /* fields to select */ + 'defined_meaning_id' = dm.defined_meaning_id, + 'label' = exp.spelling + ), array( /* where */ + 'dm.defined_meaning_id' = $definedMeaningIds, + 'exp.language_id' = $languageId, + 'synt.identical_meaning' = 1, + 'synt.remove_transaction_id' = null, + 'exp.remove_transaction_id' = null, + 'dm.remove_transaction_id' = null, + 'exp.expression_id = synt.expression_id', + 'dm.defined_meaning_id = synt.defined_meaning_id' + ), __METHOD__ + ); + + return $sqlQuery; } function getSynonymSQLForAnyLanguage( array $definedMeaningIds ) { $dc = wdGetDataSetContext(); + $dbr = wfGetDB( DB_SLAVE ); - # Query building - $frontQuery = SELECT {$dc}_defined_meaning.defined_meaning_id AS defined_meaning_id, {$dc}_expression.spelling AS label . -FROM {$dc}_defined_meaning, {$dc}_syntrans, {$dc}_expression . -WHERE {$dc}_syntrans.remove_transaction_id IS NULL . -AND {$dc}_expression.remove_transaction_id IS NULL . -AND {$dc}_defined_meaning.remove_transaction_id IS NULL . -AND {$dc}_expression.expression_id={$dc}_syntrans.expression_id . -AND {$dc}_defined_meaning.defined_meaning_id={$dc}_syntrans.defined_meaning_id . -AND {$dc}_syntrans.identical_meaning=1 . -AND {$dc}_defined_meaning.defined_meaning_id = ; + $sqlQuery = $dbr-selectSQLText( + array( + 'dm' = {$dc}_defined_meaning, + 'synt' = {$dc}_syntrans, + 'exp' = {$dc}_expression + ), array( /* fields to select */ + 'defined_meaning_id' = dm.defined_meaning_id, + 'label' = exp.spelling + ), array( /* where */ + 'dm.defined_meaning_id' = $definedMeaningIds, + 'synt.identical_meaning' = 1, + 'synt.remove_transaction_id' = null, + 'exp.remove_transaction_id' = null, + 'dm.remove_transaction_id' = null, + 'exp.expression_id = synt.expression_id', + 'dm.defined_meaning_id = synt.defined_meaning_id' + ), __METHOD__ + ); - # Build atomic queries - $definedMeaningIdsCopy = $definedMeaningIds; - foreach ( $definedMeaningIdsCopy as $value ) { - $value = $frontQuery . $value; - } - unset( $value ); - # Union of the atoms
[MediaWiki-commits] [Gerrit] New version: 1.6.1 - change (mediawiki...ExternalData)
Yaron Koren has uploaded a new change for review. https://gerrit.wikimedia.org/r/66094 Change subject: New version: 1.6.1 .. New version: 1.6.1 Change-Id: I8678517d5527a98b3e57d0dbb041d31956bb18a1 --- M ExternalData.php M README 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ExternalData refs/changes/94/66094/1 diff --git a/ExternalData.php b/ExternalData.php index 762499d..75fe489 100644 --- a/ExternalData.php +++ b/ExternalData.php @@ -12,7 +12,7 @@ $wgExtensionCredits['parserhook'][] = array( 'path' = __FILE__, 'name' = 'External Data', - 'version'= '1.6', + 'version'= '1.6.1', 'author' = array( 'Yaron Koren', 'Michael Dale', 'David Macdonald' ), 'url'= 'https://www.mediawiki.org/wiki/Extension:External_Data', 'descriptionmsg' = 'externaldata-desc', diff --git a/README b/README index 2876809..8b6a809 100644 --- a/README +++ b/README @@ -1,6 +1,6 @@ External Data extension -Version 1.6 +Version 1.6.1 Yaron Koren, Michael Dale and David Macdonald This is free software licensed under the GNU General Public License. Please -- To view, visit https://gerrit.wikimedia.org/r/66094 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8678517d5527a98b3e57d0dbb041d31956bb18a1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ExternalData Gerrit-Branch: master Gerrit-Owner: Yaron Koren yaro...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] New version: 1.6.1 - change (mediawiki...ExternalData)
Yaron Koren has submitted this change and it was merged. Change subject: New version: 1.6.1 .. New version: 1.6.1 Change-Id: I8678517d5527a98b3e57d0dbb041d31956bb18a1 --- M ExternalData.php M README 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Yaron Koren: Verified; Looks good to me, approved diff --git a/ExternalData.php b/ExternalData.php index 762499d..75fe489 100644 --- a/ExternalData.php +++ b/ExternalData.php @@ -12,7 +12,7 @@ $wgExtensionCredits['parserhook'][] = array( 'path' = __FILE__, 'name' = 'External Data', - 'version'= '1.6', + 'version'= '1.6.1', 'author' = array( 'Yaron Koren', 'Michael Dale', 'David Macdonald' ), 'url'= 'https://www.mediawiki.org/wiki/Extension:External_Data', 'descriptionmsg' = 'externaldata-desc', diff --git a/README b/README index 2876809..8b6a809 100644 --- a/README +++ b/README @@ -1,6 +1,6 @@ External Data extension -Version 1.6 +Version 1.6.1 Yaron Koren, Michael Dale and David Macdonald This is free software licensed under the GNU General Public License. Please -- To view, visit https://gerrit.wikimedia.org/r/66094 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8678517d5527a98b3e57d0dbb041d31956bb18a1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ExternalData Gerrit-Branch: master Gerrit-Owner: Yaron Koren yaro...@gmail.com Gerrit-Reviewer: Yaron Koren yaro...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Split off 503 retry in vcl_error from 5xx retry in vcl_fetch - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/66095 Change subject: Split off 503 retry in vcl_error from 5xx retry in vcl_fetch .. Split off 503 retry in vcl_error from 5xx retry in vcl_fetch Change-Id: I5ed02ba3f3185bf37467809de66d926ed794078c --- M manifests/role/cache.pp M templates/varnish/wikimedia.vcl.erb 2 files changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/95/66095/1 diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index 2ff4c47..a738c2c 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -451,6 +451,7 @@ directors = $varnish_be_directors[$::site], director_type = random, vcl_config = { + 'retry503' = 1, 'retry5xx' = 0, 'cache4xx' = 1m, 'purge_regex' = '^http://(?!upload\.wikimedia\.org)', @@ -484,6 +485,7 @@ directors = $varnish_fe_directors[$::site], director_type = chash, vcl_config = { + 'retry503' = 1, 'retry5xx' = 0, 'cache4xx' = 1m, 'purge_regex' = '^http://(?!upload\.wikimedia\.org)', @@ -746,6 +748,7 @@ directors = $varnish_directors, director_type = random, vcl_config = { + 'retry503' = 1, 'retry5xx' = 1, 'cache4xx' = 1m, 'layer' = 'frontend', @@ -848,6 +851,7 @@ 'retries' = 2, }, vcl_config = { + 'retry503' = 1, 'retry5xx' = 1, 'purge_regex' = '^http://(?!upload\.wikimedia\.org)', 'layer' = 'backend', diff --git a/templates/varnish/wikimedia.vcl.erb b/templates/varnish/wikimedia.vcl.erb index 06484f3..a0154e6 100644 --- a/templates/varnish/wikimedia.vcl.erb +++ b/templates/varnish/wikimedia.vcl.erb @@ -291,7 +291,7 @@ } sub vcl_error { -% if vcl_config.fetch(retry5xx, 0) == 1 -% +% if vcl_config.fetch(retry503, 0) == 1 -% if (obj.status == 503 req.restarts 4) { return(restart); } -- To view, visit https://gerrit.wikimedia.org/r/66095 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5ed02ba3f3185bf37467809de66d926ed794078c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] sql queries reformatted - change (mediawiki...WikiLexicalData)
Kipcool has uploaded a new change for review. https://gerrit.wikimedia.org/r/66096 Change subject: sql queries reformatted .. sql queries reformatted Change-Id: I67493f7d832bd4c4bcb165a89f09f8b6140e0dde --- M OmegaWiki/OmegaWikiRecordSets.php 1 file changed, 52 insertions(+), 61 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiLexicalData refs/changes/96/66096/1 diff --git a/OmegaWiki/OmegaWikiRecordSets.php b/OmegaWiki/OmegaWikiRecordSets.php index cbc4030..b20c40f 100644 --- a/OmegaWiki/OmegaWikiRecordSets.php +++ b/OmegaWiki/OmegaWikiRecordSets.php @@ -127,26 +127,21 @@ $o = OmegaWikiAttributes::getInstance(); $dc = wdGetDataSetContext(); $dbr = wfGetDB( DB_SLAVE ); - - # Query building - $frontQuery = SELECT {$dc}_defined_meaning.defined_meaning_id AS defined_meaning_id, {$dc}_expression.spelling . -FROM {$dc}_defined_meaning, {$dc}_expression . -WHERE {$dc}_defined_meaning.expression_id={$dc}_expression.expression_id . -AND {$dc}_defined_meaning.remove_transaction_id IS NULL . -AND {$dc}_expression.remove_transaction_id IS NULL . -AND {$dc}_defined_meaning.defined_meaning_id = ; - // copy the definedMeaningIds array to create one query for each DM id - $definedMeaningQueries = $definedMeaningIds; - unset( $value ); - foreach ( $definedMeaningQueries as $value ) { - $value = $frontQuery . $value; - } - unset( $value ); - # Union of the atoms - $finalQuery = implode( ' UNION ', $definedMeaningQueries ); - - $queryResult = $dbr-query( $finalQuery ); + $queryResult = $dbr-select( + array( + 'dm' = {$dc}_defined_meaning, + 'exp' = {$dc}_expression + ), array( /* fields to select */ + 'defined_meaning_id' = dm.defined_meaning_id, + 'spelling' = exp.spelling + ), array( /* where */ + 'exp.expression_id = dm.expression_id', // getting defining expression + 'dm.defined_meaning_id' = $definedMeaningIds, + 'exp.remove_transaction_id' = null, + 'dm.remove_transaction_id' = null + ), __METHOD__ + ); foreach ( $queryResult as $row ) { if ( isset( $definedMeaningReferenceRecords[$row-defined_meaning_id] ) ) { @@ -252,15 +247,21 @@ // an array of records $result = array(); - // find the spelling of a syntrans (of all syntrans from array syntransIds) - $sql = SELECT /* getSyntransReferenceRecords */ syntrans_sid, spelling - . FROM {$dc}_syntrans, {$dc}_expression - . WHERE syntrans_sid IN ( . implode( , , $syntransIds ) . ) - . AND {$dc}_expression.expression_id={$dc}_syntrans.expression_id ; - - $queryResult = $dbr-query( $sql ); $structure = new Structure( WLD_SYNONYMS_TRANSLATIONS, $o-syntransId, $o-spelling ); $structure-setStructureType( $usedAs ); + + $queryResult = $dbr-select( + array( + 'synt' = {$dc}_syntrans, + 'exp' = {$dc}_expression + ), array ( + 'syntrans_sid', + 'spelling' + ), array ( + 'syntrans_sid' = $syntransIds, + 'exp.expression_id = synt.expression_id' + ), __METHOD__ + ); foreach ( $queryResult as $row ) { $record = new ArrayRecord( $structure ); @@ -313,20 +314,14 @@ if ( count( $expressionIds ) 0 ) { $dbr = wfGetDB( DB_SLAVE ); - # Prepare steady components - $frontQuery = SELECT expression_id, spelling FROM {$dc}_expression WHERE expression_id =; - $queueQuery = AND {$dc}_expression.remove_transaction_id IS NULL ; - # Build atomic queries - foreach ( $expressionIds as $value ) { - $value = $frontQuery . $value . $queueQuery; - } - unset( $value ); - # Union of the atoms - $finalQuery = implode( ' UNION ', $expressionIds ); - - $queryResult = $dbr-query( $finalQuery ); - - $result = array(); + $queryResult = $dbr-select( + {$dc}_expression, + array( 'expression_id', 'spelling' ), + array( /* where */ + 'expression_id' = $expressionIds, + 'remove_transaction_id' = null + ),
[MediaWiki-commits] [Gerrit] sql queries reformatted - change (mediawiki...WikiLexicalData)
Kipcool has submitted this change and it was merged. Change subject: sql queries reformatted .. sql queries reformatted Change-Id: I67493f7d832bd4c4bcb165a89f09f8b6140e0dde --- M OmegaWiki/OmegaWikiRecordSets.php 1 file changed, 52 insertions(+), 61 deletions(-) Approvals: Kipcool: Verified; Looks good to me, approved diff --git a/OmegaWiki/OmegaWikiRecordSets.php b/OmegaWiki/OmegaWikiRecordSets.php index cbc4030..b20c40f 100644 --- a/OmegaWiki/OmegaWikiRecordSets.php +++ b/OmegaWiki/OmegaWikiRecordSets.php @@ -127,26 +127,21 @@ $o = OmegaWikiAttributes::getInstance(); $dc = wdGetDataSetContext(); $dbr = wfGetDB( DB_SLAVE ); - - # Query building - $frontQuery = SELECT {$dc}_defined_meaning.defined_meaning_id AS defined_meaning_id, {$dc}_expression.spelling . -FROM {$dc}_defined_meaning, {$dc}_expression . -WHERE {$dc}_defined_meaning.expression_id={$dc}_expression.expression_id . -AND {$dc}_defined_meaning.remove_transaction_id IS NULL . -AND {$dc}_expression.remove_transaction_id IS NULL . -AND {$dc}_defined_meaning.defined_meaning_id = ; - // copy the definedMeaningIds array to create one query for each DM id - $definedMeaningQueries = $definedMeaningIds; - unset( $value ); - foreach ( $definedMeaningQueries as $value ) { - $value = $frontQuery . $value; - } - unset( $value ); - # Union of the atoms - $finalQuery = implode( ' UNION ', $definedMeaningQueries ); - - $queryResult = $dbr-query( $finalQuery ); + $queryResult = $dbr-select( + array( + 'dm' = {$dc}_defined_meaning, + 'exp' = {$dc}_expression + ), array( /* fields to select */ + 'defined_meaning_id' = dm.defined_meaning_id, + 'spelling' = exp.spelling + ), array( /* where */ + 'exp.expression_id = dm.expression_id', // getting defining expression + 'dm.defined_meaning_id' = $definedMeaningIds, + 'exp.remove_transaction_id' = null, + 'dm.remove_transaction_id' = null + ), __METHOD__ + ); foreach ( $queryResult as $row ) { if ( isset( $definedMeaningReferenceRecords[$row-defined_meaning_id] ) ) { @@ -252,15 +247,21 @@ // an array of records $result = array(); - // find the spelling of a syntrans (of all syntrans from array syntransIds) - $sql = SELECT /* getSyntransReferenceRecords */ syntrans_sid, spelling - . FROM {$dc}_syntrans, {$dc}_expression - . WHERE syntrans_sid IN ( . implode( , , $syntransIds ) . ) - . AND {$dc}_expression.expression_id={$dc}_syntrans.expression_id ; - - $queryResult = $dbr-query( $sql ); $structure = new Structure( WLD_SYNONYMS_TRANSLATIONS, $o-syntransId, $o-spelling ); $structure-setStructureType( $usedAs ); + + $queryResult = $dbr-select( + array( + 'synt' = {$dc}_syntrans, + 'exp' = {$dc}_expression + ), array ( + 'syntrans_sid', + 'spelling' + ), array ( + 'syntrans_sid' = $syntransIds, + 'exp.expression_id = synt.expression_id' + ), __METHOD__ + ); foreach ( $queryResult as $row ) { $record = new ArrayRecord( $structure ); @@ -313,20 +314,14 @@ if ( count( $expressionIds ) 0 ) { $dbr = wfGetDB( DB_SLAVE ); - # Prepare steady components - $frontQuery = SELECT expression_id, spelling FROM {$dc}_expression WHERE expression_id =; - $queueQuery = AND {$dc}_expression.remove_transaction_id IS NULL ; - # Build atomic queries - foreach ( $expressionIds as $value ) { - $value = $frontQuery . $value . $queueQuery; - } - unset( $value ); - # Union of the atoms - $finalQuery = implode( ' UNION ', $expressionIds ); - - $queryResult = $dbr-query( $finalQuery ); - - $result = array(); + $queryResult = $dbr-select( + {$dc}_expression, + array( 'expression_id', 'spelling' ), + array( /* where */ + 'expression_id' = $expressionIds, + 'remove_transaction_id' = null + ), __METHOD__ + ); foreach ( $queryResult as $row ) {
[MediaWiki-commits] [Gerrit] Split off 503 retry in vcl_error from 5xx retry in vcl_fetch - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Split off 503 retry in vcl_error from 5xx retry in vcl_fetch .. Split off 503 retry in vcl_error from 5xx retry in vcl_fetch Change-Id: I5ed02ba3f3185bf37467809de66d926ed794078c --- M manifests/role/cache.pp M templates/varnish/wikimedia.vcl.erb 2 files changed, 5 insertions(+), 1 deletion(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index 2ff4c47..a738c2c 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -451,6 +451,7 @@ directors = $varnish_be_directors[$::site], director_type = random, vcl_config = { + 'retry503' = 1, 'retry5xx' = 0, 'cache4xx' = 1m, 'purge_regex' = '^http://(?!upload\.wikimedia\.org)', @@ -484,6 +485,7 @@ directors = $varnish_fe_directors[$::site], director_type = chash, vcl_config = { + 'retry503' = 1, 'retry5xx' = 0, 'cache4xx' = 1m, 'purge_regex' = '^http://(?!upload\.wikimedia\.org)', @@ -746,6 +748,7 @@ directors = $varnish_directors, director_type = random, vcl_config = { + 'retry503' = 1, 'retry5xx' = 1, 'cache4xx' = 1m, 'layer' = 'frontend', @@ -848,6 +851,7 @@ 'retries' = 2, }, vcl_config = { + 'retry503' = 1, 'retry5xx' = 1, 'purge_regex' = '^http://(?!upload\.wikimedia\.org)', 'layer' = 'backend', diff --git a/templates/varnish/wikimedia.vcl.erb b/templates/varnish/wikimedia.vcl.erb index 06484f3..a0154e6 100644 --- a/templates/varnish/wikimedia.vcl.erb +++ b/templates/varnish/wikimedia.vcl.erb @@ -291,7 +291,7 @@ } sub vcl_error { -% if vcl_config.fetch(retry5xx, 0) == 1 -% +% if vcl_config.fetch(retry503, 0) == 1 -% if (obj.status == 503 req.restarts 4) { return(restart); } -- To view, visit https://gerrit.wikimedia.org/r/66095 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5ed02ba3f3185bf37467809de66d926ed794078c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added InternalEntityIdInterpreter - change (mediawiki...Wikibase)
Daniel Werner has submitted this change and it was merged. Change subject: Added InternalEntityIdInterpreter .. Added InternalEntityIdInterpreter This interface has a method for translating internal store entity ids to EntityId objects Change-Id: Ie5a05b5764944722d43ec3941f83a73af88978fa --- M QueryEngine/includes/SQLStore/EntityIdTransformer.php A QueryEngine/includes/SQLStore/InternalEntityIdInterpreter.php M QueryEngine/tests/phpunit/SQLStore/EntityIdTransformerTest.php 3 files changed, 134 insertions(+), 14 deletions(-) Approvals: Daniel Werner: Looks good to me, approved jenkins-bot: Verified diff --git a/QueryEngine/includes/SQLStore/EntityIdTransformer.php b/QueryEngine/includes/SQLStore/EntityIdTransformer.php index c73b517..36c1668 100644 --- a/QueryEngine/includes/SQLStore/EntityIdTransformer.php +++ b/QueryEngine/includes/SQLStore/EntityIdTransformer.php @@ -2,6 +2,7 @@ namespace Wikibase\QueryEngine\SQLStore; +use OutOfBoundsException; use Wikibase\EntityId; /** @@ -31,15 +32,16 @@ * @author Jeroen De Dauw jeroended...@gmail.com * @author Denny Vrandecic */ -class EntityIdTransformer implements InternalEntityIdFinder { +class EntityIdTransformer implements InternalEntityIdFinder, InternalEntityIdInterpreter { - protected $idMap; + protected $stringTypeToInt; + protected $intTypeToString; /** * @param int[] $idMap Maps entity types (strings) to a unique one digit integer */ public function __construct( array $idMap ) { - $this-idMap = $idMap; + $this-stringTypeToInt = $idMap; } /** @@ -50,19 +52,56 @@ * @return int */ public function getInternalIdForEntity( EntityId $entityId ) { - $this-ensureEntityTypeIsKnown( $entityId-getEntityType() ); + $this-ensureEntityStringTypeIsKnown( $entityId-getEntityType() ); return $this-getComputedId( $entityId ); } - protected function ensureEntityTypeIsKnown( $entityType ) { - if ( !array_key_exists( $entityType, $this-idMap ) ) { - throw new \OutOfBoundsException( Id of unknown entity type '$entityType' cannot be transformed ); + protected function ensureEntityStringTypeIsKnown( $entityType ) { + if ( !array_key_exists( $entityType, $this-stringTypeToInt ) ) { + throw new OutOfBoundsException( Id of unknown entity type '$entityType' cannot be transformed ); } } protected function getComputedId( EntityId $entityId ) { - return $entityId-getNumericId() * 10 + $this-idMap[$entityId-getEntityType()]; + return $entityId-getNumericId() * 10 + $this-stringTypeToInt[$entityId-getEntityType()]; + } + + /** +* @see InternalEntityIdInterpreter::getExternalIdForEntity +* +* @param int $internalEntityId +* +* @return EntityId +*/ + public function getExternalIdForEntity( $internalEntityId ) { + $this-buildIntToStringMap(); + + $numericId = (int)floor( $internalEntityId / 10 ); + $typeId = $internalEntityId % 10; + + $this-ensureEntityIntTypeIsKnown( $typeId ); + $typeId = $this-intTypeToString[$typeId]; + + return new EntityId( $typeId, $numericId ); + } + + protected function buildIntToStringMap() { + if ( is_array( $this-intTypeToString ) ) { + return; + } + + $this-intTypeToString = array(); + + foreach ( $this-stringTypeToInt as $string = $int ) { + $this-intTypeToString[$int] = $string; + } + } + + protected function ensureEntityIntTypeIsKnown( $intType ) { + if ( !array_key_exists( $intType, $this-intTypeToString ) ) { + throw new OutOfBoundsException( Id of unknown entity type '$intType' cannot be interpreted ); + } } } diff --git a/QueryEngine/includes/SQLStore/InternalEntityIdInterpreter.php b/QueryEngine/includes/SQLStore/InternalEntityIdInterpreter.php new file mode 100644 index 000..6bff3c3 --- /dev/null +++ b/QueryEngine/includes/SQLStore/InternalEntityIdInterpreter.php @@ -0,0 +1,42 @@ +?php + +namespace Wikibase\QueryEngine\SQLStore; + +use Wikibase\EntityId; + +/** + * Finds the external entity id for the given internal entity id. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY
[MediaWiki-commits] [Gerrit] Tier 2 backends should use the chash director for requesting... - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/66097 Change subject: Tier 2 backends should use the chash director for requesting upstream .. Tier 2 backends should use the chash director for requesting upstream Change-Id: Ie3805b9cb5a9368a66929624e005dfd1004858de --- M manifests/role/cache.pp 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/97/66097/1 diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index a738c2c..b74d3e2 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -449,7 +449,10 @@ default = -s main-sda3=persistent,/srv/sda3/varnish.persist,${storage_size_main}G -s main-sdb3=persistent,/srv/sdb3/varnish.persist,${storage_size_main}G -s bigobj-sda3=file,/srv/sda3/large-objects.persist,${storage_size_bigobj}G -s bigobj-sdb3=file,/srv/sdb3/large-objects.persist,${storage_size_bigobj}G, }, directors = $varnish_be_directors[$::site], - director_type = random, + director_type = $cluster_tier ? { + 1 = 'random', + default = 'chash', + }, vcl_config = { 'retry503' = 1, 'retry5xx' = 0, -- To view, visit https://gerrit.wikimedia.org/r/66097 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie3805b9cb5a9368a66929624e005dfd1004858de Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Tier 2 backends should use the chash director for requesting... - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Tier 2 backends should use the chash director for requesting upstream .. Tier 2 backends should use the chash director for requesting upstream Change-Id: Ie3805b9cb5a9368a66929624e005dfd1004858de --- M manifests/role/cache.pp 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index a738c2c..b74d3e2 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -449,7 +449,10 @@ default = -s main-sda3=persistent,/srv/sda3/varnish.persist,${storage_size_main}G -s main-sdb3=persistent,/srv/sdb3/varnish.persist,${storage_size_main}G -s bigobj-sda3=file,/srv/sda3/large-objects.persist,${storage_size_bigobj}G -s bigobj-sdb3=file,/srv/sdb3/large-objects.persist,${storage_size_bigobj}G, }, directors = $varnish_be_directors[$::site], - director_type = random, + director_type = $cluster_tier ? { + 1 = 'random', + default = 'chash', + }, vcl_config = { 'retry503' = 1, 'retry5xx' = 0, -- To view, visit https://gerrit.wikimedia.org/r/66097 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie3805b9cb5a9368a66929624e005dfd1004858de Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Clean up VisualEditor config - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Clean up VisualEditor config .. Clean up VisualEditor config * Pull list of VE-enabled wikis from visualeditor.dblist * Set $wgVisualEditorParsoidPrefix to $wgDBname rather than a per-wiki value ** This requires a config change for Parsoid to recognize these prefixes Bug: 47557 Change-Id: I621e98da3be4f787e294d97b350b92d217f43a00 --- A visualeditor.dblist M wmf-config/CommonSettings.php M wmf-config/InitialiseSettings.php 3 files changed, 22 insertions(+), 44 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/visualeditor.dblist b/visualeditor.dblist new file mode 100644 index 000..edfd446 --- /dev/null +++ b/visualeditor.dblist @@ -0,0 +1,19 @@ +testwiki +test2wiki +mediawikiwiki +arwiki +dewiki +enwiki +eswiki +frwiki +hewiki +hiwiki +itwiki +jawiki +kowiki +nlwiki +plwiki +ruwiki +svwiki +viwiki +zhwiki diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index 8980f90..d988f16 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -194,7 +194,7 @@ require( $wmfConfigDir/InitialiseSettings.php ); $wikiTags = array(); - foreach ( array( 'private', 'fishbowl', 'special', 'closed', 'flaggedrevs', 'small', 'medium', 'large', 'wikimania', 'wikidata', 'wikidataclient' ) as $tag ) { + foreach ( array( 'private', 'fishbowl', 'special', 'closed', 'flaggedrevs', 'small', 'medium', 'large', 'wikimania', 'wikidata', 'wikidataclient', 'visualeditor' ) as $tag ) { $dblist = array_map( 'trim', file( getRealmSpecificFilename( $IP/../$tag.dblist ) ) ); if ( in_array( $wgDBname, $dblist ) ) { $wikiTags[] = $tag; @@ -1884,7 +1884,7 @@ 'eqiad' = '10.2.2.29', // parsoidcache.svc.eqiad.wmnet ); $wgVisualEditorParsoidURL = 'http://' . $wmgVisualEditorParsoidHosts[$wmfDatacenter] . ':6081'; - $wgVisualEditorParsoidPrefix = $wmgVisualEditorParsoidPrefix; + $wgVisualEditorParsoidPrefix = $wgDBname; $wgVisualEditorParsoidProblemReportURL = 'http://parsoid.wmflabs.org/_bugs/'; $wgVisualEditorNamespaces = $wmgVisualEditorNamespaces; diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index e055ad0..5e4c951 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -10456,48 +10456,7 @@ 'wmgUseVisualEditor' = array( 'default' = false, - 'testwiki' = true, - 'test2wiki' = true, - 'mediawikiwiki' = true, - 'arwiki' = true, - 'dewiki' = true, - 'enwiki' = true, - 'eswiki' = true, - 'frwiki' = true, - 'hewiki' = true, - 'hiwiki' = true, - 'itwiki' = true, - 'jawiki' = true, - 'kowiki' = true, - 'nlwiki' = true, - 'plwiki' = true, - 'ruwiki' = true, - 'svwiki' = true, - 'viwiki' = true, - 'zhwiki' = true, -), - -'wmgVisualEditorParsoidPrefix' = array( - 'default' = '', // This MUST be configured per-wiki for VE to work correctly - 'testwiki' = 'test', - 'test2wiki' = 'test2', - 'mediawikiwiki' = 'mw', - 'arwiki' = 'ar', - 'dewiki' = 'de', - 'enwiki' = 'en', - 'eswiki' = 'es', - 'frwiki' = 'fr', - 'hewiki' = 'he', - 'hiwiki' = 'hi', - 'itwiki' = 'it', - 'jawiki' = 'ja', - 'kowiki' = 'ko', - 'nlwiki' = 'nl', - 'plwiki' = 'pl', - 'ruwiki' = 'ru', - 'svwiki' = 'sv', - 'viwiki' = 'vi', - 'zhwiki' = 'zh', + 'visualeditor' = true, ), 'wmgVisualEditorNamespaces' = array( -- To view, visit https://gerrit.wikimedia.org/r/64493 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I621e98da3be4f787e294d97b350b92d217f43a00 Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Catrope roan.katt...@gmail.com Gerrit-Reviewer: Catrope roan.katt...@gmail.com Gerrit-Reviewer: MZMcBride w...@mzmcbride.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Reduce backend timeout to slightly lower than frontend - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/66098 Change subject: Reduce backend timeout to slightly lower than frontend .. Reduce backend timeout to slightly lower than frontend The backend is nearer to the problem and should report the error. Change-Id: I201beb5616eeb0e1060a1ad1853e491db5877e8e --- M manifests/role/cache.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/98/66098/1 diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index b74d3e2..d2f74f9 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -470,7 +470,7 @@ { 'port' = 80, 'connect_timeout' = 5s, - 'first_byte_timeout' = 35s, + 'first_byte_timeout' = 30s, 'between_bytes_timeout' = 4s, 'max_connections' = 1000, 'weight' = $backend_weight, -- To view, visit https://gerrit.wikimedia.org/r/66098 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I201beb5616eeb0e1060a1ad1853e491db5877e8e Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Reduce backend timeout to slightly lower than frontend - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Reduce backend timeout to slightly lower than frontend .. Reduce backend timeout to slightly lower than frontend The backend is nearer to the problem and should report the error. Change-Id: I201beb5616eeb0e1060a1ad1853e491db5877e8e --- M manifests/role/cache.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index b74d3e2..d2f74f9 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -470,7 +470,7 @@ { 'port' = 80, 'connect_timeout' = 5s, - 'first_byte_timeout' = 35s, + 'first_byte_timeout' = 30s, 'between_bytes_timeout' = 4s, 'max_connections' = 1000, 'weight' = $backend_weight, -- To view, visit https://gerrit.wikimedia.org/r/66098 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I201beb5616eeb0e1060a1ad1853e491db5877e8e Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] The retry503 parameter now specifies the number of restarts - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/66099 Change subject: The retry503 parameter now specifies the number of restarts .. The retry503 parameter now specifies the number of restarts Change-Id: I95f77980c4f508db439508e9d882ef9784f96831 --- M manifests/role/cache.pp M templates/varnish/wikimedia.vcl.erb 2 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/99/66099/1 diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index d2f74f9..9c741d6 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -751,7 +751,7 @@ directors = $varnish_directors, director_type = random, vcl_config = { - 'retry503' = 1, + 'retry503' = 4, 'retry5xx' = 1, 'cache4xx' = 1m, 'layer' = 'frontend', @@ -854,7 +854,7 @@ 'retries' = 2, }, vcl_config = { - 'retry503' = 1, + 'retry503' = 4, 'retry5xx' = 1, 'purge_regex' = '^http://(?!upload\.wikimedia\.org)', 'layer' = 'backend', diff --git a/templates/varnish/wikimedia.vcl.erb b/templates/varnish/wikimedia.vcl.erb index a0154e6..b2dfb7d 100644 --- a/templates/varnish/wikimedia.vcl.erb +++ b/templates/varnish/wikimedia.vcl.erb @@ -291,8 +291,8 @@ } sub vcl_error { -% if vcl_config.fetch(retry503, 0) == 1 -% - if (obj.status == 503 req.restarts 4) { +% if vcl_config.fetch(retry503, 0) != 0 -% + if (obj.status == 503 req.restarts %= vcl_config[retry503].to_i %) { return(restart); } % end -% -- To view, visit https://gerrit.wikimedia.org/r/66099 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I95f77980c4f508db439508e9d882ef9784f96831 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] The retry503 parameter now specifies the number of restarts - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: The retry503 parameter now specifies the number of restarts .. The retry503 parameter now specifies the number of restarts Change-Id: I95f77980c4f508db439508e9d882ef9784f96831 --- M manifests/role/cache.pp M templates/varnish/wikimedia.vcl.erb 2 files changed, 4 insertions(+), 4 deletions(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index d2f74f9..9c741d6 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -751,7 +751,7 @@ directors = $varnish_directors, director_type = random, vcl_config = { - 'retry503' = 1, + 'retry503' = 4, 'retry5xx' = 1, 'cache4xx' = 1m, 'layer' = 'frontend', @@ -854,7 +854,7 @@ 'retries' = 2, }, vcl_config = { - 'retry503' = 1, + 'retry503' = 4, 'retry5xx' = 1, 'purge_regex' = '^http://(?!upload\.wikimedia\.org)', 'layer' = 'backend', diff --git a/templates/varnish/wikimedia.vcl.erb b/templates/varnish/wikimedia.vcl.erb index a0154e6..b2dfb7d 100644 --- a/templates/varnish/wikimedia.vcl.erb +++ b/templates/varnish/wikimedia.vcl.erb @@ -291,8 +291,8 @@ } sub vcl_error { -% if vcl_config.fetch(retry503, 0) == 1 -% - if (obj.status == 503 req.restarts 4) { +% if vcl_config.fetch(retry503, 0) != 0 -% + if (obj.status == 503 req.restarts %= vcl_config[retry503].to_i %) { return(restart); } % end -% -- To view, visit https://gerrit.wikimedia.org/r/66099 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I95f77980c4f508db439508e9d882ef9784f96831 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make VisualEditor work in labs (hopefully) - change (operations/mediawiki-config)
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/66100 Change subject: Make VisualEditor work in labs (hopefully) .. Make VisualEditor work in labs (hopefully) Change-Id: I5654b92503b2a82b9ee9614589ceba46b91116ef --- M wmf-config/CommonSettings-labs.php 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/00/66100/1 diff --git a/wmf-config/CommonSettings-labs.php b/wmf-config/CommonSettings-labs.php index da70101..a71bb22 100644 --- a/wmf-config/CommonSettings-labs.php +++ b/wmf-config/CommonSettings-labs.php @@ -69,7 +69,10 @@ $wgMaxCoordinatesPerPage = 2000; } - +if ( $wmgUseVisualEditor ) { + $wgVisualEditorParsoidURL = 'http://10.4.0.61/'; // deployment-parsoidcache2 + $wgVisualEditorParsoidReportProblemURL = 'http://10.4.0.33/_bugs/'; // parsoid-spof +} # temporary extensions # -- To view, visit https://gerrit.wikimedia.org/r/66100 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5654b92503b2a82b9ee9614589ceba46b91116ef Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Catrope roan.katt...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make VisualEditor work in labs (hopefully) - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Make VisualEditor work in labs (hopefully) .. Make VisualEditor work in labs (hopefully) Change-Id: I5654b92503b2a82b9ee9614589ceba46b91116ef --- M wmf-config/CommonSettings-labs.php 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/CommonSettings-labs.php b/wmf-config/CommonSettings-labs.php index da70101..a71bb22 100644 --- a/wmf-config/CommonSettings-labs.php +++ b/wmf-config/CommonSettings-labs.php @@ -69,7 +69,10 @@ $wgMaxCoordinatesPerPage = 2000; } - +if ( $wmgUseVisualEditor ) { + $wgVisualEditorParsoidURL = 'http://10.4.0.61/'; // deployment-parsoidcache2 + $wgVisualEditorParsoidReportProblemURL = 'http://10.4.0.33/_bugs/'; // parsoid-spof +} # temporary extensions # -- To view, visit https://gerrit.wikimedia.org/r/66100 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5654b92503b2a82b9ee9614589ceba46b91116ef Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Catrope roan.katt...@gmail.com Gerrit-Reviewer: Catrope roan.katt...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] ve.ui.MWTemplateDialog: Implement inferring of template data - change (mediawiki...VisualEditor)
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/66101 Change subject: ve.ui.MWTemplateDialog: Implement inferring of template data .. ve.ui.MWTemplateDialog: Implement inferring of template data Clean up of logic implemented during the template-sprint: * Store spec inside the content model, directly associated with the content-part. This allowed fixing the bug where two spec-less template invocations overwrote eachothers made-up template data due to it using target.wt as key. The opener now provides the fetcher with a specId which is set to part/id for wt-generated template targets. * Batching is now implemented inside the fetcher instead of outside. This allows calling getTemplateSpecs inside the loop with a dedicated callback for each spec to store it in the content.parts[i] object passed by reference. It also makes it easier to use by different codepaths. You call it as much as you like and it will queue up naturally through javascript yielding and then make a batch request. This is based on the pattern I used in MediaWiki core for mw.loader#addEmbeddedCSS. Follows-up e7af635, da679b7. Change-Id: I4d7121229d060a96d927585c987a1a81a474b922 --- M modules/ve/ui/dialogs/ve.ui.MWTemplateDialog.js 1 file changed, 184 insertions(+), 59 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/01/66101/1 diff --git a/modules/ve/ui/dialogs/ve.ui.MWTemplateDialog.js b/modules/ve/ui/dialogs/ve.ui.MWTemplateDialog.js index 3de1e65..b1e6c75 100644 --- a/modules/ve/ui/dialogs/ve.ui.MWTemplateDialog.js +++ b/modules/ve/ui/dialogs/ve.ui.MWTemplateDialog.js @@ -27,7 +27,9 @@ // Properties this.node = null; this.content = null; - this.specs = {}; + // Buffer for getTemplateSpecs + this.fetchQueue = []; + this.fetchCallbacks = $.Callbacks(); }; /* Inheritance */ @@ -50,47 +52,63 @@ * @method */ ve.ui.MWTemplateDialog.prototype.onOpen = function () { - var i, len, template, title, - templates = []; + var i, progress, len, template, + dialog = this; - this.node = this.surface.getView().getFocusedNode(); - if ( !this.node ) { + dialog.node = dialog.surface.getView().getFocusedNode(); + if ( !dialog.node ) { throw new Error( 'No focused node to edit' ); } - // Get content values - this.content = ve.copyObject( this.node.getModel().getAttribute( 'mw' ) ); + // Get content values and copy it so we can safely change it to our liking + dialog.content = ve.copyObject( dialog.node.getModel().getAttribute( 'mw' ) ); + // Convert single template format to multiple template format - if ( this.content.params ) { - this.content = { 'parts': [ { 'template': this.content } ] }; + if ( dialog.content.params ) { + dialog.content = { + 'parts': [ + { + 'template': dialog.content + } + ] + }; } - // Get all template data asynchronously - for ( i = 0, len = this.content.parts.length; i len; i++ ) { - template = this.content.parts[i].template; - if ( template ) { - if ( template.target.url ) { - try { - title = new mw.Title( template.target.url ); - templates.push( { - 'title': title.toString(), - 'params': template.params - } ); - } catch ( e ) {} - } - } else { - // Wrap plain wikitext in object so editor has something to reference - this.content.parts[i] = { 'wt': this.content.parts[i] }; + + progress = -1; + len = dialog.content.parts.length; + + function increaseProgress() { + progress++; + if ( progress === len ) { + dialog.setupPages(); } } - if ( templates.length ) { - this.getTemplateData( templates ) - .done( ve.bind( function ( specs ) { - this.specs = specs; - }, this ) ) - .always( ve.bind( this.setupPages, this ) ); - } else { - this.setupPages(); + + function makeStoreTemplateSpec( template ) { + return function ( specs ) { + template.spec = specs[ template.specId ]; +
[MediaWiki-commits] [Gerrit] Added exception that is thrown when getting an invalid prope... - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Added exception that is thrown when getting an invalid property id .. Added exception that is thrown when getting an invalid property id Change-Id: I9ae68947c2c781d001702fc13881a31eaa1faa1d --- M QueryEngine/includes/SQLStore/Engine/DescriptionMatchFinder.php M QueryEngine/tests/phpunit/SQLStore/Engine/DescriptionMatchFinderTest.php 2 files changed, 20 insertions(+), 1 deletion(-) Approvals: Daniel Kinzler: Looks good to me, approved jenkins-bot: Verified diff --git a/QueryEngine/includes/SQLStore/Engine/DescriptionMatchFinder.php b/QueryEngine/includes/SQLStore/Engine/DescriptionMatchFinder.php index b038f01..55d8dde 100644 --- a/QueryEngine/includes/SQLStore/Engine/DescriptionMatchFinder.php +++ b/QueryEngine/includes/SQLStore/Engine/DescriptionMatchFinder.php @@ -6,6 +6,7 @@ use Ask\Language\Description\SomeProperty; use Ask\Language\Description\ValueDescription; use Ask\Language\Option\QueryOptions; +use InvalidArgumentException; use Wikibase\Database\QueryInterface; use Wikibase\EntityId; use Wikibase\Lib\EntityIdParser; @@ -84,7 +85,7 @@ $propertyId = $description-getPropertyId(); if ( !( $propertyId instanceof EntityId ) ) { - // TODO: Throw + throw new InvalidArgumentException( 'All property ids provided to the SQLStore should be EntityId objects' ); } $dvHandler = $this-schema-getDataValueHandler( diff --git a/QueryEngine/tests/phpunit/SQLStore/Engine/DescriptionMatchFinderTest.php b/QueryEngine/tests/phpunit/SQLStore/Engine/DescriptionMatchFinderTest.php index 77518d1..bf75e2f 100644 --- a/QueryEngine/tests/phpunit/SQLStore/Engine/DescriptionMatchFinderTest.php +++ b/QueryEngine/tests/phpunit/SQLStore/Engine/DescriptionMatchFinderTest.php @@ -6,6 +6,7 @@ use Ask\Language\Description\SomeProperty; use Ask\Language\Option\QueryOptions; use DataValues\PropertyValue; +use DataValues\StringValue; use Wikibase\Database\FieldDefinition; use Wikibase\Database\TableDefinition; use Wikibase\EntityId; @@ -117,4 +118,21 @@ $this-assertEquals( array( 10 ), $matchingInternalIds ); } + public function testFindMatchingEntitiesWithInvalidPropertyId() { + $matchFinder = new MatchFinderWithoutConstructor(); + + $description = new SomeProperty( new StringValue( 'nyan!' ), new AnyValue() ); + $queryOptions = new QueryOptions( 100, 0 ); + + $this-setExpectedException( 'InvalidArgumentException' ); + + $matchFinder-findMatchingEntities( $description, $queryOptions ); + } + +} + +class MatchFinderWithoutConstructor extends \Wikibase\QueryEngine\SQLStore\Engine\DescriptionMatchFinder { + + public function __construct(){} + } -- To view, visit https://gerrit.wikimedia.org/r/66040 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9ae68947c2c781d001702fc13881a31eaa1faa1d Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Anja Jentzsch a...@anjeve.de Gerrit-Reviewer: Ataherivand abraham.taheriv...@wikimedia.de Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: Daniel Werner daniel.wer...@wikimedia.de Gerrit-Reviewer: Denny Vrandecic denny.vrande...@wikimedia.de Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Jens Ohlig jens.oh...@wikimedia.de Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: John Erling Blad jeb...@gmail.com Gerrit-Reviewer: Lydia Pintscher lydia.pintsc...@wikimedia.de Gerrit-Reviewer: Markus Kroetzsch mar...@semantic-mediawiki.org Gerrit-Reviewer: Nikola Smolenski smole...@eunet.rs Gerrit-Reviewer: Silke Meyer silke.me...@wikimedia.de Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add setting wgLogAutopatrol to toggle logging of autopatrol ... - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Add setting wgLogAutopatrol to toggle logging of autopatrol actions .. Add setting wgLogAutopatrol to toggle logging of autopatrol actions Per bug 47415, this is needed for Wikidata and could be useful for other wikis, as well. Bug: 47415 Change-Id: Ic999454d001c38dea08746d1e8184f0163cb7330 --- M RELEASE-NOTES-1.22 M includes/DefaultSettings.php M includes/logging/PatrolLog.php 3 files changed, 12 insertions(+), 0 deletions(-) Approvals: Daniel Kinzler: Looks good to me, approved jenkins-bot: Verified diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22 index ded2cee..1591fa9 100644 --- a/RELEASE-NOTES-1.22 +++ b/RELEASE-NOTES-1.22 @@ -27,6 +27,8 @@ * $wgJsMimeType is no longer used by core. Most usage has been removed since HTML output is now exclusively HTML5. * $wgDBOracleDRCP added. True enables persistent connection with DRCP on Oracle. +* $wgLogAutopatrol added to allow disabling logging of autopatrol edits in the logging table. + default for $wgLogAutopatrol is true. === New features in 1.22 === * (bug 44525) mediawiki.jqueryMsg can now parse (whitelisted) HTML elements and attributes. diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 1b56547..b86de8c 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -5147,6 +5147,9 @@ /** Use new page patrolling to check new pages on Special:Newpages */ $wgUseNPPatrol = true; +/** Log autopatrol actions to the log table */ +$wgLogAutopatrol = true; + /** Provide syndication feeds (RSS, Atom) for, e.g., Recentchanges, Newpages */ $wgFeed = true; diff --git a/includes/logging/PatrolLog.php b/includes/logging/PatrolLog.php index 911fffc..bb76d5a 100644 --- a/includes/logging/PatrolLog.php +++ b/includes/logging/PatrolLog.php @@ -38,6 +38,13 @@ * @return bool */ public static function record( $rc, $auto = false, User $user = null ) { + global $wgLogAutopatrol; + + // do not log autopatrolled edits if setting disables it + if ( $auto !$wgLogAutopatrol ) { + return false; + } + if ( !$rc instanceof RecentChange ) { $rc = RecentChange::newFromId( $rc ); if ( !is_object( $rc ) ) { -- To view, visit https://gerrit.wikimedia.org/r/62785 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic999454d001c38dea08746d1e8184f0163cb7330 Gerrit-PatchSet: 6 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aude aude.w...@gmail.com Gerrit-Reviewer: ArielGlenn ar...@wikimedia.org Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: Demon ch...@wikimedia.org Gerrit-Reviewer: Denny Vrandecic denny.vrande...@wikimedia.de Gerrit-Reviewer: Hoo man h...@online.de Gerrit-Reviewer: Krinkle krinklem...@gmail.com Gerrit-Reviewer: Parent5446 tylerro...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Nagios/Varnish HTCP: fix illegal characters - change (operations/puppet)
Faidon has uploaded a new change for review. https://gerrit.wikimedia.org/r/66102 Change subject: Nagios/Varnish HTCP: fix illegal characters .. Nagios/Varnish HTCP: fix illegal characters Change-Id: Ie76c844a36af6876f20ba79eefdf138e33ba7d94 --- M manifests/varnish.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/02/66102/1 diff --git a/manifests/varnish.pp b/manifests/varnish.pp index 97011bf..b61d4b8 100644 --- a/manifests/varnish.pp +++ b/manifests/varnish.pp @@ -235,7 +235,7 @@ } nrpe::monitor_service { varnishhtcpd: - description = Varnish HTCP daemon (old, stopped), + description = Varnish HTCP old daemon, # was -c 1:1 when service was set to running state... nrpe_command = /usr/lib/nagios/plugins/check_procs -c 0:0 -u varnishhtcpd -a 'varnishhtcpd worker' } -- To view, visit https://gerrit.wikimedia.org/r/66102 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie76c844a36af6876f20ba79eefdf138e33ba7d94 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon fai...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Nagios/Varnish HTCP: fix illegal characters - change (operations/puppet)
Faidon has submitted this change and it was merged. Change subject: Nagios/Varnish HTCP: fix illegal characters .. Nagios/Varnish HTCP: fix illegal characters Change-Id: Ie76c844a36af6876f20ba79eefdf138e33ba7d94 --- M manifests/varnish.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Faidon: Verified; Looks good to me, approved diff --git a/manifests/varnish.pp b/manifests/varnish.pp index 97011bf..b61d4b8 100644 --- a/manifests/varnish.pp +++ b/manifests/varnish.pp @@ -235,7 +235,7 @@ } nrpe::monitor_service { varnishhtcpd: - description = Varnish HTCP daemon (old, stopped), + description = Varnish HTCP old daemon, # was -c 1:1 when service was set to running state... nrpe_command = /usr/lib/nagios/plugins/check_procs -c 0:0 -u varnishhtcpd -a 'varnishhtcpd worker' } -- To view, visit https://gerrit.wikimedia.org/r/66102 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie76c844a36af6876f20ba79eefdf138e33ba7d94 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon fai...@wikimedia.org Gerrit-Reviewer: Faidon fai...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Specify a 20 connections limit for test - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/66103 Change subject: Specify a 20 connections limit for test .. Specify a 20 connections limit for test Change-Id: I9e8fdd5d7d13d9a2408cc9091a4f25b27c52da21 --- M manifests/role/cache.pp 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/03/66103/1 diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index 9c741d6..216b7eb 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -468,6 +468,10 @@ 'probe' = varnish, }, { + 'backend_match' = ^srv193\.pmtpa\.wmnet$, + 'max_connections' = 20, + }, + { 'port' = 80, 'connect_timeout' = 5s, 'first_byte_timeout' = 30s, -- To view, visit https://gerrit.wikimedia.org/r/66103 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9e8fdd5d7d13d9a2408cc9091a4f25b27c52da21 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Switch role::cache::text to using role::cache::configuration... - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/66104 Change subject: Switch role::cache::text to using role::cache::configuration for content backends .. Switch role::cache::text to using role::cache::configuration for content backends Change-Id: I4b66f54dfaf7d0b915de62e4977d0bcfe4eb7bed --- M manifests/role/cache.pp 1 file changed, 5 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/04/66104/1 diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index 216b7eb..b5afcb5 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -288,6 +288,7 @@ 'production' = { 'apaches' = $lvs::configuration::lvs_service_ips['production']['apaches'], 'api' = $lvs::configuration::lvs_service_ips['production']['api'], + 'rendering' = $lvs::configuration::lvs_service_ips['production']['rendering'], 'bits_appservers' = { 'pmtpa' = [ srv248.pmtpa.wmnet, srv249.pmtpa.wmnet, mw60.pmtpa.wmnet, mw61.pmtpa.wmnet ], 'eqiad' = [ mw1149.eqiad.wmnet, mw1150.eqiad.wmnet, mw1151.eqiad.wmnet, mw1152.eqiad.wmnet ], @@ -384,15 +385,15 @@ $varnish_be_directors = { pmtpa = { - backend = $lvs::configuration::lvs_service_ips[$::realm]['text'][$::mw_primary]['textsvc'], + backend = $role::cache::configuration::backends[$::realm]['test_appservers'][$::mw_primary], api = $role::cache::configuration::backends[$::realm]['api'][$::mw_primary], - image_scalers = $lvs::configuration::lvs_service_ips[$::realm]['rendering'][$::mw_primary], + image_scalers = $role::cache::configuration::backends[$::realm]['rendering'][$::mw_primary], test_wikipedia = $role::cache::configuration::backends[$::realm]['test_appservers'][$::mw_primary], }, eqiad = { - backend = $lvs::configuration::lvs_service_ips[$::realm]['text'][$::mw_primary]['textsvc'], + backend = $role::cache::configuration::backends[$::realm]['test_appservers'][$::mw_primary], api = $role::cache::configuration::backends[$::realm]['api'][$::mw_primary], - image_scalers = $lvs::configuration::lvs_service_ips[$::realm]['rendering'][$::mw_primary], + image_scalers = $role::cache::configuration::backends[$::realm]['rendering'][$::mw_primary], test_wikipedia = $role::cache::configuration::backends[$::realm]['test_appservers'][$::mw_primary], }, esams = { -- To view, visit https://gerrit.wikimedia.org/r/66104 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4b66f54dfaf7d0b915de62e4977d0bcfe4eb7bed Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Specify a 20 connections limit for test - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Specify a 20 connections limit for test .. Specify a 20 connections limit for test Change-Id: I9e8fdd5d7d13d9a2408cc9091a4f25b27c52da21 --- M manifests/role/cache.pp 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index 9c741d6..216b7eb 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -468,6 +468,10 @@ 'probe' = varnish, }, { + 'backend_match' = ^srv193\.pmtpa\.wmnet$, + 'max_connections' = 20, + }, + { 'port' = 80, 'connect_timeout' = 5s, 'first_byte_timeout' = 30s, -- To view, visit https://gerrit.wikimedia.org/r/66103 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9e8fdd5d7d13d9a2408cc9091a4f25b27c52da21 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Switch role::cache::text to using role::cache::configuration... - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Switch role::cache::text to using role::cache::configuration for content backends .. Switch role::cache::text to using role::cache::configuration for content backends Change-Id: I4b66f54dfaf7d0b915de62e4977d0bcfe4eb7bed --- M manifests/role/cache.pp 1 file changed, 5 insertions(+), 4 deletions(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index 216b7eb..b5afcb5 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -288,6 +288,7 @@ 'production' = { 'apaches' = $lvs::configuration::lvs_service_ips['production']['apaches'], 'api' = $lvs::configuration::lvs_service_ips['production']['api'], + 'rendering' = $lvs::configuration::lvs_service_ips['production']['rendering'], 'bits_appservers' = { 'pmtpa' = [ srv248.pmtpa.wmnet, srv249.pmtpa.wmnet, mw60.pmtpa.wmnet, mw61.pmtpa.wmnet ], 'eqiad' = [ mw1149.eqiad.wmnet, mw1150.eqiad.wmnet, mw1151.eqiad.wmnet, mw1152.eqiad.wmnet ], @@ -384,15 +385,15 @@ $varnish_be_directors = { pmtpa = { - backend = $lvs::configuration::lvs_service_ips[$::realm]['text'][$::mw_primary]['textsvc'], + backend = $role::cache::configuration::backends[$::realm]['test_appservers'][$::mw_primary], api = $role::cache::configuration::backends[$::realm]['api'][$::mw_primary], - image_scalers = $lvs::configuration::lvs_service_ips[$::realm]['rendering'][$::mw_primary], + image_scalers = $role::cache::configuration::backends[$::realm]['rendering'][$::mw_primary], test_wikipedia = $role::cache::configuration::backends[$::realm]['test_appservers'][$::mw_primary], }, eqiad = { - backend = $lvs::configuration::lvs_service_ips[$::realm]['text'][$::mw_primary]['textsvc'], + backend = $role::cache::configuration::backends[$::realm]['test_appservers'][$::mw_primary], api = $role::cache::configuration::backends[$::realm]['api'][$::mw_primary], - image_scalers = $lvs::configuration::lvs_service_ips[$::realm]['rendering'][$::mw_primary], + image_scalers = $role::cache::configuration::backends[$::realm]['rendering'][$::mw_primary], test_wikipedia = $role::cache::configuration::backends[$::realm]['test_appservers'][$::mw_primary], }, esams = { -- To view, visit https://gerrit.wikimedia.org/r/66104 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4b66f54dfaf7d0b915de62e4977d0bcfe4eb7bed Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make role::cache::upload use role::cache::configuration for ... - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Make role::cache::upload use role::cache::configuration for image scaler backends .. Make role::cache::upload use role::cache::configuration for image scaler backends Change-Id: I23c49b9cdb2b82ba8f92b152de1b7b3ad937b671 --- M manifests/role/cache.pp 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index b5afcb5..6697178 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -551,11 +551,11 @@ $varnish_be_directors = { pmtpa = { backend = $lvs::configuration::lvs_service_ips[$::realm]['upload']['pmtpa']['uploadsvc'], - image_scalers = $lvs::configuration::lvs_service_ips[$::realm]['rendering'][$::mw_primary], + image_scalers = $role::cache::configuration::backends[$::realm]['rendering'][$::mw_primary], }, eqiad = { backend = $lvs::configuration::lvs_service_ips[$::realm]['swift']['pmtpa'], - image_scalers = $lvs::configuration::lvs_service_ips[$::realm]['rendering'][$::mw_primary], + image_scalers = $role::cache::configuration::backends[$::realm]['rendering'][$::mw_primary], }, esams = { backend = $lvs::configuration::lvs_service_ips[$::realm]['upload']['eqiad']['uploadlb'], -- To view, visit https://gerrit.wikimedia.org/r/66105 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I23c49b9cdb2b82ba8f92b152de1b7b3ad937b671 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Set Index and Page as canonical names for Index and Page... - change (mediawiki...ProofreadPage)
Tpt has uploaded a new change for review. https://gerrit.wikimedia.org/r/66106 Change subject: Set Index and Page as canonical names for Index and Page namespaces. .. Set Index and Page as canonical names for Index and Page namespaces. Change-Id: Ie0800246e7b995ec4f3e9d19b0f6705fb72afa1c --- M ProofreadPage.body.php M ProofreadPage.php M includes/ProofreadPageInit.php 3 files changed, 13 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ProofreadPage refs/changes/06/66106/1 diff --git a/ProofreadPage.body.php b/ProofreadPage.body.php index 4d37b7f..b2f3e85 100644 --- a/ProofreadPage.body.php +++ b/ProofreadPage.body.php @@ -1823,4 +1823,16 @@ } return true; } + + + /** +* Adds canonical namespaces. +*/ + public static function addCanonicalNamespaces( $list ) { + $list[self::getPageNamespaceId()] = 'Page'; + $list[self::getPageNamespaceId() + 1] = 'Page_talk'; + $list[self::getIndexNamespaceId()] = 'Index'; + $list[self::getIndexNamespaceId() + 1] = 'Index_talk'; + return true; + } } diff --git a/ProofreadPage.php b/ProofreadPage.php index e066366..e2790a2 100644 --- a/ProofreadPage.php +++ b/ProofreadPage.php @@ -150,6 +150,7 @@ $wgHooks['GetPreferences'][] = 'ProofreadPage::onGetPreferences'; $wgHooks['LinksUpdateConstructed'][] = 'ProofreadPage::onLinksUpdateConstructed'; $wgHooks['CustomEditor'][] = 'ProofreadPage::onCustomEditor'; +$wgHooks['CanonicalNamespaces'][] = 'ProofreadPage::addCanonicalNamespaces'; //inclusion of i18n file. $wgExtensionMessagesFiles[] doesn't works diff --git a/includes/ProofreadPageInit.php b/includes/ProofreadPageInit.php index 40beed8..7ea37fa 100644 --- a/includes/ProofreadPageInit.php +++ b/includes/ProofreadPageInit.php @@ -105,8 +105,6 @@ $wgExtraNamespaces[$id + 1] = self::getNamespaceName( $key . '_talk' ); $wgCanonicalNamespaceNames[$id] = $wgExtraNamespaces[$id]; //Very hugly but needed because initNamespaces() is called after the add of $wgExtraNamespaces into $wgCanonicalNamespaceNames $wgCanonicalNamespaceNames[$id + 1] = $wgExtraNamespaces[$id + 1]; - $wgNamespaceAliases[$id] = self::getNamespaceName( $key, 'en' ); - $wgNamespaceAliases[$id + 1] = self::getNamespaceName( $key . '_talk', 'en' ); return true; } -- To view, visit https://gerrit.wikimedia.org/r/66106 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie0800246e7b995ec4f3e9d19b0f6705fb72afa1c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ProofreadPage Gerrit-Branch: master Gerrit-Owner: Tpt thoma...@hotmail.fr Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Switch tier 2 (esams) upload backends to use chash when talk... - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/66107 Change subject: Switch tier 2 (esams) upload backends to use chash when talking upstream .. Switch tier 2 (esams) upload backends to use chash when talking upstream Change-Id: I56d5d3e006876254e6d9c5be94c5435c5b016daa --- M manifests/role/cache.pp 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/07/66107/1 diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index 6697178..26e35f2 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -614,7 +614,10 @@ default = -s main-sda3=persistent,/srv/sda3/varnish.persist,${storage_size_main}G -s main-sdb3=persistent,/srv/sdb3/varnish.persist,${storage_size_main}G -s bigobj-sda3=file,/srv/sda3/large-objects.persist,${storage_size_bigobj}G -s bigobj-sdb3=file,/srv/sdb3/large-objects.persist,${storage_size_bigobj}G, }, directors = $varnish_be_directors[$::site], - director_type = random, + director_type = $cluster_tier ? { + 1 = 'random', + default = 'chash', + }, vcl_config = { 'retry5xx' = 0, 'cache4xx' = 1m, -- To view, visit https://gerrit.wikimedia.org/r/66107 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I56d5d3e006876254e6d9c5be94c5435c5b016daa Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Switch tier 2 (esams) upload backends to use chash when talk... - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Switch tier 2 (esams) upload backends to use chash when talking upstream .. Switch tier 2 (esams) upload backends to use chash when talking upstream Change-Id: I56d5d3e006876254e6d9c5be94c5435c5b016daa --- M manifests/role/cache.pp 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index 6697178..26e35f2 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -614,7 +614,10 @@ default = -s main-sda3=persistent,/srv/sda3/varnish.persist,${storage_size_main}G -s main-sdb3=persistent,/srv/sdb3/varnish.persist,${storage_size_main}G -s bigobj-sda3=file,/srv/sda3/large-objects.persist,${storage_size_bigobj}G -s bigobj-sdb3=file,/srv/sdb3/large-objects.persist,${storage_size_bigobj}G, }, directors = $varnish_be_directors[$::site], - director_type = random, + director_type = $cluster_tier ? { + 1 = 'random', + default = 'chash', + }, vcl_config = { 'retry5xx' = 0, 'cache4xx' = 1m, -- To view, visit https://gerrit.wikimedia.org/r/66107 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I56d5d3e006876254e6d9c5be94c5435c5b016daa Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add servicegroups DB to ldaplist - change (operations/puppet)
coren has uploaded a new change for review. https://gerrit.wikimedia.org/r/66108 Change subject: Add servicegroups DB to ldaplist .. Add servicegroups DB to ldaplist (Complication added by having hit the index-entry-limit on global searches). To note that this is a workaround, we /will/ hit that limit again eventually. Change-Id: I01f5177ae789d8172c290d892e3116803b8e2a77 --- M files/ldap/scripts/ldaplist 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/08/66108/1 diff --git a/files/ldap/scripts/ldaplist b/files/ldap/scripts/ldaplist index a4fef92..666c0a1 100755 --- a/files/ldap/scripts/ldaplist +++ b/files/ldap/scripts/ldaplist @@ -36,9 +36,9 @@ base = ldapSupportLib.getBase() - objectbasedns = {base:base, passwd:ou=people,+base, group:ou=groups,+base, netgroup:ou=netgroup,+base, hosts:ou=hosts,+base, automount:base, auto_*:nisMapName=auto_AUTO,+base, uids:ou=uids,+base} - objectdefaulttypes = {base:none, passwd:uid, group:cn, netgroup:cn, hosts:cn, automount:nisMapName, auto_*:cn, uids:cn} - objectobjectclasses = {base:none, passwd:posixaccount, group:posixgroup, netgroup:nisNetGroup, hosts:iphost, automount:nisMap, auto_*:nisObject, uids:inetOrgPerson} + objectbasedns = {base:base, passwd:ou=people,+base, group:ou=groups,+base, netgroup:ou=netgroup,+base, hosts:ou=hosts,+base, automount:base, auto_*:nisMapName=auto_AUTO,+base, uids:ou=uids,+base, servicegroups:ou=projects,+base} + objectdefaulttypes = {base:none, passwd:uid, group:cn, netgroup:cn, hosts:cn, automount:nisMapName, auto_*:cn, uids:cn, servicegroups:cn} + objectobjectclasses = {base:none, passwd:posixaccount, group:posixgroup, netgroup:nisNetGroup, hosts:iphost, automount:nisMap, auto_*:nisObject, uids:inetOrgPerson, servicegroups:posixgroup} if options.showdatabase: showdatabase(objectbasedns, args) -- To view, visit https://gerrit.wikimedia.org/r/66108 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I01f5177ae789d8172c290d892e3116803b8e2a77 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: coren mpellet...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use the appserver cluster as default backend - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/66109 Change subject: Use the appserver cluster as default backend .. Use the appserver cluster as default backend Change-Id: Ie0500759dfbf94436c535bad57e02f0813dc524d --- M manifests/role/cache.pp 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/09/66109/1 diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index 26e35f2..528b18c 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -385,13 +385,13 @@ $varnish_be_directors = { pmtpa = { - backend = $role::cache::configuration::backends[$::realm]['test_appservers'][$::mw_primary], + backend = $role::cache::configuration::backends[$::realm]['appservers'][$::mw_primary], api = $role::cache::configuration::backends[$::realm]['api'][$::mw_primary], image_scalers = $role::cache::configuration::backends[$::realm]['rendering'][$::mw_primary], test_wikipedia = $role::cache::configuration::backends[$::realm]['test_appservers'][$::mw_primary], }, eqiad = { - backend = $role::cache::configuration::backends[$::realm]['test_appservers'][$::mw_primary], + backend = $role::cache::configuration::backends[$::realm]['appservers'][$::mw_primary], api = $role::cache::configuration::backends[$::realm]['api'][$::mw_primary], image_scalers = $role::cache::configuration::backends[$::realm]['rendering'][$::mw_primary], test_wikipedia = $role::cache::configuration::backends[$::realm]['test_appservers'][$::mw_primary], -- To view, visit https://gerrit.wikimedia.org/r/66109 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie0500759dfbf94436c535bad57e02f0813dc524d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rename the 'apaches' backend to 'appservers' - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Rename the 'apaches' backend to 'appservers' .. Rename the 'apaches' backend to 'appservers' Change-Id: I1c12f44db7935537f683a7f02fca5840f4273dc3 --- M manifests/role/cache.pp 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index 528b18c..66a0a5d 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -286,7 +286,7 @@ $backends = { 'production' = { - 'apaches' = $lvs::configuration::lvs_service_ips['production']['apaches'], + 'appservers' = $lvs::configuration::lvs_service_ips['production']['apaches'], 'api' = $lvs::configuration::lvs_service_ips['production']['api'], 'rendering' = $lvs::configuration::lvs_service_ips['production']['rendering'], 'bits_appservers' = { @@ -299,7 +299,7 @@ }, }, 'labs' = { - 'apaches' = { + 'appservers' = { 'pmtpa' = [ '10.4.0.166', # deployment-apache32 '10.4.0.187', # deployment-apache33 @@ -854,7 +854,7 @@ 'labs' = '-s vdb=persistent,/srv/vdb/varnish.persist,19G', }, directors = { - backend = $role::cache::configuration::backends[$::realm]['apaches'][$::mw_primary], + backend = $role::cache::configuration::backends[$::realm]['appservers'][$::mw_primary], api = $role::cache::configuration::backends[$::realm]['api'][$::mw_primary], test_wikipedia = $role::cache::configuration::backends[$::realm]['test_appservers'][$::mw_primary], }, -- To view, visit https://gerrit.wikimedia.org/r/66110 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1c12f44db7935537f683a7f02fca5840f4273dc3 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rename the 'apaches' backend to 'appservers' - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/66110 Change subject: Rename the 'apaches' backend to 'appservers' .. Rename the 'apaches' backend to 'appservers' Change-Id: I1c12f44db7935537f683a7f02fca5840f4273dc3 --- M manifests/role/cache.pp 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/10/66110/1 diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index 528b18c..66a0a5d 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -286,7 +286,7 @@ $backends = { 'production' = { - 'apaches' = $lvs::configuration::lvs_service_ips['production']['apaches'], + 'appservers' = $lvs::configuration::lvs_service_ips['production']['apaches'], 'api' = $lvs::configuration::lvs_service_ips['production']['api'], 'rendering' = $lvs::configuration::lvs_service_ips['production']['rendering'], 'bits_appservers' = { @@ -299,7 +299,7 @@ }, }, 'labs' = { - 'apaches' = { + 'appservers' = { 'pmtpa' = [ '10.4.0.166', # deployment-apache32 '10.4.0.187', # deployment-apache33 @@ -854,7 +854,7 @@ 'labs' = '-s vdb=persistent,/srv/vdb/varnish.persist,19G', }, directors = { - backend = $role::cache::configuration::backends[$::realm]['apaches'][$::mw_primary], + backend = $role::cache::configuration::backends[$::realm]['appservers'][$::mw_primary], api = $role::cache::configuration::backends[$::realm]['api'][$::mw_primary], test_wikipedia = $role::cache::configuration::backends[$::realm]['test_appservers'][$::mw_primary], }, -- To view, visit https://gerrit.wikimedia.org/r/66110 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1c12f44db7935537f683a7f02fca5840f4273dc3 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use the appserver cluster as default backend - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Use the appserver cluster as default backend .. Use the appserver cluster as default backend Change-Id: Ie0500759dfbf94436c535bad57e02f0813dc524d --- M manifests/role/cache.pp 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index 26e35f2..528b18c 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -385,13 +385,13 @@ $varnish_be_directors = { pmtpa = { - backend = $role::cache::configuration::backends[$::realm]['test_appservers'][$::mw_primary], + backend = $role::cache::configuration::backends[$::realm]['appservers'][$::mw_primary], api = $role::cache::configuration::backends[$::realm]['api'][$::mw_primary], image_scalers = $role::cache::configuration::backends[$::realm]['rendering'][$::mw_primary], test_wikipedia = $role::cache::configuration::backends[$::realm]['test_appservers'][$::mw_primary], }, eqiad = { - backend = $role::cache::configuration::backends[$::realm]['test_appservers'][$::mw_primary], + backend = $role::cache::configuration::backends[$::realm]['appservers'][$::mw_primary], api = $role::cache::configuration::backends[$::realm]['api'][$::mw_primary], image_scalers = $role::cache::configuration::backends[$::realm]['rendering'][$::mw_primary], test_wikipedia = $role::cache::configuration::backends[$::realm]['test_appservers'][$::mw_primary], -- To view, visit https://gerrit.wikimedia.org/r/66109 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie0500759dfbf94436c535bad57e02f0813dc524d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Varnish: rename image_scalers to rendering - change (operations/puppet)
Faidon has uploaded a new change for review. https://gerrit.wikimedia.org/r/66111 Change subject: Varnish: rename image_scalers to rendering .. Varnish: rename image_scalers to rendering Let's be consistent. Change-Id: I0a4c6a7087bde58f2a06783e191993bf2dd7f867 --- M manifests/role/cache.pp M templates/varnish/upload-backend.inc.vcl.erb 2 files changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/11/66111/1 diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index 66a0a5d..8c9ff20 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -387,13 +387,13 @@ pmtpa = { backend = $role::cache::configuration::backends[$::realm]['appservers'][$::mw_primary], api = $role::cache::configuration::backends[$::realm]['api'][$::mw_primary], - image_scalers = $role::cache::configuration::backends[$::realm]['rendering'][$::mw_primary], + rendering = $role::cache::configuration::backends[$::realm]['rendering'][$::mw_primary], test_wikipedia = $role::cache::configuration::backends[$::realm]['test_appservers'][$::mw_primary], }, eqiad = { backend = $role::cache::configuration::backends[$::realm]['appservers'][$::mw_primary], api = $role::cache::configuration::backends[$::realm]['api'][$::mw_primary], - image_scalers = $role::cache::configuration::backends[$::realm]['rendering'][$::mw_primary], + rendering = $role::cache::configuration::backends[$::realm]['rendering'][$::mw_primary], test_wikipedia = $role::cache::configuration::backends[$::realm]['test_appservers'][$::mw_primary], }, esams = { @@ -551,11 +551,11 @@ $varnish_be_directors = { pmtpa = { backend = $lvs::configuration::lvs_service_ips[$::realm]['upload']['pmtpa']['uploadsvc'], - image_scalers = $role::cache::configuration::backends[$::realm]['rendering'][$::mw_primary], + rendering = $role::cache::configuration::backends[$::realm]['rendering'][$::mw_primary], }, eqiad = { backend = $lvs::configuration::lvs_service_ips[$::realm]['swift']['pmtpa'], - image_scalers = $role::cache::configuration::backends[$::realm]['rendering'][$::mw_primary], + rendering = $role::cache::configuration::backends[$::realm]['rendering'][$::mw_primary], }, esams = { backend = $lvs::configuration::lvs_service_ips[$::realm]['upload']['eqiad']['uploadlb'], diff --git a/templates/varnish/upload-backend.inc.vcl.erb b/templates/varnish/upload-backend.inc.vcl.erb index 72b464e..13b8dbc 100644 --- a/templates/varnish/upload-backend.inc.vcl.erb +++ b/templates/varnish/upload-backend.inc.vcl.erb @@ -53,7 +53,7 @@ } } else { - if (req.backend == image_scalers req.url ~ ^/[^-/]+/[^/]+/thumb/(.+)$) { + if (req.backend == rendering req.url ~ ^/[^-/]+/[^/]+/thumb/(.+)$) { set bereq.url = regsub(req.url, ^/[^-/]+/[^/]+/thumb/(.+)$, /w/thumb_handler.php/\1); set bereq.http.host = regsub(req.url, ^/([^-/]+)/([^/]+)/thumb/.+$, \2.\1.org); set bereq.http.X-Original-URI = req.url; @@ -68,7 +68,7 @@ sub check_thumb_404 { if (beresp.status == 404 bereq.url ~ ^/swift/v1/[^-/]+-[^-/]+-local-thumb) { - set req.backend = image_scalers; + set req.backend = rendering; return (restart); } } -- To view, visit https://gerrit.wikimedia.org/r/66111 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0a4c6a7087bde58f2a06783e191993bf2dd7f867 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon fai...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rename the 'image_scalers' Varnish backend to 'rendering' - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/66112 Change subject: Rename the 'image_scalers' Varnish backend to 'rendering' .. Rename the 'image_scalers' Varnish backend to 'rendering' Change-Id: If47a1e5e2f621ec5d68feceb41a375dc195c3d95 --- M manifests/role/cache.pp M templates/varnish/upload-backend.inc.vcl.erb 2 files changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/12/66112/1 diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index 66a0a5d..8c9ff20 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -387,13 +387,13 @@ pmtpa = { backend = $role::cache::configuration::backends[$::realm]['appservers'][$::mw_primary], api = $role::cache::configuration::backends[$::realm]['api'][$::mw_primary], - image_scalers = $role::cache::configuration::backends[$::realm]['rendering'][$::mw_primary], + rendering = $role::cache::configuration::backends[$::realm]['rendering'][$::mw_primary], test_wikipedia = $role::cache::configuration::backends[$::realm]['test_appservers'][$::mw_primary], }, eqiad = { backend = $role::cache::configuration::backends[$::realm]['appservers'][$::mw_primary], api = $role::cache::configuration::backends[$::realm]['api'][$::mw_primary], - image_scalers = $role::cache::configuration::backends[$::realm]['rendering'][$::mw_primary], + rendering = $role::cache::configuration::backends[$::realm]['rendering'][$::mw_primary], test_wikipedia = $role::cache::configuration::backends[$::realm]['test_appservers'][$::mw_primary], }, esams = { @@ -551,11 +551,11 @@ $varnish_be_directors = { pmtpa = { backend = $lvs::configuration::lvs_service_ips[$::realm]['upload']['pmtpa']['uploadsvc'], - image_scalers = $role::cache::configuration::backends[$::realm]['rendering'][$::mw_primary], + rendering = $role::cache::configuration::backends[$::realm]['rendering'][$::mw_primary], }, eqiad = { backend = $lvs::configuration::lvs_service_ips[$::realm]['swift']['pmtpa'], - image_scalers = $role::cache::configuration::backends[$::realm]['rendering'][$::mw_primary], + rendering = $role::cache::configuration::backends[$::realm]['rendering'][$::mw_primary], }, esams = { backend = $lvs::configuration::lvs_service_ips[$::realm]['upload']['eqiad']['uploadlb'], diff --git a/templates/varnish/upload-backend.inc.vcl.erb b/templates/varnish/upload-backend.inc.vcl.erb index 72b464e..13b8dbc 100644 --- a/templates/varnish/upload-backend.inc.vcl.erb +++ b/templates/varnish/upload-backend.inc.vcl.erb @@ -53,7 +53,7 @@ } } else { - if (req.backend == image_scalers req.url ~ ^/[^-/]+/[^/]+/thumb/(.+)$) { + if (req.backend == rendering req.url ~ ^/[^-/]+/[^/]+/thumb/(.+)$) { set bereq.url = regsub(req.url, ^/[^-/]+/[^/]+/thumb/(.+)$, /w/thumb_handler.php/\1); set bereq.http.host = regsub(req.url, ^/([^-/]+)/([^/]+)/thumb/.+$, \2.\1.org); set bereq.http.X-Original-URI = req.url; @@ -68,7 +68,7 @@ sub check_thumb_404 { if (beresp.status == 404 bereq.url ~ ^/swift/v1/[^-/]+-[^-/]+-local-thumb) { - set req.backend = image_scalers; + set req.backend = rendering; return (restart); } } -- To view, visit https://gerrit.wikimedia.org/r/66112 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If47a1e5e2f621ec5d68feceb41a375dc195c3d95 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Varnish: rename image_scalers to rendering - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Varnish: rename image_scalers to rendering .. Varnish: rename image_scalers to rendering Let's be consistent. Change-Id: I0a4c6a7087bde58f2a06783e191993bf2dd7f867 --- M manifests/role/cache.pp M templates/varnish/upload-backend.inc.vcl.erb 2 files changed, 6 insertions(+), 6 deletions(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index 66a0a5d..8c9ff20 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -387,13 +387,13 @@ pmtpa = { backend = $role::cache::configuration::backends[$::realm]['appservers'][$::mw_primary], api = $role::cache::configuration::backends[$::realm]['api'][$::mw_primary], - image_scalers = $role::cache::configuration::backends[$::realm]['rendering'][$::mw_primary], + rendering = $role::cache::configuration::backends[$::realm]['rendering'][$::mw_primary], test_wikipedia = $role::cache::configuration::backends[$::realm]['test_appservers'][$::mw_primary], }, eqiad = { backend = $role::cache::configuration::backends[$::realm]['appservers'][$::mw_primary], api = $role::cache::configuration::backends[$::realm]['api'][$::mw_primary], - image_scalers = $role::cache::configuration::backends[$::realm]['rendering'][$::mw_primary], + rendering = $role::cache::configuration::backends[$::realm]['rendering'][$::mw_primary], test_wikipedia = $role::cache::configuration::backends[$::realm]['test_appservers'][$::mw_primary], }, esams = { @@ -551,11 +551,11 @@ $varnish_be_directors = { pmtpa = { backend = $lvs::configuration::lvs_service_ips[$::realm]['upload']['pmtpa']['uploadsvc'], - image_scalers = $role::cache::configuration::backends[$::realm]['rendering'][$::mw_primary], + rendering = $role::cache::configuration::backends[$::realm]['rendering'][$::mw_primary], }, eqiad = { backend = $lvs::configuration::lvs_service_ips[$::realm]['swift']['pmtpa'], - image_scalers = $role::cache::configuration::backends[$::realm]['rendering'][$::mw_primary], + rendering = $role::cache::configuration::backends[$::realm]['rendering'][$::mw_primary], }, esams = { backend = $lvs::configuration::lvs_service_ips[$::realm]['upload']['eqiad']['uploadlb'], diff --git a/templates/varnish/upload-backend.inc.vcl.erb b/templates/varnish/upload-backend.inc.vcl.erb index 72b464e..13b8dbc 100644 --- a/templates/varnish/upload-backend.inc.vcl.erb +++ b/templates/varnish/upload-backend.inc.vcl.erb @@ -53,7 +53,7 @@ } } else { - if (req.backend == image_scalers req.url ~ ^/[^-/]+/[^/]+/thumb/(.+)$) { + if (req.backend == rendering req.url ~ ^/[^-/]+/[^/]+/thumb/(.+)$) { set bereq.url = regsub(req.url, ^/[^-/]+/[^/]+/thumb/(.+)$, /w/thumb_handler.php/\1); set bereq.http.host = regsub(req.url, ^/([^-/]+)/([^/]+)/thumb/.+$, \2.\1.org); set bereq.http.X-Original-URI = req.url; @@ -68,7 +68,7 @@ sub check_thumb_404 { if (beresp.status == 404 bereq.url ~ ^/swift/v1/[^-/]+-[^-/]+-local-thumb) { - set req.backend = image_scalers; + set req.backend = rendering; return (restart); } } -- To view, visit https://gerrit.wikimedia.org/r/66111 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0a4c6a7087bde58f2a06783e191993bf2dd7f867 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon fai...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use the rendering backend for the thumb handler - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/66113 Change subject: Use the rendering backend for the thumb handler .. Use the rendering backend for the thumb handler Change-Id: I619fcd80b9771d371347f57489217bd34a0e4360 --- M templates/varnish/text-backend.inc.vcl.erb 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/13/66113/1 diff --git a/templates/varnish/text-backend.inc.vcl.erb b/templates/varnish/text-backend.inc.vcl.erb index faa63a0..0b1a9d9 100644 --- a/templates/varnish/text-backend.inc.vcl.erb +++ b/templates/varnish/text-backend.inc.vcl.erb @@ -13,6 +13,8 @@ } if (req.url ~ ^/w/api.php) { set req.backend = api; + } else if (req.url ~ ^/w/thumb(_handler)?\.php) { + set req.backend = rendering; } % else -% set req.backend = eqiad; -- To view, visit https://gerrit.wikimedia.org/r/66113 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I619fcd80b9771d371347f57489217bd34a0e4360 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use the rendering backend for the thumb handler - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Use the rendering backend for the thumb handler .. Use the rendering backend for the thumb handler Change-Id: I619fcd80b9771d371347f57489217bd34a0e4360 --- M templates/varnish/text-backend.inc.vcl.erb 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified diff --git a/templates/varnish/text-backend.inc.vcl.erb b/templates/varnish/text-backend.inc.vcl.erb index faa63a0..2ffd599 100644 --- a/templates/varnish/text-backend.inc.vcl.erb +++ b/templates/varnish/text-backend.inc.vcl.erb @@ -11,8 +11,10 @@ set req.backend = test_wikipedia; return (pass); } - if (req.url ~ ^/w/api.php) { + if (req.url ~ ^/w/api\.php) { set req.backend = api; + } else if (req.url ~ ^/w/thumb(_handler)?\.php) { + set req.backend = rendering; } % else -% set req.backend = eqiad; -- To view, visit https://gerrit.wikimedia.org/r/66113 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I619fcd80b9771d371347f57489217bd34a0e4360 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable SecurePoll on testwiki - change (operations/mediawiki-config)
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/66114 Change subject: Enable SecurePoll on testwiki .. Enable SecurePoll on testwiki Change-Id: I2fac367408945b8bec4d1ae665201b707098a197 --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/14/66114/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 5e4c951..d647f0e 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -12541,6 +12541,7 @@ 'default' = false, 'enwiki' = true, 'metawiki' = true, + 'testwiki' = true, ), 'wmgUseGlobalAbuseFilters' = array( -- To view, visit https://gerrit.wikimedia.org/r/66114 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2fac367408945b8bec4d1ae665201b707098a197 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Reedy re...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Trigger on fewer other session/token cookies - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/66115 Change subject: Trigger on fewer other session/token cookies .. Trigger on fewer other session/token cookies Change-Id: I32f7811a0fbaae74a363cc7bc144e24817bbecd1 --- M templates/varnish/text-frontend.inc.vcl.erb 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/15/66115/1 diff --git a/templates/varnish/text-frontend.inc.vcl.erb b/templates/varnish/text-frontend.inc.vcl.erb index e8d2022..5ce6162 100644 --- a/templates/varnish/text-frontend.inc.vcl.erb +++ b/templates/varnish/text-frontend.inc.vcl.erb @@ -17,7 +17,7 @@ } sub cookie_munging { - if (req.http.Cookie ~ ([sS]ession|Token)) { + if (req.http.Cookie ~ ([sS]ession|Token)=) { return(pass); } -- To view, visit https://gerrit.wikimedia.org/r/66115 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I32f7811a0fbaae74a363cc7bc144e24817bbecd1 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits