[MediaWiki-commits] [Gerrit] update the description - change (mediawiki...CodeMirror)
jenkins-bot has submitted this change and it was merged. Change subject: update the description .. update the description Change-Id: I20a64f3b5d1c1efc2ad5560a2c80f7fcf2c22b16 --- M i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Pastakhov: Looks good to me, approved Siebrand: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/i18n/en.json b/i18n/en.json index 8077e80..94afa10 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -4,5 +4,5 @@ pastakhov ] }, - codemirror-desc: Syntax-highlighted editing for wiki pages using [http://codemirror.net/ CodeMirror] + codemirror-desc: Provides syntax highlighting in wikitext editor } -- To view, visit https://gerrit.wikimedia.org/r/168537 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I20a64f3b5d1c1efc2ad5560a2c80f7fcf2c22b16 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/CodeMirror Gerrit-Branch: master Gerrit-Owner: Pastakhov pastak...@yandex.ru Gerrit-Reviewer: Pastakhov pastak...@yandex.ru Gerrit-Reviewer: Siebrand siebr...@kitano.nl 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 debug log group for CentralAuthUserMerge - change (operations/mediawiki-config)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/168936 Change subject: Add debug log group for CentralAuthUserMerge .. Add debug log group for CentralAuthUserMerge Change-Id: I59f965a7e2940a161c3f11b96041c5c21836a711 --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/36/168936/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 11c8248..b980ea0 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -4167,6 +4167,7 @@ 'CentralAuth' = udp://$wmfUdp2logDest/centralauth, // -pgehres 2013/05/09, tmp for SUL finalization 'CentralAuth-Bug39996' = udp://$wmfUdp2logDest/centralauth-bug39996, // -legoktm 2014-07-14 for bug 39996 'CentralAuthRename' = udp://$wmfUdp2logDest/centralauthrename, // -legoktm 2014-07-14 for bug 67875 + 'CentralAuthUserMerge' = udp://$wmfUdp2logDest/centralauthusermerge, 'GettingStarted' = udp://$wmfUdp2logDest/gettingstarted, 'zero' = udp://$wmfUdp2logDest/zero, // zero-rated debug log 'DBPerformance' = udp://$wmfUdp2logDest/dbperformance, -- To view, visit https://gerrit.wikimedia.org/r/168936 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I59f965a7e2940a161c3f11b96041c5c21836a711 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] logstash: hadoop: syntax fix - change (operations/puppet)
Gage has uploaded a new change for review. https://gerrit.wikimedia.org/r/168937 Change subject: logstash: hadoop: syntax fix .. logstash: hadoop: syntax fix Change-Id: Ie631973ea657ebe75a821dd3a26be7f0bd486623 --- M files/logstash/filter-gelf.conf 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/37/168937/1 diff --git a/files/logstash/filter-gelf.conf b/files/logstash/filter-gelf.conf index 7e15f87..b0cf585 100644 --- a/files/logstash/filter-gelf.conf +++ b/files/logstash/filter-gelf.conf @@ -26,7 +26,7 @@ match = [ message, .*task_(?Task_id[:digit:]+_[:digit:]+_[mr]_[:digit:]+).* ] # extract job ID to field # job_1409078537822_52431 -match = [ message, .*job_(?Job_id[:digit:]+_[:digit:]+.* ] +match = [ message, .*job_(?Job_id[:digit:]+_[:digit:]+).* ] # infer task ID from attempt ID match = [ Attempt_id, (?Task_id[:digit:]+_[:digit:]+_[mr]_[:digit:]+)_[:digit:]+ ] # infer job ID from task ID -- To view, visit https://gerrit.wikimedia.org/r/168937 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie631973ea657ebe75a821dd3a26be7f0bd486623 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Gage jger...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] logstash: hadoop: syntax fix - change (operations/puppet)
Gage has submitted this change and it was merged. Change subject: logstash: hadoop: syntax fix .. logstash: hadoop: syntax fix Change-Id: Ie631973ea657ebe75a821dd3a26be7f0bd486623 --- M files/logstash/filter-gelf.conf 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Gage: Looks good to me, approved jenkins-bot: Verified diff --git a/files/logstash/filter-gelf.conf b/files/logstash/filter-gelf.conf index 7e15f87..b0cf585 100644 --- a/files/logstash/filter-gelf.conf +++ b/files/logstash/filter-gelf.conf @@ -26,7 +26,7 @@ match = [ message, .*task_(?Task_id[:digit:]+_[:digit:]+_[mr]_[:digit:]+).* ] # extract job ID to field # job_1409078537822_52431 -match = [ message, .*job_(?Job_id[:digit:]+_[:digit:]+.* ] +match = [ message, .*job_(?Job_id[:digit:]+_[:digit:]+).* ] # infer task ID from attempt ID match = [ Attempt_id, (?Task_id[:digit:]+_[:digit:]+_[mr]_[:digit:]+)_[:digit:]+ ] # infer job ID from task ID -- To view, visit https://gerrit.wikimedia.org/r/168937 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie631973ea657ebe75a821dd3a26be7f0bd486623 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Gage jger...@wikimedia.org Gerrit-Reviewer: Gage jger...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] logstash: hadoop: sytax fix #2 - change (operations/puppet)
Gage has uploaded a new change for review. https://gerrit.wikimedia.org/r/168938 Change subject: logstash: hadoop: sytax fix #2 .. logstash: hadoop: sytax fix #2 tested with https://grokdebug.herokuapp.com/ Change-Id: I63e2c2e22bbd22c8204d85c6cc1d2d90b5147043 --- M files/logstash/filter-gelf.conf 1 file changed, 8 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/38/168938/1 diff --git a/files/logstash/filter-gelf.conf b/files/logstash/filter-gelf.conf index b0cf585..1e46da1 100644 --- a/files/logstash/filter-gelf.conf +++ b/files/logstash/filter-gelf.conf @@ -17,20 +17,16 @@ } grok { # so that we can search by job id and find tasks and attempts: -# extract attempt ID to field -# attempt_1409078537822_52431_m_09_1 -# attempt_1409078537822_55176_r_00_0 -match = [ message, .*attempt_(?Attempt_id[:digit:]+_[:digit:]+_[mr]_[:digit:]+_[:digit:]+).* ] -# extract task ID to field -# task_1409078537822_52431_m_44 -match = [ message, .*task_(?Task_id[:digit:]+_[:digit:]+_[mr]_[:digit:]+).* ] -# extract job ID to field -# job_1409078537822_52431 -match = [ message, .*job_(?Job_id[:digit:]+_[:digit:]+).* ] +# extract attempt ID to field: attempt_1409078537822_52431_m_09_1, attempt_1409078537822_55176_r_00_0 +match = [ message, attempt_(?Attempt_id[0-9]+_[0-9]+_[mr]_[0-9]+_[0-9]+) ] +# extract task ID to field: task_1409078537822_52431_m_44 +match = [ message, task_(?Task_id[0-9]+_[0-9]+_[mr]_[0-9]+) ] +# extract job ID to field: job_1409078537822_52431 +match = [ message, job_(?Job_id[0-9]+_[0-9]+) ] # infer task ID from attempt ID -match = [ Attempt_id, (?Task_id[:digit:]+_[:digit:]+_[mr]_[:digit:]+)_[:digit:]+ ] +match = [ Attempt_id, (?Task_id[0-9]+_[0-9]+_[mr]_[0-9]+)_[0-9]+ ] # infer job ID from task ID -match = [ Task_id, (?Job_id[:digit:]+_[:digit:]+)_[mr]_[:digit:]+ ] +match = [ Task_id,(?Job_id[0-9]+_[0-9]+)_[mr]_[0-9]+ ] } dns { reverse = [ host ] -- To view, visit https://gerrit.wikimedia.org/r/168938 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I63e2c2e22bbd22c8204d85c6cc1d2d90b5147043 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Gage jger...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] logstash: hadoop: sytax fix #2 - change (operations/puppet)
Gage has submitted this change and it was merged. Change subject: logstash: hadoop: sytax fix #2 .. logstash: hadoop: sytax fix #2 tested with https://grokdebug.herokuapp.com/ Change-Id: I63e2c2e22bbd22c8204d85c6cc1d2d90b5147043 --- M files/logstash/filter-gelf.conf 1 file changed, 8 insertions(+), 12 deletions(-) Approvals: Gage: Looks good to me, approved jenkins-bot: Verified diff --git a/files/logstash/filter-gelf.conf b/files/logstash/filter-gelf.conf index b0cf585..1e46da1 100644 --- a/files/logstash/filter-gelf.conf +++ b/files/logstash/filter-gelf.conf @@ -17,20 +17,16 @@ } grok { # so that we can search by job id and find tasks and attempts: -# extract attempt ID to field -# attempt_1409078537822_52431_m_09_1 -# attempt_1409078537822_55176_r_00_0 -match = [ message, .*attempt_(?Attempt_id[:digit:]+_[:digit:]+_[mr]_[:digit:]+_[:digit:]+).* ] -# extract task ID to field -# task_1409078537822_52431_m_44 -match = [ message, .*task_(?Task_id[:digit:]+_[:digit:]+_[mr]_[:digit:]+).* ] -# extract job ID to field -# job_1409078537822_52431 -match = [ message, .*job_(?Job_id[:digit:]+_[:digit:]+).* ] +# extract attempt ID to field: attempt_1409078537822_52431_m_09_1, attempt_1409078537822_55176_r_00_0 +match = [ message, attempt_(?Attempt_id[0-9]+_[0-9]+_[mr]_[0-9]+_[0-9]+) ] +# extract task ID to field: task_1409078537822_52431_m_44 +match = [ message, task_(?Task_id[0-9]+_[0-9]+_[mr]_[0-9]+) ] +# extract job ID to field: job_1409078537822_52431 +match = [ message, job_(?Job_id[0-9]+_[0-9]+) ] # infer task ID from attempt ID -match = [ Attempt_id, (?Task_id[:digit:]+_[:digit:]+_[mr]_[:digit:]+)_[:digit:]+ ] +match = [ Attempt_id, (?Task_id[0-9]+_[0-9]+_[mr]_[0-9]+)_[0-9]+ ] # infer job ID from task ID -match = [ Task_id, (?Job_id[:digit:]+_[:digit:]+)_[mr]_[:digit:]+ ] +match = [ Task_id,(?Job_id[0-9]+_[0-9]+)_[mr]_[0-9]+ ] } dns { reverse = [ host ] -- To view, visit https://gerrit.wikimedia.org/r/168938 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I63e2c2e22bbd22c8204d85c6cc1d2d90b5147043 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Gage jger...@wikimedia.org Gerrit-Reviewer: Gage jger...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rewrite of NamespaceNuker - change (mediawiki...BlueSpiceExtensions)
Robert Vogel has submitted this change and it was merged. Change subject: Rewrite of NamespaceNuker .. Rewrite of NamespaceNuker All options of NamespaceNuker did not work or not correctly. I rewrote the code of it because it is much easier to use MediaWiki. The benefit is that many steps are done by MediaWiki and there is no need that we do them. * Fixed bug with not correctly shown message in remove dialog * Corrected names of alert windowalert windows Change-Id: I65c5a3ec7440563a3373fa1f572b33f312befa50 --- M NamespaceManager/NamespaceManager.class.php M NamespaceManager/NamespaceManager.setup.php D NamespaceManager/NamespaceNuker.php M NamespaceManager/i18n/de.json M NamespaceManager/i18n/en.json M NamespaceManager/i18n/qqq.json M NamespaceManager/includes/NamespaceNuker.php M NamespaceManager/resources/BS.NamespaceManager/NamespaceRemoveDialog.js M NamespaceManager/resources/BS.NamespaceManager/Panel.js 9 files changed, 150 insertions(+), 520 deletions(-) Approvals: Robert Vogel: Verified; Looks good to me, approved Siebrand: Looks good to me, but someone else must approve diff --git a/NamespaceManager/NamespaceManager.class.php b/NamespaceManager/NamespaceManager.class.php index a942d35..af120a3 100644 --- a/NamespaceManager/NamespaceManager.class.php +++ b/NamespaceManager/NamespaceManager.class.php @@ -29,11 +29,11 @@ 'searched' = false ); - public static $aSortConditions = array( + public static $aSortConditions = array( 'sort' = '', 'dir' = '' ); - + public $aSortHelper = array( 'negative' = 0, 'positive' = 0 @@ -55,7 +55,7 @@ EXTINFO::STATUS = 'default', EXTINFO::PACKAGE = 'default', EXTINFO::URL = 'http://www.hallowelt.biz', - EXTINFO::DEPS = array( + EXTINFO::DEPS = array( 'bluespice' = '2.22.0', 'WikiAdmin' = '2.22.0', 'Preferences' = '2.22.0' @@ -85,19 +85,19 @@ $this-setHook( 'NamespaceManager::writeNamespaceConfiguration', 'onWriteNamespaceConfiguration', true ); //CR, RBV: This is suposed to return all constants! Not just system NS. - //At the moment the implementation relies on an hardcoded mapping, + //At the moment the implementation relies on an hardcoded mapping, //which is bad. We need to change this and make it more generic! $GLOBALS['bsSystemNamespaces'] = BsNamespaceHelper::getMwNamespaceConstants(); wfProfileOut( 'BS::'.__METHOD__ ); } - + /** * Add the sql file to database by executing the update.php * @global type $wgDBtype * @global array $wgExtNewTables * @param DatabaseUpdater $du - * @return boolean + * @return boolean */ public static function getSchemaUpdates( $updater ) { global $wgExtPGNewFields, $wgDBtype; @@ -150,7 +150,7 @@ } else { $updater-addExtensionField( 'bs_namespacemanager_backup_page', - 'page_content_model', + 'page_content_model', $dir . 'bs_namespacemanager_backup_page.patch.sql' ); $updater-addExtensionField( @@ -171,7 +171,7 @@ /** * returns if NS is empty or not * @param type $iNamespaceId -* @return boolean +* @return boolean */ public function isNamespaceEmpty( $iNamespaceId ) { if ( BsCore::checkAccessAdmission( 'wikiadmin' ) === false ) return true; @@ -195,10 +195,10 @@ $this-getOutput()-addModules( 'ext.bluespice.namespaceManager' ); BsExtensionManager::setContext( 'MW::NamespaceManagerShow' ); $aMetaFields = array( - array( - 'name' = 'id', - 'type' = 'int', - 'sortable' = true, + array( + 'name' = 'id', + 'type' = 'int', + 'sortable' = true, 'label' = wfMessage( 'bs-namespacemanager-label-id' )-plain() ), array( @@ -210,7 +210,7 @@ wfRunHooks( 'NamespaceManager::getMetaFields', array( $aMetaFields ) ); $this-getOutput()-addJsConfigVars('bsNamespaceManagerMetaFields', $aMetaFields); - + return
[MediaWiki-commits] [Gerrit] New default setting - change (mediawiki...BlueSpiceFoundation)
Robert Vogel has uploaded a new change for review. https://gerrit.wikimedia.org/r/168939 Change subject: New default setting .. New default setting Added $wgRestrictDisplayTitle to our DefaultSettings.php This is because otherwise only capitalization variations are allowed, which is good and recommended in public community wikis but contra intuitive in business wikis. [1] https://www.mediawiki.org/wiki/Manual:$wgRestrictDisplayTitle Change-Id: I15add5529f770ddf855afc285ac7c57b48aedb8f --- M includes/DefaultSettings.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceFoundation refs/changes/39/168939/1 diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index c69ec92..165b3be 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -38,6 +38,7 @@ $wgRSSUrlWhitelist = array( * ); $wgExternalLinkTarget = '_blank'; $wgCapitalLinkOverrides[ NS_FILE ] = false; +$wgRestrictDisplayTitle = false; //Otherwise only titles that normalize to the same DB key are allowed //wgScriptPath relative paths $sResourcesPath = '/extensions/BlueSpiceFoundation/resources'; -- To view, visit https://gerrit.wikimedia.org/r/168939 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I15add5529f770ddf855afc285ac7c57b48aedb8f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation Gerrit-Branch: master Gerrit-Owner: Robert Vogel vo...@hallowelt.biz ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make section heading use full width - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Make section heading use full width .. Make section heading use full width Change-Id: Ic804fde349c59625f4a23c8f35b20fad7460c555 --- M lib/resources/wikibase.css 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Thiemo Mättig (WMDE): Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/wikibase.css b/lib/resources/wikibase.css index 878b761..d77231a 100644 --- a/lib/resources/wikibase.css +++ b/lib/resources/wikibase.css @@ -60,6 +60,7 @@ margin-top: 1em; padding-left: 10px; border-bottom: none; + width: 100%; } /* entity container */ -- To view, visit https://gerrit.wikimedia.org/r/168564 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic804fde349c59625f4a23c8f35b20fad7460c555 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] New default setting - change (mediawiki...BlueSpiceFoundation)
Robert Vogel has uploaded a new change for review. https://gerrit.wikimedia.org/r/168940 Change subject: New default setting .. New default setting Added $wgRestrictDisplayTitle to our DefaultSettings.php This is because otherwise only capitalization variations are allowed, which is good and recommended in public community wikis but contra intuitive in business wikis. [1] https://www.mediawiki.org/wiki/Manual:$wgRestrictDisplayTitle Change-Id: I35e1a6bc1cabe46e27830f516ca4fdfe9bda21ee --- M includes/DefaultSettings.php 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceFoundation refs/changes/40/168940/1 diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 7cb17be..e125f51 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -37,6 +37,7 @@ $wgApiFrameOptions = 'SAMEORIGIN'; $wgRSSUrlWhitelist = array( * ); $wgExternalLinkTarget = '_blank'; +$wgRestrictDisplayTitle = false; //Otherwise only titles that normalize to the same DB key are allowed //wgScriptPath relative paths $sResourcesPath = '/extensions/BlueSpiceFoundation/resources'; @@ -109,4 +110,4 @@ */ $bsgSystemNamespaces = array( //1599 = 'NS_COOL_STUFF' -); \ No newline at end of file +); -- To view, visit https://gerrit.wikimedia.org/r/168940 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I35e1a6bc1cabe46e27830f516ca4fdfe9bda21ee Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation Gerrit-Branch: REL1_22 Gerrit-Owner: Robert Vogel vo...@hallowelt.biz ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixed wrong checks for undefined in QUnit tests - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Fixed wrong checks for undefined in QUnit tests .. Fixed wrong checks for undefined in QUnit tests Change-Id: I808828b46f8c35eb1e3698bfa9a247eef90b02b5 --- M lib/tests/qunit/jquery.wikibase/jquery.wikibase.descriptionview.tests.js M lib/tests/qunit/jquery.wikibase/jquery.wikibase.entityview.tests.js M lib/tests/qunit/jquery.wikibase/jquery.wikibase.labelview.tests.js M lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinklistview.tests.js M lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinkview.tests.js 5 files changed, 11 insertions(+), 11 deletions(-) Approvals: Thiemo Mättig (WMDE): Looks good to me, approved jenkins-bot: Verified diff --git a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.descriptionview.tests.js b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.descriptionview.tests.js index 33441db..8247cec 100644 --- a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.descriptionview.tests.js +++ b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.descriptionview.tests.js @@ -65,7 +65,7 @@ descriptionview = $descriptionview.data( 'descriptionview' ); assert.ok( - descriptionview !== 'undefined', + descriptionview instanceof $.wikibase.descriptionview, 'Created widget.' ); diff --git a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.entityview.tests.js b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.entityview.tests.js index bff407d..af26922 100644 --- a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.entityview.tests.js +++ b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.entityview.tests.js @@ -66,7 +66,7 @@ entityview = $entityview.data( 'entityview' ); assert.ok( - entityview !== 'undefined', + entityview instanceof $.wikibase.entityview, 'Created widget.' ); diff --git a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.labelview.tests.js b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.labelview.tests.js index bac0897..0d8cb5d 100644 --- a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.labelview.tests.js +++ b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.labelview.tests.js @@ -65,7 +65,7 @@ labelview = $labelview.data( 'labelview' ); assert.ok( - labelview !== 'undefined', + labelview instanceof $.wikibase.labelview, 'Created widget.' ); diff --git a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinklistview.tests.js b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinklistview.tests.js index a6495ea..50fd132 100644 --- a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinklistview.tests.js +++ b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinklistview.tests.js @@ -87,8 +87,8 @@ sitelinklistview = $sitelinklistview.data( 'sitelinklistview' ); assert.ok( - sitelinklistview !== 'undefined', - 'Created widget' + sitelinklistview instanceof $.wikibase.sitelinklistview, + 'Created widget.' ); sitelinklistview.destroy(); @@ -107,8 +107,8 @@ sitelinklistview = $sitelinklistview.data( 'sitelinklistview' ); assert.ok( - sitelinklistview !== 'undefined', - 'Created widget' + sitelinklistview instanceof $.wikibase.sitelinklistview, + 'Created widget.' ); sitelinklistview.destroy(); diff --git a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinkview.tests.js b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinkview.tests.js index 2dcad0a..1ccd4ee 100644 --- a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinkview.tests.js +++ b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinkview.tests.js @@ -73,8 +73,8 @@ sitelinkview = $sitelinkview.data( 'sitelinkview' ); assert.ok( - sitelinkview !== 'undefined', - 'Created widget' + sitelinkview instanceof $.wikibase.sitelinkview, + 'Created widget.' ); sitelinkview.destroy(); @@ -93,8 +93,8 @@ sitelinkview = $sitelinkview.data( 'sitelinkview' ); assert.ok( - sitelinkview !== 'undefined', - 'Created widget' + sitelinkview instanceof $.wikibase.sitelinkview, + 'Created widget.' ); sitelinkview.destroy(); -- To view, visit https://gerrit.wikimedia.org/r/167570 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id:
[MediaWiki-commits] [Gerrit] sitelinkview: Do not invoke cancelEditing() in destroy - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: sitelinkview: Do not invoke cancelEditing() in destroy .. sitelinkview: Do not invoke cancelEditing() in destroy cancelEditing() involves emitting events that may lead to unintended actions in parent components trying to interact with the now destroyed sitelinkview. Change-Id: I7f110e483b7e5a446180f5ca2612f47b50d674a3 --- M lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js 1 file changed, 5 insertions(+), 1 deletion(-) Approvals: Thiemo Mättig (WMDE): Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js index fdf0033..eaaa01d 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js @@ -114,6 +114,10 @@ * @see jQuery.ui.TemplatedWidget.destroy */ destroy: function() { + if( this._badgeselector ) { + this._badgeselector.destroy(); + } + if( this._isInEditMode ) { var self = this; @@ -121,7 +125,7 @@ PARENT.prototype.destroy.call( self ); } ); - this.cancelEditing(); + this.element.removeClass( 'wb-edit' ); } else { PARENT.prototype.destroy.call( this ); } -- To view, visit https://gerrit.wikimedia.org/r/168068 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7f110e483b7e5a446180f5ca2612f47b50d674a3 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Adrian Lang adrian.l...@wikimedia.de Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] logstash: hadoop: syntax #3 - change (operations/puppet)
Gage has uploaded a new change for review. https://gerrit.wikimedia.org/r/168941 Change subject: logstash: hadoop: syntax #3 .. logstash: hadoop: syntax #3 * rearrange to rename short_message to message first * lower case field names * split apart to isolate parse failure Change-Id: Ica640a6bcec9f9bd59f7e15308b49c255fdd5f48 --- M files/logstash/filter-gelf.conf 1 file changed, 48 insertions(+), 25 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/41/168941/1 diff --git a/files/logstash/filter-gelf.conf b/files/logstash/filter-gelf.conf index 1e46da1..19e0f71 100644 --- a/files/logstash/filter-gelf.conf +++ b/files/logstash/filter-gelf.conf @@ -1,5 +1,18 @@ filter { if [type] == gelf { +mutate { + # tag gelf messages for storage in elasticsearch + add_tag = [ es, gelf ] +} +mutate { + # move field names to what we're expecting + replace = [ type, %{facility} ] + replace = [ message, %{short_message} ] +} +mutate { + # get rid of fields we moved + remove_field = [ facility, short_message ] +} if [facility] == Hadoop { mutate { replace = [ channel, %{SourceSimpleClassName} ] @@ -15,36 +28,46 @@ match = [ Thread, (?ThreadCacheReplicationMonitor)\(%{NUMBER:CacheReplicationMonitor_id}\) ] overwrite = [ Thread ] } - grok { -# so that we can search by job id and find tasks and attempts: -# extract attempt ID to field: attempt_1409078537822_52431_m_09_1, attempt_1409078537822_55176_r_00_0 -match = [ message, attempt_(?Attempt_id[0-9]+_[0-9]+_[mr]_[0-9]+_[0-9]+) ] -# extract task ID to field: task_1409078537822_52431_m_44 -match = [ message, task_(?Task_id[0-9]+_[0-9]+_[mr]_[0-9]+) ] -# extract job ID to field: job_1409078537822_52431 -match = [ message, job_(?Job_id[0-9]+_[0-9]+) ] -# infer task ID from attempt ID -match = [ Attempt_id, (?Task_id[0-9]+_[0-9]+_[mr]_[0-9]+)_[0-9]+ ] -# infer job ID from task ID -match = [ Task_id,(?Job_id[0-9]+_[0-9]+)_[mr]_[0-9]+ ] + if [message] =~ /attempt_/ { +grok { + # so that we can search by job id and find tasks and attempts: + # extract attempt ID to field: attempt_1409078537822_52431_m_09_1, attempt_1409078537822_55176_r_00_0 + match = [ message, attempt_(?attempt_id[0-9]+_[0-9]+_[mr]_[0-9]+_[0-9]+) ] + tag_on_failure = [_grokparsefailure_attempt] +} + } + if [message] =~ /task_/ { +grok { + # extract task ID to field: task_1409078537822_52431_m_44 + match = [ message, task_(?task_id[0-9]+_[0-9]+_[mr]_[0-9]+) ] + tag_on_failure = [_grokparsefailure_task] +} + } + if [message] =~ /job_/ { +grok { + # extract job ID to field: job_1409078537822_52431 + match = [ message, job_(?job_id[0-9]+_[0-9]+) ] + tag_on_failure = [_grokparsefailure_job] +} + } + if [task_id] != { +grok { + # infer task ID from attempt ID + match = [ attempt_id, (?task_id[0-9]+_[0-9]+_[mr]_[0-9]+)_[0-9]+ ] + tag_on_failure = [_grokparsefailure_infer_task] +} + } + if [job_id] != { +grok { + # infer job ID from task ID + match = [ task_id,(?job_id[0-9]+_[0-9]+)_[mr]_[0-9]+ ] + tag_on_failure = [_grokparsefailure_infer_job] +} } dns { reverse = [ host ] action = replace } -} -mutate { - # tag gelf messages for storage in elasticsearch - add_tag = [ es, gelf ] -} -mutate { - # move field names to what we're expecting - replace = [ type, %{facility} ] - replace = [ message, %{short_message} ] -} -mutate { - # get rid of fields we moved - remove_field = [ facility, short_message ] } prune { # get rid of a whole bunch of useless _ fields that are duplicated -- To view, visit https://gerrit.wikimedia.org/r/168941 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ica640a6bcec9f9bd59f7e15308b49c255fdd5f48 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Gage jger...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] BsExtensionMw: Cache key getter - change (mediawiki...BlueSpiceFoundation)
Pwirth has uploaded a new change for review. https://gerrit.wikimedia.org/r/168942 Change subject: BsExtensionMw: Cache key getter .. BsExtensionMw: Cache key getter * added getCacheKey method Change-Id: Id54d5f56f53ae98f3d77ac476f8a8705441b7b92 --- M includes/ExtensionMW.class.php 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceFoundation refs/changes/42/168942/1 diff --git a/includes/ExtensionMW.class.php b/includes/ExtensionMW.class.php index 63a3392..657754d 100644 --- a/includes/ExtensionMW.class.php +++ b/includes/ExtensionMW.class.php @@ -119,4 +119,16 @@ return dirname( $this-getResourcePath() ).'/images/'; } + /** +* Returns the cache key for this particlular extension +* @param string $sSubKey +* @return string +*/ + public function getCacheKey( $sSubKey = 'default' ) { + return BsCacheHelper::getCacheKey( + 'BlueSpice', + $this-getName(), + $sSubKey + ); + } } \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/168942 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id54d5f56f53ae98f3d77ac476f8a8705441b7b92 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation Gerrit-Branch: master Gerrit-Owner: Pwirth wi...@hallowelt.biz ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] logstash: hadoop: syntax #3 - change (operations/puppet)
Gage has submitted this change and it was merged. Change subject: logstash: hadoop: syntax #3 .. logstash: hadoop: syntax #3 * rearrange to rename short_message to message first * lower case field names * split apart to isolate parse failure Change-Id: Ica640a6bcec9f9bd59f7e15308b49c255fdd5f48 --- M files/logstash/filter-gelf.conf 1 file changed, 48 insertions(+), 25 deletions(-) Approvals: Gage: Looks good to me, approved jenkins-bot: Verified diff --git a/files/logstash/filter-gelf.conf b/files/logstash/filter-gelf.conf index 1e46da1..19e0f71 100644 --- a/files/logstash/filter-gelf.conf +++ b/files/logstash/filter-gelf.conf @@ -1,5 +1,18 @@ filter { if [type] == gelf { +mutate { + # tag gelf messages for storage in elasticsearch + add_tag = [ es, gelf ] +} +mutate { + # move field names to what we're expecting + replace = [ type, %{facility} ] + replace = [ message, %{short_message} ] +} +mutate { + # get rid of fields we moved + remove_field = [ facility, short_message ] +} if [facility] == Hadoop { mutate { replace = [ channel, %{SourceSimpleClassName} ] @@ -15,36 +28,46 @@ match = [ Thread, (?ThreadCacheReplicationMonitor)\(%{NUMBER:CacheReplicationMonitor_id}\) ] overwrite = [ Thread ] } - grok { -# so that we can search by job id and find tasks and attempts: -# extract attempt ID to field: attempt_1409078537822_52431_m_09_1, attempt_1409078537822_55176_r_00_0 -match = [ message, attempt_(?Attempt_id[0-9]+_[0-9]+_[mr]_[0-9]+_[0-9]+) ] -# extract task ID to field: task_1409078537822_52431_m_44 -match = [ message, task_(?Task_id[0-9]+_[0-9]+_[mr]_[0-9]+) ] -# extract job ID to field: job_1409078537822_52431 -match = [ message, job_(?Job_id[0-9]+_[0-9]+) ] -# infer task ID from attempt ID -match = [ Attempt_id, (?Task_id[0-9]+_[0-9]+_[mr]_[0-9]+)_[0-9]+ ] -# infer job ID from task ID -match = [ Task_id,(?Job_id[0-9]+_[0-9]+)_[mr]_[0-9]+ ] + if [message] =~ /attempt_/ { +grok { + # so that we can search by job id and find tasks and attempts: + # extract attempt ID to field: attempt_1409078537822_52431_m_09_1, attempt_1409078537822_55176_r_00_0 + match = [ message, attempt_(?attempt_id[0-9]+_[0-9]+_[mr]_[0-9]+_[0-9]+) ] + tag_on_failure = [_grokparsefailure_attempt] +} + } + if [message] =~ /task_/ { +grok { + # extract task ID to field: task_1409078537822_52431_m_44 + match = [ message, task_(?task_id[0-9]+_[0-9]+_[mr]_[0-9]+) ] + tag_on_failure = [_grokparsefailure_task] +} + } + if [message] =~ /job_/ { +grok { + # extract job ID to field: job_1409078537822_52431 + match = [ message, job_(?job_id[0-9]+_[0-9]+) ] + tag_on_failure = [_grokparsefailure_job] +} + } + if [task_id] != { +grok { + # infer task ID from attempt ID + match = [ attempt_id, (?task_id[0-9]+_[0-9]+_[mr]_[0-9]+)_[0-9]+ ] + tag_on_failure = [_grokparsefailure_infer_task] +} + } + if [job_id] != { +grok { + # infer job ID from task ID + match = [ task_id,(?job_id[0-9]+_[0-9]+)_[mr]_[0-9]+ ] + tag_on_failure = [_grokparsefailure_infer_job] +} } dns { reverse = [ host ] action = replace } -} -mutate { - # tag gelf messages for storage in elasticsearch - add_tag = [ es, gelf ] -} -mutate { - # move field names to what we're expecting - replace = [ type, %{facility} ] - replace = [ message, %{short_message} ] -} -mutate { - # get rid of fields we moved - remove_field = [ facility, short_message ] } prune { # get rid of a whole bunch of useless _ fields that are duplicated -- To view, visit https://gerrit.wikimedia.org/r/168941 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ica640a6bcec9f9bd59f7e15308b49c255fdd5f48 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Gage jger...@wikimedia.org Gerrit-Reviewer: Gage jger...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Drop static EntityView::typeMap - change (mediawiki...Wikibase)
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/168943 Change subject: Drop static EntityView::typeMap .. Drop static EntityView::typeMap I can't find any usage of this. Please double check. Change-Id: I645493cd642b75a01b0ecd8d6d6ab583dd15204e --- M repo/includes/EntityView.php 1 file changed, 11 insertions(+), 30 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/43/168943/1 diff --git a/repo/includes/EntityView.php b/repo/includes/EntityView.php index 1a6738e..1e204d3 100644 --- a/repo/includes/EntityView.php +++ b/repo/includes/EntityView.php @@ -6,8 +6,6 @@ use InvalidArgumentException; use Language; use Wikibase\DataModel\Entity\Entity; -use Wikibase\DataModel\Entity\Item; -use Wikibase\DataModel\Entity\Property; use Wikibase\Repo\View\ClaimsView; use Wikibase\Repo\View\FingerprintView; use Wikibase\Repo\View\TextInjector; @@ -49,22 +47,6 @@ */ protected $textInjector; - /** -* Maps entity types to the corresponding entity view. -* FIXME: remove this stuff, big OCP violation -* -* @since 0.2 -* -* @var string[] -*/ - public static $typeMap = array( - Item::ENTITY_TYPE = '\Wikibase\ItemView', - Property::ENTITY_TYPE = '\Wikibase\PropertyView', - - // TODO: Query::ENTITY_TYPE - 'query' = '\Wikibase\QueryView', - ); - public function __construct( FingerprintView $fingerprintView, ClaimsView $claimsView, @@ -74,6 +56,7 @@ $this-fingerprintView = $fingerprintView; $this-claimsView = $claimsView; $this-language = $language; + $this-textInjector = new TextInjector(); } @@ -99,6 +82,7 @@ * * @param EntityRevision $entityRevision the entity to render * @param bool $editable whether editing is allowed (enabled edit links) +* * @return string HTML */ public function getHtml( EntityRevision $entityRevision, $editable = true ) { @@ -107,9 +91,8 @@ //NOTE: even though $editable is unused at the moment, we will need it for the JS-less editing model. $entityId = $entity-getId() ?: 'new'; // if id is not set, use 'new' suffix for css classes - $html = ''; - $html .= wfTemplate( 'wikibase-entityview', + $html = wfTemplate( 'wikibase-entityview', $entity-getType(), $entityId, $this-language-getCode(), @@ -165,8 +148,7 @@ $entity = $entityRevision-getEntity(); - $html = ''; - $html .= $this-getHtmlForFingerprint( $entity, $editable ); + $html = $this-getHtmlForFingerprint( $entity, $editable ); $html .= $this-getHtmlForToc(); $html .= $this-getHtmlForTermBox( $entityRevision, $editable ); @@ -179,6 +161,7 @@ * * @param Entity $entity * @param bool $editable +* * @return string */ protected function getHtmlForFingerprint( Entity $entity, $editable = true ) { @@ -191,7 +174,6 @@ * @return string */ protected function getHtmlForToc() { - $tocContent = ''; $tocSections = $this-getTocSections(); if ( count( $tocSections ) 2 ) { @@ -203,7 +185,7 @@ // Placeholder for the TOC entry for the term box (which may or may not be used for a given user). // EntityViewPlaceholderExpander must know about the 'termbox-toc' name. - $tocContent .= $this-textInjector-newMarker( 'termbox-toc' ); + $tocContent = $this-textInjector-newMarker( 'termbox-toc' ); $i = 1; @@ -215,12 +197,10 @@ ); } - $toc = wfTemplate( 'wb-entity-toc', + return wfTemplate( 'wb-entity-toc', wfMessage( 'toc' )-text(), $tocContent ); - - return $toc; } /** @@ -234,17 +214,18 @@ /** * @param EntityRevision $entityRevision -* @param bool $editable * * @return string */ protected function getHtmlForTermBox( EntityRevision $entityRevision ) { - if ( $entityRevision-getEntity()-getId() ) { + $entityId = $entityRevision-getEntity()-getId(); + + if ( $entityId !== null ) { // Placeholder for a termbox for the present item. // EntityViewPlaceholderExpander must know about the parameters used here.
[MediaWiki-commits] [Gerrit] Reduce loading spinner toggle to a single 'loading' CSS clas... - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Reduce loading spinner toggle to a single 'loading' CSS class name .. Reduce loading spinner toggle to a single 'loading' CSS class name Originally I wanted to make the spinner a pure CSS solution but could not do that for now because it relies on the .mw-small-spinner class. We can address this in a later patch if we want, e.g. by using our own spinner GIF. Main advantage of this change is that it now supports multiple Entities on one page. Change-Id: I618977a80406267f309037914dea2afad10f8f47 --- M lib/resources/wikibase.css M repo/includes/EntityView.php 2 files changed, 17 insertions(+), 13 deletions(-) Approvals: Henning Snater: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/wikibase.css b/lib/resources/wikibase.css index d77231a..bade4c4 100644 --- a/lib/resources/wikibase.css +++ b/lib/resources/wikibase.css @@ -139,14 +139,24 @@ } .wb-entity.loading { + position: relative; +} + +.wb-entity.loading * { opacity: .3; } -div.wb-entity-spinner { /* loading spinner positioning (animation is taken from .mw-small-spinner) */ - height: 100px; +.wb-entity-spinner { /* loading spinner positioning (animation is taken from .mw-small-spinner) */ + display: none; + left: 50%; + margin-left: -10px; /* half of the 20px width of .mw-small-spinner */ + opacity: 1 !important; position: absolute; - width: 100px; - z-index: 99; + top: 40px; +} + +.loading .wb-entity-spinner { + display: block; } .wb-entity-undefinedinfo { diff --git a/repo/includes/EntityView.php b/repo/includes/EntityView.php index 1a6738e..844b3c1 100644 --- a/repo/includes/EntityView.php +++ b/repo/includes/EntityView.php @@ -133,15 +133,9 @@ // JavaScript is parsed. return Html::inlineScript( ' if ( $ ) { - $( .wikibase-entityview ).addClass( loading ).after( function() { - var $div = $( div/ ).addClass( wb-entity-spinner mw-small-spinner ); - $div.css( top, $div.height() + px ); - $div.css( - ' . ( $this-language-isRTL() ? 'right' : 'left' ) . ', - ( ( $( this ).width() - $div.width() ) / 2 | 0 ) + px - ); - return $div; - } ); + $( .wikibase-entityview ).addClass( loading ).append( + $( div/ ).addClass( mw-small-spinner wb-entity-spinner ) + ); window.setTimeout( function() { $( .wikibase-entityview ).removeClass( loading ); $( .wb-entity-spinner ).remove(); -- To view, visit https://gerrit.wikimedia.org/r/123298 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I618977a80406267f309037914dea2afad10f8f47 Gerrit-PatchSet: 12 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de Gerrit-Reviewer: Bene benestar.wikime...@gmail.com Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Hoo man h...@online.de Gerrit-Reviewer: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de Gerrit-Reviewer: WikidataJenkins wikidata-servi...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] BsExtensionMw: Cache key getter - change (mediawiki...BlueSpiceFoundation)
Robert Vogel has submitted this change and it was merged. Change subject: BsExtensionMw: Cache key getter .. BsExtensionMw: Cache key getter * added getCacheKey method Change-Id: Id54d5f56f53ae98f3d77ac476f8a8705441b7b92 --- M includes/ExtensionMW.class.php 1 file changed, 12 insertions(+), 0 deletions(-) Approvals: Robert Vogel: Verified; Looks good to me, approved diff --git a/includes/ExtensionMW.class.php b/includes/ExtensionMW.class.php index 63a3392..657754d 100644 --- a/includes/ExtensionMW.class.php +++ b/includes/ExtensionMW.class.php @@ -119,4 +119,16 @@ return dirname( $this-getResourcePath() ).'/images/'; } + /** +* Returns the cache key for this particlular extension +* @param string $sSubKey +* @return string +*/ + public function getCacheKey( $sSubKey = 'default' ) { + return BsCacheHelper::getCacheKey( + 'BlueSpice', + $this-getName(), + $sSubKey + ); + } } \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/168942 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id54d5f56f53ae98f3d77ac476f8a8705441b7b92 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation Gerrit-Branch: master Gerrit-Owner: Pwirth wi...@hallowelt.biz Gerrit-Reviewer: Mglaser gla...@hallowelt.biz Gerrit-Reviewer: Pigpen reym...@hallowelt.biz Gerrit-Reviewer: Robert Vogel vo...@hallowelt.biz Gerrit-Reviewer: Smuggli mug...@hallowelt.biz Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Drop static EntityView::typeMap - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Drop static EntityView::typeMap .. Drop static EntityView::typeMap I can't find any usage of this. Please double check. Change-Id: I645493cd642b75a01b0ecd8d6d6ab583dd15204e --- M repo/includes/EntityView.php 1 file changed, 11 insertions(+), 30 deletions(-) Approvals: Henning Snater: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/includes/EntityView.php b/repo/includes/EntityView.php index 1a6738e..1e204d3 100644 --- a/repo/includes/EntityView.php +++ b/repo/includes/EntityView.php @@ -6,8 +6,6 @@ use InvalidArgumentException; use Language; use Wikibase\DataModel\Entity\Entity; -use Wikibase\DataModel\Entity\Item; -use Wikibase\DataModel\Entity\Property; use Wikibase\Repo\View\ClaimsView; use Wikibase\Repo\View\FingerprintView; use Wikibase\Repo\View\TextInjector; @@ -49,22 +47,6 @@ */ protected $textInjector; - /** -* Maps entity types to the corresponding entity view. -* FIXME: remove this stuff, big OCP violation -* -* @since 0.2 -* -* @var string[] -*/ - public static $typeMap = array( - Item::ENTITY_TYPE = '\Wikibase\ItemView', - Property::ENTITY_TYPE = '\Wikibase\PropertyView', - - // TODO: Query::ENTITY_TYPE - 'query' = '\Wikibase\QueryView', - ); - public function __construct( FingerprintView $fingerprintView, ClaimsView $claimsView, @@ -74,6 +56,7 @@ $this-fingerprintView = $fingerprintView; $this-claimsView = $claimsView; $this-language = $language; + $this-textInjector = new TextInjector(); } @@ -99,6 +82,7 @@ * * @param EntityRevision $entityRevision the entity to render * @param bool $editable whether editing is allowed (enabled edit links) +* * @return string HTML */ public function getHtml( EntityRevision $entityRevision, $editable = true ) { @@ -107,9 +91,8 @@ //NOTE: even though $editable is unused at the moment, we will need it for the JS-less editing model. $entityId = $entity-getId() ?: 'new'; // if id is not set, use 'new' suffix for css classes - $html = ''; - $html .= wfTemplate( 'wikibase-entityview', + $html = wfTemplate( 'wikibase-entityview', $entity-getType(), $entityId, $this-language-getCode(), @@ -165,8 +148,7 @@ $entity = $entityRevision-getEntity(); - $html = ''; - $html .= $this-getHtmlForFingerprint( $entity, $editable ); + $html = $this-getHtmlForFingerprint( $entity, $editable ); $html .= $this-getHtmlForToc(); $html .= $this-getHtmlForTermBox( $entityRevision, $editable ); @@ -179,6 +161,7 @@ * * @param Entity $entity * @param bool $editable +* * @return string */ protected function getHtmlForFingerprint( Entity $entity, $editable = true ) { @@ -191,7 +174,6 @@ * @return string */ protected function getHtmlForToc() { - $tocContent = ''; $tocSections = $this-getTocSections(); if ( count( $tocSections ) 2 ) { @@ -203,7 +185,7 @@ // Placeholder for the TOC entry for the term box (which may or may not be used for a given user). // EntityViewPlaceholderExpander must know about the 'termbox-toc' name. - $tocContent .= $this-textInjector-newMarker( 'termbox-toc' ); + $tocContent = $this-textInjector-newMarker( 'termbox-toc' ); $i = 1; @@ -215,12 +197,10 @@ ); } - $toc = wfTemplate( 'wb-entity-toc', + return wfTemplate( 'wb-entity-toc', wfMessage( 'toc' )-text(), $tocContent ); - - return $toc; } /** @@ -234,17 +214,18 @@ /** * @param EntityRevision $entityRevision -* @param bool $editable * * @return string */ protected function getHtmlForTermBox( EntityRevision $entityRevision ) { - if ( $entityRevision-getEntity()-getId() ) { + $entityId = $entityRevision-getEntity()-getId(); + + if ( $entityId !== null ) { // Placeholder for a termbox for the present item. // EntityViewPlaceholderExpander must know about the parameters used here. return $this-textInjector-newMarker(
[MediaWiki-commits] [Gerrit] [WIP] Notifications - change (mediawiki...Teahouse)
Robert Vogel has submitted this change and it was merged. Change subject: [WIP] Notifications .. [WIP] Notifications * Implemented localStorage based storage mechanism for notifications * Improved init mechanism * Added notification badge * Added notification flyout based on OO.ui.PopupWidget * Added assets for button template and OPT-IN gadget * Now using marker for base page insertion * Built own message dialog to have anchor tags displayed TODO * Find reason for strange DB errors in API calls with \n in parameter * Fix popup displacement Change-Id: I525195eac98ff7addd6f47546f40d50daf51d707 --- A assets/MediaWiki_Gadget-teahouse-opt-in.wiki A assets/MediaWiki_Gadget-teahouse-opt-in_main.js.wiki M assets/MediaWiki_Gadget-teahouse.wiki A assets/MediaWiki_Gadgets-definition.partial.wiki A assets/Template_Answered_question.wiki A assets/Template_Ask_your_question.wiki A assets/Template_Pending_question.wiki A assets/Template_Question.wiki M gadgetize.json M i18n/de.json M i18n/en.json M i18n/qqq.json A resources/mediawiki.teahouse.board.js M resources/mediawiki.teahouse.css M resources/mediawiki.teahouse.dialog.js M resources/mediawiki.teahouse.gadget.development.js M resources/mediawiki.teahouse.js A resources/mediawiki.teahouse.notifications.js A resources/ui/dialogs/th.ui.MessageDialog.js M resources/ui/dialogs/th.ui.QuestionDialog.js 20 files changed, 663 insertions(+), 128 deletions(-) Approvals: Robert Vogel: Verified; Looks good to me, approved diff --git a/assets/MediaWiki_Gadget-teahouse-opt-in.wiki b/assets/MediaWiki_Gadget-teahouse-opt-in.wiki new file mode 100644 index 000..24bc039 --- /dev/null +++ b/assets/MediaWiki_Gadget-teahouse-opt-in.wiki @@ -0,0 +1 @@ +[[Wikipedia:Teahouse|Wikipedia Teahouse]] OPT IN - Always display Ask a question link in personal tools \ No newline at end of file diff --git a/assets/MediaWiki_Gadget-teahouse-opt-in_main.js.wiki b/assets/MediaWiki_Gadget-teahouse-opt-in_main.js.wiki new file mode 100644 index 000..d8a96fd --- /dev/null +++ b/assets/MediaWiki_Gadget-teahouse-opt-in_main.js.wiki @@ -0,0 +1 @@ +/* This is just a dummy script that allows to have the Teahouse-opt-in gadget in the preferences */ \ No newline at end of file diff --git a/assets/MediaWiki_Gadget-teahouse.wiki b/assets/MediaWiki_Gadget-teahouse.wiki index 7391e1e..911539a 100644 --- a/assets/MediaWiki_Gadget-teahouse.wiki +++ b/assets/MediaWiki_Gadget-teahouse.wiki @@ -1 +1 @@ -Wikipedia Teahouse - Wikimedia Deutschland e.V., Hallo Welt! - Medienwerkstatt GmbH, [[mw:User:Osnard|Robert Vogel]] \ No newline at end of file +[[Wikipedia:Teahouse|Wikipedia Teahouse]] BASE - Wikimedia Deutschland e.V., Hallo Welt! - Medienwerkstatt GmbH, Author: [[mw:User:Osnard|Robert Vogel]] \ No newline at end of file diff --git a/assets/MediaWiki_Gadgets-definition.partial.wiki b/assets/MediaWiki_Gadgets-definition.partial.wiki new file mode 100644 index 000..5f7b5f8 --- /dev/null +++ b/assets/MediaWiki_Gadgets-definition.partial.wiki @@ -0,0 +1,4 @@ +!-- The following lines have to be added to MediaWiki:Gadgets-definition -- + +* teahouse[ResourceLoader|default]|teahouse/main.js|teahouse/teahouse.css +* teahouse-opt-in[ResourceLoader]|teahouse/main.js \ No newline at end of file diff --git a/assets/Template_Answered_question.wiki b/assets/Template_Answered_question.wiki new file mode 100644 index 000..817429f --- /dev/null +++ b/assets/Template_Answered_question.wiki @@ -0,0 +1,3 @@ +includeonly +[[Category:Teahouse/Answered_Question]] +/includeonly \ No newline at end of file diff --git a/assets/Template_Ask_your_question.wiki b/assets/Template_Ask_your_question.wiki new file mode 100644 index 000..7528ba6 --- /dev/null +++ b/assets/Template_Ask_your_question.wiki @@ -0,0 +1 @@ +span class=th-ask style=display: inline-block; background-color: #27AA65; padding: 0.5em; color:#F0F0F0; cursor:pointerAsk your question/span \ No newline at end of file diff --git a/assets/Template_Pending_question.wiki b/assets/Template_Pending_question.wiki new file mode 100644 index 000..9394d60 --- /dev/null +++ b/assets/Template_Pending_question.wiki @@ -0,0 +1,3 @@ +includeonly +[[Category:Teahouse/Pending_Question]] +/includeonly \ No newline at end of file diff --git a/assets/Template_Question.wiki b/assets/Template_Question.wiki new file mode 100644 index 000..0bbf46c --- /dev/null +++ b/assets/Template_Question.wiki @@ -0,0 +1,5 @@ +noinclude +This is the wrapper template that embeds a question into the question list +/noincludeincludeonlyh3[[Project:Teahouse/Questions/{{{title}}}|{{{title}}}]]/h3 +{{Project:Teahouse/Questions/{{{title} +/includeonly \ No newline at end of file diff --git a/gadgetize.json b/gadgetize.json index 08b15a9..dbebc85 100644 --- a/gadgetize.json +++ b/gadgetize.json @@ -1,5 +1,7 @@ { MediaWiki:Gadget-teahouse: [assets/MediaWiki_Gadget-teahouse.wiki], +
[MediaWiki-commits] [Gerrit] add Hooks::TYPE_BOOL (v 3.5.2) - change (mediawiki...PhpTags)
Pastakhov has uploaded a new change for review. https://gerrit.wikimedia.org/r/168944 Change subject: add Hooks::TYPE_BOOL (v 3.5.2) .. add Hooks::TYPE_BOOL (v 3.5.2) Change-Id: Ic077b19a600298d824b69db2ff6a4d2fe6d4ad83 --- M includes/GenericObject.php M includes/Hooks.php 2 files changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PhpTags refs/changes/44/168944/1 diff --git a/includes/GenericObject.php b/includes/GenericObject.php index cde0168..bfda318 100644 --- a/includes/GenericObject.php +++ b/includes/GenericObject.php @@ -168,11 +168,16 @@ $error = 'scalar'; break 2; } + break; case Hooks::TYPE_NOT_OBJECT: if ( true === is_object( $arguments[$i] ) ) { $error = 'not object'; break 2; } + break; + case Hooks::TYPE_BOOL: + $arguments[$i] = (bool)$arguments[$i]; + break; } } elseif ( false === $arguments[$i] instanceof GenericObject || $arguments[$i]-name != $expects[$i] ) { $error = $expects[$i]; diff --git a/includes/Hooks.php b/includes/Hooks.php index e8c7c7f..1c190ed 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -24,6 +24,7 @@ const TYPE_INT = 7; const TYPE_FLOAT = 8; const TYPE_NOT_OBJECT = 9; + const TYPE_BOOL = 10; /** * When accessing static objects, the object name is placed here. -- To view, visit https://gerrit.wikimedia.org/r/168944 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic077b19a600298d824b69db2ff6a4d2fe6d4ad83 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PhpTags Gerrit-Branch: master Gerrit-Owner: Pastakhov pastak...@yandex.ru ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Allow siteselector to dynamically retrieve site objects - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Allow siteselector to dynamically retrieve site objects .. Allow siteselector to dynamically retrieve site objects Prerequisite for enabling an managing a dynamically added input element in the sitelinklistview. Change-Id: I17d1a7d9739d5c0e5d0590a027f57a859de941f7 --- M lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js M lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js M lib/resources/jquery.wikibase/jquery.wikibase.siteselector.js M lib/resources/jquery.wikibase/resources.php M lib/tests/qunit/jquery.wikibase/jquery.wikibase.siteselector.tests.js 5 files changed, 65 insertions(+), 9 deletions(-) Approvals: Thiemo Mättig (WMDE): Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js index 542c3b4..eaff444 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js @@ -125,8 +125,10 @@ newItemOptionsFn: function( value ) { return { value: value, - getAllowedSiteIds: function() { - return self._getUnusedAllowedSiteIds(); + getAllowedSites: function() { + return $.map( self._getUnusedAllowedSiteIds(), function( siteId ) { + return wb.sites.getSite( siteId ); + } ); }, entityStore: self.options.entityStore }; diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js index eaaa01d..5be4fda 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js @@ -15,8 +15,8 @@ * @option {wikibase.datamodel.SiteLink} [value] * Default: null * - * @option {Function} [getAllowedSiteIds] - * Function returning an array of wikibase.datamodel.SiteLink objects. + * @option {Function} [getAllowedSites] + * Function returning an array of wikibase.Site objects. * Default: function() { return []; } * * @option {wikibase.store.EntityStore} entityStore @@ -76,7 +76,7 @@ '$link': '.wikibase-sitelinkview-link' }, value: null, - getAllowedSiteIds: function() { return []; }, + getAllowedSites: function() { return []; }, entityStore: null, helpMessage: mw.msg( 'wikibase-sitelinks-input-help-message' ) }, @@ -228,9 +228,7 @@ var $siteIdInput = $( 'input /' ) .attr( 'placeholder', mw.msg( 'wikibase-sitelink-site-edit-placeholder' ) ) .siteselector( { - source: $.map( this.option( 'getAllowedSiteIds' )(), function( siteId ) { - return wb.sites.getSite( siteId ); - } ) + source: self.options.getAllowedSites } ); var pagesuggester = $pageNameInput.data( 'pagesuggester' ); diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.siteselector.js b/lib/resources/jquery.wikibase/jquery.wikibase.siteselector.js index 06334be..97dca3e 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.siteselector.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.siteselector.js @@ -10,7 +10,15 @@ * Enhances an input box with auto-complete and auto-suggestion functionality for site ids. * @since 0.2 * -* @example $( 'input' ).siteselector( { source: {wb.Site[]} } ); +* @example $( 'input' ).siteselector( { source: {wikibase.Site[]} } ); +* +* @option {wikibase.Site[]|Function} source +* An array of Site objects that shall be used to provide suggestions. Alternatively, a +* function dynamically retrieving an array of Site objects may be provided. +* +* @option {number} [delay] +* Delay in milliseconds of the request querying for suggestions. +* Default: 0 * * @event selected *Triggered whenever a site is selected or de-selected. @@ -161,6
[MediaWiki-commits] [Gerrit] Fixed namespace filter in SmartList (toplist) - change (mediawiki...BlueSpiceExtensions)
Smuggli has submitted this change and it was merged. Change subject: Fixed namespace filter in SmartList (toplist) .. Fixed namespace filter in SmartList (toplist) * fixed query (in instead of =) * fixed empty clause (string 0 is empty) Change-Id: I80f663993760d5ac6dc9b645a18233a334473d4c --- M SmartList/SmartList.class.php 1 file changed, 6 insertions(+), 10 deletions(-) Approvals: Smuggli: Verified; Looks good to me, approved diff --git a/SmartList/SmartList.class.php b/SmartList/SmartList.class.php index 1529c2b..1a447db 100644 --- a/SmartList/SmartList.class.php +++ b/SmartList/SmartList.class.php @@ -1044,18 +1044,14 @@ } } - if ( !empty( $sNs ) ) { - $iNamespaces = BsNamespaceHelper::getNamespaceIdsFromAmbiguousCSVString( $sNs ); - if ( is_array( $iNamespaces ) ) { - foreach ( $iNamespaces as $iNamespace ) { - if ( $bAlltime === false ) { - $aConditions['wo_page_namespace'] = $iNamespace; - } else { - $aConditions['page_namespace'] = $iNamespace; - } - } + if ( !empty( $sNs ) || $sNs === '0') { // string 0 is empty + $aNamespaces = BsNamespaceHelper::getNamespaceIdsFromAmbiguousCSVString( $sNs ); + if ( !empty( $aNamespaces ) ) { + $sField = $bAlltime ? 'page_namespace' : 'wo_page_namespace'; + $aConditions[$sField] = $aNamespaces; } } + $res = $oDbr-select( $aTables, $aColumns, -- To view, visit https://gerrit.wikimedia.org/r/168058 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I80f663993760d5ac6dc9b645a18233a334473d4c Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions Gerrit-Branch: master Gerrit-Owner: Pwirth wi...@hallowelt.biz Gerrit-Reviewer: Mglaser gla...@hallowelt.biz Gerrit-Reviewer: Pigpen reym...@hallowelt.biz Gerrit-Reviewer: Robert Vogel vo...@hallowelt.biz Gerrit-Reviewer: Smuggli mug...@hallowelt.biz Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Upgraded sitelinkview focus flow - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Upgraded sitelinkview focus flow .. Upgraded sitelinkview focus flow Requires ValueView 0.7.1 Change-Id: I6d44d4a3314b6a1a7e3c525dd6e329e681394e38 --- M lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js 1 file changed, 15 insertions(+), 3 deletions(-) Approvals: Thiemo Mättig (WMDE): Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js index 5be4fda..12a5959 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js @@ -257,6 +257,15 @@ this.$siteId .attr( 'colspan', '2' ) .append( $siteIdInput ); + + $pageNameInput + .on( 'keydown.' + this.widgetName, function( event ) { + if( event.keyCode === $.ui.keyCode.BACKSPACE $pageNameInput.val() === '' ) { + event.stopPropagation(); + $siteIdInput.val( '' ).focus(); + $siteIdInput.data( 'siteselector' ).setSelectedSite( null ); + } + } ); }, /** @@ -443,10 +452,13 @@ var $siteselector = this.element.find( ':wikibase-siteselector' ), $pagesuggester = this.element.find( ':wikibase-pagesuggester' ); - if( $siteselector.length ) { - $siteselector.focus(); - } else if( $pagesuggester.length ) { + if( + $pagesuggester.length +!$pagesuggester.data( 'pagesuggester' ).option( 'disabled' ) + ) { $pagesuggester.focus(); + } else if( $siteselector.length ) { + $siteselector.focus(); } }, -- To view, visit https://gerrit.wikimedia.org/r/168075 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6d44d4a3314b6a1a7e3c525dd6e329e681394e38 Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] webserver: move to a module, fix and remove a few things - change (operations/puppet)
Giuseppe Lavagetto has submitted this change and it was merged. Change subject: webserver: move to a module, fix and remove a few things .. webserver: move to a module, fix and remove a few things - Renamed webserver::base to webserver::sysctl_settings - Removed completely webserver::apache::php5-{mysql,gd} Change-Id: I8123d618e3ef8a56ee8bb65b21cbb95f45cbb664 Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org --- M manifests/misc/blogs.pp M manifests/role/labslamp.pp M manifests/role/memcached.pp M manifests/role/protoproxy.pp M manifests/site.pp M manifests/swift.pp D manifests/webserver.pp M modules/icinga/manifests/web.pp M modules/mediawiki_singlenode/manifests/init.pp M modules/varnish/manifests/common.pp A modules/webserver/init.pp A modules/webserver/manifests/apache.pp A modules/webserver/manifests/apache/site.pp A modules/webserver/manifests/php5.pp A modules/webserver/manifests/static.pp A modules/webserver/manifests/sysctl_settings.pp A modules/webserver/sysctl_settings.pp M modules/wikimania_scholarships/manifests/init.pp M modules/wikistats/manifests/web.pp 19 files changed, 202 insertions(+), 183 deletions(-) Approvals: Giuseppe Lavagetto: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/misc/blogs.pp b/manifests/misc/blogs.pp index f68dfb6..3bcc18d 100644 --- a/manifests/misc/blogs.pp +++ b/manifests/misc/blogs.pp @@ -6,8 +6,8 @@ class {'webserver::php5': ssl = true; } -require webserver::php5-mysql, -webserver::php5-gd +require_package('php5-mysql') +require_package('php5-gd') include ::apache::mod::rpaf diff --git a/manifests/role/labslamp.pp b/manifests/role/labslamp.pp index cfdc61c..1b81a99 100644 --- a/manifests/role/labslamp.pp +++ b/manifests/role/labslamp.pp @@ -3,12 +3,12 @@ # - Apache # - Mysql # - PHP5 -# +# # The root mysql password is empty to start. You should # change it! class role::lamp::labs { include role::labs-mysql-server -include webserver::php5-mysql include webserver::php5 +require_package('php5-mysql') } diff --git a/manifests/role/memcached.pp b/manifests/role/memcached.pp index 854b630..3209f99 100644 --- a/manifests/role/memcached.pp +++ b/manifests/role/memcached.pp @@ -10,7 +10,7 @@ system::role { 'role::memcached': description = 'memcached server' } include standard -include webserver::base +include webserver::sysctl_settings $memcached_size = $::realm ? { 'production' = '89088', diff --git a/manifests/role/protoproxy.pp b/manifests/role/protoproxy.pp index 24a1512..c49cef7 100644 --- a/manifests/role/protoproxy.pp +++ b/manifests/role/protoproxy.pp @@ -18,7 +18,7 @@ class role::protoproxy::ssl::common { # Tune kernel settings -include webserver::base +include webserver::sysctl_settings $nginx_worker_connections = '32768' $nginx_use_ssl = true diff --git a/manifests/site.pp b/manifests/site.pp index e37fd13..8fd59d7 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -17,7 +17,6 @@ import 'role/analytics/*.pp' import 'search.pp' import 'swift.pp' -import 'webserver.pp' # Include stages last import 'stages.pp' diff --git a/manifests/swift.pp b/manifests/swift.pp index 4194fed..f5df095 100644 --- a/manifests/swift.pp +++ b/manifests/swift.pp @@ -3,7 +3,7 @@ # It is used to find the ring files in the puppet files class swift::base($hash_path_suffix, $cluster_name) { -include webserver::base +include webserver::sysctl_settings # Recommendations from Swift -- see http://tinyurl.com/swift-sysctl. sysctl::parameters { 'swift_performance': diff --git a/manifests/webserver.pp b/manifests/webserver.pp deleted file mode 100644 index 4c63e15..000 --- a/manifests/webserver.pp +++ /dev/null @@ -1,164 +0,0 @@ -# This file is for all generic web server classes -# Apache, php, etc belong in here -# Specific services (racktables, etherpad) do not - - -class webserver::base { -# Sysctl settings for high-load HTTP caches -sysctl::parameters { 'high http performance': -values = { -# Increase the number of ephemeral ports -'net.ipv4.ip_local_port_range' = [ 1024, 65535 ], - -# Recommended to increase this for 1000 BT or higher -'net.core.netdev_max_backlog' = 3, - -# Increase the queue size of new TCP connections -'net.core.somaxconn' = 4096, -'net.ipv4.tcp_max_syn_backlog' = 262144, -'net.ipv4.tcp_max_tw_buckets' = 36, - -# Decrease FD usage -'net.ipv4.tcp_fin_timeout' = 3, -'net.ipv4.tcp_max_orphans' = 262144, -'net.ipv4.tcp_synack_retries' = 2, -'net.ipv4.tcp_syn_retries' = 2, -}, -} -} - -# Installs a generic, static web server (lighttpd) -# with default config, which serves
[MediaWiki-commits] [Gerrit] $.wikibase.badgeselector: Display placeholder badges while f... - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: $.wikibase.badgeselector: Display placeholder badges while fetching badge data .. $.wikibase.badgeselector: Display placeholder badges while fetching badge data Change-Id: I2e5e860fe944a83857e3973c25ed044e10792cfc --- M lib/resources/jquery.wikibase/jquery.wikibase.badgeselector.js 1 file changed, 39 insertions(+), 3 deletions(-) Approvals: Thiemo Mättig (WMDE): Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.badgeselector.js b/lib/resources/jquery.wikibase/jquery.wikibase.badgeselector.js index 2bf9675..f166de3 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.badgeselector.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.badgeselector.js @@ -194,6 +194,10 @@ var self = this; + for( var i = 0; i this.options.value.length; i++ ) { + this._addPlaceholderBadge( this.options.value[i] ); + } + this._fetchItems( this.options.value ) .done( function() { for( var i = 0; i self.options.value.length; i++ ) { @@ -369,19 +373,47 @@ }, /** +* Creates a placeholder badge to be displayed while loading the actual badge information. The +* placeholder will be replaced when calling this._addBadge() with the same badge id. +* * @param {string} badgeId */ - _addBadge: function( badgeId ) { - var badgeItem = badges[badgeId]; + _addPlaceholderBadge: function( badgeId ) { + if( this.element.children( '[data-wb-badge=' + badgeId + ']' ).length ) { + return; + } this.element.append( mw.template( 'wb-badge', badgeId + ' ' + this.options.badges[badgeId], - badgeItem badgeItem.getLabel( this.options.languageCode ) || badgeId, + badgeId, badgeId ) ); }, + /** +* @param {string} badgeId +*/ + _addBadge: function( badgeId ) { + var badgeItem = badges[badgeId], + $placeholderBadge = this.element.children( '[data-wb-badge=' + badgeId + ']' ); + + var $badge = mw.template( 'wb-badge', + badgeId + ' ' + this.options.badges[badgeId], + badgeItem badgeItem.getLabel( this.options.languageCode ) || badgeId, + badgeId + ); + + if( $placeholderBadge.length ) { + $placeholderBadge.replaceWith( $badge ); + } else { + this.element.append( $badge ); + } + }, + + /** +* Creates an empty badge to be displayed as menu anchor when no badges are selected. +*/ _addEmptyBadge: function() { this.element.append( mw.template( 'wb-badge', 'empty', @@ -434,6 +466,10 @@ } else { this.element.empty(); + for( var i = 0; i this.options.value.length; i++ ) { + this._addPlaceholderBadge( this.options.value[i] ); + } + // Since the widget might have been initialized on pre-existing DOM, badges need to be // fetched to ensure their data is available for resetting: this._fetchItems( this.options.value ) -- To view, visit https://gerrit.wikimedia.org/r/168561 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2e5e860fe944a83857e3973c25ed044e10792cfc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [FEAT/FIX] Use input_choice or new input_yn - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: [FEAT/FIX] Use input_choice or new input_yn .. [FEAT/FIX] Use input_choice or new input_yn As inputChoice has been deprecated this updates all references to the replacement (input_choice). Also added input_yn which is like input_choice but returns a boolean and automatically sets the answers to [y]es and [n]o. Change-Id: Ib68e66a60e5bc5a78602253123312a380109657d --- M generate_user_files.py M pywikibot/__init__.py M pywikibot/bot.py M pywikibot/diff.py M pywikibot/page.py M scripts/add_text.py M scripts/basic.py M scripts/blockpageschecker.py M scripts/blockreview.py M scripts/capitalize_redirects.py M scripts/casechecker.py M scripts/cosmetic_changes.py M scripts/interwiki.py M scripts/maintenance/compat2core.py M scripts/movepages.py M scripts/nowcommons.py M scripts/protect.py M scripts/selflink.py M scripts/solve_disambiguation.py M scripts/spamremove.py M scripts/template.py M scripts/templatecount.py M scripts/unlink.py M scripts/upload.py M scripts/welcome.py 25 files changed, 199 insertions(+), 208 deletions(-) Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified diff --git a/generate_user_files.py b/generate_user_files.py index 8a99806..ea6915a 100644 --- a/generate_user_files.py +++ b/generate_user_files.py @@ -98,7 +98,7 @@ set environment variables. % locals(), width=76) for line in msg: pywikibot.output(line) -if pywikibot.inputChoice(Is this OK?, [yes, no], [y, n], n) == y: +if pywikibot.input_yn('Is this OK?', default=False, automatic_quit=False): return new_base pywikibot.output(Aborting changes.) return False @@ -170,10 +170,10 @@ while not mylang: mylang = pywikibot.input(message) or default_lang if known_langs and mylang and mylang not in known_langs: -if pywikibot.inputChoice(The language code {0} is not in the - list of known languages. Do you want to - continue?.format(mylang), - [yes, no], [y, n], n) == n: +if not pywikibot.input_yn(The language code {0} is not in the + list of known languages. Do you want + to continue?.format(mylang), + default=False, automatic_quit=False): mylang = None username = None @@ -250,8 +250,8 @@ main_family, main_lang, main_username = get_site_and_lang() usernames = [(main_family, main_lang, main_username)] -while pywikibot.inputChoice(Do you want to add any other projects?, -[yes, no], [y, n], n) == y: +while pywikibot.input_yn(Do you want to add any other projects?, + default=False, automatic_quit=False): usernames += [get_site_and_lang(main_family, main_lang, main_username)] @@ -259,9 +259,9 @@ uusernames['{0}']['{1}'] = u'{2}'.format(*username) for username in usernames) -extended = pywikibot.inputChoice( -Which variant of user_config.py?, -[small, extended (with further information)], [s, e]) == e +extended = pywikibot.input_yn(Would you like the extended version of + user-config.py, with explanations + included?, automatic_quit=False) if extended: # config2.py will be in the pywikibot/ directory relative to this @@ -321,8 +321,8 @@ if __name__ == __main__: while True: pywikibot.output(u'\nYour default user directory is %s' % base_dir) -if pywikibot.inputChoice(How to proceed?, [keep, change], - [k, c], k) == c: +if pywikibot.input_yn(Do you want to use that directory?, + default=False, automatic_quit=False): new_base = change_base_dir() if new_base: base_dir = new_base @@ -335,9 +335,10 @@ while True: if os.path.exists(os.path.join(base_dir, user-config.py)): break -if pywikibot.inputChoice( +if pywikibot.input_yn( Do you want to copy user files from an existing Pywikibot -installation?, [yes, no], [y, n]) == y: +installation?, +automatic_quit=False): oldpath = pywikibot.input(Path to existing user-config.py?) if not os.path.exists(oldpath): pywikibot.error(Not a valid path) @@ -361,16 +362,16 @@ else: break if not os.path.isfile(os.path.join(base_dir, user-config.py)): -if
[MediaWiki-commits] [Gerrit] icinga: fix typo - change (operations/puppet)
Giuseppe Lavagetto has uploaded a new change for review. https://gerrit.wikimedia.org/r/168945 Change subject: icinga: fix typo .. icinga: fix typo Change-Id: Ifbb637d18dc97520b411a043a1e67c48eb1b447d --- M modules/icinga/manifests/web.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/45/168945/1 diff --git a/modules/icinga/manifests/web.pp b/modules/icinga/manifests/web.pp index 4042b9c..1e4aa0b 100644 --- a/modules/icinga/manifests/web.pp +++ b/modules/icinga/manifests/web.pp @@ -20,7 +20,7 @@ port = 80, } -require_packages('php5-gd') +require_package('php5-gd') include passwords::ldap::wmf_cluster $proxypass = $passwords::ldap::wmf_cluster::proxypass -- To view, visit https://gerrit.wikimedia.org/r/168945 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifbb637d18dc97520b411a043a1e67c48eb1b447d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] icinga: fix typo - change (operations/puppet)
Giuseppe Lavagetto has submitted this change and it was merged. Change subject: icinga: fix typo .. icinga: fix typo Change-Id: Ifbb637d18dc97520b411a043a1e67c48eb1b447d --- M modules/icinga/manifests/web.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Giuseppe Lavagetto: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/icinga/manifests/web.pp b/modules/icinga/manifests/web.pp index 4042b9c..1e4aa0b 100644 --- a/modules/icinga/manifests/web.pp +++ b/modules/icinga/manifests/web.pp @@ -20,7 +20,7 @@ port = 80, } -require_packages('php5-gd') +require_package('php5-gd') include passwords::ldap::wmf_cluster $proxypass = $passwords::ldap::wmf_cluster::proxypass -- To view, visit https://gerrit.wikimedia.org/r/168945 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifbb637d18dc97520b411a043a1e67c48eb1b447d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] add Hooks::TYPE_BOOL (v 3.5.2) - change (mediawiki...PhpTags)
jenkins-bot has submitted this change and it was merged. Change subject: add Hooks::TYPE_BOOL (v 3.5.2) .. add Hooks::TYPE_BOOL (v 3.5.2) Change-Id: Ic077b19a600298d824b69db2ff6a4d2fe6d4ad83 --- M PhpTags.php M includes/GenericObject.php M includes/Hooks.php 3 files changed, 7 insertions(+), 1 deletion(-) Approvals: Pastakhov: Looks good to me, approved jenkins-bot: Verified diff --git a/PhpTags.php b/PhpTags.php index fc1c717..3f9138d 100644 --- a/PhpTags.php +++ b/PhpTags.php @@ -17,7 +17,7 @@ const PHPTAGS_MAJOR_VERSION = 3; const PHPTAGS_MINOR_VERSION = 5; -const PHPTAGS_RELEASE_VERSION = 1; +const PHPTAGS_RELEASE_VERSION = 2; define( 'PHPTAGS_VERSION', PHPTAGS_MAJOR_VERSION . '.' . PHPTAGS_MINOR_VERSION . '.' . PHPTAGS_RELEASE_VERSION ); const PHPTAGS_HOOK_RELEASE = 5; diff --git a/includes/GenericObject.php b/includes/GenericObject.php index cde0168..bfda318 100644 --- a/includes/GenericObject.php +++ b/includes/GenericObject.php @@ -168,11 +168,16 @@ $error = 'scalar'; break 2; } + break; case Hooks::TYPE_NOT_OBJECT: if ( true === is_object( $arguments[$i] ) ) { $error = 'not object'; break 2; } + break; + case Hooks::TYPE_BOOL: + $arguments[$i] = (bool)$arguments[$i]; + break; } } elseif ( false === $arguments[$i] instanceof GenericObject || $arguments[$i]-name != $expects[$i] ) { $error = $expects[$i]; diff --git a/includes/Hooks.php b/includes/Hooks.php index e8c7c7f..1c190ed 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -24,6 +24,7 @@ const TYPE_INT = 7; const TYPE_FLOAT = 8; const TYPE_NOT_OBJECT = 9; + const TYPE_BOOL = 10; /** * When accessing static objects, the object name is placed here. -- To view, visit https://gerrit.wikimedia.org/r/168944 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic077b19a600298d824b69db2ff6a4d2fe6d4ad83 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/PhpTags Gerrit-Branch: master Gerrit-Owner: Pastakhov pastak...@yandex.ru Gerrit-Reviewer: Pastakhov pastak...@yandex.ru Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make section heading use full width - change (mediawiki...Wikibase)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/168946 Change subject: Make section heading use full width .. Make section heading use full width Change-Id: Ic804fde349c59625f4a23c8f35b20fad7460c555 (cherry picked from commit e6f1e3bbefc4b8686e86ee80adc0dd9aecdba892) --- M lib/resources/wikibase.css 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/46/168946/1 diff --git a/lib/resources/wikibase.css b/lib/resources/wikibase.css index 878b761..d77231a 100644 --- a/lib/resources/wikibase.css +++ b/lib/resources/wikibase.css @@ -60,6 +60,7 @@ margin-top: 1em; padding-left: 10px; border-bottom: none; + width: 100%; } /* entity container */ -- To view, visit https://gerrit.wikimedia.org/r/168946 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic804fde349c59625f4a23c8f35b20fad7460c555 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: wmf/1.25wmf5 Gerrit-Owner: Aude aude.w...@gmail.com Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert Actually put wb.client.getMwApiForRepo in wb.client - change (mediawiki...Wikibase)
Aude has submitted this change and it was merged. Change subject: Revert Actually put wb.client.getMwApiForRepo in wb.client .. Revert Actually put wb.client.getMwApiForRepo in wb.client wb.client doesn't exist, thus this broke client. This reverts commit 8b58cdfca624ab1505788b9b08022eaf1e0ae8b3. Change-Id: I451bb60f2d1f8363af41d0ddc21571f9dd9f69a6 --- M client/resources/wikibase.client.getMwApiForRepo.js M client/resources/wikibase.client.linkitem.init.js 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Aude: Verified; Looks good to me, approved diff --git a/client/resources/wikibase.client.getMwApiForRepo.js b/client/resources/wikibase.client.getMwApiForRepo.js index f02cc5e..6b5b9e0 100644 --- a/client/resources/wikibase.client.getMwApiForRepo.js +++ b/client/resources/wikibase.client.getMwApiForRepo.js @@ -5,7 +5,7 @@ ( function( mw, wb ) { 'use strict'; - var MODULE = wb.client; + var MODULE = wb; /** * @return {mediaWiki.Api} diff --git a/client/resources/wikibase.client.linkitem.init.js b/client/resources/wikibase.client.linkitem.init.js index 2219342..e24ef4b 100644 --- a/client/resources/wikibase.client.linkitem.init.js +++ b/client/resources/wikibase.client.linkitem.init.js @@ -31,7 +31,7 @@ $linkItemLink .show() .linkitem( { - mwApiForRepo: wikibase.client.getMwApiForRepo(), + mwApiForRepo: wikibase.getMwApiForRepo(), pageTitle: ( new mw.Title( mw.config.get( 'wgTitle' ), mw.config.get( 'wgNamespaceNumber' ) -- To view, visit https://gerrit.wikimedia.org/r/168635 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I451bb60f2d1f8363af41d0ddc21571f9dd9f69a6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: wmf/1.25wmf5 Gerrit-Owner: Hoo man h...@online.de Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [WIP] improve methods not bound to an instance - change (pywikibot/core)
Ricordisamoa has uploaded a new change for review. https://gerrit.wikimedia.org/r/168948 Change subject: [WIP] improve methods not bound to an instance .. [WIP] improve methods not bound to an instance - turned several staticmethods into classmethods - fixed DataSite's inheritance from APISite Change-Id: I5c8024bb086c4302a5f02dbed26fd3e24696e699 --- M pywikibot/__init__.py M pywikibot/data/api.py M pywikibot/logentries.py M pywikibot/page.py M pywikibot/site.py M scripts/templatecount.py 6 files changed, 72 insertions(+), 72 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/48/168948/1 diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py index d70dc86..a4b0e22 100644 --- a/pywikibot/__init__.py +++ b/pywikibot/__init__.py @@ -240,8 +240,8 @@ 'precision': self.precision, } -@staticmethod -def fromWikibase(data, site): +@classmethod +def fromWikibase(cls, data, site): Constructor to create an object from Wikibase's JSON output. globes = {} for k in site.globes(): @@ -254,9 +254,9 @@ # Default to earth or should we use None here? globe = 'earth' -return Coordinate(data['latitude'], data['longitude'], - data['altitude'], data['precision'], - globe, site=site, entity=data['globe']) +return cls(data['latitude'], data['longitude'], + data['altitude'], data['precision'], + globe, site=site, entity=data['globe']) @property def precision(self): @@ -367,17 +367,17 @@ else: raise ValueError('Invalid precision: %s' % precision) -@staticmethod -def fromTimestr(datetimestr, precision=14, before=0, after=0, timezone=0, -calendarmodel=None, site=None): +@classmethod +def fromTimestr(cls, datetimestr, precision=14, before=0, after=0, +timezone=0, calendarmodel=None, site=None): match = re.match('([-+]?\d+)-(\d+)-(\d+)T(\d+):(\d+):(\d+)Z', datetimestr) if not match: raise ValueError(uInvalid format: '%s' % datetimestr) t = match.groups() -return WbTime(long(t[0]), int(t[1]), int(t[2]), - int(t[3]), int(t[4]), int(t[5]), - precision, before, after, timezone, calendarmodel, site) +return cls(long(t[0]), int(t[1]), int(t[2]), + int(t[3]), int(t[4]), int(t[5]), + precision, before, after, timezone, calendarmodel, site) def toTimestr(self): @@ -403,11 +403,11 @@ } return json -@staticmethod -def fromWikibase(ts): -return WbTime.fromTimestr(ts[u'time'], ts[u'precision'], - ts[u'before'], ts[u'after'], - ts[u'timezone'], ts[u'calendarmodel']) +@classmethod +def fromWikibase(cls, ts): +return cls.fromTimestr(ts[u'time'], ts[u'precision'], + ts[u'before'], ts[u'after'], + ts[u'timezone'], ts[u'calendarmodel']) def __str__(self): return json.dumps(self.toWikibase(), indent=4, sort_keys=True, @@ -465,8 +465,8 @@ } return json -@staticmethod -def fromWikibase(wb): +@classmethod +def fromWikibase(cls, wb): Create a WbQuanity from the JSON data given by the Wikibase API. @@ -476,7 +476,7 @@ upperBound = eval(wb['upperBound']) lowerBound = eval(wb['lowerBound']) error = (upperBound - amount, amount - lowerBound) -return WbQuantity(amount, wb['unit'], error) +return cls(amount, wb['unit'], error) def __str__(self): return json.dumps(self.toWikibase(), indent=4, sort_keys=True, diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py index 0ecaeae..d5f8e75 100644 --- a/pywikibot/data/api.py +++ b/pywikibot/data/api.py @@ -499,8 +499,8 @@ submsg.set_payload(content) return submsg -@staticmethod -def _build_mime_request(params, mime_params): +@classmethod +def _build_mime_request(cls, params, mime_params): Construct a MIME multipart form post. @param params: HTTP request params @@ -513,10 +513,10 @@ # construct a MIME message containing all API key/values container = MIMEMultipart(_subtype='form-data') for key, value in params.items(): -submsg = Request._generate_MIME_part(key, value) +submsg = cls._generate_MIME_part(key, value) container.attach(submsg) for key, value in mime_params.items(): -submsg = Request._generate_MIME_part(key, *value) +submsg =
[MediaWiki-commits] [Gerrit] first commit - change (mediawiki...SemanticDependency)
Cicalese has submitted this change and it was merged. Change subject: first commit .. first commit Change-Id: I09af470ca5742d4dc0ffef3e34cca3fc1ab8858b --- A SemanticDependency.class.php A SemanticDependency.i18n.php A SemanticDependency.php A i18n/en.json A i18n/qqq.json 5 files changed, 261 insertions(+), 0 deletions(-) Approvals: Cicalese: Verified; Looks good to me, approved diff --git a/SemanticDependency.class.php b/SemanticDependency.class.php new file mode 100644 index 000..4ee1826 --- /dev/null +++ b/SemanticDependency.class.php @@ -0,0 +1,151 @@ +?php + +/* + * Copyright (c) 2014 The MITRE Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the Software), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +class SemanticDependency { + + /** +* @since 1.0 +* +* @param Store $store +* @param SemanticData $semanticData +*/ + public static function updateDataAfter( \SMW\Store $store, + \SMW\SemanticData $semanticData ) { + + $instance = new self( $store, $semanticData ); + $instance-setConfiguration( + $GLOBALS['SemanticDependency_Properties'], + $GLOBALS['SemanticDependency_JobThreshold'] ); + $instance-performUpdate(); + + return true; + } + + private $store; + private $semanticData; + private $properties; + private $jobThreshold; + + /** +* @since 1.0 +* +* @param Store $store +* @param SemanticData $semanticData +*/ + public function __construct( \SMW\Store $store, + \SMW\SemanticData $semanticData ) { + $this-store = $store; + $this-semanticData = $semanticData; + } + + /** +* @since 1.0 +* +* @param array $properties +* @param $jobThreshold +*/ + public function setConfiguration( array $properties, $jobThreshold ) { + $this-properties = $properties; + $this-jobThreshold = $jobThreshold; + } + + /** +* @since 1.0 +*/ + public function performUpdate() { + + $title = $this-semanticData-getSubject()-getTitle(); + + $dependentTitles = $this-getDependentTitles( $title ); + + $jobs = array(); + + $count = 1; + foreach ( $dependentTitles as $dependentTitle ) { + $job = new SMWUpdateJob( $dependentTitle ); + if ( $count $this-jobThreshold ) { + $jobs[] = $job; + } else { + $job-run(); + } + $count++; + } + + if ( $jobs !== array() ) { + Job::batchInsert( $jobs ); + } + + } + + private function getDependentTitles( Title $title ) { + + $dataItems = $this-getFilteredPropertyValuesByNamespace( $title ); + + $dependentTitles = array(); + + foreach ( $dataItems as $dataItem ) { + + if ( $dataItem-getDIType() === SMWDataItem::TYPE_WIKIPAGE ) { + + $dependentTitle = $dataItem-getTitle(); + + // do not allow dependent pages that themselves + // have dependent pages in order to avoid an infinite loop + if ( $this-getFilteredPropertyValuesByNamespace( + $dependentTitle ) === array() ) { + + $dependentTitles[] = $dependentTitle; + + } + + } + + } + + return $dependentTitles; + } + + private function
[MediaWiki-commits] [Gerrit] adding datetime attribute if enabled microdata - change (mediawiki/core)
Toniher has uploaded a new change for review. https://gerrit.wikimedia.org/r/168949 Change subject: adding datetime attribute if enabled microdata .. adding datetime attribute if enabled microdata Change-Id: I73f343113731c21c812a806014ba5c560dcdb7de --- M includes/Sanitizer.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/49/168949/1 diff --git a/includes/Sanitizer.php b/includes/Sanitizer.php index bca2f67..c89e910 100644 --- a/includes/Sanitizer.php +++ b/includes/Sanitizer.php @@ -774,7 +774,7 @@ # HTML5 microdata || $attribute === 'itemid' || $attribute === 'itemprop' || $attribute === 'itemref' || $attribute === 'itemscope' - || $attribute === 'itemtype' + || $attribute === 'itemtype' || $attribute === 'datetime' ) { //Paranoia. Allow simple values but suppress javascript if ( preg_match( self::EVIL_URI_PATTERN, $value ) ) { @@ -1559,7 +1559,7 @@ # add HTML5 microdata tags as specified by # http://www.whatwg.org/html/microdata.html#the-microdata-model $common = array_merge( $common, array( - 'itemid', 'itemprop', 'itemref', 'itemscope', 'itemtype' + 'itemid', 'itemprop', 'itemref', 'itemscope', 'itemtype', 'datetime' ) ); } -- To view, visit https://gerrit.wikimedia.org/r/168949 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I73f343113731c21c812a806014ba5c560dcdb7de Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Toniher toni...@cau.cat ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] prepare mathoid for speech output - change (mediawiki...mathoid)
Physikerwelt has uploaded a new change for review. https://gerrit.wikimedia.org/r/168950 Change subject: prepare mathoid for speech output .. prepare mathoid for speech output Change-Id: I434e0ba0e82ecbd814b3083f140793e3c4715bee --- M MathJaxNode/lib/mj-single.js M mathoid-worker.js 2 files changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mathoid refs/changes/50/168950/1 diff --git a/MathJaxNode/lib/mj-single.js b/MathJaxNode/lib/mj-single.js index fccdc31..189b166 100644 --- a/MathJaxNode/lib/mj-single.js +++ b/MathJaxNode/lib/mj-single.js @@ -370,7 +370,8 @@ // Add the speech elements, if needed // if (data.speakText) { -GetSpeech(svg,result.mml); +result.speech = speech.processExpression(result.mml); +//GetSpeech(svg,result.mml); if (!data.mml) {delete result.mml} } diff --git a/mathoid-worker.js b/mathoid-worker.js index e2e0745..424a3bc 100644 --- a/mathoid-worker.js +++ b/mathoid-worker.js @@ -92,7 +92,7 @@ if (type === ascii || type === asciimath) { type = AsciiMath; } -mjAPI.typeset({math: q, format: type, svg: true, img: true, mml: mml}, function (data) { +mjAPI.typeset({math: q, format: type, svg: true, img: true, mml: mml, speakText: true}, function (data) { if (data.errors) { data.success = false; data.log = Error: + JSON.stringify(data.errors); -- To view, visit https://gerrit.wikimedia.org/r/168950 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I434e0ba0e82ecbd814b3083f140793e3c4715bee Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/mathoid Gerrit-Branch: master Gerrit-Owner: Physikerwelt w...@physikerwelt.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use primary colours for progress bar - change (oojs/ui)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/168951 Change subject: Use primary colours for progress bar .. Use primary colours for progress bar Greys are too hard to see and this seems semantically reasonable. Change-Id: Iced77a950b12b55c93448bf18fd6f6e1bff09976 --- M src/styles/common.less M src/themes/apex/elements.less M src/themes/apex/widgets.less M src/themes/mediawiki/widgets.less 4 files changed, 11 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/51/168951/1 diff --git a/src/styles/common.less b/src/styles/common.less index 463b19e..53c7aad 100644 --- a/src/styles/common.less +++ b/src/styles/common.less @@ -11,6 +11,10 @@ background-image: e('/* @embed */') url(~'@{url}'); } +.oo-ui-force-webkit-gpu() { + -webkit-transform: translate3d(0, 0, 0); +} + .oo-ui-image( @type, @name, @file, @ext, @path ) { .oo-ui-@{type}-@{name} { .oo-ui-background-image('@{path}/@{type}s/@{file}.@{ext}'); diff --git a/src/themes/apex/elements.less b/src/themes/apex/elements.less index 10e59cc..b037adc 100644 --- a/src/themes/apex/elements.less +++ b/src/themes/apex/elements.less @@ -168,6 +168,8 @@ .oo-ui-buttonElement-active .oo-ui-buttonElement-button, .oo-ui-buttonElement-pressed .oo-ui-buttonElement-button { opacity: 0.5; + // Opacity causes 1px measurement errors in Chrome, so force GPU rendering + .oo-ui-force-webkit-gpu(); box-shadow: none; color: #333; background: #eee; diff --git a/src/themes/apex/widgets.less b/src/themes/apex/widgets.less index 78fae1e..64cc894 100644 --- a/src/themes/apex/widgets.less +++ b/src/themes/apex/widgets.less @@ -621,13 +621,13 @@ .theme-oo-ui-progressBarWidget () { width: 20em; - border: solid 1px #ccc; + border: solid 1px #a6cee1; border-radius: 0.25em; -bar { height: 1em; - border-right: solid 1px #ccc; + border-right: solid 1px #a6cee1; .oo-ui-transition(width 200ms); - .oo-ui-vertical-gradient(#fff, #ddd); + .oo-ui-vertical-gradient(#eaf4fa, #b0d9ee); } .oo-ui-widget-disabled { opacity: 0.6; diff --git a/src/themes/mediawiki/widgets.less b/src/themes/mediawiki/widgets.less index 0fe8d88..8fb82f5 100644 --- a/src/themes/mediawiki/widgets.less +++ b/src/themes/mediawiki/widgets.less @@ -562,11 +562,11 @@ .theme-oo-ui-progressBarWidget () { width: 20em; - border: solid 1px #ccc; + border: solid 1px #0274ff; border-radius: 0.1em; -bar { height: 1em; - border-right: solid 1px #ccc; + border-right: solid 1px #0274ff; background: #0274ff; .oo-ui-transition(width 200ms); } -- To view, visit https://gerrit.wikimedia.org/r/168951 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iced77a950b12b55c93448bf18fd6f6e1bff09976 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: Esanders esand...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Adding content attribute for datetime microdata - change (mediawiki/core)
Toniher has uploaded a new change for review. https://gerrit.wikimedia.org/r/168952 Change subject: Adding content attribute for datetime microdata .. Adding content attribute for datetime microdata adding content attribute for microdata Change-Id: I73f343113731c21c812a806014ba5c560dcdb7de changing content Change-Id: I9f14651b303020f35b08adecb8d0812ef8c6692f --- M includes/Sanitizer.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/52/168952/1 diff --git a/includes/Sanitizer.php b/includes/Sanitizer.php index bca2f67..dc05b29 100644 --- a/includes/Sanitizer.php +++ b/includes/Sanitizer.php @@ -774,7 +774,7 @@ # HTML5 microdata || $attribute === 'itemid' || $attribute === 'itemprop' || $attribute === 'itemref' || $attribute === 'itemscope' - || $attribute === 'itemtype' + || $attribute === 'itemtype' || $attribute === 'content' ) { //Paranoia. Allow simple values but suppress javascript if ( preg_match( self::EVIL_URI_PATTERN, $value ) ) { @@ -1559,7 +1559,7 @@ # add HTML5 microdata tags as specified by # http://www.whatwg.org/html/microdata.html#the-microdata-model $common = array_merge( $common, array( - 'itemid', 'itemprop', 'itemref', 'itemscope', 'itemtype' + 'itemid', 'itemprop', 'itemref', 'itemscope', 'itemtype', 'content' ) ); } -- To view, visit https://gerrit.wikimedia.org/r/168952 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9f14651b303020f35b08adecb8d0812ef8c6692f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Toniher toni...@cau.cat ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] PEP257 tests/ - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: PEP257 tests/ .. PEP257 tests/ Change-Id: I8a3254fc48090b50f68c89a81a7d35f29edb4d25 --- M tests/__init__.py M tests/data_ingestion_tests.py M tests/date_tests.py M tests/file_tests.py M tests/i18n/__init__.py M tests/i18n/test.py M tests/i18n_tests.py M tests/interwiki_link_tests.py M tests/ipregex_tests.py M tests/link_tests.py M tests/page_tests.py M tests/pagegenerators_tests.py M tests/pwb/print_locals.py M tests/pwb_tests.py M tests/site_tests.py M tests/textlib_tests.py M tests/timestripper_tests.py M tests/ui_tests.py M tests/weblib_tests.py M tests/wikibase_tests.py M tests/wikidataquery_tests.py M tests/xmlreader_tests.py M tox.ini 23 files changed, 159 insertions(+), 30 deletions(-) Approvals: John Vandenberg: Looks good to me, but someone else must approve XZise: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/__init__.py b/tests/__init__.py index e2bdd7a..b903565 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +Package tests. # # (C) Pywikibot team, 2007-2014 # @@ -17,16 +18,16 @@ # - ordereddict is only needed as a fallback for python 2.6 # - mwparserfromhell is optional, so is only imported in textlib_tests try: -import httplib2 +import httplib2 # noqa except ImportError as e: print(ImportError: %s % e) sys.exit(1) try: -from collections import OrderedDict +from collections import OrderedDict # noqa except ImportError: try: -from ordereddict import OrderedDict +from ordereddict import OrderedDict # noqa except ImportError as e: print(ImportError: %s % e) if sys.version_info[0] == 2 and sys.version_info[1] == 6: @@ -191,6 +192,7 @@ Add caching to every Request except logins. def __init__(self, *args, **kwargs): +Constructor. super(TestRequest, self).__init__(0, *args, **kwargs) def _expired(self, dt): @@ -225,6 +227,7 @@ def patch_request(): +Patch Request classes with TestRequest. global original_expired pywikibot.data.api.Request = TestRequest original_expired = pywikibot.data.api.CachedRequest._expired @@ -232,5 +235,6 @@ def unpatch_request(): +Un-patch Request classes with TestRequest. pywikibot.data.api.Request = _original_Request pywikibot.data.api.CachedRequest._expired = original_expired diff --git a/tests/data_ingestion_tests.py b/tests/data_ingestion_tests.py index 7586528..deec8a1 100644 --- a/tests/data_ingestion_tests.py +++ b/tests/data_ingestion_tests.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -Unit tests for data_ingestion.py +Unit tests for data_ingestion.py script. __version__ = '$Id$' import os @@ -11,6 +11,8 @@ class TestPhoto(TestCase): + +Test Photo class. net = True @@ -50,6 +52,8 @@ class TestCSVReader(TestCase): +Test CSVReader class. + net = False def setUp(self): diff --git a/tests/date_tests.py b/tests/date_tests.py index 5d26688..8c236f3 100644 --- a/tests/date_tests.py +++ b/tests/date_tests.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +Tests for the date module. # # (C) Pywikibot team, 2014 # @@ -12,10 +13,10 @@ class TestDateMeta(MetaTestCaseClass): -Test meta class +Date test meta class. def __new__(cls, name, bases, dct): -Create the new class +Create the new class. def test_method(formatname): def testMapEntry(self): diff --git a/tests/file_tests.py b/tests/file_tests.py index 8f204bd..f8a7c14 100644 --- a/tests/file_tests.py +++ b/tests/file_tests.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +FilePage tests. # # (C) Pywikibot team, 2014 # @@ -13,6 +14,8 @@ class TestShareFiles(TestCase): +Test methods fileIsShared, exists and fileUrl with shared files. + sites = { 'enwiki': { 'family': 'wikipedia', diff --git a/tests/i18n/__init__.py b/tests/i18n/__init__.py index e69de29..66f0234 100644 --- a/tests/i18n/__init__.py +++ b/tests/i18n/__init__.py @@ -0,0 +1 @@ + Test i18n data package. diff --git a/tests/i18n/test.py b/tests/i18n/test.py index 048b063..b2585f7 100644 --- a/tests/i18n/test.py +++ b/tests/i18n/test.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- + Test i18n data. msg = { 'de': { 'test-plural': u'Bot: Ändere %(num)d {{PLURAL:num|Seite|Seiten}}.', diff --git a/tests/i18n_tests.py b/tests/i18n_tests.py index 39c9ef2..63b18dc 100644 --- a/tests/i18n_tests.py +++ b/tests/i18n_tests.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +Test i18n module. # # (C) Pywikibot team, 2007-2014 # @@ -12,6 +13,8 @@ class TestTranslate(TestCase): + +Test translate method. net = False @@ -75,6 +78,8 @@ class TestTWN(TestCase): +Base class for TranslateWiki tests. + net = False
[MediaWiki-commits] [Gerrit] Make sure isRecordHidden doesn't return true is run more tha... - change (mediawiki...Flow)
Matthias Mullie has uploaded a new change for review. https://gerrit.wikimedia.org/r/168953 Change subject: Make sure isRecordHidden doesn't return true is run more than once .. Make sure isRecordHidden doesn't return true is run more than once If called more than once, the original revision that was allowed to be displayed (the first in that workflow) would no longer return false, and as a result not be displayed. We loop through this method twice, once when batchloading all data, then once per row when rendering. We want both times to returns the same result, so let's check the exact revision that was considered visible. Change-Id: I454a2b0993681e15144f926836df930fb63181b6 --- M includes/Formatter/RecentChangesQuery.php 1 file changed, 13 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/53/168953/1 diff --git a/includes/Formatter/RecentChangesQuery.php b/includes/Formatter/RecentChangesQuery.php index 1edc7f4..115e813 100644 --- a/includes/Formatter/RecentChangesQuery.php +++ b/includes/Formatter/RecentChangesQuery.php @@ -144,6 +144,9 @@ /** * Determines if a flow record should be displayed in Special:Watchlist +* +* @param array $changeData +* @return bool */ protected function isRecordHidden( array $changeData ) { if ( $this-extendWatchlist ) { @@ -162,10 +165,13 @@ switch ( $action ) { case 'create-header': case 'edit-header': - if ( isset( $this-displayStatus['header-' . $changeData['workflow']] ) ) { + if ( + isset( $this-displayStatus['header-' . $changeData['workflow']] ) + $this-displayStatus['header-' . $changeData['workflow']] !== $changeData['revision'] + ) { return true; } - $this-displayStatus['header-' . $changeData['workflow']] = true; + $this-displayStatus['header-' . $changeData['workflow']] = $changeData['revision']; break; case 'hide-post': @@ -186,10 +192,13 @@ case 'edit-title': case 'create-topic-summary': case 'edit-topic-summary': - if ( isset( $this-displayStatus['topic-' . $changeData['workflow']] ) ) { + if ( + isset( $this-displayStatus['topic-' . $changeData['workflow']] ) + $this-displayStatus['topic-' . $changeData['workflow']] !== $changeData['revision'] + ) { return true; } - $this-displayStatus['topic-' . $changeData['workflow']] = true; + $this-displayStatus['topic-' . $changeData['workflow']] = $changeData['revision']; break; } -- To view, visit https://gerrit.wikimedia.org/r/168953 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I454a2b0993681e15144f926836df930fb63181b6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Re-pool ulsfo - change (operations/dns)
Faidon Liambotis has uploaded a new change for review. https://gerrit.wikimedia.org/r/168954 Change subject: Re-pool ulsfo .. Re-pool ulsfo This reverts commit fae57cb50127dd0f1ef61d8836975d57f54a5987. Change-Id: I65aadb9e56d980e0fd44226aca66df4f86485a14 --- M config-geo 1 file changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/54/168954/1 diff --git a/config-geo b/config-geo index 0c1f7be..57941fa 100644 --- a/config-geo +++ b/config-geo @@ -220,7 +220,7 @@ dcmap = { eqiad = { addrs_v4 = 208.80.154.224, addrs_v6 = 2620:0:861:ed1a::1 } esams = { addrs_v4 = 91.198.174.192, addrs_v6 = 2620:0:862:ed1a::1 } -ulsfo = { addrs_v4 = 208.80.154.224, addrs_v6 = 2620:0:861:ed1a::1 } +ulsfo = { addrs_v4 = 198.35.26.96, addrs_v6 = 2620:0:863:ed1a::1 } } } text-addrs-v4 = { # v4 from above, for e.g. donate @@ -229,7 +229,7 @@ dcmap = { eqiad = 208.80.154.224 esams = 91.198.174.192 -ulsfo = 208.80.154.224 +ulsfo = 198.35.26.96 } } bits-addrs = { @@ -238,7 +238,7 @@ dcmap = { eqiad = { addrs_v4 = 208.80.154.234, addrs_v6 = 2620:0:861:ed1a::1:a } esams = { addrs_v4 = 91.198.174.202, addrs_v6 = 2620:0:862:ed1a::1:a } -ulsfo = { addrs_v4 = 208.80.154.234, addrs_v6 = 2620:0:861:ed1a::1:a } +ulsfo = { addrs_v4 = 198.35.26.106, addrs_v6 = 2620:0:863:ed1a::1:a } } } bits-addrs-v4 = { # v4 from above, for e.g. geoiplookup @@ -247,7 +247,7 @@ dcmap = { eqiad = 208.80.154.234 esams = 91.198.174.202 -ulsfo = 208.80.154.234 +ulsfo = 198.35.26.106 } } upload-addrs = { @@ -256,7 +256,7 @@ dcmap = { eqiad = { addrs_v4 = 208.80.154.240, addrs_v6 = 2620:0:861:ed1a::2:b } esams = { addrs_v4 = 91.198.174.208, addrs_v6 = 2620:0:862:ed1a::2:b } -ulsfo = { addrs_v4 = 208.80.154.240, addrs_v6 = 2620:0:861:ed1a::2:b } +ulsfo = { addrs_v4 = 198.35.26.112, addrs_v6 = 2620:0:863:ed1a::2:b } } } mobile-addrs = { @@ -265,7 +265,7 @@ dcmap = { eqiad = { addrs_v4 = 208.80.154.236, addrs_v6 = 2620:0:861:ed1a::1:c } esams = { addrs_v4 = 91.198.174.204, addrs_v6 = 2620:0:862:ed1a::1:c } -ulsfo = { addrs_v4 = 208.80.154.236, addrs_v6 = 2620:0:861:ed1a::1:c } +ulsfo = { addrs_v4 = 198.35.26.108, addrs_v6 = 2620:0:863:ed1a::1:c } } } login-addrs = { @@ -274,7 +274,7 @@ dcmap = { eqiad = { addrs_v4 = 208.80.154.233, addrs_v6 = 2620:0:861:ed1a::1:9 } esams = { addrs_v4 = 91.198.174.201, addrs_v6 = 2620:0:862:ed1a::1:9 } -ulsfo = { addrs_v4 = 208.80.154.233, addrs_v6 = 2620:0:861:ed1a::1:9 } +ulsfo = { addrs_v4 = 198.35.26.105, addrs_v6 = 2620:0:863:ed1a::1:9 } } } } -- To view, visit https://gerrit.wikimedia.org/r/168954 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I65aadb9e56d980e0fd44226aca66df4f86485a14 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Removed blur event handling from entityselector - change (mediawiki...Wikibase)
Henning Snater has uploaded a new change for review. https://gerrit.wikimedia.org/r/168955 Change subject: Removed blur event handling from entityselector .. Removed blur event handling from entityselector This, for example, allows opening entityselector suggestions in new tabs. Change-Id: I800246e070e11587b24188f478ca74eacdaaaf1e --- M lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js M repo/resources/wikibase.ui.entitysearch.js 2 files changed, 2 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/55/168955/1 diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js b/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js index c5c42a4..becc2ea 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js @@ -160,6 +160,8 @@ } } ); } ); + + this.element.off( 'blur' ); }, /** diff --git a/repo/resources/wikibase.ui.entitysearch.js b/repo/resources/wikibase.ui.entitysearch.js index 572be51..0b8e177 100644 --- a/repo/resources/wikibase.ui.entitysearch.js +++ b/repo/resources/wikibase.ui.entitysearch.js @@ -9,15 +9,6 @@ 'use strict'; $.widget( 'wikibase.entitysearch', $.wikibase.entityselector, { - - /** -* @see jQuery.wikibase.entityselector._create -*/ - _create: function() { - $.wikibase.entityselector.prototype._create.call( this ); - this.element.off( 'blur' ); - }, - /** *@see jQuery.wikibase.entityselector._createMenuItemFromSuggestion */ -- To view, visit https://gerrit.wikimedia.org/r/168955 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I800246e070e11587b24188f478ca74eacdaaaf1e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Hygiene: Don't reach through objects - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Hygiene: Don't reach through objects .. Hygiene: Don't reach through objects Just take the object you want in the first place. Change-Id: I8282dcc5a51ecc343af95881c97775c857969491 --- M includes/Model/PostRevision.php 1 file changed, 7 insertions(+), 5 deletions(-) Approvals: Matthias Mullie: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Model/PostRevision.php b/includes/Model/PostRevision.php index fde46fb..cff357d 100644 --- a/includes/Model/PostRevision.php +++ b/includes/Model/PostRevision.php @@ -2,10 +2,11 @@ namespace Flow\Model; -use Flow\Container; -use User; -use Flow\Exception\DataModelException; use Flow\Collection\PostCollection; +use Flow\Container; +use Flow\Exception\DataModelException; +use Flow\Repository\TreeRepository; +use User; class PostRevision extends AbstractRevision { const MAX_TOPIC_LENGTH = 260; @@ -290,8 +291,9 @@ */ public function getDepth() { if ( $this-depth === null ) { - $rootLoader = Container::get( 'loader.root_post' ); - $rootPath = $rootLoader-getTreeRepo()-findRootPath( $this-getCollectionId() ); + /** @var TreeRepository $treeRepo */ + $treeRepo = Container::get( 'repository.tree' ); + $rootPath = $treeRepo-findRootPath( $this-getCollectionId() ); $this-setDepth( count( $rootPath ) - 1 ); } -- To view, visit https://gerrit.wikimedia.org/r/168697 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8282dcc5a51ecc343af95881c97775c857969491 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: EBernhardson ebernhard...@wikimedia.org Gerrit-Reviewer: Matthias Mullie mmul...@wikimedia.org Gerrit-Reviewer: SG shah...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Test: Add test for watching topics via api - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Test: Add test for watching topics via api .. Test: Add test for watching topics via api Bug: 72489 Change-Id: I77e3f8b167b5c51c086def8076f283f11a09a3cb --- M autoload.php M tests/phpunit/api/ApiFlowLockTopicTest.php A tests/phpunit/api/ApiTestCase.php A tests/phpunit/api/ApiWatchTopicTest.php 4 files changed, 132 insertions(+), 43 deletions(-) Approvals: Matthias Mullie: Looks good to me, approved jenkins-bot: Verified diff --git a/autoload.php b/autoload.php index 2a2b93f..da98980 100644 --- a/autoload.php +++ b/autoload.php @@ -1,5 +1,7 @@ ?php +// This file was automatically generated by gen-autoload.php -- do not edit! + $wgAutoloadClasses['ApiFlow'] = __DIR__ . '/includes/api/ApiFlow.php'; $wgAutoloadClasses['ApiFlowBase'] = __DIR__ . '/includes/api/ApiFlowBase.php'; $wgAutoloadClasses['ApiFlowBaseGet'] = __DIR__ . '/includes/api/ApiFlowBaseGet.php'; @@ -217,6 +219,7 @@ $wgAutoloadClasses['Flow\\TemplateHelper'] = __DIR__ . '/includes/TemplateHelper.php'; $wgAutoloadClasses['Flow\\Templating'] = __DIR__ . '/includes/Templating.php'; $wgAutoloadClasses['Flow\\Tests\\Api\\ApiFlowLockTopicTest'] = __DIR__ . '/tests/phpunit/api/ApiFlowLockTopicTest.php'; +$wgAutoloadClasses['Flow\\Tests\\Api\\ApiTestCase'] = __DIR__ . '/tests/phpunit/api/ApiTestCase.php'; $wgAutoloadClasses['Flow\\Tests\\BlockFactoryTest'] = __DIR__ . '/tests/phpunit/BlockFactoryTest.php'; $wgAutoloadClasses['Flow\\Tests\\BufferedBagOStuffTest'] = __DIR__ . '/tests/phpunit/Data/BagOStuff/BufferedBagOStuffTest.php'; $wgAutoloadClasses['Flow\\Tests\\BufferedCacheTest'] = __DIR__ . '/tests/phpunit/Data/BufferedCacheTest.php'; @@ -239,6 +242,7 @@ $wgAutoloadClasses['Flow\\Tests\\FlowTestCase'] = __DIR__ . '/tests/phpunit/FlowTestCase.php'; $wgAutoloadClasses['Flow\\Tests\\Formatter\\FormatterTest'] = __DIR__ . '/tests/phpunit/Formatter/FormatterTest.php'; $wgAutoloadClasses['Flow\\Tests\\HookTest'] = __DIR__ . '/tests/phpunit/HookTest.php'; +$wgAutoloadClasses['Flow\\Tests\\Integration\\ApiWatchTopicTest'] = __DIR__ . '/tests/phpunit/Integration/WatchTopicTest.php'; $wgAutoloadClasses['Flow\\Tests\\LinksTableTest'] = __DIR__ . '/tests/phpunit/LinksTableTest.php'; $wgAutoloadClasses['Flow\\Tests\\LocalBufferedBagOStuffTest'] = __DIR__ . '/tests/phpunit/Data/BagOStuff/LocalBufferedBagOStuffTest.php'; $wgAutoloadClasses['Flow\\Tests\\Model\\PostRevisionTest'] = __DIR__ . '/tests/phpunit/Model/PostRevisionTest.php'; diff --git a/tests/phpunit/api/ApiFlowLockTopicTest.php b/tests/phpunit/api/ApiFlowLockTopicTest.php index cb0cc71..9c3810a 100644 --- a/tests/phpunit/api/ApiFlowLockTopicTest.php +++ b/tests/phpunit/api/ApiFlowLockTopicTest.php @@ -10,35 +10,11 @@ * @group Flow * @group medium */ -class ApiFlowLockTopicTest extends \ApiTestCase { +class ApiFlowLockTopicTest extends ApiTestCase { /** * @var array */ protected $tablesUsed = array( 'flow_revision', 'flow_tree_revision' ); - - protected function setUp() { - $this-setMwGlobals( 'wgFlowOccupyPages', array( 'Talk:Flow QA' ) ); - parent::setUp(); - } - - protected function getEditToken() { - $tokens = $this-getTokenList( self::$users['sysop'] ); - return $tokens['edittoken']; - } - - protected function doApiRequest( - array $params, - array $session = null, - $appendModule = false, - User $user = null - ) { - // reset flow state before each request - FlowHooks::resetFlowExtension(); - Container::reset(); - $container = Container::getContainer(); - $container['user'] = $user ?: self::$users['sysop']-user; - return parent::doApiRequest( $params, $session, $appendModule, $user ); - } public function testLockTopic() { $workflowId = $this-createTopic(); @@ -103,23 +79,5 @@ // Is this intentional? We don't display it by default // but perhaps it should still be in the api output. $this-assertArrayNotHasKey( 'moderateReason', $result ); - } - - protected function createTopic() { - $data = $this-doApiRequest( array( - 'page' = 'Talk:Flow QA', - 'token' = $this-getEditToken(), - 'action' = 'flow', - 'submodule' = 'new-topic', - 'nttopic' = 'Hi there!', - 'ntcontent' = '...', - ) ); - $this-assertTrue( - // @todo we should return the new id much more directly than this - isset( $data[0]['flow']['new-topic']['result']['topiclist']['roots'][0]
[MediaWiki-commits] [Gerrit] Stop sending searches to cirrus while elasticsearch is down - change (operations/mediawiki-config)
Ottomata has submitted this change and it was merged. Change subject: Stop sending searches to cirrus while elasticsearch is down .. Stop sending searches to cirrus while elasticsearch is down Change-Id: Ifeb7a9d59ad287361173c7a31cebcb2cf595e651 --- M wmf-config/InitialiseSettings.php 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: Ottomata: Looks good to me, approved diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 11c8248..bc9598e 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -13840,7 +13840,10 @@ ), 'wmgUseCirrusAsAlternative' = array( - 'default' = true, + // 'default' = true, + // Falling back to lsearchd while Elasticsearch is freaking out. + 'default' = false, + 'test2wiki' = true, ), 'wmgCirrusSearchPreferRecentDefaultDecayPortion' = array( -- To view, visit https://gerrit.wikimedia.org/r/168956 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifeb7a9d59ad287361173c7a31cebcb2cf595e651 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Manybubbles never...@wikimedia.org Gerrit-Reviewer: Chad ch...@wikimedia.org Gerrit-Reviewer: Ottomata o...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Stop sending searches to cirrus while elasticsearch is down - change (operations/mediawiki-config)
Manybubbles has uploaded a new change for review. https://gerrit.wikimedia.org/r/168956 Change subject: Stop sending searches to cirrus while elasticsearch is down .. Stop sending searches to cirrus while elasticsearch is down Change-Id: Ifeb7a9d59ad287361173c7a31cebcb2cf595e651 --- M wmf-config/InitialiseSettings.php 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/56/168956/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 11c8248..bc9598e 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -13840,7 +13840,10 @@ ), 'wmgUseCirrusAsAlternative' = array( - 'default' = true, + // 'default' = true, + // Falling back to lsearchd while Elasticsearch is freaking out. + 'default' = false, + 'test2wiki' = true, ), 'wmgCirrusSearchPreferRecentDefaultDecayPortion' = array( -- To view, visit https://gerrit.wikimedia.org/r/168956 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifeb7a9d59ad287361173c7a31cebcb2cf595e651 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Manybubbles never...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] kafka - remove/replace pmtpa - change (operations/puppet)
Ottomata has submitted this change and it was merged. Change subject: kafka - remove/replace pmtpa .. kafka - remove/replace pmtpa removing pmtpa remnants, ran across this can it be replaced with eqiad here? should it? it's like asking if we have instances in eqiad Change-Id: I162776fed71e9560a013a003391b9753126c4ad0 --- M manifests/role/analytics/kafka.pp 1 file changed, 3 insertions(+), 4 deletions(-) Approvals: Ottomata: Looks good to me, approved John F. Lewis: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/manifests/role/analytics/kafka.pp b/manifests/role/analytics/kafka.pp index a47e849..a8bc5be 100644 --- a/manifests/role/analytics/kafka.pp +++ b/manifests/role/analytics/kafka.pp @@ -30,11 +30,11 @@ # TODO: Make hostnames configurable via labs global variables. $cluster_config = { 'main' = { -'kafka-main1.pmtpa.wmflabs' = { 'id' = 1 }, -'kafka-main2.pmtpa.wmflabs' = { 'id' = 2 }, +'kafka-main1.eqiad.wmflabs' = { 'id' = 1 }, +'kafka-main2.eqiad.wmflabs' = { 'id' = 2 }, }, 'external' = { -'kafka-external1.pmtpa.wmflabs' = { 'id' = 10 }, +'kafka-external1.eqiad.wmflabs' = { 'id' = 10 }, }, } # labs only uses a single log_dir @@ -57,7 +57,6 @@ 'analytics1022.eqiad.wmnet' = { 'id' = 22 }, # Row C }, 'ulsfo' = { }, -'pmtpa' = { }, 'esams' = { }, } -- To view, visit https://gerrit.wikimedia.org/r/168727 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I162776fed71e9560a013a003391b9753126c4ad0 Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn dz...@wikimedia.org Gerrit-Reviewer: Gage jger...@wikimedia.org Gerrit-Reviewer: John F. Lewis johnflewi...@gmail.com Gerrit-Reviewer: Matanya mata...@foss.co.il Gerrit-Reviewer: Ottomata o...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Try again to disable cirrus for a bit - change (operations/mediawiki-config)
Manybubbles has uploaded a new change for review. https://gerrit.wikimedia.org/r/168957 Change subject: Try again to disable cirrus for a bit .. Try again to disable cirrus for a bit Change-Id: Id621abf6d804990cd74f1600eeea247736e26ca0 --- M wmf-config/InitialiseSettings.php 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/57/168957/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index bc9598e..7f0aa16 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -13832,7 +13832,9 @@ ), 'wmgUseCirrus' = array( - 'default' = true, + // 'default' = true, + 'default' = false, + 'test2wiki' = true, 'dewiki' = false, 'enwiki' = false, 'frwiki' = false, @@ -13843,7 +13845,6 @@ // 'default' = true, // Falling back to lsearchd while Elasticsearch is freaking out. 'default' = false, - 'test2wiki' = true, ), 'wmgCirrusSearchPreferRecentDefaultDecayPortion' = array( -- To view, visit https://gerrit.wikimedia.org/r/168957 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id621abf6d804990cd74f1600eeea247736e26ca0 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Manybubbles never...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Try again to disable cirrus for a bit - change (operations/mediawiki-config)
Ottomata has submitted this change and it was merged. Change subject: Try again to disable cirrus for a bit .. Try again to disable cirrus for a bit Change-Id: Id621abf6d804990cd74f1600eeea247736e26ca0 --- M wmf-config/InitialiseSettings.php 1 file changed, 3 insertions(+), 2 deletions(-) Approvals: Ottomata: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index bc9598e..7f0aa16 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -13832,7 +13832,9 @@ ), 'wmgUseCirrus' = array( - 'default' = true, + // 'default' = true, + 'default' = false, + 'test2wiki' = true, 'dewiki' = false, 'enwiki' = false, 'frwiki' = false, @@ -13843,7 +13845,6 @@ // 'default' = true, // Falling back to lsearchd while Elasticsearch is freaking out. 'default' = false, - 'test2wiki' = true, ), 'wmgCirrusSearchPreferRecentDefaultDecayPortion' = array( -- To view, visit https://gerrit.wikimedia.org/r/168957 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id621abf6d804990cd74f1600eeea247736e26ca0 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Manybubbles never...@wikimedia.org Gerrit-Reviewer: Chad ch...@wikimedia.org Gerrit-Reviewer: Ottomata o...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Ignore Maven output - change (analytics...source)
Ottomata has submitted this change and it was merged. Change subject: Ignore Maven output .. Ignore Maven output Change-Id: Id0cb8f12591916d7fcc1a3822436b34a575dbbf1 --- A .gitignore 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Ottomata: Verified; Looks good to me, approved diff --git a/.gitignore b/.gitignore new file mode 100644 index 000..8bbf748 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# Maven output of subdirectories +/*/target -- To view, visit https://gerrit.wikimedia.org/r/168775 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id0cb8f12591916d7fcc1a3822436b34a575dbbf1 Gerrit-PatchSet: 1 Gerrit-Project: analytics/refinery/source Gerrit-Branch: master Gerrit-Owner: QChris christ...@quelltextlich.at Gerrit-Reviewer: Ottomata o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Ignore Eclipse settings - change (analytics...source)
Ottomata has submitted this change and it was merged. Change subject: Ignore Eclipse settings .. Ignore Eclipse settings Change-Id: I57e01086804adb02cc160ad780afc6741fe9fe6b --- M .gitignore 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Ottomata: Verified; Looks good to me, approved diff --git a/.gitignore b/.gitignore index 8bbf748..1873c2b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ # Maven output of subdirectories /*/target + +# Eclipse files +.project +.classpath +.settings -- To view, visit https://gerrit.wikimedia.org/r/168776 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I57e01086804adb02cc160ad780afc6741fe9fe6b Gerrit-PatchSet: 1 Gerrit-Project: analytics/refinery/source Gerrit-Branch: master Gerrit-Owner: QChris christ...@quelltextlich.at Gerrit-Reviewer: Ottomata o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Sysop and user tests - change (pywikibot/core)
John Vandenberg has uploaded a new change for review. https://gerrit.wikimedia.org/r/168958 Change subject: Sysop and user tests .. Sysop and user tests Some tests require a user or sysop, but are not yet flagged as user=True. This changeset also adds a sysop flag, to identify tests which require a sysop account, skipping the test if this condition is not met. The entire test suite can now be run without user-config.py, with tests skipping if they require a username to be defined. Change-Id: I690423556f1266f3ebe0bee11aa91b41b9965baf --- M tests/aspects.py M tests/page_tests.py M tests/site_tests.py 3 files changed, 97 insertions(+), 53 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/58/168958/1 diff --git a/tests/aspects.py b/tests/aspects.py index 0f3b9f1..dec5682 100644 --- a/tests/aspects.py +++ b/tests/aspects.py @@ -204,12 +204,14 @@ user = True @classmethod -def require_site_user(cls): +def require_site_user(cls, family, code, sysop=False): Check the user config has a valid login to the site. -if not cls.has_site_user(cls.family, cls.code): +if not cls.has_site_user(family, code, sysop=sysop): raise unittest.SkipTest( -'%s: No username for %s:%s' -% (cls.__name__, cls.family, cls.code)) +'%s: No %susername for %s:%s' +% (cls.__name__, + sysop if sysop else , + cls.family, cls.code)) @classmethod def setUpClass(cls): @@ -221,14 +223,19 @@ super(RequireUserMixin, cls).setUpClass() -cls.require_site_user() +sysop = hasattr(cls, 'sysop') and cls.sysop -cls.site.login() +for site in cls.sites.values(): +cls.require_site_user(site['family'], site['code'], sysop) -if not cls.site.user(): -raise unittest.SkipTest( -'%s: Unable able to login to %s' -% cls.__name__, cls.site) +site['site'].login(sysop) + +if not site['site'].user(): +raise unittest.SkipTest( +'%s: Unable able to login to %s as %s' +% (cls.__name__, + 'sysop' if sysop else 'bot', + site['site'])) def setUp(self): @@ -237,9 +244,17 @@ Login to the site if it is not logged in. super(RequireUserMixin, self).setUp() -site = self.get_site() -if not site.logged_in(): -site.login() + +sysop = hasattr(self, 'sysop') and self.sysop + +# There may be many sites, and setUp doesnt know +# which site is to be tested; ensure they are all +# logged in. +for site in self.sites.values(): +site = site['site'] + +if not site.logged_in(sysop): +site.login(sysop) class MetaTestCaseClass(type): @@ -351,7 +366,7 @@ if 'write' in dct and dct['write']: bases = tuple([SiteWriteMixin] + list(bases)) -if 'user' in dct and dct['user']: +if ('user' in dct and dct['user']) or ('sysop' in dct and dct['sysop']): bases = tuple([RequireUserMixin] + list(bases)) for test in tests: @@ -449,15 +464,17 @@ return cls.sites[name]['site'] @classmethod -def has_site_user(cls, family, code): +def has_site_user(cls, family, code, sysop=False): Check the user config has a user for the site. if not family: raise Exception('no family defined for %s' % cls.__name__) if not code: raise Exception('no site code defined for %s' % cls.__name__) -return code in config.usernames[family] or \ - '*' in config.usernames[family] +usernames = config.sysopnames if sysop else config.usernames + +return code in usernames[family] or \ + '*' in usernames[family] def __init__(self, *args, **kwargs): Constructor. @@ -666,6 +683,11 @@ pwb = True spawn = True +# pywikibot.handleArgs currently instantiates a Site object +# and tries to fetch the users messages. +site = True +net = True +user = True class DeprecationTestCase(TestCase): diff --git a/tests/page_tests.py b/tests/page_tests.py index 3169d1e..401f08a 100644 --- a/tests/page_tests.py +++ b/tests/page_tests.py @@ -409,7 +409,6 @@ self.assertIsInstance(mainpage.editTime(), pywikibot.Timestamp) self.assertIsInstance(mainpage.previousRevision(), int) self.assertIsInstance(mainpage.permalink(), basestring) -self.assertIsInstance(mainpage.purge(), bool) def testIsDisambig(self): Test the integration with Extension:Disambiguator. @@ -579,6 +578,17 @@
[MediaWiki-commits] [Gerrit] Disable l10nupdate for the duration of CLDR 26 plural migration - change (operations/puppet)
Alexandros Kosiaris has submitted this change and it was merged. Change subject: Disable l10nupdate for the duration of CLDR 26 plural migration .. Disable l10nupdate for the duration of CLDR 26 plural migration Planned for from 2014-10-27 to 2014-11-06 to prevent grammar mistakes appearing in the user interface. Bug: 62861 Change-Id: I11e74e3b4d7e4870912a02c182d78d236bbb1916 --- M manifests/misc/deployment.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: BryanDavis: Looks good to me, but someone else must approve Alexandros Kosiaris: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/misc/deployment.pp b/manifests/misc/deployment.pp index f5a7389..d831843 100644 --- a/manifests/misc/deployment.pp +++ b/manifests/misc/deployment.pp @@ -213,7 +213,7 @@ require misc::deployment::scap_scripts cron { 'l10nupdate': -ensure = present, +ensure = absent, command = '/usr/local/bin/l10nupdate-1 --verbose /var/log/l10nupdatelog/l10nupdate.log 21', user= 'l10nupdate', hour= 2, -- To view, visit https://gerrit.wikimedia.org/r/168255 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I11e74e3b4d7e4870912a02c182d78d236bbb1916 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: BryanDavis bda...@wikimedia.org Gerrit-Reviewer: Kaldari rkald...@wikimedia.org Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Reedy re...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Test: Add very basic tests for a variety of API methods - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Test: Add very basic tests for a variety of API methods .. Test: Add very basic tests for a variety of API methods There does seem to be a bit of code duplication between these tests, could probably still work to make helper assertions and DRY this up, but it already seems like a good start and good to have some tests here. Change-Id: Icc31d684cd4ad5dec0b6c67a69c72b6ddd0ccca7 --- M autoload.php M includes/Repository/TreeRepository.php A tests/phpunit/api/ApiFlowEditHeaderTest.php A tests/phpunit/api/ApiFlowEditPostTest.php A tests/phpunit/api/ApiFlowEditTitleTest.php A tests/phpunit/api/ApiFlowEditTopicSummary.php A tests/phpunit/api/ApiFlowModeratePostTest.php A tests/phpunit/api/ApiFlowModerateTopicTest.php A tests/phpunit/api/ApiFlowReplyTest.php A tests/phpunit/api/ApiFlowViewHeaderTest.php M tests/phpunit/api/ApiTestCase.php 11 files changed, 459 insertions(+), 28 deletions(-) Approvals: Matthias Mullie: Looks good to me, approved jenkins-bot: Verified diff --git a/autoload.php b/autoload.php index da98980..f1ab6f8 100644 --- a/autoload.php +++ b/autoload.php @@ -218,8 +218,17 @@ $wgAutoloadClasses['Flow\\TalkpageManager'] = __DIR__ . '/includes/TalkpageManager.php'; $wgAutoloadClasses['Flow\\TemplateHelper'] = __DIR__ . '/includes/TemplateHelper.php'; $wgAutoloadClasses['Flow\\Templating'] = __DIR__ . '/includes/Templating.php'; +$wgAutoloadClasses['Flow\\Tests\\Api\\ApiFlowEditHeaderTest'] = __DIR__ . '/tests/phpunit/api/ApiFlowEditHeaderTest.php'; +$wgAutoloadClasses['Flow\\Tests\\Api\\ApiFlowEditPostTest'] = __DIR__ . '/tests/phpunit/api/ApiFlowEditPostTest.php'; +$wgAutoloadClasses['Flow\\Tests\\Api\\ApiFlowEditTitleTest'] = __DIR__ . '/tests/phpunit/api/ApiFlowEditTitleTest.php'; +$wgAutoloadClasses['Flow\\Tests\\Api\\ApiFlowEditTopicSummaryTest'] = __DIR__ . '/tests/phpunit/api/ApiFlowEditTopicSummary.php'; $wgAutoloadClasses['Flow\\Tests\\Api\\ApiFlowLockTopicTest'] = __DIR__ . '/tests/phpunit/api/ApiFlowLockTopicTest.php'; +$wgAutoloadClasses['Flow\\Tests\\Api\\ApiFlowModeratePostTest'] = __DIR__ . '/tests/phpunit/api/ApiFlowModeratePostTest.php'; +$wgAutoloadClasses['Flow\\Tests\\Api\\ApiFlowModerateTopicTest'] = __DIR__ . '/tests/phpunit/api/ApiFlowModerateTopicTest.php'; +$wgAutoloadClasses['Flow\\Tests\\Api\\ApiFlowReplyTest'] = __DIR__ . '/tests/phpunit/api/ApiFlowReplyTest.php'; +$wgAutoloadClasses['Flow\\Tests\\Api\\ApiFlowViewHeaderTest'] = __DIR__ . '/tests/phpunit/api/ApiFlowViewHeaderTest.php'; $wgAutoloadClasses['Flow\\Tests\\Api\\ApiTestCase'] = __DIR__ . '/tests/phpunit/api/ApiTestCase.php'; +$wgAutoloadClasses['Flow\\Tests\\Api\\ApiWatchTopicTest'] = __DIR__ . '/tests/phpunit/api/ApiWatchTopicTest.php'; $wgAutoloadClasses['Flow\\Tests\\BlockFactoryTest'] = __DIR__ . '/tests/phpunit/BlockFactoryTest.php'; $wgAutoloadClasses['Flow\\Tests\\BufferedBagOStuffTest'] = __DIR__ . '/tests/phpunit/Data/BagOStuff/BufferedBagOStuffTest.php'; $wgAutoloadClasses['Flow\\Tests\\BufferedCacheTest'] = __DIR__ . '/tests/phpunit/Data/BufferedCacheTest.php'; @@ -242,7 +251,6 @@ $wgAutoloadClasses['Flow\\Tests\\FlowTestCase'] = __DIR__ . '/tests/phpunit/FlowTestCase.php'; $wgAutoloadClasses['Flow\\Tests\\Formatter\\FormatterTest'] = __DIR__ . '/tests/phpunit/Formatter/FormatterTest.php'; $wgAutoloadClasses['Flow\\Tests\\HookTest'] = __DIR__ . '/tests/phpunit/HookTest.php'; -$wgAutoloadClasses['Flow\\Tests\\Integration\\ApiWatchTopicTest'] = __DIR__ . '/tests/phpunit/Integration/WatchTopicTest.php'; $wgAutoloadClasses['Flow\\Tests\\LinksTableTest'] = __DIR__ . '/tests/phpunit/LinksTableTest.php'; $wgAutoloadClasses['Flow\\Tests\\LocalBufferedBagOStuffTest'] = __DIR__ . '/tests/phpunit/Data/BagOStuff/LocalBufferedBagOStuffTest.php'; $wgAutoloadClasses['Flow\\Tests\\Model\\PostRevisionTest'] = __DIR__ . '/tests/phpunit/Model/PostRevisionTest.php'; diff --git a/includes/Repository/TreeRepository.php b/includes/Repository/TreeRepository.php index ad54a81..549ebf2 100644 --- a/includes/Repository/TreeRepository.php +++ b/includes/Repository/TreeRepository.php @@ -121,36 +121,39 @@ __METHOD__ ); } catch( \DBQueryError $e ) { - /* -* insertSelect won't work on temporary tables (as used for MW -* unit tests), because it refers to the same table twice, in -* one query. -* In this case, we'll do a separate select insert. -* -* @see https://dev.mysql.com/doc/refman/5.0/en/temporary-table-problems.html -* @see
[MediaWiki-commits] [Gerrit] Make section heading use full width - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Make section heading use full width .. Make section heading use full width Change-Id: Ic804fde349c59625f4a23c8f35b20fad7460c555 (cherry picked from commit e6f1e3bbefc4b8686e86ee80adc0dd9aecdba892) --- M lib/resources/wikibase.css 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Aude: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/wikibase.css b/lib/resources/wikibase.css index 878b761..d77231a 100644 --- a/lib/resources/wikibase.css +++ b/lib/resources/wikibase.css @@ -60,6 +60,7 @@ margin-top: 1em; padding-left: 10px; border-bottom: none; + width: 100%; } /* entity container */ -- To view, visit https://gerrit.wikimedia.org/r/168946 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic804fde349c59625f4a23c8f35b20fad7460c555 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: wmf/1.25wmf5 Gerrit-Owner: Aude aude.w...@gmail.com Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Hygiene: remove dead code in BaseUrlGenerator - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Hygiene: remove dead code in BaseUrlGenerator .. Hygiene: remove dead code in BaseUrlGenerator With the conversion to the new url generation scheme complete the only thing BaseUrlGenerator was doing anymore was holding the array of loaded workflows. This patch moves the BaseUrlGenerator::resolveTitle and BaseUrlGenerator::withWorkflow to UrlGenerator and removes BaseUrlGenerator. Change-Id: I88b9ac49ab5fc2214592cc666370a32ad835d3b0 --- M autoload.php D includes/BaseUrlGenerator.php M includes/UrlGenerator.php 3 files changed, 45 insertions(+), 90 deletions(-) Approvals: Matthias Mullie: Looks good to me, approved jenkins-bot: Verified diff --git a/autoload.php b/autoload.php index c08f181..ee22c1a 100644 --- a/autoload.php +++ b/autoload.php @@ -44,7 +44,6 @@ $wgAutoloadClasses['Flow\\Actions\\ViewAction'] = __DIR__ . '/includes/Actions/ViewAction.php'; $wgAutoloadClasses['Flow\\Actions\\ViewHeaderAction'] = __DIR__ . '/includes/Actions/ViewHeaderAction.php'; $wgAutoloadClasses['Flow\\Actions\\ViewTopicSummaryAction'] = __DIR__ . '/includes/Actions/ViewTopicSummaryAction.php'; -$wgAutoloadClasses['Flow\\BaseUrlGenerator'] = __DIR__ . '/includes/BaseUrlGenerator.php'; $wgAutoloadClasses['Flow\\BlockFactory'] = __DIR__ . '/includes/BlockFactory.php'; $wgAutoloadClasses['Flow\\Block\\AbstractBlock'] = __DIR__ . '/includes/Block/Block.php'; $wgAutoloadClasses['Flow\\Block\\Block'] = __DIR__ . '/includes/Block/Block.php'; diff --git a/includes/BaseUrlGenerator.php b/includes/BaseUrlGenerator.php deleted file mode 100644 index d2e5af4..000 --- a/includes/BaseUrlGenerator.php +++ /dev/null @@ -1,88 +0,0 @@ -?php - -namespace Flow; - -use Flow\Data\ObjectManager; -use Flow\Model\UUID; -use Flow\Model\Workflow; -use Flow\Exception\InvalidDataException; -use Flow\Exception\InvalidInputException; -use Flow\Exception\FlowException; -use Title; - -/** - * BaseUrlGenerator contains the logic for putting together the bits of url - * data, without generating any specific urls. - */ -abstract class BaseUrlGenerator { - /** -* @var OccupationController -*/ - protected $occupationController; - - /** -* @var ObjectManager Workflow storage -*/ - protected $storage; - - /** -* @var Workflow[] Cached array of already loaded workflows -*/ - protected $workflows = array(); - - /** -* @param OccupationController $occupationController -*/ - public function __construct( OccupationController $occupationController ) { - $this-occupationController = $occupationController; - } - - /** -* @param Workflow $workflow -*/ - public function withWorkflow( Workflow $workflow ) { - $this-workflows[$workflow-getId()-getAlphadecimal()] = $workflow; - } - - /** -* @param Workflow|UUID $workflow -* @return Workflow -* @throws InvalidDataException -* @throws InvalidInputException -*/ - protected function resolveWorkflow( $workflow ) { - if ( $workflow instanceof UUID ) { - $alpha = $workflow-getAlphadecimal(); - if ( !isset( $this-workflows[$alpha] ) ) { - throw new InvalidInputException( 'Unloaded workflow: ' . $alpha , 'invalid-workflow' ); - } - $workflow = $this-workflows[$alpha]; - } elseif ( !$workflow instanceof Workflow ) { - // otherwise calling a method on $workflow will fatal error - throw new InvalidDataException( '$workflow is not UUID or Workflow instance' ); - } - return $workflow; - } - - /** -* @param Title|null $title -* @param UUID|null $workflowId -* @return Title -* @throws FlowException -*/ - protected function resolveTitle( Title $title = null, UUID $workflowId = null ) { - if ( $title !== null ) { - return $title; - } - if ( $workflowId === null ) { - throw new FlowException( 'No title or workflow given' ); - } - - $alpha = $workflowId-getAlphadecimal(); - if ( !isset( $this-workflows[$alpha] ) ) { - throw new InvalidInputException( 'Unloaded workflow:' . $alpha, 'invalid-workflow' ); - } - - return $this-workflows[$alpha]-getArticleTitle(); - } -} diff --git a/includes/UrlGenerator.php b/includes/UrlGenerator.php index 4ad4f25..7e1a305 100644 --- a/includes/UrlGenerator.php +++ b/includes/UrlGenerator.php @@ -2,6 +2,7 @@ namespace Flow; +use
[MediaWiki-commits] [Gerrit] Hygiene: Static analysis cleanups - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Hygiene: Static analysis cleanups .. Hygiene: Static analysis cleanups Change-Id: I770e47cd92f4f854db7717b0ae484f49261edcf3 --- M container.php M includes/Block/Topic.php M includes/Block/TopicList.php M includes/Block/TopicSummary.php M includes/Content/Content.php M includes/Data/BufferedCache.php M includes/Data/Index.php M includes/Data/Index/BoardHistoryIndex.php M includes/Data/Index/FeatureIndex.php M includes/Data/Index/TopicHistoryIndex.php M includes/Data/ObjectLocator.php M includes/Data/RecentChanges/PostRevisionRecentChanges.php M includes/Formatter/AbstractFormatter.php M includes/Formatter/Contributions.php M includes/Formatter/IRCLineUrlFormatter.php M includes/Formatter/RecentChanges.php M includes/Formatter/RevisionFormatter.php M includes/Formatter/TopicFormatter.php M includes/Model/UUID.php M includes/Parsoid/Fixer/BadImageRemover.php M includes/TalkpageManager.php M includes/UrlGenerator.php M tests/phpunit/Data/IndexTest.php M tests/phpunit/Repository/TreeRepositoryTest.php 24 files changed, 109 insertions(+), 59 deletions(-) Approvals: Matthias Mullie: Looks good to me, approved jenkins-bot: Verified diff --git a/container.php b/container.php index 1a2d90a..00c70f0 100644 --- a/container.php +++ b/container.php @@ -39,9 +39,7 @@ } ); $c['url_generator'] = $c-share( function( $c ) { - return new Flow\UrlGenerator( - $c['occupation_controller'] - ); + return new Flow\UrlGenerator(); } ); // listener is attached to storage.workflow, it // notifies the url generator about all loaded workflows. diff --git a/includes/Block/Topic.php b/includes/Block/Topic.php index 2afbd0f..ca45dcc 100644 --- a/includes/Block/Topic.php +++ b/includes/Block/Topic.php @@ -410,7 +410,7 @@ 'workflow' = $this-workflow, 'topic-title' = $this-loadTopicTitle(), ); - if ( !$metadata['topic-title'] ) { + if ( !$metadata['topic-title'] instanceof PostRevision ) { // permissions failure, should never have gotten this far throw new PermissionException( 'Not Allowed', 'insufficient-permission' ); } diff --git a/includes/Block/TopicList.php b/includes/Block/TopicList.php index 911552f..f5bd2fc 100644 --- a/includes/Block/TopicList.php +++ b/includes/Block/TopicList.php @@ -283,6 +283,7 @@ $postStorage = $this-storage-getStorage( 'PostRevision' ); return $pager-getPage( function( array $found ) use ( $postStorage ) { $queries = array(); + /** @var TopicListEntry[] $found */ foreach ( $found as $entry ) { $queries[] = array( 'rev_type_id' = $entry-getId() ); } diff --git a/includes/Block/TopicSummary.php b/includes/Block/TopicSummary.php index cbf22d4..091407e 100644 --- a/includes/Block/TopicSummary.php +++ b/includes/Block/TopicSummary.php @@ -60,8 +60,8 @@ ); /** -* @param string -* @param User +* @param IContextSource $context +* @param string $action */ public function init( IContextSource $context, $action ) { parent::init( $context, $action ); diff --git a/includes/Content/Content.php b/includes/Content/Content.php index 3d3110b..d148076 100644 --- a/includes/Content/Content.php +++ b/includes/Content/Content.php @@ -56,7 +56,9 @@ $newRev = $occupationController-ensureFlowRevision( $article, $loader-getWorkflow() ); if ( $newRev ) { + /** @noinspection PhpUndefinedFieldInspection */ $article-getPage()-mRevision = $newRev; + /** @noinspection PhpUndefinedFieldInspection */ $article-getPage()-mContentObject = $newRev-getContent(); $contentObject = $newRev-getContent(); } diff --git a/includes/Data/BufferedCache.php b/includes/Data/BufferedCache.php index 0c50023..12c73f8 100644 --- a/includes/Data/BufferedCache.php +++ b/includes/Data/BufferedCache.php @@ -2,7 +2,7 @@ namespace Flow\Data; -use BagOStuff; +use Flow\Data\BagOStuff\BufferedBagOStuff; use Closure; /** @@ -12,7 +12,7 @@ */ class BufferedCache { /** -* @var BagOStuff +* @var BufferedBagOStuff */ protected $cache; @@ -22,10 +22,10 @@ protected $exptime = 0; /** -* @param BagOStuff $cache The cache implementation to back this buffer with +* @param BufferedBagOStuff $cache The cache implementation
[MediaWiki-commits] [Gerrit] Hygiene: Use commit metadata in one-off indexes - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Hygiene: Use commit metadata in one-off indexes .. Hygiene: Use commit metadata in one-off indexes Since we added the commit metadata, including the topic workflow, passed on into the listeners we no longer need to do as much work to determine the extra rows these indexes add. The patch utilizes the 'workflow' parameter of the commit metadata where it can to avoid doing more complex lookups. Due to the recent addition of Index::cachePurge() commit metadata is not always available and we cannot kill the old code. Change-Id: Ic1485c784bab24ea23e53535e2f465ae5f2a934d --- M container.php M includes/Data/Index/BoardHistoryIndex.php M includes/Data/Index/TopicHistoryIndex.php M tests/phpunit/PostRevisionTestCase.php 4 files changed, 87 insertions(+), 57 deletions(-) Approvals: Matthias Mullie: Looks good to me, approved jenkins-bot: Verified diff --git a/container.php b/container.php index 00c70f0..1188e1c 100644 --- a/container.php +++ b/container.php @@ -184,13 +184,22 @@ } ); $c['storage.board_history.index'] = $c-share( function( $c ) { - return new BoardHistoryIndex( $c['memcache.buffered'], $c['storage.board_history.backing'], 'flow_revision:topic_list_history', + return new BoardHistoryIndex( + $c['memcache.buffered'], + // backend storage + $c['storage.board_history.backing'], + // key prefix + 'flow_revision:topic_list_history', + // primary key array( 'topic_list_id' ), + // index options array( 'limit' = 500, 'sort' = 'rev_id', 'order' = 'DESC' - ) ); + ), + $c['storage.topic_list'] + ); } ); $c['storage.board_history'] = $c-share( function( $c ) { diff --git a/includes/Data/Index/BoardHistoryIndex.php b/includes/Data/Index/BoardHistoryIndex.php index 4baeda6..c904748 100644 --- a/includes/Data/Index/BoardHistoryIndex.php +++ b/includes/Data/Index/BoardHistoryIndex.php @@ -4,9 +4,10 @@ use Flow\Container; use Flow\Data\BufferedCache; -use Flow\Data\ManagerGroup; +use Flow\Data\ObjectManager; use Flow\Data\Storage\BoardHistoryStorage; use Flow\Exception\DataModelException; +use Flow\Exception\FlowException; use Flow\Exception\InvalidInputException; use Flow\Model\AbstractRevision; use Flow\Model\Header; @@ -16,32 +17,49 @@ /** * Keeps a list of revision ids relevant to the board history bucketed - * by the owning TopicList id (board workflow) + * by the owning TopicList id (board workflow). + * + * Can be used with Header, PostRevision and PostSummary ObjectMapper's */ class BoardHistoryIndex extends TopKIndex { - public function __construct( BufferedCache $cache, BoardHistoryStorage $storage, $prefix, array $indexed, array $options = array() ) { + /** +* @var ObjectManager Manager for the TopicListEntry model +*/ + protected $om; + + public function __construct( + BufferedCache $cache, + BoardHistoryStorage $storage, + $prefix, + array $indexed, + array $options = array(), + ObjectManager $om + ) { if ( $indexed !== array( 'topic_list_id' ) ) { throw new DataModelException( __CLASS__ . ' is hardcoded to only index topic_list_id: ' . print_r( $indexed, true ), 'process-data' ); } parent::__construct( $cache, $storage, $prefix, $indexed, $options ); + $this-om = $om; } public function findMulti( array $queries, array $options = array() ) { if ( count( $queries ) 1 ) { + // why? throw new DataModelException( __METHOD__ . ' expects only one value in $queries', 'process-data' ); } return parent::findMulti( $queries, $options ); } + /** +* @param array $queries +* @return array +*/ public function backingStoreFindMulti( array $queries ) { - $options = $this-queryOptions(); - $res = $this-storage-findMulti( $queries, $options ); - if ( !$res ) { - return array(); - } - - return $res; + return $this-storage-findMulti( + $queries, + $this-queryOptions() + ) ?: array(); } /** @@ -49,10 +67,8 @@ * @param string[] $row */ public function cachePurge( $object, array $row ) { - $row['topic_list_id'] = $this-findTopicListId( $object, $row ); - if ( $row['topic_list_id'] ) { -
[MediaWiki-commits] [Gerrit] nfs::netapp::home backwards compatibility - change (operations/puppet)
Alexandros Kosiaris has uploaded a new change for review. https://gerrit.wikimedia.org/r/168959 Change subject: nfs::netapp::home backwards compatibility .. nfs::netapp::home backwards compatibility bast1001 used to mount /vol/home_pmtpa via the nfs::netapp::home::othersite class. Stop using that class and add an extra parameter to nfs::netapp::home class to optionally specify the site to mount. Then apply it to bast1001 Change-Id: I7513dbb1a7a46fcc2ad84b3f85250b728760331f --- M manifests/nfs.pp M manifests/site.pp 2 files changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/59/168959/1 diff --git a/manifests/nfs.pp b/manifests/nfs.pp index de8dfe3..dbf3d4e 100644 --- a/manifests/nfs.pp +++ b/manifests/nfs.pp @@ -86,7 +86,7 @@ $options = 'bg,intr' } -class nfs::netapp::home($ensure='mounted', $mountpoint='/home') { +class nfs::netapp::home($ensure='mounted', $mountpoint='/home', $mount_site=$::site) { include common file { $mountpoint: @@ -96,7 +96,7 @@ mount { $mountpoint: ensure = $ensure, require = File[$mountpoint], -device = ${nfs::netapp::common::device}:/vol/home_${::site}, +device = ${nfs::netapp::common::device}:/vol/home_${mount_site}, fstype = 'nfs', options = $nfs::netapp::common::options, } diff --git a/manifests/site.pp b/manifests/site.pp index 8fd59d7..8260b6d 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -353,9 +353,11 @@ include role::bastionhost -include nfs::netapp::home::othersite include dsh include ssh::hostkeys-collect +class { 'nfs::netapp::home': +mount_site = 'pmtpa', +} } node 'bast2001.wikimedia.org' { -- To view, visit https://gerrit.wikimedia.org/r/168959 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7513dbb1a7a46fcc2ad84b3f85250b728760331f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Allow custom (html)attributes when creating a table - change (VisualEditor/VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/168960 Change subject: Allow custom (html)attributes when creating a table .. Allow custom (html)attributes when creating a table MediaWiki, for example, may want to add class=wikitable. Change-Id: Ieadb2eb2d1cbfbc1cb1cb77bf5d6a355e7a03ab8 --- M src/ui/actions/ve.ui.TableAction.js 1 file changed, 12 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/60/168960/1 diff --git a/src/ui/actions/ve.ui.TableAction.js b/src/ui/actions/ve.ui.TableAction.js index f36b3c7..f39e1c9 100644 --- a/src/ui/actions/ve.ui.TableAction.js +++ b/src/ui/actions/ve.ui.TableAction.js @@ -43,10 +43,13 @@ * @param {number} [options.cols=4] Number of rows * @param {number} [options.rows=3] Number of columns * @param {boolean} [options.header] Make the first row a header row + * @param {boolean} [options.attributes] Attributes to give the table + * @param {boolean} [options.htmlAttributes] HTML attributes to give the table */ ve.ui.TableAction.prototype.create = function ( options ) { options = options || {}; var i, + tableElement = { type: 'table' }, surfaceModel = this.surface.getModel(), fragment = surfaceModel.getFragment(), data = [], @@ -57,7 +60,15 @@ return; } - data.push( { type: 'table' } ); + if ( options.attributes ) { + tableElement.attributes = ve.copy( options.attributes ); + } + + if ( options.htmlAttributes ) { + tableElement.htmlAttributes = ve.copy( options.htmlAttributes ); + } + + data.push( tableElement ); if ( options.header ) { data.push( { type: 'tableSection', attributes: { style: 'header' } } ); data = data.concat( ve.dm.TableRowNode.static.createData( { style: 'header', cellCount: numberOfCols } ) ); -- To view, visit https://gerrit.wikimedia.org/r/168960 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ieadb2eb2d1cbfbc1cb1cb77bf5d6a355e7a03ab8 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders esand...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Create tables with class=wikitable by default - change (mediawiki...VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/168961 Change subject: Create tables with class=wikitable by default .. Create tables with class=wikitable by default Change-Id: I094b1823248e16dd3b9a0a10ba13104f14798621 --- M modules/ve-mw/ui/ve.ui.MWCommandRegistry.js 1 file changed, 14 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/61/168961/1 diff --git a/modules/ve-mw/ui/ve.ui.MWCommandRegistry.js b/modules/ve-mw/ui/ve.ui.MWCommandRegistry.js index 2fc4e2f..35175b8 100644 --- a/modules/ve-mw/ui/ve.ui.MWCommandRegistry.js +++ b/modules/ve-mw/ui/ve.ui.MWCommandRegistry.js @@ -67,3 +67,17 @@ ve.ui.commandRegistry.register( new ve.ui.Command( 'preformatted', 'format', 'convert', 'mwPreformatted' ) ); +ve.ui.commandRegistry.register( + new ve.ui.Command( 'insertTable', 'table', 'create', { + header: true, + rows: 3, + cols: 4, + htmlAttributes: [ + { + values: { + class: 'wikitable' + } + } + ] + } ) +); -- To view, visit https://gerrit.wikimedia.org/r/168961 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I094b1823248e16dd3b9a0a10ba13104f14798621 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders esand...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Re-pool ulsfo - change (operations/dns)
Faidon Liambotis has submitted this change and it was merged. Change subject: Re-pool ulsfo .. Re-pool ulsfo This reverts commit fae57cb50127dd0f1ef61d8836975d57f54a5987. Change-Id: I65aadb9e56d980e0fd44226aca66df4f86485a14 --- M config-geo 1 file changed, 7 insertions(+), 7 deletions(-) Approvals: Faidon Liambotis: Looks good to me, approved jenkins-bot: Verified diff --git a/config-geo b/config-geo index 0c1f7be..57941fa 100644 --- a/config-geo +++ b/config-geo @@ -220,7 +220,7 @@ dcmap = { eqiad = { addrs_v4 = 208.80.154.224, addrs_v6 = 2620:0:861:ed1a::1 } esams = { addrs_v4 = 91.198.174.192, addrs_v6 = 2620:0:862:ed1a::1 } -ulsfo = { addrs_v4 = 208.80.154.224, addrs_v6 = 2620:0:861:ed1a::1 } +ulsfo = { addrs_v4 = 198.35.26.96, addrs_v6 = 2620:0:863:ed1a::1 } } } text-addrs-v4 = { # v4 from above, for e.g. donate @@ -229,7 +229,7 @@ dcmap = { eqiad = 208.80.154.224 esams = 91.198.174.192 -ulsfo = 208.80.154.224 +ulsfo = 198.35.26.96 } } bits-addrs = { @@ -238,7 +238,7 @@ dcmap = { eqiad = { addrs_v4 = 208.80.154.234, addrs_v6 = 2620:0:861:ed1a::1:a } esams = { addrs_v4 = 91.198.174.202, addrs_v6 = 2620:0:862:ed1a::1:a } -ulsfo = { addrs_v4 = 208.80.154.234, addrs_v6 = 2620:0:861:ed1a::1:a } +ulsfo = { addrs_v4 = 198.35.26.106, addrs_v6 = 2620:0:863:ed1a::1:a } } } bits-addrs-v4 = { # v4 from above, for e.g. geoiplookup @@ -247,7 +247,7 @@ dcmap = { eqiad = 208.80.154.234 esams = 91.198.174.202 -ulsfo = 208.80.154.234 +ulsfo = 198.35.26.106 } } upload-addrs = { @@ -256,7 +256,7 @@ dcmap = { eqiad = { addrs_v4 = 208.80.154.240, addrs_v6 = 2620:0:861:ed1a::2:b } esams = { addrs_v4 = 91.198.174.208, addrs_v6 = 2620:0:862:ed1a::2:b } -ulsfo = { addrs_v4 = 208.80.154.240, addrs_v6 = 2620:0:861:ed1a::2:b } +ulsfo = { addrs_v4 = 198.35.26.112, addrs_v6 = 2620:0:863:ed1a::2:b } } } mobile-addrs = { @@ -265,7 +265,7 @@ dcmap = { eqiad = { addrs_v4 = 208.80.154.236, addrs_v6 = 2620:0:861:ed1a::1:c } esams = { addrs_v4 = 91.198.174.204, addrs_v6 = 2620:0:862:ed1a::1:c } -ulsfo = { addrs_v4 = 208.80.154.236, addrs_v6 = 2620:0:861:ed1a::1:c } +ulsfo = { addrs_v4 = 198.35.26.108, addrs_v6 = 2620:0:863:ed1a::1:c } } } login-addrs = { @@ -274,7 +274,7 @@ dcmap = { eqiad = { addrs_v4 = 208.80.154.233, addrs_v6 = 2620:0:861:ed1a::1:9 } esams = { addrs_v4 = 91.198.174.201, addrs_v6 = 2620:0:862:ed1a::1:9 } -ulsfo = { addrs_v4 = 208.80.154.233, addrs_v6 = 2620:0:861:ed1a::1:9 } +ulsfo = { addrs_v4 = 198.35.26.105, addrs_v6 = 2620:0:863:ed1a::1:9 } } } } -- To view, visit https://gerrit.wikimedia.org/r/168954 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I65aadb9e56d980e0fd44226aca66df4f86485a14 Gerrit-PatchSet: 2 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix test and empty selection cases - change (analytics/dashiki)
Nuria has submitted this change and it was merged. Change subject: Fix test and empty selection cases .. Fix test and empty selection cases Change-Id: I641935239002136a71e6df9da6e426559f04b23e --- M src/components/wikimetrics-visualizer/wikimetrics-visualizer.html M src/lib/stateManager.js 2 files changed, 7 insertions(+), 3 deletions(-) Approvals: Nuria: Verified; Looks good to me, approved diff --git a/src/components/wikimetrics-visualizer/wikimetrics-visualizer.html b/src/components/wikimetrics-visualizer/wikimetrics-visualizer.html index 9362c48..ef30d82 100644 --- a/src/components/wikimetrics-visualizer/wikimetrics-visualizer.html +++ b/src/components/wikimetrics-visualizer/wikimetrics-visualizer.html @@ -1,6 +1,10 @@ -!-- ko if: metric -- +!-- ko if: mergedData mergedData() mergedData().length -- a class=header data-bind=metricName: metric, attr: {href: metric().definition} title=view metric definition target=_blank/a -!-- /ko -- vega-timeseries params=data: mergedData, colorScale: colorScale/vega-timeseries +!-- /ko -- +!-- ko ifnot: mergedData mergedData() mergedData().length -- +pPlease select a metric above i class=up icon/p +pi class=left icon/ And projects from the left/p +!-- /ko -- diff --git a/src/lib/stateManager.js b/src/lib/stateManager.js index 456cdb9..ed6a8a5 100644 --- a/src/lib/stateManager.js +++ b/src/lib/stateManager.js @@ -162,7 +162,7 @@ projects = ko.unwrap(self.selectedProjects), metricName, projectNames; -if (metric || projects) { +if (metric || (projects projects.length)) { if (metric) { metricName = metric.name; } -- To view, visit https://gerrit.wikimedia.org/r/168414 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I641935239002136a71e6df9da6e426559f04b23e Gerrit-PatchSet: 1 Gerrit-Project: analytics/dashiki Gerrit-Branch: master Gerrit-Owner: Milimetric dandree...@wikimedia.org Gerrit-Reviewer: Mforns mfo...@wikimedia.org Gerrit-Reviewer: Nuria nu...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove meaningless default action name - change (mediawiki/core)
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/168962 Change subject: Remove meaningless default action name .. Remove meaningless default action name Before: Get the value of the action=... parameter. If it's undefined return 'view'. Check if 'view' equals 'ajax'. After: Get the value of the action=... parameter. If it's undefined return null. Check if null equals 'ajax'. Change-Id: I56656218cfb895bffe886919c67ebf3b79d91515 --- M includes/MediaWiki.php 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/62/168962/1 diff --git a/includes/MediaWiki.php b/includes/MediaWiki.php index 9585c5f..107208e 100644 --- a/includes/MediaWiki.php +++ b/includes/MediaWiki.php @@ -489,8 +489,7 @@ $request = $this-context-getRequest(); // Send Ajax requests to the Ajax dispatcher. - if ( $this-config-get( 'UseAjax' ) $request-getVal( 'action', 'view' ) == 'ajax' ) { - + if ( $this-config-get( 'UseAjax' ) $request-getVal( 'action' ) === 'ajax' ) { // Set a dummy title, because $wgTitle == null might break things $title = Title::makeTitle( NS_MAIN, 'AJAX' ); $this-context-setTitle( $title ); -- To view, visit https://gerrit.wikimedia.org/r/168962 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I56656218cfb895bffe886919c67ebf3b79d91515 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix require_package conversion typo - change (operations/puppet)
Faidon Liambotis has uploaded a new change for review. https://gerrit.wikimedia.org/r/168963 Change subject: Fix require_package conversion typo .. Fix require_package conversion typo Commit I8123d6 switched an include to require_package, but left a trailing comma in the include, resulting into a puppet error. Change-Id: I7d67beb3ef2b2d5f90b1015d18f07ed6f2908790 --- M modules/wikimania_scholarships/manifests/init.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/63/168963/1 diff --git a/modules/wikimania_scholarships/manifests/init.pp b/modules/wikimania_scholarships/manifests/init.pp index 5208fd8..2be3464 100644 --- a/modules/wikimania_scholarships/manifests/init.pp +++ b/modules/wikimania_scholarships/manifests/init.pp @@ -36,7 +36,7 @@ ) { include passwords::mysql::wikimania_scholarships, -webserver::php5, +webserver::php5 require_package('php5-mysql') -- To view, visit https://gerrit.wikimedia.org/r/168963 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7d67beb3ef2b2d5f90b1015d18f07ed6f2908790 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Kill info-level spam on authdns-update w/ gdnsd 2.x - change (operations/puppet)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/168964 Change subject: Kill info-level spam on authdns-update w/ gdnsd 2.x .. Kill info-level spam on authdns-update w/ gdnsd 2.x Change-Id: Icf60d31b494c734d75c956860e99e13edb6b5945 --- M modules/authdns/files/authdns-local-update 1 file changed, 18 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/64/168964/1 diff --git a/modules/authdns/files/authdns-local-update b/modules/authdns/files/authdns-local-update index d1355b5..4a2ec8e 100644 --- a/modules/authdns/files/authdns-local-update +++ b/modules/authdns/files/authdns-local-update @@ -20,6 +20,10 @@ die this script needs root fi +# 1.x and 2.x have differences +GDNSD_V2=1 +(gdnsd -h 21 | grep -q 'gdnsd version 2') || GDNSD_V2=0 + # setup locking; only one copy of this may be running at the same time LOCKFILE=/var/lock/authdns-local-update LOCKFD=9 @@ -94,11 +98,20 @@ exit 0 fi -if ! gdnsd checkconf 2/dev/null; then -if [ -f /etc/gdnsd/config~ ]; then -mv /etc/gdnsd/config~ /etc/gdnsd/config +if [ $GDNSD_V2 -eq 1 ]; then +if ! gdnsd checkconf /dev/null; then +if [ -f /etc/gdnsd/config~ ]; then +mv /etc/gdnsd/config~ /etc/gdnsd/config +fi +die gdnsd checkconf failed, aborting fi -die gdnsd checkconf failed, aborting +else +if ! gdnsd checkconf 2/dev/null; then +if [ -f /etc/gdnsd/config~ ]; then +mv /etc/gdnsd/config~ /etc/gdnsd/config +fi +die gdnsd checkconf failed, aborting +fi fi ### reload @@ -110,10 +123,7 @@ else rm -f /etc/gdnsd/config~ echo Reloading zones -# 1.x and 2.x have different commands to reload zones -v2=1 -(gdnsd -h 21 | grep -q 'gdnsd version 2') || v2=0 -if [ $v2 -eq 1 ]; then +if [ $GDNSD_V2 -eq 1 ]; then gdnsd reload-zones else gdnsd reload -- To view, visit https://gerrit.wikimedia.org/r/168964 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icf60d31b494c734d75c956860e99e13edb6b5945 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack bbl...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] nfs::netapp::home backwards compatibility - change (operations/puppet)
Alexandros Kosiaris has submitted this change and it was merged. Change subject: nfs::netapp::home backwards compatibility .. nfs::netapp::home backwards compatibility bast1001 used to mount /vol/home_pmtpa via the nfs::netapp::home::othersite class. Stop using that class and add an extra parameter to nfs::netapp::home class to optionally specify the site to mount. Then apply it to bast1001 Change-Id: I7513dbb1a7a46fcc2ad84b3f85250b728760331f --- M manifests/nfs.pp M manifests/site.pp 2 files changed, 5 insertions(+), 3 deletions(-) Approvals: Alexandros Kosiaris: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/nfs.pp b/manifests/nfs.pp index de8dfe3..dbf3d4e 100644 --- a/manifests/nfs.pp +++ b/manifests/nfs.pp @@ -86,7 +86,7 @@ $options = 'bg,intr' } -class nfs::netapp::home($ensure='mounted', $mountpoint='/home') { +class nfs::netapp::home($ensure='mounted', $mountpoint='/home', $mount_site=$::site) { include common file { $mountpoint: @@ -96,7 +96,7 @@ mount { $mountpoint: ensure = $ensure, require = File[$mountpoint], -device = ${nfs::netapp::common::device}:/vol/home_${::site}, +device = ${nfs::netapp::common::device}:/vol/home_${mount_site}, fstype = 'nfs', options = $nfs::netapp::common::options, } diff --git a/manifests/site.pp b/manifests/site.pp index 8fd59d7..688ebf4 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -353,9 +353,11 @@ include role::bastionhost -include nfs::netapp::home::othersite include dsh include ssh::hostkeys-collect +class { 'nfs::netapp::home': +mount_site = 'pmtpa', +} } node 'bast2001.wikimedia.org' { -- To view, visit https://gerrit.wikimedia.org/r/168959 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7513dbb1a7a46fcc2ad84b3f85250b728760331f Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix require_package conversion typo - change (operations/puppet)
Faidon Liambotis has submitted this change and it was merged. Change subject: Fix require_package conversion typo .. Fix require_package conversion typo Commit I8123d6 switched an include to require_package, but left a trailing comma in the include, resulting into a puppet error. Change-Id: I7d67beb3ef2b2d5f90b1015d18f07ed6f2908790 --- M modules/wikimania_scholarships/manifests/init.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Faidon Liambotis: Verified; Looks good to me, approved diff --git a/modules/wikimania_scholarships/manifests/init.pp b/modules/wikimania_scholarships/manifests/init.pp index 5208fd8..2be3464 100644 --- a/modules/wikimania_scholarships/manifests/init.pp +++ b/modules/wikimania_scholarships/manifests/init.pp @@ -36,7 +36,7 @@ ) { include passwords::mysql::wikimania_scholarships, -webserver::php5, +webserver::php5 require_package('php5-mysql') -- To view, visit https://gerrit.wikimedia.org/r/168963 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7d67beb3ef2b2d5f90b1015d18f07ed6f2908790 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Maintenance script to clean up mismatched user names in ipbl... - change (mediawiki/core)
Anomie has uploaded a new change for review. https://gerrit.wikimedia.org/r/168965 Change subject: Maintenance script to clean up mismatched user names in ipblocks .. Maintenance script to clean up mismatched user names in ipblocks For blocks with ipb_user non-zero, the ipb_address field is supposed to match user_name. But due to various bugs over the years, this doesn't hold true. Due to those old bugs, we also have rows with the same ipb_user (and ipb_auto and ipb_anon_only, since those only apply to IP blocks) but different ipb_address. Those also need cleaning up, both to prevent a unique constraint violation and to stop errors in ApiQueryAllUsers. Bug: 34014 Bug: 72560 Change-Id: I519078ec011dbd0043811a78c3f913792a4df7fe --- A maintenance/cleanupBlocks.php 1 file changed, 147 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/65/168965/1 diff --git a/maintenance/cleanupBlocks.php b/maintenance/cleanupBlocks.php new file mode 100644 index 000..1736203 --- /dev/null +++ b/maintenance/cleanupBlocks.php @@ -0,0 +1,147 @@ +?php +/** + * Cleans up user blocks with user names not matching the 'user' table + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/gpl.html + * + * @file + * @ingroup Maintenance + */ + +require_once __DIR__ . '/Maintenance.php'; + +/** + * Maintenance script to clean up user blocks with user names not matching the + * 'user' table. + * + * @ingroup Maintenance + */ +class CleanupBlocks extends Maintenance { + + public function __construct() { + parent::__construct(); + $this-mDescription = Cleanup user blocks with user names not matching the 'user' table; + $this-setBatchSize( 1000 ); + } + + public function execute() { + $db = wfGetDB( DB_MASTER ); + + $max = $db-selectField( 'ipblocks', 'MAX(ipb_user)' ); + + // Step 1: Clean up any duplicate user blocks + for ( $from = 1; $from = $max; $from += $this-mBatchSize ) { + $to = min( $max, $from + $this-mBatchSize - 1 ); + $this-output( Cleaning up duplicate ipb_user ($from-$to of $max)\n ); + + $delete = array(); + + $res = $db-select( + 'ipblocks', + array( 'ipb_user' ), + array( + ipb_user = $from, + ipb_user = $to, + ), + __METHOD__, + array( + 'GROUP BY' = 'ipb_user', + 'HAVING' = 'COUNT(*) 1', + ) + ); + foreach ( $res as $row ) { + $bestBlock = null; + $res2 = $db-select( + 'ipblocks', + '*', + array( + 'ipb_user' = $row-ipb_user, + ) + ); + foreach ( $res2 as $row2 ) { + $block = Block::newFromRow( $row2 ); + if ( !$bestBlock ) { + $bestBlock = $block; + continue; + } + + // Find the most-restrictive block. Can't use + // Block::chooseBlock because that's for IP blocks, not + // user blocks. + $keep = null; + if ( $keep === null $block-getExpiry() !== $bestBlock-getExpiry() ) { + // This works for infinite blocks because 'infinity'
[MediaWiki-commits] [Gerrit] Install base system on new elasticsearch nodes - change (operations/puppet)
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/168966 Change subject: Install base system on new elasticsearch nodes .. Install base system on new elasticsearch nodes Change-Id: Ib28ce50f9729a73104ee53ade2c008994422f8ba --- M manifests/site.pp 1 file changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/66/168966/1 diff --git a/manifests/site.pp b/manifests/site.pp index 8fd59d7..533c91b 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -2631,7 +2631,6 @@ node /^elastic10(0[1-9]|1[0-9])\.eqiad\.wmnet/ { # ganglia cluster name. -$cluster = 'elasticsearch' if $::hostname =~ /^elastic10(0[17]|13)/ { $ganglia_aggregator = true } @@ -2646,6 +2645,14 @@ } } +# Installing OS on these nodes, will include elasticseach roles shortly... +node /^elastic10(2[0-9]|3[01])\.eqiad\.wmnet/ { +$cluster = 'elasticsearch' +class { 'admin': groups = ['elasticsearch-roots'] } +include standard +} + + node 'lead.wikimedia.org' { class { 'admin': groups = ['oit'] } include standard-noexim -- To view, visit https://gerrit.wikimedia.org/r/168966 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib28ce50f9729a73104ee53ade2c008994422f8ba Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ottomata o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Kill info-level spam on authdns-update w/ gdnsd 2.x - change (operations/puppet)
BBlack has submitted this change and it was merged. Change subject: Kill info-level spam on authdns-update w/ gdnsd 2.x .. Kill info-level spam on authdns-update w/ gdnsd 2.x Change-Id: Icf60d31b494c734d75c956860e99e13edb6b5945 --- M modules/authdns/files/authdns-local-update 1 file changed, 18 insertions(+), 8 deletions(-) Approvals: BBlack: Verified; Looks good to me, approved diff --git a/modules/authdns/files/authdns-local-update b/modules/authdns/files/authdns-local-update index d1355b5..4a2ec8e 100644 --- a/modules/authdns/files/authdns-local-update +++ b/modules/authdns/files/authdns-local-update @@ -20,6 +20,10 @@ die this script needs root fi +# 1.x and 2.x have differences +GDNSD_V2=1 +(gdnsd -h 21 | grep -q 'gdnsd version 2') || GDNSD_V2=0 + # setup locking; only one copy of this may be running at the same time LOCKFILE=/var/lock/authdns-local-update LOCKFD=9 @@ -94,11 +98,20 @@ exit 0 fi -if ! gdnsd checkconf 2/dev/null; then -if [ -f /etc/gdnsd/config~ ]; then -mv /etc/gdnsd/config~ /etc/gdnsd/config +if [ $GDNSD_V2 -eq 1 ]; then +if ! gdnsd checkconf /dev/null; then +if [ -f /etc/gdnsd/config~ ]; then +mv /etc/gdnsd/config~ /etc/gdnsd/config +fi +die gdnsd checkconf failed, aborting fi -die gdnsd checkconf failed, aborting +else +if ! gdnsd checkconf 2/dev/null; then +if [ -f /etc/gdnsd/config~ ]; then +mv /etc/gdnsd/config~ /etc/gdnsd/config +fi +die gdnsd checkconf failed, aborting +fi fi ### reload @@ -110,10 +123,7 @@ else rm -f /etc/gdnsd/config~ echo Reloading zones -# 1.x and 2.x have different commands to reload zones -v2=1 -(gdnsd -h 21 | grep -q 'gdnsd version 2') || v2=0 -if [ $v2 -eq 1 ]; then +if [ $GDNSD_V2 -eq 1 ]; then gdnsd reload-zones else gdnsd reload -- To view, visit https://gerrit.wikimedia.org/r/168964 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icf60d31b494c734d75c956860e99e13edb6b5945 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack bbl...@wikimedia.org Gerrit-Reviewer: BBlack bbl...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Install base system on new elasticsearch nodes - change (operations/puppet)
Ottomata has submitted this change and it was merged. Change subject: Install base system on new elasticsearch nodes .. Install base system on new elasticsearch nodes Change-Id: Ib28ce50f9729a73104ee53ade2c008994422f8ba --- M manifests/site.pp 1 file changed, 9 insertions(+), 0 deletions(-) Approvals: Ottomata: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/site.pp b/manifests/site.pp index 688ebf4..8687a57 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -2648,6 +2648,15 @@ } } +# Installing OS on these nodes, will include elasticseach roles shortly... +node /^elastic10(2[0-9]|3[01])\.eqiad\.wmnet/ { +# ganglia cluster name. +$cluster = 'elasticsearch' +class { 'admin': groups = ['elasticsearch-roots'] } +include standard +} + + node 'lead.wikimedia.org' { class { 'admin': groups = ['oit'] } include standard-noexim -- To view, visit https://gerrit.wikimedia.org/r/168966 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib28ce50f9729a73104ee53ade2c008994422f8ba Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ottomata o...@wikimedia.org Gerrit-Reviewer: Ottomata o...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [FEAT] Diff: Use PatchManager for showDiff - change (pywikibot/core)
XZise has uploaded a new change for review. https://gerrit.wikimedia.org/r/168967 Change subject: [FEAT] Diff: Use PatchManager for showDiff .. [FEAT] Diff: Use PatchManager for showDiff This uses PatchManager for pywikibot.showDiff and also includes now a header. It also fixes the missing space in front of a line if it was added or removed. This makes it consistent with lines where only parts of it were changed. Also a minor change that the state which stores if it ends with the default color is now represented as a boolean. Change-Id: Ic59df944b4c64b8536a5178e1aabc0b1adfeab47 --- M pywikibot/__init__.py M pywikibot/diff.py 2 files changed, 14 insertions(+), 64 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/67/168967/1 diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py index d70dc86..cf6ffa5 100644 --- a/pywikibot/__init__.py +++ b/pywikibot/__init__.py @@ -9,7 +9,6 @@ __version__ = '$Id$' import datetime -import difflib import math import re import sys @@ -602,60 +601,7 @@ The differences are highlighted (only on compatible systems) to show which changes were made. -# This is probably not portable to non-terminal interfaces -# For information on difflib, see http://pydoc.org/2.1/difflib.html -color = { -'+': 'lightgreen', -'-': 'lightred', -} -diff = u'' -colors = [] -# This will store the last line beginning with + or -. -lastline = None -# For testing purposes only: show original, uncolored diff -# for line in difflib.ndiff(oldtext.splitlines(), newtext.splitlines()): -# print line -for line in difflib.ndiff(oldtext.splitlines(), newtext.splitlines()): -if line.startswith('?'): -# initialize color vector with None, which means default color -lastcolors = [None for c in lastline] -# colorize the + or - sign -lastcolors[0] = color[lastline[0]] -# colorize changed parts in red or green -for i in range(min(len(line), len(lastline))): -if line[i] != ' ': -lastcolors[i] = color[lastline[0]] -diff += lastline + '\n' -# append one None (default color) for the newline character -colors += lastcolors + [None] -elif lastline: -diff += lastline + '\n' -# colorize the + or - sign only -lastcolors = [None for c in lastline] -lastcolors[0] = color[lastline[0]] -colors += lastcolors + [None] -lastline = None -if line[0] in ('+', '-'): -lastline = line -# there might be one + or - line left that wasn't followed by a ? line. -if lastline: -diff += lastline + '\n' -# colorize the + or - sign only -lastcolors = [None for c in lastline] -lastcolors[0] = color[lastline[0]] -colors += lastcolors + [None] - -result = u'' -lastcolor = None -for i in range(len(diff)): -if colors[i] != lastcolor: -if lastcolor is None: -result += '\03{%s}' % colors[i] -else: -result += '\03{default}' -lastcolor = colors[i] -result += diff[i] -output(result) +pywikibot.diff.PatchManager(oldtext, newtext).print_hunks() # Throttle and thread handling diff --git a/pywikibot/diff.py b/pywikibot/diff.py index 7ac30dc..3c25fe7 100644 --- a/pywikibot/diff.py +++ b/pywikibot/diff.py @@ -79,13 +79,13 @@ for tag, i1, i2, j1, j2 in self.group: if tag == 'equal': for line in self.a[i1:i2]: -yield ' ' + check_line(line) +yield ' ' + check_line(line) if tag in ('delete'): for line in self.a[i1:i2]: -yield '-' + check_line(line) +yield '- ' + check_line(line) if tag in ('insert'): for line in self.b[j1:j2]: -yield '+' + check_line(line) +yield '+ ' + check_line(line) if tag in ('replace'): for line in difflib.ndiff(self.a[i1:i2], self.b[j1:j2]): yield check_line(line) @@ -132,20 +132,20 @@ return line colored_line = u'' -state = 'Close' +color_closed = True for char, char_ref in zip_longest(line, line_ref.strip(), fillvalue=' '): char_tagged = char -if state == 'Close': +if color_closed: if char_ref != ' ': char_tagged = '\03{%s}%s' % (self.colors[color], char) -state = 'Open' -elif state == 'Open': +color_closed = False +else: if char_ref == ' ':
[MediaWiki-commits] [Gerrit] Add ViewEntityAction tests for diff and old revision - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Add ViewEntityAction tests for diff and old revision .. Add ViewEntityAction tests for diff and old revision Smoke test that if requesting a diff or old revision, that there are no edit links, and if a diff, it is indeed showing a diff. Change-Id: I5e5908fb29302e378c8dcc40110fdbb6152a9916 --- M repo/tests/phpunit/includes/actions/ViewEntityActionTest.php 1 file changed, 47 insertions(+), 5 deletions(-) Approvals: Daniel Kinzler: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/tests/phpunit/includes/actions/ViewEntityActionTest.php b/repo/tests/phpunit/includes/actions/ViewEntityActionTest.php index 36282ab..4a0d4b6 100644 --- a/repo/tests/phpunit/includes/actions/ViewEntityActionTest.php +++ b/repo/tests/phpunit/includes/actions/ViewEntityActionTest.php @@ -62,19 +62,61 @@ */ public function testShow( $handle, $regex ) { $page = $this-getTestItemPage( $handle ); - $action = $this-createAction( view, $page ); - - $action-show(); - $html = $action-getOutput()-getHTML(); + $html = $this-executeViewAction( $page, array() ); $this-assertRegExp( $regex, $html ); + } + + public function testShowDiff() { + $page = $this-getTestItemPage( 'Berlin' ); + + $latest = $page-getRevision(); + $previous = $latest-getPrevious(); + + $params = array( + 'diff' = $latest-getId(), + 'oldid' = $previous-getId() + ); + + $html = $this-executeViewAction( $page, $params ); + + $this-assertRegExp( '/diff-currentversion-title/', $html, 'is diff view' ); + $this-assertNotRegExp( '/wikibase-edittoolbar-container/', $html, 'no edit toolbar' ); + } + + public function testShowOldRevision_hasNoEditLinks() { + $page = $this-getTestItemPage( 'Berlin' ); + + $latest = $page-getRevision(); + $previous = $latest-getPrevious(); + + $params = array( + 'oldid' = $previous-getId() + ); + + $html = $this-executeViewAction( $page, $params ); + + $this-assertNotRegExp( '/wikibase-edittoolbar-container/', $html, 'no edit toolbar' ); + } + + /** +* @param WikiPage $page +* @param string[] $params +* +* @return string +*/ + private function executeViewAction( WikiPage $page, array $params ) { + $action = $this-createAction( 'view', $page, $params ); + $action-show(); + + return $action-getOutput()-getHTML(); } public function testShow404() { $id = new ItemId( 'q1122334455' ); $title = WikibaseRepo::getDefaultInstance()-getEntityContentFactory()-getTitleForId( $id ); $page = new WikiPage( $title ); - $action = $this-createAction( view, $page ); + $action = $this-createAction( 'view', $page ); /* @var \FauxResponse $response */ $response = $action-getRequest()-response(); -- To view, visit https://gerrit.wikimedia.org/r/168827 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5e5908fb29302e378c8dcc40110fdbb6152a9916 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Aude aude.w...@gmail.com Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] I-2. Change the default number of Flow Messages in the flyout - change (mediawiki...Echo)
jenkins-bot has submitted this change and it was merged. Change subject: I-2. Change the default number of Flow Messages in the flyout .. I-2. Change the default number of Flow Messages in the flyout Previously this was loading 25 unread notifications. If less than 25 were found it would add in 3 read notifications so it wasn't empty. This patch changes things around to always return 25 notifications if the user has at least that many. Instead of backfilling a static count of 3 we backfill 25 - $count with previously read notifications. Change-Id: I723316486216d7b9dacfcc9765c1a8212e973518 --- M api/ApiEchoNotifications.php M includes/mapper/NotificationMapper.php 2 files changed, 22 insertions(+), 17 deletions(-) Approvals: Matthias Mullie: Looks good to me, approved jenkins-bot: Verified diff --git a/api/ApiEchoNotifications.php b/api/ApiEchoNotifications.php index 4cad169..8f6e9c8 100644 --- a/api/ApiEchoNotifications.php +++ b/api/ApiEchoNotifications.php @@ -124,8 +124,7 @@ $notifMapper = new EchoNotificationMapper(); - // Unread notifications + possbile 3 read notification depending on result number - // We don't care about next offset in this case + // Prefer unread notifications. We don't care about next offset in this case if ( $unreadFirst ) { wfProfileIn( __METHOD__ . '-fetch-data-unread-first' ); $notifs = $notifMapper-fetchUnreadByUser( $user, $limit, $eventTypes ); @@ -133,17 +132,17 @@ // then fill the result with some read notifications $count = count( $notifs ); if ( $count $limit ) { - // We could add another function for notification_read_timestamp is not null - // but it's probably not good to add negation condition to a query - $mixedNotifs = $notifMapper-fetchByUser( $user, $count + 3, null, $eventTypes ); + // Query planner should be smart enough that passing a short list of ids to exclude + // will only visit at most that number of extra rows. + $mixedNotifs = $notifMapper-fetchByUser( + $user, + $limit - $count, + null, + $eventTypes, + array_keys( $notifs ) + ); foreach ( $mixedNotifs as $notif ) { - if ( !isset( $notifs[$notif-getEvent()-getId()] ) ) { - if ( $count = $limit ) { - break; - } - $count++; - $notifs[$notif-getEvent()-getId()] = $notif; - } + $notifs[$notif-getEvent()-getId()] = $notif; } } wfProfileOut( __METHOD__ . '-fetch-data-unread-first' ); diff --git a/includes/mapper/NotificationMapper.php b/includes/mapper/NotificationMapper.php index 52aca10..9545c8d 100644 --- a/includes/mapper/NotificationMapper.php +++ b/includes/mapper/NotificationMapper.php @@ -116,13 +116,15 @@ /** * Get Notification by user in batch along with limit, offset etc -* @param User the user to get notifications for -* @param int The maximum number of notifications to return -* @param string Used for offset -* @param array Event types to load +* +* @param User $user the user to get notifications for +* @param int $limit The maximum number of notifications to return +* @param string $continue Used for offset +* @param array $eventTypes Event types to load +* @param array $excludeEventIds Event id's to exclude. * @return EchoNotification[] */ - public function fetchByUser( User $user, $limit, $continue, array $eventTypes = array() ) { + public function fetchByUser( User $user, $limit, $continue, array $eventTypes = array(), array $excludeEventIds = array() ) { $dbr = $this-dbFactory-getEchoDb( DB_SLAVE ); if ( !$eventTypes ) { @@ -143,6 +145,10 @@ 'notification_bundle_base' = 1 ); + if ( $excludeEventIds ) { + $conds[] = 'event_id NOT IN ( ' . $dbr-makeList( $excludeEventIds ) . ' ) '; + } +
[MediaWiki-commits] [Gerrit] Move uranium/nickel in the correct network stanza - change (operations/puppet)
Alexandros Kosiaris has uploaded a new change for review. https://gerrit.wikimedia.org/r/168968 Change subject: Move uranium/nickel in the correct network stanza .. Move uranium/nickel in the correct network stanza Bad change introduced in 11517a20 Change-Id: I7a2865fe5e5ae8179e6dd81a3f4269f131d2d94f --- M manifests/network.pp 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/68/168968/1 diff --git a/manifests/network.pp b/manifests/network.pp index 84aca6e..3b60088 100644 --- a/manifests/network.pp +++ b/manifests/network.pp @@ -42,6 +42,8 @@ '208.80.154.14', # neon.wikimedia.org '2620:0:861:1:208:80:154:14', # neon.wikimedia.org '2620:0:861:1:7a2b:cbff:fe08:a42f', # neon.wikimedia.org SLAAC +'208.80.154.150', # nickel.wikimedia.org (ganglia, gmetad needs it) +'208.80.154.53', # uranium.wikimedia.org (ganglia, gmetad needs it) ] }, 'labs' = { @@ -64,8 +66,6 @@ '208.80.153.249', '10.4.1.120', '10.4.1.137', -'208.80.154.150', # nickel.wikimedia.org (ganglia) -'208.80.154.53', # uranium.wikimedia.org (ganglia) ], } } -- To view, visit https://gerrit.wikimedia.org/r/168968 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7a2865fe5e5ae8179e6dd81a3f4269f131d2d94f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move uranium/nickel in the correct network stanza - change (operations/puppet)
Alexandros Kosiaris has submitted this change and it was merged. Change subject: Move uranium/nickel in the correct network stanza .. Move uranium/nickel in the correct network stanza Bad change introduced in 11517a20 Change-Id: I7a2865fe5e5ae8179e6dd81a3f4269f131d2d94f --- M manifests/network.pp 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Alexandros Kosiaris: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/network.pp b/manifests/network.pp index 84aca6e..3b60088 100644 --- a/manifests/network.pp +++ b/manifests/network.pp @@ -42,6 +42,8 @@ '208.80.154.14', # neon.wikimedia.org '2620:0:861:1:208:80:154:14', # neon.wikimedia.org '2620:0:861:1:7a2b:cbff:fe08:a42f', # neon.wikimedia.org SLAAC +'208.80.154.150', # nickel.wikimedia.org (ganglia, gmetad needs it) +'208.80.154.53', # uranium.wikimedia.org (ganglia, gmetad needs it) ] }, 'labs' = { @@ -64,8 +66,6 @@ '208.80.153.249', '10.4.1.120', '10.4.1.137', -'208.80.154.150', # nickel.wikimedia.org (ganglia) -'208.80.154.53', # uranium.wikimedia.org (ganglia) ], } } -- To view, visit https://gerrit.wikimedia.org/r/168968 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7a2865fe5e5ae8179e6dd81a3f4269f131d2d94f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [IMPROV] Check version via 2 or == 2 - change (pywikibot/core)
XZise has uploaded a new change for review. https://gerrit.wikimedia.org/r/168969 Change subject: [IMPROV] Check version via 2 or == 2 .. [IMPROV] Check version via 2 or == 2 This unifies the Python version check. Instead of different kind of checks ( 2, == 3, = 3 or == 2, 3, = 2) this always uses the first variant ( 2 and == 2) and if it's like a switch it always does the Python 3 specific code first and the Python 2 specific code in the else branch. Change-Id: I826fd50b7343ff5f6e775936957cdbb5e18cd40f --- M generate_family_file.py M pwb.py M pywikibot/__init__.py M pywikibot/comms/http.py M pywikibot/comms/threadedhttp.py M pywikibot/data/wikidataquery.py M pywikibot/family.py M pywikibot/i18n.py M pywikibot/page.py M pywikibot/textlib.py M pywikibot/tools.py M pywikibot/userinterfaces/terminal_interface_base.py M pywikibot/weblib.py M tests/aspects.py M tests/http_tests.py M tests/weblib_tests.py 16 files changed, 62 insertions(+), 68 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/69/168969/1 diff --git a/generate_family_file.py b/generate_family_file.py index 78e663f..f98de19 100644 --- a/generate_family_file.py +++ b/generate_family_file.py @@ -21,19 +21,20 @@ import codecs from collections import defaultdict from distutils.version import LooseVersion as V - -if sys.version_info[0] == 3: -raw_input = input +import json # creating retrieving urls -if sys.version_info[0] == 2: -from urlparse import urlparse, urljoin -import urllib2 -from urllib2 import HTTPError -else: +if sys.version_info[0] 2: from urllib.parse import urlparse, urljoin from urllib.error import HTTPError import urllib.request as urllib2 +from html.parser import HTMLParser +raw_input = input +else: +from urlparse import urlparse, urljoin +import urllib2 +from urllib2 import HTTPError +from HTMLParser import HTMLParser def urlopen(url): @@ -43,20 +44,13 @@ ' - https://www.mediawiki.org/wiki/Pywikibot'}) uo = urllib2.urlopen(req) try: -if sys.version_info[0] == 2: -uo.charset = uo.headers.getfirstmatchingheader('Content-Type')[0].strip().split('charset=')[1] -else: +if sys.version_info[0] 2: uo.charset = uo.headers.get_content_charset() +else: +uo.charset = uo.headers.getfirstmatchingheader('Content-Type')[0].strip().split('charset=')[1] except IndexError: uo.charset = 'latin-1' return uo - -# parsing response data -import json -if sys.version_info[0] == 2: -from HTMLParser import HTMLParser -else: -from html.parser import HTMLParser class WikiHTMLPageParser(HTMLParser): diff --git a/pwb.py b/pwb.py index 16efbca..3a53ef2 100644 --- a/pwb.py +++ b/pwb.py @@ -56,10 +56,10 @@ main_mod = imp.new_module('__main__') sys.modules['__main__'] = main_mod main_mod.__file__ = filename -if sys.version_info[0] == 2: -main_mod.__builtins__ = sys.modules['__builtin__'] -else: +if sys.version_info[0] 2: main_mod.builtins = sys.modules['builtins'] +else: +main_mod.__builtins__ = sys.modules['__builtin__'] # Set sys.argv and the first path element properly. old_argv = sys.argv diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py index d70dc86..4049558 100644 --- a/pywikibot/__init__.py +++ b/pywikibot/__init__.py @@ -16,11 +16,11 @@ import threading import json -if sys.version_info[0] == 2: -from Queue import Queue -else: +if sys.version_info[0] 3: from queue import Queue long = int +else: +from Queue import Queue # Use pywikibot. prefix for all in-package imports; this is to prevent # confusion with similarly-named modules in version 1 framework, for users diff --git a/pywikibot/comms/http.py b/pywikibot/comms/http.py index 8822c6f..ed00080 100644 --- a/pywikibot/comms/http.py +++ b/pywikibot/comms/http.py @@ -42,7 +42,14 @@ httplib2.__file__) sys.exit(1) -if sys.version_info[0] == 2: +if sys.version_info[0] 3: +from ssl import SSLError as SSLHandshakeError +SSL_CERT_VERIFY_FAILED_MSG = SSL: CERTIFICATE_VERIFY_FAILED +import queue as Queue +import urllib.parse as urlparse +from http import cookiejar as cookielib +from urllib.parse import quote +else: if 'SSLHandshakeError' in httplib2.__dict__: from httplib2 import SSLHandshakeError elif httplib2.__version__ == '0.6.0': @@ -57,13 +64,6 @@ import urlparse import cookielib from urllib2 import quote -else: -from ssl import SSLError as SSLHandshakeError -SSL_CERT_VERIFY_FAILED_MSG = SSL: CERTIFICATE_VERIFY_FAILED -import queue as Queue -import urllib.parse as urlparse -from http import cookiejar as cookielib -from urllib.parse import quote from pywikibot import config from
[MediaWiki-commits] [Gerrit] ganglia_new: remove manutius, add uranium - change (operations/puppet)
Alexandros Kosiaris has uploaded a new change for review. https://gerrit.wikimedia.org/r/168970 Change subject: ganglia_new: remove manutius, add uranium .. ganglia_new: remove manutius, add uranium Aaaarg, ganglia_new vs ganglia vs me. Change-Id: I1a53e5e202bb7e730213e726c68d5e9e68d15f8c --- M modules/ganglia_new/manifests/configuration.pp 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/70/168970/1 diff --git a/modules/ganglia_new/manifests/configuration.pp b/modules/ganglia_new/manifests/configuration.pp index 731c14b..6358ece 100644 --- a/modules/ganglia_new/manifests/configuration.pp +++ b/modules/ganglia_new/manifests/configuration.pp @@ -131,9 +131,9 @@ # It is not actually a gmetad host, but it should # be allowed to query gmond instances for use by # neon/icinga. -$gmetad_hosts = [ '208.80.152.15', '208.80.154.150', '208.80.154.14' ] +$gmetad_hosts = [ '208.80.154.53', '208.80.154.150', '208.80.154.14' ] $aggregator_hosts = { -'eqiad' = [ '208.80.152.15', '208.80.154.150' ], +'eqiad' = [ '208.80.154.53', '208.80.154.150' ], 'esams' = [ '91.198.174.113' ], 'codfw' = [ '208.80.153.4' ], } -- To view, visit https://gerrit.wikimedia.org/r/168970 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1a53e5e202bb7e730213e726c68d5e9e68d15f8c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Manual import of translations from TWN - change (apps...wikipedia)
BearND has uploaded a new change for review. https://gerrit.wikimedia.org/r/168971 Change subject: Manual import of translations from TWN .. Manual import of translations from TWN Change-Id: Iee8ca1f3bf9f0798a13d52915fca1c202776a140 --- M wikipedia/res/values-br/strings.xml M wikipedia/res/values-el/strings.xml M wikipedia/res/values-fa/strings.xml M wikipedia/res/values-he/strings.xml M wikipedia/res/values-it/strings.xml M wikipedia/res/values-ja/strings.xml A wikipedia/res/values-ka/strings.xml M wikipedia/res/values-lb/strings.xml M wikipedia/res/values-mk/strings.xml M wikipedia/res/values-mr/strings.xml M wikipedia/res/values-ms/strings.xml M wikipedia/res/values-nb/strings.xml M wikipedia/res/values-nl/strings.xml M wikipedia/res/values-qq/strings.xml M wikipedia/res/values-sv/strings.xml M wikipedia/res/values-tr/strings.xml M wikipedia/res/values-vi/strings.xml M wikipedia/res/values-yi/strings.xml M wikipedia/res/values-zh-rTW/strings.xml M wikipedia/res/values-zh/strings.xml 20 files changed, 306 insertions(+), 43 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/71/168971/1 diff --git a/wikipedia/res/values-br/strings.xml b/wikipedia/res/values-br/strings.xml index 8f96263..f3caadd 100644 --- a/wikipedia/res/values-br/strings.xml +++ b/wikipedia/res/values-br/strings.xml @@ -11,7 +11,7 @@ string name=search_hintKlask e Wikipedia/string string name=history_activity_titleIstor/string string name=nav_item_historyIstor/string - string name=error_network_error fuzzy=trueN\'haller ket tizhout ar rouedad :(/string + string name=error_network_errorN\'eus kevreadenn ebet ouzh ar rouedad :(/string string name=search_network_errorFazi rouedad : pouezañ evit klask en-dro./string string name=page_error_retryKlask en-dro/string string name=menu_clear_all_historyDiverkañ an istor/string @@ -39,9 +39,22 @@ string name=delete_selected_saved_pagesDilemel/string string name=toast_saved_page_deletedPajenn(où) enrollet dilamet/string string name=saved_pages_search_list_hintKlask/string - string name=saved_pages_search_empty_message fuzzy=trueN\'eus bet kavet pajenn ebet hag a glot gant \%s\/string + string name=saved_pages_search_empty_messageN\'eus bet kavet pajenn ebet hag a glot gant ho reked./string string name=nearby_activity_titleTostik/string string name=nav_item_nearbyTostik/string + string name=menu_update_nearbyHizivaat an elfennoù nes/string + string name=nearby_empty_titlePajenn dost ebet amañ !/string + string name=nearby_empty_messagePa vezit o tilec\'hiañ war-zu ul lec\'hiadur nevez, klaskit freskaat ar bajenn-mañ evit gouzout hiroc\'h diwar-benn ar pezh zo tro-dro deoc\'h./string + string name=nearby_distance_in_meters%d m/string + string name=nearby_distance_in_kilometers%.2f km/string + string name=nearby_distance_in_feet%d ft/string + string name=nearby_distance_in_miles%.2f mi/string + string name=nearby_no_networkKevreadenn ebet ouzh ar rouedad/string + string name=nearby_server_errorNe c\'haller ket kaout listenn al lec\'hiadurioù tostik./string + string name=nearby_no_locationNe c\'haller ket kaout al lec\'hiadur/string + string name=nearby_dialog_goto_settingsN\'eo ket gweredekaet hizivadennoù al lec\'hiadurioù war ho termenell. C\'hoant ho peus da vont war arventennoù ho termenell evit gweredekaat hizivadennoù al lec\'hiadurioù ?/string + string name=nearby_set_metricDiskwel e m/km/string + string name=nearby_set_imperialDiskwel e troatadoù/miltirioù/string string name=last_updated_textHizivadenn ziwezhañ %1$s/string string name=content_license_htmlAn endalc\'had a c\'haller kaout e lt;a href=\//creativecommons.org/licenses/by-sa/3.0/\gt;CC BY-SA 3.0lt;/agt; nemet e vefe merket ar c\'hontrol/string string name=edit_save_action_license_logged_inPa\'z enrollit e tegemerit an lt;a href=\https://wikimediafoundation.org/wiki/Terms_of_Use\gt;Amplegadoù implijoutlt;/agt;,ha lakaat a rit ho tegasadennoù dindan an aotre-implijout lt;a href=\https://creativecommons.org/licenses/by-sa/3.0/\gt;CC-BY-SA 3.0lt;/agt; en ur doare didorradus./string @@ -53,6 +66,7 @@ string name=menu_other_languagesLenn e yezhoù all/string string name=langlinks_error_retryKlask en-dro/string string name=langlinks_emptyN\'haller ket kaout ar bajenn-mañ e yezhoù all/string + string name=langlinks_no_matchN\'eus bet kavet yezh ebet a glot gant ho reked./string string name=settings_activity_titleArventennoù/string string name=langlinks_activity_titleYezhoù all/string string name=menu_save_changesEnrollañ ar c\'hemmoù/string @@ -89,7 +103,7 @@ string name=preference_summary_logoutDigevreañ diouzh ho kont Wikipedia/string string name=preference_summary_notloggedinDigevreet./string string name=toast_logout_completeDigevreet/string - string name=saved_pages_empty_title fuzzy=trueN\'eus pajenn enrollet
[MediaWiki-commits] [Gerrit] Manual import of translations from TWN - change (apps...wikipedia)
BearND has uploaded a new change for review. https://gerrit.wikimedia.org/r/168972 Change subject: Manual import of translations from TWN .. Manual import of translations from TWN Change-Id: I4714acc79c9ec5c31b6684b027bc13daa80ad362 --- A wikipedia/fy.lproj/InfoPlist.strings M wikipedia/mr.lproj/Main_iPhone.strings M wikipedia/nl.lproj/Localizable.strings M wikipedia/sk.lproj/Localizable.strings M wikipedia/zh-hans.lproj/Localizable.strings 5 files changed, 27 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/72/168972/1 diff --git a/wikipedia/fy.lproj/InfoPlist.strings b/wikipedia/fy.lproj/InfoPlist.strings new file mode 100644 index 000..862bea2 --- /dev/null +++ b/wikipedia/fy.lproj/InfoPlist.strings @@ -0,0 +1,5 @@ +// Messages for Western Frisian (Frysk) +// Exported from translatewiki.net +// Author: Robin0van0der0vliet + +CFBundleDisplayName = Wikipedy; diff --git a/wikipedia/mr.lproj/Main_iPhone.strings b/wikipedia/mr.lproj/Main_iPhone.strings index bc2f9c0..0b23148 100644 --- a/wikipedia/mr.lproj/Main_iPhone.strings +++ b/wikipedia/mr.lproj/Main_iPhone.strings @@ -1,8 +1,21 @@ // Messages for Marathi (मराठी) // Exported from translatewiki.net // Author: V.narsikar +// Author: संतोष दहिवळ -7Wa-ox-cAd.normalTitle = जतन करा; -AIA-vO-cLI.placeholder = वरील चित्रातील कॅपचा (captcha) मजकूर टाका; -P0o-I6-RDJ.normalTitle = रद्द करा; -QGI-DM-j1P.normalTitle = दुसरा कॅपचा (captcha) दाखवा; +5cT-2Y-0Ie.placeholder = सदस्य नाव; +LfM-01-aCF.text = झलक; +P6J-IE-CiO.text = पुढे जा; +PCr-0J-fBj.placeholder = परवलीचा शब्द; +UgH-77-lyp.placeholder = परवलीचा शब्द पुन्हा टाका; +W1c-wQ-1pa.text = साठवलेली पाने नाहीत!; +Wff-o9-AdH.text = सनोंद-प्रवेश; +aUp-0e-F6i.text = अलीकडील पाने येथे नाहीत.; +c3c-PU-Exz.text = खाते बनवा; +gPg-cg-Yjy.placeholder = वरील चित्रातील कॅपचा मजकूर टाका; +heA-3K-nhS.text = आपले खाते आहे? प्रवेश करा; +jiW-Cg-oL3.text = खाते बनवा; +kVb-lx-d6C.placeholder = परवलीचा शब्द; +mAk-1N-jPC.placeholder = सदस्य नाव; +rKI-nq-3p7.placeholder = विपत्र पत्ता (ऐच्छिक); +wkl-j8-wLX.text = खाते तयार करा; diff --git a/wikipedia/nl.lproj/Localizable.strings b/wikipedia/nl.lproj/Localizable.strings index 2a6a95f..d8482aa 100644 --- a/wikipedia/nl.lproj/Localizable.strings +++ b/wikipedia/nl.lproj/Localizable.strings @@ -71,7 +71,7 @@ wikitext-upload-save-terms-and-license = Door op te slaan gaat u akkoord met de $1 en worden uw bijdragen onherroepelijk vrijgegeven onder de $2-licentie.; wikitext-upload-save-terms-name = Gebruiksvoorwaarden; wikitext-upload-save-license-name = CC BY-SA 3.0; -open-link-title = Open link; +open-link-title = Koppeling openen; open-link-cancel = Annuleer; search-searching = Bezig met zoeken...; search-no-matches = Geen overeenkomsten gevonden voor de zoekterm.; @@ -126,7 +126,7 @@ navbar-title-mode-edit-wikitext-captcha = Snelle controle nodig; navbar-title-mode-edit-wikitext-summary = Beschrijf uw bewerking; navbar-title-mode-edit-wikitext-save = Opslaan; -edit-summary-choice-linked-words = Links toegevoegd; +edit-summary-choice-linked-words = Koppelingen toegevoegd; edit-summary-choice-fixed-grammar = Grammatica gecorrigeerd; edit-summary-choice-fixed-inaccuracy = Onjuistheid gecorrigeerd; edit-summary-choice-fixed-styling = Opmaak gecorrigeerd; @@ -180,7 +180,7 @@ abuse-filter-warning-subheading = Uw bewerking kan een of meer van het volgende bevatten:; abuse-filter-warning-caps = Typen in HOOFDLETTERS; abuse-filter-warning-blanking = Het leegmaken van artikelen of het plaatsen van spam; -abuse-filter-warning-irrelevant = Irrelevante externe links of afbeeldingen; +abuse-filter-warning-irrelevant = Irrelevante externe koppelingen of afbeeldingen; abuse-filter-warning-repeat = Herhlende karakters; abuse-filter-disallow-heading = U kunt deze bewerking niet opslaan. Ga terug en pas het aan.; abuse-filter-disallow-unconstructive = Een geautomatiseerd filter heeft deze bewerking gemarkeerd als onconstructief of vandalistisch.; diff --git a/wikipedia/sk.lproj/Localizable.strings b/wikipedia/sk.lproj/Localizable.strings index 15e9ead..b9deed3 100644 --- a/wikipedia/sk.lproj/Localizable.strings +++ b/wikipedia/sk.lproj/Localizable.strings @@ -7,6 +7,7 @@ article-languages-cancel = Zrušiť; article-languages-downloading = Načítam zoznam jazykov...; article-languages-filter-placeholder = Filter; +language-button-text = Tento článok si môžete prečítať v %d ďalších jazykoch; history-label = Nedávna história prehliadania; history-section-today = Dnes; history-section-yesterday = Včera; diff --git a/wikipedia/zh-hans.lproj/Localizable.strings b/wikipedia/zh-hans.lproj/Localizable.strings index 71fe517..b013d52 100644 --- a/wikipedia/zh-hans.lproj/Localizable.strings +++ b/wikipedia/zh-hans.lproj/Localizable.strings @@ -99,7 +99,7 @@ main-menu-send-feedback = 发送程序反馈; main-menu-show-page-history = $1的更改历史;
[MediaWiki-commits] [Gerrit] Update Wikidata, fix client resource module and css fix - change (mediawiki...Wikidata)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/168973 Change subject: Update Wikidata, fix client resource module and css fix .. Update Wikidata, fix client resource module and css fix Change-Id: I4782051682f3c217087bcfcd12a8942bd86cc45d --- M WikibaseClient.settings.php M WikibaseRepo.settings.php M composer.lock M extensions/Wikibase/client/resources/wikibase.client.getMwApiForRepo.js M extensions/Wikibase/client/resources/wikibase.client.linkitem.init.js M extensions/Wikibase/lib/resources/wikibase.css M vendor/composer/installed.json 7 files changed, 85 insertions(+), 84 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikidata refs/changes/73/168973/1 diff --git a/WikibaseClient.settings.php b/WikibaseClient.settings.php index 8779744..3550095 100644 --- a/WikibaseClient.settings.php +++ b/WikibaseClient.settings.php @@ -1,2 +1,2 @@ ?php -$wgWBClientSettings[sharedCacheKeyPrefix] = wikibase:WBL/1414066435; \ No newline at end of file +$wgWBClientSettings[sharedCacheKeyPrefix] = wikibase:WBL/1414423605; \ No newline at end of file diff --git a/WikibaseRepo.settings.php b/WikibaseRepo.settings.php index 987da14..83ef905 100644 --- a/WikibaseRepo.settings.php +++ b/WikibaseRepo.settings.php @@ -1,2 +1,2 @@ ?php -$wgWBRepoSettings[sharedCacheKeyPrefix] = wikibase:WBL/1414066435; \ No newline at end of file +$wgWBRepoSettings[sharedCacheKeyPrefix] = wikibase:WBL/1414423605; \ No newline at end of file diff --git a/composer.lock b/composer.lock index f70a74f..492ebc4 100644 --- a/composer.lock +++ b/composer.lock @@ -1205,7 +1205,7 @@ source: { type: git, url: https://git.wikimedia.org/git/mediawiki/extensions/Wikibase.git;, -reference: a903db86a23bdf268adaee0af4a386e49e9bbcae +reference: 6a55876fb0153ff65686d8a9c9689105256d99f8 }, require: { data-values/common: ~0.2.0, @@ -1273,7 +1273,7 @@ issues: https://bugzilla.wikimedia.org/;, irc: irc://irc.freenode.net/wikidata }, -time: 2014-10-22 20:04:23 +time: 2014-10-27 14:12:59 }, { name: wikibase/wikimedia-badges, diff --git a/extensions/Wikibase/client/resources/wikibase.client.getMwApiForRepo.js b/extensions/Wikibase/client/resources/wikibase.client.getMwApiForRepo.js index f02cc5e..6b5b9e0 100644 --- a/extensions/Wikibase/client/resources/wikibase.client.getMwApiForRepo.js +++ b/extensions/Wikibase/client/resources/wikibase.client.getMwApiForRepo.js @@ -5,7 +5,7 @@ ( function( mw, wb ) { 'use strict'; - var MODULE = wb.client; + var MODULE = wb; /** * @return {mediaWiki.Api} diff --git a/extensions/Wikibase/client/resources/wikibase.client.linkitem.init.js b/extensions/Wikibase/client/resources/wikibase.client.linkitem.init.js index 2219342..e24ef4b 100644 --- a/extensions/Wikibase/client/resources/wikibase.client.linkitem.init.js +++ b/extensions/Wikibase/client/resources/wikibase.client.linkitem.init.js @@ -31,7 +31,7 @@ $linkItemLink .show() .linkitem( { - mwApiForRepo: wikibase.client.getMwApiForRepo(), + mwApiForRepo: wikibase.getMwApiForRepo(), pageTitle: ( new mw.Title( mw.config.get( 'wgTitle' ), mw.config.get( 'wgNamespaceNumber' ) diff --git a/extensions/Wikibase/lib/resources/wikibase.css b/extensions/Wikibase/lib/resources/wikibase.css index 878b761..d77231a 100644 --- a/extensions/Wikibase/lib/resources/wikibase.css +++ b/extensions/Wikibase/lib/resources/wikibase.css @@ -60,6 +60,7 @@ margin-top: 1em; padding-left: 10px; border-bottom: none; + width: 100%; } /* entity container */ diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index fd03e40..26b2e71 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -1230,84 +1230,6 @@ ] }, { -name: wikibase/wikibase, -version: dev-wmf/1.25wmf5, -version_normalized: dev-wmf/1.25wmf5, -source: { -type: git, -url: https://git.wikimedia.org/git/mediawiki/extensions/Wikibase.git;, -reference: a903db86a23bdf268adaee0af4a386e49e9bbcae -}, -require: { -data-values/common: ~0.2.0, -data-values/data-types: ~0.4.0, -data-values/data-values: ~0.1.0, -data-values/geo: ~1.0.0, -data-values/interfaces: ~0.1.4, -data-values/javascript: ~0.6.0, -
[MediaWiki-commits] [Gerrit] ganglia_new: remove manutius, add uranium - change (operations/puppet)
Alexandros Kosiaris has submitted this change and it was merged. Change subject: ganglia_new: remove manutius, add uranium .. ganglia_new: remove manutius, add uranium Aaaarg, ganglia_new vs ganglia vs me. Change-Id: I1a53e5e202bb7e730213e726c68d5e9e68d15f8c --- M modules/ganglia_new/manifests/configuration.pp 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Alexandros Kosiaris: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ganglia_new/manifests/configuration.pp b/modules/ganglia_new/manifests/configuration.pp index 731c14b..6358ece 100644 --- a/modules/ganglia_new/manifests/configuration.pp +++ b/modules/ganglia_new/manifests/configuration.pp @@ -131,9 +131,9 @@ # It is not actually a gmetad host, but it should # be allowed to query gmond instances for use by # neon/icinga. -$gmetad_hosts = [ '208.80.152.15', '208.80.154.150', '208.80.154.14' ] +$gmetad_hosts = [ '208.80.154.53', '208.80.154.150', '208.80.154.14' ] $aggregator_hosts = { -'eqiad' = [ '208.80.152.15', '208.80.154.150' ], +'eqiad' = [ '208.80.154.53', '208.80.154.150' ], 'esams' = [ '91.198.174.113' ], 'codfw' = [ '208.80.153.4' ], } -- To view, visit https://gerrit.wikimedia.org/r/168970 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1a53e5e202bb7e730213e726c68d5e9e68d15f8c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Reenable cirrus as an alternative after the outage - change (operations/mediawiki-config)
Manybubbles has uploaded a new change for review. https://gerrit.wikimedia.org/r/168974 Change subject: Reenable cirrus as an alternative after the outage .. Reenable cirrus as an alternative after the outage I *think* this will reenable geo as well. Change-Id: I6acc4d4aa21c7e32ef444a1166b6d84487e80c82 --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/74/168974/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 7f0aa16..0934827 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -13842,9 +13842,7 @@ ), 'wmgUseCirrusAsAlternative' = array( - // 'default' = true, - // Falling back to lsearchd while Elasticsearch is freaking out. - 'default' = false, + 'default' = true, ), 'wmgCirrusSearchPreferRecentDefaultDecayPortion' = array( -- To view, visit https://gerrit.wikimedia.org/r/168974 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6acc4d4aa21c7e32ef444a1166b6d84487e80c82 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Manybubbles never...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Reenable cirrus as an alternative after the outage - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Reenable cirrus as an alternative after the outage .. Reenable cirrus as an alternative after the outage I *think* this will reenable geo as well. Change-Id: I6acc4d4aa21c7e32ef444a1166b6d84487e80c82 --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 3 deletions(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 7f0aa16..0934827 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -13842,9 +13842,7 @@ ), 'wmgUseCirrusAsAlternative' = array( - // 'default' = true, - // Falling back to lsearchd while Elasticsearch is freaking out. - 'default' = false, + 'default' = true, ), 'wmgCirrusSearchPreferRecentDefaultDecayPortion' = array( -- To view, visit https://gerrit.wikimedia.org/r/168974 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6acc4d4aa21c7e32ef444a1166b6d84487e80c82 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Manybubbles never...@wikimedia.org Gerrit-Reviewer: Chad ch...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Specifiy mountpoint for bast1001's netapp::home mount - change (operations/puppet)
Alexandros Kosiaris has uploaded a new change for review. https://gerrit.wikimedia.org/r/168975 Change subject: Specifiy mountpoint for bast1001's netapp::home mount .. Specifiy mountpoint for bast1001's netapp::home mount Forgot to add it in 83c1b2a4 Change-Id: I163abff7c9f559b60215477f4b36d15c1c271c60 --- M manifests/site.pp 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/75/168975/1 diff --git a/manifests/site.pp b/manifests/site.pp index 8687a57..b1c9121 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -356,6 +356,7 @@ include dsh include ssh::hostkeys-collect class { 'nfs::netapp::home': +mountpoint = '/srv/home_pmtpa', mount_site = 'pmtpa', } } -- To view, visit https://gerrit.wikimedia.org/r/168975 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I163abff7c9f559b60215477f4b36d15c1c271c60 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] New Wikidata build - 2014/10/27 - change (mediawiki...Wikidata)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/168976 Change subject: New Wikidata build - 2014/10/27 .. New Wikidata build - 2014/10/27 Change-Id: I6659453382dc264f4ac864d2660ec2c4116686fc --- M WikibaseClient.settings.php M WikibaseRepo.settings.php M composer.lock M extensions/Wikibase/client/i18n/ce.json M extensions/Wikibase/client/i18n/de.json M extensions/Wikibase/client/i18n/mr.json M extensions/Wikibase/client/includes/ChangeHandler.php M extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php M extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/RendererFactory.php M extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/Runner.php M extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/VariantsAwareRenderer.php M extensions/Wikibase/client/includes/LangLinkHandler.php A extensions/Wikibase/client/includes/Usage/HashUsageAccumulator.php A extensions/Wikibase/client/includes/Usage/ParserOutputUsageAccumulator.php M extensions/Wikibase/client/includes/Usage/Sql/SqlUsageTracker.php M extensions/Wikibase/client/includes/Usage/Sql/UsageTableUpdater.php A extensions/Wikibase/client/includes/Usage/UsageAccumulator.php M extensions/Wikibase/client/includes/WikibaseClient.php M extensions/Wikibase/client/includes/store/ClientStore.php M extensions/Wikibase/client/includes/store/sql/DirectSqlStore.php M extensions/Wikibase/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js M extensions/Wikibase/client/resources/wikibase.client.getMwApiForRepo.js M extensions/Wikibase/client/resources/wikibase.client.linkitem.init.js M extensions/Wikibase/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/LanguageAwareRendererTest.php M extensions/Wikibase/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/RendererFactoryTest.php M extensions/Wikibase/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/RunnerTest.php M extensions/Wikibase/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/VariantsAwareRendererTest.php M extensions/Wikibase/client/tests/phpunit/includes/LangLinkHandlerTest.php A extensions/Wikibase/client/tests/phpunit/includes/Usage/HashUsageAccumulatorTest.php A extensions/Wikibase/client/tests/phpunit/includes/Usage/ParserOutputUsageAccumulatorTest.php A extensions/Wikibase/client/tests/phpunit/includes/Usage/UsageAccumulatorContractTester.php M extensions/Wikibase/client/tests/phpunit/includes/hooks/SidebarHookHandlersTest.php M extensions/Wikibase/lib/i18n/de.json M extensions/Wikibase/lib/includes/store/EntityStore.php A extensions/Wikibase/lib/includes/store/LabelConflictFinder.php D extensions/Wikibase/lib/includes/store/TermCombinationMatchFinder.php M extensions/Wikibase/lib/includes/store/TermIndex.php M extensions/Wikibase/lib/includes/store/sql/TermSqlIndex.php M extensions/Wikibase/lib/includes/store/sql/WikiPageEntityRevisionLookup.php M extensions/Wikibase/lib/resources/Resources.php A extensions/Wikibase/lib/resources/entityChangers/AliasesChanger.js A extensions/Wikibase/lib/resources/entityChangers/ClaimsChanger.js A extensions/Wikibase/lib/resources/entityChangers/DescriptionsChanger.js A extensions/Wikibase/lib/resources/entityChangers/EntityChangersFactory.js A extensions/Wikibase/lib/resources/entityChangers/LabelsChanger.js A extensions/Wikibase/lib/resources/entityChangers/ReferencesChanger.js A extensions/Wikibase/lib/resources/entityChangers/SiteLinksChanger.js A extensions/Wikibase/lib/resources/entityChangers/namespace.js A extensions/Wikibase/lib/resources/entityChangers/resources.php M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.aliasesview.js M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.badgeselector.js M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplistview.js M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintview.js M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.labelview.js M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgrouplistview.js M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js M
[MediaWiki-commits] [Gerrit] Implement ManagerGroup::clear - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Implement ManagerGroup::clear .. Implement ManagerGroup::clear Adds a ManagerGroup helper for ObjectManager::clear to simplify clearing multiple managers. Change-Id: I04feebe2e83f9e376fe5e5a13b404ca5605ec269 --- M includes/Data/ManagerGroup.php A tests/phpunit/Data/ManagerGroupTest.php 2 files changed, 71 insertions(+), 11 deletions(-) Approvals: Matthias Mullie: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Data/ManagerGroup.php b/includes/Data/ManagerGroup.php index 4f45078..1c4f06b 100644 --- a/includes/Data/ManagerGroup.php +++ b/includes/Data/ManagerGroup.php @@ -16,9 +16,15 @@ protected $container; /** -* @var string[] Map from ObjectManager alias to container key holding that object manager. +* @var string[] Map from FQCN or short name to key in container that holds +* the relevant ObjectManager */ protected $classMap; + + /** +* @var string[] List of container keys that have been used +*/ + protected $used = array(); /** * @param Container $container @@ -31,6 +37,17 @@ } /** +* Runs ObjectManager::clear on all managers that have been accessed since +* the last clear. +*/ + public function clear() { + foreach ( array_keys( $this-used ) as $key ) { + $this-container[$key]-clear(); + } + $this-used = array(); + } + + /** * @param string $className * @return ObjectManager * @throws DataModelException @@ -39,17 +56,10 @@ if ( !isset( $this-classMap[$className] ) ) { throw new DataModelException( Request for '$className' is not in classmap: . implode( ', ', array_keys( $this-classMap ) ), 'process-data' ); } + $key = $this-classMap[$className]; + $this-used[$key] = true; - return $this-container[$this-classMap[$className]]; - } - - /** -* Purge all cached data related to this object -* -* @param object $object -*/ - public function cachePurge( $object ) { - $this-getStorage( get_class( $object ) )-cachePurge( $object ); + return $this-container[$key]; } /** diff --git a/tests/phpunit/Data/ManagerGroupTest.php b/tests/phpunit/Data/ManagerGroupTest.php new file mode 100644 index 000..83873d8 --- /dev/null +++ b/tests/phpunit/Data/ManagerGroupTest.php @@ -0,0 +1,50 @@ +?php + +namespace Flow\Tests\Data; + +use Flow\Container; +use Flow\Data\ManagerGroup; + +/** + * @group Flow + */ +class ManagerGroupTest extends \MediaWikiTestCase { + protected function mockStorage() { + $container = new Container; + foreach ( range( 'A', 'D' ) as $letter ) { + $container[$letter] = $this-getMockBuilder( 'Flow\Data\ObjectManager' ) + -disableOriginalConstructor() + -getMock(); + } + + $storage = new ManagerGroup( $container, array( + 'A' = 'A', + 'B' = 'B', + 'C' = 'C', + 'D' = 'D', + ) ); + + return array( $storage, $container ); + } + + public function testClearOnlyCallsRequestedManagers() { + list( $storage, $container ) = $this-mockStorage(); + $container['A']-expects( $this-never() )-method( 'clear' ); + $container['B']-expects( $this-once() )-method( 'clear' ); + $container['C']-expects( $this-never() )-method( 'clear' ); + $container['D']-expects( $this-never() )-method( 'clear' ); + + $storage-getStorage( 'B' ); + $storage-clear(); + } + + public function testClearCallsNoManagersWhenUnused() { + list( $storage, $container ) = $this-mockStorage(); + $container['A']-expects( $this-never() )-method( 'clear' ); + $container['B']-expects( $this-never() )-method( 'clear' ); + $container['C']-expects( $this-never() )-method( 'clear' ); + $container['D']-expects( $this-never() )-method( 'clear' ); + + $storage-clear(); + } +} -- To view, visit https://gerrit.wikimedia.org/r/167638 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I04feebe2e83f9e376fe5e5a13b404ca5605ec269 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: EBernhardson ebernhard...@wikimedia.org Gerrit-Reviewer: Matthias Mullie mmul...@wikimedia.org
[MediaWiki-commits] [Gerrit] Specifiy mountpoint for bast1001's netapp::home mount - change (operations/puppet)
Alexandros Kosiaris has submitted this change and it was merged. Change subject: Specifiy mountpoint for bast1001's netapp::home mount .. Specifiy mountpoint for bast1001's netapp::home mount Forgot to add it in 83c1b2a4 Change-Id: I163abff7c9f559b60215477f4b36d15c1c271c60 --- M manifests/site.pp 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Alexandros Kosiaris: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/site.pp b/manifests/site.pp index 8687a57..b1c9121 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -356,6 +356,7 @@ include dsh include ssh::hostkeys-collect class { 'nfs::netapp::home': +mountpoint = '/srv/home_pmtpa', mount_site = 'pmtpa', } } -- To view, visit https://gerrit.wikimedia.org/r/168975 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I163abff7c9f559b60215477f4b36d15c1c271c60 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Bump src to b24cae82 for deploy - change (mediawiki...deploy)
Subramanya Sastry has uploaded a new change for review. https://gerrit.wikimedia.org/r/168977 Change subject: Bump src to b24cae82 for deploy .. Bump src to b24cae82 for deploy Change-Id: Iff47c8ab04aedb232b94836fadc0f8163b406d31 --- M src 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid/deploy refs/changes/77/168977/1 diff --git a/src b/src index 2a8dc85..b24cae8 16 --- a/src +++ b/src -Subproject commit 2a8dc85ce676391acd8c6255c4f94250612c9ee2 +Subproject commit b24cae8200e9c660cae14d3ed8fa239c20a40441 -- To view, visit https://gerrit.wikimedia.org/r/168977 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iff47c8ab04aedb232b94836fadc0f8163b406d31 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid/deploy Gerrit-Branch: master Gerrit-Owner: Subramanya Sastry ssas...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] salt check: crit if over 4 processes - change (operations/puppet)
ArielGlenn has uploaded a new change for review. https://gerrit.wikimedia.org/r/168978 Change subject: salt check: crit if over 4 processes .. salt check: crit if over 4 processes this lets minion plus checker plus a couple other jobs be running without inflicting mass whine; til we igure out a surefire way to test if there are two minions actually responding Change-Id: I0b71528e0bf3ee34c007b8043cc2f4049c834954 --- M modules/base/manifests/monitoring/host.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/78/168978/1 diff --git a/modules/base/manifests/monitoring/host.pp b/modules/base/manifests/monitoring/host.pp index 34ff53e..7ec0748 100644 --- a/modules/base/manifests/monitoring/host.pp +++ b/modules/base/manifests/monitoring/host.pp @@ -128,6 +128,6 @@ } nrpe::monitor_service { 'check_salt_minion': description = 'check if salt-minion is running', -nrpe_command = /usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:2 --ereg-argument-array '^/usr/bin/python /usr/bin/salt-minion', +nrpe_command = /usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:4 --ereg-argument-array '^/usr/bin/python /usr/bin/salt-minion', } } -- To view, visit https://gerrit.wikimedia.org/r/168978 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0b71528e0bf3ee34c007b8043cc2f4049c834954 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: ArielGlenn ar...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Limit Echo mentions to 20 users - change (mediawiki...Echo)
jenkins-bot has submitted this change and it was merged. Change subject: Limit Echo mentions to 20 users .. Limit Echo mentions to 20 users Bug: 50082 Change-Id: I7eb0f41fc9b0e3a396383a1adaecf51dc883217f --- M includes/DiscussionParser.php 1 file changed, 4 insertions(+), 3 deletions(-) Approvals: Matthias Mullie: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/DiscussionParser.php b/includes/DiscussionParser.php index 381b395..cbd2f5b 100644 --- a/includes/DiscussionParser.php +++ b/includes/DiscussionParser.php @@ -174,9 +174,10 @@ } $mentionedUsers[$user-getId()] = $user-getId(); $count++; - // This is an unbounded list, put a cap on the allowable mentioned user list - if ( $count 100 ) { - break; + // If more than 20 users are being pinged this is likely a spam/attack vector + // Don't send any mention notifications. + if ( $count 20 ) { + return; } } -- To view, visit https://gerrit.wikimedia.org/r/159800 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7eb0f41fc9b0e3a396383a1adaecf51dc883217f Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: EBernhardson ebernhard...@wikimedia.org Gerrit-Reviewer: Matthias Mullie mmul...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Improve squidline regex - change (wikimedia...DjangoBannerStats)
Awight has submitted this change and it was merged. Change subject: Improve squidline regex .. Improve squidline regex Use \t as a field separator and [^\t] for most content. Change-Id: I2fa535791c1706506810782947f538061122b76e --- M fundraiser/analytics/regex.py 1 file changed, 27 insertions(+), 27 deletions(-) Approvals: Ejegg: Looks good to me, approved Awight: Verified; Looks good to me, approved diff --git a/fundraiser/analytics/regex.py b/fundraiser/analytics/regex.py index 5a0fca3..3dc4e7c 100644 --- a/fundraiser/analytics/regex.py +++ b/fundraiser/analytics/regex.py @@ -4,36 +4,36 @@ squidline = re.compile( r ^(?Psquid[\S]+) # Name of the squid server -\s[-]* +\t[-]* (?Psequence[0-9]+) # Sequence ID from the squid server -\s +\t (?Ptimestamp[0-9-]+T[0-9:.]+) # Timestamp -\s +\t (?Pservicetime[0-9.]+) # Request service time -\s -(?Pclient[\S]+) # Client IP address -\s -(?Psquidstatus[\S]+) # Squid request status and HTTP status code -\s -(?Preply[0-9|-]+) # Reply size including HTTP headers -\s -(?Prequest[\S]+) # Request type -\s -(?Purl[\S]+) # Request URL -\s -(?Psquidhierarchy[\S]+) # Squid hierarchy status, peer IP -\s -(?Pmime[\S]+) # MIME content type -\s -(?Preferrer[\S]+) # Referer header -\s -(?Pxff[\S]+)? # X-Forwarded-For header -\s -(?Puseragent[\S\s]+) # User-Agent header -\s -(?Pacceptlanguage[\S\s]+) # Accept-Language header -\s -(?Pxcarrier[\S\s]+)$ # X-carrier header +\t +(?Pclient[^\t]+) # Client IP address +\t +(?Psquidstatus[^\t]+) # Squid request status and HTTP status code +\t +(?Preply[0-9-]+) # Reply size including HTTP headers +\t +(?Prequest[^\t]+) # Request type +\t +(?Purl[^\t]+) # Request URL +\t +(?Psquidhierarchy[^\t]+) # Squid hierarchy status, peer IP +\t +(?Pmime[^\t]+) # MIME content type +\t +(?Preferrer[^\t]+) # Referer header +\t +(?Pxff[^\t]+)? # X-Forwarded-For header +\t +(?Puseragent[^\t]+) # User-Agent header +\t +(?Pacceptlanguage[^\t]+) # Accept-Language header +\t +(?Pxcarrier[^\t]+)$ # X-carrier header , re.VERBOSE ) -- To view, visit https://gerrit.wikimedia.org/r/168932 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2fa535791c1706506810782947f538061122b76e Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/tools/DjangoBannerStats Gerrit-Branch: master Gerrit-Owner: AndyRussG andrew.green...@gmail.com Gerrit-Reviewer: AndyRussG andrew.green...@gmail.com Gerrit-Reviewer: Awight awi...@wikimedia.org Gerrit-Reviewer: Ejegg eeggles...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] salt check: crit if over 4 processes - change (operations/puppet)
ArielGlenn has submitted this change and it was merged. Change subject: salt check: crit if over 4 processes .. salt check: crit if over 4 processes this lets minion plus checker plus a couple other jobs be running without inflicting mass whine; til we figure out a surefire way to test if there are two minions actually responding. Change-Id: I0b71528e0bf3ee34c007b8043cc2f4049c834954 --- M modules/base/manifests/monitoring/host.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: ArielGlenn: Looks good to me, approved Faidon Liambotis: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/base/manifests/monitoring/host.pp b/modules/base/manifests/monitoring/host.pp index 34ff53e..7ec0748 100644 --- a/modules/base/manifests/monitoring/host.pp +++ b/modules/base/manifests/monitoring/host.pp @@ -128,6 +128,6 @@ } nrpe::monitor_service { 'check_salt_minion': description = 'check if salt-minion is running', -nrpe_command = /usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:2 --ereg-argument-array '^/usr/bin/python /usr/bin/salt-minion', +nrpe_command = /usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:4 --ereg-argument-array '^/usr/bin/python /usr/bin/salt-minion', } } -- To view, visit https://gerrit.wikimedia.org/r/168978 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0b71528e0bf3ee34c007b8043cc2f4049c834954 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: ArielGlenn ar...@wikimedia.org Gerrit-Reviewer: ArielGlenn ar...@wikimedia.org Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] QA: update thank test - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: QA: update thank test .. QA: update thank test * run in the builds * simplify steps without changing function * clarify object being used in FlowPage page object Change-Id: Ia5ea726f8a9e8175d22b89c498f1a39903d0679a --- M tests/browser/features/step_definitions/thank_steps.rb M tests/browser/features/thank.feature 2 files changed, 8 insertions(+), 12 deletions(-) Approvals: Zfilipin: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/browser/features/step_definitions/thank_steps.rb b/tests/browser/features/step_definitions/thank_steps.rb index 6676e86..08bbe79 100644 --- a/tests/browser/features/step_definitions/thank_steps.rb +++ b/tests/browser/features/step_definitions/thank_steps.rb @@ -22,19 +22,16 @@ end When(/^I see a Thank button$/) do - # Carry on with the test per normal if the element is present. - on(FlowPage).thank_button_element.should be_visible - @target_container = on(FlowPage).thank_button_element.parent + on(FlowPage).thank_button_element.when_present end Then(/^I should not see a Thank button$/) do - on(FlowPage).thank_button_element.should_not exist -end - -Then(/^I should not see the Thank button for that post$/) do - on(FlowPage).thank_button_element.should_not exist + expect(on(FlowPage).thank_button_element).not_to be_visible end Then(/^I should see the Thank button be replaced with Thanked button$/) do - @target_container.span_element(class: 'mw-thanks-flow-thanked').when_visible + on(FlowPage) do |page| +expect(page.thanked_button_element.when_present).to be_visible +expect(page.thank_button_element).not_to be_visible + end end diff --git a/tests/browser/features/thank.feature b/tests/browser/features/thank.feature index f194a9e..4dc0149 100644 --- a/tests/browser/features/thank.feature +++ b/tests/browser/features/thank.feature @@ -1,5 +1,4 @@ -@test2.wikipedia.org @en.wikipedia.beta.wmflabs.org @ee-prototype.wmflabs.org - +@chrome @clean @en.wikipedia.beta.wmflabs.org @firefox @internet_explorer_10 @login @test2.wikipedia.org Feature: Thank author of a Flow post Scenario: Anon does not see Thank button @@ -21,4 +20,4 @@ Given I am logged in And the Talk:Flow QA page has a new unmoderated topic created by me And I am on Flow page -Then I should not see the Thank button for that post +Then I should not see the Thank button -- To view, visit https://gerrit.wikimedia.org/r/168197 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia5ea726f8a9e8175d22b89c498f1a39903d0679a Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Cmcmahon cmcma...@wikimedia.org Gerrit-Reviewer: Cmcmahon cmcma...@wikimedia.org Gerrit-Reviewer: Dduvall dduv...@wikimedia.org Gerrit-Reviewer: SG shah...@gmail.com Gerrit-Reviewer: Spage sp...@wikimedia.org Gerrit-Reviewer: Zfilipin zfili...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] A few Search refinements. - change (apps...wikipedia)
Dbrant has uploaded a new change for review. https://gerrit.wikimedia.org/r/168979 Change subject: A few Search refinements. .. A few Search refinements. - Select all search text upon invoking the search fragment. - Scroll to top of list when search term changes. - Only save recent search term if the user clicked on a search result based on it. Change-Id: Id5af1450c7c97ab07848417eb71d61e59e6a783c --- M wikipedia/src/main/java/org/wikipedia/search/FullSearchFragment.java M wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java M wikipedia/src/main/java/org/wikipedia/search/TitleSearchFragment.java 3 files changed, 48 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/79/168979/1 diff --git a/wikipedia/src/main/java/org/wikipedia/search/FullSearchFragment.java b/wikipedia/src/main/java/org/wikipedia/search/FullSearchFragment.java index bad1e87..b62b109 100644 --- a/wikipedia/src/main/java/org/wikipedia/search/FullSearchFragment.java +++ b/wikipedia/src/main/java/org/wikipedia/search/FullSearchFragment.java @@ -195,6 +195,17 @@ getWikidataDescriptions(lastResults.getResults()); getPageThumbnails(lastResults.getResults()); } + +if (continueOffset == 0) { +// scroll to top, but post it to the message queue, because it should be done +// after the data set is updated. +searchResultsList.post(new Runnable() { +@Override +public void run() { +searchResultsList.setSelectionAfterHeaderView(); +} +}); +} } @Override diff --git a/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java b/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java index 527f794..03fddc1 100644 --- a/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java +++ b/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java @@ -25,6 +25,7 @@ import android.view.View; import android.view.ViewGroup; import android.view.inputmethod.EditorInfo; +import android.widget.EditText; import android.widget.TextView; public class SearchArticlesFragment extends Fragment { @@ -306,7 +307,6 @@ // hide ourselves searchContainerView.setVisibility(View.GONE); Utils.hideSoftKeyboard(getActivity()); -addRecentSearch(lastSearchedText); } /** @@ -349,8 +349,35 @@ // automatically trigger the showing of the corresponding search results. if (isValidQuery(lastSearchedText)) { searchView.setQuery(lastSearchedText, false); + +// automatically select all text in the search field, so that typing a new character +// will clear it by default +EditText editText = getSearchViewEditText(searchView); +if (editText != null) { +editText.selectAll(); +} } MenuItemCompat.setActionView(searchAction, searchView); +} + +/** + * Retrieve the EditText component from inside a SearchView widget, so that operations + * may be performed on the EditText, such as selecting text. + * @param parent SearchView from which to retrieve the EditText view. + * @return EditText view, or null if not found. + */ +private EditText getSearchViewEditText(ViewGroup parent) { +for (int i = 0; i parent.getChildCount(); i++) { +if (parent.getChildAt(i) instanceof EditText) { +return (EditText)parent.getChildAt(i); +} else if (parent.getChildAt(i) instanceof ViewGroup) { +EditText et = getSearchViewEditText((ViewGroup)parent.getChildAt(i)); +if (et != null) { +return et; +} +} +} +return null; } /* @@ -400,6 +427,7 @@ HistoryEntry historyEntry = new HistoryEntry(title, HistoryEntry.SOURCE_SEARCH); Utils.hideSoftKeyboard(getActivity()); closeSearch(); +addRecentSearch(lastSearchedText); app.getBus().post(new NewWikiPageNavigationEvent(title, historyEntry)); } diff --git a/wikipedia/src/main/java/org/wikipedia/search/TitleSearchFragment.java b/wikipedia/src/main/java/org/wikipedia/search/TitleSearchFragment.java index 5bf54a5..1327af0 100644 --- a/wikipedia/src/main/java/org/wikipedia/search/TitleSearchFragment.java +++ b/wikipedia/src/main/java/org/wikipedia/search/TitleSearchFragment.java @@ -278,6 +278,14 @@ if (result.size() == 0 onNoResultsListener != null) { onNoResultsListener.onNoResults(); } +
[MediaWiki-commits] [Gerrit] Tampa cleanup - delete dynamicproxy::pmtpa role - change (operations/puppet)
Andrew Bogott has submitted this change and it was merged. Change subject: Tampa cleanup - delete dynamicproxy::pmtpa role .. Tampa cleanup - delete dynamicproxy::pmtpa role pmtpa cleanup - this is not in use, the eqiad class is Change-Id: If827e4df9171f8779b58816144e12bf114e6c545 --- M manifests/role/labsproxy.pp 1 file changed, 0 insertions(+), 13 deletions(-) Approvals: Andrew Bogott: Looks good to me, approved John F. Lewis: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/manifests/role/labsproxy.pp b/manifests/role/labsproxy.pp index 437c237..8048e15 100644 --- a/manifests/role/labsproxy.pp +++ b/manifests/role/labsproxy.pp @@ -1,17 +1,4 @@ # A dynamic HTTP routing proxy, based on nginx+lua+redis -class role::dynamicproxy::pmtpa { -install_certificate{ 'star.wmflabs.org': -privatekey = false -} -class { '::dynamicproxy': -ssl_certificate_name = 'star.wmflabs.org', -set_xff = true, -resolver = '10.4.0.1' -} -include dynamicproxy::api -} - -# A dynamic HTTP routing proxy, based on nginx+lua+redis class role::dynamicproxy::eqiad { install_certificate{ 'star.wmflabs.org': privatekey = false -- To view, visit https://gerrit.wikimedia.org/r/168729 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If827e4df9171f8779b58816144e12bf114e6c545 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn dz...@wikimedia.org Gerrit-Reviewer: Andrew Bogott abog...@wikimedia.org Gerrit-Reviewer: John F. Lewis johnflewi...@gmail.com Gerrit-Reviewer: Matanya mata...@foss.co.il Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: coren mpellet...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] log2dfs script - change (analytics/zero-sms)
Yurik has uploaded a new change for review. https://gerrit.wikimedia.org/r/168980 Change subject: log2dfs script .. log2dfs script Change-Id: Iec7779d7392e338410755ba19358810d02d668a0 --- M scripts/clone-xcs.hql A scripts/log2dfs.py M scripts/run-hivezero.sh 3 files changed, 273 insertions(+), 29 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/zero-sms refs/changes/80/168980/1 diff --git a/scripts/clone-xcs.hql b/scripts/clone-xcs.hql index 5e7f500..39dc43c 100644 --- a/scripts/clone-xcs.hql +++ b/scripts/clone-xcs.hql @@ -5,35 +5,41 @@ -- Clone one day worth of data to a temp table -- -- Usage: --- hive -f clone-xcs.hql -d year=2014 -d month=9 -d day=15 -d xcs=515-05 -d table=tmp_clone +-- hive -f clone-xcs.hql -d year=2014 -d month=10 -d day=11 -d hour=12 -d xcs=515-05 -d table=tmp_clone -- -- set hivevar:year=2014; -- set hivevar:month=10; --- set hivevar:day=21; +-- set hivevar:day=11; +-- set hivevar:hour=12; -- set hivevar:xcs=515-05; -- set hivevar:table=tmp_clone; use yurik; CREATE TABLE IF NOT EXISTS ${table} ( - hostname string, - sequence bigint, - dt string, - time_firstbyte float, - ip string, - cache_status string, - http_status string, - response_size bigint, - http_method string, - uri_host string, - uri_path string, - uri_query string, - content_type string, - referer string, - x_forwarded_for string, - user_agent string, - accept_language string, - x_analytics string) + `hostname` string, + `sequence` bigint, + `dt` string, + `time_firstbyte` float, + `ip` string, + `cache_status` string, + `http_status` string, + `response_size` bigint, + `http_method` string, + `uri_host` string, + `uri_path` string, + `uri_query` string, + `content_type` string, + `referer` string, + `x_forwarded_for` string, + `user_agent` string, + `accept_language` string, + `x_analytics` string, + `webrequest_source` string, + `year` int, + `month` int, + `day` int, + `hour` int) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t'; @@ -47,6 +53,7 @@ AND year=${year} AND month=${month} AND day=${day} +AND hour=${hour} AND x_analytics LIKE '%zero=%' AND SUBSTR(uri_path, 1, 6) = '/wiki/' AND ( @@ -65,5 +72,5 @@ AND http_status NOT IN ( '301', '302', '303' ) AND uri_host RLIKE '^[A-Za-z0-9-]+(\\.(zero|m))?\\.[a-z]*\\.org$' AND NOT (SPLIT(TRANSLATE(SUBSTR(uri_path, 7), ' ', '_'), '#')[0] RLIKE '^[Uu]ndefined$') -AND regexp_extract(x_analytics, 'zero=([^\;]+)') = ${xcs} - +AND regexp_extract(x_analytics, 'zero=([^\;]+)') = '${xcs}' +; diff --git a/scripts/log2dfs.py b/scripts/log2dfs.py new file mode 100644 index 000..4050b46 --- /dev/null +++ b/scripts/log2dfs.py @@ -0,0 +1,236 @@ +# coding=utf-8 +import gzip +import re + +try: +from urllib.parse import unquote +except ImportError: +from urllib import unquote + +from logprocessor import * + + +columnHdrCache = u'date,type,xcs,via,ipset,https,lang,subdomain,site,count'.split(',') +columnHdrResult = u'date,type,xcs,via,ipset,https,lang,subdomain,site,iszero,ison,count'.split(',') +validSubDomains = {'m', 'zero', 'mobile', 'wap'} +validHttpCode = {'200', '304'} + + +def isValidInt(val): +try: +int(val) +return True +except ValueError: +return False + + +xcsFromName = { +'celcom-malaysia': '502-13', +'dialog-sri-lanka': '413-02', +'digi-malaysia': '502-16', +'dtac-thailand': '520-18', +'grameenphone-bangladesh': '470-01', +'hello-cambodia': '456-02', +'orange-botswana': '652-02', +'orange-cameroon': '624-02', +'orange-congo': '630-86', +'orange-ivory-coast': '612-03', +'orange-kenya': '639-07', # Also 639-02 (Safaricom Kenya) +'orange-morocco': '604-00', +'orange-niger': '614-04', +'orange-tunesia': '605-01', # Also 639-02 (Safaricom Kenya) +'orange-uganda': '641-14', +'saudi-telecom': '420-01', # Also 652-02 (orange-botswana) +'tata-india': '405-029', +'telenor-montenegro': '297-01', # Also 250-99 (beeline ru) +'tim-brasil': '724-02', +'vodaphone-india': '404-01', +'xl-axiata-indonesia': '510-11', +} + +httpStatuses = { +'-': '', +'hit': 'hit', +'miss': 'miss', +'pass': 'pass', +'TCP_CLIENT_REFRESH_MISS': 'miss', +'TCP_MEM_HIT': 'hit', +'TCP_MISS': 'miss', +'TCP_REFRESH_HIT': 'hit', +'FAKE_CACHE_STATUS': '', +'TCP_HIT': 'hit', +'TCP_IMS_HIT': 'hit', +'TCP_DENIED': '', +'TCP_REFRESH_MISS': 'miss', +'TCP_NEGATIVE_HIT': 'hit', +} + + +class LogConverter(LogProcessor): +def __init__(self, settingsFile='settings/log2dfs.json'): +super(LogConverter, self).__init__(settingsFile, 'w2h') + +self.logFileRe = re.compile(r'\d\d\d\d\d\d\d\d') +self.dateRe =
[MediaWiki-commits] [Gerrit] New Wikidata build - 2014/10/27 - change (mediawiki...Wikidata)
jenkins-bot has submitted this change and it was merged. Change subject: New Wikidata build - 2014/10/27 .. New Wikidata build - 2014/10/27 Change-Id: I6659453382dc264f4ac864d2660ec2c4116686fc --- M WikibaseClient.settings.php M WikibaseRepo.settings.php M composer.lock M extensions/Wikibase/client/i18n/ce.json M extensions/Wikibase/client/i18n/de.json M extensions/Wikibase/client/i18n/mr.json M extensions/Wikibase/client/includes/ChangeHandler.php M extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php M extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/RendererFactory.php M extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/Runner.php M extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/VariantsAwareRenderer.php M extensions/Wikibase/client/includes/LangLinkHandler.php A extensions/Wikibase/client/includes/Usage/HashUsageAccumulator.php A extensions/Wikibase/client/includes/Usage/ParserOutputUsageAccumulator.php M extensions/Wikibase/client/includes/Usage/Sql/SqlUsageTracker.php M extensions/Wikibase/client/includes/Usage/Sql/UsageTableUpdater.php A extensions/Wikibase/client/includes/Usage/UsageAccumulator.php M extensions/Wikibase/client/includes/WikibaseClient.php M extensions/Wikibase/client/includes/store/ClientStore.php M extensions/Wikibase/client/includes/store/sql/DirectSqlStore.php M extensions/Wikibase/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js M extensions/Wikibase/client/resources/wikibase.client.getMwApiForRepo.js M extensions/Wikibase/client/resources/wikibase.client.linkitem.init.js M extensions/Wikibase/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/LanguageAwareRendererTest.php M extensions/Wikibase/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/RendererFactoryTest.php M extensions/Wikibase/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/RunnerTest.php M extensions/Wikibase/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/VariantsAwareRendererTest.php M extensions/Wikibase/client/tests/phpunit/includes/LangLinkHandlerTest.php A extensions/Wikibase/client/tests/phpunit/includes/Usage/HashUsageAccumulatorTest.php A extensions/Wikibase/client/tests/phpunit/includes/Usage/ParserOutputUsageAccumulatorTest.php A extensions/Wikibase/client/tests/phpunit/includes/Usage/UsageAccumulatorContractTester.php M extensions/Wikibase/client/tests/phpunit/includes/hooks/SidebarHookHandlersTest.php M extensions/Wikibase/lib/i18n/de.json M extensions/Wikibase/lib/includes/store/EntityStore.php A extensions/Wikibase/lib/includes/store/LabelConflictFinder.php D extensions/Wikibase/lib/includes/store/TermCombinationMatchFinder.php M extensions/Wikibase/lib/includes/store/TermIndex.php M extensions/Wikibase/lib/includes/store/sql/TermSqlIndex.php M extensions/Wikibase/lib/includes/store/sql/WikiPageEntityRevisionLookup.php M extensions/Wikibase/lib/resources/Resources.php A extensions/Wikibase/lib/resources/entityChangers/AliasesChanger.js A extensions/Wikibase/lib/resources/entityChangers/ClaimsChanger.js A extensions/Wikibase/lib/resources/entityChangers/DescriptionsChanger.js A extensions/Wikibase/lib/resources/entityChangers/EntityChangersFactory.js A extensions/Wikibase/lib/resources/entityChangers/LabelsChanger.js A extensions/Wikibase/lib/resources/entityChangers/ReferencesChanger.js A extensions/Wikibase/lib/resources/entityChangers/SiteLinksChanger.js A extensions/Wikibase/lib/resources/entityChangers/namespace.js A extensions/Wikibase/lib/resources/entityChangers/resources.php M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.aliasesview.js M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.badgeselector.js M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplistview.js M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintview.js M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.labelview.js M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgrouplistview.js M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js M
[MediaWiki-commits] [Gerrit] Update Wikidata, fix client resource module and css fix - change (mediawiki...Wikidata)
jenkins-bot has submitted this change and it was merged. Change subject: Update Wikidata, fix client resource module and css fix .. Update Wikidata, fix client resource module and css fix Change-Id: I4782051682f3c217087bcfcd12a8942bd86cc45d --- M WikibaseClient.settings.php M WikibaseRepo.settings.php M composer.lock M extensions/Wikibase/client/resources/wikibase.client.getMwApiForRepo.js M extensions/Wikibase/client/resources/wikibase.client.linkitem.init.js M extensions/Wikibase/lib/resources/wikibase.css M vendor/composer/installed.json 7 files changed, 85 insertions(+), 84 deletions(-) Approvals: Aude: Looks good to me, approved jenkins-bot: Verified diff --git a/WikibaseClient.settings.php b/WikibaseClient.settings.php index 8779744..3550095 100644 --- a/WikibaseClient.settings.php +++ b/WikibaseClient.settings.php @@ -1,2 +1,2 @@ ?php -$wgWBClientSettings[sharedCacheKeyPrefix] = wikibase:WBL/1414066435; \ No newline at end of file +$wgWBClientSettings[sharedCacheKeyPrefix] = wikibase:WBL/1414423605; \ No newline at end of file diff --git a/WikibaseRepo.settings.php b/WikibaseRepo.settings.php index 987da14..83ef905 100644 --- a/WikibaseRepo.settings.php +++ b/WikibaseRepo.settings.php @@ -1,2 +1,2 @@ ?php -$wgWBRepoSettings[sharedCacheKeyPrefix] = wikibase:WBL/1414066435; \ No newline at end of file +$wgWBRepoSettings[sharedCacheKeyPrefix] = wikibase:WBL/1414423605; \ No newline at end of file diff --git a/composer.lock b/composer.lock index f70a74f..492ebc4 100644 --- a/composer.lock +++ b/composer.lock @@ -1205,7 +1205,7 @@ source: { type: git, url: https://git.wikimedia.org/git/mediawiki/extensions/Wikibase.git;, -reference: a903db86a23bdf268adaee0af4a386e49e9bbcae +reference: 6a55876fb0153ff65686d8a9c9689105256d99f8 }, require: { data-values/common: ~0.2.0, @@ -1273,7 +1273,7 @@ issues: https://bugzilla.wikimedia.org/;, irc: irc://irc.freenode.net/wikidata }, -time: 2014-10-22 20:04:23 +time: 2014-10-27 14:12:59 }, { name: wikibase/wikimedia-badges, diff --git a/extensions/Wikibase/client/resources/wikibase.client.getMwApiForRepo.js b/extensions/Wikibase/client/resources/wikibase.client.getMwApiForRepo.js index f02cc5e..6b5b9e0 100644 --- a/extensions/Wikibase/client/resources/wikibase.client.getMwApiForRepo.js +++ b/extensions/Wikibase/client/resources/wikibase.client.getMwApiForRepo.js @@ -5,7 +5,7 @@ ( function( mw, wb ) { 'use strict'; - var MODULE = wb.client; + var MODULE = wb; /** * @return {mediaWiki.Api} diff --git a/extensions/Wikibase/client/resources/wikibase.client.linkitem.init.js b/extensions/Wikibase/client/resources/wikibase.client.linkitem.init.js index 2219342..e24ef4b 100644 --- a/extensions/Wikibase/client/resources/wikibase.client.linkitem.init.js +++ b/extensions/Wikibase/client/resources/wikibase.client.linkitem.init.js @@ -31,7 +31,7 @@ $linkItemLink .show() .linkitem( { - mwApiForRepo: wikibase.client.getMwApiForRepo(), + mwApiForRepo: wikibase.getMwApiForRepo(), pageTitle: ( new mw.Title( mw.config.get( 'wgTitle' ), mw.config.get( 'wgNamespaceNumber' ) diff --git a/extensions/Wikibase/lib/resources/wikibase.css b/extensions/Wikibase/lib/resources/wikibase.css index 878b761..d77231a 100644 --- a/extensions/Wikibase/lib/resources/wikibase.css +++ b/extensions/Wikibase/lib/resources/wikibase.css @@ -60,6 +60,7 @@ margin-top: 1em; padding-left: 10px; border-bottom: none; + width: 100%; } /* entity container */ diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index fd03e40..26b2e71 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -1230,84 +1230,6 @@ ] }, { -name: wikibase/wikibase, -version: dev-wmf/1.25wmf5, -version_normalized: dev-wmf/1.25wmf5, -source: { -type: git, -url: https://git.wikimedia.org/git/mediawiki/extensions/Wikibase.git;, -reference: a903db86a23bdf268adaee0af4a386e49e9bbcae -}, -require: { -data-values/common: ~0.2.0, -data-values/data-types: ~0.4.0, -data-values/data-values: ~0.1.0, -data-values/geo: ~1.0.0, -data-values/interfaces: ~0.1.4, -data-values/javascript: ~0.6.0, -data-values/number: ~0.4.0, -