[MediaWiki-commits] [Gerrit] SMW\SubobjectTest additional tests - change (mediawiki...SemanticMediaWiki)
Mwjames has uploaded a new change for review. https://gerrit.wikimedia.org/r/51829 Change subject: SMW\SubobjectTest additional tests .. SMW\SubobjectTest additional tests Change-Id: I6cfc6e4e88a907343deafb38545c73631795f807 --- M includes/parserhooks/Subobject.php M tests/phpunit/includes/parserhooks/SubobjectTest.php 2 files changed, 104 insertions(+), 35 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticMediaWiki refs/changes/29/51829/1 diff --git a/includes/parserhooks/Subobject.php b/includes/parserhooks/Subobject.php index 75c4b66..7c3f1fe 100644 --- a/includes/parserhooks/Subobject.php +++ b/includes/parserhooks/Subobject.php @@ -168,8 +168,8 @@ * @param string $valueString */ public function addPropertyValue( $propertyName, $valueString ) { - if ( $this->semanticData === array() ) { - throw new MWException( 'The subject container is not initialized' ); + if ( !( $this->semanticData instanceof SMWContainerSemanticData ) ) { + throw new MWException( 'The semantic container is not initialized' ); } $propertyDv = SMWPropertyValue::makeUserProperty( $propertyName ); diff --git a/tests/phpunit/includes/parserhooks/SubobjectTest.php b/tests/phpunit/includes/parserhooks/SubobjectTest.php index 0b63531..470d20b 100644 --- a/tests/phpunit/includes/parserhooks/SubobjectTest.php +++ b/tests/phpunit/includes/parserhooks/SubobjectTest.php @@ -1,7 +1,11 @@ 'Foo' , 'identifier' => 'Bar', 'property' => 'Foo' , 'value' => 'bar' ), + // Expected results + array( 'name' => 'Bar', 'errors' => 0, 'id' => '_', 'label' => 'Foo', 'DBkey' => 'Bar' ,'type' => 9 ) + ), + + array( + array( 'subject' => 'Foo' , 'identifier' => 'bar', 'property' => 'FooBar' , 'value' => 'bar Foo' ), + array( 'name' => 'bar', 'errors' => 0, 'id' => '_', 'label' => 'FooBar', 'DBkey' => 'Bar_Foo' ,'type' => 9 ) + ), + + array( + array( 'subject' => 'Bar' , 'identifier' => 'foo', 'property' => 9001 , 'value' => 1001 ), + array( 'name' => 'foo', 'errors' => 0, 'id' => '_', 'label' => 9001, 'DBkey' => 1001 ,'type' => 9 ) + ), + ); + } + + /** * Helper method to get title object * */ - private function getSubject( $name ){ - $title = \Title::newFromText( $name ); - return \SMWDIWikiPage::newFromTitle( $title ); + private function getSubject( $name = '' ){ + if ( $name ) { + $title = Title::newFromText( $name ); + return SMWDIWikiPage::newFromTitle( $title ); + } + return ''; } /** * Helper method to get subobject * */ - private function setSubobject( $subject, $name ){ + private function setSubobject( $subject, $name = '' ){ return new Subobject( $this->getSubject( $subject ), $name ); } /** -* Test instance +* Test constructor * +* @dataProvider getDataProvider */ - public function testInstance() { - $subject = $this->getSubject( 'Foo' ); + public function testConstructor( array $test ) { + $subject = $this->getSubject( $test['subject'] ); $instance = new Subobject( $subject ); $this->assertInstanceOf( 'SMW\Subobject', $instance ); @@ -66,64 +100,99 @@ /** * Test setSemanticData() * +* @dataProvider getDataProvider */ - public function testSetSemanticData() { - $subject = $this->getSubject( 'Foo' ); + public function testSetSemanticData( array $test ) { + $subject = $this->getSubject( $test['subject'] ); $subobject = new Subobject( $subject ); - $instance = $subobject->setSemanticData( 'Bar' ); + $instance = $subobject->setSemanticData( $test['identifier'] ); $this->assertInstanceOf( '\SMWContainerSemanticData', $instance ); } /** * Test getName() * +* @dataProvider getDataProvider */ - public function testGetName() { - $subobject = $this->setSubobject( 'Foo' , 'Bar' ); - - $name = $subobject->getName(); - $this->assertEquals( $name, 'Bar' ); + public function testGetName( array $test, array $expected ) { + $subobject = $this->setSubobject( $test['subject'] , $test['id
[MediaWiki-commits] [Gerrit] Prevent useless jobs from being added to mw.loader queue. - change (mediawiki/core)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/51828 Change subject: Prevent useless jobs from being added to mw.loader queue. .. Prevent useless jobs from being added to mw.loader queue. * load was calling request with ready and error being null. * request was doing a strict check against undefined to prevent adding jobs with no callbacks to the queue. * Since these were null rather than undefined, the empty jobs got added anyway. Now using undefined instead. * Also, mark ready and error as optional in the request JS documentation. Change-Id: I6428e733899f7c484f842f6fe142c8d4d49ee443 --- M resources/mediawiki/mediawiki.js 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/28/51828/1 diff --git a/resources/mediawiki/mediawiki.js b/resources/mediawiki/mediawiki.js index b5b42e1..1212fd4 100644 --- a/resources/mediawiki/mediawiki.js +++ b/resources/mediawiki/mediawiki.js @@ -970,8 +970,8 @@ * * @private * @param {string|string[]} dependencies Module name or array of string module names -* @param {Function} ready Callback to execute when all dependencies are ready -* @param {Function} error Callback to execute when any dependency fails +* @param {Function} [ready] Callback to execute when all dependencies are ready +* @param {Function} [error] Callback to execute when any dependency fails * @param {boolean} [async] If true, load modules asynchronously even if * document ready has not yet occurred. */ @@ -1447,7 +1447,7 @@ return; } // Since some modules are not yet ready, queue up a request. - request( filtered, null, null, async ); + request( filtered, undefined, undefined, async ); }, /** -- To view, visit https://gerrit.wikimedia.org/r/51828 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6428e733899f7c484f842f6fe142c8d4d49ee443 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Mattflaschen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (Bug 45607) Add a hook to make it possible to reorder the li... - change (mediawiki/core)
John Erling Blad has uploaded a new change for review. https://gerrit.wikimedia.org/r/51827 Change subject: (Bug 45607) Add a hook to make it possible to reorder the list of special pages .. (Bug 45607) Add a hook to make it possible to reorder the list of special pages Change-Id: I0e37563a3b7e9fe6683d386b562b50a5404dc9a8 --- M includes/specials/SpecialSpecialpages.php 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/27/51827/1 diff --git a/includes/specials/SpecialSpecialpages.php b/includes/specials/SpecialSpecialpages.php index d80218f..c37fbdb 100644 --- a/includes/specials/SpecialSpecialpages.php +++ b/includes/specials/SpecialSpecialpages.php @@ -81,6 +81,9 @@ } } + /** Hook for reordering the list of special pages */ + wfRunHooks( 'SpecialPage_reorderPages', array( &$groups ) ); + /** Always move "other" to end */ if( array_key_exists( 'other', $groups ) ) { $other = $groups['other']; -- To view, visit https://gerrit.wikimedia.org/r/51827 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0e37563a3b7e9fe6683d386b562b50a5404dc9a8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: John Erling Blad ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (Bug 45607) Add a callback for the hook for reordering of sp... - change (mediawiki...Wikibase)
John Erling Blad has uploaded a new change for review. https://gerrit.wikimedia.org/r/51826 Change subject: (Bug 45607) Add a callback for the hook for reordering of special pages .. (Bug 45607) Add a callback for the hook for reordering of special pages Change-Id: Iab2536c894c350f77e1619315fd8f55a7a1db5ac --- M repo/Wikibase.hooks.php M repo/Wikibase.php 2 files changed, 16 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/26/51826/1 diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php index 8040b26..a38d7dc 100644 --- a/repo/Wikibase.hooks.php +++ b/repo/Wikibase.hooks.php @@ -590,6 +590,20 @@ } /** +* Reorder the groups for the special pages +* +* @since 0.4 +* +* @param array $groups +* +* @return boolean +*/ + public static function onSpecialPage_reorderPages( &$groups ) { + $groups = array_merge( array( 'wikibaserepo' => null ), $groups ); + return true; + } + + /** * Deletes all the data stored on the repository. * @see https://www.mediawiki.org/wiki/Manual:Hooks/WikibaseDeleteData * diff --git a/repo/Wikibase.php b/repo/Wikibase.php index 56187af..eec22ef 100644 --- a/repo/Wikibase.php +++ b/repo/Wikibase.php @@ -252,6 +252,7 @@ $wgSpecialPageGroups['SetLabel'] = 'wikibaserepo'; + // Hooks $wgHooks['BeforePageDisplay'][] = 'Wikibase\RepoHooks::onBeforePageDisplay'; $wgHooks['WikibaseDefaultSettings'][] = 'Wikibase\RepoHooks::onWikibaseDefaultSettings'; @@ -277,6 +278,7 @@ $wgHooks['ShowSearchHit'][]= 'Wikibase\RepoHooks::onShowSearchHit'; $wgHooks['TitleGetRestrictionTypes'][] = 'Wikibase\RepoHooks::onTitleGetRestrictionTypes'; $wgHooks['AbuseFilter-contentToString'][] = 'Wikibase\RepoHooks::onAbuseFilterContentToString'; +$wgHooks['SpecialPage_reorderPages'][] = 'Wikibase\RepoHooks::onSpecialPage_reorderPages'; // Resource Loader Modules: $wgResourceModules = array_merge( $wgResourceModules, include( "$dir/resources/Resources.php" ) ); -- To view, visit https://gerrit.wikimedia.org/r/51826 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iab2536c894c350f77e1619315fd8f55a7a1db5ac Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: John Erling Blad ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Change to use mw.Title; matches corresponding change in Gett... - change (mediawiki...GuidedTour)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/51825 Change subject: Change to use mw.Title; matches corresponding change in GettingStarted. .. Change to use mw.Title; matches corresponding change in GettingStarted. Change-Id: I933e016015875365d0d8f3a1475ac87f25efa7bf --- M modules/tours/gettingstarted.js 1 file changed, 4 insertions(+), 21 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GuidedTour refs/changes/25/51825/1 diff --git a/modules/tours/gettingstarted.js b/modules/tours/gettingstarted.js index 590ba68..49c8c06 100644 --- a/modules/tours/gettingstarted.js +++ b/modules/tours/gettingstarted.js @@ -3,24 +3,6 @@ ( function ( window, document, $, mw, gt ) { /** - * Gets full page name, without underscores - * - * Implemented the same way as E3Experiments - * - * @return {string} full page name - */ -function getFullPageName() { - var pageTitle = mw.config.get( 'wgTitle' ), - wgNamespaceNumber = mw.config.get( 'wgNamespaceNumber' ), - pageNamespace = mw.config.get( 'wgFormattedNamespaces' )[ wgNamespaceNumber ]; - if ( pageNamespace ) { - pageTitle = pageNamespace + ':' + pageTitle; - } - - return pageTitle; -} - -/** * Checks whether we should skip this because of the page name. * * This can use functionality from E3Experiments to determine what task they chose, but @@ -35,7 +17,7 @@ * @return {boolean} true to skip, false otherwise */ function shouldSkipPageName() { - var tasks, articles, article, pageName, index; + var tasks, articles, article, wgPageName, fullPageTitle, index; if ( mw.config.get( 'wgCanonicalNamespace' ) !== '' ) { return true; @@ -56,8 +38,9 @@ return false; } - pageName = getFullPageName(); - index = $.inArray( pageName, articles ); + wgPageName = mw.config.get( 'wgPageName' ); + fullPageTitle = new mw.Title( wgPageName ).getPrefixedText(); + index = $.inArray( fullPageTitle, articles ); return index === -1; } -- To view, visit https://gerrit.wikimedia.org/r/51825 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I933e016015875365d0d8f3a1475ac87f25efa7bf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GuidedTour Gerrit-Branch: master Gerrit-Owner: Mattflaschen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove generateId (unused) and use mw.Title for full title. - change (mediawiki...GettingStarted)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/51824 Change subject: Remove generateId (unused) and use mw.Title for full title. .. Remove generateId (unused) and use mw.Title for full title. Change-Id: I23b657279895cad9b342a31900d465295771242e --- M GettingStarted.php M resources/ext.gettingstarted.openTask.js 2 files changed, 7 insertions(+), 23 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GettingStarted refs/changes/24/51824/1 diff --git a/GettingStarted.php b/GettingStarted.php index 9395036..b91b047 100644 --- a/GettingStarted.php +++ b/GettingStarted.php @@ -58,6 +58,7 @@ 'dependencies' => array( 'jquery.cookie', 'jquery.json', + 'mediawiki.Title', 'mediawiki.user', 'ext.Experiments.lib', 'ext.postEdit', diff --git a/resources/ext.gettingstarted.openTask.js b/resources/ext.gettingstarted.openTask.js index e653692..5e5684a 100644 --- a/resources/ext.gettingstarted.openTask.js +++ b/resources/ext.gettingstarted.openTask.js @@ -11,9 +11,9 @@ ( function ( window, document, mw, $ ) { 'use strict'; var cfg = mw.config.get( [ - 'wgAction', 'wgTitle', 'wgCanonicalSpecialPageName', + 'wgAction', 'wgPageName', 'wgTitle', 'wgCanonicalSpecialPageName', 'wgArticleId', 'wgCurRevisionId', - 'wgNamespaceNumber', 'wgFormattedNamespaces', + 'wgNamespaceNumber', // Wiki server variables we supply: 'wgIsWelcomeCreation', 'wgUserId', // Wiki server variable supplied by Extension:PostEdit: @@ -33,19 +33,6 @@ }; mw.eventLog.setDefaults( schema, defaults ); - } - - - // FIXME Verbatim copypasta from mediawiki.user.js, which doesn't export it. - function generateId() { - var i, r, - id = '', - seed = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; - for ( i = 0; i < 32; i++ ) { - r = Math.floor( Math.random() * seed.length ); - id += seed.substring( r, r + 1 ); - } - return id; } /** @@ -132,7 +119,7 @@ * @return {void} */ function checkProgress() { - var action, pageTitle, pageNamespace, task, + var action, fullPageTitle, pageNamespace, task, schema, event, isEditable, loggedActions = { view : 'page-impression', @@ -149,14 +136,10 @@ return; } - // The task title stored in the cookie may include a namespace. - pageTitle = cfg.wgTitle; - pageNamespace = cfg.wgFormattedNamespaces[ cfg.wgNamespaceNumber ]; - if ( pageNamespace ) { - pageTitle = pageNamespace + ':' + pageTitle; - } + // The task title stored in the cookie may include a namespace in this format. + fullPageTitle = new mw.Title( cfg.wgPageName ).getPrefixedText(); - task = getTasks()[ pageTitle ]; + task = getTasks()[ fullPageTitle ]; if ( task ) { schema = getSchemaForTask( task ); -- To view, visit https://gerrit.wikimedia.org/r/51824 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I23b657279895cad9b342a31900d465295771242e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GettingStarted Gerrit-Branch: feature/gettingstartedv2 Gerrit-Owner: Mattflaschen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [JobQueue] Added JobQueueFederated class for partitioned que... - change (mediawiki/core)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/51823 Change subject: [JobQueue] Added JobQueueFederated class for partitioned queues. .. [JobQueue] Added JobQueueFederated class for partitioned queues. * Moved the root job handling up to the base class and provided some default function implementations. * Also bumped ROOTJOB_TTL from 14 to 28 days. Change-Id: I44d59b67cf417dca28a3e9b25371dac5a7ffcb47 --- M includes/AutoLoader.php M includes/job/JobQueue.php M includes/job/JobQueueDB.php A includes/job/JobQueueFederated.php M includes/job/JobQueueRedis.php 5 files changed, 370 insertions(+), 65 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/23/51823/1 diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index ace1348..bfe2a5f 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -659,6 +659,7 @@ 'JobQueueAggregatorRedis' => 'includes/job/JobQueueAggregatorRedis.php', 'JobQueueDB' => 'includes/job/JobQueueDB.php', 'JobQueueGroup' => 'includes/job/JobQueueGroup.php', + 'JobQueueFederated' => 'includes/job/JobQueueFederated.php', 'JobQueueRedis' => 'includes/job/JobQueueRedis.php', # includes/job/jobs diff --git a/includes/job/JobQueue.php b/includes/job/JobQueue.php index 4996a9e..8fb6259 100644 --- a/includes/job/JobQueue.php +++ b/includes/job/JobQueue.php @@ -37,6 +37,8 @@ const QoS_Atomic = 1; // integer; "all-or-nothing" job insertions + const ROOTJOB_TTL = 2419200; // integer; seconds to remember root jobs (28 days) + /** * @param $params array */ @@ -228,6 +230,15 @@ wfProfileIn( __METHOD__ ); $job = $this->doPop(); wfProfileOut( __METHOD__ ); + + // Flag this job as an old duplicate based on its "root" job... + try { + if ( $job && $this->isRootJobOldDuplicate( $job ) ) { + wfIncrStats( 'job-pop-duplicate' ); + $job = DuplicateJob::newFromJob( $job ); // convert to a no-op + } + } catch ( MWException $e ) {} // don't lose jobs over this + return $job; } @@ -310,7 +321,76 @@ * @return bool */ protected function doDeduplicateRootJob( Job $job ) { - return true; + global $wgMemc; + + $params = $job->getParams(); + if ( !isset( $params['rootJobSignature'] ) ) { + throw new MWException( "Cannot register root job; missing 'rootJobSignature'." ); + } elseif ( !isset( $params['rootJobTimestamp'] ) ) { + throw new MWException( "Cannot register root job; missing 'rootJobTimestamp'." ); + } + $key = $this->getRootJobCacheKey( $params['rootJobSignature'] ); + // Callers should call batchInsert() and then this function so that if the insert + // fails, the de-duplication registration will be aborted. Since the insert is + // deferred till "transaction idle", do the same here, so that the ordering is + // maintained. Having only the de-duplication registration succeed would cause + // jobs to become no-ops without any actual jobs that made them redundant. + $timestamp = $wgMemc->get( $key ); // current last timestamp of this job + if ( $timestamp && $timestamp >= $params['rootJobTimestamp'] ) { + return true; // a newer version of this root job was enqueued + } + + // Update the timestamp of the last root job started at the location... + return $wgMemc->set( $key, $params['rootJobTimestamp'], JobQueueDB::ROOTJOB_TTL ); + } + + /** +* Check if the "root" job of a given job has been superseded by a newer one +* +* @param $job Job +* @return bool +* @throws MWException +*/ + final protected function isRootJobOldDuplicate( Job $job ) { + if ( $job->getType() !== $this->type ) { + throw new MWException( "Got '{$job->getType()}' job; expected '{$this->type}'." ); + } + wfProfileIn( __METHOD__ ); + $isDuplicate = $this->doIsRootJobOldDuplicate( $job ); + wfProfileOut( __METHOD__ ); + return $isDuplicate; + } + + /** +* @see JobQueue::isRootJobOldDuplicate() +* @param Job $job +* @return bool +*/ + protected function doIsRootJobOldDuplicate( Job $job ) { + global $wgMemc; + + $params = $job->getParams(); + if ( !isset( $params['rootJobSignatu
[MediaWiki-commits] [Gerrit] Move OpenTask from E3Experiments. - change (mediawiki...GettingStarted)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/51822 Change subject: Move OpenTask from E3Experiments. .. Move OpenTask from E3Experiments. Change-Id: I85f38b0eceaae19c7c6a6ee523d6077c33f39b29 --- M GettingStarted.hooks.php M GettingStarted.php M README A resources/ext.gettingstarted.openTask.js 4 files changed, 290 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GettingStarted refs/changes/22/51822/1 diff --git a/GettingStarted.hooks.php b/GettingStarted.hooks.php index 2e29110..db37e88 100644 --- a/GettingStarted.hooks.php +++ b/GettingStarted.hooks.php @@ -7,12 +7,23 @@ */ class GettingStartedHooks { + /** +* Adds the openTask module to the page +* +* @param OutputPage $out output page +* @param Skin $skin current skin +* @return bool +*/ + public static function onBeforePageDisplay( $out, $skin ) { + $out->addModules( 'ext.gettingstarted.openTask' ); + return true; + } /** * Look for page edits where there's an item in the user's openTask cookie * matching the title whose task is 'gettingstarted' * Approach comes from AbuseFilter and MobileFrontend extensions. -* @param $recentChange RecentChange +* @param RecentChange $recentChange RecentChanges entry * @return bool */ public static function onRecentChange_save( $recentChange ) { diff --git a/GettingStarted.php b/GettingStarted.php index a1187ce..9395036 100644 --- a/GettingStarted.php +++ b/GettingStarted.php @@ -32,6 +32,12 @@ 'remoteExtPath' => 'GettingStarted/resources', ); +$wgResourceModules[ 'schema.GettingStarted' ] = array( + 'class'=> 'ResourceLoaderSchemaModule', + 'schema' => 'GettingStarted', + 'revision' => 5285779, +); + $wgResourceModules['ext.guidedTour.tour.gettingstartedpage'] = array( 'scripts' => 'tours/gettingstartedpage.js', 'dependencies' => 'ext.guidedTour.lib', @@ -44,6 +50,19 @@ 'guidedtour-tour-gettingstartedpage-add-links-title', 'guidedtour-tour-gettingstartedpage-add-links-description', ), +) + $gettingStartedModuleInfo; + +// Every page site-wide +$wgResourceModules[ 'ext.gettingstarted.openTask' ] = array( + 'scripts' => 'ext.gettingstarted.openTask.js', + 'dependencies' => array( + 'jquery.cookie', + 'jquery.json', + 'mediawiki.user', + 'ext.Experiments.lib', + 'ext.postEdit', + 'schema.GettingStarted', + ) ) + $gettingStartedModuleInfo; // This runs on both account creation and the special page @@ -72,6 +91,7 @@ 'position' => 'top', ) + $gettingStartedModuleInfo; +$wgHooks[ 'BeforePageDisplay' ][] = 'GettingStartedHooks::onBeforePageDisplay'; $wgHooks[ 'BeforeWelcomeCreation' ][] = 'GettingStartedHooks::onBeforeWelcomeCreation'; $wgHooks[ 'RecentChange_save' ][] = 'GettingStartedHooks::onRecentChange_save'; $wgHooks[ 'ListDefinedTags' ][] = 'GettingStartedHooks::onListDefinedTags'; diff --git a/README b/README index 8a532bd..12a9b4d 100644 --- a/README +++ b/README @@ -12,10 +12,12 @@ Dependencies +* https://www.mediawiki.org/wiki/Extension:E3Experiments for jQuery.stall * https://www.mediawiki.org/wiki/Extension:GuidedTour * (optional) Read and write access to MediaWiki API must be enabled to avoid showing the GettingStarted tour repeatedly to logged in users if they regularly visit Special:GettingStarted. +* https://www.mediawiki.org/wiki/Extension:PostEdit until core wgPostEdit is deployed License diff --git a/resources/ext.gettingstarted.openTask.js b/resources/ext.gettingstarted.openTask.js new file mode 100644 index 000..e653692 --- /dev/null +++ b/resources/ext.gettingstarted.openTask.js @@ -0,0 +1,256 @@ +// This file was moved from the E3Experiments extension, so consult that repo for earlier history. + +/** + * @class mediaWiki.openTask + * @singleton + * This handles clicks and the user choosing and acting on open tasks, + * initiated from the "Getting Started" page. This means it runs on + * _every_ page in case the user is editing or just completed editing a + * page from her openTask list. + */ +( function ( window, document, mw, $ ) { + 'use strict'; + var cfg = mw.config.get( [ + 'wgAction', 'wgTitle', 'wgCanonicalSpecialPageName', + 'wgArticleId', 'wgCurRevisionId', + 'wgNamespaceNumber', 'wgFormattedNamespaces', + // Wiki server variables we supply: + 'wgIsWelcomeCreation', 'wgUserId', + // Wiki server variable supplied by Extension:PostEdit: + 'wgPostEdit' + ] ); + + if ( mw.user.isAnon() ) { + // Do n
[MediaWiki-commits] [Gerrit] Fix indenting - change (mediawiki...MagicNoCache)
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/51821 Change subject: Fix indenting .. Fix indenting Change-Id: I972412bb7a7a675e1746174d8e02a9faac256414 --- M MagicNoCache.php 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MagicNoCache refs/changes/21/51821/1 diff --git a/MagicNoCache.php b/MagicNoCache.php index 584de89..47c13d4 100644 --- a/MagicNoCache.php +++ b/MagicNoCache.php @@ -57,11 +57,11 @@ global $wgOut, $wgAction; $mw = MagicWord::get('MAG_NOCACHE'); - // if it is there, remove it and disable caching - if ( !in_array( $wgAction, array( 'submit', 'edit') ) && $mw->matchAndRemove($text) ) { - $parser->disableCache(); - $wgOut->enableClientCache(false); + // if it is there, remove it and disable caching + if ( !in_array( $wgAction, array( 'submit', 'edit') ) && $mw->matchAndRemove($text) ) { + $parser->disableCache(); + $wgOut->enableClientCache(false); } - return true; + return true; } } -- To view, visit https://gerrit.wikimedia.org/r/51821 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I972412bb7a7a675e1746174d8e02a9faac256414 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MagicNoCache Gerrit-Branch: master Gerrit-Owner: Reedy ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixed edge case in wfPickRandom() were a 0 weighted item can... - change (mediawiki/core)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/51820 Change subject: Fixed edge case in wfPickRandom() were a 0 weighted item can be picked. .. Fixed edge case in wfPickRandom() were a 0 weighted item can be picked. Change-Id: I6c2cac9f7446437f98da838a9354ee1937c9b423 --- M includes/GlobalFunctions.php 1 file changed, 4 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/20/51820/1 diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 79a4920..1ec3488 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -344,14 +344,12 @@ $sum = array_sum( $weights ); if ( $sum == 0 ) { - # No loads on any of them - # In previous versions, this triggered an unweighted random selection, - # but this feature has been removed as of April 2006 to allow for strict - # separation of query groups. - return false; + return false; // no load on any item (and avoid infinite loop below) } $max = mt_getrandmax(); - $rand = mt_rand( 0, $max ) / $max * $sum; + do { + $rand = mt_rand( 0, $max ) / $max * $sum; + } while ( $rand == 0 ); // don't let a 0 weighted item be picked $sum = 0; foreach ( $weights as $i => $w ) { -- To view, visit https://gerrit.wikimedia.org/r/51820 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6c2cac9f7446437f98da838a9354ee1937c9b423 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Making the payments logs less racey. - change (mediawiki...DonationInterface)
Adamw has submitted this change and it was merged. Change subject: Making the payments logs less racey. .. Making the payments logs less racey. Change-Id: I2d3a4b900b8b99d90f1fafa023413dd5351398a4 --- M globalcollect_gateway/globalcollect.adapter.php 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Adamw: Verified; Looks good to me, approved jenkins-bot: Checked diff --git a/globalcollect_gateway/globalcollect.adapter.php b/globalcollect_gateway/globalcollect.adapter.php index e380842..7edb359 100644 --- a/globalcollect_gateway/globalcollect.adapter.php +++ b/globalcollect_gateway/globalcollect.adapter.php @@ -2241,7 +2241,6 @@ } protected function stage_fiscal_number( $type = 'request' ) { - $this->log("XXX"); if ( $type != 'request' ){ return; //nothing to do here. } -- To view, visit https://gerrit.wikimedia.org/r/51818 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2d3a4b900b8b99d90f1fafa023413dd5351398a4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Katie Horn Gerrit-Reviewer: Adamw Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Adding new payment types to the out-logger. For all the paym... - change (mediawiki...DonationInterface)
Adamw has submitted this change and it was merged. Change subject: Adding new payment types to the out-logger. For all the payment types that do not return to the payments cluster, we want to add the final status at the last point in time that we see that donor. .. Adding new payment types to the out-logger. For all the payment types that do not return to the payments cluster, we want to add the final status at the last point in time that we see that donor. Change-Id: I08728a9a7a0620d361edf99dc52b3c034e8c1e0a --- M globalcollect_gateway/globalcollect.adapter.php 1 file changed, 15 insertions(+), 2 deletions(-) Approvals: Adamw: Verified; Looks good to me, approved jenkins-bot: Checked diff --git a/globalcollect_gateway/globalcollect.adapter.php b/globalcollect_gateway/globalcollect.adapter.php index e380842..334e392 100644 --- a/globalcollect_gateway/globalcollect.adapter.php +++ b/globalcollect_gateway/globalcollect.adapter.php @@ -638,14 +638,17 @@ $this->payment_methods['dd'] = array( 'label' => 'Direct Debit', 'types' => array( 'dd_at', 'dd_be', 'dd_ch', 'dd_de', 'dd_es','dd_fr', 'dd_gb', 'dd_it', 'dd_nl', ), - 'validation' => array( 'creditCard' => false, ) + 'validation' => array( 'creditCard' => false, ), + 'short_circuit_at' => 'first_iop', ); // eWallets $this->payment_methods['ew'] = array( 'label' => 'eWallets', 'types' => array( 'ew_cashu', 'ew_moneybookers', 'ew_paypal', 'ew_webmoney', 'ew_yandex' ), - 'validation' => array( 'address' => false, 'creditCard' => false, ) + 'validation' => array( 'address' => false, 'creditCard' => false, ), + 'short_circuit_at' => 'first_iop', + 'additional_success_status' => array( 20 ), ); // Bank Transfers @@ -660,12 +663,16 @@ $this->payment_methods['rtbt'] = array( 'label' => 'Real time bank transfer', 'types' => array( 'rtbt_ideal', 'rtbt_eps', 'rtbt_sofortuberweisung', 'rtbt_nordea_sweden', 'rtbt_enets', ), + 'short_circuit_at' => 'first_iop', + 'additional_success_status' => array( 20 ), ); // Cash payments $this->payment_methods['cash'] = array( 'label' => 'Cash payments', 'types' => array( 'cash_boleto', ), + 'short_circuit_at' => 'first_iop', + 'additional_success_status' => array( 20 ), ); } @@ -1464,6 +1471,12 @@ //if we're of a type that sends donors off never to return, we should record that here. $payment_info = $this->getPaymentMethodMeta( $this->getPaymentMethod() ); if ( array_key_exists( 'short_circuit_at', $payment_info ) && $payment_info['short_circuit_at'] === 'first_iop' ){ + if ( array_key_exists( 'additional_success_status', $payment_info ) && is_array( $payment_info['additional_success_status'] ) ){ + foreach ( $payment_info['additional_success_status'] as $status ){ + //mangle the definition of success. + $this->addCodeRange( 'GET_ORDERSTATUS', 'STATUSID', 'complete', $status ); + } + } $this->setTransactionWMFStatus( $this->findCodeAction( 'GET_ORDERSTATUS', 'STATUSID', $data['STATUSID'] ) ); } break; -- To view, visit https://gerrit.wikimedia.org/r/51817 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I08728a9a7a0620d361edf99dc52b3c034e8c1e0a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Katie Horn Gerrit-Reviewer: Adamw Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove openTask (being moved to Extension:GettingStarted). - change (mediawiki...E3Experiments)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/51819 Change subject: Remove openTask (being moved to Extension:GettingStarted). .. Remove openTask (being moved to Extension:GettingStarted). Change-Id: I22a50d03c0f8d9d9c60af7f1984a867a9aa678dc --- M Experiments.hooks.php M Experiments.php D experiments/openTask.js 3 files changed, 0 insertions(+), 289 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/E3Experiments refs/changes/19/51819/1 diff --git a/Experiments.hooks.php b/Experiments.hooks.php index 401b67a..2815ae4 100644 --- a/Experiments.hooks.php +++ b/Experiments.hooks.php @@ -11,20 +11,6 @@ public static $isWelcomeCreation = false; /** -* BeforePageDisplay hook -* -* Adds the modules to the page -* -* @param $out OutputPage output page -* @param $skin Skin current skin -* @return bool -*/ - public static function onBeforePageDisplay( $out, $skin ) { - $out->addModules( 'ext.Experiments.openTask' ); - return true; - } - - /** * MakeGlobalVariablesScript hook. * Add config vars to mw.config. * diff --git a/Experiments.php b/Experiments.php index 2b423e3..4de88a7 100644 --- a/Experiments.php +++ b/Experiments.php @@ -28,12 +28,6 @@ // Modules -$wgResourceModules[ 'schema.GettingStarted' ] = array( - 'class'=> 'ResourceLoaderSchemaModule', - 'schema' => 'GettingStarted', - 'revision' => 5285779, -); - $wgResourceModules[ 'schema.AccountCreation' ] = array( 'class'=> 'ResourceLoaderSchemaModule', 'schema' => 'AccountCreation', @@ -50,21 +44,6 @@ 'ext.UserBuckets', ), 'remoteExtPath' => 'E3Experiments' -); - -$wgResourceModules[ 'ext.Experiments.openTask' ] = array( - 'scripts' => 'experiments/openTask.js', - 'localBasePath' => __DIR__, - 'remoteExtPath' => 'E3Experiments', - 'dependencies' => array( - 'ext.Experiments.lib', - 'schema.GettingStarted', - // XXX (mattflaschen, 2012-12-19): This is only here for mw.config - // wgPostEdit. I think we should strongly consider moving wgPostEdit - // to core so we don't need this dependency - // (https://bugzilla.wikimedia.org/show_bug.cgi?id=43270) - 'ext.postEdit' - ) ); $wgResourceModules[ 'ext.Experiments.acux' ] = array( diff --git a/experiments/openTask.js b/experiments/openTask.js deleted file mode 100644 index 6ee0307..000 --- a/experiments/openTask.js +++ /dev/null @@ -1,254 +0,0 @@ -/** - * @class mediaWiki.openTask - * @singleton - * This handles clicks and the user choosing and acting on open tasks, - * initiated from the "Getting Started" page. This means it runs on - * _every_ page in case the user is editing or just completed editing a - * page from her openTask list. - */ -( function ( window, document, mw, $ ) { - 'use strict'; - var cfg = mw.config.get( [ - 'wgAction', 'wgTitle', 'wgCanonicalSpecialPageName', - 'wgArticleId', 'wgCurRevisionId', - 'wgNamespaceNumber', 'wgFormattedNamespaces', - // Wiki server variables we supply: - 'wgIsWelcomeCreation', 'wgUserId', - // Wiki server variable supplied by Extension:PostEdit: - 'wgPostEdit' - ] ); - - if ( mw.user.isAnon() ) { - // Do no logging for anonymous users - return; - } - - // Set some fields common to both clicks and fixing articles. - function setCommonDefaults( schema ) { - var defaults = { - experimentId : 'ob3-split-retest-split', - userId : cfg.wgUserId - }; - - mw.eventLog.setDefaults( schema, defaults ); - } - - - // FIXME Verbatim copypasta from mediawiki.user.js, which doesn't export it. - function generateId() { - var i, r, - id = '', - seed = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; - for ( i = 0; i < 32; i++ ) { - r = Math.floor( Math.random() * seed.length ); - id += seed.substring( r, r + 1 ); - } - return id; - } - - /** -* @return {boolean} True if user is on GettingStarted page. -*/ - function isGettingStarted () { - return cfg.wgIsWelcomeCreation || - cfg.wgCanonicalSpecialPageName === 'GettingStarted' || - cfg.wgTitle.indexOf( 'E3 Test Onboarding' ) !== -1; - } - - /** -* @return {Object} User's list of open
[MediaWiki-commits] [Gerrit] Making the payments logs less racey. - change (mediawiki...DonationInterface)
Katie Horn has uploaded a new change for review. https://gerrit.wikimedia.org/r/51818 Change subject: Making the payments logs less racey. .. Making the payments logs less racey. Change-Id: I2d3a4b900b8b99d90f1fafa023413dd5351398a4 --- M globalcollect_gateway/globalcollect.adapter.php 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/18/51818/1 diff --git a/globalcollect_gateway/globalcollect.adapter.php b/globalcollect_gateway/globalcollect.adapter.php index e380842..7edb359 100644 --- a/globalcollect_gateway/globalcollect.adapter.php +++ b/globalcollect_gateway/globalcollect.adapter.php @@ -2241,7 +2241,6 @@ } protected function stage_fiscal_number( $type = 'request' ) { - $this->log("XXX"); if ( $type != 'request' ){ return; //nothing to do here. } -- To view, visit https://gerrit.wikimedia.org/r/51818 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2d3a4b900b8b99d90f1fafa023413dd5351398a4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Katie Horn ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Adding new payment types to the out-logger. For all the paym... - change (mediawiki...DonationInterface)
Katie Horn has uploaded a new change for review. https://gerrit.wikimedia.org/r/51817 Change subject: Adding new payment types to the out-logger. For all the payment types that do not return to the payments cluster, we want to add the final status at the last point in time that we see that donor. .. Adding new payment types to the out-logger. For all the payment types that do not return to the payments cluster, we want to add the final status at the last point in time that we see that donor. Change-Id: I08728a9a7a0620d361edf99dc52b3c034e8c1e0a --- M globalcollect_gateway/globalcollect.adapter.php 1 file changed, 15 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/17/51817/1 diff --git a/globalcollect_gateway/globalcollect.adapter.php b/globalcollect_gateway/globalcollect.adapter.php index e380842..334e392 100644 --- a/globalcollect_gateway/globalcollect.adapter.php +++ b/globalcollect_gateway/globalcollect.adapter.php @@ -638,14 +638,17 @@ $this->payment_methods['dd'] = array( 'label' => 'Direct Debit', 'types' => array( 'dd_at', 'dd_be', 'dd_ch', 'dd_de', 'dd_es','dd_fr', 'dd_gb', 'dd_it', 'dd_nl', ), - 'validation' => array( 'creditCard' => false, ) + 'validation' => array( 'creditCard' => false, ), + 'short_circuit_at' => 'first_iop', ); // eWallets $this->payment_methods['ew'] = array( 'label' => 'eWallets', 'types' => array( 'ew_cashu', 'ew_moneybookers', 'ew_paypal', 'ew_webmoney', 'ew_yandex' ), - 'validation' => array( 'address' => false, 'creditCard' => false, ) + 'validation' => array( 'address' => false, 'creditCard' => false, ), + 'short_circuit_at' => 'first_iop', + 'additional_success_status' => array( 20 ), ); // Bank Transfers @@ -660,12 +663,16 @@ $this->payment_methods['rtbt'] = array( 'label' => 'Real time bank transfer', 'types' => array( 'rtbt_ideal', 'rtbt_eps', 'rtbt_sofortuberweisung', 'rtbt_nordea_sweden', 'rtbt_enets', ), + 'short_circuit_at' => 'first_iop', + 'additional_success_status' => array( 20 ), ); // Cash payments $this->payment_methods['cash'] = array( 'label' => 'Cash payments', 'types' => array( 'cash_boleto', ), + 'short_circuit_at' => 'first_iop', + 'additional_success_status' => array( 20 ), ); } @@ -1464,6 +1471,12 @@ //if we're of a type that sends donors off never to return, we should record that here. $payment_info = $this->getPaymentMethodMeta( $this->getPaymentMethod() ); if ( array_key_exists( 'short_circuit_at', $payment_info ) && $payment_info['short_circuit_at'] === 'first_iop' ){ + if ( array_key_exists( 'additional_success_status', $payment_info ) && is_array( $payment_info['additional_success_status'] ) ){ + foreach ( $payment_info['additional_success_status'] as $status ){ + //mangle the definition of success. + $this->addCodeRange( 'GET_ORDERSTATUS', 'STATUSID', 'complete', $status ); + } + } $this->setTransactionWMFStatus( $this->findCodeAction( 'GET_ORDERSTATUS', 'STATUSID', $data['STATUSID'] ) ); } break; -- To view, visit https://gerrit.wikimedia.org/r/51817 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I08728a9a7a0620d361edf99dc52b3c034e8c1e0a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Katie Horn ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] bug 45452: Ensure error message appears when a bad token is ... - change (mediawiki...MobileFrontend)
JGonera has submitted this change and it was merged. Change subject: bug 45452: Ensure error message appears when a bad token is visible .. bug 45452: Ensure error message appears when a bad token is visible Don't attempt an upload with a bad token EVER Change-Id: I21d8a1e595b8e049d049dad8a8e07316022f190f --- M javascripts/modules/mf-photo.js 1 file changed, 15 insertions(+), 2 deletions(-) Approvals: JGonera: Verified; Looks good to me, approved diff --git a/javascripts/modules/mf-photo.js b/javascripts/modules/mf-photo.js index 4f9ceb2..27c7c43 100644 --- a/javascripts/modules/mf-photo.js +++ b/javascripts/modules/mf-photo.js @@ -84,7 +84,7 @@ 'mobile-frontend-photo-article-edit-comment' : 'mobile-frontend-photo-article-donate-comment'; - self.getToken( 'edit', function( tokenData ) { + function doUpload( token ) { var formData = new FormData(), descTextToAppend; options.fileName = generateFileName( options.file, options.pageTitle ); descTextToAppend = M.getConfig( 'photoUploadAppendToDesc' ); @@ -101,7 +101,7 @@ formData.append( 'filename', options.fileName ); formData.append( 'comment', mw.msg( options.editSummaryMessage ) ); formData.append( 'file', options.file ); - formData.append( 'token', tokenData.tokens.edittoken ); + formData.append( 'token', token ); formData.append( 'text', '== {{int:filedesc}} ==\n' + options.description + descTextToAppend + @@ -149,6 +149,19 @@ result.reject( status + ': ' + error ); } } ); + } + self.getToken( 'edit', function( tokenData ) { + var token; + if ( tokenData && tokenData.tokens ) { + token = tokenData.tokens.edittoken; + if ( token && token !== '+\\' ) { // ensure not anonymous.. + doUpload( token ); + } else { + result.reject( 'Anonymous or absent token' ); + } + } else { + result.reject( 'Missing token' ); + } }, endpoint ); return result; -- To view, visit https://gerrit.wikimedia.org/r/51079 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I21d8a1e595b8e049d049dad8a8e07316022f190f Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jdlrobson Gerrit-Reviewer: JGonera Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add i18n file in preparation for adding extension to transla... - change (mediawiki...CryoKey)
CryoKey has submitted this change and it was merged. Change subject: Add i18n file in preparation for adding extension to translatewiki.net .. Add i18n file in preparation for adding extension to translatewiki.net Change-Id: I4e1e22698d467c3c46fbecbbc6e1e931e006954a --- A CryoKey.i18n.php M cryokey.php 2 files changed, 29 insertions(+), 3 deletions(-) Approvals: CryoKey: Verified; Looks good to me, approved diff --git a/CryoKey.i18n.php b/CryoKey.i18n.php new file mode 100644 index 000..f1f23f5 --- /dev/null +++ b/CryoKey.i18n.php @@ -0,0 +1,23 @@ + 'Adds support for CryoKey credentials', +); + +/** Message documentation (Message documentation) + * @author Raymond + */ +$messages['qqq'] = array( + 'cryokey-desc' => '{{desc|name=Cryo Key|url=https://www.mediawiki.org/wiki/Extension:CryoKey}}', +); + diff --git a/cryokey.php b/cryokey.php index 963026a..75c304e 100644 --- a/cryokey.php +++ b/cryokey.php @@ -8,10 +8,14 @@ ( 'path' => __FILE__, 'name' => 'CryoKey', - 'description' => 'An example of integrating CryoKey into MediaWiki', + 'descriptionmsg' => 'cryokey-desc', 'version' => '1.1', - 'author' => 'Authenticade LLC' + 'author' => 'Authenticade LLC', + 'url' => 'https://www.mediawiki.org/wiki/Extension:CryoKey' ); + +// Define internationalizations +$wgExtensionMessagesFiles['CryoKey'] = __DIR__ . '/CryoKey.i18n.php'; // Allow Auto-Registration behavior if "true". $wgCKAutoRegister = false; @@ -133,4 +137,3 @@ } $wgHooks['UserLoadFromSession'][] = "ck_check"; -?> -- To view, visit https://gerrit.wikimedia.org/r/51656 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4e1e22698d467c3c46fbecbbc6e1e931e006954a Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/CryoKey Gerrit-Branch: master Gerrit-Owner: Raimond Spekking Gerrit-Reviewer: CryoKey Gerrit-Reviewer: Siebrand ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] using db71 instead of db70 - change (operations/puppet)
Pyoungmeister has submitted this change and it was merged. Change subject: using db71 instead of db70 .. using db71 instead of db70 Change-Id: I47e5c9824c7803ef12ec21c3c4b06578e546f78e --- M manifests/role/coredb.pp M manifests/site.pp 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Pyoungmeister: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/coredb.pp b/manifests/role/coredb.pp index da44991..0a3781a 100644 --- a/manifests/role/coredb.pp +++ b/manifests/role/coredb.pp @@ -9,7 +9,7 @@ class role::coredb::config { $topology = { 's1' => { - 'hosts' => { 'pmtpa' => [ 'db32', 'db36', 'db38', 'db59', 'db60', 'db63', 'db67', 'db69', 'db70' ], + 'hosts' => { 'pmtpa' => [ 'db32', 'db36', 'db38', 'db59', 'db60', 'db63', 'db67', 'db69', 'db71' ], 'eqiad' => [ 'db1001', 'db1017', 'db1042', 'db1043', 'db1047', 'db1049', 'db1050'] }, 'primary_site' => $::mw_primary, 'masters' => { 'pmtpa' => "db63", 'eqiad' => "db1017" }, diff --git a/manifests/site.pp b/manifests/site.pp index 54ce0a9..24ca43e 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -340,7 +340,7 @@ } # pmtpa dbs -node /db(32|36|38|59|60|63|69|70)\.pmtpa\.wmnet/ { +node /db(32|36|38|59|60|63|69|71)\.pmtpa\.wmnet/ { if $hostname == "db59" { class { role::coredb::s1 : mariadb => true } } else { -- To view, visit https://gerrit.wikimedia.org/r/51810 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I47e5c9824c7803ef12ec21c3c4b06578e546f78e Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Pyoungmeister Gerrit-Reviewer: Pyoungmeister Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Mobile: Allow CentralNotice to surface on mobile - change (mediawiki...CentralNotice)
Jdlrobson has uploaded a new change for review. https://gerrit.wikimedia.org/r/51816 Change subject: Mobile: Allow CentralNotice to surface on mobile .. Mobile: Allow CentralNotice to surface on mobile Currently targeted to alpha and beta versions of site Change-Id: Icb6facca0334146c5dd947731c311d935d6af1a8 --- M CentralNotice.php 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice refs/changes/16/51816/1 diff --git a/CentralNotice.php b/CentralNotice.php index 711f6aa..cf45fdf 100644 --- a/CentralNotice.php +++ b/CentralNotice.php @@ -66,6 +66,8 @@ 'remoteExtPath' => 'CentralNotice/modules', 'scripts' => 'ext.centralNotice.bannerController/bannerController.js', 'position' => 'top', + 'targets' => array( 'mobile', 'desktop' ), + 'mobileTargets' => array( 'beta', 'alpha' ), ); /* Configuration */ -- To view, visit https://gerrit.wikimedia.org/r/51816 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icb6facca0334146c5dd947731c311d935d6af1a8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralNotice Gerrit-Branch: master Gerrit-Owner: Jdlrobson ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Restart bits varnish on cache allocation failures - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Restart bits varnish on cache allocation failures .. Restart bits varnish on cache allocation failures Change-Id: Ib1994e3c0aa140ab6e9ead501fdc47adddc90e87 --- M manifests/role/cache.pp 1 file changed, 5 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 b01884c..f4ac141 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -572,6 +572,11 @@ xff_sources => $network::constants::all_networks } + cron { "alloc failure": + command => "test $(varnishstat -1 -f SMA.s0.c_fail | awk '{ print \$2 }') -gt 100 && service varnish restart > /var/log/varnish-restarts", + user => root + } + class logging { $event_listener = $::site ? { /^(pmtpa|eqiad)$/ => '10.64.21.123', # vanadium -- To view, visit https://gerrit.wikimedia.org/r/51814 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib1994e3c0aa140ab6e9ead501fdc47adddc90e87 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma Gerrit-Reviewer: Mark Bergsma Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Wait until Commons CentralAuth image is loaded - change (mediawiki...MobileFrontend)
JGonera has uploaded a new change for review. https://gerrit.wikimedia.org/r/51815 Change subject: Wait until Commons CentralAuth image is loaded .. Wait until Commons CentralAuth image is loaded This is a workaround to help get rid of "You must be logged in to upload" errors in photo uploads. It works in the following way: * CSS hides the "Return to" link and shows a spinner instead. * When DOM is loaded, JS checks if a Commons CentralAuth image is present on the page. If not, it show the "Return to" link. * If it is, it waits for the image to load, and then shows the "Return to" link. Bug: 45452 Change-Id: I02858fdf2745c3dd5c9be4ee832b322ff20cc640 --- M MobileFrontend.php A javascripts/specials/userlogin.js M less/specials/userlogin.less M stylesheets/specials/userlogin.css 4 files changed, 39 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/15/51815/1 diff --git a/MobileFrontend.php b/MobileFrontend.php index 62f2cd7..3a37c7e 100644 --- a/MobileFrontend.php +++ b/MobileFrontend.php @@ -458,7 +458,7 @@ 'watchlist' => array( 'css' => true, 'js' => false, 'dependencies' => array( 'mobile.stable' ), ), - 'userlogin' => array( 'css' => true ), + 'userlogin' => array( 'css' => true, 'js' => true ), // FIXME: temporary hack to get round CentralNotice logout screen 'userlogout' => array( 'alias' => 'userlogin' ), 'donateimage' => array( 'js' => true, diff --git a/javascripts/specials/userlogin.js b/javascripts/specials/userlogin.js new file mode 100644 index 000..c4c3208 --- /dev/null +++ b/javascripts/specials/userlogin.js @@ -0,0 +1,19 @@ +// FIXME: temporary hack to make sure we log into Commons +jQuery( function( $ ) { + var $commonsImage = $( 'img[title="commons.wikimedia.org"]' ); + + function done() { + $( '#mw-returnto' ).addClass( 'loaded' ); + } + + if ( $commonsImage.length ) { + // http://stackoverflow.com/a/3877079/365238 + $commonsImage.one( 'load', done ).each( function() { + if ( this.complete ) { + done(); + } + } ); + } else { + done(); + } +} ); diff --git a/less/specials/userlogin.less b/less/specials/userlogin.less index 54dd5ce..9290b77 100644 --- a/less/specials/userlogin.less +++ b/less/specials/userlogin.less @@ -149,4 +149,15 @@ bottom: 0; background-color: white; text-align: center; + + // FIXME: temporary hack to make sure we log into Commons + text-indent: -px; + background-image: url(../common/images/ajax-loader.gif); + background-repeat: no-repeat; + background-position: 50% 30%; + + &.loaded { + text-indent: 0; + background: #fff; + } } diff --git a/stylesheets/specials/userlogin.css b/stylesheets/specials/userlogin.css index 828e5dc..e995b09 100644 --- a/stylesheets/specials/userlogin.css +++ b/stylesheets/specials/userlogin.css @@ -125,4 +125,12 @@ bottom: 0; background-color: white; text-align: center; + text-indent: -px; + background-image: url(../common/images/ajax-loader.gif); + background-repeat: no-repeat; + background-position: 50% 30%; +} +#mw-returnto.loaded { + text-indent: 0; + background: #fff; } -- To view, visit https://gerrit.wikimedia.org/r/51815 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I02858fdf2745c3dd5c9be4ee832b322ff20cc640 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: JGonera ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Restart bits varnish on cache allocation failures - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/51814 Change subject: Restart bits varnish on cache allocation failures .. Restart bits varnish on cache allocation failures Change-Id: Ib1994e3c0aa140ab6e9ead501fdc47adddc90e87 --- M manifests/role/cache.pp 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/14/51814/1 diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index b01884c..5908258 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -570,6 +570,11 @@ }, cluster_options => $cluster_options, xff_sources => $network::constants::all_networks + + cron { "alloc failure": + command => "test $(varnishstat -1 -f SMA.s0.c_fail | awk '{ print \$2 }') -gt 100 && service varnish restart > /var/log/varnish-restarts", + user => root + } } class logging { -- To view, visit https://gerrit.wikimedia.org/r/51814 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib1994e3c0aa140ab6e9ead501fdc47adddc90e87 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] add paypal to gatewayformchooser config - change (mediawiki/core)
Adamw has uploaded a new change for review. https://gerrit.wikimedia.org/r/51813 Change subject: add paypal to gatewayformchooser config .. add paypal to gatewayformchooser config Change-Id: I0d8194249e1e1b0fb3a713fcaa1a36c184a216e1 --- M DonationInterfaceFormSettings.php 1 file changed, 28 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/13/51813/1 diff --git a/DonationInterfaceFormSettings.php b/DonationInterfaceFormSettings.php index d1528d3..d8fec77 100644 --- a/DonationInterfaceFormSettings.php +++ b/DonationInterfaceFormSettings.php @@ -7,6 +7,7 @@ $form_dirs = array( 'default' => $wgDonationInterfaceHtmlFormDir, 'gc' => $wgGlobalCollectGatewayHtmlFormDir, + 'paypal' => $wgPaypalGatewayHtmlFormDir, // 'pfp' => $wgPayflowProGatewayHtmlFormDir, ); @@ -401,6 +402,33 @@ ), ); +/* + * Paypal + */ + +$forms_whitelist['paypal'] = array( + 'file' => $form_dirs['paypal'] . '/paypal.html', + 'gateway' => 'paypal', + 'payment_methods' => array('paypal' => 'ALL'), + 'currencies' => array( + '+' => array( + 'AUD', 'BRL', 'CAD', 'CZK', 'DKK', 'EUR', 'HKD', 'HUF', 'ILS', + 'JPY', 'MYR', 'MXN', 'NOK', 'NZD', 'PHP', 'PLN', 'GBP', 'SGD', + 'SEK', 'CHF', 'TWD', 'THB', 'TRY', 'USD', + ), + ), +); + +$forms_whitelist['paypal-recurring'] = array( + 'file' => $form_dirs['paypal'] . '/paypal.html', + 'gateway' => 'paypal', + 'payment_methods' => array('paypal' => 'ALL'), + 'currencies' => array( + '+' => $forms_whitelist['paypal']['currencies']['+'], + ), + 'recurring', +); + //Yes: We definitely want to blow away everything that didn't come from this file. $wgDonationInterfaceAllowedHtmlForms = $forms_whitelist; -- To view, visit https://gerrit.wikimedia.org/r/51813 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0d8194249e1e1b0fb3a713fcaa1a36c184a216e1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: fundraising/1.20 Gerrit-Owner: Adamw ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make default params to CategoryViewer usable as defaults. - change (mediawiki/core)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/51812 Change subject: Make default params to CategoryViewer usable as defaults. .. Make default params to CategoryViewer usable as defaults. If the '$from' and '$to' parameters to the CategoryViewer constructor are left off, they default to empty arrays. This makes later checks for $from['page'], etc. issue an 'Undefined index' notice. Using 'empty' would be more concise but could hide bugs. Change-Id: I78793d13745d1fc1010b8e6861bdc3a89a39a87f --- M includes/CategoryViewer.php 1 file changed, 6 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/12/51812/1 diff --git a/includes/CategoryViewer.php b/includes/CategoryViewer.php index 7678ffe..a9e0ae7 100644 --- a/includes/CategoryViewer.php +++ b/includes/CategoryViewer.php @@ -288,10 +288,10 @@ # the collation in the database differs from the one # set in $wgCategoryCollation, pagination might go totally haywire. $extraConds = array( 'cl_type' => $type ); - if ( $this->from[$type] !== null ) { + if ( isset( $this->from[$type] ) && $this->from[$type] !== null ) { $extraConds[] = 'cl_sortkey >= ' . $dbr->addQuotes( $this->collation->getSortKey( $this->from[$type] ) ); - } elseif ( $this->until[$type] !== null ) { + } elseif ( isset( $this->until[$type] ) && $this->until[$type] !== null ) { $extraConds[] = 'cl_sortkey < ' . $dbr->addQuotes( $this->collation->getSortKey( $this->until[$type] ) ); $this->flip[$type] = true; @@ -445,9 +445,9 @@ * @return String: HTML output, possibly empty if there are no other pages */ private function getSectionPagingLinks( $type ) { - if ( $this->until[$type] !== null ) { + if ( isset( $this->until[$type] ) && $this->until[$type] !== null ) { return $this->pagingLinks( $this->nextPage[$type], $this->until[$type], $type ); - } elseif ( $this->nextPage[$type] !== null || $this->from[$type] !== null ) { + } elseif ( $this->nextPage[$type] !== null || isset( $this->from[$type] ) && $this->from[$type] !== null ) { return $this->pagingLinks( $this->from[$type], $this->nextPage[$type], $type ); } else { return ''; @@ -677,7 +677,8 @@ } $fromOrUntil = false; - if ( $this->from[$pagingType] !== null || $this->until[$pagingType] !== null ) { + if ( ( isset( $this->from[$pagingType] ) && $this->from[$pagingType] !== null ) || + ( isset( $this->until[$pagingType] ) && $this->until[$pagingType] !== null ) ) { $fromOrUntil = true; } -- To view, visit https://gerrit.wikimedia.org/r/51812 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I78793d13745d1fc1010b8e6861bdc3a89a39a87f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Ori.livneh ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Implementing create table in the query interface [DO NOT MERGE] - change (mediawiki...Wikibase)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/51811 Change subject: Implementing create table in the query interface [DO NOT MERGE] .. Implementing create table in the query interface [DO NOT MERGE] Change-Id: I763305af860c44867b7119769f93f5a4e3b62732 --- A repo/includes/Database/MWDB/ExtendedAbstraction.php A repo/includes/Database/MWDB/ExtendedMySQLAbstraction.php M repo/includes/Database/MediaWikiQueryInterface.php M repo/includes/Database/ObservableQueryInterface.php M repo/includes/Database/QueryInterface.php A repo/tests/phpunit/includes/Database/MWDB/ExtendedAbstractionTest.php A repo/tests/phpunit/includes/Database/MWDB/ExtendedMySQLAbstractionTest.php A repo/tests/phpunit/includes/Database/MediaWikiQueryInterfaceTest.php A repo/tests/phpunit/includes/Database/QueryInterfaceTest.php 9 files changed, 319 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/11/51811/1 diff --git a/repo/includes/Database/MWDB/ExtendedAbstraction.php b/repo/includes/Database/MWDB/ExtendedAbstraction.php new file mode 100644 index 000..30bc9dd --- /dev/null +++ b/repo/includes/Database/MWDB/ExtendedAbstraction.php @@ -0,0 +1,97 @@ +http://www.gnu.org/copyleft/gpl.html + * + * @since wd.db + * + * @file + * @ingroup WikibaseRepo + * + * @licence GNU GPL v2+ + * @author Jeroen De Dauw < jeroended...@gmail.com > + */ +abstract class ExtendedAbstraction { + + /** +* @since wd.db +* +* @var DBConnectionProvider +*/ + private $connectionProvider; + + /** +* @since wd.db +* +* @param DBConnectionProvider $connectionProvider +*/ + public function __construct( DBConnectionProvider $connectionProvider ) { + $this->connectionProvider = $connectionProvider; + } + + /** +* @since wd.db +* +* @return DatabaseBase +* @throws InvalidArgumentException +*/ + protected function getDB() { + $db = $this->connectionProvider->getConnection(); + + if ( $db->getType() !== $this->getType() ) { + throw new InvalidArgumentException(); + } + } + + /** +* Create the provided table. +* +* @since wd.db +* +* @param TableDefinition $table +* +* @return boolean Success indicator +*/ + public abstract function createTable( TableDefinition $table ); + + /** +* Returns the type of the supported MW DB abstraction class. +* +* @since wd.db +* +* @return string +*/ + protected abstract function getType(); + +} \ No newline at end of file diff --git a/repo/includes/Database/MWDB/ExtendedMySQLAbstraction.php b/repo/includes/Database/MWDB/ExtendedMySQLAbstraction.php new file mode 100644 index 000..670da8e --- /dev/null +++ b/repo/includes/Database/MWDB/ExtendedMySQLAbstraction.php @@ -0,0 +1,121 @@ +http://www.gnu.org/copyleft/gpl.html + * + * @since wd.db + * + * @file + * @ingroup WikibaseRepo + * + * @licence GNU GPL v2+ + * @author Jeroen De Dauw < jeroended...@gmail.com > + */ +class ExtendedMySQLAbstraction extends ExtendedAbstraction { + + /** +* @see ExtendedAbstraction::getType +* +* @since wd.db +* +* @return string +*/ + protected function getType() { + return 'mysql'; + } + + /** +* @see ExtendedAbstraction::createTable +* +* @since wd.db +* +* @param TableDefinition $table +* +* @return boolean Success indicator +*/ + public function createTable( TableDefinition $table ) { + $db = $this->getDB(); + + $sql = 'CREATE TABLE `' . $db->getDBname() . '`.' . $db->addQuotes( $table->getName() ) . ' ('; + + $fields = array(); + + foreach ( $table->getFields() as $field ) { + $fields[] = $field->getName() . ' ' . $this->getFieldSQL( $field ); + } + + $sql .= implode( ',', $fields ); + + // TODO: table options + $sql .= ') ' . 'ENGINE=InnoDB, DEFAULT CHARSET=binary'; + + $db->query( $sql, __METHOD__ ); + } + + /** +* @since wd.db +* +* @param FieldDefinition $field +* +* @return string +* @throws RuntimeException +*/ + protected function getFieldSQL( FieldDefinition $field ) { + $sql = $this->getFieldType( $field->getType() ); + + if ( $field->getDefault() !== null ) { + $sql .= ' DEFAULT ' . $this->getDB()->addQuotes( $field->getDefault() ); + } + + // TODO: ad
[MediaWiki-commits] [Gerrit] using db71 instead of db71 - change (operations/puppet)
Pyoungmeister has uploaded a new change for review. https://gerrit.wikimedia.org/r/51810 Change subject: using db71 instead of db71 .. using db71 instead of db71 Change-Id: I47e5c9824c7803ef12ec21c3c4b06578e546f78e --- M manifests/role/coredb.pp M manifests/site.pp 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/10/51810/1 diff --git a/manifests/role/coredb.pp b/manifests/role/coredb.pp index da44991..0a3781a 100644 --- a/manifests/role/coredb.pp +++ b/manifests/role/coredb.pp @@ -9,7 +9,7 @@ class role::coredb::config { $topology = { 's1' => { - 'hosts' => { 'pmtpa' => [ 'db32', 'db36', 'db38', 'db59', 'db60', 'db63', 'db67', 'db69', 'db70' ], + 'hosts' => { 'pmtpa' => [ 'db32', 'db36', 'db38', 'db59', 'db60', 'db63', 'db67', 'db69', 'db71' ], 'eqiad' => [ 'db1001', 'db1017', 'db1042', 'db1043', 'db1047', 'db1049', 'db1050'] }, 'primary_site' => $::mw_primary, 'masters' => { 'pmtpa' => "db63", 'eqiad' => "db1017" }, diff --git a/manifests/site.pp b/manifests/site.pp index 54ce0a9..24ca43e 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -340,7 +340,7 @@ } # pmtpa dbs -node /db(32|36|38|59|60|63|69|70)\.pmtpa\.wmnet/ { +node /db(32|36|38|59|60|63|69|71)\.pmtpa\.wmnet/ { if $hostname == "db59" { class { role::coredb::s1 : mariadb => true } } else { -- To view, visit https://gerrit.wikimedia.org/r/51810 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I47e5c9824c7803ef12ec21c3c4b06578e546f78e Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Pyoungmeister ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Only use the click event workaround when it's actually a click - change (mediawiki...GettingStarted)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/51809 Change subject: Only use the click event workaround when it's actually a click .. Only use the click event workaround when it's actually a click Change-Id: I1fba41744488a5a96159e339e524abe9e823b3d6 --- M resources/ext.gettingstarted.js 1 file changed, 25 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GettingStarted refs/changes/09/51809/1 diff --git a/resources/ext.gettingstarted.js b/resources/ext.gettingstarted.js index 0af1ecd..8aa9053 100644 --- a/resources/ext.gettingstarted.js +++ b/resources/ext.gettingstarted.js @@ -53,17 +53,27 @@ } ); } - function launchTaskGuider() { + /** +* Launches an on-page guider +* +* @param {HTMLElement} el help element +* @param {boolean} isClick true if triggered by click, false otherwise +*/ + function launchTaskGuider( el, isClick ) { var $ancestorLi, stepNumber, tourId; - $ancestorLi = $( this ).closest( 'li' ); + $ancestorLi = $( el ).closest( 'li' ); stepNumber = $ancestorLi.index() + 1; tourId = $ancestorLi.data( 'guiderId' ); - // Wait until the event is over before showing it, so the - // event doesn't propagate up and hide the guider we just showed. - window.setTimeout( function () { + if ( isClick ) { + // Wait until the event is over before showing it, so the click + // event doesn't propagate up and hide the guider we just showed. + window.setTimeout( function () { + mw.libs.guiders.resume( tourId ); + }, 0 ); + } else { mw.libs.guiders.resume( tourId ); - }, 0 ); + } } /** @@ -85,11 +95,15 @@ // Show the appropriate step from the gettingstartedpage tour when the user clicks a // question mark help icon. - $taskLis.find( '.onboarding-help' ).click( launchTaskGuider ) - .mouseenter( launchTaskGuider ) - .mouseleave( function() { - gt.hideAll(); - } ); + $taskLis.find( '.onboarding-help' ).click( function () { + launchTaskGuider( this, true ); + } ) + .mouseenter( function () { + launchTaskGuider( this, false ); + } ) + .mouseleave( function() { + gt.hideAll(); + } ); if ( shouldStartTour ) { $( '.onboarding-article-list' ).on( 'click', 'a', prepareToSendOnTour); -- To view, visit https://gerrit.wikimedia.org/r/51809 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1fba41744488a5a96159e339e524abe9e823b3d6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GettingStarted Gerrit-Branch: feature/gettingstartedv2 Gerrit-Owner: Mattflaschen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] paypal form to make corrections before redirect - change (mediawiki...DonationInterface)
Adamw has uploaded a new change for review. https://gerrit.wikimedia.org/r/51808 Change subject: paypal form to make corrections before redirect .. paypal form to make corrections before redirect Change-Id: Ide392956212db511fbbd908ff94986d3ab861544 --- M adyen_gateway/adyen.adapter.php M adyen_gateway/forms/html/adyen.html M amazon_gateway/amazon.adapter.php M donationinterface.php M gateway_common/DataValidator.php M gateway_common/gateway.adapter.php M gateway_forms/rapidhtml/RapidHtmlResources.php M globalcollect_gateway/globalcollect.adapter.php M payflowpro_gateway/payflowpro.adapter.php A paypal_gateway/forms/html/_donation-amount/ARS.html A paypal_gateway/forms/html/_donation-amount/CLP.html A paypal_gateway/forms/html/_donation-amount/EUR.html A paypal_gateway/forms/html/_donation-amount/GBP.html A paypal_gateway/forms/html/_donation-amount/MXP.html A paypal_gateway/forms/html/_donation-amount/RUB.html A paypal_gateway/forms/html/_donation-amount/USD.html A paypal_gateway/forms/html/_donation-amount/default.html A paypal_gateway/forms/html/_personal-information/default.html A paypal_gateway/forms/html/paypal.html A paypal_gateway/forms/js/paypal.js M paypal_gateway/paypal.adapter.php M paypal_gateway/paypal_gateway.body.php 22 files changed, 464 insertions(+), 29 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/08/51808/1 diff --git a/adyen_gateway/adyen.adapter.php b/adyen_gateway/adyen.adapter.php index ce3cef8..ab53d09 100644 --- a/adyen_gateway/adyen.adapter.php +++ b/adyen_gateway/adyen.adapter.php @@ -216,10 +216,209 @@ function getResponseData( $response ) { } - function getCurrencies() { + static function getCurrencies() { + // See http://www.adyen.com/platform/all-countries-all-currencies/ + // This should be the list of all global "acceptance currencies". Not + // finding that list, I've used everything for which we keep + // conversion rates. $currencies = array( - //XXX + 'ADF', // Andorran Franc + 'ADP', // Andorran Peseta + 'AED', // Utd. Arab Emir. Dirham + 'AFA', // Afghanistan Afghani + 'AFN', // Afghanistan Afghani + 'ALL', // Albanian Lek + 'AMD', // Armenian Dram + 'ANG', // NL Antillian Guilder + 'AOA', // Angolan Kwanza + 'AON', // Angolan Old Kwanza + 'ARS', // Argentinian peso + 'ATS', // Austrian Schilling + 'AUD', // Australian Dollar + 'AWG', // Aruban Florin + 'AZM', // Azerbaijan Old Manat + 'AZN', // Azerbaijan New Manat + 'BAM', // Bosnian Mark + 'BBD', // Barbadian dollar + 'BDT', // Bangladeshi Taka + 'BEF', // Belgian Franc + 'BGL', // Bulgarian Old Lev + 'BGN', // Bulgarian Lev + 'BHD', // Bahraini Dinar + 'BIF', // Burundi Franc + 'BMD', // Bermudian Dollar + 'BND', // Brunei Dollar + 'BOB', // Bolivian Boliviano + 'BRL', // Brazilian Real + 'BSD', // Bahamian Dollar + 'BTN', // Bhutan Ngultrum + 'BWP', // Botswana Pula + 'BYR', // Belarusian Ruble + 'BZD', // Belize Dollar + 'CAD', // Canadian Dollar + 'CDF', // Congolese Franc + 'CHF', // Swiss Franc + 'CLP', // Chilean Peso + 'CNY', // Chinese Yuan Renminbi + 'COP', // Colombian Peso + 'CRC', // Costa Rican Colon + 'CUC', // Cuban Convertible Peso + 'CUP', // Cuban Peso + 'CVE', // Cape Verde Escudo + 'CYP', // Cyprus Pound + 'CZK', // Czech Koruna + 'DEM', // German Mark + 'DJF', // Djibouti Franc + 'DKK', // Danish Krone + 'DOP', // Dominican R. Peso + 'DZD', // Algerian Dinar + 'ECS', // Ecuador Sucre + 'EEK', // Estonian Kroon + 'EGP', // Egyptian Pound + 'ESP', // Spanish Peseta + 'ETB', // Ethiopian Birr + 'EUR', // Euro +
[MediaWiki-commits] [Gerrit] Add gettingstarted-welcome-back-site-user and tweak anon msg. - change (mediawiki...GettingStarted)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/51807 Change subject: Add gettingstarted-welcome-back-site-user and tweak anon msg. .. Add gettingstarted-welcome-back-site-user and tweak anon msg. * MediaWiki:gettingstarted-welcome-back-site-user is used for users who manually visit the GettingStarted page. * The anon message is modified to simply be "Getting started" although the parameters remain available. Change-Id: Ia60a5d1175cd7fa024b5388e7135d51c8ffb587c --- M GettingStarted.i18n.php M SpecialGettingStarted.php 2 files changed, 11 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GettingStarted refs/changes/07/51807/1 diff --git a/GettingStarted.i18n.php b/GettingStarted.i18n.php index bc423f7..2bf0c59 100644 --- a/GettingStarted.i18n.php +++ b/GettingStarted.i18n.php @@ -15,7 +15,8 @@ 'gettingstarted-desc' => 'Adds a [[Special:GettingStarted|welcome page]] for new users (shown after account creation)', 'gettingstarted-msg' => '', // Intentionally blank 'gettingstarted-welcomesiteuser' => "Welcome to $1, $2!", - 'gettingstarted-welcomesiteuseranon' => "Welcome to $1!", + 'gettingstarted-welcomesiteuseranon' => "Getting started", + 'gettingstarted-welcome-back-site-user' => "Welcome back, $2", 'gettingstarted-task-header' => 'Here are some ways you can get started. Select an article below and try to improve it.', 'gettingstarted-return' => "← No thanks, return to the page I was reading", 'gettingstarted-project-link' => '{{ns:Project}}:GettingStarted', @@ -46,11 +47,17 @@ 'gettingstarted' => "The name of the extension's entry in [[Special:SpecialPages]]", 'gettingstarted-desc' => '{{desc|name=Getting Started|url=http://www.mediawiki.org/wiki/Extension:GettingStarted}}', 'gettingstarted-msg' => 'Blank message used to replace welcomecreation-msg. Additional dynamically generated task HTML is injected', - 'gettingstarted-welcomesiteuser' => 'The title of the Getting Started page for logged-in users. + 'gettingstarted-welcomesiteuser' => 'The title of the Getting Started page shown automatically to users after they create an account * $1 - sitename * $2 - username; GENDER is supported', - 'gettingstarted-welcomesiteuseranon' => 'The title of the Getting Started page for anonymous users. + 'gettingstarted-welcomesiteuseranon' => 'The title of the Getting Started page for anonymous users who manually visit it. +The parameter is not used in the default message. * $1 - sitename', + 'gettingstarted-welcome-back-site-user' => 'The title of the Getting Started page for logged in users who manually visit it. +These may or may not have seen it when they created their account, depending on account age. +Only $2 is currently used in the default message, but the order is the same as {{msg-mw|gettingstarted-welcomesiteuser}} for consistency. +* $1 - sitename +* $2 - username; GENDER is supported', 'gettingstarted-task-header' => 'Header above task information', 'gettingstarted-return' => 'Text of navigation button for returning to previous page', 'gettingstarted-project-link' => 'Name of page that describes how GettingStarted is used on the wiki', diff --git a/SpecialGettingStarted.php b/SpecialGettingStarted.php index 4034fa3..4997514 100644 --- a/SpecialGettingStarted.php +++ b/SpecialGettingStarted.php @@ -15,7 +15,7 @@ $user = $this->getUser(); if( !$user->isAnon() ) { - $output->setPageTitle( $this->msg( 'gettingstarted-welcomesiteuser', $wgSitename, $user->getName() ) ); + $output->setPageTitle( $this->msg( 'gettingstarted-welcome-back-site-user', $wgSitename, $user->getName() ) ); } else { $output->setPageTitle( $this->msg( 'gettingstarted-welcomesiteuseranon', $wgSitename ) ); } -- To view, visit https://gerrit.wikimedia.org/r/51807 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia60a5d1175cd7fa024b5388e7135d51c8ffb587c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GettingStarted Gerrit-Branch: feature/gettingstartedv2 Gerrit-Owner: Mattflaschen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (bug 45477) Show CSS with JS disabled. - change (mediawiki...GettingStarted)
jenkins-bot has submitted this change and it was merged. Change subject: (bug 45477) Show CSS with JS disabled. .. (bug 45477) Show CSS with JS disabled. Change-Id: I25f2059778910b04fc9906acceb350b2b7870376 --- M GettingStarted.hooks.php M GettingStarted.php M SpecialGettingStarted.php 3 files changed, 10 insertions(+), 2 deletions(-) Approvals: Spage: Checked; Looks good to me, approved jenkins-bot: Verified diff --git a/GettingStarted.hooks.php b/GettingStarted.hooks.php index 2e29110..0d61eaf 100644 --- a/GettingStarted.hooks.php +++ b/GettingStarted.hooks.php @@ -66,6 +66,9 @@ $welcomeCreationMsg = 'gettingstarted-msg'; $specialGS = new SpecialGettingStarted(); $injectHtml = $specialGS->getHtmlResult() . $injectHtml; + + $wgOut->addModuleStyles( 'ext.gettingstarted.styles' ); + $wgOut->addModules( 'ext.gettingstarted.accountcreation' ); return true; diff --git a/GettingStarted.php b/GettingStarted.php index 94fb93f..7b02a51 100644 --- a/GettingStarted.php +++ b/GettingStarted.php @@ -46,11 +46,14 @@ ), ) + $gettingStartedModuleInfo; +// This loads on both account creation and the special page, even if JS is off +$wgResourceModules[ 'ext.gettingstarted.styles' ] = array( + 'styles' => 'ext.gettingstarted.css', +) + $gettingStartedModuleInfo; + // This runs on both account creation and the special page $wgResourceModules[ 'ext.gettingstarted' ] = array( 'scripts' => 'ext.gettingstarted.js', - 'styles' => 'ext.gettingstarted.css', - 'position' => 'top', // For CSS 'dependencies' => array( 'mediawiki.api', 'user.options', diff --git a/SpecialGettingStarted.php b/SpecialGettingStarted.php index 4034fa3..d9b397c 100644 --- a/SpecialGettingStarted.php +++ b/SpecialGettingStarted.php @@ -20,6 +20,8 @@ $output->setPageTitle( $this->msg( 'gettingstarted-welcomesiteuseranon', $wgSitename ) ); } + $output->addModuleStyles( 'ext.gettingstarted.styles' ); + $output->addModules( array( 'ext.guidedTour.tour.gettingstartedpage', 'ext.gettingstarted' -- To view, visit https://gerrit.wikimedia.org/r/51274 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I25f2059778910b04fc9906acceb350b2b7870376 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/GettingStarted Gerrit-Branch: feature/gettingstartedv2 Gerrit-Owner: Mattflaschen Gerrit-Reviewer: Mattflaschen Gerrit-Reviewer: Spage 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 ZeroRatedMobileAccess for i18n updates - change (mediawiki/core)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/51806 Change subject: Update ZeroRatedMobileAccess for i18n updates .. Update ZeroRatedMobileAccess for i18n updates Change-Id: I073773ed2a09034c1cf96c95218b3ee160522c79 --- M extensions/ZeroRatedMobileAccess 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/06/51806/1 diff --git a/extensions/ZeroRatedMobileAccess b/extensions/ZeroRatedMobileAccess index 75d4ae8..3a2a110 16 --- a/extensions/ZeroRatedMobileAccess +++ b/extensions/ZeroRatedMobileAccess -Subproject commit 75d4ae87ab6e105150d167655b2ae19a668ee196 +Subproject commit 3a2a110aa6cf261359fe7b162f1668df57865999 -- To view, visit https://gerrit.wikimedia.org/r/51806 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I073773ed2a09034c1cf96c95218b3ee160522c79 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.21wmf10 Gerrit-Owner: Brion VIBBER ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update ZeroRatedMobileAccess to include new i18n entries - change (mediawiki/core)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/51805 Change subject: Update ZeroRatedMobileAccess to include new i18n entries .. Update ZeroRatedMobileAccess to include new i18n entries Change-Id: Iec39d480670f4894cc2e9afc3a7254454aee8e7d --- M extensions/ZeroRatedMobileAccess 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/05/51805/1 diff --git a/extensions/ZeroRatedMobileAccess b/extensions/ZeroRatedMobileAccess index efdc187..3a2a110 16 --- a/extensions/ZeroRatedMobileAccess +++ b/extensions/ZeroRatedMobileAccess -Subproject commit efdc187289bcbcc4858c93ae2a383b92a83d9740 +Subproject commit 3a2a110aa6cf261359fe7b162f1668df57865999 -- To view, visit https://gerrit.wikimedia.org/r/51805 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iec39d480670f4894cc2e9afc3a7254454aee8e7d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.20wmf1 Gerrit-Owner: Brion VIBBER ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update for new guiders cookie settings. - change (mediawiki...GuidedTour)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/51804 Change subject: Update for new guiders cookie settings. .. Update for new guiders cookie settings. * Default changeCookie to true. * Default to false for single-page tours. * Bumps submodule for this feature. Change-Id: I404bad9f19ef6be7acab41604c199fb032b2aedd --- M modules/ext.guidedTour.lib.js M modules/externals/mediawiki.libs.guiders/mediawiki.libs.guiders.submodule 2 files changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GuidedTour refs/changes/04/51804/1 diff --git a/modules/ext.guidedTour.lib.js b/modules/ext.guidedTour.lib.js index 33c6bfc..4c40b3c 100644 --- a/modules/ext.guidedTour.lib.js +++ b/modules/ext.guidedTour.lib.js @@ -635,6 +635,7 @@ // cookie the users when they are in the tour guiders.cookie = mw.config.get( 'wgCookiePrefix' ) + '-mw-tour'; guiders.cookieParams = { path: '/' }; + guiders._defaultSettings.changeCookie = true; // Don't show X button guiders._defaultSettings.xButton = false; @@ -1124,7 +1125,7 @@ if ( tourSpec.isSinglePage ) { // TODO (mattflaschen, 2013-02-12): This should be specific to the current tour. See https://bugzilla.wikimedia.org/show_bug.cgi?id=44924 - guiders.cookie = ""; + defaults.changeCookie = false; defaults.showEndTour = false; } diff --git a/modules/externals/mediawiki.libs.guiders/mediawiki.libs.guiders.submodule b/modules/externals/mediawiki.libs.guiders/mediawiki.libs.guiders.submodule index 7d86ef3..5006f47 16 --- a/modules/externals/mediawiki.libs.guiders/mediawiki.libs.guiders.submodule +++ b/modules/externals/mediawiki.libs.guiders/mediawiki.libs.guiders.submodule -Subproject commit 7d86ef3ac4896bcae553891d8c2faf02b643320a +Subproject commit 5006f47e63fd3743729105486b2a5f10d50d99f1 -- To view, visit https://gerrit.wikimedia.org/r/51804 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I404bad9f19ef6be7acab41604c199fb032b2aedd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GuidedTour Gerrit-Branch: master Gerrit-Owner: Mattflaschen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add changeCookie as setting for if a guider affects the cookie. - change (mediawiki...guiders)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/51803 Change subject: Add changeCookie as setting for if a guider affects the cookie. .. Add changeCookie as setting for if a guider affects the cookie. * If true, will write to the cookie on show. * endTour will only clear the cookie if the active guider is allowed to affect it. * Minor cleanup Change-Id: I750107297626a45f7c33a4f6b3eba6f404df3bd0 --- M guiders-1.2.8.js 1 file changed, 17 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GuidedTour/guiders refs/changes/03/51803/1 diff --git a/guiders-1.2.8.js b/guiders-1.2.8.js index 3d0e100..50e1149 100644 --- a/guiders-1.2.8.js +++ b/guiders-1.2.8.js @@ -18,13 +18,13 @@ * Enjoy! * * Changes: - * - * - cookie: guiders property allows you to name a cookie that gets updated every time show() is called. Requires jQuery Cookies plugin (https://github.com/carhartl/jquery-cookie) + * + * - cookie: guiders property that allows you to name a cookie to persist tour progress. Requires jQuery Cookie plugin (https://github.com/carhartl/jquery-cookie) * - failStep: guiders property allows you to name a step to show() if the show() case fails (attachTo element is missing). For obvious reasons, this should not have an attachTo * - _buttonClass: property allows you to change the default button "classname" for all guider buttons (default: guider_button) * * - resume(): start up tour from current place in ookie (if set). This is useful when your tour leaves the page you are on. Unlike show, it will skip steps that need to be skipped. - * - endTour(): Like hideAll() but it remembers to remove the cookie position. + * - endTour(): Like hideAll() but it remembers to remove the cookie position if applicable. * - initGuider(): Allows for initializing Guiders without actually creating them (useful when guider is not in the DOM yet. Avoids error: base is null [Break On This Error] var top = base.top; * - autoAdvance: property allows binding to an element (and event) to auto-advance the guider. This is a combination of onShow() binding plus removing of bind when next is done. @@ -83,13 +83,17 @@ shouldSkip: null, //function handler that allows you to skip this function if returns true. title: "Sample title goes here", width: 400, +// Writes cookie when the guider is shown, and clears the cookie if endTour is called when it +// is active. If this true (for one or more guiders) guiders.cookie should be the cookie key. +// You can set this default to true, and/or modify it for specific guiders. +changeCookie: false, xButton: false, // this places a closer "x" button in the top right of the guider _advanceHandler: null //action to do on advance. Set by bindAdvanceHandler closure done on show() }; // Begin additional functionality - guiders.cookie = ""; //set this if you want to write the step to a cookie each show() - guiders.cookieParams = {}; //override default cookie parameters (defaults to session cookie where path = page + guiders.cookie = ""; // Set this to a cookie key, if applicable. + guiders.cookieParams = {}; // Override default cookie parameters (defaults to session cookie where path = page) guiders.failStep = ""; /** * Various common utility handlers you can bind as advance handlers to your @@ -324,7 +328,7 @@ } var attachToHeight = attachTo.innerHeight(); -var attachToWidth = attachTo.innerWidth(); +var attachToWidth = attachTo.innerWidth(); var bufferOffset = 0.9 * guiders._arrowSize; // offsetMap follows the form: [height, width] @@ -383,7 +387,7 @@ } var myGuider = guiders._guiderInits[id]; // this can happen when resume() hits a snag somewhere - if (myGuider.attachTo && guiders.failStep && ($(myGuider.attachTo).length == 0)) { + if (myGuider.attachTo && guiders.failStep && ($(myGuider.attachTo).length == 0)) { throw "Guider attachment not found with id " + myGuider.attachTo; } guiders.createGuider(myGuider); @@ -660,10 +664,11 @@ }; /** - * Like hideAll() but remembers to delete the cookie if set + * Like hideAll() but remembers to delete the cookie if set, and this guider is set to change the cookie */ guiders.endTour = function(omitHidingOverlay) { -if (guiders.cookie) { +var guider = guiders._guiderById(guiders._currentGuiderID); +if (guider.changeCookie) { $.cookie(guiders.cookie, null, guiders.cookieParams); } guiders.hideAll(omitHidingOverlay); @@ -706,12 +711,13 @@ }; guiders.show = function(id) { +var myGuider; if (!id && guiders._lastCreatedGuiderID) { id = guiders._lastCreatedGuiderID; } try { - var myGuider = guiders._guiderById(id); + myGuider = guiders._guiderBy
[MediaWiki-commits] [Gerrit] WIP: Incomplete; Higher priority ext content parsing. - change (mediawiki...Parsoid)
Subramanya Sastry has uploaded a new change for review. https://gerrit.wikimedia.org/r/51802 Change subject: WIP: Incomplete; Higher priority ext content parsing. .. WIP: Incomplete; Higher priority ext content parsing. * Committing expt. work in progress. Will continue Monday. Change-Id: I82e29701875dde7702c504416f4a9487387dbe19 --- M js/lib/mediawiki.tokenizer.peg.js M js/lib/pegTokenizer.pegjs.txt 2 files changed, 69 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/02/51802/1 diff --git a/js/lib/mediawiki.tokenizer.peg.js b/js/lib/mediawiki.tokenizer.peg.js index a9eb410..e05a6a2 100644 --- a/js/lib/mediawiki.tokenizer.peg.js +++ b/js/lib/mediawiki.tokenizer.peg.js @@ -200,9 +200,14 @@ */ PegTokenizer.prototype.tokenize = function( text, production ) { try { - var args = { cb: null, pegTokenizer: this, srcOffset: 0, env: this.env }; - return this.tokenizer.tokenize(text, production || "start", args); + var toks = []; + var args = { cb: function(r) { toks = toks.concat(r); }, pegTokenizer: this, srcOffset: 0, env: this.env }; + // console.warn("text:" + JSON.stringify(text)); + this.tokenizer.tokenize(text, production || "start", args); + return toks; } catch ( e ) { + // console.warn("exc: " + e); + // console.warn("trace: " + e.stack); return false; } }; diff --git a/js/lib/pegTokenizer.pegjs.txt b/js/lib/pegTokenizer.pegjs.txt index 2bbadc5..f127166 100644 --- a/js/lib/pegTokenizer.pegjs.txt +++ b/js/lib/pegTokenizer.pegjs.txt @@ -164,6 +164,18 @@ } } +function charSequence(prefix, c, numChars) { +if (numChars && numChars > 0) { +var buf = [prefix]; +for (var i = 0; i < numChars; i++) { +buf.push(c); +} +return buf.join(''); +} else { +return prefix; +} +} + /* End static utilities */ /* @@ -298,6 +310,8 @@ // text start position var textStart = 0; + +var currExtensionTag = null; // Define block-level tags in JS, so we can use toLowerCase to match tags // case-independently. This would be quite ugly (and possibly slower) if @@ -631,7 +645,8 @@ inline_element = //& { dp('inline_element enter' + input.substr(pos, 10)); return true; } - & '<' ( comment / xmlish_tag ) + & '<' xmlish_tag +/ & '<' comment /// & '{' ( & '{' template / tplarg / template ) / & '{' tplarg_or_template /// & '{' ( tplarg / template ) @@ -1299,19 +1314,62 @@ * and limit the content parsing to this section. */ xmlish_tag = nowiki -/ t:generic_tag { +/ t2:(t:generic_tag { var tagName = t.name; + // TagTk and SelfclosingTagTk if (t.constructor !== EndTagTk && !html5_tag_names[tagName] && !html_old_names[tagName]) { if (t.constructor === TagTk) { -var restOfInput = input.substring(t.dataAttribs.tsr[0]); -var tagContent = restOfInput.match(new RegExp("^(.|\n)*?", "m")); +var tsr0 = t.dataAttribs.tsr[0], +restOfInput = input.substring(tsr0), +tagContent = restOfInput.match(new RegExp("^(.|\n)*?()", "m")); t.dataAttribs.src = tagContent ? tagContent[0] : restOfInput; + +// Replace extension content with dummy content so it matches the +// rule following this match and can be tokenized independently (if required). +// This is just a trick to tokenize ref content with higher priority. +var startTagLen = pos-tsr0, +extContentLen = t.dataAttribs.src.length - startTagLen - tagContent[2].length, +extContent = t.dataAttribs.src.substring(startTagLen, startTagLen+extContentLen); + +t.dataAttribs.extContentOffset = pos; +t.dataAttribs.extContent = extContent; +input = input.slice(0,pos) + charSequence('', '#', extContentLen) + input.slice(pos+extContentLen); } else { t.dataAttribs.src = input.substring(t.dataAttribs.tsr[0], t.dataAttribs.tsr[1]); } +t.dataAttribs.isExt = true; } + +currExtensionTag = t; return t; +}) ( + '#'+ { +// Should only match if we tricked the tokenizer +return currExtensionTag.dataAttribs.isExt && currExtensionTag.constructor !== SelfclosingTagTk; + } + / & { +// Should not match if we tricked the tokenizer +return !currExtensionTag.dataAttribs.isExt || currExtensionTag.constructor === SelfclosingTagTk; + } +) { +var ret = t2; +if (t2.dat
[MediaWiki-commits] [Gerrit] Bug 45378: Fix watchlist star jump - change (mediawiki...MobileFrontend)
awjrichards has submitted this change and it was merged. Change subject: Bug 45378: Fix watchlist star jump .. Bug 45378: Fix watchlist star jump Negative margins are bad mkay. Change-Id: Ide263f75679c5ed8093d6a21fdbdbb9d4d915b7b --- M less/modules/mf-watchstar.less M stylesheets/modules/mf-watchstar.css 2 files changed, 10 insertions(+), 6 deletions(-) Approvals: awjrichards: Verified; Looks good to me, approved diff --git a/less/modules/mf-watchstar.less b/less/modules/mf-watchstar.less index 5f81d90..c7f3863 100644 --- a/less/modules/mf-watchstar.less +++ b/less/modules/mf-watchstar.less @@ -28,10 +28,12 @@ li a.watch-this-article { right: @contentMarginRight; - top: 50%; - height: @searchResultPaddingVertical * 2; + top: 0; + bottom: 0; + height: 100%; width: @searchResultPaddingVertical * 2; - margin: -(@watchThisArticleSize / 2 + 1) 0 0; + background-position: center center; + margin: 0; } #mw-mf-menu-page { diff --git a/stylesheets/modules/mf-watchstar.css b/stylesheets/modules/mf-watchstar.css index 38d948a..8b6cc29 100644 --- a/stylesheets/modules/mf-watchstar.css +++ b/stylesheets/modules/mf-watchstar.css @@ -25,10 +25,12 @@ } li a.watch-this-article { right: 23px; - top: 50%; - height: 24px; + top: 0; + bottom: 0; + height: 100%; width: 24px; - margin: -12px 0 0; + background-position: center center; + margin: 0; } #mw-mf-menu-page a.watch-this-article { position: absolute; -- To view, visit https://gerrit.wikimedia.org/r/51324 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ide263f75679c5ed8093d6a21fdbdbb9d4d915b7b Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jdlrobson Gerrit-Reviewer: JGonera Gerrit-Reviewer: awjrichards Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] story 428: Log username for watch star and photo uploads - change (mediawiki...MobileFrontend)
Brion VIBBER has submitted this change and it was merged. Change subject: story 428: Log username for watch star and photo uploads .. story 428: Log username for watch star and photo uploads Depends on https://gerrit.wikimedia.org/r/51291 for latest schema Change-Id: I950e4a04f7c2a511c9b2af38abfbad5f5fc853ee --- M javascripts/modules/mf-photo.js M javascripts/modules/mf-watchstar.js 2 files changed, 2 insertions(+), 1 deletion(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/javascripts/modules/mf-photo.js b/javascripts/modules/mf-photo.js index 35ef0c3..a1df6b0 100644 --- a/javascripts/modules/mf-photo.js +++ b/javascripts/modules/mf-photo.js @@ -45,6 +45,7 @@ M.log( 'MobileWebUploads', $.extend( { token: M.getSessionId(), funnel: funnel, + username: mw.config.get( 'wgUserName' ), isEditable: M.getConfig( 'can_edit' ), mobileMode: M.getConfig( 'alpha' ) ? 'alpha' : ( M.getConfig( 'beta' ) ? 'beta' : 'stable' ), userAgent: window.navigator.userAgent diff --git a/javascripts/modules/mf-watchstar.js b/javascripts/modules/mf-watchstar.js index 6eaa4ce..4573ad3 100644 --- a/javascripts/modules/mf-watchstar.js +++ b/javascripts/modules/mf-watchstar.js @@ -14,7 +14,7 @@ isStable: M.getConfig( 'alpha' ) ? 'alpha' : ( M.getConfig( 'beta' ) ? 'beta' : 'stable' ), token: lastToken || '+\\', // +\\ for anon - userId: mw.config.get( 'wgUserId' ) || undefined + username: mw.config.get( 'wgUserName' ) || '' }; M.log( 'MobileBetaWatchlist', data ); -- To view, visit https://gerrit.wikimedia.org/r/51292 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I950e4a04f7c2a511c9b2af38abfbad5f5fc853ee Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jdlrobson Gerrit-Reviewer: Brion VIBBER Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Story 428: update schemas to latest revisions - change (operations/mediawiki-config)
Brion VIBBER has submitted this change and it was merged. Change subject: Story 428: update schemas to latest revisions .. Story 428: update schemas to latest revisions Change-Id: I6c289dc99bf212cd3ec266d6501bd9a90656e047 --- M wmf-config/mobile.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved jenkins-bot: Checked diff --git a/wmf-config/mobile.php b/wmf-config/mobile.php index 70bc113..9c31522 100644 --- a/wmf-config/mobile.php +++ b/wmf-config/mobile.php @@ -148,7 +148,7 @@ $wgResourceModules['mobile.watchlist.schema'] = array( 'class' => 'ResourceLoaderSchemaModule', 'schema' => 'MobileBetaWatchlist', - 'revision' => 5235429, + 'revision' => 5281061, 'targets' => 'mobile', 'mobileTargets' => array( 'stable', 'beta', 'alpha' ), ); @@ -156,7 +156,7 @@ $wgResourceModules['mobile.uploads.schema'] = array( 'class' => 'ResourceLoaderSchemaModule', 'schema' => 'MobileWebUploads', - 'revision' => 5246000, + 'revision' => 5281063, 'targets' => 'mobile', 'mobileTargets' => array( 'stable', 'beta', 'alpha' ), ); -- To view, visit https://gerrit.wikimedia.org/r/51291 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6c289dc99bf212cd3ec266d6501bd9a90656e047 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Jdlrobson Gerrit-Reviewer: Brion VIBBER Gerrit-Reviewer: Demon 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 44646: Standardise account creation and login forms - change (mediawiki...MobileFrontend)
Brion VIBBER has submitted this change and it was merged. Change subject: Bug 44646: Standardise account creation and login forms .. Bug 44646: Standardise account creation and login forms While there clean up a regression with error messages from hamburger standardisation Change-Id: I71fbf2f976c587dd4c2123254a4064657943c8d1 --- M less/common/mf-navigation.less M less/specials/userlogin.less M stylesheets/common/mf-navigation.css M stylesheets/specials/userlogin.css 4 files changed, 23 insertions(+), 35 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved jenkins-bot: Checked diff --git a/less/common/mf-navigation.less b/less/common/mf-navigation.less index 1f2d452..f8c8366 100644 --- a/less/common/mf-navigation.less +++ b/less/common/mf-navigation.less @@ -5,8 +5,8 @@ @overlayAlertSuccessColor: green; @overlayAlertErrorBorderColor: #D00; @overlayAlertErrorBackgroundColor: #FAE1E1; -@overlayAlertPadding: 8px; -@overlayBorderWidth: 2px; +@overlayAlertPadding: 0.5em 1em; +@overlayBorderWidth: 1px; @toastNotificationColor: #373737; #mw-mf-header form, @@ -319,12 +319,11 @@ .alert { padding: @overlayAlertPadding; - margin: 0 @searchBoxMarginLeft 0 @searchBoxMarginLeft; background-repeat: no-repeat; background-position: @overlayAlertPadding center; - margin-bottom: @overlayAlertPadding; + margin-bottom: 1em; min-height: 64px; - font-size: @baseFontSize * 1.3; + font-size: @baseFontSize; &.success { padding-left: ( 80px + @overlayAlertPadding ); diff --git a/less/specials/userlogin.less b/less/specials/userlogin.less index 2f64ec9..54dd5ce 100644 --- a/less/specials/userlogin.less +++ b/less/specials/userlogin.less @@ -37,11 +37,6 @@ } } -#mw-mf-login .headmsg { - margin-left: @searchBoxMarginLeft; - margin-right: @searchBoxMarginLeft; -} - #mw-mf-accountcreate { .alert { margin-left: 0; @@ -78,9 +73,11 @@ input.loginPassword, input.loginText { font-family: @fontFamily; - font-size: @baseFontSize * 1.25; + font-size: @baseFontSize * 0.9; .box-sizing(border-box); - .border-radius(0); + border: 1px solid #C9C9C9; + box-shadow: none; + .border-radius(5px); width: 100%; padding: ( @inputFontSize/2 ) ( @inputFontSize * 1.5 ) ( @inputFontSize/2 ) ( @overlayHeadingIndent ); } @@ -90,16 +87,13 @@ margin-top: 20px; display: block; } - - #wpLoginAttempt { - font-size: @baseFontSize * 1.3; - } } /* sign up form */ form#userlogin2 { input { + box-shadow: none; display: block; width: 100%; padding: 0; diff --git a/stylesheets/common/mf-navigation.css b/stylesheets/common/mf-navigation.css index bc263cb..ba87c81 100644 --- a/stylesheets/common/mf-navigation.css +++ b/stylesheets/common/mf-navigation.css @@ -392,21 +392,20 @@ margin: 0 5px; } .alert { - padding: 8px; - margin: 0 40px 0 40px; + padding: 0.5em 1em; background-repeat: no-repeat; - background-position: 8px center; - margin-bottom: 8px; + background-position: 0.5em 1em center; + margin-bottom: 1em; min-height: 64px; - font-size: 1.3em; + font-size: 1em; } .alert.success { - padding-left: 88px; - border: solid 2px #008000; + padding-left: 80px; + border: solid 1px #008000; background-image: url(images/success.png); } .alert.error { - border: solid 2px #dd; + border: solid 1px #dd; background-color: #fae1e1; } .alert h2 { diff --git a/stylesheets/specials/userlogin.css b/stylesheets/specials/userlogin.css index ca8620e..828e5dc 100644 --- a/stylesheets/specials/userlogin.css +++ b/stylesheets/specials/userlogin.css @@ -21,10 +21,6 @@ padding: 0.5em 1em; margin: 1em 0; } -#mw-mf-login .headmsg { - margin-left: 40px; - margin-right: 40px; -} #mw-mf-accountcreate .alert { margin-left: 0; margin-right: 0; @@ -54,14 +50,16 @@ table.user-login input.loginPassword, table.user-login input.loginText { font-family: "Helvetica Neue", "Helvetica", "Arial", sans-serif; - font-size: 1.25em; + font-size: 0.9em; -moz-box-sizing: border-box; -o-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; + border: 1px solid #C9C9C9; + box-shadow: none; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; width: 100%; padding: 1em 3em 1em 0.4em; } @@ -70,11 +68,9 @@ margin-top: 20px; display: block; } -table.user-login #wpLoginAttempt { - font-size: 1.3em; -} /* sign up form */ form#userlogin2 input { + box-
[MediaWiki-commits] [Gerrit] Bug 44693: Ensure uploads dashboard uploads are in correct o... - change (mediawiki...MobileFrontend)
Brion VIBBER has submitted this change and it was merged. Change subject: Bug 44693: Ensure uploads dashboard uploads are in correct order .. Bug 44693: Ensure uploads dashboard uploads are in correct order Map to an array and use timestamp to sort before rendering. Sigh damn you api... Change-Id: Ifc58cfe06267123decf100bb27a0c3f8ef3b6bb5 --- M javascripts/specials/donateimage.js 1 file changed, 16 insertions(+), 3 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved jenkins-bot: Checked diff --git a/javascripts/specials/donateimage.js b/javascripts/specials/donateimage.js index 7fdf976..29439b1 100644 --- a/javascripts/specials/donateimage.js +++ b/javascripts/specials/donateimage.js @@ -40,8 +40,12 @@ function getImageDataFromPage( page ) { var img = page.imageinfo[0]; - return { url: img.thumburl, fileName: img.name, title: page.title, - descriptionUrl: img.descriptionurl }; + return { + url: img.thumburl, + title: page.title, + timestamp: img.timestamp, + descriptionUrl: img.descriptionurl + }; } function extractDescription( text ) { @@ -97,7 +101,8 @@ gailimit: 10, prop: 'imageinfo', origin: corsUrl ? M.getOrigin() : undefined, - iiprop: 'url', + // FIXME: have to request timestamp since api returns a json rather than an array thus we need a way to sort + iiprop: 'url|timestamp', iiurlwidth: IMAGE_WIDTH }, xhrFields: { @@ -112,7 +117,15 @@ data[ this.title ] = getImageDataFromPage( this ); } ); appendDescriptions( data, function( imageData ) { + var fileArray = []; + // FIXME: API work around - in an ideal world imageData would be an array $.each( imageData, function() { + fileArray.push( this ); + } ); + fileArray = fileArray.sort( function( a, b ) { + return a.timestamp > b.timestamp ? 1 : -1; + } ); + $.each( fileArray, function() { userGallery.addPhoto( this ); } ); } ); -- To view, visit https://gerrit.wikimedia.org/r/51297 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifc58cfe06267123decf100bb27a0c3f8ef3b6bb5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jdlrobson Gerrit-Reviewer: Brion VIBBER Gerrit-Reviewer: JGonera 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 release 1.9 notes - change (mediawiki...SemanticMediaWiki)
Jeroen De Dauw has submitted this change and it was merged. Change subject: Update release 1.9 notes .. Update release 1.9 notes Change-Id: Ia80d01841f8ab5b3dbd5b9e9d4fb66e2ea1db457 --- M RELEASE-NOTES-1.9 1 file changed, 12 insertions(+), 3 deletions(-) Approvals: Jeroen De Dauw: Looks good to me, approved diff --git a/RELEASE-NOTES-1.9 b/RELEASE-NOTES-1.9 index 708d9b6..2d1e5bb 100644 --- a/RELEASE-NOTES-1.9 +++ b/RELEASE-NOTES-1.9 @@ -13,6 +13,7 @@ * Restored compatibility with SQLite * Support for quantity export via API and JSON format (I17a3e046) * Removed old storage implementation SMWSQLStore2, superseded by SMWSQLStore3 in SMW 1.8 +* #set_recurring_event create individual subobjects (changes query behaviour for recurring events; for more see [[Help:Recurring_events]]) (I5db911e536) === New features === @@ -42,14 +43,22 @@ * SMWListResultPrinter, SMWResultPrinter, SMWSubobject, SMWSet * SMWFeedResultPrinter, SMWDISerializer -* SMWDIString, SMWStringLengthException +* SMWDIString, SMWStringLengthException, SMWSetRecurringEvent === Unit tests === -* Add PHPUnit tests FormatFactoryTest.php, QueryProcessorTest.php, ParserParameterTest.php -:DefinesTest.php, GlobalFunctionsTest.php, HighlighterTest.php, SubobjectTest.php +* Add PHPUnit tests +: FormatFactoryTest.php, QueryProcessorTest.php, ParserParameterTest.php +: DefinesTest.php, GlobalFunctionsTest.php, HighlighterTest.php +: SubobjectTest.php, SubobjectTest.php, SubobjectHandlerTest.php, +: RecurringEventsTest.php * Add QUnit tests ext.smw.test, ext.smw.util.tooltip +: ext.smw.api.test.js, ext.smw.data.test.js, ext.smw.query.test.js +: ext.smw.dataItem.number.test.js, ext.smw.dataItem.property.test.js, +: ext.smw.dataItem.text.test.js, ext.smw.dataItem.time.test.js +: ext.smw.dataItem.unknown.test.js, ext.smw.dataItem.uri.test.js +: ext.smw.dataItem.wikiPage.test.js, ext.smw.dataValue.quantity.test.js === Extended translations === -- To view, visit https://gerrit.wikimedia.org/r/51692 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia80d01841f8ab5b3dbd5b9e9d4fb66e2ea1db457 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SemanticMediaWiki Gerrit-Branch: master Gerrit-Owner: Mwjames Gerrit-Reviewer: Jeroen De Dauw Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] testInvalidEmail() passes now without local config - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: testInvalidEmail() passes now without local config .. testInvalidEmail() passes now without local config ApiAccountCreationTest::testInvalidEmail() no longer needs LocalSettings to have $wgEnableEmail = true; Change-Id: I97803be116fda8194e46fe0021c7b32d7b703b1d --- M tests/phpunit/includes/api/ApiAccountCreationTest.php 1 file changed, 1 insertion(+), 4 deletions(-) Approvals: Parent5446: Looks good to me, approved Umherirrender: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/tests/phpunit/includes/api/ApiAccountCreationTest.php b/tests/phpunit/includes/api/ApiAccountCreationTest.php index f37e279..94082e5 100644 --- a/tests/phpunit/includes/api/ApiAccountCreationTest.php +++ b/tests/phpunit/includes/api/ApiAccountCreationTest.php @@ -9,6 +9,7 @@ function setUp() { parent::setUp(); LoginForm::setCreateaccountToken(); + $this->setMwGlobals( array( 'wgEnableEmail' => true ) ); } /** @@ -141,10 +142,6 @@ * @expectedException UsageException */ function testInvalidEmail() { - global $wgEnableEmail; - if ( !$wgEnableEmail ) { - $this->markTestSkipped( 'email is not enabled, so createaccount does not check it' ); - } $this->doApiRequest( array( 'action' => 'createaccount', 'name' => 'Test User', -- To view, visit https://gerrit.wikimedia.org/r/48251 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I97803be116fda8194e46fe0021c7b32d7b703b1d Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Platonides Gerrit-Reviewer: Hazard-SJ Gerrit-Reviewer: Parent5446 Gerrit-Reviewer: Siebrand Gerrit-Reviewer: Umherirrender Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] SMW\Settings class as replacement for $GLOBALS settings - change (mediawiki...SemanticMediaWiki)
Mwjames has uploaded a new change for review. https://gerrit.wikimedia.org/r/51800 Change subject: SMW\Settings class as replacement for $GLOBALS settings .. SMW\Settings class as replacement for $GLOBALS settings This code is mostly borrowed from the EducationProgram extension so credit goes to Jeroen. Modified in a way that we are not allow mixed settings notion. Meaning ones a setting uses the new style, $GLOBALS are checked in order to avoid having an old style notion being still used where the a new style is expected. This will avoid confusion about which setting is actually in use. Change-Id: I38be2414a5c73fe30a0746db96889edc1ff293e0 --- M SemanticMediaWiki.settings.php A includes/Settings.php M includes/Setup.php M includes/parserhooks/RecurringEvents.php M includes/parserhooks/RecurringEventsHandler.php A tests/phpunit/includes/SettingsTest.php M tests/phpunit/includes/parserhooks/RecurringEventsTest.php 7 files changed, 223 insertions(+), 26 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticMediaWiki refs/changes/00/51800/1 diff --git a/SemanticMediaWiki.settings.php b/SemanticMediaWiki.settings.php index e31ed4d..be7d7f2 100644 --- a/SemanticMediaWiki.settings.php +++ b/SemanticMediaWiki.settings.php @@ -181,15 +181,6 @@ ## ### -# Settings for recurring events, created with the #set_recurring_event parser -# function: the default number of instances defined, if no end date is set; -# and the maximum number that can be defined, regardless of end date. -## -$smwgDefaultNumRecurringEvents = 100; -$smwgMaxNumRecurringEvents = 500; -## - -### # Should the browse view for incoming links show the incoming links via its # inverses, or shall they be displayed on the other side? ## @@ -528,3 +519,16 @@ ## $smwgAutoRefreshSubject = true; ## + +## +# SMW 1.9 USE NEW SETTINGS CLASS # +## + +### +# Settings for recurring events, created with the #set_recurring_event parser +# function: the default number of instances defined, if no end date is set; +# and the maximum number that can be defined, regardless of end date. +## +$smwgSettings['DefaultNumRecurringEvents'] = 100; +$smwgSettings['MaxNumRecurringEvents'] = 500; +## \ No newline at end of file diff --git a/includes/Settings.php b/includes/Settings.php new file mode 100644 index 000..630306e --- /dev/null +++ b/includes/Settings.php @@ -0,0 +1,107 @@ +http://www.gnu.org/copyleft/gpl.html + * + * @since 1.9 + * + * @file + * @ingroup SMW + * + * @licence GNU GPL v2+ + * @author Jeroen De Dauw < jeroended...@gmail.com > + * @author mwjames + */ +class Settings { + + /** +* Defines settings property +* @var array +*/ + protected $settings; + + /** +* Constructor +* +* @since 1.9 +* +* @param array $settings +*/ + public function __construct( array $settings ) { + $this->settings = $settings; + } + + /** +* Construct a new instance of the settings object from global state +* +* This is convenience method available as static function as it does +* not create any dependency and enables easy access to the class +* instance +* +* @since 1.9 +* +* @param array $globals +* +* @return Settings +*/ + public static function newFromGlobals( $globals = '' ) { + if ( is_array( $globals ) ) { + return new self( $globals['smwgSettings'] ); + } else { + return new self( $GLOBALS['smwgSettings'] ); + } + } + + /** +* Returns values for a specific setting +* +* @since 1.9 +* +* @param string $name +* +* @return mixed +*/ + public function get( $name ) { + + // For compatibility reasons until all settings are converted, check if + // an old setting is still in use + if ( $name ){ + // Build old settings name + $globalsName = 'smwg' . $name; + + // Enforce setting class by throwing an exception for configurations + // that are still in use within the global namespace but are in use + // of the new Settings class (meaning someone still uses an old style + // setting in LocalSettings for an already converted setting name) + if ( isset ( $GLOBALS[$globalsName] ) ) { + throw new MWException( "{$globalsName} is used as deprecated settings notion (see LocalSettings)" ); +
[MediaWiki-commits] [Gerrit] [FileBackend] Process cache negatives for file SHA1 function. - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: [FileBackend] Process cache negatives for file SHA1 function. .. [FileBackend] Process cache negatives for file SHA1 function. Change-Id: I2a6b801cd97e8ee1a678a43d5f6d01d3e9603637 --- M includes/filebackend/FileBackendStore.php 1 file changed, 1 insertion(+), 4 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/filebackend/FileBackendStore.php b/includes/filebackend/FileBackendStore.php index b906af5..53c2698 100644 --- a/includes/filebackend/FileBackendStore.php +++ b/includes/filebackend/FileBackendStore.php @@ -767,10 +767,7 @@ $hash = $this->doGetFileSha1Base36( $params ); wfProfileOut( __METHOD__ . '-miss-' . $this->name ); wfProfileOut( __METHOD__ . '-miss' ); - if ( $hash ) { // don't cache negatives - $this->cheapCache->set( $path, 'sha1', - array( 'hash' => $hash, 'latest' => $latest ) ); - } + $this->cheapCache->set( $path, 'sha1', array( 'hash' => $hash, 'latest' => $latest ) ); wfProfileOut( __METHOD__ . '-' . $this->name ); wfProfileOut( __METHOD__ ); return $hash; -- To view, visit https://gerrit.wikimedia.org/r/50936 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2a6b801cd97e8ee1a678a43d5f6d01d3e9603637 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz Gerrit-Reviewer: Hashar Gerrit-Reviewer: Tim Starling Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rearrange webserver dependencies so that openstack and media... - change (operations/puppet)
Andrew Bogott has uploaded a new change for review. https://gerrit.wikimedia.org/r/51799 Change subject: Rearrange webserver dependencies so that openstack and mediawiki::singlenode classes can play nice together. .. Rearrange webserver dependencies so that openstack and mediawiki::singlenode classes can play nice together. Change-Id: I63254ef3e076644546d800cf9823c2917f2ab373 --- M modules/mediawiki_singlenode/manifests/init.pp 1 file changed, 11 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/99/51799/1 diff --git a/modules/mediawiki_singlenode/manifests/init.pp b/modules/mediawiki_singlenode/manifests/init.pp index 69b2205..b0431fa 100644 --- a/modules/mediawiki_singlenode/manifests/init.pp +++ b/modules/mediawiki_singlenode/manifests/init.pp @@ -18,17 +18,20 @@ $install_path = "/srv/mediawiki", $role_config_lines = [], $memcached_size = 128) { -require "role::labs-mysql-server", - "webserver::php5-mysql", - "webserver::php5" +if !defined(Class["webserver::php5"]) { +class {'webserver::php5': ssl => 'true'; } +} + require "role::labs-mysql-server", "webserver::php5-mysql" package { [ "imagemagick", "php-apc", ] : ensure => latest } - class { "memcached": - memcached_ip => "127.0.0.1", - memcached_size => $memcached_size } +if !defined(Class["memcached"]) { + class { "memcached": + memcached_ip => "127.0.0.1", + memcached_size => $memcached_size } + } git::clone { "mediawiki": directory => $install_path, @@ -99,10 +102,10 @@ } } - apache_site { controller: name => "wiki" } + apache_site { wikicontroller: name => "wiki" } exec { 'apache_restart': - require => [Apache_site['controller']], + require => [Apache_site['wikicontroller']], command => "/usr/sbin/service apache2 restart" } -- To view, visit https://gerrit.wikimedia.org/r/51799 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I63254ef3e076644546d800cf9823c2917f2ab373 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew Bogott ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Switch the openstack manifest to use webserver::php5. - change (operations/puppet)
Andrew Bogott has uploaded a new change for review. https://gerrit.wikimedia.org/r/51798 Change subject: Switch the openstack manifest to use webserver::php5. .. Switch the openstack manifest to use webserver::php5. Previously it was using kind of a roll-your-own apache setup that was local to this file. Changing it to use a shared class should make it slightly easier to coexist with other classes. Change-Id: I684c8a05a1980fb7de91de38b4cbb6d19414649f --- M manifests/openstack.pp 1 file changed, 19 insertions(+), 23 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/98/51798/1 diff --git a/manifests/openstack.pp b/manifests/openstack.pp index 79bbaf8..368ef1d 100644 --- a/manifests/openstack.pp +++ b/manifests/openstack.pp @@ -136,7 +136,7 @@ ensure => present; } - package { [ "unzip", "vblade-persist", "python-mysqldb", "bridge-utils", "ebtables", "mysql-client", "mysql-common" ]: + package { [ "unzip", "vblade-persist", "python-mysqldb", "bridge-utils", "ebtables", "mysql-common" ]: ensure => present; } @@ -273,49 +273,41 @@ $keystone_db_user = $keystoneconfig["db_user"] $keystone_db_pass = $keystoneconfig["db_pass"] - package { "mysql-server": - ensure => present; - } - - service { "mysql": - enable => true, - require => Package["mysql-server"], - ensure => running; - } + require generic::mysql::packages::server # TODO: This expects the services to be installed in the same location exec { 'set_root': onlyif => "/usr/bin/mysql -uroot --password=''", command => "/usr/bin/mysql -uroot --password='' mysql < /etc/nova/mysql.sql", - require => [Package["mysql-client"],File["/etc/nova/mysql.sql"]], + require => File["/etc/nova/mysql.sql"], before => Exec['create_nova_db']; 'create_nova_db_user': unless => "/usr/bin/mysql --defaults-file=/etc/nova/nova-user.cnf -e 'exit'", command => "/usr/bin/mysql -uroot < /etc/nova/nova-user.sql", - require => [Package["mysql-client"],File["/etc/nova/nova-user.sql", "/etc/nova/nova-user.cnf", "/root/.my.cnf"]]; + require => File["/etc/nova/nova-user.sql", "/etc/nova/nova-user.cnf", "/root/.my.cnf"]; 'create_nova_db': unless => "/usr/bin/mysql -uroot $nova_db_name -e 'exit'", command => "/usr/bin/mysql -uroot -e \"create database $nova_db_name;\"", - require => [Package["mysql-client"], File["/root/.my.cnf"]], + require => File["/root/.my.cnf"], before => Exec['create_nova_db_user']; 'create_puppet_db_user': unless => "/usr/bin/mysql --defaults-file=/etc/puppet/puppet-user.cnf -e 'exit'", command => "/usr/bin/mysql -uroot < /etc/puppet/puppet-user.sql", - require => [Package["mysql-client"],File["/etc/puppet/puppet-user.sql", "/etc/puppet/puppet-user.cnf", "/root/.my.cnf"]]; + require => File["/etc/puppet/puppet-user.sql", "/etc/puppet/puppet-user.cnf", "/root/.my.cnf"]; 'create_puppet_db': unless => "/usr/bin/mysql -uroot $puppet_db_name -e 'exit'", command => "/usr/bin/mysql -uroot -e \"create database $puppet_db_name;\"", - require => [Package["mysql-client"], File["/root/.my.cnf"]], + require => File["/root/.my.cnf"], before => Exec['create_puppet_db_user']; 'create_glance_db_user': unless => "/usr/bin/mysql --defaults-file=/etc/glance/glance-user.cnf -e 'exit'", command => "/usr/bin/mysql -uroot < /etc/glance/glance-user.sql", - require => [Package['mysql-client'], File["/etc/glance/glance-user.sql","/etc/glance/glance-user.cnf","/root/.my.cnf"]]; + require => File["/etc/glance/glance-user.sql","/etc/glance/glance-user.cnf","/root/.my.cnf"]; 'create_glance_db': unless => "/usr/bin/mysql -uroot $glance_db_name -e 'exit'", command => "/usr/bin/mysql -uroot -e \"create database $glance_db_name;\"", - require => [Package['mysql-client'], File["/root/.my.cnf"]], + require => File["/root/.my.cnf"], before => Exec['create_glance_db_user']; } @@ -324,11 +316,11 @@ 'create_keystone_db_us
[MediaWiki-commits] [Gerrit] Fix up the mediawiki extension class a bit. - change (operations/puppet)
Andrew Bogott has uploaded a new change for review. https://gerrit.wikimedia.org/r/51797 Change subject: Fix up the mediawiki extension class a bit. .. Fix up the mediawiki extension class a bit. Change-Id: Ia674ceaa6d670b2c9f3240575b361aab41eec63a --- M modules/mediawiki_singlenode/manifests/mw-extension.pp 1 file changed, 2 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/97/51797/1 diff --git a/modules/mediawiki_singlenode/manifests/mw-extension.pp b/modules/mediawiki_singlenode/manifests/mw-extension.pp index 11fdadb..d3f3eda 100644 --- a/modules/mediawiki_singlenode/manifests/mw-extension.pp +++ b/modules/mediawiki_singlenode/manifests/mw-extension.pp @@ -2,12 +2,8 @@ define mw-extension( # defaults $branch="master", - $ssh="", - $owner="root", - $group="root", - $timeout="300", - $depth="full", - $mode=0755) { + $ensure=present, + $install_path="") { git::clone { "$name": require => git::clone["mediawiki"], directory => "${install_path}/extensions/${name}", -- To view, visit https://gerrit.wikimedia.org/r/51797 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia674ceaa6d670b2c9f3240575b361aab41eec63a Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew Bogott ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added optional wiki_name setting - change (operations/puppet)
Andrew Bogott has uploaded a new change for review. https://gerrit.wikimedia.org/r/51796 Change subject: Added optional wiki_name setting .. Added optional wiki_name setting Change-Id: I933abc9670f27feed52b0596aed3fe32a7b9c606 --- M modules/mediawiki_singlenode/manifests/init.pp 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/96/51796/1 diff --git a/modules/mediawiki_singlenode/manifests/init.pp b/modules/mediawiki_singlenode/manifests/init.pp index 5a56259..69b2205 100644 --- a/modules/mediawiki_singlenode/manifests/init.pp +++ b/modules/mediawiki_singlenode/manifests/init.pp @@ -13,6 +13,7 @@ # Memcached memory usage defaults to 128 megs but can be changed via $memcached_size. class mediawiki_singlenode( $ensure = 'present', $database_name = "testwiki", + $wiki_name = "testwiki", $role_requires = [], $install_path = "/srv/mediawiki", $role_config_lines = [], @@ -82,7 +83,7 @@ exec { 'mediawiki_setup': require => [git::clone["mediawiki"], File["${install_path}/orig"], exec['password_gen']], creates => "${install_path}/orig/LocalSettings.php", - command => "/usr/bin/php ${install_path}/maintenance/install.php testwiki admin --dbname $database_name --dbuser root --passfile \"${install_path}/orig/adminpass\" --server $mwserver --scriptpath \"${install_path}\" --confpath \"${install_path}/orig/\"", + command => "/usr/bin/php ${install_path}/maintenance/install.php $wiki_name admin --dbname $database_name --dbuser root --passfile \"${install_path}/orig/adminpass\" --server $mwserver --scriptpath \"${install_path}\" --confpath \"${install_path}/orig/\"", logoutput => "on_failure", } -- To view, visit https://gerrit.wikimedia.org/r/51796 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I933abc9670f27feed52b0596aed3fe32a7b9c606 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew Bogott ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] adding db69 and db70 as pmtpa enwiki slaves - change (operations/puppet)
Pyoungmeister has submitted this change and it was merged. Change subject: adding db69 and db70 as pmtpa enwiki slaves .. adding db69 and db70 as pmtpa enwiki slaves Change-Id: I0f72cb175b140c44b15c85301938c7d0f781acd3 --- M manifests/role/coredb.pp M manifests/site.pp 2 files changed, 3 insertions(+), 3 deletions(-) Approvals: Pyoungmeister: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/coredb.pp b/manifests/role/coredb.pp index c92707e..da44991 100644 --- a/manifests/role/coredb.pp +++ b/manifests/role/coredb.pp @@ -9,7 +9,7 @@ class role::coredb::config { $topology = { 's1' => { - 'hosts' => { 'pmtpa' => [ 'db32', 'db36', 'db38', 'db59', 'db60', 'db63', 'db67' ], + 'hosts' => { 'pmtpa' => [ 'db32', 'db36', 'db38', 'db59', 'db60', 'db63', 'db67', 'db69', 'db70' ], 'eqiad' => [ 'db1001', 'db1017', 'db1042', 'db1043', 'db1047', 'db1049', 'db1050'] }, 'primary_site' => $::mw_primary, 'masters' => { 'pmtpa' => "db63", 'eqiad' => "db1017" }, diff --git a/manifests/site.pp b/manifests/site.pp index 078348b..54ce0a9 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -340,7 +340,7 @@ } # pmtpa dbs -node /db(32|36|38|59|60|63)\.pmtpa\.wmnet/ { +node /db(32|36|38|59|60|63|69|70)\.pmtpa\.wmnet/ { if $hostname == "db59" { class { role::coredb::s1 : mariadb => true } } else { @@ -451,7 +451,7 @@ ## not in use for various reasons -node /db(42|6[129]|7[0-7])\.pmtpa\.wmnet/{ +node /db(42|6[12]|7[1-7])\.pmtpa\.wmnet/{ include standard } -- To view, visit https://gerrit.wikimedia.org/r/51795 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0f72cb175b140c44b15c85301938c7d0f781acd3 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Pyoungmeister Gerrit-Reviewer: Pyoungmeister Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] adding db69 and db70 as pmtpa enwiki slaves - change (operations/puppet)
Pyoungmeister has uploaded a new change for review. https://gerrit.wikimedia.org/r/51795 Change subject: adding db69 and db70 as pmtpa enwiki slaves .. adding db69 and db70 as pmtpa enwiki slaves Change-Id: I0f72cb175b140c44b15c85301938c7d0f781acd3 --- M manifests/role/coredb.pp M manifests/site.pp 2 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/95/51795/1 diff --git a/manifests/role/coredb.pp b/manifests/role/coredb.pp index c92707e..da44991 100644 --- a/manifests/role/coredb.pp +++ b/manifests/role/coredb.pp @@ -9,7 +9,7 @@ class role::coredb::config { $topology = { 's1' => { - 'hosts' => { 'pmtpa' => [ 'db32', 'db36', 'db38', 'db59', 'db60', 'db63', 'db67' ], + 'hosts' => { 'pmtpa' => [ 'db32', 'db36', 'db38', 'db59', 'db60', 'db63', 'db67', 'db69', 'db70' ], 'eqiad' => [ 'db1001', 'db1017', 'db1042', 'db1043', 'db1047', 'db1049', 'db1050'] }, 'primary_site' => $::mw_primary, 'masters' => { 'pmtpa' => "db63", 'eqiad' => "db1017" }, diff --git a/manifests/site.pp b/manifests/site.pp index 078348b..54ce0a9 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -340,7 +340,7 @@ } # pmtpa dbs -node /db(32|36|38|59|60|63)\.pmtpa\.wmnet/ { +node /db(32|36|38|59|60|63|69|70)\.pmtpa\.wmnet/ { if $hostname == "db59" { class { role::coredb::s1 : mariadb => true } } else { @@ -451,7 +451,7 @@ ## not in use for various reasons -node /db(42|6[129]|7[0-7])\.pmtpa\.wmnet/{ +node /db(42|6[12]|7[1-7])\.pmtpa\.wmnet/{ include standard } -- To view, visit https://gerrit.wikimedia.org/r/51795 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0f72cb175b140c44b15c85301938c7d0f781acd3 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Pyoungmeister ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Resolve config defaults in RedisConnectionPool in the single... - change (mediawiki/core)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/51794 Change subject: Resolve config defaults in RedisConnectionPool in the singleton(). .. Resolve config defaults in RedisConnectionPool in the singleton(). * This can avoid fragmentation when applying defaults to different config arrays actually gives the same resulting array. Change-Id: Iacab8d38080f51eb3f331d55a8535eed6d93b381 --- M includes/clientpool/RedisConnectionPool.php 1 file changed, 26 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/94/51794/1 diff --git a/includes/clientpool/RedisConnectionPool.php b/includes/clientpool/RedisConnectionPool.php index bb8b77f..e81bc5d 100644 --- a/includes/clientpool/RedisConnectionPool.php +++ b/includes/clientpool/RedisConnectionPool.php @@ -72,18 +72,10 @@ throw new MWException( __CLASS__. ' requires the phpredis extension: ' . 'https://github.com/nicolasff/phpredis' ); } - $this->connectTimeout = isset( $options['connectTimeout'] ) - ? $options['connectTimeout'] - : 1; - $this->persistent = isset( $options['persistent'] ) - ? $options['persistent'] - : false; - $this->password = isset( $options['password'] ) - ? $options['password'] - : ''; - $this->poolSize = isset( $options['poolSize'] ) - ? $options['poolSize'] - : 5; + $this->connectTimeout = $options['connectTimeout']; + $this->persistent = $options['persistent']; + $this->password = $options['password']; + $this->poolSize = $options['poolSize']; if ( !isset( $options['serializer'] ) || $options['serializer'] === 'php' ) { $this->serializer = Redis::SERIALIZER_PHP; } elseif ( $options['serializer'] === 'igbinary' ) { @@ -95,9 +87,30 @@ /** * @param $options Array +* @return Array +*/ + protected static function applyDefaultConfig( array $options ) { + if ( !isset( $options['connectTimeout'] ) ) { + $options['connectTimeout'] = 1; + } + if ( !isset( $options['persistent'] ) ) { + $options['persistent'] = false; + } + if ( !isset( $options['password'] ) ) { + $options['password'] = ''; + } + if ( !isset( $options['poolSize'] ) ) { + $options['poolSize'] = 1; + } + return $options; + } + + /** +* @param $options Array * @return RedisConnectionPool */ public static function singleton( array $options ) { + $options = self::applyDefaultConfig( $options ); // Map the options to a unique hash... $poolOptions = $options; unset( $poolOptions['poolSize'] ); // avoid pool fragmentation @@ -109,7 +122,7 @@ wfDebug( "Creating a new " . __CLASS__ . " instance with id $id." ); } // Simply grow the pool size if the existing one is too small - $psize = isset( $options['poolSize'] ) ? $options['poolSize'] : 1; // size requested + $psize = $options['poolSize']; // size requested self::$instances[$id]->poolSize = max( $psize, self::$instances[$id]->poolSize ); return self::$instances[$id]; -- To view, visit https://gerrit.wikimedia.org/r/51794 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iacab8d38080f51eb3f331d55a8535eed6d93b381 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (bug 43929) Show links to ambassador profiles based on right... - change (mediawiki...EducationProgram)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/51793 Change subject: (bug 43929) Show links to ambassador profiles based on right instead of enrollment .. (bug 43929) Show links to ambassador profiles based on right instead of enrollment Change-Id: Ie34bbe86918dcee85cd8be2df1700aeb97bad7f5 --- M includes/Menu.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EducationProgram refs/changes/93/51793/1 diff --git a/includes/Menu.php b/includes/Menu.php index 8a6f6a3..8393abb 100644 --- a/includes/Menu.php +++ b/includes/Menu.php @@ -110,11 +110,11 @@ $items['ep-nav-mycourses'] = SpecialPage::getTitleFor( 'MyCourses' ); } - if ( OA::newFromUser( $user )->hasCourse() ) { + if ( $user->isAllowed( 'eponline' ) ) { $items['ep-nav-oaprofile'] = SpecialPage::getTitleFor( 'OnlineAmbassadorProfile' ); } - if ( CA::newFromUser( $user )->hasCourse() ) { + if ( $user->isAllowed( 'epcampus' ) ) { $items['ep-nav-caprofile'] = SpecialPage::getTitleFor( 'CampusAmbassadorProfile' ); } -- To view, visit https://gerrit.wikimedia.org/r/51793 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie34bbe86918dcee85cd8be2df1700aeb97bad7f5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/EducationProgram Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] move all monitoring related stuff into new monitoring direct... - change (operations/puppet)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/51792 Change subject: move all monitoring related stuff into new monitoring directory and include that in site.pp .. move all monitoring related stuff into new monitoring directory and include that in site.pp Change-Id: Ie519b59424c0d8060c33da5579d1e6a01a01 --- R manifests/monitoring/ganglia.pp R manifests/monitoring/icinga.pp R manifests/monitoring/nagios.pp R manifests/monitoring/nrpe.pp M manifests/site.pp 5 files changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/92/51792/1 diff --git a/manifests/ganglia.pp b/manifests/monitoring/ganglia.pp similarity index 100% rename from manifests/ganglia.pp rename to manifests/monitoring/ganglia.pp diff --git a/manifests/misc/icinga.pp b/manifests/monitoring/icinga.pp similarity index 100% rename from manifests/misc/icinga.pp rename to manifests/monitoring/icinga.pp diff --git a/manifests/nagios.pp b/manifests/monitoring/nagios.pp similarity index 100% rename from manifests/nagios.pp rename to manifests/monitoring/nagios.pp diff --git a/manifests/nrpe.pp b/manifests/monitoring/nrpe.pp similarity index 100% rename from manifests/nrpe.pp rename to manifests/monitoring/nrpe.pp diff --git a/manifests/site.pp b/manifests/site.pp index 3478437..9c01162 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -10,7 +10,6 @@ import "dns.pp" import "drac.pp" import "facilities.pp" -import "ganglia.pp" import "geoip.pp" import "gerrit.pp" import "imagescaler.pp" @@ -21,12 +20,11 @@ import "media-storage.pp" import "memcached.pp" import "misc/*.pp" +import "monitoring/*.pp" import "mobile.pp" import "mysql.pp" -import "nagios.pp" import "network.pp" import "nfs.pp" -import "nrpe.pp" import "openstack.pp" import "poolcounter.pp" import "protoproxy.pp" -- To view, visit https://gerrit.wikimedia.org/r/51792 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie519b59424c0d8060c33da5579d1e6a01a01 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] one more fix - change (operations/puppet)
Pyoungmeister has submitted this change and it was merged. Change subject: one more fix .. one more fix Change-Id: I7b587d2b35c50dcffa3686c519115232f27944a5 --- M manifests/misc/deployment.pp M manifests/misc/maintenance.pp M manifests/role/lucene.pp 3 files changed, 3 insertions(+), 3 deletions(-) Approvals: Pyoungmeister: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/misc/deployment.pp b/manifests/misc/deployment.pp index f913925..9a572ba 100644 --- a/manifests/misc/deployment.pp +++ b/manifests/misc/deployment.pp @@ -27,7 +27,7 @@ require passwordscripts # scap requires sync-common, which is in the wikimedia-task-appserver package - require mediawiki_new + require mediawiki # TODO: Should this be in a package instead, maybe? It's conceptually nicer than keeping scripts in the puppet git repo, # but rebuilding packages isn't as easy as updating a file through this mechanism, right? diff --git a/manifests/misc/maintenance.pp b/manifests/misc/maintenance.pp index 8563840..42dd252 100644 --- a/manifests/misc/maintenance.pp +++ b/manifests/misc/maintenance.pp @@ -23,7 +23,7 @@ class misc::maintenance::refreshlinks { - require mediawiki_new + require mediawiki # Include this to add cron jobs calling refreshLinks.php on all clusters. (RT-2355) diff --git a/manifests/role/lucene.pp b/manifests/role/lucene.pp index d9e09d3..71eb2a2 100644 --- a/manifests/role/lucene.pp +++ b/manifests/role/lucene.pp @@ -129,7 +129,7 @@ # Include packages needed for MW maintenance scripts include standard, - mediawiki_new, + mediawiki, applicationserver::config::php, applicationserver::config::base, applicationserver::packages, -- To view, visit https://gerrit.wikimedia.org/r/51791 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7b587d2b35c50dcffa3686c519115232f27944a5 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Pyoungmeister Gerrit-Reviewer: Pyoungmeister Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] one more fix - change (operations/puppet)
Pyoungmeister has uploaded a new change for review. https://gerrit.wikimedia.org/r/51791 Change subject: one more fix .. one more fix Change-Id: I7b587d2b35c50dcffa3686c519115232f27944a5 --- M manifests/misc/deployment.pp M manifests/misc/maintenance.pp M manifests/role/lucene.pp 3 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/91/51791/1 diff --git a/manifests/misc/deployment.pp b/manifests/misc/deployment.pp index f913925..9a572ba 100644 --- a/manifests/misc/deployment.pp +++ b/manifests/misc/deployment.pp @@ -27,7 +27,7 @@ require passwordscripts # scap requires sync-common, which is in the wikimedia-task-appserver package - require mediawiki_new + require mediawiki # TODO: Should this be in a package instead, maybe? It's conceptually nicer than keeping scripts in the puppet git repo, # but rebuilding packages isn't as easy as updating a file through this mechanism, right? diff --git a/manifests/misc/maintenance.pp b/manifests/misc/maintenance.pp index 8563840..42dd252 100644 --- a/manifests/misc/maintenance.pp +++ b/manifests/misc/maintenance.pp @@ -23,7 +23,7 @@ class misc::maintenance::refreshlinks { - require mediawiki_new + require mediawiki # Include this to add cron jobs calling refreshLinks.php on all clusters. (RT-2355) diff --git a/manifests/role/lucene.pp b/manifests/role/lucene.pp index d9e09d3..71eb2a2 100644 --- a/manifests/role/lucene.pp +++ b/manifests/role/lucene.pp @@ -129,7 +129,7 @@ # Include packages needed for MW maintenance scripts include standard, - mediawiki_new, + mediawiki, applicationserver::config::php, applicationserver::config::base, applicationserver::packages, -- To view, visit https://gerrit.wikimedia.org/r/51791 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7b587d2b35c50dcffa3686c519115232f27944a5 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Pyoungmeister ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] add lcarr to icinga fundraising notification group - change (operations/puppet)
Jgreen has submitted this change and it was merged. Change subject: add lcarr to icinga fundraising notification group .. add lcarr to icinga fundraising notification group Change-Id: I14f0ea3f42110907671a7fc8df5075ec79325960 --- M files/nagios/contactgroups.cfg 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jgreen: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/files/nagios/contactgroups.cfg b/files/nagios/contactgroups.cfg index 990ce4f..9d6f545 100644 --- a/files/nagios/contactgroups.cfg +++ b/files/nagios/contactgroups.cfg @@ -16,7 +16,7 @@ define contactgroup { contactgroup_name fundraising - members awight,jgreen,khorn,mwalker,pgehres + members awight,jgreen,khorn,mwalker,pgehres,lcarr } define contactgroup { -- To view, visit https://gerrit.wikimedia.org/r/51790 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I14f0ea3f42110907671a7fc8df5075ec79325960 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Jgreen Gerrit-Reviewer: Jgreen 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 lcarr to icinga fundraising notification group - change (operations/puppet)
Jgreen has uploaded a new change for review. https://gerrit.wikimedia.org/r/51790 Change subject: add lcarr to icinga fundraising notification group .. add lcarr to icinga fundraising notification group Change-Id: I14f0ea3f42110907671a7fc8df5075ec79325960 --- M files/nagios/contactgroups.cfg 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/90/51790/1 diff --git a/files/nagios/contactgroups.cfg b/files/nagios/contactgroups.cfg index 990ce4f..9d6f545 100644 --- a/files/nagios/contactgroups.cfg +++ b/files/nagios/contactgroups.cfg @@ -16,7 +16,7 @@ define contactgroup { contactgroup_name fundraising - members awight,jgreen,khorn,mwalker,pgehres + members awight,jgreen,khorn,mwalker,pgehres,lcarr } define contactgroup { -- To view, visit https://gerrit.wikimedia.org/r/51790 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I14f0ea3f42110907671a7fc8df5075ec79325960 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Jgreen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [JobQueue] Throttle refreshLinks2 jobs based on finishing th... - change (mediawiki/core)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/51789 Change subject: [JobQueue] Throttle refreshLinks2 jobs based on finishing the refreshLinks jobs. .. [JobQueue] Throttle refreshLinks2 jobs based on finishing the refreshLinks jobs. * This should lower the rate of queue activity when major templates change. * Also fixed a broken array_diff() call in nextJobDB.php. * Additionally removed checkJob from nextJobDB.php. This is redundant to runJobs.php de-listing queues via JobQueueGroup::pop() when the queue is empty. Change-Id: I1518a0de9e7ada22350d9993dd7ffe5f2ce23745 --- M includes/DefaultSettings.php M includes/job/JobQueueGroup.php M maintenance/nextJobDB.php 3 files changed, 22 insertions(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/89/51789/1 diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 7aad30c..e9a3a16 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -5546,6 +5546,8 @@ /** * Map of job types to configuration arrays. + * This determines which queue class and storage system is used for each job type. + * Job types that do not have explicit configuration will use the 'default' config. * These settings should be global to all wikis. */ $wgJobTypeConf = array( diff --git a/includes/job/JobQueueGroup.php b/includes/job/JobQueueGroup.php index 23a5494..dae026c 100644 --- a/includes/job/JobQueueGroup.php +++ b/includes/job/JobQueueGroup.php @@ -237,6 +237,23 @@ } /** +* Check if jobs should not be popped of a queue right now. +* This is only used for performance, such as to avoid spamming +* the queue with many sub-jobs before they actually get run. +* +* @param $type string +* @return bool +*/ + public function isQueueDeprioritized( $type ) { + if ( $type === 'refreshLinks2' ) { + // Don't keep converting refreshLinks2 => refreshLinks jobs if the + // later jobs have not been done yet. This helps throttle queue spam. + return !$this->get( 'refreshLinks' )->isEmpty(); + } + return false; + } + + /** * Execute any due periodic queue maintenance tasks for all queues. * * A task is "due" if the time ellapsed since the last run is greater than diff --git a/maintenance/nextJobDB.php b/maintenance/nextJobDB.php index f5bf4da..1be5146 100644 --- a/maintenance/nextJobDB.php +++ b/maintenance/nextJobDB.php @@ -77,10 +77,9 @@ return; // no jobs for this type } - list( $type, $db ) = $candidates[ mt_rand( 0, count( $candidates ) - 1 ) ]; - if ( !$this->checkJob( $type, $db ) ) { // queue is actually empty? - $pendingDBs[$type] = array_diff( $pendingDBs[$type], $db ); - JobQueueAggregator::singleton()->notifyQueueEmpty( $db, $type ); + list( $type, $db ) = $candidates[mt_rand( 0, count( $candidates ) - 1 )]; + if ( JobQueueGroup::singleton( $db )->isQueueDeprioritized( $type ) ) { + $pendingDBs[$type] = array_diff( $pendingDBs[$type], array( $db ) ); $again = true; } } while ( $again ); @@ -90,17 +89,6 @@ } else { $this->output( $db . "\n" ); } - } - - /** -* Check if the specified database has a job of the specified type in it. -* The type may be false to indicate "all". -* @param $type string -* @param $dbName string -* @return bool -*/ - private function checkJob( $type, $dbName ) { - return !JobQueueGroup::singleton( $dbName )->get( $type )->isEmpty(); } /** -- To view, visit https://gerrit.wikimedia.org/r/51789 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1518a0de9e7ada22350d9993dd7ffe5f2ce23745 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Preserve caller expectations for behaviour of sslVerifyHost - change (mediawiki/core)
CSteipp has uploaded a new change for review. https://gerrit.wikimedia.org/r/51788 Change subject: Preserve caller expectations for behaviour of sslVerifyHost .. Preserve caller expectations for behaviour of sslVerifyHost (bug 42441) The previous patch unnecessarily broke backwards compatibility in the Http::request() API, following cURL's broken conventions for sslVerifyHost instead of the boolean interpretation expected by all existing callers. This change reverts that one, and fixes the bug in another way. See Ia6535f10. Also don't bother wrapping the $this->sslVerifyHost access with isset() since it's always set. Change-Id: Ia4e1689249b6ac515b859ea2eca1dcff3e63098c --- M includes/HttpFunctions.php 1 file changed, 2 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/88/51788/1 diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php index 147823f..cb1c221 100644 --- a/includes/HttpFunctions.php +++ b/includes/HttpFunctions.php @@ -690,13 +690,8 @@ } $this->curlOptions[CURLOPT_USERAGENT] = $this->reqHeaders['User-Agent']; - if ( isset( $this->sslVerifyHost ) ) { - $this->curlOptions[CURLOPT_SSL_VERIFYHOST] = $this->sslVerifyHost; - } - - if ( isset( $this->sslVerifyCert ) ) { - $this->curlOptions[CURLOPT_SSL_VERIFYPEER] = $this->sslVerifyCert; - } + $this->curlOptions[CURLOPT_SSL_VERIFYHOST] = $this->sslVerifyHost ? 2 : 0; + $this->curlOptions[CURLOPT_SSL_VERIFYPEER] = $this->sslVerifyCert; if ( $this->caInfo ) { $this->curlOptions[CURLOPT_CAINFO] = $this->caInfo; -- To view, visit https://gerrit.wikimedia.org/r/51788 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia4e1689249b6ac515b859ea2eca1dcff3e63098c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_19 Gerrit-Owner: CSteipp Gerrit-Reviewer: Tim Starling ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (bug 45620) Fix message keys generated on Special:ManageCourses - change (mediawiki...EducationProgram)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/51787 Change subject: (bug 45620) Fix message keys generated on Special:ManageCourses .. (bug 45620) Fix message keys generated on Special:ManageCourses Change-Id: I3d0f68666531d845e6d29b1a223fe95f54e0 --- M includes/specials/SpecialManageCourses.php 1 file changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EducationProgram refs/changes/87/51787/1 diff --git a/includes/specials/SpecialManageCourses.php b/includes/specials/SpecialManageCourses.php index 3866d71..bda5326 100644 --- a/includes/specials/SpecialManageCourses.php +++ b/includes/specials/SpecialManageCourses.php @@ -141,10 +141,12 @@ break; } + $classNameForMessage = str_replace( 'educationprogram\\', 'ep', strtolower( $class ) ); + if ( !empty( $courses ) ) { - // @todo FIXME: Add full text of all used message keys here for grepping + // @todo FIXME: Add full text of all used message keys here for grepping // and transparancy purposes. - $message = $this->msg( 'ep-mycourses-courses-' . strtolower( $class ) ) + $message = $this->msg( 'ep-mycourses-courses-' . $classNameForMessage ) ->numParams( count( $courses ) )->params( $this->getUser()->getName() )->text(); $this->getOutput()->addElement( 'h2', array(), $message ); @@ -159,7 +161,7 @@ } } elseif ( $isAllowed ) { - $this->getOutput()->addWikiMsg( 'ep-mycourses-nocourses-' . strtolower( $class ), $this->getUser()->getName() ); + $this->getOutput()->addWikiMsg( 'ep-mycourses-nocourses-' . $classNameForMessage, $this->getUser()->getName() ); } } -- To view, visit https://gerrit.wikimedia.org/r/51787 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3d0f68666531d845e6d29b1a223fe95f54e0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/EducationProgram Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] making eqiad search pool4 awesome - change (operations/puppet)
Asher has submitted this change and it was merged. Change subject: making eqiad search pool4 awesome .. making eqiad search pool4 awesome Change-Id: I275184257a521a912c649382ca7dffe02d46019e --- M manifests/role/lucene.pp M manifests/site.pp 2 files changed, 14 insertions(+), 4 deletions(-) Approvals: Asher: Verified; Looks good to me, approved diff --git a/manifests/role/lucene.pp b/manifests/role/lucene.pp index d9e09d3..fb8f298 100644 --- a/manifests/role/lucene.pp +++ b/manifests/role/lucene.pp @@ -36,10 +36,14 @@ }, # everything else "pool4" => { - "search1015" => ['commonswiki.nspart1', 'commonswiki.nspart1.hl', 'commonswiki.nspart2', 'commonswiki.nspart2.hl', '*?'], - "search1016" => ['commonswiki.nspart1', 'commonswiki.nspart1.hl', 'commonswiki.nspart2', 'commonswiki.nspart2.hl', '*?'], - "search1019" => ['(?!(enwiki.|dewiki.|frwiki.|itwiki.|nlwiki.|ruwiki.|svwiki.|plwiki.|eswiki.|ptwiki.))*.spell'], - "search1020" => ['(?!(enwiki.|dewiki.|frwiki.|itwiki.|nlwiki.|ruwiki.|svwiki.|plwiki.|eswiki.|ptwiki.))*.spell'], + "search1015" => ['*?'], + "search1016" => ['*?'], + "search1019" => ['commonswiki.nspart1', 'commonswiki.nspart1.hl', 'commonswiki.nspart2', 'commonswiki.nspart2.hl', + 'wikidatawiki', 'metawiki', 'enwiktionary', + '(?!(enwiki.|dewiki.|frwiki.|itwiki.|nlwiki.|ruwiki.|svwiki.|plwiki.|eswiki.|ptwiki.))*.spell'], + "search1020" => ['commonswiki.nspart1', 'commonswiki.nspart1.hl', 'commonswiki.nspart2', 'commonswiki.nspart2.hl', + 'wikidatawiki', 'metawiki', 'enwiktionary', + '(?!(enwiki.|dewiki.|frwiki.|itwiki.|nlwiki.|ruwiki.|svwiki.|plwiki.|eswiki.|ptwiki.))*.spell'], "search1021" => ['(?!(enwiki.|dewiki.|frwiki.|itwiki.|nlwiki.|ruwiki.|svwiki.|plwiki.|eswiki.|ptwiki.|jawiki.|zhwiki.))*.hl'], "search1022" => ['(?!(enwiki.|dewiki.|frwiki.|itwiki.|nlwiki.|ruwiki.|svwiki.|plwiki.|eswiki.|ptwiki.|jawiki.|zhwiki.))*.hl'], }, diff --git a/manifests/site.pp b/manifests/site.pp index 078348b..3478437 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1137,6 +1137,7 @@ $sip['search_pool2'][$::site], $sip['search_pool3'][$::site], $sip['search_pool4'][$::site], + $sip['search_pool5'][$::site], $sip['search_prefix'][$::site], $sip['swift'][$::site], $sip['parsoid'][$::site] @@ -1989,6 +1990,11 @@ include role::lucene::front_end::pool4 } +node /search10(19|20)\.eqiad\.wmnet/ { + + include role::lucene::front_end::pool5 +} + node /search101[78]\.eqiad\.wmnet/ { include role::lucene::front_end::prefix -- To view, visit https://gerrit.wikimedia.org/r/51785 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I275184257a521a912c649382ca7dffe02d46019e Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Asher Gerrit-Reviewer: Asher ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Bug 27551: Allow renaming of global groups - change (mediawiki...CentralAuth)
Alex Monk has uploaded a new change for review. https://gerrit.wikimedia.org/r/51786 Change subject: Bug 27551: Allow renaming of global groups .. Bug 27551: Allow renaming of global groups Requires JavaScript. Change-Id: Iac3f0fa6df4d8c6b84449fca241ef5819019a22f --- M CentralAuth.i18n.php M CentralAuth.php A modules/ext.centralauth.globalgrouppermissions.js M specials/SpecialGlobalGroupPermissions.php 4 files changed, 48 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth refs/changes/86/51786/1 diff --git a/CentralAuth.i18n.php b/CentralAuth.i18n.php index 9e8be82..101c56a 100644 --- a/CentralAuth.i18n.php +++ b/CentralAuth.i18n.php @@ -285,6 +285,7 @@ 'centralauth-rightslog-entry-groupperms' => 'changed group permissions for $1 from $2 to $3', 'centralauth-rightslog-entry-groupperms2' => 'changed group permissions for $1. Added $2; Removed $3', 'centralauth-rightslog-entry-groupperms3' => 'changed group restricted wikis set for $1 from $2 to $3', + 'centralauth-rightslog-entry-grouprename' => 'renamed group $1 to $2', 'centralauth-rightslog-header'=> 'This log contains operations on global groups: membership and permissions changes', 'centralauth-rightslog-entry-newset' => 'created $2 wiki set $1 with following wikis: $3', @@ -703,6 +704,9 @@ * $1 - the name of the group being changed * $2 - the name of the previous wiki set * $3 - the name of the new wiki set', + 'centralauth-rightslog-entry-grouprename' => 'A log entry when a user changes the name of a global group. +* $1 is the original name of the group +* $2 is the new name of the group', 'centralauth-rightslog-entry-newset' => "* \$1 is the name of the wiki set (example: \"''Test''\") * \$2 is \"''{{msg-mw|Centralauth-rightslog-set-optin}}''\" or \"''{{msg-mw|Centralauth-rightslog-set-optout}}''\" * \$3 is a list of wikis (example: \"''srwiki, hrwiki''\")", diff --git a/CentralAuth.php b/CentralAuth.php index 451dffb..51c9401 100644 --- a/CentralAuth.php +++ b/CentralAuth.php @@ -269,6 +269,7 @@ $wgLogActions['gblrights/groupperms'] = 'centralauth-rightslog-entry-groupperms'; $wgLogActions['gblrights/groupprms2'] = 'centralauth-rightslog-entry-groupperms2'; $wgLogActions['gblrights/groupprms3'] = 'centralauth-rightslog-entry-groupperms3'; +$wgLogActions['gblrights/grouprename'] = 'centralauth-rightslog-entry-grouprename'; foreach ( array( 'newset', 'setrename', 'setnewtype', 'setchange', 'deleteset' ) as $type ) { $wgLogActionsHandlers["gblrights/{$type}"] = 'efHandleWikiSetLogEntry'; @@ -312,6 +313,7 @@ 'styles' => 'ext.centralauth.globalusers.css', ) + $commonModuleInfo; $wgResourceModules['ext.centralauth.globalgrouppermissions'] = array( + 'scripts' => 'ext.centralauth.globalgrouppermissions.js', 'styles' => 'ext.centralauth.globalgrouppermissions.css', ) + $commonModuleInfo; diff --git a/modules/ext.centralauth.globalgrouppermissions.js b/modules/ext.centralauth.globalgrouppermissions.js new file mode 100644 index 000..3d6c8c3 --- /dev/null +++ b/modules/ext.centralauth.globalgrouppermissions.js @@ -0,0 +1,7 @@ +( function ( $ ) { + $( document ).ready( function () { + $( '#ca-ggp-name-edit' ).click( function () { + $( '#ca-ggp-name' ).html( $( '' ).attr( { 'type': 'text', 'name': 'newname' } ).val( $( '#ca-ggp-name-current' ).text() ) ); + } ); + } ); +}( jQuery ) ); diff --git a/specials/SpecialGlobalGroupPermissions.php b/specials/SpecialGlobalGroupPermissions.php index 1b24193..81bdcfd 100644 --- a/specials/SpecialGlobalGroupPermissions.php +++ b/specials/SpecialGlobalGroupPermissions.php @@ -132,7 +132,13 @@ $fields = array(); - $fields['centralauth-editgroup-name'] = $group; + if ( $editable ) { + $fields['centralauth-editgroup-name'] = '' . $group . ' ' . $this->msg( 'parentheses', 'edit' )->plain() . ''; + $this->getOutput()->addModules( 'ext.centralauth.globalgrouppermissions' ); + } else { + $fields['centralauth-editgroup-name'] = $group; + } + if( $this->getUser()->isAllowed( 'editinterface' ) ) { # Show edit link only to user with the editinterface right $fields['centralauth-editgroup-display'] = $this->msg( 'centralauth-editgroup-display-edit', $group, User::getGroupName( $group ) )->parse(); @@ -299,6 +305,34 @@ $this->invalidateRightsCache( $group ); + $newname = $this->getRequest()->getVal( 'newname' ); + if ( !is_null( $newname ) && $group != $newname ) { + // Global group rename + $dbw =
[MediaWiki-commits] [Gerrit] Update i18n - change (mediawiki...Scribunto)
jenkins-bot has submitted this change and it was merged. Change subject: Update i18n .. Update i18n Add missing /qqq messages, and remove an unused message. Bug: 39125 Change-Id: Ib1c21cc4eb334b42408e24051809ab3c0d8da796 --- M Scribunto.i18n.php 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Demon: Looks good to me, approved jenkins-bot: Verified diff --git a/Scribunto.i18n.php b/Scribunto.i18n.php index 1586201..238d0a2 100644 --- a/Scribunto.i18n.php +++ b/Scribunto.i18n.php @@ -34,7 +34,6 @@ 'scribunto-console-title' => 'Debug console', 'scribunto-console-too-large' => 'This console session is too large. Please clear the console history or reduce the size of the module.', 'scribunto-console-current-src' => 'console input', - 'scribunto-console-previous-src' => 'previous console input', 'scribunto-console-clear' => 'Clear', 'scribunto-console-cleared' => 'The console state was cleared because the module was updated.', 'scribunto-console-cleared-session-lost' => 'The console state was cleared because the session data was lost.', @@ -91,6 +90,8 @@ 'scribunto-console-intro' => 'An explanatory message shown to module programmers in the debug console, where they can run Lua commands and see how they work. "Module exports" are the names that are exported. See the chapter [http://www.lua.org/pil/15.2.html Privacy] in the book "Programming in Lua".', + 'scribunto-console-title' => 'Legend for the debug console fieldset', + 'scribunto-console-too-large' => 'Error message displayed when the console history contains too much data.', 'scribunto-console-current-src' => 'Name of the fictional Lua module created in the debugging console. May appear e.g. in Lua error messages (like $1 in {{msg-mw|Scribunto-module-line}})', 'scribunto-console-clear' => '{{Identical|Clear}}', 'scribunto-console-cleared' => 'Message displayed in the console when the module source has been changed.', -- To view, visit https://gerrit.wikimedia.org/r/51674 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib1c21cc4eb334b42408e24051809ab3c0d8da796 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Scribunto Gerrit-Branch: master Gerrit-Owner: Anomie Gerrit-Reviewer: Aaron Schulz Gerrit-Reviewer: Demon Gerrit-Reviewer: Siebrand Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] making eqiad search pool4 awesome - change (operations/puppet)
Asher has uploaded a new change for review. https://gerrit.wikimedia.org/r/51785 Change subject: making eqiad search pool4 awesome .. making eqiad search pool4 awesome Change-Id: I275184257a521a912c649382ca7dffe02d46019e --- M manifests/role/lucene.pp M manifests/site.pp 2 files changed, 14 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/85/51785/1 diff --git a/manifests/role/lucene.pp b/manifests/role/lucene.pp index d9e09d3..fb8f298 100644 --- a/manifests/role/lucene.pp +++ b/manifests/role/lucene.pp @@ -36,10 +36,14 @@ }, # everything else "pool4" => { - "search1015" => ['commonswiki.nspart1', 'commonswiki.nspart1.hl', 'commonswiki.nspart2', 'commonswiki.nspart2.hl', '*?'], - "search1016" => ['commonswiki.nspart1', 'commonswiki.nspart1.hl', 'commonswiki.nspart2', 'commonswiki.nspart2.hl', '*?'], - "search1019" => ['(?!(enwiki.|dewiki.|frwiki.|itwiki.|nlwiki.|ruwiki.|svwiki.|plwiki.|eswiki.|ptwiki.))*.spell'], - "search1020" => ['(?!(enwiki.|dewiki.|frwiki.|itwiki.|nlwiki.|ruwiki.|svwiki.|plwiki.|eswiki.|ptwiki.))*.spell'], + "search1015" => ['*?'], + "search1016" => ['*?'], + "search1019" => ['commonswiki.nspart1', 'commonswiki.nspart1.hl', 'commonswiki.nspart2', 'commonswiki.nspart2.hl', + 'wikidatawiki', 'metawiki', 'enwiktionary', + '(?!(enwiki.|dewiki.|frwiki.|itwiki.|nlwiki.|ruwiki.|svwiki.|plwiki.|eswiki.|ptwiki.))*.spell'], + "search1020" => ['commonswiki.nspart1', 'commonswiki.nspart1.hl', 'commonswiki.nspart2', 'commonswiki.nspart2.hl', + 'wikidatawiki', 'metawiki', 'enwiktionary', + '(?!(enwiki.|dewiki.|frwiki.|itwiki.|nlwiki.|ruwiki.|svwiki.|plwiki.|eswiki.|ptwiki.))*.spell'], "search1021" => ['(?!(enwiki.|dewiki.|frwiki.|itwiki.|nlwiki.|ruwiki.|svwiki.|plwiki.|eswiki.|ptwiki.|jawiki.|zhwiki.))*.hl'], "search1022" => ['(?!(enwiki.|dewiki.|frwiki.|itwiki.|nlwiki.|ruwiki.|svwiki.|plwiki.|eswiki.|ptwiki.|jawiki.|zhwiki.))*.hl'], }, diff --git a/manifests/site.pp b/manifests/site.pp index 078348b..3478437 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1137,6 +1137,7 @@ $sip['search_pool2'][$::site], $sip['search_pool3'][$::site], $sip['search_pool4'][$::site], + $sip['search_pool5'][$::site], $sip['search_prefix'][$::site], $sip['swift'][$::site], $sip['parsoid'][$::site] @@ -1989,6 +1990,11 @@ include role::lucene::front_end::pool4 } +node /search10(19|20)\.eqiad\.wmnet/ { + + include role::lucene::front_end::pool5 +} + node /search101[78]\.eqiad\.wmnet/ { include role::lucene::front_end::prefix -- To view, visit https://gerrit.wikimedia.org/r/51785 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I275184257a521a912c649382ca7dffe02d46019e Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Asher ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Be a little smarter when escaping wikitext - change (mediawiki...Parsoid)
MarkTraceur has uploaded a new change for review. https://gerrit.wikimedia.org/r/51784 Change subject: Be a little smarter when escaping wikitext .. Be a little smarter when escaping wikitext Not related to any bug, but this might be a more desirable way to escape wikitext in text nodes we serialize. Test case: echo "[maybe some '''text''' in the non-link]" | node parse --html2wt Before: [maybe some '''text''' in the non-link] Now: [maybe some '''text''' in the non-link] One other possible solution is to wrap nowiki around the first wikitext token and emit the only after the last wikitext token in the text we're processing. Also, we could probably use this method in other places, I only tested it with links (as above), so I only added it in one spot. Change-Id: I420e545ca5f83aa00e1a8c7db81b4dd40a246cb8 --- M js/lib/mediawiki.WikitextSerializer.js 1 file changed, 31 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/84/51784/1 diff --git a/js/lib/mediawiki.WikitextSerializer.js b/js/lib/mediawiki.WikitextSerializer.js index 5b19afb..054e4df 100644 --- a/js/lib/mediawiki.WikitextSerializer.js +++ b/js/lib/mediawiki.WikitextSerializer.js @@ -146,7 +146,10 @@ tokens.push(chunk[ci]); } }); - p.on('end', function(){ }); + p.on('end', function(){ + // Save the tokens so the calling function can use them if necessary. + state.resultTokens = tokens; + }); // The code below will break if use async tokenization. p.processSync( prefixedText ); @@ -484,6 +487,32 @@ return ["", match[1], "", match[2]].join(''); } +/** + * Use the tokens generated by some text to figure out the portions that + * actually need to be escaped. + * + * @param {string} text + * @param {Token[]} tokens + * @returns {string} + */ +function intelligentlyEscapedText( text, tokens ) { + var i, token, tsr, escaped = ''; + + for ( i = 0; i < tokens.length; i++ ) { + token = tokens[i]; + if ( typeof token === 'string' ) { + escaped += token; + } else if ( token.name === undefined ) { + escaped += token; + } else { + tsr = token.dataAttribs.tsr; + escaped += '' + text.substring( tsr[0], tsr[1] ) + ''; + } + } + + return escaped; +} + WSP.escapeWikiText = function ( state, text ) { // console.warn("---EWT:ALL1---"); // console.warn("t: " + text); @@ -555,7 +584,7 @@ // Use the tokenizer to see if we have any wikitext tokens if (this.wteHandlers.hasWikitextTokens(state, sol, text) || hasTildes) { // console.warn("---EWT:DBG1---"); - return escapedText(text); + return intelligentlyEscapedText( text, state.resultTokens ); } else if (state.currLine.numPieces > 1) { // console.warn("---EWT:DBG2---"); // Last resort -- process current line text ignoring all embedded tags -- To view, visit https://gerrit.wikimedia.org/r/51784 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I420e545ca5f83aa00e1a8c7db81b4dd40a246cb8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: MarkTraceur ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] adding new mac address for wtp1001 - change (operations/puppet)
Cmjohnson has submitted this change and it was merged. Change subject: adding new mac address for wtp1001 .. adding new mac address for wtp1001 Change-Id: I6a91623c13a1d800897439fc5671ea68ada70c81 --- M files/dhcpd/linux-host-entries.ttyS1-115200 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Cmjohnson: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/files/dhcpd/linux-host-entries.ttyS1-115200 b/files/dhcpd/linux-host-entries.ttyS1-115200 index a8d8453..7190130 100644 --- a/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -4495,7 +4495,7 @@ } host wtp1001 { - hardware ethernet 90:B1:1C:00:A2:97; + hardware ethernet 90:B1:1C:2D:85:30; fixed-address wtp1001.eqiad.wmnet; } -- To view, visit https://gerrit.wikimedia.org/r/51783 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6a91623c13a1d800897439fc5671ea68ada70c81 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Cmjohnson Gerrit-Reviewer: Cmjohnson Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] adding new mac address for wtp1001 - change (operations/puppet)
Cmjohnson has uploaded a new change for review. https://gerrit.wikimedia.org/r/51783 Change subject: adding new mac address for wtp1001 .. adding new mac address for wtp1001 Change-Id: I6a91623c13a1d800897439fc5671ea68ada70c81 --- M files/dhcpd/linux-host-entries.ttyS1-115200 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/83/51783/1 diff --git a/files/dhcpd/linux-host-entries.ttyS1-115200 b/files/dhcpd/linux-host-entries.ttyS1-115200 index a8d8453..7190130 100644 --- a/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -4495,7 +4495,7 @@ } host wtp1001 { - hardware ethernet 90:B1:1C:00:A2:97; + hardware ethernet 90:B1:1C:2D:85:30; fixed-address wtp1001.eqiad.wmnet; } -- To view, visit https://gerrit.wikimedia.org/r/51783 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6a91623c13a1d800897439fc5671ea68ada70c81 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Cmjohnson ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Split off some code from EditEventCreator to UserCourseFinder - change (mediawiki...EducationProgram)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/51782 Change subject: Split off some code from EditEventCreator to UserCourseFinder .. Split off some code from EditEventCreator to UserCourseFinder Added associated tests and fixed some dependency injection issues Change-Id: If00fc36d5728f29a647a91dfe6cdab5da092ff19 --- M EducationProgram.hooks.php M EducationProgram.php M includes/Events/EditEventCreator.php A includes/UPCUserCourseFinder.php A includes/UserCourseFinder.php M tests/phpunit/ActionsTest.php M tests/phpunit/Events/EditEventCreatorTest.php M tests/phpunit/MenuTest.php M tests/phpunit/MockSuperUser.php M tests/phpunit/SpecialsTest.php M tests/phpunit/TimelineTest.php A tests/phpunit/UPCUserCourseFinderTest.php A tests/phpunit/UserCourseFinderTest.php M tests/phpunit/UtilsTest.php M tests/phpunit/rows/ArticleTest.php M tests/phpunit/tables/OrgsTest.php 16 files changed, 353 insertions(+), 60 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EducationProgram refs/changes/82/51782/1 diff --git a/EducationProgram.hooks.php b/EducationProgram.hooks.php index a525571..162c7a2 100644 --- a/EducationProgram.hooks.php +++ b/EducationProgram.hooks.php @@ -1,7 +1,13 @@ getEventsForEdit( $article, $rev, $user ); - $dbw = wfGetDB( DB_MASTER ); + $userCourseFinder = new UPCUserCourseFinder( $dbw ); + $eventCreator = new \EducationProgram\Events\EditEventCreator( $dbw, $userCourseFinder ); + $events = $eventCreator->getEventsForEdit( $article, $rev, $user ); + $startOwnStransaction = $dbw->trxLevel() === 0; if ( $startOwnStransaction ) { diff --git a/EducationProgram.php b/EducationProgram.php index 54afbe5..52c9c27 100644 --- a/EducationProgram.php +++ b/EducationProgram.php @@ -165,8 +165,11 @@ $wgAutoloadClasses['EducationProgram\Settings'] = $dir . '/includes/Settings.php'; $wgAutoloadClasses['EducationProgram\Timeline'] = $dir . '/includes/Timeline.php'; $wgAutoloadClasses['EducationProgram\TimelineGroup'] = $dir . '/includes/TimelineGroup.php'; +$wgAutoloadClasses['EducationProgram\UPCUserCourseFinder'] = $dir . '/includes/UPCUserCourseFinder.php'; +$wgAutoloadClasses['EducationProgram\UserCourseFinder'] = $dir . '/includes/UserCourseFinder.php'; -$wgAutoloadClasses['EducationProgram\Test\MockSuperUser'] = $dir . '/tests/phpunit/MockSuperUser.php'; +$wgAutoloadClasses['EducationProgram\Tests\MockSuperUser'] = $dir . '/tests/phpunit/MockSuperUser.php'; +$wgAutoloadClasses['EducationProgram\Tests\UserCourseFinderTest'] = $dir . '/tests/phpunit/UserCourseFinderTest.php'; // Special pages $wgSpecialPages['MyCourses'] = 'EducationProgram\SpecialMyCourses'; diff --git a/includes/Events/EditEventCreator.php b/includes/Events/EditEventCreator.php index 1e257a8..5506cef 100644 --- a/includes/Events/EditEventCreator.php +++ b/includes/Events/EditEventCreator.php @@ -5,16 +5,17 @@ use EducationProgram\Event; use EducationProgram\Courses; use EducationProgram\Student; +use EducationProgram\UserCourseFinder; use Revision; use User; use Page; +use DatabaseBase; /** * Class that generates edit based events by handling new edits. * * TODO: properly inject dependencies - * - DBConnectionProvider * - Profiler * - event factory * @@ -44,6 +45,33 @@ class EditEventCreator { /** +* @since 0.3 +* +* @var DatabaseBase +*/ + private $db; + + /** +* @since 0.3 +* +* @var UserCourseFinder +*/ + private $userCourseFinder; + + /** +* Constructor. +* +* @since 0.3 +* +* @param DatabaseBase $db +* @param UserCourseFinder $userCourseFinder +*/ + public function __construct( DatabaseBase $db, UserCourseFinder $userCourseFinder ) { + $this->db = $db; + $this->userCourseFinder = $userCourseFinder; + } + + /** * Takes the information of a newly created revision and uses this to * create a list of education program events which is then returned. * @@ -70,7 +98,7 @@ return array(); } - $courseIds = $this->getCoursesForUser( $user->getId() ); + $courseIds = $this->userCourseFinder->getCoursesForUsers( $user->getId(), EP_STUDENT ); if ( empty( $courseIds ) ) { $events = array(); @@ -84,46 +112,6 @@ wfProfileOut( __METHOD__ ); return $events; - } - - /*
[MediaWiki-commits] [Gerrit] mariadb query optimizer tuning - change (operations/puppet)
Asher has submitted this change and it was merged. Change subject: mariadb query optimizer tuning .. mariadb query optimizer tuning Change-Id: I2c8e31cb3bc1bcdf6d2d2e654f6cbdb889d34e2a --- M modules/coredb_mysql/templates/prod.my.cnf.erb 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Asher: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/modules/coredb_mysql/templates/prod.my.cnf.erb b/modules/coredb_mysql/templates/prod.my.cnf.erb index 4959695..8a80067 100644 --- a/modules/coredb_mysql/templates/prod.my.cnf.erb +++ b/modules/coredb_mysql/templates/prod.my.cnf.erb @@ -65,7 +65,9 @@ <% if has_variable?("mariadb") and mariadb == true then -%> query_cache_type=0 log_slow_verbosity=Query_plan -optimizer_switch='extended_keys=on' +# extended_keys disabled until https://mariadb.atlassian.net/browse/MDEV-4220 is fixed +# optimizer_switch='extended_keys=on' +optimizer_switch='mrr=on,mrr_cost_based=on,mrr_sort_keys=on,optimize_join_buffer_size=on' <% else %> rpl_transaction_enabled reserved_super_connections=20 -- To view, visit https://gerrit.wikimedia.org/r/51781 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2c8e31cb3bc1bcdf6d2d2e654f6cbdb889d34e2a Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Asher Gerrit-Reviewer: Asher Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mariadb query optimizer tuning - change (operations/puppet)
Asher has uploaded a new change for review. https://gerrit.wikimedia.org/r/51781 Change subject: mariadb query optimizer tuning .. mariadb query optimizer tuning Change-Id: I2c8e31cb3bc1bcdf6d2d2e654f6cbdb889d34e2a --- M modules/coredb_mysql/templates/prod.my.cnf.erb 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/81/51781/1 diff --git a/modules/coredb_mysql/templates/prod.my.cnf.erb b/modules/coredb_mysql/templates/prod.my.cnf.erb index 4959695..8a80067 100644 --- a/modules/coredb_mysql/templates/prod.my.cnf.erb +++ b/modules/coredb_mysql/templates/prod.my.cnf.erb @@ -65,7 +65,9 @@ <% if has_variable?("mariadb") and mariadb == true then -%> query_cache_type=0 log_slow_verbosity=Query_plan -optimizer_switch='extended_keys=on' +# extended_keys disabled until https://mariadb.atlassian.net/browse/MDEV-4220 is fixed +# optimizer_switch='extended_keys=on' +optimizer_switch='mrr=on,mrr_cost_based=on,mrr_sort_keys=on,optimize_join_buffer_size=on' <% else %> rpl_transaction_enabled reserved_super_connections=20 -- To view, visit https://gerrit.wikimedia.org/r/51781 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2c8e31cb3bc1bcdf6d2d2e654f6cbdb889d34e2a Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Asher ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] changed the scripts to use Selenium_user instead of uploadwi... - change (mediawiki...MobileFrontend)
Zfilipin has submitted this change and it was merged. Change subject: changed the scripts to use Selenium_user instead of uploadwizardtest and removed the login success page now that we use Central Auth .. changed the scripts to use Selenium_user instead of uploadwizardtest and removed the login success page now that we use Central Auth Change-Id: I3f37f4afa5e6570c7a4d38deea2959f0ba04a490 --- D tests/acceptance/features/support/pages/login_success_page.rb 1 file changed, 0 insertions(+), 5 deletions(-) Approvals: Zfilipin: Verified; Looks good to me, approved diff --git a/tests/acceptance/features/support/pages/login_success_page.rb b/tests/acceptance/features/support/pages/login_success_page.rb deleted file mode 100644 index 2e1b96e..000 --- a/tests/acceptance/features/support/pages/login_success_page.rb +++ /dev/null @@ -1,5 +0,0 @@ -class LoginSuccessPage - include PageObject - - a(:returntomain_link, href: "/wiki/Main_Page") -end -- To view, visit https://gerrit.wikimedia.org/r/51626 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3f37f4afa5e6570c7a4d38deea2959f0ba04a490 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Mgrover Gerrit-Reviewer: Cmcmahon Gerrit-Reviewer: Zfilipin 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 the scripts to use Selenium_user instead of uploadwi... - change (mediawiki...MobileFrontend)
Zfilipin has submitted this change and it was merged. Change subject: changed the scripts to use Selenium_user instead of uploadwizardtest and removed the login success page now that we use Central Auth .. changed the scripts to use Selenium_user instead of uploadwizardtest and removed the login success page now that we use Central Auth Change-Id: Iaedf3fce16b9f4fae7114a4466dc7e87720f9789 --- M tests/acceptance/features/step_definitions/watchlist_steps.rb 1 file changed, 0 insertions(+), 4 deletions(-) Approvals: Zfilipin: Verified; Looks good to me, approved diff --git a/tests/acceptance/features/step_definitions/watchlist_steps.rb b/tests/acceptance/features/step_definitions/watchlist_steps.rb index d2e091a..53fe11f 100644 --- a/tests/acceptance/features/step_definitions/watchlist_steps.rb +++ b/tests/acceptance/features/step_definitions/watchlist_steps.rb @@ -34,10 +34,6 @@ on(LoginPage) do |page| page.login_with(@mediawiki_username, @mediawiki_password) end - on(LoginSuccessPage) do |page| -page.text.should include "signed in" -page.returntomain_link - end end When /^I search for an article and select the watchlist icon$/ do -- To view, visit https://gerrit.wikimedia.org/r/51625 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iaedf3fce16b9f4fae7114a4466dc7e87720f9789 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Mgrover Gerrit-Reviewer: Cmcmahon Gerrit-Reviewer: Zfilipin Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Adding in nagios monitor classes - change (operations/puppet)
Lcarr has submitted this change and it was merged. Change subject: Adding in nagios monitor classes .. Adding in nagios monitor classes Change-Id: I66b3b2029f8089f05ca16a8c8247e0543f776d48 --- M manifests/misc/icinga.pp 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Lcarr: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/misc/icinga.pp b/manifests/misc/icinga.pp index 8a7271f..777d824 100644 --- a/manifests/misc/icinga.pp +++ b/manifests/misc/icinga.pp @@ -23,6 +23,9 @@ icinga::monitor::files::misc, nagios::ganglia::monitor::enwiki, icinga::ganglia::ganglios, + facilities::pdu_monitoring, + lvs::monitor, + nagios::gsbmonitoring, mysql, nrpe::new -- To view, visit https://gerrit.wikimedia.org/r/51780 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I66b3b2029f8089f05ca16a8c8247e0543f776d48 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Lcarr Gerrit-Reviewer: Lcarr Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Adding in nagios monitor classes - change (operations/puppet)
Lcarr has uploaded a new change for review. https://gerrit.wikimedia.org/r/51780 Change subject: Adding in nagios monitor classes .. Adding in nagios monitor classes Change-Id: I66b3b2029f8089f05ca16a8c8247e0543f776d48 --- M manifests/misc/icinga.pp 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/80/51780/1 diff --git a/manifests/misc/icinga.pp b/manifests/misc/icinga.pp index 8a7271f..777d824 100644 --- a/manifests/misc/icinga.pp +++ b/manifests/misc/icinga.pp @@ -23,6 +23,9 @@ icinga::monitor::files::misc, nagios::ganglia::monitor::enwiki, icinga::ganglia::ganglios, + facilities::pdu_monitoring, + lvs::monitor, + nagios::gsbmonitoring, mysql, nrpe::new -- To view, visit https://gerrit.wikimedia.org/r/51780 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I66b3b2029f8089f05ca16a8c8247e0543f776d48 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Lcarr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] fixing the rest of the shit I forgot... - change (operations/puppet)
Pyoungmeister has submitted this change and it was merged. Change subject: fixing the rest of the shit I forgot... .. fixing the rest of the shit I forgot... Change-Id: I46fe11a31832207406c975ac1ba8903496a2 --- M modules/mediawiki/manifests/cgroup.pp M modules/mediawiki/manifests/jobrunner.pp M modules/mediawiki/templates/jobrunner/jobs-loop.sh.erb M modules/mediawiki/templates/jobrunner/mw-job-runner.default.erb 4 files changed, 7 insertions(+), 7 deletions(-) Approvals: Pyoungmeister: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/mediawiki/manifests/cgroup.pp b/modules/mediawiki/manifests/cgroup.pp index efd986d..6f291d4 100644 --- a/modules/mediawiki/manifests/cgroup.pp +++ b/modules/mediawiki/manifests/cgroup.pp @@ -7,7 +7,7 @@ owner => root, group => root, mode=> '0644', - source => 'puppet:///modules/mediawiki_new/cgroup/mw-cgroup.conf', + source => 'puppet:///modules/mediawiki/cgroup/mw-cgroup.conf', require => Package['cgroup-bin'], } @@ -21,6 +21,6 @@ owner => root, group => root, mode => '0755', - source => 'puppet:///modules/mediawiki_new/cgroup/cgroup-mediawiki-clean', + source => 'puppet:///modules/mediawiki/cgroup/cgroup-mediawiki-clean', } } diff --git a/modules/mediawiki/manifests/jobrunner.pp b/modules/mediawiki/manifests/jobrunner.pp index fce4d94..5a3413f 100644 --- a/modules/mediawiki/manifests/jobrunner.pp +++ b/modules/mediawiki/manifests/jobrunner.pp @@ -21,18 +21,18 @@ owner => root, group => root, mode => 0755, - source => "puppet:///modules/mediawiki_new/jobrunner/mw-job-runner.init"; + source => "puppet:///modules/mediawiki/jobrunner/mw-job-runner.init"; } file { "/etc/default/mw-job-runner": - content => template("mediawiki_new/jobrunner/mw-job-runner.default.erb"); + content => template("mediawiki/jobrunner/mw-job-runner.default.erb"); } file { "/usr/local/bin/jobs-loop.sh": owner => root, group => root, mode => 0755, - content => template("mediawiki_new/jobrunner/jobs-loop.sh.erb"); + content => template("mediawiki/jobrunner/jobs-loop.sh.erb"); } if $run_jobs_enabled == true { service { diff --git a/modules/mediawiki/templates/jobrunner/jobs-loop.sh.erb b/modules/mediawiki/templates/jobrunner/jobs-loop.sh.erb index d6598f7..23ba735 100755 --- a/modules/mediawiki/templates/jobrunner/jobs-loop.sh.erb +++ b/modules/mediawiki/templates/jobrunner/jobs-loop.sh.erb @@ -1,6 +1,6 @@ #!/bin/bash ### THIS FILE IS MANAGED BY PUPPET -### puppet:///modules/mediawiki_new/jobrunner/jobs-loop.sh.erb +### puppet:///modules/mediawiki/jobrunner/jobs-loop.sh.erb # # NAME # jobs-loop.sh -- Continuously process a MediaWiki jobqueue diff --git a/modules/mediawiki/templates/jobrunner/mw-job-runner.default.erb b/modules/mediawiki/templates/jobrunner/mw-job-runner.default.erb index 3764a46..ddad131 100644 --- a/modules/mediawiki/templates/jobrunner/mw-job-runner.default.erb +++ b/modules/mediawiki/templates/jobrunner/mw-job-runner.default.erb @@ -1,5 +1,5 @@ ### THIS FILE IS MANAGED BY PUPPET -### puppet:///modules/mediawiki_new/jobrunner/mw-job-runner.default.erb +### puppet:///modules/mediawiki/jobrunner/mw-job-runner.default.erb JR_USER=<%= @user %> JR_NICE=<%= @nice %> -- To view, visit https://gerrit.wikimedia.org/r/51779 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I46fe11a31832207406c975ac1ba8903496a2 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Pyoungmeister Gerrit-Reviewer: Pyoungmeister Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] fixing the rest of the shit I forgot... - change (operations/puppet)
Pyoungmeister has uploaded a new change for review. https://gerrit.wikimedia.org/r/51779 Change subject: fixing the rest of the shit I forgot... .. fixing the rest of the shit I forgot... Change-Id: I46fe11a31832207406c975ac1ba8903496a2 --- M modules/mediawiki/manifests/cgroup.pp M modules/mediawiki/manifests/jobrunner.pp M modules/mediawiki/templates/jobrunner/jobs-loop.sh.erb M modules/mediawiki/templates/jobrunner/mw-job-runner.default.erb 4 files changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/79/51779/1 diff --git a/modules/mediawiki/manifests/cgroup.pp b/modules/mediawiki/manifests/cgroup.pp index efd986d..6f291d4 100644 --- a/modules/mediawiki/manifests/cgroup.pp +++ b/modules/mediawiki/manifests/cgroup.pp @@ -7,7 +7,7 @@ owner => root, group => root, mode=> '0644', - source => 'puppet:///modules/mediawiki_new/cgroup/mw-cgroup.conf', + source => 'puppet:///modules/mediawiki/cgroup/mw-cgroup.conf', require => Package['cgroup-bin'], } @@ -21,6 +21,6 @@ owner => root, group => root, mode => '0755', - source => 'puppet:///modules/mediawiki_new/cgroup/cgroup-mediawiki-clean', + source => 'puppet:///modules/mediawiki/cgroup/cgroup-mediawiki-clean', } } diff --git a/modules/mediawiki/manifests/jobrunner.pp b/modules/mediawiki/manifests/jobrunner.pp index fce4d94..5a3413f 100644 --- a/modules/mediawiki/manifests/jobrunner.pp +++ b/modules/mediawiki/manifests/jobrunner.pp @@ -21,18 +21,18 @@ owner => root, group => root, mode => 0755, - source => "puppet:///modules/mediawiki_new/jobrunner/mw-job-runner.init"; + source => "puppet:///modules/mediawiki/jobrunner/mw-job-runner.init"; } file { "/etc/default/mw-job-runner": - content => template("mediawiki_new/jobrunner/mw-job-runner.default.erb"); + content => template("mediawiki/jobrunner/mw-job-runner.default.erb"); } file { "/usr/local/bin/jobs-loop.sh": owner => root, group => root, mode => 0755, - content => template("mediawiki_new/jobrunner/jobs-loop.sh.erb"); + content => template("mediawiki/jobrunner/jobs-loop.sh.erb"); } if $run_jobs_enabled == true { service { diff --git a/modules/mediawiki/templates/jobrunner/jobs-loop.sh.erb b/modules/mediawiki/templates/jobrunner/jobs-loop.sh.erb index d6598f7..23ba735 100755 --- a/modules/mediawiki/templates/jobrunner/jobs-loop.sh.erb +++ b/modules/mediawiki/templates/jobrunner/jobs-loop.sh.erb @@ -1,6 +1,6 @@ #!/bin/bash ### THIS FILE IS MANAGED BY PUPPET -### puppet:///modules/mediawiki_new/jobrunner/jobs-loop.sh.erb +### puppet:///modules/mediawiki/jobrunner/jobs-loop.sh.erb # # NAME # jobs-loop.sh -- Continuously process a MediaWiki jobqueue diff --git a/modules/mediawiki/templates/jobrunner/mw-job-runner.default.erb b/modules/mediawiki/templates/jobrunner/mw-job-runner.default.erb index 3764a46..ddad131 100644 --- a/modules/mediawiki/templates/jobrunner/mw-job-runner.default.erb +++ b/modules/mediawiki/templates/jobrunner/mw-job-runner.default.erb @@ -1,5 +1,5 @@ ### THIS FILE IS MANAGED BY PUPPET -### puppet:///modules/mediawiki_new/jobrunner/mw-job-runner.default.erb +### puppet:///modules/mediawiki/jobrunner/mw-job-runner.default.erb JR_USER=<%= @user %> JR_NICE=<%= @nice %> -- To view, visit https://gerrit.wikimedia.org/r/51779 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I46fe11a31832207406c975ac1ba8903496a2 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Pyoungmeister ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Bug 35623 - createAndPromote.php: Change to allow promotion ... - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Bug 35623 - createAndPromote.php: Change to allow promotion only .. Bug 35623 - createAndPromote.php: Change to allow promotion only Introduces the --force option to promote the user even if it already exists. Change-Id: Id0cd0e49a46f78fdbff3560adf23ba0c33aae430 --- M maintenance/createAndPromote.php 1 file changed, 58 insertions(+), 25 deletions(-) Approvals: Parent5446: Looks good to me, approved jenkins-bot: Verified diff --git a/maintenance/createAndPromote.php b/maintenance/createAndPromote.php index ad5333f..81fbbb3 100644 --- a/maintenance/createAndPromote.php +++ b/maintenance/createAndPromote.php @@ -20,6 +20,7 @@ * @file * @ingroup Maintenance * @author Rob Church + * @author Pablo Castellano */ require_once( __DIR__ . '/Maintenance.php' ); @@ -31,50 +32,82 @@ */ class CreateAndPromote extends Maintenance { + static $permitRoles = array( 'sysop', 'bureaucrat' ); + public function __construct() { parent::__construct(); - $this->mDescription = "Create a new user account"; - $this->addOption( "sysop", "Grant the account sysop rights" ); - $this->addOption( "bureaucrat", "Grant the account bureaucrat rights" ); + $this->mDescription = "Create a new user account and/or grant it additional rights"; + $this->addOption( "force", "If acccount exists already, just grant it rights or change password." ); + foreach( self::$permitRoles as $role ) { + $this->addOption( $role, "Add the account to the {$role} group" ); + } $this->addArg( "username", "Username of new user" ); - $this->addArg( "password", "Password to set" ); + $this->addArg( "password", "Password to set (not required if --force is used)", false); } public function execute() { $username = $this->getArg( 0 ); $password = $this->getArg( 1 ); - - $this->output( wfWikiID() . ": Creating and promoting User:{$username}..." ); + $force = $this->hasOption( 'force' ); + $inGroups = array(); $user = User::newFromName( $username ); if ( !is_object( $user ) ) { $this->error( "invalid username.", true ); - } elseif ( 0 != $user->idForName() ) { - $this->error( "account exists.", true ); } - # Try to set the password - try { - $user->setPassword( $password ); - } catch ( PasswordError $pwe ) { - $this->error( $pwe->getText(), true ); + $exists = ( 0 !== $user->idForName() ); + + if ( $exists && !$force ) { + $this->error( "Account exists. Perhaps you want the --force option?", true ); + } else if ( !$exists && !$password ) { + $this->error( "Argument required!", false ); + $this->maybeHelp( true ); + } else if ( $exists ) { + $inGroups = $user->getGroups(); } - # Insert the account into the database - $user->addToDatabase(); - $user->saveSettings(); + $promotions = array_diff( array_filter( self::$permitRoles, array( $this, 'hasOption' ) ), $inGroups ); + + if ( $exists && !$password && count( $promotions ) === 0 ) { + $this->output( "Account exists and nothing to do.\n" ); + return; + } else if ( count( $promotions ) !== 0 ) { + $promoText = "User:{$username} into " . implode( ', ', $promotions ) . "...\n"; + if ( $exists ) { + $this->output( wfWikiID() . ": Promoting $promoText" ); + } else { + $this->output( wfWikiID() . ": Creating and promoting $promoText" ); + } + } + + if ( $password ) { + # Try to set the password + try { + $user->setPassword( $password ); + if ( $exists ) { + $this->output( "Password set.\n" ); + $user->saveSettings(); + } + } catch ( PasswordError $pwe ) { + $this->error( $pwe->getText(), true ); + } + } + + if ( !$exists ) { + # Insert the account into the database + $user
[MediaWiki-commits] [Gerrit] Improve documentation for OutputPage->addModuleStyles - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Improve documentation for OutputPage->addModuleStyles .. Improve documentation for OutputPage->addModuleStyles Change-Id: I56392cdb4e0d9fd5cac15ac947962364ae96381f --- M includes/OutputPage.php 1 file changed, 5 insertions(+), 3 deletions(-) Approvals: Spage: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 525fc24..881689c 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -521,9 +521,11 @@ } /** -* Add only CSS of one or more modules recognized by the resource loader. Module -* styles added through this function will be loaded by the resource loader when -* the page loads. +* Add only CSS of one or more modules recognized by the resource loader. +* +* Module styles added through this function will be added using standard link CSS +* tags, rather than as a combined Javascript and CSS package. Thus, they will +* load when JavaScript is disabled (unless CSS also happens to be disabled). * * @param $modules Mixed: module name (string) or array of module names */ -- To view, visit https://gerrit.wikimedia.org/r/5 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I56392cdb4e0d9fd5cac15ac947962364ae96381f Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Mattflaschen Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Mattflaschen Gerrit-Reviewer: Platonides Gerrit-Reviewer: Spage 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 mediawiki_new to mediawiki - change (operations/puppet)
Pyoungmeister has submitted this change and it was merged. Change subject: rename mediawiki_new to mediawiki .. rename mediawiki_new to mediawiki Change-Id: I25accf3a491d1a0362c664732308eb566b05823b --- M manifests/misc/statistics.pp M manifests/openstack.pp M manifests/role/applicationserver.pp M manifests/site.pp M modules/applicationserver/manifests/service.pp R modules/mediawiki/files/cgroup/cgroup-mediawiki-clean R modules/mediawiki/files/cgroup/mw-cgroup.conf R modules/mediawiki/files/jobrunner/mw-job-runner.init R modules/mediawiki/manifests/cgroup.pp R modules/mediawiki/manifests/init.pp R modules/mediawiki/manifests/jobrunner.pp A modules/mediawiki/manifests/packages.pp A modules/mediawiki/manifests/sync.pp R modules/mediawiki/manifests/users/l10nupdate.pp A modules/mediawiki/manifests/users/mwdeploy.pp R modules/mediawiki/manifests/users/sudo.pp R modules/mediawiki/templates/jobrunner/jobs-loop.sh.erb R modules/mediawiki/templates/jobrunner/mw-job-runner.default.erb D modules/mediawiki_new/manifests/packages.pp D modules/mediawiki_new/manifests/sync.pp D modules/mediawiki_new/manifests/users/mwdeploy.pp 21 files changed, 43 insertions(+), 50 deletions(-) Approvals: Pyoungmeister: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp index c4e0494..d1bd8e4 100644 --- a/manifests/misc/statistics.pp +++ b/manifests/misc/statistics.pp @@ -91,7 +91,7 @@ # and ensures that it is at the latest revision. # RT 2162 class misc::statistics::mediawiki { - require mediawiki_new::users::mwdeploy + require mediawiki::users::mwdeploy $statistics_mediawiki_directory = "/a/mediawiki/core" diff --git a/manifests/openstack.pp b/manifests/openstack.pp index 44356ff..79bbaf8 100644 --- a/manifests/openstack.pp +++ b/manifests/openstack.pp @@ -401,7 +401,7 @@ } class openstack::openstack-manager($openstack_version="diablo", $novaconfig, $certificate) { - require mediawiki_new::users::mwdeploy + require mediawiki::users::mwdeploy include webserver::apache2 diff --git a/manifests/role/applicationserver.pp b/manifests/role/applicationserver.pp index 7d6aab4..0b914ce 100644 --- a/manifests/role/applicationserver.pp +++ b/manifests/role/applicationserver.pp @@ -36,8 +36,7 @@ $cluster = "${group}" include standard, - ## TODO: rename to just mediawiki after full transition to module - mediawiki_new + mediawiki if $::realm == 'production' { include admins::roots, @@ -165,7 +164,7 @@ imagescaler::packages, imagescaler::files - class {"mediawiki_new::jobrunner": + class {"mediawiki::jobrunner": run_jobs_enabled => $run_jobs_enabled, dprioprocs => 10, iprioprocs => 0, @@ -192,7 +191,7 @@ class { "role::applicationserver::common": group => "jobrunner" } - class { "mediawiki_new::jobrunner": dprioprocs => 12, iprioprocs => 8, run_jobs_enabled => $run_jobs_enabled } + class { "mediawiki::jobrunner": dprioprocs => 12, iprioprocs => 8, run_jobs_enabled => $run_jobs_enabled } include applicationserver::config::php, applicationserver::config::base, applicationserver::packages, diff --git a/manifests/site.pp b/manifests/site.pp index 74fb51f..078348b 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -2394,7 +2394,7 @@ include base, ntp::client, ganglia, - mediawiki_new::sync, + mediawiki::sync, snapshots::packages, snapshots::sync, snapshots::files, diff --git a/modules/applicationserver/manifests/service.pp b/modules/applicationserver/manifests/service.pp index 7f4c8d2..4c112e7 100644 --- a/modules/applicationserver/manifests/service.pp +++ b/modules/applicationserver/manifests/service.pp @@ -3,7 +3,7 @@ class applicationserver::service { Class["applicationserver::apache_packages"] -> Class["applicationserver::service"] Class["applicationserver::config::base"] -> Class["applicationserver::service"] - include mediawiki_new::sync + include mediawiki::sync # Start apache but not at boot service { 'apache': diff --git a/modules/mediawiki_new/files/cgroup/cgroup-mediawiki-clean b/modules/mediawiki/files/cgroup/cgroup-mediawiki-clean similarity index 100% rename from modules/mediawiki_new/files/cgroup/cgroup-mediawiki-clean rename to modules/mediawiki/files/cgroup/cgroup-mediawiki-clean diff --git a/modules/mediawiki_new/files/cgroup/mw-cgroup.conf b/modules/mediawiki/files/cg
[MediaWiki-commits] [Gerrit] remove status.wp redirect (RT-1449) - change (operations/apache-config)
Dzahn has submitted this change and it was merged. Change subject: remove status.wp redirect (RT-1449) .. remove status.wp redirect (RT-1449) Change-Id: I6d1fe68b30a865f1dc9a36577745decacd297cda --- M redirects.conf 1 file changed, 0 insertions(+), 4 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/redirects.conf b/redirects.conf index 585ff0e..15d5811 100644 --- a/redirects.conf +++ b/redirects.conf @@ -45,7 +45,6 @@ quote.wikipedia.org \ sep11.wikipedia.org \ sources.wikipedia.org \ -status.wikipedia.org \ tartupeedia.ee *.tartupeedia.ee \ textbook.wikipedia.org \ vikimedija.org *.vikimedija.org \ @@ -549,9 +548,6 @@ RewriteCond %{HTTP_HOST} =sources.wikipedia.org RewriteRule ^(.*)$ http://wikisource.org$1 [R=301,L] - -RewriteCond %{HTTP_HOST} =status.wikipedia.org -RewriteRule ^(.*)$ http://status.wikimedia.org$1 [R=301,L] RewriteCond %{HTTP_HOST} ^(.+)\.wikisource.com$ RewriteRule ^(.*)$ http://%1.wikisource.org$1 [R=301,L] -- To view, visit https://gerrit.wikimedia.org/r/51702 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6d1fe68b30a865f1dc9a36577745decacd297cda Gerrit-PatchSet: 1 Gerrit-Project: operations/apache-config Gerrit-Branch: master Gerrit-Owner: Dzahn Gerrit-Reviewer: Dzahn Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Preserve caller expectations for behaviour of sslVerifyHost - change (mediawiki/core)
Tim Starling has uploaded a new change for review. https://gerrit.wikimedia.org/r/51717 Change subject: Preserve caller expectations for behaviour of sslVerifyHost .. Preserve caller expectations for behaviour of sslVerifyHost (bug 42441) The previous patch unnecessarily broke backwards compatibility in the Http::request() API, following cURL's broken conventions for sslVerifyHost instead of the boolean interpretation expected by all existing callers. This change reverts that one, and fixes the bug in another way. See Ia6535f10. Also don't bother wrapping the $this->sslVerifyHost access with isset() since it's always set. Change-Id: Id8d9374d9e9cbda87539ae725b1d3edfc728f449 --- M includes/HttpFunctions.php 1 file changed, 4 insertions(+), 19 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/17/51717/1 diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php index 731ab04..8e48da4 100644 --- a/includes/HttpFunctions.php +++ b/includes/HttpFunctions.php @@ -45,9 +45,7 @@ * Otherwise it will use $wgHTTPProxy (if set) * Otherwise it will use the environment variable "http_proxy" (if set) *- noProxy Don't use any proxy at all. Takes precedence over proxy value(s). -*- sslVerifyHost (curl only) Set to 2 to verify hostname against certificate -* Setting to 1 (or true) will NOT verify the host name. It will -* only check its existence. Setting to 0 (or false) disables entirely. +*- sslVerifyHost (curl only) Verify hostname against certificate *- sslVerifyCert (curl only) Verify SSL certificate *- caInfo (curl only) Provide CA information *- maxRedirectsMaximum number of redirects to follow (defaults to 5) @@ -187,15 +185,7 @@ protected $postData = null; protected $proxy = null; protected $noProxy = false; - /** -* Parameter passed to Curl that specifies whether -* to validate SSL certificates. -* -* Setting to 0 disables entirely. Setting to 1 checks -* the existence of a CN, but doesn't verify it. Setting -* to 2 (the default) actually verifies the host. -*/ - protected $sslVerifyHost = 2; + protected $sslVerifyHost = true; protected $sslVerifyCert = true; protected $caInfo = null; protected $method = "GET"; @@ -726,13 +716,8 @@ } $this->curlOptions[CURLOPT_USERAGENT] = $this->reqHeaders['User-Agent']; - if ( isset( $this->sslVerifyHost ) ) { - $this->curlOptions[CURLOPT_SSL_VERIFYHOST] = $this->sslVerifyHost; - } - - if ( isset( $this->sslVerifyCert ) ) { - $this->curlOptions[CURLOPT_SSL_VERIFYPEER] = $this->sslVerifyCert; - } + $this->curlOptions[CURLOPT_SSL_VERIFYHOST] = $this->sslVerifyHost ? 2 : 0; + $this->curlOptions[CURLOPT_SSL_VERIFYPEER] = $this->sslVerifyCert; if ( $this->caInfo ) { $this->curlOptions[CURLOPT_CAINFO] = $this->caInfo; -- To view, visit https://gerrit.wikimedia.org/r/51717 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id8d9374d9e9cbda87539ae725b1d3edfc728f449 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_20 Gerrit-Owner: Tim Starling ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] remove status.wp redirect (RT-1449) - change (operations/apache-config)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/51702 Change subject: remove status.wp redirect (RT-1449) .. remove status.wp redirect (RT-1449) Change-Id: I6d1fe68b30a865f1dc9a36577745decacd297cda --- M redirects.conf 1 file changed, 0 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/apache-config refs/changes/02/51702/1 diff --git a/redirects.conf b/redirects.conf index 585ff0e..15d5811 100644 --- a/redirects.conf +++ b/redirects.conf @@ -45,7 +45,6 @@ quote.wikipedia.org \ sep11.wikipedia.org \ sources.wikipedia.org \ -status.wikipedia.org \ tartupeedia.ee *.tartupeedia.ee \ textbook.wikipedia.org \ vikimedija.org *.vikimedija.org \ @@ -549,9 +548,6 @@ RewriteCond %{HTTP_HOST} =sources.wikipedia.org RewriteRule ^(.*)$ http://wikisource.org$1 [R=301,L] - -RewriteCond %{HTTP_HOST} =status.wikipedia.org -RewriteRule ^(.*)$ http://status.wikimedia.org$1 [R=301,L] RewriteCond %{HTTP_HOST} ^(.+)\.wikisource.com$ RewriteRule ^(.*)$ http://%1.wikisource.org$1 [R=301,L] -- To view, visit https://gerrit.wikimedia.org/r/51702 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6d1fe68b30a865f1dc9a36577745decacd297cda Gerrit-PatchSet: 1 Gerrit-Project: operations/apache-config Gerrit-Branch: master Gerrit-Owner: Dzahn ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] decom'ing db27 - change (operations/puppet)
Cmjohnson has submitted this change and it was merged. Change subject: decom'ing db27 .. decom'ing db27 Change-Id: I3394386a4cec51b6b378f31d9f8c291e9b224fcb --- M files/dhcpd/linux-host-entries.ttyS0-9600 M manifests/decommissioning.pp 2 files changed, 1 insertion(+), 5 deletions(-) Approvals: Cmjohnson: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/files/dhcpd/linux-host-entries.ttyS0-9600 b/files/dhcpd/linux-host-entries.ttyS0-9600 index 090e99d..39b375b 100644 --- a/files/dhcpd/linux-host-entries.ttyS0-9600 +++ b/files/dhcpd/linux-host-entries.ttyS0-9600 @@ -143,11 +143,6 @@ fixed-address db26.pmtpa.wmnet; } -host db27 { - hardware ethernet 00:14:4F:ED:AE:A0; - fixed-address db27.pmtpa.wmnet; -} - host db28 { hardware ethernet 00:14:4F:8D:51:46; fixed-address db28.pmtpa.wmnet; diff --git a/manifests/decommissioning.pp b/manifests/decommissioning.pp index 291e3af..22f670e 100644 --- a/manifests/decommissioning.pp +++ b/manifests/decommissioning.pp @@ -32,6 +32,7 @@ "db23", "db24", "db25", +"db27", "db28", "db30", "db41", -- To view, visit https://gerrit.wikimedia.org/r/51696 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3394386a4cec51b6b378f31d9f8c291e9b224fcb Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Cmjohnson Gerrit-Reviewer: Cmjohnson Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] decom'ing db27 - change (operations/puppet)
Cmjohnson has uploaded a new change for review. https://gerrit.wikimedia.org/r/51696 Change subject: decom'ing db27 .. decom'ing db27 Change-Id: I3394386a4cec51b6b378f31d9f8c291e9b224fcb --- M files/dhcpd/linux-host-entries.ttyS0-9600 M manifests/decommissioning.pp 2 files changed, 1 insertion(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/96/51696/1 diff --git a/files/dhcpd/linux-host-entries.ttyS0-9600 b/files/dhcpd/linux-host-entries.ttyS0-9600 index 090e99d..39b375b 100644 --- a/files/dhcpd/linux-host-entries.ttyS0-9600 +++ b/files/dhcpd/linux-host-entries.ttyS0-9600 @@ -143,11 +143,6 @@ fixed-address db26.pmtpa.wmnet; } -host db27 { - hardware ethernet 00:14:4F:ED:AE:A0; - fixed-address db27.pmtpa.wmnet; -} - host db28 { hardware ethernet 00:14:4F:8D:51:46; fixed-address db28.pmtpa.wmnet; diff --git a/manifests/decommissioning.pp b/manifests/decommissioning.pp index 291e3af..22f670e 100644 --- a/manifests/decommissioning.pp +++ b/manifests/decommissioning.pp @@ -32,6 +32,7 @@ "db23", "db24", "db25", +"db27", "db28", "db30", "db41", -- To view, visit https://gerrit.wikimedia.org/r/51696 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3394386a4cec51b6b378f31d9f8c291e9b224fcb Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Cmjohnson ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Clean up edit event creation and added basic test - change (mediawiki...EducationProgram)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/51695 Change subject: Clean up edit event creation and added basic test .. Clean up edit event creation and added basic test Change-Id: I8e07da52c7fa8e2bfe95f400f3f695eaa49912b6 --- M EducationProgram.hooks.php M EducationProgram.php A includes/Events/EditEventCreator.php A tests/phpunit/Events/EditEventCreatorTest.php 4 files changed, 282 insertions(+), 64 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EducationProgram refs/changes/95/51695/1 diff --git a/EducationProgram.hooks.php b/EducationProgram.hooks.php index 051beb4..a525571 100644 --- a/EducationProgram.hooks.php +++ b/EducationProgram.hooks.php @@ -71,6 +71,8 @@ 'Timeline', 'Utils', + 'Events/EditEventCreator', + 'rows/Article', 'tables/Orgs', @@ -426,78 +428,29 @@ * @return bool */ public static function onNewRevisionFromEditComplete( $article, Revision $rev, $baseID, User $user ) { - if ( !$user->isLoggedIn() ) { - return true; - } - wfProfileIn( __METHOD__ ); - $namespace = $article->getTitle()->getNamespace(); - if ( !in_array( $namespace, array( NS_MAIN, NS_TALK, NS_USER, NS_USER_TALK ) ) ) { - wfProfileOut( __METHOD__ ); - return true; + $eventCreator = new \EducationProgram\Events\EditEventCreator(); + $events = $eventCreator->getEventsForEdit( $article, $rev, $user ); + + $dbw = wfGetDB( DB_MASTER ); + + $startOwnStransaction = $dbw->trxLevel() === 0; + + if ( $startOwnStransaction ) { + $dbw->begin(); } - wfProfileIn( __METHOD__ . '-ns' ); - $conds = array( - 'upc_user_id' => $user->getId(), - 'upc_role' => EP_STUDENT, - ); + foreach ( $events as $event ) { + $event->save( __METHOD__ ); + } - $upc = wfGetDB( DB_SLAVE )->select( - array( 'ep_users_per_course', 'ep_courses' ), - array( 'upc_course_id' ), - array_merge( $conds, Courses::getStatusConds( 'current', true ) ), - __METHOD__, - array( 'DISTINCT' ), - array( - 'ep_courses' => array( 'INNER JOIN', array( 'upc_course_id=course_id' ) ), - ) - ); - - $hasCourses = $upc->numRows() !== 0; - wfProfileOut( __METHOD__ . '-ns' ); - - if ( $hasCourses ) { - wfProfileIn( __METHOD__ . '-courses' ); - if ( !is_null( $rev->getTitle() ) ) { - $event = Event::newFromRevision( $rev, $user ); - } - - $dbw = wfGetDB( DB_MASTER ); - - $startOwnStransaction = $dbw->trxLevel() === 0; - - if ( $startOwnStransaction ) { - $dbw->begin(); - } - - if ( !is_null( $rev->getTitle() ) ) { - while ( $link = $upc->fetchObject() ) { - $eventForCourse = clone $event; - $eventForCourse->setField( 'course_id', $link->upc_course_id ); - $eventForCourse->save(); - } - } - - if ( in_array( $namespace, array( NS_MAIN, NS_TALK ) ) ) { - $student = Student::newFromUserId( $user->getId(), true ); - - $student->setFields( array( - 'last_active' => wfTimestampNow() - ) ); - - $student->save(); - } - - if ( $startOwnStransaction ) { - $dbw->commit(); - } - - wfProfileIn( __METHOD__ . '-courses' ); + if ( $startOwnStransaction ) { + $dbw->commit(); } wfProfileOut( __METHOD__ ); + return true; } diff --git a/EducationProgram.php b/EducationProgram.php index be697a5..54afbe5 100644 --- a/EducationProgram.php +++ b/EducationProgram.php @@ -84,6 +84,8 @@ $wgAutoloadClasses['EducationProgram\ApiEnlist'] = $dir
[MediaWiki-commits] [Gerrit] Kill off and remove HttpRequest class - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Kill off and remove HttpRequest class .. Kill off and remove HttpRequest class Change-Id: I0661d483c60fc0d32f0c51937e91bece6960dfcf --- M includes/AutoLoader.php D includes/HttpFunctions.old.php 2 files changed, 0 insertions(+), 34 deletions(-) Approvals: Parent5446: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index 5bbfd96..d6aae1d 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -136,7 +136,6 @@ 'HTMLTextField' => 'includes/HTMLForm.php', 'Http' => 'includes/HttpFunctions.php', 'HttpError' => 'includes/Exception.php', - 'HttpRequest' => 'includes/HttpFunctions.old.php', 'ICacheHelper' => 'includes/CacheHelper.php', 'IcuCollation' => 'includes/Collation.php', 'IdentityCollation' => 'includes/Collation.php', diff --git a/includes/HttpFunctions.old.php b/includes/HttpFunctions.old.php deleted file mode 100644 index feb9b93..000 --- a/includes/HttpFunctions.old.php +++ /dev/null @@ -1,33 +0,0 @@ -http://www.gnu.org/copyleft/gpl.html - * - * @file - * @ingroup HTTP - */ - -/** - * HttpRequest was renamed to MWHttpRequest in order - * to prevent conflicts with PHP's HTTP extension - * which also defines an HttpRequest class. - * http://www.php.net/manual/en/class.httprequest.php - * - * This is for backwards compatibility. - * @since 1.17 - */ -class HttpRequest extends MWHttpRequest { } -- To view, visit https://gerrit.wikimedia.org/r/51329 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0661d483c60fc0d32f0c51937e91bece6960dfcf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Reedy Gerrit-Reviewer: Parent5446 Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] rename mediawiki_new to mediawiki - change (operations/puppet)
Pyoungmeister has uploaded a new change for review. https://gerrit.wikimedia.org/r/51694 Change subject: rename mediawiki_new to mediawiki .. rename mediawiki_new to mediawiki Change-Id: I25accf3a491d1a0362c664732308eb566b05823b --- M manifests/misc/statistics.pp M manifests/openstack.pp M manifests/role/applicationserver.pp M manifests/site.pp M modules/applicationserver/manifests/service.pp R modules/mediawiki/files/cgroup/cgroup-mediawiki-clean R modules/mediawiki/files/cgroup/mw-cgroup.conf R modules/mediawiki/files/jobrunner/mw-job-runner.init R modules/mediawiki/manifests/cgroup.pp R modules/mediawiki/manifests/init.pp R modules/mediawiki/manifests/jobrunner.pp A modules/mediawiki/manifests/packages.pp A modules/mediawiki/manifests/sync.pp R modules/mediawiki/manifests/users/l10nupdate.pp A modules/mediawiki/manifests/users/mwdeploy.pp R modules/mediawiki/manifests/users/sudo.pp R modules/mediawiki/templates/jobrunner/jobs-loop.sh.erb R modules/mediawiki/templates/jobrunner/mw-job-runner.default.erb D modules/mediawiki_new/manifests/packages.pp D modules/mediawiki_new/manifests/sync.pp D modules/mediawiki_new/manifests/users/mwdeploy.pp 21 files changed, 43 insertions(+), 50 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/94/51694/1 diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp index c4e0494..d1bd8e4 100644 --- a/manifests/misc/statistics.pp +++ b/manifests/misc/statistics.pp @@ -91,7 +91,7 @@ # and ensures that it is at the latest revision. # RT 2162 class misc::statistics::mediawiki { - require mediawiki_new::users::mwdeploy + require mediawiki::users::mwdeploy $statistics_mediawiki_directory = "/a/mediawiki/core" diff --git a/manifests/openstack.pp b/manifests/openstack.pp index 44356ff..79bbaf8 100644 --- a/manifests/openstack.pp +++ b/manifests/openstack.pp @@ -401,7 +401,7 @@ } class openstack::openstack-manager($openstack_version="diablo", $novaconfig, $certificate) { - require mediawiki_new::users::mwdeploy + require mediawiki::users::mwdeploy include webserver::apache2 diff --git a/manifests/role/applicationserver.pp b/manifests/role/applicationserver.pp index 7d6aab4..0b914ce 100644 --- a/manifests/role/applicationserver.pp +++ b/manifests/role/applicationserver.pp @@ -36,8 +36,7 @@ $cluster = "${group}" include standard, - ## TODO: rename to just mediawiki after full transition to module - mediawiki_new + mediawiki if $::realm == 'production' { include admins::roots, @@ -165,7 +164,7 @@ imagescaler::packages, imagescaler::files - class {"mediawiki_new::jobrunner": + class {"mediawiki::jobrunner": run_jobs_enabled => $run_jobs_enabled, dprioprocs => 10, iprioprocs => 0, @@ -192,7 +191,7 @@ class { "role::applicationserver::common": group => "jobrunner" } - class { "mediawiki_new::jobrunner": dprioprocs => 12, iprioprocs => 8, run_jobs_enabled => $run_jobs_enabled } + class { "mediawiki::jobrunner": dprioprocs => 12, iprioprocs => 8, run_jobs_enabled => $run_jobs_enabled } include applicationserver::config::php, applicationserver::config::base, applicationserver::packages, diff --git a/manifests/site.pp b/manifests/site.pp index 74fb51f..078348b 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -2394,7 +2394,7 @@ include base, ntp::client, ganglia, - mediawiki_new::sync, + mediawiki::sync, snapshots::packages, snapshots::sync, snapshots::files, diff --git a/modules/applicationserver/manifests/service.pp b/modules/applicationserver/manifests/service.pp index 7f4c8d2..4c112e7 100644 --- a/modules/applicationserver/manifests/service.pp +++ b/modules/applicationserver/manifests/service.pp @@ -3,7 +3,7 @@ class applicationserver::service { Class["applicationserver::apache_packages"] -> Class["applicationserver::service"] Class["applicationserver::config::base"] -> Class["applicationserver::service"] - include mediawiki_new::sync + include mediawiki::sync # Start apache but not at boot service { 'apache': diff --git a/modules/mediawiki_new/files/cgroup/cgroup-mediawiki-clean b/modules/mediawiki/files/cgroup/cgroup-mediawiki-clean similarity index 100% rename from modules/mediawiki_new/files/cgroup/cgroup-mediawiki-clean rename to modules/mediawiki/files/cgroup/cgroup-mediawiki-clean diff --git a/modules/mediawiki_new/files/cgroup/mw-c
[MediaWiki-commits] [Gerrit] Position guiders at top to improve experience on small screens. - change (mediawiki...GettingStarted)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/51693 Change subject: Position guiders at top to improve experience on small screens. .. Position guiders at top to improve experience on small screens. Change-Id: I190459a8c86a886ade4a8b2603c58525253acfde --- M resources/tours/gettingstartedpage.js 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GettingStarted refs/changes/93/51693/1 diff --git a/resources/tours/gettingstartedpage.js b/resources/tours/gettingstartedpage.js index ef079da..de47625 100644 --- a/resources/tours/gettingstartedpage.js +++ b/resources/tours/gettingstartedpage.js @@ -9,17 +9,17 @@ titlemsg: 'guidedtour-tour-gettingstartedpage-copy-editing-title', descriptionmsg: 'guidedtour-tour-gettingstartedpage-copy-editing-description', attachTo: '.onboarding-help.copyedit', - position: 'right' + position: 'top' }, { titlemsg: 'guidedtour-tour-gettingstartedpage-clarification-title', descriptionmsg: 'guidedtour-tour-gettingstartedpage-clarification-description', attachTo: '.onboarding-help.clarification', - position: 'right' + position: 'top' }, { titlemsg: 'guidedtour-tour-gettingstartedpage-add-links-title', descriptionmsg: 'guidedtour-tour-gettingstartedpage-add-links-description', attachTo: '.onboarding-help.addlinks', - position: 'right' + position: 'top' } ], isSinglePage: true -- To view, visit https://gerrit.wikimedia.org/r/51693 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I190459a8c86a886ade4a8b2603c58525253acfde Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GettingStarted Gerrit-Branch: feature/gettingstartedv2 Gerrit-Owner: Mattflaschen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update release 1.9 notes - change (mediawiki...SemanticMediaWiki)
Mwjames has uploaded a new change for review. https://gerrit.wikimedia.org/r/51692 Change subject: Update release 1.9 notes .. Update release 1.9 notes Change-Id: Ia80d01841f8ab5b3dbd5b9e9d4fb66e2ea1db457 --- M RELEASE-NOTES-1.9 1 file changed, 12 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticMediaWiki refs/changes/92/51692/1 diff --git a/RELEASE-NOTES-1.9 b/RELEASE-NOTES-1.9 index 708d9b6..2d1e5bb 100644 --- a/RELEASE-NOTES-1.9 +++ b/RELEASE-NOTES-1.9 @@ -13,6 +13,7 @@ * Restored compatibility with SQLite * Support for quantity export via API and JSON format (I17a3e046) * Removed old storage implementation SMWSQLStore2, superseded by SMWSQLStore3 in SMW 1.8 +* #set_recurring_event create individual subobjects (changes query behaviour for recurring events; for more see [[Help:Recurring_events]]) (I5db911e536) === New features === @@ -42,14 +43,22 @@ * SMWListResultPrinter, SMWResultPrinter, SMWSubobject, SMWSet * SMWFeedResultPrinter, SMWDISerializer -* SMWDIString, SMWStringLengthException +* SMWDIString, SMWStringLengthException, SMWSetRecurringEvent === Unit tests === -* Add PHPUnit tests FormatFactoryTest.php, QueryProcessorTest.php, ParserParameterTest.php -:DefinesTest.php, GlobalFunctionsTest.php, HighlighterTest.php, SubobjectTest.php +* Add PHPUnit tests +: FormatFactoryTest.php, QueryProcessorTest.php, ParserParameterTest.php +: DefinesTest.php, GlobalFunctionsTest.php, HighlighterTest.php +: SubobjectTest.php, SubobjectTest.php, SubobjectHandlerTest.php, +: RecurringEventsTest.php * Add QUnit tests ext.smw.test, ext.smw.util.tooltip +: ext.smw.api.test.js, ext.smw.data.test.js, ext.smw.query.test.js +: ext.smw.dataItem.number.test.js, ext.smw.dataItem.property.test.js, +: ext.smw.dataItem.text.test.js, ext.smw.dataItem.time.test.js +: ext.smw.dataItem.unknown.test.js, ext.smw.dataItem.uri.test.js +: ext.smw.dataItem.wikiPage.test.js, ext.smw.dataValue.quantity.test.js === Extended translations === -- To view, visit https://gerrit.wikimedia.org/r/51692 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia80d01841f8ab5b3dbd5b9e9d4fb66e2ea1db457 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SemanticMediaWiki Gerrit-Branch: master Gerrit-Owner: Mwjames ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] migration to mediawiki module done! - change (operations/puppet)
Pyoungmeister has submitted this change and it was merged. Change subject: migration to mediawiki module done! .. migration to mediawiki module done! next to rename mediawiki_new to mediawiki Change-Id: I29bb82073041c6b087a159ca39db93cacd3816ec --- D manifests/mediawiki.pp M manifests/site.pp 2 files changed, 0 insertions(+), 91 deletions(-) Approvals: Pyoungmeister: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/mediawiki.pp b/manifests/mediawiki.pp deleted file mode 100644 index e357ca1..000 --- a/manifests/mediawiki.pp +++ /dev/null @@ -1,89 +0,0 @@ -# mediawiki.pp - -class mediawiki::packages { - package { [ 'wikimedia-task-appserver', 'php5-redis', 'php5-memcached', 'libmemcached10', 'php5-igbinary' ]: - ensure => latest; - } - - # Disable timidity-daemon - # It's recommended by timidity and there's no simple way to avoid installing it - service { 'timidity': - enable => false, - ensure => stopped; - } -} - -class mediawiki::sync { - # Include this for syncing mw installation - # Include apache::apache-trigger-mw-sync to ensure that - # the sync happens each time just before apache is started - require mediawiki::packages - - exec { 'mw-sync': - command => '/usr/bin/sync-common', - cwd => '/tmp', - user => root, - group => root, - path => '/usr/bin:/usr/sbin', - refreshonly => true, - timeout => 600, - logoutput => on_failure; - } - - # l10nupdate account required for syncing - include accounts::l10nupdate - -} - -class mediawiki::refreshlinks { - # Include this to add cron jobs calling refreshLinks.php on all clusters. (RT-2355) - - file { '/home/mwdeploy/refreshLinks': - ensure => directory, - owner => mwdeploy, - group => mwdeploy, - mode => 0664, - } - - define refreshlinks::cronjob() { - - $cluster = regsubst($name, '@.*', '\1') - $monthday = regsubst($name, '.*@', '\1') - - cron { "cron-refreshlinks-${name}": - command => "/usr/local/bin/mwscriptwikiset refreshLinks.php ${cluster}.dblist --dfn-only > /home/mwdeploy/refreshLinks/${name}.log 2>&1", - user => mwdeploy, - hour => 0, - minute => 0, - monthday => $monthday, - ensure => present, - } - } - - # add cron jobs - usage: @ (these are just needed monthly) (note: s1 is temp. deactivated) - refreshlinks::cronjob { ['s2@2', 's3@3', 's4@4', 's5@5', 's6@6', 's7@7']: } -} - -class mediawiki::user { - systemuser { 'mwdeploy': name => 'mwdeploy' } -} - -class mediawiki::former-extdist-removesoon { - package { xinetd: - ensure => absent; - } - - systemuser { extdist: name => "extdist", home => "/var/lib/extdist", ensure => absent } - - file { - "/etc/xinetd.d/svn_invoker": - ensure => absent; - "/etc/logrotate.d/svn-invoker": - ensure => absent; - } - - cron { extdist_updateall: - ensure => absent; - } -} - diff --git a/manifests/site.pp b/manifests/site.pp index 77688d8..74fb51f 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -19,7 +19,6 @@ import "lvs.pp" import "mail.pp" import "media-storage.pp" -import "mediawiki.pp" import "memcached.pp" import "misc/*.pp" import "mobile.pp" @@ -676,7 +675,6 @@ misc::bastionhost, misc::deployment, misc::noc-wikimedia, - mediawiki::former-extdist-removesoon, misc::deployment::scap_scripts, misc::ircecho, misc::deployment::l10nupdate, -- To view, visit https://gerrit.wikimedia.org/r/51691 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I29bb82073041c6b087a159ca39db93cacd3816ec Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Pyoungmeister Gerrit-Reviewer: Pyoungmeister Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] migration to mediawiki module done! - change (operations/puppet)
Pyoungmeister has uploaded a new change for review. https://gerrit.wikimedia.org/r/51691 Change subject: migration to mediawiki module done! .. migration to mediawiki module done! next to rename mediawiki_new to mediawiki Change-Id: I29bb82073041c6b087a159ca39db93cacd3816ec --- D manifests/mediawiki.pp M manifests/site.pp 2 files changed, 0 insertions(+), 90 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/91/51691/1 diff --git a/manifests/mediawiki.pp b/manifests/mediawiki.pp deleted file mode 100644 index e357ca1..000 --- a/manifests/mediawiki.pp +++ /dev/null @@ -1,89 +0,0 @@ -# mediawiki.pp - -class mediawiki::packages { - package { [ 'wikimedia-task-appserver', 'php5-redis', 'php5-memcached', 'libmemcached10', 'php5-igbinary' ]: - ensure => latest; - } - - # Disable timidity-daemon - # It's recommended by timidity and there's no simple way to avoid installing it - service { 'timidity': - enable => false, - ensure => stopped; - } -} - -class mediawiki::sync { - # Include this for syncing mw installation - # Include apache::apache-trigger-mw-sync to ensure that - # the sync happens each time just before apache is started - require mediawiki::packages - - exec { 'mw-sync': - command => '/usr/bin/sync-common', - cwd => '/tmp', - user => root, - group => root, - path => '/usr/bin:/usr/sbin', - refreshonly => true, - timeout => 600, - logoutput => on_failure; - } - - # l10nupdate account required for syncing - include accounts::l10nupdate - -} - -class mediawiki::refreshlinks { - # Include this to add cron jobs calling refreshLinks.php on all clusters. (RT-2355) - - file { '/home/mwdeploy/refreshLinks': - ensure => directory, - owner => mwdeploy, - group => mwdeploy, - mode => 0664, - } - - define refreshlinks::cronjob() { - - $cluster = regsubst($name, '@.*', '\1') - $monthday = regsubst($name, '.*@', '\1') - - cron { "cron-refreshlinks-${name}": - command => "/usr/local/bin/mwscriptwikiset refreshLinks.php ${cluster}.dblist --dfn-only > /home/mwdeploy/refreshLinks/${name}.log 2>&1", - user => mwdeploy, - hour => 0, - minute => 0, - monthday => $monthday, - ensure => present, - } - } - - # add cron jobs - usage: @ (these are just needed monthly) (note: s1 is temp. deactivated) - refreshlinks::cronjob { ['s2@2', 's3@3', 's4@4', 's5@5', 's6@6', 's7@7']: } -} - -class mediawiki::user { - systemuser { 'mwdeploy': name => 'mwdeploy' } -} - -class mediawiki::former-extdist-removesoon { - package { xinetd: - ensure => absent; - } - - systemuser { extdist: name => "extdist", home => "/var/lib/extdist", ensure => absent } - - file { - "/etc/xinetd.d/svn_invoker": - ensure => absent; - "/etc/logrotate.d/svn-invoker": - ensure => absent; - } - - cron { extdist_updateall: - ensure => absent; - } -} - diff --git a/manifests/site.pp b/manifests/site.pp index 77688d8..59bab18 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -676,7 +676,6 @@ misc::bastionhost, misc::deployment, misc::noc-wikimedia, - mediawiki::former-extdist-removesoon, misc::deployment::scap_scripts, misc::ircecho, misc::deployment::l10nupdate, -- To view, visit https://gerrit.wikimedia.org/r/51691 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I29bb82073041c6b087a159ca39db93cacd3816ec Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Pyoungmeister ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Bug 45615 - Collection: Call to a member function getPrefixe... - change (mediawiki...Collection)
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/51689 Change subject: Bug 45615 - Collection: Call to a member function getPrefixedText() on a non-object .. Bug 45615 - Collection: Call to a member function getPrefixedText() on a non-object Change-Id: Icb12eccf64ea8af778f2ed1662574999ccdd7e15 --- M Collection.body.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection refs/changes/89/51689/1 diff --git a/Collection.body.php b/Collection.body.php index db6b037..83199d4 100644 --- a/Collection.body.php +++ b/Collection.body.php @@ -662,7 +662,7 @@ * @return bool */ static function removeArticle( $title, $oldid = 0 ) { - if ( !CollectionSession::hasSession() ) { + if ( !CollectionSession::hasSession() || !$title ) { return false; } $collection = CollectionSession::getCollection(); -- To view, visit https://gerrit.wikimedia.org/r/51689 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icb12eccf64ea8af778f2ed1662574999ccdd7e15 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Collection Gerrit-Branch: master Gerrit-Owner: Reedy ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (bug 42206) Rename ambassador roles - change (mediawiki...EducationProgram)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/51688 Change subject: (bug 42206) Rename ambassador roles .. (bug 42206) Rename ambassador roles Change-Id: I25637061dcd275ba2cf7fc4a053ebb2430e4b75e --- M EducationProgram.i18n.php 1 file changed, 104 insertions(+), 104 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EducationProgram refs/changes/88/51688/1 diff --git a/EducationProgram.i18n.php b/EducationProgram.i18n.php index bafaa20..3f15462 100644 --- a/EducationProgram.i18n.php +++ b/EducationProgram.i18n.php @@ -60,32 +60,32 @@ 'ep-nav-mycourses' => 'My courses', 'ep-nav-students' => 'Student list', 'ep-nav-mentors' => 'Ambassador list', - 'ep-nav-cas' => 'Campus Ambassadors', - 'ep-nav-oas' => 'Online Ambassadors', - 'ep-nav-oaprofile' => 'Online Ambassador profile', - 'ep-nav-caprofile' => 'Campus Ambassador profile', + 'ep-nav-cas' => 'Campus volunteers', + 'ep-nav-oas' => 'Online volunteers', + 'ep-nav-oaprofile' => 'Online volunteer profile', + 'ep-nav-caprofile' => 'Campus volunteer profile', // Logging 'log-name-institution' => 'Education Program institution log', 'log-name-course' => 'Education Program course log', 'log-name-student' => 'Education Program student log', - 'log-name-online' => 'Education Program Online Ambassador log', - 'log-name-campus' => 'Education Program Campus Ambassador log', + 'log-name-online' => 'Education Program Online volunteer log', + 'log-name-campus' => 'Education Program Campus volunteer log', 'log-name-instructor' => 'Education Program instructor log', 'log-name-eparticle' => 'Education Program article log', 'log-header-institution' => 'These events track the changes that are made to Education Program institutions.', 'log-header-course' => 'These events track the changes that are made to Education Program courses.', 'log-header-instructor' => 'These events track the changes that are made to Education Program instructors.', - 'log-header-campus' => 'These events track the changes that are made to Education Program Campus Ambassadors.', - 'log-header-online' => 'These events track the changes that are made to Education Program Online Ambassadors.', + 'log-header-campus' => 'These events track the changes that are made to Education Program Campus volunteers.', + 'log-header-online' => 'These events track the changes that are made to Education Program Online volunteers.', 'log-header-student' => 'These events track the changes that are made to Education Program students.', 'log-description-institution' => 'Log of all changes to [[Special:Institutions|institutions]].', 'log-description-course' => 'Log of all changes to [[Special:Courses|courses]].', 'log-description-instructor' => 'Log of all changes to instructors.', - 'log-description-online' => 'Log of all changes to Education Program [[Special:OnlineAmbassadors|Online Ambassadors]]', - 'log-description-campus' => 'Log of all changes to Education Program [[Special:CampusAmbassadors|Campus Ambassadors]]', + 'log-description-online' => 'Log of all changes to Education Program [[Special:OnlineAmbassadors|Online volunteers]]', + 'log-description-campus' => 'Log of all changes to Education Program [[Special:CampusAmbassadors|Campus volunteers]]', 'log-description-student' => 'Log of all changes to [[Special:Students|students]].', 'logentry-institution-add' => '$1 {{GENDER:$2|created}} institution $3', @@ -103,17 +103,17 @@ 'logentry-instructor-selfadd' => '$1 added {{GENDER:$2|himself|herself}} as {{GENDER:$2|instructor}} to course $3', 'logentry-instructor-selfremove' => '$1 removed {{GENDER:$2|himself|herself}} as {{GENDER:$2|instructor}} from course $3', - 'logentry-online-add' => '$1 {{GENDER:$2|added}} {{PLURAL:$4|Online Ambassador|Online Ambassadors}} $5 to course $3', - 'logentry-online-remove' => '$1 {{GENDER:$2|removed}} {{PLURAL:$4|Online Ambassador|Online Ambassadors}} $5 from course $3', - 'logentry-online-selfadd' => '$1 added {{GENDER:$2|himself|herself}} as {{GENDER:$2|Online Ambassador}} to course $3', - 'logentry-online-selfremove' => '$1 removed {{GENDER:$2|himself|herself}} as {{GENDER:$2|Online Ambassador}} from course $3', - 'logentry-online-profilesave' => '$1 updated {{GENDER:$2|his|her}} Online Ambassador profile', + 'logentry-online-add' => '$1 {{GENDER:$2|added}} {{PLURAL:$4|Online volunteer|Online volunteers}} $5 to course $3', + 'logentry-online-remove' => '$1 {{GENDER:$2|removed}} {{PLURAL:$4|Online volunteer|Online volunteers}} $5 from course $3', + 'logentry-online-selfadd' => '$1 added
[MediaWiki-commits] [Gerrit] Force wgCategoryCollation to be uppercase in tests - change (mediawiki/core)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/51687 Change subject: Force wgCategoryCollation to be uppercase in tests .. Force wgCategoryCollation to be uppercase in tests This fixed bug 40489 Change-Id: I920950e93f214961aa91d916e606dbb22c8dc2d9 --- M tests/phpunit/includes/LinksUpdateTest.php 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/87/51687/1 diff --git a/tests/phpunit/includes/LinksUpdateTest.php b/tests/phpunit/includes/LinksUpdateTest.php index 244e4a8..a79b3a2 100644 --- a/tests/phpunit/includes/LinksUpdateTest.php +++ b/tests/phpunit/includes/LinksUpdateTest.php @@ -85,6 +85,8 @@ } public function testUpdate_categorylinks() { + $this->setMwGlobals( 'wgCategoryCollation', 'uppercase' ); + list( $t, $po ) = $this->makeTitleAndParserOutput( "Testing", 111 ); $po->addCategory( "Foo", "FOO" ); -- To view, visit https://gerrit.wikimedia.org/r/51687 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I920950e93f214961aa91d916e606dbb22c8dc2d9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (bug 45614) Fix incompatibility with recent Validator - change (mediawiki...SemanticResultFormats)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/51686 Change subject: (bug 45614) Fix incompatibility with recent Validator .. (bug 45614) Fix incompatibility with recent Validator Change-Id: Ia4e0095c6063b4278f45b5139bed905e422c6b8b --- M formats/array/SRF_Hash.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticResultFormats refs/changes/86/51686/1 diff --git a/formats/array/SRF_Hash.php b/formats/array/SRF_Hash.php index 083959a..996c446 100644 --- a/formats/array/SRF_Hash.php +++ b/formats/array/SRF_Hash.php @@ -69,7 +69,7 @@ * * @since 1.8 * -* @param $definitions array of IParamDefinition +* @param IParamDefinition[] $definitions * * @return array of IParamDefinition|array */ @@ -77,7 +77,7 @@ $params = parent::getParamDefinitions( $definitions ); unset( $params['pagetitle'] ); // page title is Hash key, otherwise, just use Array format! - $params['name']->setMessage( 'srf_paramdesc_hashname' ); + $params['name']['message']( 'srf_paramdesc_hashname' ); return $params; } -- To view, visit https://gerrit.wikimedia.org/r/51686 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia4e0095c6063b4278f45b5139bed905e422c6b8b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SemanticResultFormats Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make the parser cache expire at 30 days again - change (operations/mediawiki-config)
Tim Starling has submitted this change and it was merged. Change subject: Make the parser cache expire at 30 days again .. Make the parser cache expire at 30 days again Per bug 44570 comment 32. Doesn't fix the bug, just brings the parser cache expiry into line with the max age sent to purgeParserCache.php and, apparently, available disk space. Also avoids a massive CPU spike occuring next time purgeParserCache.php runs. Some cleanup of the parsercache database is still necessary, to adjust the expiry time of objects expiring in 2014, so that they can be removed by purgeParserCache.php. Change-Id: I61a706d931ff2e53108c082da88fa91b82ea1214 --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Tim Starling: Verified; Looks good to me, approved diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 6e3f466..55f24f6 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -8628,7 +8628,7 @@ ), 'wgParserCacheExpireTime' => array( - 'default' => 86400 * 365, + 'default' => 86400 * 30, ), # Captcha ... -- To view, visit https://gerrit.wikimedia.org/r/51684 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I61a706d931ff2e53108c082da88fa91b82ea1214 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Tim Starling Gerrit-Reviewer: Tim Starling Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] decommissioning db27 - change (operations/puppet)
Cmjohnson has uploaded a new change for review. https://gerrit.wikimedia.org/r/51685 Change subject: decommissioning db27 .. decommissioning db27 Change-Id: I185454e2822a25fc2155e1e3a508ee38540dcb6d --- M files/dhcpd/linux-host-entries.ttyS0-9600 M manifests/decommissioning.pp 2 files changed, 1 insertion(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/85/51685/1 diff --git a/files/dhcpd/linux-host-entries.ttyS0-9600 b/files/dhcpd/linux-host-entries.ttyS0-9600 index 090e99d..39b375b 100644 --- a/files/dhcpd/linux-host-entries.ttyS0-9600 +++ b/files/dhcpd/linux-host-entries.ttyS0-9600 @@ -143,11 +143,6 @@ fixed-address db26.pmtpa.wmnet; } -host db27 { - hardware ethernet 00:14:4F:ED:AE:A0; - fixed-address db27.pmtpa.wmnet; -} - host db28 { hardware ethernet 00:14:4F:8D:51:46; fixed-address db28.pmtpa.wmnet; diff --git a/manifests/decommissioning.pp b/manifests/decommissioning.pp index 291e3af..f2945f6 100644 --- a/manifests/decommissioning.pp +++ b/manifests/decommissioning.pp @@ -32,6 +32,7 @@ "db23", "db24", "db25", +"db27" "db28", "db30", "db41", -- To view, visit https://gerrit.wikimedia.org/r/51685 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I185454e2822a25fc2155e1e3a508ee38540dcb6d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Cmjohnson ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add replace_space function - change (analytics/webstatscollector)
Demon has submitted this change and it was merged. Change subject: Add replace_space function .. Add replace_space function Added tests, added test file, fixed replace_space Change-Id: Ic795c876105fe8a1a980f83a0c07a5ba2011fff5 --- M Makefile A README.tests A entries-with-urls-with-spaces-2013-02-10.txt M filter.c A test.sh 5 files changed, 80 insertions(+), 35 deletions(-) diff --git a/Makefile b/Makefile index b05321b..25451a7 100644 --- a/Makefile +++ b/Makefile @@ -14,12 +14,14 @@ all: collector filter -collector: collector.h collector.c export.c +collector: collector.h collector.c export.c export.o + gcc -o collector collector.c export.o -ldb -lpthread filter: filter.c - cc -o filter filter.c + gcc -o filter filter.c -#export: collector.h export.c +export.o: export.c collector.h collector.c filter.c + gcc -c -o export.o export.c clean: - rm -f collector exporter + rm -f *.o collector filter diff --git a/README.tests b/README.tests new file mode 100644 index 000..c14927e --- /dev/null +++ b/README.tests @@ -0,0 +1,7 @@ + + +The test lines in entries-with-urls-with-spaces-2013-02-10.txt were produced like this: + + zcat /home/user/wikidata/raw_gzips/sampled-1000.tab.log-20130210.gz | perl -ne '@f=split(/\t/); print if index($f[8]," ")!=-1;' > entries-with-urls-with-spaces-2013-02-10.txt + +After this head -40 | tail -30 was applied in order for the filter to accept all of them (some of them were influenced by some the discarding rules of the filter). diff --git a/entries-with-urls-with-spaces-2013-02-10.txt b/entries-with-urls-with-spaces-2013-02-10.txt new file mode 100644 index 000..abb6648 --- /dev/null +++ b/entries-with-urls-with-spaces-2013-02-10.txt @@ -0,0 +1,30 @@ +ssl1002338866312 2013-02-09T10:00:09.126 1.667 0.0.0.0 FAKE_CACHE_STATUS/301 667 GET https://fr.wikipedia.org/wiki/Discussion:Bourail/Droit d'auteur NONE/wikipedia - - - Mozilla/5.0%20(compatible;%20Googlebot/2.1;%20+http://www.google.com/bot.html) - - +ssl1004347282202 2013-02-09T10:18:11.367 0.082 0.0.0.0 FAKE_CACHE_STATUS/301 675 GET https://fr.wikipedia.org/wiki/Discussion:Chemin\xC3\xA9e solaire/Traduction NONE/wikipedia - - - Mozilla/5.0%20(compatible;%20Googlebot/2.1;%20+https://www.google.com/bot.html) - - +ssl1004349592952 2013-02-09T12:19:04.972 0.079 0.0.0.0 FAKE_CACHE_STATUS/301 667 GET https://fr.wikipedia.org/wiki/\xC3\x89tienne Perrot (psychanalyste) NONE/wikipedia - - - Mozilla/5.0%20(compatible;%20Googlebot/2.1;%20+http://www.google.com/bot.html) - - +ssl1001338735382 2013-02-09T12:57:51.173 0.201 0.0.0.0 FAKE_CACHE_STATUS/301 759 GET http://ja.wikipedia.org/wiki/CODE NAME. 1 Brother Sun\xE3\x80\x90\xE5\x88\x9D\xE5\x9B\x9E\xE7\x94\x9F\xE7\x94\xA3\xE9\x99\x90\xE5\xAE\x9A\xE3\x80\x91(\xE7\xB4\x99\xE3\x82\xB8\xE3\x83\xA3\xE3\x82\xB1\xE3\x83\x83\xE3\x83\x88\xE4\xBB\x95\xE6\xA7\x98) NONE/wikipedia - - - foobar2000/1.1.14a - - +ssl1001340768664 2013-02-09T14:29:25.274 0.351 0.0.0.0 FAKE_CACHE_STATUS/301 885 GET http://ja.wikipedia.org/wiki/\xE7\x89\xB9\xE5\x88\xA5:\xE3\x83\x87\xE3\x83\xBC\xE3\x82\xBF\xE6\x9B\xB8\xE3\x81\x8D\xE5\x87\xBA\xE3\x81\x97/\xE3\x82\x82\xE3\x82\x82\xE3\x81\x84\xE3\x82\x8D\xE3\x82\xAF\xE3\x83\xAD\xE3\x83\xBC\xE3\x83\x90\xE3\x83\xBCZ 1st Live \xE3\x81\xAB\xE3\x83\x95\xE3\x83\xA9\xE3\x83\xB3\xE3\x82\xB9\xE4\xBA\xBA\xE5\xA4\xA7\xE8\x88\x88\xE5\xA5\xAE\xEF\xBC\x81\xE3\x83\x91\xE3\x83\xAAde Japan Expo NONE/wikipedia - - - Mozilla/4.0%20(compatible;%20MSIE%207.0;%20Windows%20NT%206.0) - - +ssl3002764325222 2013-02-09T14:35:55.799 0.088 0.0.0.0 FAKE_CACHE_STATUS/301 1247GET http://en.wikipedia.org/wiki/Chopin - The Piano Works (Brilliant Classics) (CD4 of 13)_(album) NONE/wikipedia - - - foobar2000/1.2 - - +ssl1002345415572 2013-02-09T15:10:39.804 0.051 0.0.0.0 FAKE_CACHE_STATUS/301 674 GET https://fr.wikipedia.org/wiki/Portail:Indianapolis/Index th\xC3\xA9matique NONE/wikipedia - - - Mozilla/5.0%20(compatible;%20Googlebot/2.1;%20+http://www.google.com/bot.html) - - +ssl3002769405948 2013-02-09T15:36:59.442 0.408 0.0.0.0 FAKE_CACHE_STATUS/301 1270GET https://en.wikipedia.org/wiki/Kevin Smith NONE/wikipedia - - - Mozilla/5.0%20(X11;%20Linux%20x86_64;%20rv:18.0)%20Gecko/20100101%20Firefox/18.0 en-US,en;q=0.5 - +ssl1004354242982 2013-02-09T15:40:02.553 0.061 0.0.0.0 FAKE_CACHE_STATUS/301 677 GET https://fr.wikipedia.org/wiki/Personnages de la Saga du d\xC3\xA9sir interdit
[MediaWiki-commits] [Gerrit] Make the parser cache expire at 30 days again - change (operations/mediawiki-config)
Tim Starling has uploaded a new change for review. https://gerrit.wikimedia.org/r/51684 Change subject: Make the parser cache expire at 30 days again .. Make the parser cache expire at 30 days again Per bug 44570 comment 32. Doesn't fix the bug, just brings the parser cache expiry into line with the max age sent to purgeParserCache.php and, apparently, available disk space. Also avoids a massive CPU spike occuring next time purgeParserCache.php runs. Some cleanup of the parsercache database is still necessary, to adjust the expiry time of objects expiring in 2014, so that they can be removed by purgeParserCache.php. Change-Id: I61a706d931ff2e53108c082da88fa91b82ea1214 --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/84/51684/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 6e3f466..55f24f6 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -8628,7 +8628,7 @@ ), 'wgParserCacheExpireTime' => array( - 'default' => 86400 * 365, + 'default' => 86400 * 30, ), # Captcha ... -- To view, visit https://gerrit.wikimedia.org/r/51684 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I61a706d931ff2e53108c082da88fa91b82ea1214 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Tim Starling ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Refactor mediawiki::singlenode and wikidata::singlenode into... - change (operations/puppet)
Andrew Bogott has submitted this change and it was merged. Change subject: Refactor mediawiki::singlenode and wikidata::singlenode into modules. .. Refactor mediawiki::singlenode and wikidata::singlenode into modules. Change-Id: I7514bc9de98507c001dd4fc2e090d38b13cc0829 --- M manifests/mediawiki.pp M manifests/role/labsmediawiki.pp M manifests/site.pp A modules/mediawiki_singlenode/manifests/init.pp A modules/mediawiki_singlenode/manifests/mw-extension.pp R modules/mediawiki_singlenode/templates/labs-localsettings R modules/mediawiki_singlenode/templates/simplewiki.wmflabs.org R modules/wikidata_singlenode/files/StartProfiler.php R modules/wikidata_singlenode/files/Wikidata-logo-demo.png R modules/wikidata_singlenode/files/Wikidata-logo-democlient.png R modules/wikidata_singlenode/files/Wikidata-logo-demorepo.png R modules/wikidata_singlenode/files/notitle.php R modules/wikidata_singlenode/files/simple-elements.xml R modules/wikidata_singlenode/files/wikidata-favicon.ico R modules/wikidata_singlenode/files/wikidata-move-mainpage R modules/wikidata_singlenode/files/wikidata-replication.logrotate R modules/wikidata_singlenode/files/wikidata-repo-mainpage.xml R modules/wikidata_singlenode/files/wikidata-runJobs.logrotate R modules/wikidata_singlenode/files/wikidata.cnf R modules/wikidata_singlenode/manifests/init.pp R modules/wikidata_singlenode/templates/wikidata-client-requires.php R modules/wikidata_singlenode/templates/wikidata-repo-requires.php 22 files changed, 153 insertions(+), 158 deletions(-) Approvals: Andrew Bogott: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/mediawiki.pp b/manifests/mediawiki.pp index 3290ebb..e357ca1 100644 --- a/manifests/mediawiki.pp +++ b/manifests/mediawiki.pp @@ -68,141 +68,6 @@ systemuser { 'mwdeploy': name => 'mwdeploy' } } -# definition to clone mediawiki extensions - define mw-extension( - # defaults - $branch="master", - $ssh="", - $owner="root", - $group="root", - $timeout="300", - $depth="full", - $mode=0755) { - git::clone { "$name": - require => git::clone["mediawiki"], - directory => "${install_path}/extensions/${name}", - origin => "https://gerrit.wikimedia.org/r/p/mediawiki/extensions/${name}.git";, - branch => $branch, - ensure => $ensure, - } - } - - - -# A one-step class for setting up a single-node MediaWiki install, -# running from a Git tree. -# -# Roles can insert additional lines into LocalSettings.php via the -# $role_requires and $role_config_lines vars. -# -# Members of $role_requires will be inserted wrapped with 'require_once()'. -# -# Members of $role_config_lines will get inserted into the file verbatim -- be careful about -# quoting and escaping! Note that if you're inserting a bunch of lines you'll be better -# served by creating an additional template and including that via $role_requires. -# -# Memcached memory usage defaults to 128 megs but can be changed via $memcached_size. -class mediawiki::singlenode( $ensure = 'present', - $database_name = "testwiki", - $role_requires = [], - $install_path = "/srv/mediawiki", - $role_config_lines = [], - $memcached_size = 128) { -require "role::labs-mysql-server", - "webserver::php5-mysql", - "webserver::php5" - - package { [ "imagemagick", "php-apc", ] : - ensure => latest - } - - class { "memcached": - memcached_ip => "127.0.0.1", - memcached_size => $memcached_size } - - git::clone { "mediawiki": - directory => $install_path, - branch => "master", - timeout => 1800, - depth => 1, - ensure => $ensure, - origin => "https://gerrit.wikimedia.org/r/p/mediawiki/core.git";; - } - -# get the extensions - mw-extension { [ "Nuke", "SpamBlacklist", "ConfirmEdit" ]: - require => Git::Clone["mediawiki"], - } - - file { - "/etc/apache2/sites-available/wiki": - mode => 644, - owner => root, - group => root, - content => template('apache/sites/simplewiki.wmflabs.org'), - ensure => present; - } - - file { "/var/www/srv": - ensure => 'directory'; - } - - file { "/var/www/${install_path}": - require => [File['/var/www/srv'], git::clone['mediawiki']], - ensure => 'link', -