[MediaWiki-commits] [Gerrit] operations...redactatron[master]: Drop files: Migrated for automatic deployment to the puppet ...
Jcrespo has uploaded a new change for review. https://gerrit.wikimedia.org/r/324218 Change subject: Drop files: Migrated for automatic deployment to the puppet repo .. Drop files: Migrated for automatic deployment to the puppet repo * redact_standard_output.sh has been migrated to operations-puppet: modules/role/files/mariadb/redact_sanitarium.sh * cols.txt has been migrated to operations-puppet:modules/role/ files/mariadb/filtered_tables.txt * redact_centralauth.sh functionality has been integrated into the 2 above files Delete from here to avoid missunderstandings. Change-Id: I9fdbe7dacaa4ee1dd07b64e1cdfbc4e01d9986bb --- D scripts/cols.txt D scripts/redact_standard_output.sh 2 files changed, 0 insertions(+), 789 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/software/redactatron refs/changes/18/324218/1 diff --git a/scripts/cols.txt b/scripts/cols.txt deleted file mode 100644 index 0021c2f..000 --- a/scripts/cols.txt +++ /dev/null @@ -1,706 +0,0 @@ -abuse_filter,af_id,K -abuse_filter,af_pattern,K -abuse_filter,af_user,K -abuse_filter,af_user_text,K -abuse_filter,af_timestamp,K -abuse_filter,af_enabled,K -abuse_filter,af_comments,K -abuse_filter,af_public_comments,K -abuse_filter,af_hidden,K -abuse_filter,af_hit_count,K -abuse_filter,af_throttled,K -abuse_filter,af_deleted,K -abuse_filter,af_actions,K -abuse_filter,af_global,K -abuse_filter,af_group,K -abuse_filter_action,afa_filter,K -abuse_filter_action,afa_consequence,K -abuse_filter_action,afa_parameters,K -abuse_filter_history,afh_id,K -abuse_filter_history,afh_filter,K -abuse_filter_history,afh_user,K -abuse_filter_history,afh_user_text,K -abuse_filter_history,afh_timestamp,K -abuse_filter_history,afh_pattern,K -abuse_filter_history,afh_comments,K -abuse_filter_history,afh_flags,K -abuse_filter_history,afh_public_comments,K -abuse_filter_history,afh_actions,K -abuse_filter_history,afh_deleted,K -abuse_filter_history,afh_changed_fields,K -abuse_filter_history,afh_group,K -abuse_filter_log,afl_id,K -abuse_filter_log,afl_filter,K -abuse_filter_log,afl_user,K -abuse_filter_log,afl_user_text,K -abuse_filter_log,afl_ip,F -abuse_filter_log,afl_action,K -abuse_filter_log,afl_actions,K -abuse_filter_log,afl_var_dump,K -abuse_filter_log,afl_timestamp,K -abuse_filter_log,afl_namespace,K -abuse_filter_log,afl_title,K -abuse_filter_log,afl_wiki,K -abuse_filter_log,afl_deleted,K -abuse_filter_log,afl_patrolled_by,K -abuse_filter_log,afl_rev_id,K -abuse_filter_log,afl_log_id,K -aft_article_answer,aa_feedback_id,K -aft_article_answer,aa_field_id,K -aft_article_answer,aa_response_rating,K -aft_article_answer,aa_response_text,K -aft_article_answer,aat_id,K -aft_article_answer,aa_response_boolean,K -aft_article_answer,aa_response_option_id,K -aft_article_answer_text,aat_id,K -aft_article_answer_text,aat_response_text,K -aft_article_feedback,af_id,K -aft_article_feedback,af_page_id,K -aft_article_feedback,af_user_id,K -aft_article_feedback,af_user_ip,F -aft_article_feedback,af_user_anon_token,K -aft_article_feedback,af_revision_id,K -aft_article_feedback,af_bucket_id,K -aft_article_feedback,af_cta_id,K -aft_article_feedback,af_link_id,K -aft_article_feedback,af_created,K -aft_article_feedback,af_abuse_count,K -aft_article_feedback,af_helpful_count,K -aft_article_feedback,af_unhelpful_count,K -aft_article_feedback,af_oversight_count,K -aft_article_feedback,af_is_deleted,K -aft_article_feedback,af_is_hidden,K -aft_article_feedback,af_net_helpfulness,K -aft_article_feedback,af_has_comment,K -aft_article_feedback,af_is_unhidden,K -aft_article_feedback,af_is_undeleted,K -aft_article_feedback,af_is_declined,K -aft_article_feedback,af_activity_count,K -aft_article_feedback,af_form_id,K -aft_article_feedback,af_experiment,K -aft_article_feedback,af_suppress_count,K -aft_article_feedback,af_last_status,K -aft_article_feedback,af_last_status_user_id,K -aft_article_feedback,af_last_status_timestamp,K -aft_article_feedback,af_is_autohide,K -aft_article_feedback,af_is_unrequested,K -aft_article_feedback,af_is_featured,K -aft_article_feedback,af_is_unfeatured,K -aft_article_feedback,af_is_resolved,K -aft_article_feedback,af_is_unresolved,K -aft_article_feedback,af_relevance_score,K -aft_article_feedback,af_relevance_sort,K -aft_article_feedback,af_last_status_notes,K -aft_article_feedback_properties,afp_feedback_id,K -aft_article_feedback_properties,afp_key,K -aft_article_feedback_properties,afp_value_int,K -aft_article_feedback_properties,afp_value_text,K -aft_article_feedback_ratings_rollup,arr_page_id,K -aft_article_feedback_ratings_rollup,arr_field_id,K -aft_article_feedback_ratings_rollup,arr_total,K -aft_article_feedback_ratings_rollup,arr_count,K -aft_article_feedback_select_rollup,afsr_page_id,K -aft_article_feedback_select_rollup,afsr_option_id,K -aft_article_feedback_select_rollup,afsr_field_id,K -aft_article_feedback_select_rollup,afsr_total,K
[MediaWiki-commits] [Gerrit] mediawiki...RelatedLinks[master]: modified: SpecialRelatedLinks.php
Sleepinglion has uploaded a new change for review. https://gerrit.wikimedia.org/r/324385 Change subject: modified: SpecialRelatedLinks.php .. modified: SpecialRelatedLinks.php Change-Id: Ib33daf89f23fda8dd259e172efca82645ca19cb4 --- M SpecialRelatedLinks.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RelatedLinks refs/changes/85/324385/1 diff --git a/SpecialRelatedLinks.php b/SpecialRelatedLinks.php index 5b8ad92..3941bfa 100644 --- a/SpecialRelatedLinks.php +++ b/SpecialRelatedLinks.php @@ -121,7 +121,7 @@ $tbl_links = $dbr -> tableName('related_links'); } - $fields = array('endex', 'links_order', 'links_subject', 'links_url', 'links_enable'); + $fields = array('id', 'links_order', 'links_subject', 'links_url', 'links_enable'); $conds = array('user_id' => '', 'links_id' => $links_id); $opts = array('ORDER BY' => 'links_order'); $result = $dbr -> select($tbl_links, $fields, $conds, 'Database::select', $opts); @@ -129,7 +129,7 @@ ob_start(); ?> - + -- To view, visit https://gerrit.wikimedia.org/r/324385 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib33daf89f23fda8dd259e172efca82645ca19cb4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/RelatedLinks Gerrit-Branch: master Gerrit-Owner: Sleepinglion___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceExtensions[master]: Checklist: Add PHPUnit Tests for API functions
jenkins-bot has submitted this change and it was merged. Change subject: Checklist: Add PHPUnit Tests for API functions .. Checklist: Add PHPUnit Tests for API functions Change-Id: Ie43454bdb1d8b21ecde54254f8f96603799bebe0 --- M Checklist/Checklist.class.php M Checklist/extension.json A Checklist/tests/phpunit/BSApiChecklistAvailableOptionsStoreTest.php A Checklist/tests/phpunit/BSApiChecklistTasksTest.php A Checklist/tests/phpunit/BSApiChecklistTemplateStoreTest.php 5 files changed, 208 insertions(+), 1 deletion(-) Approvals: Robert Vogel: Looks good to me, approved jenkins-bot: Verified diff --git a/Checklist/Checklist.class.php b/Checklist/Checklist.class.php index 5ecbc62..9482bd1 100644 --- a/Checklist/Checklist.class.php +++ b/Checklist/Checklist.class.php @@ -67,6 +67,18 @@ } /** +* UnitTestsList allows registration of additional test suites to execute +* under PHPUnit. Extensions can append paths to files to the $paths array, +* and since MediaWiki 1.24, can specify paths to directories, which will +* be scanned recursively for any test case files with the suffix "Test.php". +* @param array $paths +*/ + public static function onUnitTestsList( array &$paths ) { + $paths[] = __DIR__ . '/tests/phpunit/'; + return true; + } + + /** * Hook Handler for VisualEditorConfig Hook * @param Array $aConfigStandard reference * @param Array $aConfigOverwrite reference diff --git a/Checklist/extension.json b/Checklist/extension.json index 96ca10f..1734b85 100644 --- a/Checklist/extension.json +++ b/Checklist/extension.json @@ -45,7 +45,8 @@ "BSInsertMagicAjaxGetData": "Checklist::onBSInsertMagicAjaxGetData", "VisualEditorConfig": "Checklist::onVisualEditorConfig", "BSUsageTrackerRegisterCollectors": "Checklist::onBSUsageTrackerRegisterCollectors", -"EditPage::showEditForm:initial": "Checklist::onEditPage_showEditForm_initial" +"EditPage::showEditForm:initial": "Checklist::onEditPage_showEditForm_initial", + "UnitTestsList": "Checklist::onUnitTestsList" }, "ResourceModules": { "ext.bluespice.checklist": { diff --git a/Checklist/tests/phpunit/BSApiChecklistAvailableOptionsStoreTest.php b/Checklist/tests/phpunit/BSApiChecklistAvailableOptionsStoreTest.php new file mode 100644 index 000..39663a7 --- /dev/null +++ b/Checklist/tests/phpunit/BSApiChecklistAvailableOptionsStoreTest.php @@ -0,0 +1,44 @@ +doLogin(); + } + + /** +* Anything cleanup you need to do should go here. +*/ + protected function tearDown() { + parent::tearDown(); + } + + public function testMakeData(){ + $data = $this->doApiRequest( [ + 'action' => 'bs-checklist-available-options-store' + ] ); + + $this->assertArrayHasKey( 'total', $data[0] ); + $this->assertArrayHasKey( 'results', $data[0] ); + + return $data; + } + +} diff --git a/Checklist/tests/phpunit/BSApiChecklistTasksTest.php b/Checklist/tests/phpunit/BSApiChecklistTasksTest.php new file mode 100644 index 000..60f4918 --- /dev/null +++ b/Checklist/tests/phpunit/BSApiChecklistTasksTest.php @@ -0,0 +1,104 @@ +doLogin(); + $this->insertPage( "Test", "" ); + } + + function getTokens() { + return $this->getTokenList( self::$users[ 'sysop' ] ); + } + + /** +* Anything cleanup you need to do should go here. +*/ + protected function tearDown() { + parent::tearDown(); + } + + public function testTask_doChangeCheckItem() { + $tokens = $this->getTokens(); + + $data = $this->doApiRequest( [ + 'action' => 'bs-checklist-tasks', + 'token' => $tokens[ 'edittoken' ], + 'task' => 'doChangeCheckItem', + 'taskData' => json_encode( [ + 'pos' => '1', + 'value' => 'true' + ] ), + 'context' => json_encode( ['wgTitle' => 'Test' ] ) + ] ); + + $this->assertEquals( true, $data[ 0 ][ 'success' ] ); + + return $data; + } + + public function testTask_saveOptionsList() { + $tokens = $this->getTokens(); + + $oTitle = Title::makeTitle( NS_TEMPLATE, 'Test' ); + $this->assertEquals( false, $oTitle->exists() ); + + $arrRecords = ['a', 'b', 'c' ]; + + $data = $this->doApiRequest( [ + 'action' => 'bs-checklist-tasks', + 'token' => $tokens[ 'edittoken' ], + 'task' =>
[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceExtensions[master]: Manually cherry-picked Ia64aaa3168626d3adf02b7a540ece0cd1144...
Robert Vogel has submitted this change and it was merged. Change subject: Manually cherry-picked Ia64aaa3168626d3adf02b7a540ece0cd11448d97 .. Manually cherry-picked Ia64aaa3168626d3adf02b7a540ece0cd11448d97 BSReview: Fixed accidentally return when good Status => NEEDS merge to REL1_27 and master Change-Id: I168698d8a27daf3cb2d0a70a1dc8b7a4fb02f24c --- M Review/Review.class.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Robert Vogel: Looks good to me, approved jenkins-bot: Verified diff --git a/Review/Review.class.php b/Review/Review.class.php index bfea623..b44de8f 100644 --- a/Review/Review.class.php +++ b/Review/Review.class.php @@ -1403,7 +1403,7 @@ $oStatus, )); - if( $oStatus->isOK() ) { + if( !$oStatus->isOK() ) { return $oStatus; } if ( $oReviewProcess->isFinished() === false ) { -- To view, visit https://gerrit.wikimedia.org/r/323826 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I168698d8a27daf3cb2d0a70a1dc8b7a4fb02f24c Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions Gerrit-Branch: master Gerrit-Owner: PwirthGerrit-Reviewer: Dvogel hallowelt Gerrit-Reviewer: Ljonka Gerrit-Reviewer: Mglaser Gerrit-Reviewer: Robert Vogel Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: statistics: use R from jessie-backports on jessie boxes
Yuvipanda has submitted this change and it was merged. Change subject: statistics: use R from jessie-backports on jessie boxes .. statistics: use R from jessie-backports on jessie boxes Will let us use newer R in notebook* hosts Change-Id: Ia43f62bf771774d21f911b1ba95a851f2d73af52 --- M modules/statistics/manifests/packages.pp 1 file changed, 15 insertions(+), 3 deletions(-) Approvals: Yuvipanda: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/statistics/manifests/packages.pp b/modules/statistics/manifests/packages.pp index 510a07e..7e1ccc8 100644 --- a/modules/statistics/manifests/packages.pp +++ b/modules/statistics/manifests/packages.pp @@ -90,13 +90,25 @@ 'libxt-dev' ]) -# R packages -ensure_packages([ +$r_packages = [ 'r-base', 'r-base-dev', # Needed for R packages that have to compile C++ code; see T147682 'r-cran-rmysql', 'r-recommended'# CRAN-recommended packages (e.g. MASS, Matrix, boot) -]) +] + +# Use R from Jessie Backports on jessie boxes. +if os_version('debian == jessie') { +apt::pin { $r_packages: +pin => 'release a=jessie-backports', +priority => '1001', +before => Package[$r_packages], +} +} + +package { $r_packages: +ensure => present, +} if os_version('ubuntu >= trusty') { # A lot of these packages don't exist on debian yet, -- To view, visit https://gerrit.wikimedia.org/r/324384 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia43f62bf771774d21f911b1ba95a851f2d73af52 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: YuvipandaGerrit-Reviewer: Yuvipanda Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: statistics: use R from jessie-backports on jessie boxes
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/324384 Change subject: statistics: use R from jessie-backports on jessie boxes .. statistics: use R from jessie-backports on jessie boxes Will let us use newer R in notebook* hosts Change-Id: Ia43f62bf771774d21f911b1ba95a851f2d73af52 --- M modules/statistics/manifests/packages.pp 1 file changed, 15 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/84/324384/1 diff --git a/modules/statistics/manifests/packages.pp b/modules/statistics/manifests/packages.pp index 510a07e..7e1ccc8 100644 --- a/modules/statistics/manifests/packages.pp +++ b/modules/statistics/manifests/packages.pp @@ -90,13 +90,25 @@ 'libxt-dev' ]) -# R packages -ensure_packages([ +$r_packages = [ 'r-base', 'r-base-dev', # Needed for R packages that have to compile C++ code; see T147682 'r-cran-rmysql', 'r-recommended'# CRAN-recommended packages (e.g. MASS, Matrix, boot) -]) +] + +# Use R from Jessie Backports on jessie boxes. +if os_version('debian == jessie') { +apt::pin { $r_packages: +pin => 'release a=jessie-backports', +priority => '1001', +before => Package[$r_packages], +} +} + +package { $r_packages: +ensure => present, +} if os_version('ubuntu >= trusty') { # A lot of these packages don't exist on debian yet, -- To view, visit https://gerrit.wikimedia.org/r/324384 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia43f62bf771774d21f911b1ba95a851f2d73af52 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] analytics/limn-ee-data[master]: --amend
Hjiang has uploaded a new change for review. https://gerrit.wikimedia.org/r/324383 Change subject: --amend .. --amend Change-Id: Iff5c0725537b29da42def74d3210556f4c0f65d2 --- D ee-migration-batch-1/config.yaml D ee-migration-batch-1/daily_edit.sql D ee-migration-batch-1/daily_edits_by_anon_users.sql D ee-migration-batch-1/daily_edits_by_bot.sql D ee-migration-batch-1/daily_edits_by_nonbot_reg_user.sql D ee-migration-batch-1/daily_unique_anon_users.sql D ee-migration-batch-1/daily_unique_nonbot_reg_users.sql D ee-migration-batch-1/wiki_dbs.txt D ee/wiki_dbs_ve.txt 9 files changed, 0 insertions(+), 240 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/limn-ee-data refs/changes/83/324383/1 diff --git a/ee-migration-batch-1/config.yaml b/ee-migration-batch-1/config.yaml deleted file mode 100644 index f207192..000 --- a/ee-migration-batch-1/config.yaml +++ /dev/null @@ -1,50 +0,0 @@ -databases: - mediawiki: - host: "analytics-store.eqiad.wmnet" - port: 3306 - creds_file: /a/.my.cnf.research - db: wiki_db - -defaults: -db: mediawiki - -reports: -revisions: daily_edits -granularity: days -starts: 2016-01-01 -lag: 3600 #3600s -explode_by: -wiki_db: wiki_dbs.txt - -reports: -revisions: daily_unique_anon_users -granularity: days -starts: 2016-01-01 -lag: 3600 #3600s -explode_by: -wiki_db: wiki_dbs.txt - -reports: -revisions: daily_edit_by_bot -granularity: days -starts: 2016-01-01 -lag: 3600 #3600s -explode_by: -wiki_db: wiki_dbs.txt - -reports: -revisions: daily_edits_by_nonbot_reg_users -granularity: days -starts: 2016-01-01 -lag: 3600 #3600s -explode_by: -wiki_db: wiki_dbs.txt - -reports: -revisions: daily_unique_nonbot_reg_users -granularity: days -starts: 2016-01-01 -lag: 3600 #3600s -explode_by: -wiki_db: wiki_dbs.txt - diff --git a/ee-migration-batch-1/daily_edit.sql b/ee-migration-batch-1/daily_edit.sql deleted file mode 100644 index 09a9080..000 --- a/ee-migration-batch-1/daily_edit.sql +++ /dev/null @@ -1,19 +0,0 @@ ---daily edits -select DATE('{from_timestamp}') AS date, - SUM(revisions) AS revisions -FROM ( - SELECT - COUNT(*) AS revisions - FROM {wiki_db}.revision - where - rev_timestamp >= '{from_timestamp}' AND - rev_timestamp < '{to_timestamp}' - union all - select - count(*) as revisions - from {wiki_db}.archive - where - ar_timestamp >= '{from_timestamp}' and - ar_timestamp < '{to_timestamp}' -) as all_revisions; - diff --git a/ee-migration-batch-1/daily_edits_by_anon_users.sql b/ee-migration-batch-1/daily_edits_by_anon_users.sql deleted file mode 100644 index 7499062..000 --- a/ee-migration-batch-1/daily_edits_by_anon_users.sql +++ /dev/null @@ -1,20 +0,0 @@ -SELECT -DATE('{from_timestamp}') AS date, -SUM(revisions) AS revisions -FROM ( -SELECT -COUNT(*) AS revisions -FROM {wiki_db}.revision -WHERE -rev_timestamp >= '{from_timestamp}' AND -rev_timestamp < '{to_timestamp}' AND -rev_user = 0 -UNION -SELECT -COUNT(*) AS revisions -FROM {wiki_db}.archive -WHERE -ar_timestamp >= '{from_timestamp}' AND -ar_timestamp < '{to_timestamp}'AND -ar_user = 0 -) AS user_revisions; diff --git a/ee-migration-batch-1/daily_edits_by_bot.sql b/ee-migration-batch-1/daily_edits_by_bot.sql deleted file mode 100644 index 12fec32..000 --- a/ee-migration-batch-1/daily_edits_by_bot.sql +++ /dev/null @@ -1,27 +0,0 @@ --- daily edits by bots -SELECT -DATE('{from_timestamp}') AS date, -SUM(revisions) AS revisions -FROM ( -SELECT -COUNT(*) AS revisions -FROM {wiki_db}.revision -INNER JOIN user_groups ON -ug_user = rev_user AND -ug_group = "bot" -WHERE - rev_timestamp >= '{from_timestamp}' AND - rev_timestamp < '{to_timestamp}' AND -rev_user > 0 -UNION ALL -SELECT -COUNT(*) AS revisions -FROM {wiki_db}.archive -INNER JOIN user_groups ON -ug_user = ar_user AND -ug_group = "bot" -WHERE - ar_timestamp >= '{from_timestamp}' AND - ar_timestamp < '{to_timestamp}' AND -ar_user > 0 -) AS bot_user_revisions; diff --git a/ee-migration-batch-1/daily_edits_by_nonbot_reg_user.sql b/ee-migration-batch-1/daily_edits_by_nonbot_reg_user.sql deleted file mode 100644 index cc2dc88..000 --- a/ee-migration-batch-1/daily_edits_by_nonbot_reg_user.sql +++ /dev/null @@ -1,29 +0,0 @@ --- daily edits by registered non-bot users -SELECT -DATE('{from_timestamp}') AS date, -SUM(revisions) AS revisions -FROM (
[MediaWiki-commits] [Gerrit] analytics/limn-ee-data[master]: Changed names and revised further
Hjiang has uploaded a new change for review. https://gerrit.wikimedia.org/r/324382 Change subject: Changed names and revised further .. Changed names and revised further Change-Id: I4973683d3d7daba60b13e0c03c7e688f3970f8c7 --- A ee-migration-batch-1/config.yaml A ee-migration-batch-1/daily_edit.sql A ee-migration-batch-1/daily_edits_by_anon_users.sql R ee-migration-batch-1/daily_edits_by_bot.sql R ee-migration-batch-1/daily_edits_by_nonbot_reg_user.sql R ee-migration-batch-1/daily_unique_anon_users.sql R ee-migration-batch-1/daily_unique_nonbot_reg_users.sql R ee-migration-batch-1/wiki_dbs.txt A ee-migration/config.yaml A ee-migration/daily_edits.sql A ee-migration/daily_edits_by_anon_users.sql C ee-migration/daily_edits_by_bot_users.sql C ee-migration/daily_edits_by_nonbot_reg_users.sql C ee-migration/daily_unique_anon_users.sql C ee-migration/daily_unique_nonbot_reg_users.sql C ee-migration/wiki_dbs.txt D ee/config_all.yaml 17 files changed, 206 insertions(+), 41 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/limn-ee-data refs/changes/82/324382/1 diff --git a/ee-migration-batch-1/config.yaml b/ee-migration-batch-1/config.yaml new file mode 100644 index 000..f207192 --- /dev/null +++ b/ee-migration-batch-1/config.yaml @@ -0,0 +1,50 @@ +databases: + mediawiki: + host: "analytics-store.eqiad.wmnet" + port: 3306 + creds_file: /a/.my.cnf.research + db: wiki_db + +defaults: +db: mediawiki + +reports: +revisions: daily_edits +granularity: days +starts: 2016-01-01 +lag: 3600 #3600s +explode_by: +wiki_db: wiki_dbs.txt + +reports: +revisions: daily_unique_anon_users +granularity: days +starts: 2016-01-01 +lag: 3600 #3600s +explode_by: +wiki_db: wiki_dbs.txt + +reports: +revisions: daily_edit_by_bot +granularity: days +starts: 2016-01-01 +lag: 3600 #3600s +explode_by: +wiki_db: wiki_dbs.txt + +reports: +revisions: daily_edits_by_nonbot_reg_users +granularity: days +starts: 2016-01-01 +lag: 3600 #3600s +explode_by: +wiki_db: wiki_dbs.txt + +reports: +revisions: daily_unique_nonbot_reg_users +granularity: days +starts: 2016-01-01 +lag: 3600 #3600s +explode_by: +wiki_db: wiki_dbs.txt + diff --git a/ee-migration-batch-1/daily_edit.sql b/ee-migration-batch-1/daily_edit.sql new file mode 100644 index 000..09a9080 --- /dev/null +++ b/ee-migration-batch-1/daily_edit.sql @@ -0,0 +1,19 @@ +--daily edits +select DATE('{from_timestamp}') AS date, + SUM(revisions) AS revisions +FROM ( + SELECT + COUNT(*) AS revisions + FROM {wiki_db}.revision + where + rev_timestamp >= '{from_timestamp}' AND + rev_timestamp < '{to_timestamp}' + union all + select + count(*) as revisions + from {wiki_db}.archive + where + ar_timestamp >= '{from_timestamp}' and + ar_timestamp < '{to_timestamp}' +) as all_revisions; + diff --git a/ee-migration-batch-1/daily_edits_by_anon_users.sql b/ee-migration-batch-1/daily_edits_by_anon_users.sql new file mode 100644 index 000..7499062 --- /dev/null +++ b/ee-migration-batch-1/daily_edits_by_anon_users.sql @@ -0,0 +1,20 @@ +SELECT +DATE('{from_timestamp}') AS date, +SUM(revisions) AS revisions +FROM ( +SELECT +COUNT(*) AS revisions +FROM {wiki_db}.revision +WHERE +rev_timestamp >= '{from_timestamp}' AND +rev_timestamp < '{to_timestamp}' AND +rev_user = 0 +UNION +SELECT +COUNT(*) AS revisions +FROM {wiki_db}.archive +WHERE +ar_timestamp >= '{from_timestamp}' AND +ar_timestamp < '{to_timestamp}'AND +ar_user = 0 +) AS user_revisions; diff --git a/ee/daily_edit_by_bot.sql b/ee-migration-batch-1/daily_edits_by_bot.sql similarity index 91% rename from ee/daily_edit_by_bot.sql rename to ee-migration-batch-1/daily_edits_by_bot.sql index 8eefb74..12fec32 100644 --- a/ee/daily_edit_by_bot.sql +++ b/ee-migration-batch-1/daily_edits_by_bot.sql @@ -5,7 +5,7 @@ FROM ( SELECT COUNT(*) AS revisions -FROM revision +FROM {wiki_db}.revision INNER JOIN user_groups ON ug_user = rev_user AND ug_group = "bot" @@ -16,7 +16,7 @@ UNION ALL SELECT COUNT(*) AS revisions -FROM archive +FROM {wiki_db}.archive INNER JOIN user_groups ON ug_user = ar_user AND ug_group = "bot" diff --git a/ee/daily_edits_by_nonbot_reg_user.sql b/ee-migration-batch-1/daily_edits_by_nonbot_reg_user.sql similarity index 92% rename from ee/daily_edits_by_nonbot_reg_user.sql rename to ee-migration-batch-1/daily_edits_by_nonbot_reg_user.sql index 09a4134..cc2dc88
[MediaWiki-commits] [Gerrit] mediawiki...Video[master]: Fix PHP Notice: Undefined property: Video::$historyLine in ...
jenkins-bot has submitted this change and it was merged. Change subject: Fix PHP Notice: Undefined property: Video::$historyLine in ..\extensions\Video\VideoClass.php on line 617 under MW 1.28 .. Fix PHP Notice: Undefined property: Video::$historyLine in ..\extensions\Video\VideoClass.php on line 617 under MW 1.28 Change-Id: I801a5f227edfd53f973853ed202c15107ab03350 --- M VideoClass.php 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Jack Phoenix: Looks good to me, approved jenkins-bot: Verified diff --git a/VideoClass.php b/VideoClass.php index 45f6f94..b1be28e 100644 --- a/VideoClass.php +++ b/VideoClass.php @@ -69,6 +69,11 @@ public $dataLoaded; /** +* @var Integer: history pointer, see nextHistoryLine() for details +*/ + public $historyLine; + + /** * @var IContextSource */ protected $context; -- To view, visit https://gerrit.wikimedia.org/r/324381 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I801a5f227edfd53f973853ed202c15107ab03350 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Video Gerrit-Branch: master Gerrit-Owner: Jack PhoenixGerrit-Reviewer: Jack Phoenix Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Video[master]: Fix PHP Notice: Undefined property: Video::$historyLine in ...
Jack Phoenix has uploaded a new change for review. https://gerrit.wikimedia.org/r/324381 Change subject: Fix PHP Notice: Undefined property: Video::$historyLine in ..\extensions\Video\VideoClass.php on line 617 under MW 1.28 .. Fix PHP Notice: Undefined property: Video::$historyLine in ..\extensions\Video\VideoClass.php on line 617 under MW 1.28 Change-Id: I801a5f227edfd53f973853ed202c15107ab03350 --- M VideoClass.php 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Video refs/changes/81/324381/1 diff --git a/VideoClass.php b/VideoClass.php index 45f6f94..b1be28e 100644 --- a/VideoClass.php +++ b/VideoClass.php @@ -69,6 +69,11 @@ public $dataLoaded; /** +* @var Integer: history pointer, see nextHistoryLine() for details +*/ + public $historyLine; + + /** * @var IContextSource */ protected $context; -- To view, visit https://gerrit.wikimedia.org/r/324381 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I801a5f227edfd53f973853ed202c15107ab03350 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Video Gerrit-Branch: master Gerrit-Owner: Jack Phoenix___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Fix flaky most-read spec test
jenkins-bot has submitted this change and it was merged. Change subject: Fix flaky most-read spec test .. Fix flaky most-read spec test There's a window each day when the most-read spec test will fail because yesterday's pageview data isn't populated in RESTBase yet. Check the schema against the response for the day before yesterday instead. Change-Id: I3ed6e99a21707be1b112f0ed4a35a30081a03f02 --- M test/features/app/spec.js 1 file changed, 5 insertions(+), 5 deletions(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified diff --git a/test/features/app/spec.js b/test/features/app/spec.js index 74e3f65..5f9b67d 100644 --- a/test/features/app/spec.js +++ b/test/features/app/spec.js @@ -11,9 +11,9 @@ const Ajv= require('ajv'); const date = new Date(); -const yesterday = new Date(Date.now() - dateUtil.ONE_DAY); -const dateString = date.getUTCFullYear() + '/' + dateUtil.pad(date.getUTCMonth() + 1) + '/' + dateUtil.pad(date.getUTCDate()); -const yesterdayString = yesterday.getUTCFullYear() + '/' + dateUtil.pad(yesterday.getUTCMonth() + 1) + '/' + dateUtil.pad(yesterday.getUTCDate()); +const ereyesterday = new Date(Date.now() - 2 * dateUtil.ONE_DAY); +const dateString = `${date.getUTCFullYear()}/${dateUtil.pad(date.getUTCMonth() + 1)}/${dateUtil.pad(date.getUTCDate())}`; +const ereyesterdayString = `${ereyesterday.getUTCFullYear()}/${dateUtil.pad(ereyesterday.getUTCMonth() + 1)}/${dateUtil.pad(ereyesterday.getUTCDate())}`; function staticSpecLoad() { @@ -320,8 +320,8 @@ return assertValidSchema(uri, '#/definitions/image'); }); -it('most-read response should conform to schema', function() { -const uri = server.config.uri + 'en.wikipedia.org/v1/page/most-read/' + yesterdayString; +it('most-read response should conform to schema', () => { +const uri = `${server.config.uri}en.wikipedia.org/v1/page/most-read/${ereyesterdayString}`; return assertValidSchema(uri, '#/definitions/mostread'); }); -- To view, visit https://gerrit.wikimedia.org/r/324354 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3ed6e99a21707be1b112f0ed4a35a30081a03f02 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: MhollowayGerrit-Reviewer: BearND Gerrit-Reviewer: Dbrant Gerrit-Reviewer: Fjalapeno Gerrit-Reviewer: GWicke Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Jhernandez Gerrit-Reviewer: Mhurd Gerrit-Reviewer: Mobrovac Gerrit-Reviewer: Niedzielski Gerrit-Reviewer: Ppchelko Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...PageForms[master]: "Form chooser" UI now displays most popular forms separately
Yaron Koren has submitted this change and it was merged. Change subject: "Form chooser" UI now displays most popular forms separately .. "Form chooser" UI now displays most popular forms separately Change-Id: Ia415ab00f19b241d7e07e11c83ae421e6644e778 --- M i18n/en.json M i18n/qqq.json M includes/PF_FormEditAction.php 3 files changed, 104 insertions(+), 10 deletions(-) Approvals: Yaron Koren: Looks good to me, approved jenkins-bot: Verified diff --git a/i18n/en.json b/i18n/en.json index d15d05d..5f34e44 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -147,6 +147,8 @@ "pf_formstart_createoredit": "Create or edit", "formedit": "Edit with form", "pf-formedit-selectform": "Select a form to create this page:", + "pf-formedit-mainforms": "Main forms:", + "pf-formedit-otherforms": "Other forms:", "pf-formedit-donotuseform": "Create page without a form.", "pf_formedit_createtitle": "Create $1: $2", "pf_formedit_createtitlenotarget": "Create $1", diff --git a/i18n/qqq.json b/i18n/qqq.json index d5ceebd..5dd4282 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -153,7 +153,7 @@ "pf_createclass_listofvalues": "In response the user has to tick a box deciding whether it is allowed to enter or store a list of values. No values are entered at this point.", "pf_createclass_nameinput": "Label for a text field, the form associated to the class.", "pf_createclass_missingvalues": "Error message, which appears after the user saves without all required field.", - "pf_createclass_success": "Informational message, which appears after the user succespfully filled the form.", + "pf_createclass_success": "Informational message, which appears after the user successfully filled out the form.", "pf_createclass_create": "{{Identical|Create}}", "formstart": "{{doc-special|FormStart}}", "pf_formstart_badform": "Used as error message. Parameters:\n* $1 - form name (with link)", @@ -163,6 +163,8 @@ "pf_formstart_createoredit": "Button", "formedit": "{{doc-special|FormEdit}}", "pf-formedit-selectform": "A header displayed above a group of choices for the user", + "pf-formedit-mainforms": "A header above a list of the most widely-used forms in the wiki", + "pf-formedit-otherforms": "A header above a list of the forms on the wiki that are not the most widely-used", "pf-formedit-donotuseform": "An option displayed to users as a link. Doing without a form means using the normal wiki editor/textarea, while the forms provided by this extension present a list of fields to fill in order to create a page.", "pf_formedit_createtitle": "Used as page title. Parameters:\n* $1 - the main part of the title of a page form\n* $2 - the prefixed title, with spaces for the target page\nSee also:\n* {{msg-mw|pf formedit createtitlenotarget}}\n* {{msg-mw|pf formedit edittitle}}\n{{Identical|Create}}", "pf_formedit_createtitlenotarget": "Used as page title. Parameters:\n* $1 - the main part of the title of a page form\nSee also:\n* {{msg-mw|pf formedit edittitle}}\n* {{msg-mw|pf formedit createtitle}}\n{{Identical|Create}}", diff --git a/includes/PF_FormEditAction.php b/includes/PF_FormEditAction.php index 9cd71b3..06773a3 100644 --- a/includes/PF_FormEditAction.php +++ b/includes/PF_FormEditAction.php @@ -1,7 +1,8 @@ - addHTML( Html::element( 'p', null, wfMessage( 'pf-formedit-selectform' )->text() ) ); $formNames = PFUtils::getAllForms(); + $pagesPerForm = self::getNumPagesPerForm(); + $totalPages = 0; + foreach ( $pagesPerForm as $formName => $numPages ) { + $totalPages += $numPages; + } + // We define "popular forms" as those that are used to + // edit more than 1% of the wiki's form-editable pages. + $popularForms = array(); + foreach ( $pagesPerForm as $formName => $numPages ) { + if ( $numPages > $totalPages / 100 ) { + $popularForms[] = $formName; + } + } + $otherForms = array(); + foreach( $formNames as $i => $formName ) { + if ( !in_array( $formName, $popularForms ) ) { + $otherForms[] = $formName; + } + } + $fe = SpecialPageFactory::getPage( 'FormEdit' ); + + if ( count( $popularForms ) > 0 ) { + if ( count( $otherForms ) > 0 ) { + $output->addHTML( Html::element( + 'p', + array(), + wfMessage( 'pf-formedit-mainforms' )->text() +
[MediaWiki-commits] [Gerrit] analytics/multimedia[master]: Fix CI errors
Gergő Tisza has uploaded a new change for review. https://gerrit.wikimedia.org/r/324380 Change subject: Fix CI errors .. Fix CI errors Change-Id: I2c51b5ce586b767ee47178cd66cccaf90acf94b1 --- M generate.py 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/multimedia refs/changes/80/324380/1 diff --git a/generate.py b/generate.py index 70d5399..3d338bb 100755 --- a/generate.py +++ b/generate.py @@ -76,6 +76,7 @@ f.write(sql) f.close() + if len(sys.argv) != 2: print 'Must specific a folder to send generated SQL to' sys.exit(2) @@ -93,3 +94,4 @@ if wiki != 'global': generate('optout', wiki) + -- To view, visit https://gerrit.wikimedia.org/r/324380 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2c51b5ce586b767ee47178cd66cccaf90acf94b1 Gerrit-PatchSet: 1 Gerrit-Project: analytics/multimedia Gerrit-Branch: master Gerrit-Owner: Gergő Tisza___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] analytics/multimedia[master]: Fix SQL queries
Gergő Tisza has uploaded a new change for review. https://gerrit.wikimedia.org/r/324379 Change subject: Fix SQL queries .. Fix SQL queries Update EventLogging IDs (didn't try to be intelligent about it and look at the dates - probably a lot of unions could be dropped now, but I had neither time nor care), find alternative for ImageMetrics data (which was undeployed). Not fixed: optouts (UserDailyContribs was undeployed, don't see any alternative source for user activity). perf is still empty for most wikis (but not all). Not sure what to make of that. Bug: T98449 Change-Id: I7e10ec6ae1b94158b0d1fcb804757e99aee08756 --- M build-perf-tsvs M duration/template.sql M geoperf/template.sql M pageviews/template.sql M perf/cache-miss-ratio.sql M perf/perf-by-upload-time.sql M perf/template.sql M uw-funnel/absolute.sql M uw-funnel/overview.sql M uw-funnel/relative.sql 10 files changed, 79 insertions(+), 84 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/multimedia refs/changes/79/324379/1 diff --git a/build-perf-tsvs b/build-perf-tsvs index 21dd01a..8ed5af6 100755 --- a/build-perf-tsvs +++ b/build-perf-tsvs @@ -36,7 +36,7 @@ echo "Updating cache miss ratio data..." tsvpath="$TSV_DIR/cache-miss-ratio.tsv" -$MYSQL_CMD < $CHECKOUT_DIR/perf/cache-miss-ratio.sql > $tsvpath && mv -f $tsvpath $PUBLIC_DIR/cache-miss-ratio.tsv +$MYSQL_CMD < $CHECKOUT_DIR/perf/cache-miss-ratio.sql > $tsvpath && mv -f $tsvpath $PUBLIC_DIR/media-viewer-cache-miss-ratio.tsv chmod 664 $PUBLIC_DIR/media-viewer-cache-miss-ratio.tsv echo "Updating mmv-versus-filepage perf data..." @@ -47,5 +47,5 @@ echo "Updating perf by upload time data..." tsvpath="$TSV_DIR/perf-by-upload-time.tsv" -$MYSQL_CMD < $CHECKOUT_DIR/perf/perf-by-upload-time.sql > $tsvpath && mv -f $tsvpath $PUBLIC_DIR/perf-by-upload-time.tsv -chmod 664 $PUBLIC_DIR/media-viewer-perf-by-upload-time.tsv \ No newline at end of file +$MYSQL_CMD < $CHECKOUT_DIR/perf/perf-by-upload-time.sql > $tsvpath && mv -f $tsvpath $PUBLIC_DIR/media-viewer-perf-by-upload-time.tsv +chmod 664 $PUBLIC_DIR/media-viewer-perf-by-upload-time.tsv diff --git a/duration/template.sql b/duration/template.sql index 5cc6c59..a23cde2 100644 --- a/duration/template.sql +++ b/duration/template.sql @@ -3,22 +3,24 @@ SELECT * FROM ( SELECT DATE_FORMAT(timestamp, '%Y-%m-%d') AS datestring, -SUBSTRING_INDEX(SUBSTRING_INDEX(GROUP_CONCAT(event_fullLoadingTime -ORDER BY event_fullLoadingTime SEPARATOR ','), ',', 50/100*COUNT(*)+1), ',', -1) AS filepage_loggedin_50, -SUBSTRING_INDEX(SUBSTRING_INDEX(GROUP_CONCAT(event_fullLoadingTime -ORDER BY event_fullLoadingTime SEPARATOR ','), ',', 90/100*COUNT(*)+1), ',', -1) AS filepage_loggedin_90, -SUBSTRING_INDEX(SUBSTRING_INDEX(GROUP_CONCAT(event_fullLoadingTime -ORDER BY event_fullLoadingTime SEPARATOR ','), ',', 95/100*COUNT(*)+1), ',', -1) AS filepage_loggedin_95, -SUBSTRING_INDEX(SUBSTRING_INDEX(GROUP_CONCAT(event_fullLoadingTime -ORDER BY event_fullLoadingTime SEPARATOR ','), ',', 99/100*COUNT(*)+1), ',', -1) AS filepage_loggedin_99, -SUM(event_samplingFactor) AS filepage_loggedin_population_size +SUBSTRING_INDEX(SUBSTRING_INDEX(GROUP_CONCAT(event_firstPaint +ORDER BY event_firstPaint SEPARATOR ','), ',', 50/100*COUNT(*)+1), ',', -1) AS filepage_loggedin_50, +SUBSTRING_INDEX(SUBSTRING_INDEX(GROUP_CONCAT(event_firstPaint +ORDER BY event_firstPaint SEPARATOR ','), ',', 90/100*COUNT(*)+1), ',', -1) AS filepage_loggedin_90, +SUBSTRING_INDEX(SUBSTRING_INDEX(GROUP_CONCAT(event_firstPaint +ORDER BY event_firstPaint SEPARATOR ','), ',', 95/100*COUNT(*)+1), ',', -1) AS filepage_loggedin_95, +SUBSTRING_INDEX(SUBSTRING_INDEX(GROUP_CONCAT(event_firstPaint +ORDER BY event_firstPaint SEPARATOR ','), ',', 99/100*COUNT(*)+1), ',', -1) AS filepage_loggedin_99, +SUM(1000) AS filepage_loggedin_population_size -- NavTiming sampling factor FROM -ImageMetricsLoadingTime_10078363 +NavigationTiming_15485142 WHERE %wiki% -event_navigationType = 'navigate' -AND event_fullLoadingTime IS NOT NULL +event_action = 'view' +AND event_firstPaint IS NOT NULL AND NOT event_isAnon +AND event_mobileMode IS NULL +AND event_namespaceId = 6 AND timestamp < TIMESTAMP(CURDATE()) -- do not show partial data for the current day AND timestamp > TIMESTAMP(CURDATE() - INTERVAL 90 DAY) GROUP BY @@ -26,22 +28,24 @@ ) navtiming_loggedin LEFT JOIN ( SELECT DATE_FORMAT(timestamp, '%Y-%m-%d') AS datestring, -SUBSTRING_INDEX(SUBSTRING_INDEX(GROUP_CONCAT(event_fullLoadingTime -ORDER BY event_fullLoadingTime SEPARATOR ','), ',', 50/100*COUNT(*)+1), ',', -1) AS filepage_anon_50, -
[MediaWiki-commits] [Gerrit] mediawiki...PageForms[master]: "Form chooser" UI now displays most popular forms separately
Yaron Koren has uploaded a new change for review. https://gerrit.wikimedia.org/r/324378 Change subject: "Form chooser" UI now displays most popular forms separately .. "Form chooser" UI now displays most popular forms separately Change-Id: Ia415ab00f19b241d7e07e11c83ae421e6644e778 --- M i18n/en.json M i18n/qqq.json M includes/PF_FormEditAction.php 3 files changed, 104 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageForms refs/changes/78/324378/2 diff --git a/i18n/en.json b/i18n/en.json index d15d05d..5f34e44 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -147,6 +147,8 @@ "pf_formstart_createoredit": "Create or edit", "formedit": "Edit with form", "pf-formedit-selectform": "Select a form to create this page:", + "pf-formedit-mainforms": "Main forms:", + "pf-formedit-otherforms": "Other forms:", "pf-formedit-donotuseform": "Create page without a form.", "pf_formedit_createtitle": "Create $1: $2", "pf_formedit_createtitlenotarget": "Create $1", diff --git a/i18n/qqq.json b/i18n/qqq.json index d5ceebd..8544eb6 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -153,7 +153,7 @@ "pf_createclass_listofvalues": "In response the user has to tick a box deciding whether it is allowed to enter or store a list of values. No values are entered at this point.", "pf_createclass_nameinput": "Label for a text field, the form associated to the class.", "pf_createclass_missingvalues": "Error message, which appears after the user saves without all required field.", - "pf_createclass_success": "Informational message, which appears after the user succespfully filled the form.", + "pf_createclass_success": "Informational message, which appears after the user successfully filled out the form.", "pf_createclass_create": "{{Identical|Create}}", "formstart": "{{doc-special|FormStart}}", "pf_formstart_badform": "Used as error message. Parameters:\n* $1 - form name (with link)", @@ -163,6 +163,8 @@ "pf_formstart_createoredit": "Button", "formedit": "{{doc-special|FormEdit}}", "pf-formedit-selectform": "A header displayed above a group of choices for the user", + "pf-formedit-mainforms": "A header above a list of the most widely-used forms in the wiki", ++ "pf-formedit-otherforms": "A header above a list of the forms on the wiki that are not the most widely-used", "pf-formedit-donotuseform": "An option displayed to users as a link. Doing without a form means using the normal wiki editor/textarea, while the forms provided by this extension present a list of fields to fill in order to create a page.", "pf_formedit_createtitle": "Used as page title. Parameters:\n* $1 - the main part of the title of a page form\n* $2 - the prefixed title, with spaces for the target page\nSee also:\n* {{msg-mw|pf formedit createtitlenotarget}}\n* {{msg-mw|pf formedit edittitle}}\n{{Identical|Create}}", "pf_formedit_createtitlenotarget": "Used as page title. Parameters:\n* $1 - the main part of the title of a page form\nSee also:\n* {{msg-mw|pf formedit edittitle}}\n* {{msg-mw|pf formedit createtitle}}\n{{Identical|Create}}", diff --git a/includes/PF_FormEditAction.php b/includes/PF_FormEditAction.php index 9cd71b3..06773a3 100644 --- a/includes/PF_FormEditAction.php +++ b/includes/PF_FormEditAction.php @@ -1,7 +1,8 @@ - addHTML( Html::element( 'p', null, wfMessage( 'pf-formedit-selectform' )->text() ) ); $formNames = PFUtils::getAllForms(); + $pagesPerForm = self::getNumPagesPerForm(); + $totalPages = 0; + foreach ( $pagesPerForm as $formName => $numPages ) { + $totalPages += $numPages; + } + // We define "popular forms" as those that are used to + // edit more than 1% of the wiki's form-editable pages. + $popularForms = array(); + foreach ( $pagesPerForm as $formName => $numPages ) { + if ( $numPages > $totalPages / 100 ) { + $popularForms[] = $formName; + } + } + $otherForms = array(); + foreach( $formNames as $i => $formName ) { + if ( !in_array( $formName, $popularForms ) ) { + $otherForms[] = $formName; + } + } + $fe = SpecialPageFactory::getPage( 'FormEdit' ); + + if ( count( $popularForms ) > 0 ) { + if ( count( $otherForms ) > 0 ) { + $output->addHTML( Html::element( + 'p', + array(), +
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[wmf/1.29.0-wmf.4]: Allow template editor even if parameter mapping fails comple...
KartikMistry has uploaded a new change for review. https://gerrit.wikimedia.org/r/324377 Change subject: Allow template editor even if parameter mapping fails completely .. Allow template editor even if parameter mapping fails completely If there is an equivalent template, but parameter mapping fails completely, currently no editor is shown and it is unclear to the translator why this happens. I don't see a reason not to show a template editor even in this case. Bug: T151868 Change-Id: Iada2d82357df1483b84a5b1e73b2343905e2794f (cherry picked from commit 2c5f6a2ff6c1b0f0fec8b23c49b6eb48d2ca11d9) --- M modules/tools/ext.cx.tools.template.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/77/324377/1 diff --git a/modules/tools/ext.cx.tools.template.js b/modules/tools/ext.cx.tools.template.js index aaf9fe7..f41ef30 100644 --- a/modules/tools/ext.cx.tools.template.js +++ b/modules/tools/ext.cx.tools.template.js @@ -826,7 +826,7 @@ mw.log( '[CX] None of template params were able to map for ' + self.sourceTemplate.title ); // Manually adaptable, but not automatically adaptable. self.status = 'adaptable'; - return $.Deferred().reject().promise(); + return $.Deferred().resolve().promise(); } } -- To view, visit https://gerrit.wikimedia.org/r/324377 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iada2d82357df1483b84a5b1e73b2343905e2794f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: wmf/1.29.0-wmf.4 Gerrit-Owner: KartikMistryGerrit-Reviewer: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Allow template editor even if parameter mapping fails comple...
jenkins-bot has submitted this change and it was merged. Change subject: Allow template editor even if parameter mapping fails completely .. Allow template editor even if parameter mapping fails completely If there is an equivalent template, but parameter mapping fails completely, currently no editor is shown and it is unclear to the translator why this happens. I don't see a reason not to show a template editor even in this case. Bug: T151868 Change-Id: Iada2d82357df1483b84a5b1e73b2343905e2794f --- M modules/tools/ext.cx.tools.template.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Amire80: Looks good to me, but someone else must approve Santhosh: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/tools/ext.cx.tools.template.js b/modules/tools/ext.cx.tools.template.js index aaf9fe7..f41ef30 100644 --- a/modules/tools/ext.cx.tools.template.js +++ b/modules/tools/ext.cx.tools.template.js @@ -826,7 +826,7 @@ mw.log( '[CX] None of template params were able to map for ' + self.sourceTemplate.title ); // Manually adaptable, but not automatically adaptable. self.status = 'adaptable'; - return $.Deferred().reject().promise(); + return $.Deferred().resolve().promise(); } } -- To view, visit https://gerrit.wikimedia.org/r/324173 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iada2d82357df1483b84a5b1e73b2343905e2794f Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: NikerabbitGerrit-Reviewer: Amire80 Gerrit-Reviewer: Nikerabbit Gerrit-Reviewer: Santhosh Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: qunit: Don't assume synchronous Deferred.resolve
jenkins-bot has submitted this change and it was merged. Change subject: qunit: Don't assume synchronous Deferred.resolve .. qunit: Don't assume synchronous Deferred.resolve * mw.loader.test: Most test did this correctly already by returning a Promise to QUnit.test, or by using assert.async(). However two tests did not. * mediawiki.jqueryMsg.test: Previously the async() handles were obtained within the task execution loop. Before jQuery 3.0, simple .then() operations when they are already resolved happen synchronously, so the current handle was resolved and the next handle obtained in the same go and QUnit never saw the state as having no unresolved async handles. With jQuery 3.0 the test fails because QUnit would end the test after the first iteration. Fix by simply obtaining all the async() handles when creating the list of tasks, instead of within the individual task execution. This way they're all reserved and they'll count down as we go. * mediawiki.api.test: Consistently use 'respondImmediately' for the tests that were missing it, and return promise to QUnit.test() Also update hardcoded API urls that encoded space as '+', which may now be encoded as '%20'. Bug: T124742 Change-Id: If7ee1c6025be70fecc0a93d4ac155da4db6571ab --- M tests/qunit/suites/resources/mediawiki.api/mediawiki.ForeignApi.test.js M tests/qunit/suites/resources/mediawiki.api/mediawiki.api.category.test.js M tests/qunit/suites/resources/mediawiki.api/mediawiki.api.messages.test.js M tests/qunit/suites/resources/mediawiki.api/mediawiki.api.options.test.js M tests/qunit/suites/resources/mediawiki.api/mediawiki.api.parse.test.js M tests/qunit/suites/resources/mediawiki.api/mediawiki.api.upload.test.js M tests/qunit/suites/resources/mediawiki.api/mediawiki.api.watch.test.js M tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js M tests/qunit/suites/resources/mediawiki/mediawiki.loader.test.js 9 files changed, 143 insertions(+), 141 deletions(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/qunit/suites/resources/mediawiki.api/mediawiki.ForeignApi.test.js b/tests/qunit/suites/resources/mediawiki.api/mediawiki.ForeignApi.test.js index 9d0fdf5..1676130 100644 --- a/tests/qunit/suites/resources/mediawiki.api/mediawiki.ForeignApi.test.js +++ b/tests/qunit/suites/resources/mediawiki.api/mediawiki.ForeignApi.test.js @@ -3,16 +3,10 @@ setup: function () { this.server = this.sandbox.useFakeServer(); this.server.respondImmediately = true; - this.clock = this.sandbox.useFakeTimers(); - }, - teardown: function () { - // https://github.com/jquery/jquery/issues/2453 - this.clock.tick(); } } ) ); - QUnit.test( 'origin is included in GET requests', function ( assert ) { - QUnit.expect( 1 ); + QUnit.test( 'origin is included in GET requests', 1, function ( assert ) { var api = new mw.ForeignApi( '//localhost:4242/w/api.php' ); this.server.respond( function ( request ) { @@ -20,11 +14,10 @@ request.respond( 200, { 'Content-Type': 'application/json' }, '[]' ); } ); - api.get( {} ); + return api.get( {} ); } ); - QUnit.test( 'origin is included in POST requests', function ( assert ) { - QUnit.expect( 2 ); + QUnit.test( 'origin is included in POST requests', 2, function ( assert ) { var api = new mw.ForeignApi( '//localhost:4242/w/api.php' ); this.server.respond( function ( request ) { @@ -33,7 +26,7 @@ request.respond( 200, { 'Content-Type': 'application/json' }, '[]' ); } ); - api.post( {} ); + return api.post( {} ); } ); }( mediaWiki ) ); diff --git a/tests/qunit/suites/resources/mediawiki.api/mediawiki.api.category.test.js b/tests/qunit/suites/resources/mediawiki.api/mediawiki.api.category.test.js index a0c7daf..a79bff6 100644 --- a/tests/qunit/suites/resources/mediawiki.api/mediawiki.api.category.test.js +++ b/tests/qunit/suites/resources/mediawiki.api/mediawiki.api.category.test.js @@ -2,28 +2,23 @@ QUnit.module( 'mediawiki.api.category', QUnit.newMwEnvironment( { setup: function () { this.server = this.sandbox.useFakeServer(); + this.server.respondImmediately = true; } } ) ); - QUnit.test( '.getCategoriesByPrefix()', function ( assert ) { - QUnit.expect( 1 ); + QUnit.test( '.getCategoriesByPrefix()', 1, function ( assert ) { + this.server.respondWith( [ 200, {
[MediaWiki-commits] [Gerrit] mediawiki...codesniffer[master]: Return earlier when testing scope fields
Samwilson has uploaded a new change for review. https://gerrit.wikimedia.org/r/324376 Change subject: Return earlier when testing scope fields .. Return earlier when testing scope fields This rearranges when some fields of tokens are checked, to avoid undefined index errors by returning earlier than was the case. Bug: T146439 Change-Id: I1be4e021e559b2a5efd1c1361a8b574e076e11dc --- M MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php M MediaWiki/Sniffs/WhiteSpace/SpaceBeforeControlStructureBraceSniff.php 2 files changed, 12 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/codesniffer refs/changes/76/324376/1 diff --git a/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php b/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php index f988be4..132f445 100644 --- a/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php +++ b/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php @@ -101,11 +101,11 @@ $tokens = $phpcsFile->getTokens(); // Skip constructor and destructor. $methodName = $phpcsFile->getDeclarationName( $stackPtr ); - $endFunction = $tokens[$stackPtr]['scope_closer']; // Return if no scope_opener. if ( !isset( $tokens[$stackPtr]['scope_opener'] ) ) { return; } + $endFunction = $tokens[$stackPtr]['scope_closer']; $returnToken = $phpcsFile->findNext( T_RETURN, $stackPtr + 1, $endFunction ); // Return if the function has no return. if ( $returnToken === false ) { diff --git a/MediaWiki/Sniffs/WhiteSpace/SpaceBeforeControlStructureBraceSniff.php b/MediaWiki/Sniffs/WhiteSpace/SpaceBeforeControlStructureBraceSniff.php index 834bb5e..0523c24 100644 --- a/MediaWiki/Sniffs/WhiteSpace/SpaceBeforeControlStructureBraceSniff.php +++ b/MediaWiki/Sniffs/WhiteSpace/SpaceBeforeControlStructureBraceSniff.php @@ -33,24 +33,25 @@ */ public function process( PHP_CodeSniffer_File $phpcsFile, $stackPtr ) { $tokens = $phpcsFile->getTokens(); - $closeBracket = $tokens[$stackPtr + 2]['parenthesis_closer']; - $openBrace = $tokens[$stackPtr]['scope_opener']; - $closeBracketLine = $tokens[$closeBracket]['line']; - $openBraceLine = $tokens[$openBrace]['line']; - $lineDifference = ( $openBraceLine - $closeBracketLine ); - if ( isset( $tokens[$stackPtr]['scope_opener'] ) == false || - $tokens[$stackPtr]['scope_opener'] === false || - $tokens[$openBrace]['content'] !== '{' - ) { + if ( !isset( $tokens[$stackPtr]['scope_opener'] ) || + $tokens[$stackPtr]['scope_opener'] === false ) { return; } - + $openBrace = $tokens[$stackPtr]['scope_opener']; + if ( $tokens[$openBrace]['content'] !== '{' ) { + return; + } if ( $tokens[$stackPtr + 1]['code'] !== T_WHITESPACE || $tokens[$stackPtr + 2]['code'] !== T_OPEN_PARENTHESIS || $tokens[$stackPtr + 2]['parenthesis_closer'] === null ) { return; } + + $closeBracket = $tokens[$stackPtr + 2]['parenthesis_closer']; + $closeBracketLine = $tokens[$closeBracket]['line']; + $openBraceLine = $tokens[$openBrace]['line']; + $lineDifference = ( $openBraceLine - $closeBracketLine ); if ( $lineDifference > 0 ) { // if brace on new line $this->processLineDiff( $phpcsFile, $openBrace, $closeBracket, $stackPtr ); -- To view, visit https://gerrit.wikimedia.org/r/324376 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1be4e021e559b2a5efd1c1361a8b574e076e11dc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/codesniffer Gerrit-Branch: master Gerrit-Owner: Samwilson___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CentralNotice[wmf_deploy]: Remove use of deprecated "json" module
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/324375 Change subject: Remove use of deprecated "json" module .. Remove use of deprecated "json" module (cherry picked from commit 35532557268a9eeb013b9066de46fba78f8a43ed) Change-Id: I02242885ef98ad4fb008dac623518b4d4f4b922e --- M extension.json 1 file changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice refs/changes/75/324375/1 diff --git a/extension.json b/extension.json index 553a463..b69c585 100644 --- a/extension.json +++ b/extension.json @@ -116,8 +116,7 @@ "ext.centralNotice.adminUi": { "dependencies": [ "jquery.ui.datepicker", - "jquery.ui.multiselect", - "json" + "jquery.ui.multiselect" ], "scripts": "infrastructure/centralnotice.js", "styles": [ @@ -263,7 +262,6 @@ "ext.centralNotice.geoIP", "ext.centralNotice.kvStore", "jquery.cookie", - "json", "mediawiki.Uri" ], "targets": [ -- To view, visit https://gerrit.wikimedia.org/r/324375 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I02242885ef98ad4fb008dac623518b4d4f4b922e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralNotice Gerrit-Branch: wmf_deploy Gerrit-Owner: Krinkle___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/dumps[master]: add timeout and related callback to method for running proc ...
ArielGlenn has submitted this change and it was merged. Change subject: add timeout and related callback to method for running proc without output .. add timeout and related callback to method for running proc without output we want to be able to dump things with a lock file, update the lock file periodically while the process is running, without separate threads for watchdogs and such Change-Id: Icc055affc26fda9bd0b4c9b7e02bb587dac826fc --- M xmldumps-backup/dumps/utils.py 1 file changed, 159 insertions(+), 7 deletions(-) Approvals: ArielGlenn: Looks good to me, approved jenkins-bot: Verified diff --git a/xmldumps-backup/dumps/utils.py b/xmldumps-backup/dumps/utils.py index 3105840..72c21b2 100644 --- a/xmldumps-backup/dumps/utils.py +++ b/xmldumps-backup/dumps/utils.py @@ -7,8 +7,10 @@ import re import time import socket +import select +import errno -from subprocess import Popen, PIPE +from subprocess import Popen, PIPE, _eintr_retry_call from dumps.CommandManagement import CommandPipeline from dumps.exceptions import BackupError @@ -187,6 +189,151 @@ return "-p" + self.wiki.config.db_password +class MyPopen(Popen): +''' +add communicate call with timeout. proper way to use this is +to call it repeatedly, retrieving stderr and stdout, +until the process' returncode is not None, at which point the process will +have completed and best of all an os.waitpid will have been +done on it. + +Code here is taken from subprocess.Popen, python 2.7.12, and modified. +The Popen code was released under the Python Software Foundation License 2.0, +see https://www.python.org/download/releases/2.7/license/ +for details. +''' +def communicate_with_timeout(self, timeout=None): +''' +do what communicate() does but wait only until timeout +specified, return whatever we have read from stdout/stderr + +if timeout is None, then this acts like +the regular Popen.communicate() call + +note that no input is specified or used + +this is posix/poll specific. too bad. +''' +stdout, stderr, timeleft = self._communicate_with_timeout(timeout) +if stdout is not None: +stdout = ''.join(stdout) +if stderr is not None: +stderr = ''.join(stderr) + +if timeout is not None: +if timeleft > 0: +# willing to wait up to the remaining time for the process +self.wait_with_timeout(timeleft) +else: +# no time left, so... +# immediate return if process not complete +self.wait_with_timeout(None) +else: +# standard behavior without timeout +# block waiting for process to finish up +self.wait() +return (stdout, stderr) + +def _communicate_with_timeout(self, timeout=None): +''' +read stdout/stderr lines from process until +timout expires, return them + +if timeout is None, read til process completes + +this is posix/poll specific. too bad. +''' +stdout = None +stderr = None +fd2file = {} +fd2output = {} + +poller = select.poll() + +def register_and_append(file_obj, eventmask): +if file_obj.closed: +return +poller.register(file_obj.fileno(), eventmask) +fd2file[file_obj.fileno()] = file_obj + +def close_unregister_and_remove(fdesc): +poller.unregister(fdesc) +fd2file[fdesc].close() +fd2file.pop(fdesc) + +select_pollin_pollpri = select.POLLIN | select.POLLPRI +if self.stdout and not self.stdout.closed: +register_and_append(self.stdout, select_pollin_pollpri) +fd2output[self.stdout.fileno()] = stdout = [] +if self.stderr and not self.stderr.closed: +register_and_append(self.stderr, select_pollin_pollpri) +fd2output[self.stderr.fileno()] = stderr = [] + +timeleft = timeout +while fd2file: +try: +if timeout is not None: +before = time.time() +ready = poller.poll(timeleft) +if timeout is not None: +after = time.time() +elapsed = after - before +# timeout is in milliseconds +timeleft = timeleft - (elapsed * 1000) +except select.error, exc: +if exc.args[0] == errno.EINTR: +continue +raise + +for fdesc, mode in ready: +if mode & select_pollin_pollpri: +data = os.read(fdesc, 4096) +if not data: +close_unregister_and_remove(fdesc) +
[MediaWiki-commits] [Gerrit] mediawiki...Citoid[master]: extension.json: Remove dependency on json module
jenkins-bot has submitted this change and it was merged. Change subject: extension.json: Remove dependency on json module .. extension.json: Remove dependency on json module Change-Id: I424de8034825d31b4c467889c4d3b6c4ed8ce911 Depends-On: I8280faf1cbcd876ead2dafae4347b7d46e3e2acb --- M extension.json 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/extension.json b/extension.json index 1a01d7b..314cc47 100644 --- a/extension.json +++ b/extension.json @@ -38,7 +38,6 @@ ], "dependencies": [ "ext.cite.visualEditor", - "json", "ext.visualEditor.mediawiki", "mediawiki.api.options", "ext.citoid.visualEditor.data" -- To view, visit https://gerrit.wikimedia.org/r/322775 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I424de8034825d31b4c467889c4d3b6c4ed8ce911 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Citoid Gerrit-Branch: master Gerrit-Owner: JforresterGerrit-Reviewer: Krinkle Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Citoid[wmf/1.29.0-wmf.4]: Remove use of deprecated "json" module
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/324374 Change subject: Remove use of deprecated "json" module .. Remove use of deprecated "json" module Depends-On: I8280faf1cbcd876ead2dafae4347b7d46e3e2acb Change-Id: I02242885ef98ad4fb008dac623518b4d4f4b922e --- M extension.json 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Citoid refs/changes/74/324374/1 diff --git a/extension.json b/extension.json index 1a01d7b..314cc47 100644 --- a/extension.json +++ b/extension.json @@ -38,7 +38,6 @@ ], "dependencies": [ "ext.cite.visualEditor", - "json", "ext.visualEditor.mediawiki", "mediawiki.api.options", "ext.citoid.visualEditor.data" -- To view, visit https://gerrit.wikimedia.org/r/324374 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I02242885ef98ad4fb008dac623518b4d4f4b922e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Citoid Gerrit-Branch: wmf/1.29.0-wmf.4 Gerrit-Owner: Krinkle___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: mediawiki.api: Fix getToken() incompat with jQuery 3.0
jenkins-bot has submitted this change and it was merged. Change subject: mediawiki.api: Fix getToken() incompat with jQuery 3.0 .. mediawiki.api: Fix getToken() incompat with jQuery 3.0 * getToken()'s fail() handler deletes property from promiseGroup. However sometimes this doesn't exist yet for the current api url. Move the block that creates this object higher up. * Deferred.then() used to have an undocumented 'this' context. No longer exists in jQuery 3.0, but we weren't supposed to be using returning it as-is anyway. Return a new Deferred instead, like we do elsewhere. Bug: T124742 Change-Id: I52c6bb779c5e79161e38a5d0c7c2cb3b458be9ba --- M resources/src/mediawiki/api.js 1 file changed, 8 insertions(+), 7 deletions(-) Approvals: Bartosz Dziewoński: Looks good to me, approved Jforrester: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/resources/src/mediawiki/api.js b/resources/src/mediawiki/api.js index b9e05c3..0c08ca4 100644 --- a/resources/src/mediawiki/api.js +++ b/resources/src/mediawiki/api.js @@ -334,8 +334,8 @@ } ); } - // Different error, pass on to let caller handle the error code - return this; + // Let caller handle the error code + return $.Deferred().rejectWith( this, arguments ); } ); } ).promise( { abort: function () { @@ -363,6 +363,10 @@ promiseGroup = promises[ this.defaults.ajax.url ]; d = promiseGroup && promiseGroup[ type + 'Token' ]; + if ( !promiseGroup ) { + promiseGroup = promises[ this.defaults.ajax.url ] = {}; + } + if ( !d ) { apiPromise = this.get( { action: 'query', @@ -382,16 +386,13 @@ // Clear promise. Do not cache errors. delete promiseGroup[ type + 'Token' ]; - // Pass on to allow the caller to handle the error - return this; + // Let caller handle the error code + return $.Deferred().rejectWith( this, arguments ); } ) // Attach abort handler .promise( { abort: apiPromise.abort } ); // Store deferred now so that we can use it again even if it isn't ready yet - if ( !promiseGroup ) { - promiseGroup = promises[ this.defaults.ajax.url ] = {}; - } promiseGroup[ type + 'Token' ] = d; } -- To view, visit https://gerrit.wikimedia.org/r/323240 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I52c6bb779c5e79161e38a5d0c7c2cb3b458be9ba Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: KrinkleGerrit-Reviewer: Alex Monk Gerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: Esanders Gerrit-Reviewer: Gilles Gerrit-Reviewer: Jack Phoenix Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Mattflaschen Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labs/striker[master]: Add client side registration form validation
jenkins-bot has submitted this change and it was merged. Change subject: Add client side registration form validation .. Add client side registration form validation Add client side form validation to the registration wizard forms using the parsley javascript library. We are using django-parsley for its helper functions, but a newer version of the parsley library than it ships. Bug: T144710 Change-Id: Id4cf08cb9e233f7436cb7910eb22f451ce2f6e74 --- M requirements.txt A static/js/parsley.js A static/js/parsley.min.js A static/js/parsley.min.js.map A static/js/register.js M striker/register/forms.py M striker/register/urls.py M striker/register/views.py M striker/templates/register/base.html M striker/templates/register/confirm.html M striker/templates/register/email.html M striker/templates/register/ldap.html M striker/templates/register/password.html M striker/templates/register/shell.html 14 files changed, 2,545 insertions(+), 19 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified -- To view, visit https://gerrit.wikimedia.org/r/313142 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id4cf08cb9e233f7436cb7910eb22f451ce2f6e74 Gerrit-PatchSet: 3 Gerrit-Project: labs/striker Gerrit-Branch: master Gerrit-Owner: BryanDavisGerrit-Reviewer: Alex Monk Gerrit-Reviewer: Andrew Bogott Gerrit-Reviewer: BryanDavis Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Merlijn van Deen Gerrit-Reviewer: Yuvipanda Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/dns[master]: templates: add logstash.svc
Filippo Giunchedi has uploaded a new change for review. https://gerrit.wikimedia.org/r/324373 Change subject: templates: add logstash.svc .. templates: add logstash.svc Bug: T151971 Change-Id: I160933033158f6018fabcd453372427aef8b43fd --- M templates/10.in-addr.arpa M templates/wmnet 2 files changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/73/324373/1 diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa index 9fd110e..146c7cc 100644 --- a/templates/10.in-addr.arpa +++ b/templates/10.in-addr.arpa @@ -42,6 +42,7 @@ ; 33 reserved for kibana 34 1H IN PTR eventstreams.svc.codfw.wmnet. 35 1H IN PTR pdfrender.svc.codfw.wmnet. +; 36 reserved for logstash ; 10.2.2.0/24 - eqiad LVS low-traffic (internal) services @@ -75,6 +76,7 @@ 33 1H IN PTR kibana.svc.eqiad.wmnet. 34 1H IN PTR eventstreams.svc.eqiad.wmnet. 35 1H IN PTR pdfrender.svc.eqiad.wmnet. +36 1H IN PTR logstash.svc.eqiad.wmnet. ; 10.2.3.0/24 - esams LVS low-traffic (internal) services diff --git a/templates/wmnet b/templates/wmnet index ef6865a..6a9ad6e 100644 --- a/templates/wmnet +++ b/templates/wmnet @@ -4135,6 +4135,7 @@ kibana 1H IN A10.2.2.33 eventstreams 1H IN A 10.2.2.34 pdfrender1H IN A 10.2.2.35 +logstash 1H IN A 10.2.2.36 ganeti011H IN A10.64.32.173 labstore1H IN A10.64.37.10 @@ -4190,6 +4191,7 @@ ; 33 reserved for kibana eventstreams1H IN A10.2.1.34 pdfrender 1H IN A10.2.1.35 +; 36 reserved for logstash ganeti011H IN A10.192.16.131 labstore1H IN A10.192.21.7 -- To view, visit https://gerrit.wikimedia.org/r/324373 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I160933033158f6018fabcd453372427aef8b43fd Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Filippo Giunchedi___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/dns[master]: templates: add PTR for pdfrender
Filippo Giunchedi has uploaded a new change for review. https://gerrit.wikimedia.org/r/324372 Change subject: templates: add PTR for pdfrender .. templates: add PTR for pdfrender Change-Id: I406305fef56fb7ac9fe5044a9ba1e15b114e7ace --- M templates/10.in-addr.arpa 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/72/324372/1 diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa index 419681f..9fd110e 100644 --- a/templates/10.in-addr.arpa +++ b/templates/10.in-addr.arpa @@ -41,6 +41,7 @@ 32 1H IN PTR wdqs.svc.codfw.wmnet. ; 33 reserved for kibana 34 1H IN PTR eventstreams.svc.codfw.wmnet. +35 1H IN PTR pdfrender.svc.codfw.wmnet. ; 10.2.2.0/24 - eqiad LVS low-traffic (internal) services @@ -73,6 +74,7 @@ 32 1H IN PTR wdqs.svc.eqiad.wmnet. 33 1H IN PTR kibana.svc.eqiad.wmnet. 34 1H IN PTR eventstreams.svc.eqiad.wmnet. +35 1H IN PTR pdfrender.svc.eqiad.wmnet. ; 10.2.3.0/24 - esams LVS low-traffic (internal) services -- To view, visit https://gerrit.wikimedia.org/r/324372 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I406305fef56fb7ac9fe5044a9ba1e15b114e7ace Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Filippo Giunchedi___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ZeroBanner[master]: Move stil/gd-text to vendor repo properly
jenkins-bot has submitted this change and it was merged. Change subject: Move stil/gd-text to vendor repo properly .. Move stil/gd-text to vendor repo properly Change-Id: Ic3682e05f65544194f33de0a81d5a76627fa7bb3 Depends-On: Idec56736150a72edc3892935d70c6847fdaf5d29 --- M composer.json D composer.lock M extension.json D vendor/stil/gd-text/.gitignore D vendor/stil/gd-text/README.md D vendor/stil/gd-text/composer.json D vendor/stil/gd-text/src/Box.php D vendor/stil/gd-text/src/Color.php 8 files changed, 1 insertion(+), 547 deletions(-) Approvals: BryanDavis: Looks good to me, approved jenkins-bot: Verified diff --git a/composer.json b/composer.json index 8652214..ca8ebed 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { "require": { - "stil/gd-text": "*" + "stil/gd-text": "1.0.0" } } diff --git a/composer.lock b/composer.lock deleted file mode 100644 index da4e094..000 --- a/composer.lock +++ /dev/null @@ -1,50 +0,0 @@ -{ -"_readme": [ -"This file locks the dependencies of your project to a known state", -"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;, -"This file is @generated automatically" -], -"hash": "f9c01036492a4f5ae465de4367f23383", -"content-hash": "bb42dafdc6fa26adc8564659771d7e67", -"packages": [ -{ -"name": "stil/gd-text", -"version": "v1.0.0", -"source": { -"type": "git", -"url": "https://github.com/stil/gd-text.git;, -"reference": "a3e561afd5a53a6a4b0c1d64ebaf51e768348a66" -}, -"dist": { -"type": "zip", -"url": "https://api.github.com/repos/stil/gd-text/zipball/a3e561afd5a53a6a4b0c1d64ebaf51e768348a66;, -"reference": "a3e561afd5a53a6a4b0c1d64ebaf51e768348a66", -"shasum": "" -}, -"require": { -"ext-gd": "*", -"php": ">=5.3" -}, -"type": "library", -"autoload": { -"psr-4": { -"GDText\\": "src/" -} -}, -"notification-url": "https://packagist.org/downloads/;, -"license": [ -"MIT" -], -"description": "A class drawing multiline and aligned text on pictures. Uses GD extension.", -"time": "2015-01-02 12:21:25" -} -], -"packages-dev": [], -"aliases": [], -"minimum-stability": "stable", -"stability-flags": [], -"prefer-stable": false, -"prefer-lowest": false, -"platform": [], -"platform-dev": [] -} diff --git a/extension.json b/extension.json index a50f8ac..45e3f59 100644 --- a/extension.json +++ b/extension.json @@ -26,8 +26,6 @@ "ZeroRatedMobileAccessAlias": "ZeroBanner.alias.php" }, "AutoloadClasses": { - "GDText\\Box": "vendor/stil/gd-text/src/Box.php", - "GDText\\Color": "vendor/stil/gd-text/src/Color.php", "ZeroBanner\\ApiRawJsonPrinter": "includes/ApiZeroBanner.php", "ZeroBanner\\ApiZeroBanner": "includes/ApiZeroBanner.php", "ZeroBanner\\PageRendering": "includes/PageRendering.php", diff --git a/vendor/stil/gd-text/.gitignore b/vendor/stil/gd-text/.gitignore deleted file mode 100644 index 654ae49..000 --- a/vendor/stil/gd-text/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -vendor/ -composer.lock -Thumbs.db -Desktop.ini -.DS_Store -.idea diff --git a/vendor/stil/gd-text/README.md b/vendor/stil/gd-text/README.md deleted file mode 100644 index 0171264..000 --- a/vendor/stil/gd-text/README.md +++ /dev/null @@ -1,93 +0,0 @@ -gd-text -=== - -###Basic usage example -```php -setFontFace(__DIR__.'/Franchise-Bold-hinted.ttf'); // http://www.dafont.com/franchise.font -$box->setFontColor(new Color(255, 75, 140)); -$box->setTextShadow(new Color(0, 0, 0, 50), 2, 2); -$box->setFontSize(40); -$box->setBox(20, 20, 460, 460); -$box->setTextAlign('left', 'top'); -$box->draw("Franchise\nBold"); - -$box = new Box($im); -$box->setFontFace(__DIR__.'/Pacifico.ttf'); // http://www.dafont.com/pacifico.font -$box->setFontSize(80); -$box->setFontColor(new Color(255, 255, 255)); -$box->setTextShadow(new Color(0, 0, 0, 50), 0, -2); -$box->setBox(20, 20, 460, 460); -$box->setTextAlign('center', 'center'); -$box->draw("Pacifico"); - -$box = new Box($im); -$box->setFontFace(__DIR__.'/Prisma.otf'); // http://www.dafont.com/prisma.font -$box->setFontSize(70); -$box->setFontColor(new Color(148, 212, 1)); -$box->setTextShadow(new Color(0, 0, 0, 50), 0, -2); -$box->setLeading(0.7); -$box->setBox(20, 20, 460, 460); -$box->setTextAlign('right', 'bottom'); -$box->draw("Prisma"); - -header("Content-type: image/png"); -imagepng($im);
[MediaWiki-commits] [Gerrit] operations/puppet[production]: phab: fix systemd unit file name of ssh-phab
Dzahn has submitted this change and it was merged. Change subject: phab: fix systemd unit file name of ssh-phab .. phab: fix systemd unit file name of ssh-phab During labs testing with jessie by Paladox it was noticed that the phab sshd service did not start due to this unit file missing. At some point in the past this was introduced because phab2001 with jessie in prod did have that file. After re-enabling puppet on phab2001 and removing the unit file in question, it did not get recreated and the same behaviour as in labs could be confirmed. This just fixes the file name since matches the " $init_source = 'puppet:///modules/phabricator/sshd-phab.service'" elsewhere in vcs.pp. Since prod phab is on iridium on trusty it will not influence that but fix it on phab2001 and in labs with jessie. Bug: T137928 Change-Id: Ie5a78866c87c3855dc3de381bd16b5826b57a2ec --- R modules/phabricator/files/sshd-phab.service 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Paladox: Looks good to me, but someone else must approve 20after4: Looks good to me, but someone else must approve Dzahn: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/phabricator/files/ssh-phab.service b/modules/phabricator/files/sshd-phab.service similarity index 100% rename from modules/phabricator/files/ssh-phab.service rename to modules/phabricator/files/sshd-phab.service -- To view, visit https://gerrit.wikimedia.org/r/324369 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie5a78866c87c3855dc3de381bd16b5826b57a2ec Gerrit-PatchSet: 4 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: DzahnGerrit-Reviewer: 20after4 Gerrit-Reviewer: Dzahn Gerrit-Reviewer: Paladox Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/vendor[master]: Properly add stil/gd-text for ZeroBanner
jenkins-bot has submitted this change and it was merged. Change subject: Properly add stil/gd-text for ZeroBanner .. Properly add stil/gd-text for ZeroBanner Change-Id: Idec56736150a72edc3892935d70c6847fdaf5d29 --- M composer.json M composer.lock M composer/autoload_classmap.php M composer/autoload_psr4.php M composer/installed.json A stil/gd-text/.gitignore A stil/gd-text/README.md A stil/gd-text/composer.json A stil/gd-text/examples/alignment.gif A stil/gd-text/examples/debug.png A stil/gd-text/examples/fonts.png A stil/gd-text/examples/lineheight.gif A stil/gd-text/src/Box.php A stil/gd-text/src/Color.php 14 files changed, 564 insertions(+), 2 deletions(-) Approvals: BryanDavis: Looks good to me, approved jenkins-bot: Verified diff --git a/composer.json b/composer.json index 02d8104..6065b01 100644 --- a/composer.json +++ b/composer.json @@ -32,6 +32,7 @@ "pimple/pimple": "2.1.1", "psr/log": "1.0.0", "ruflin/elastica": "3.1.1", + "stil/gd-text": "1.0.0", "symfony/process": "3.0.4", "wikimedia/assert": "0.2.2", "wikimedia/avro": "1.7.7", diff --git a/composer.lock b/composer.lock index 245..05b7f58 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;, "This file is @generated automatically" ], -"hash": "b17b7a811c8ff679b7c6d108c1f81e83", -"content-hash": "da2b764402ee804df059aa5368f84c2d", +"hash": "292faee4fba200fdaf2f34e66a03ff92", +"content-hash": "e83297b8a45f948622cd770f5464d102", "packages": [ { "name": "composer/semver", @@ -1158,6 +1158,37 @@ "time": "2016-03-18 07:56:36" }, { +"name": "stil/gd-text", +"version": "v1.0.0", +"source": { +"type": "git", +"url": "https://github.com/stil/gd-text.git;, +"reference": "a3e561afd5a53a6a4b0c1d64ebaf51e768348a66" +}, +"dist": { +"type": "zip", +"url": "https://api.github.com/repos/stil/gd-text/zipball/a3e561afd5a53a6a4b0c1d64ebaf51e768348a66;, +"reference": "a3e561afd5a53a6a4b0c1d64ebaf51e768348a66", +"shasum": "" +}, +"require": { +"ext-gd": "*", +"php": ">=5.3" +}, +"type": "library", +"autoload": { +"psr-4": { +"GDText\\": "src/" +} +}, +"notification-url": "https://packagist.org/downloads/;, +"license": [ +"MIT" +], +"description": "A class drawing multiline and aligned text on pictures. Uses GD extension.", +"time": "2015-01-02 12:21:25" +}, +{ "name": "symfony/process", "version": "v3.0.4", "source": { diff --git a/composer/autoload_classmap.php b/composer/autoload_classmap.php index 46826ac..49a958f 100644 --- a/composer/autoload_classmap.php +++ b/composer/autoload_classmap.php @@ -297,6 +297,8 @@ 'Firebase\\JWT\\ExpiredException' => $vendorDir . '/firebase/php-jwt/src/ExpiredException.php', 'Firebase\\JWT\\JWT' => $vendorDir . '/firebase/php-jwt/src/JWT.php', 'Firebase\\JWT\\SignatureInvalidException' => $vendorDir . '/firebase/php-jwt/src/SignatureInvalidException.php', +'GDText\\Box' => $vendorDir . '/stil/gd-text/src/Box.php', +'GDText\\Color' => $vendorDir . '/stil/gd-text/src/Color.php', 'HtmlFormatter\\HtmlFormatter' => $vendorDir . '/wikimedia/html-formatter/src/HtmlFormatter.php', 'IPSet\\IPSet' => $vendorDir . '/wikimedia/ip-set/src/IPSet.php', 'JsonSchema\\Constraints\\CollectionConstraint' => $vendorDir . '/justinrainbow/json-schema/src/JsonSchema/Constraints/CollectionConstraint.php', diff --git a/composer/autoload_psr4.php b/composer/autoload_psr4.php index 4888bee..4921f11 100644 --- a/composer/autoload_psr4.php +++ b/composer/autoload_psr4.php @@ -13,6 +13,7 @@ 'Symfony\\Component\\Process\\' => array($vendorDir . '/symfony/process'), 'Monolog\\' => array($vendorDir . '/monolog/monolog/src/Monolog'), 'JsonSchema\\' => array($vendorDir . '/justinrainbow/json-schema/src/JsonSchema'), +'GDText\\' => array($vendorDir . '/stil/gd-text/src'), 'Firebase\\JWT\\' => array($vendorDir . '/firebase/php-jwt/src'), 'Elastica\\' => array($vendorDir . '/ruflin/elastica/lib/Elastica'), 'Composer\\Semver\\' => array($vendorDir . '/composer/semver/src'), diff --git a/composer/installed.json b/composer/installed.json index bb5d6a4..4d5f9d5 100644 --- a/composer/installed.json +++ b/composer/installed.json @@ -2052,5 +2052,38 @@
[MediaWiki-commits] [Gerrit] operations/puppet[production]: lvs: add logstash
Filippo Giunchedi has uploaded a new change for review. https://gerrit.wikimedia.org/r/324371 Change subject: lvs: add logstash .. lvs: add logstash Note the TCP port used is log4j's, all other ports related to ingestion protocols are UDP. Bug: T151971 Change-Id: I2dc73a57dc96968cce9adaf7fe6b6b4e8a9eb65b --- M conftool-data/nodes/eqiad.yaml M conftool-data/services/services.yaml M hieradata/common/lvs/configuration.yaml M hieradata/role/eqiad/kibana.yaml 4 files changed, 36 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/71/324371/1 diff --git a/conftool-data/nodes/eqiad.yaml b/conftool-data/nodes/eqiad.yaml index 97f94a7..cc9ba18 100644 --- a/conftool-data/nodes/eqiad.yaml +++ b/conftool-data/nodes/eqiad.yaml @@ -316,6 +316,6 @@ wdqs1001.eqiad.wmnet: [wdqs] wdqs1002.eqiad.wmnet: [wdqs] logstash: - logstash1001.eqiad.wmnet: [kibana] - logstash1002.eqiad.wmnet: [kibana] - logstash1003.eqiad.wmnet: [kibana] + logstash1001.eqiad.wmnet: [kibana, logstash] + logstash1002.eqiad.wmnet: [kibana, logstash] + logstash1003.eqiad.wmnet: [kibana, logstash] diff --git a/conftool-data/services/services.yaml b/conftool-data/services/services.yaml index 0fca36d..0404d83 100644 --- a/conftool-data/services/services.yaml +++ b/conftool-data/services/services.yaml @@ -183,3 +183,10 @@ default_values: pooled: 'no' weight: 10 + logstash: +port: 4560 +datacenters: +- eqiad +default_values: + pooled: 'no' + weight: 10 diff --git a/hieradata/common/lvs/configuration.yaml b/hieradata/common/lvs/configuration.yaml index 8c07642..6298007 100644 --- a/hieradata/common/lvs/configuration.yaml +++ b/hieradata/common/lvs/configuration.yaml @@ -137,6 +137,8 @@ pdfrender: _block034 eqiad: 10.2.2.35 codfw: 10.2.1.35 + logstash: _block035 +eqiad: 10.2.2.36 lvs::configuration::lvs_services: text: description: "Main wiki platform LVS service, text.%{::site}.wikimedia.org (Varnish)" @@ -1102,3 +1104,26 @@ hostname: pdfrender.svc.eqiad.wmnet codfw: hostname: pdfrender.svc.codfw.wmnet + logstash: +description: Logstash ingestion +class: low-traffic +sites: +- eqiad +ip: *ip_block035 +# TCP port (log4j) +port: 4560 +bgp: 'yes' +depool-threshold: '.5' +scheduler: sh +monitors: + IdleConnection: +timeout-clean-reconnect: 3 +max-delay: 300 +conftool: + cluster: logstash + service: logstash +icinga: + check_command: "check_tcp_ip!logstash.svc.%{::site}.wmnet!4560" + sites: +eqiad: + hostname: logstash.svc.eqiad.wmnet diff --git a/hieradata/role/eqiad/kibana.yaml b/hieradata/role/eqiad/kibana.yaml index 42834ad..8ca61c9 100644 --- a/hieradata/role/eqiad/kibana.yaml +++ b/hieradata/role/eqiad/kibana.yaml @@ -1,2 +1,3 @@ lvs::realserver::realserver_ips: - '10.2.2.33' # kibana.svc.eqiad.wmnet +- '10.2.2.36' # logstash.svc.eqiad.wmnet -- To view, visit https://gerrit.wikimedia.org/r/324371 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2dc73a57dc96968cce9adaf7fe6b6b4e8a9eb65b Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Hovering over links in menu should change icons to blue
Jdlrobson has uploaded a new change for review. https://gerrit.wikimedia.org/r/324370 Change subject: Hovering over links in menu should change icons to blue .. Hovering over links in menu should change icons to blue Use css filters to change the color of icons in the main menu when a item is hovered over. Based on this approach: https://css-tricks.com/color-filters-can-turn-your-gray-skies-blue/ Note inline css is necessary due to T151972 Bug: T148108 Change-Id: Iefa4400fd1f397f760154b6405eb5cd67fac59f9 --- M resources/mobile.mainMenu/menu.mustache 1 file changed, 17 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/70/324370/1 diff --git a/resources/mobile.mainMenu/menu.mustache b/resources/mobile.mainMenu/menu.mustache index 6657d30..282ccc3 100644 --- a/resources/mobile.mainMenu/menu.mustache +++ b/resources/mobile.mainMenu/menu.mustache @@ -13,3 +13,20 @@ {{/sitelinks}} + + + + + + +/* See https://css-tricks.com/color-filters-can-turn-your-gray-skies-blue/ */ +.menu .mw-ui-icon:hover { + -webkit-filter: invert(0.5) url(#svg-filter-menu-hover); + filter: invert(0.5) url(#svg-filter-menu-hover); +} + \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/324370 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iefa4400fd1f397f760154b6405eb5cd67fac59f9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jdlrobson___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: phab: fix systemd unit file name of ssh-phab
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/324369 Change subject: phab: fix systemd unit file name of ssh-phab .. phab: fix systemd unit file name of ssh-phab Change-Id: Ie5a78866c87c3855dc3de381bd16b5826b57a2ec --- R modules/phabricator/files/sshd-phab.service 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/69/324369/1 diff --git a/modules/phabricator/files/ssh-phab.service b/modules/phabricator/files/sshd-phab.service similarity index 100% rename from modules/phabricator/files/ssh-phab.service rename to modules/phabricator/files/sshd-phab.service -- To view, visit https://gerrit.wikimedia.org/r/324369 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie5a78866c87c3855dc3de381bd16b5826b57a2ec Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove $wgSessionsInMemcached
jenkins-bot has submitted this change and it was merged. Change subject: Remove $wgSessionsInMemcached .. Remove $wgSessionsInMemcached Change-Id: Ia2b4d62ea504a3cb04f4c2bec49b16f155c8b0c9 --- M RELEASE-NOTES-1.29 M includes/DefaultSettings.php M includes/Setup.php 3 files changed, 3 insertions(+), 8 deletions(-) Approvals: Krinkle: Looks good to me, but someone else must approve Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/RELEASE-NOTES-1.29 b/RELEASE-NOTES-1.29 index 386dee4..da2eb7f 100644 --- a/RELEASE-NOTES-1.29 +++ b/RELEASE-NOTES-1.29 @@ -53,6 +53,8 @@ === Other changes in 1.29 === * Database::getSearchEngine() (deprecated in 1.28) was removed. Use SearchEngineFactory::getSearchEngineClass() instead. +* $wgSessionsInMemcached (deprecated in 1.20) was removed. No replacement is + required as all sessions are stored in Object Cache now. == Compatibility == diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index eb778b5..5557dca 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -2366,13 +2366,6 @@ $wgParserCacheExpireTime = 86400; /** - * Deprecated alias for $wgSessionsInObjectCache. - * - * @deprecated since 1.20; Use $wgSessionsInObjectCache - */ -$wgSessionsInMemcached = true; - -/** * @deprecated since 1.27, session data is always stored in object cache. */ $wgSessionsInObjectCache = true; diff --git a/includes/Setup.php b/includes/Setup.php index 357c76d..9f722af 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -462,7 +462,7 @@ } // Backwards compatibility warning -if ( !$wgSessionsInObjectCache && !$wgSessionsInMemcached ) { +if ( !$wgSessionsInObjectCache ) { wfDeprecated( '$wgSessionsInObjectCache = false', '1.27' ); if ( $wgSessionHandler ) { wfDeprecated( '$wgSessionsHandler', '1.27' ); -- To view, visit https://gerrit.wikimedia.org/r/324353 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia2b4d62ea504a3cb04f4c2bec49b16f155c8b0c9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: ReedyGerrit-Reviewer: Krinkle Gerrit-Reviewer: Legoktm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...LiquidThreads[master]: Replace $job->insert() call
jenkins-bot has submitted this change and it was merged. Change subject: Replace $job->insert() call .. Replace $job->insert() call Change-Id: I19b49a8e5c5b3098cc7b4a66f9c58633d29695a7 --- M classes/Threads.php 1 file changed, 6 insertions(+), 2 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/classes/Threads.php b/classes/Threads.php index f535823..ef609ee 100644 --- a/classes/Threads.php +++ b/classes/Threads.php @@ -365,8 +365,12 @@ if ( $limit && ( $rowsAffected >= $limit ) && $queueMore ) { $jobParams = array( 'limit' => $limit, 'cascade' => true ); - $job = new SynchroniseThreadArticleDataJob( $article->getTitle(), $jobParams ); - $job->insert(); + JobQueueGroup::singleton()->push( + new SynchroniseThreadArticleDataJob( + $article->getTitle(), + $jobParams + ) + ); } return $limit ? ( $rowsAffected < $limit ) : true; -- To view, visit https://gerrit.wikimedia.org/r/324364 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I19b49a8e5c5b3098cc7b4a66f9c58633d29695a7 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/LiquidThreads Gerrit-Branch: master Gerrit-Owner: ReedyGerrit-Reviewer: Legoktm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...GlobalContribs[master]: Replace User::edits() call
jenkins-bot has submitted this change and it was merged. Change subject: Replace User::edits() call .. Replace User::edits() call Change-Id: I9134346e1e6c3bdc6e75777fcebf9480d9af884e --- M SpecialGlobalEditcount.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/SpecialGlobalEditcount.php b/SpecialGlobalEditcount.php index 696761b..5ad148b 100644 --- a/SpecialGlobalEditcount.php +++ b/SpecialGlobalEditcount.php @@ -24,7 +24,7 @@ if ( $this->including() ) { if ( $namespace === null ) { if ( $uid != 0 ) { - $out = $wgContLang->formatNum( User::edits( $uid ) ); + $out = $wgContLang->formatNum( User::newFromName( $username )->getEditCount() ); } else { $out = ''; } -- To view, visit https://gerrit.wikimedia.org/r/324366 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9134346e1e6c3bdc6e75777fcebf9480d9af884e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GlobalContribs Gerrit-Branch: master Gerrit-Owner: ReedyGerrit-Reviewer: Legoktm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] integration/config[master]: Replace visualeditor-jsduck-jessie with npm-run-doc-jessie t...
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/324368 Change subject: Replace visualeditor-jsduck-jessie with npm-run-doc-jessie template .. Replace visualeditor-jsduck-jessie with npm-run-doc-jessie template Projects should either run the generic 'jsduck' job, or if using npm, run 'npm install' with 'npm run doc' (which puts the main command, e.g. jsduck) in the package.json file alongside the other dependencies that the project wants. This avoids hardcoding a relationship on one side in the repo and on the other side in Jenkins. This also allows one to specify predoc/postdoc tasks in package.json which many projects already use. This matches oojs-ui, mediawiki-core, parsoid and others. Change-Id: Idd396f1acaec78fe49379e688bab2b759164e90b --- M jjb/misc.yaml 1 file changed, 2 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/68/324368/1 diff --git a/jjb/misc.yaml b/jjb/misc.yaml index 01217c6..4605d46 100644 --- a/jjb/misc.yaml +++ b/jjb/misc.yaml @@ -198,23 +198,12 @@ publishers: - castor-save -# VisualEditor has dependencies that have to be installed via npm first. -- job: -name: 'visualeditor-jsduck-jessie' -node: ci-jessie-wikimedia -defaults: use-remote-zuul-shallow-clone -concurrent: false -triggers: - - zuul -builders: - - castor-load - - npm-install - - jsduck - - project: name: visualeditor jobs: - '{name}-npm-node-4-jessie' +- '{name}-npm-run-{script}-node-4-jessie': + script: 'doc' - '{name}-rake-jessie' - job: -- To view, visit https://gerrit.wikimedia.org/r/324368 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idd396f1acaec78fe49379e688bab2b759164e90b Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Krinkle___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: User::edits() was removed
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/324367 Change subject: User::edits() was removed .. User::edits() was removed Change-Id: I3ebe2cceb94a0d61a9e0ab5bb0599e8a03146046 --- M RELEASE-NOTES-1.29 M includes/user/User.php 2 files changed, 2 insertions(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/67/324367/1 diff --git a/RELEASE-NOTES-1.29 b/RELEASE-NOTES-1.29 index 386dee4..863ceaf 100644 --- a/RELEASE-NOTES-1.29 +++ b/RELEASE-NOTES-1.29 @@ -53,6 +53,7 @@ === Other changes in 1.29 === * Database::getSearchEngine() (deprecated in 1.28) was removed. Use SearchEngineFactory::getSearchEngineClass() instead. +* User::edits() (deprecated in 1.21) was removed. == Compatibility == diff --git a/includes/user/User.php b/includes/user/User.php index 82d8806..6a6748f 100644 --- a/includes/user/User.php +++ b/includes/user/User.php @@ -1099,20 +1099,6 @@ } /** -* Count the number of edits of a user -* -* @param int $uid User ID to check -* @return int The user's edit count -* -* @deprecated since 1.21 in favour of User::getEditCount -*/ - public static function edits( $uid ) { - wfDeprecated( __METHOD__, '1.21' ); - $user = self::newFromId( $uid ); - return $user->getEditCount(); - } - - /** * Return a random password. * * @deprecated since 1.27, use PasswordFactory::generateRandomPasswordString() @@ -1649,7 +1635,7 @@ // If the block is not valid, clear the block cookie (but don't delete it, // because it needs to be cleared from LocalStorage as well and an empty string // value is checked for in the mediawiki.user.blockcookie module). - $tmpBlock->setCookie( $this->getRequest()->response(), true ); + $block->setCookie( $this->getRequest()->response(), true ); } } } -- To view, visit https://gerrit.wikimedia.org/r/324367 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3ebe2cceb94a0d61a9e0ab5bb0599e8a03146046 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Reedy___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...GlobalContribs[master]: Replace User::edits() call
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/324366 Change subject: Replace User::edits() call .. Replace User::edits() call Change-Id: I9134346e1e6c3bdc6e75777fcebf9480d9af884e --- M SpecialGlobalEditcount.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GlobalContribs refs/changes/66/324366/1 diff --git a/SpecialGlobalEditcount.php b/SpecialGlobalEditcount.php index 696761b..5ad148b 100644 --- a/SpecialGlobalEditcount.php +++ b/SpecialGlobalEditcount.php @@ -24,7 +24,7 @@ if ( $this->including() ) { if ( $namespace === null ) { if ( $uid != 0 ) { - $out = $wgContLang->formatNum( User::edits( $uid ) ); + $out = $wgContLang->formatNum( User::newFromName( $username )->getEditCount() ); } else { $out = ''; } -- To view, visit https://gerrit.wikimedia.org/r/324366 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9134346e1e6c3bdc6e75777fcebf9480d9af884e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GlobalContribs Gerrit-Branch: master Gerrit-Owner: Reedy___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Removed Xml::escapeJsString()
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/324365 Change subject: Removed Xml::escapeJsString() .. Removed Xml::escapeJsString() Change-Id: Iead8385a72a79632a90594a8828080a6d572e039 --- M RELEASE-NOTES-1.29 M includes/Xml.php M tests/phpunit/includes/XmlTest.php 3 files changed, 1 insertion(+), 47 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/65/324365/1 diff --git a/RELEASE-NOTES-1.29 b/RELEASE-NOTES-1.29 index 386dee4..86cb0b4 100644 --- a/RELEASE-NOTES-1.29 +++ b/RELEASE-NOTES-1.29 @@ -53,6 +53,7 @@ === Other changes in 1.29 === * Database::getSearchEngine() (deprecated in 1.28) was removed. Use SearchEngineFactory::getSearchEngineClass() instead. +* Xml::escapeJsString() (deprecated in 1.21) was removed. == Compatibility == diff --git a/includes/Xml.php b/includes/Xml.php index 4c6b071..e124c38 100644 --- a/includes/Xml.php +++ b/includes/Xml.php @@ -614,42 +614,6 @@ } /** -* Returns an escaped string suitable for inclusion in a string literal -* for JavaScript source code. -* Illegal control characters are assumed not to be present. -* -* @deprecated since 1.21; use Xml::encodeJsVar() or Xml::encodeJsCall() instead -* @param string $string String to escape -* @return string -*/ - public static function escapeJsString( $string ) { - // See ECMA 262 section 7.8.4 for string literal format - $pairs = [ - "\\" => "", - "\"" => "\\\"", - '\'' => '\\\'', - "\n" => "\\n", - "\r" => "\\r", - - # To avoid closing the element or CDATA section - "<" => "\\x3c", - ">" => "\\x3e", - - # To avoid any complaints about bad entity refs - "&" => "\\x26", - - # Work around https://bugzilla.mozilla.org/show_bug.cgi?id=274152 - # Encode certain Unicode formatting chars so affected - # versions of Gecko don't misinterpret our strings; - # this is a common problem with Farsi text. - "\xe2\x80\x8c" => "\\u200c", // ZERO WIDTH NON-JOINER - "\xe2\x80\x8d" => "\\u200d", // ZERO WIDTH JOINER - ]; - - return strtr( $string, $pairs ); - } - - /** * Encode a variable of arbitrary type to JavaScript. * If the value is an XmlJsCode object, pass through the object's value verbatim. * diff --git a/tests/phpunit/includes/XmlTest.php b/tests/phpunit/includes/XmlTest.php index dbd1299..18ff1f4 100644 --- a/tests/phpunit/includes/XmlTest.php +++ b/tests/phpunit/includes/XmlTest.php @@ -306,17 +306,6 @@ } /** -* @covers Xml::escapeJsString -*/ - public function testEscapeJsStringSpecialChars() { - $this->assertEquals( - '\r\n', - Xml::escapeJsString( "\\\r\n" ), - 'escapeJsString() with special characters' - ); - } - - /** * @covers Xml::encodeJsVar */ public function testEncodeJsVarBoolean() { -- To view, visit https://gerrit.wikimedia.org/r/324365 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iead8385a72a79632a90594a8828080a6d572e039 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Reedy___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: Change Return-To URL in Special:Newsletter/xx/announce to 'R...
jenkins-bot has submitted this change and it was merged. Change subject: Change Return-To URL in Special:Newsletter/xx/announce to 'Return to Newsletter:Foo' instead of 'Return to Special:Newsletter/1'- Part of migration to ContentHandler .. Change Return-To URL in Special:Newsletter/xx/announce to 'Return to Newsletter:Foo' instead of 'Return to Special:Newsletter/1' - Part of migration to ContentHandler Bug: T150096 Change-Id: I82b494dd243250f906090dbaa85df8d5b1421481 --- M includes/specials/SpecialNewsletter.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: 01tonythomas: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/specials/SpecialNewsletter.php b/includes/specials/SpecialNewsletter.php index fe6312c..90638d9 100644 --- a/includes/specials/SpecialNewsletter.php +++ b/includes/specials/SpecialNewsletter.php @@ -527,7 +527,7 @@ ->numParams( $this->newsletter->getSubscriberCount() ) ->parseAsBlock() ); - $out->addReturnTo( $this->getPageTitle( $this->newsletter->getId() ) ); + $out->addReturnTo( Title::makeTitleSafe( NS_NEWSLETTER, $this->newsletter->getName() ) ); } } -- To view, visit https://gerrit.wikimedia.org/r/324361 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I82b494dd243250f906090dbaa85df8d5b1421481 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Newsletter Gerrit-Branch: master Gerrit-Owner: MtDuGerrit-Reviewer: 01tonythomas <01tonytho...@gmail.com> Gerrit-Reviewer: Addshore Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Test cookie blocking on Test Wikipedia
jenkins-bot has submitted this change and it was merged. Change subject: Test cookie blocking on Test Wikipedia .. Test cookie blocking on Test Wikipedia Don't merge until 1.29.0-wmf.4 is deployed to testwiki (Nov. 29). Bug: T150991 Change-Id: Iae8e05f651e4036bed752380932848d1a0d8e458 --- M wmf-config/InitialiseSettings.php 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Kaldari: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 80162c2..523a7f5 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -7351,6 +7351,11 @@ 'votewiki' => true, // T74589 ], +'wgCookieSetOnAutoblock' => [ + 'default' => false, + 'testwiki' => true, // T150991 +], + # groupOverrides @{ 'groupOverrides' => [ // Note: don't change the default setting here, because it won't take -- To view, visit https://gerrit.wikimedia.org/r/322154 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iae8e05f651e4036bed752380932848d1a0d8e458 Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: KaldariGerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: Kaldari Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...LiquidThreads[master]: Replace $job->insert() call
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/324364 Change subject: Replace $job->insert() call .. Replace $job->insert() call Change-Id: I19b49a8e5c5b3098cc7b4a66f9c58633d29695a7 --- M classes/Threads.php 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LiquidThreads refs/changes/64/324364/1 diff --git a/classes/Threads.php b/classes/Threads.php index f535823..e9e4143 100644 --- a/classes/Threads.php +++ b/classes/Threads.php @@ -365,8 +365,10 @@ if ( $limit && ( $rowsAffected >= $limit ) && $queueMore ) { $jobParams = array( 'limit' => $limit, 'cascade' => true ); - $job = new SynchroniseThreadArticleDataJob( $article->getTitle(), $jobParams ); - $job->insert(); + JobQueueGroup::singleton()->push( + SynchroniseThreadArticleDataJob( $article->getTitle(), + $jobParams + ); } return $limit ? ( $rowsAffected < $limit ) : true; -- To view, visit https://gerrit.wikimedia.org/r/324364 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I19b49a8e5c5b3098cc7b4a66f9c58633d29695a7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/LiquidThreads Gerrit-Branch: master Gerrit-Owner: Reedy___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Replace job->insert() calls
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/324363 Change subject: Replace job->insert() calls .. Replace job->insert() calls Change-Id: I4d4249a62c489ab3e4e2e229ba4326a7e27a0d0c --- M WebVideoTranscode/WebVideoTranscode.php M maintenance/resetTranscodes.php 2 files changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/63/324363/1 diff --git a/WebVideoTranscode/WebVideoTranscode.php b/WebVideoTranscode/WebVideoTranscode.php index 2e041b9..2b2b9ae 100644 --- a/WebVideoTranscode/WebVideoTranscode.php +++ b/WebVideoTranscode/WebVideoTranscode.php @@ -1187,10 +1187,11 @@ 'transcodeKey' => $transcodeKey, ] ); - if ( $job->insert() ) { + try { + JobQueueGroup::singleton()->push( $job ); // Clear the state cache ( now that we have updated the page ) self::clearTranscodeCache( $fileName ); - } else { + } catch (InvalidArgumentException $ex) { // Adding job failed, update transcode row $db->update( 'transcode', diff --git a/maintenance/resetTranscodes.php b/maintenance/resetTranscodes.php index 4677c7d..ffb2605 100644 --- a/maintenance/resetTranscodes.php +++ b/maintenance/resetTranscodes.php @@ -31,7 +31,7 @@ 'transcodeMode' => 'derivative', 'transcodeKey' => $row->transcode_key, ] ); - $job->insert(); + JobQueueGroup::singleton()->push( $job ); } } } -- To view, visit https://gerrit.wikimedia.org/r/324363 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4d4249a62c489ab3e4e2e229ba4326a7e27a0d0c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: Reedy___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: logstash: switch to /srv partitioning for ingester hosts
Filippo Giunchedi has uploaded a new change for review. https://gerrit.wikimedia.org/r/324362 Change subject: logstash: switch to /srv partitioning for ingester hosts .. logstash: switch to /srv partitioning for ingester hosts Bug: T150108 Change-Id: I6ec0bd6da34f47f59f6bbd11ff2322f9527764df --- M modules/install_server/files/autoinstall/netboot.cfg 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/62/324362/1 diff --git a/modules/install_server/files/autoinstall/netboot.cfg b/modules/install_server/files/autoinstall/netboot.cfg index e9c4dfe..a8ca3fd 100755 --- a/modules/install_server/files/autoinstall/netboot.cfg +++ b/modules/install_server/files/autoinstall/netboot.cfg @@ -101,7 +101,7 @@ labvirt100[1-9]) echo partman/virt-hp.cfg ;; \ labvirt101[0-4]) echo partman/labvirt-ssd.cfg ;; \ lithium|wezen) echo partman/raid1-gpt.cfg ;; \ -logstash100[1-3]) echo partman/raid1-lvm-ext4.cfg ;; \ +logstash100[1-3]) echo partman/raid1-lvm-ext4-srv.cfg ;; \ logstash100[4-6]) echo partman/logstash.cfg ;; \ lvs100[7-9]|lvs101[012]|lvs2*) echo partman/flat.cfg ;; \ lvs100[1-6]|lvs[34]*) echo partman/raid1-lvm.cfg ;; \ -- To view, visit https://gerrit.wikimedia.org/r/324362 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6ec0bd6da34f47f59f6bbd11ff2322f9527764df Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ReplaceText[master]: Remove Job::batchInsert() back compat
jenkins-bot has submitted this change and it was merged. Change subject: Remove Job::batchInsert() back compat .. Remove Job::batchInsert() back compat Breaks back compat < MW 1.21 Change-Id: I7f56968f6efca4bf7e546097aadd66e0de190d66 --- M SpecialReplaceText.php 1 file changed, 1 insertion(+), 6 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/SpecialReplaceText.php b/SpecialReplaceText.php index da762ac..10ef63e 100644 --- a/SpecialReplaceText.php +++ b/SpecialReplaceText.php @@ -98,12 +98,7 @@ } } - // BC for 1.20 and lower - if ( class_exists( 'JobQueueGroup' ) ) { - JobQueueGroup::singleton()->push( $jobs ); - } else { - Job::batchInsert( $jobs ); - } + JobQueueGroup::singleton()->push( $jobs ); $count = $this->getLanguage()->formatNum( count( $jobs ) ); $out->addWikiMsg( -- To view, visit https://gerrit.wikimedia.org/r/324358 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7f56968f6efca4bf7e546097aadd66e0de190d66 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ReplaceText Gerrit-Branch: master Gerrit-Owner: ReedyGerrit-Reviewer: Krinkle Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...PdfHandler[master]: Replace Job::batchInsert() call with JobQueueGroup::singleto...
jenkins-bot has submitted this change and it was merged. Change subject: Replace Job::batchInsert() call with JobQueueGroup::singleton()->push() .. Replace Job::batchInsert() call with JobQueueGroup::singleton()->push() Decrease indenting Change-Id: Ib8c91a6ebf9a7addba3f98300f604ee1b433d5a2 --- M CreatePdfThumbnailsJob.class.php 1 file changed, 9 insertions(+), 7 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/CreatePdfThumbnailsJob.class.php b/CreatePdfThumbnailsJob.class.php index aba204f..b8a67b2 100644 --- a/CreatePdfThumbnailsJob.class.php +++ b/CreatePdfThumbnailsJob.class.php @@ -113,14 +113,16 @@ $jobs = array(); for ( $i = 1; $i <= $pages; $i++ ) { - $jobs[] = new CreatePdfThumbnailsJob( $title, - array( 'page' => $i, 'jobtype' => self::BIG_THUMB ) - ); - $jobs[] = new CreatePdfThumbnailsJob( $title, - array( 'page' => $i, 'jobtype' => self::SMALL_THUMB ) - ); + $jobs[] = new CreatePdfThumbnailsJob( + $title, + array( 'page' => $i, 'jobtype' => self::BIG_THUMB ) + ); + $jobs[] = new CreatePdfThumbnailsJob( + $title, + array( 'page' => $i, 'jobtype' => self::SMALL_THUMB ) + ); } - Job::batchInsert( $jobs ); + JobQueueGroup::singleton()->push( $jobs ); return true; } } -- To view, visit https://gerrit.wikimedia.org/r/324356 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib8c91a6ebf9a7addba3f98300f604ee1b433d5a2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PdfHandler Gerrit-Branch: master Gerrit-Owner: ReedyGerrit-Reviewer: Krinkle Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: Change Return-To URL in Special:Newsletter/xx/announce to 'R...
MtDu has uploaded a new change for review. https://gerrit.wikimedia.org/r/324361 Change subject: Change Return-To URL in Special:Newsletter/xx/announce to 'Return to Newsletter:Foo' instead of 'Return to Special:Newsletter/1'- Part of migration to ContentHandler .. Change Return-To URL in Special:Newsletter/xx/announce to 'Return to Newsletter:Foo' instead of 'Return to Special:Newsletter/1' - Part of migration to ContentHandler Bug: T150096 Change-Id: I82b494dd243250f906090dbaa85df8d5b1421481 --- M includes/specials/SpecialNewsletter.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Newsletter refs/changes/61/324361/1 diff --git a/includes/specials/SpecialNewsletter.php b/includes/specials/SpecialNewsletter.php index fe6312c..90638d9 100644 --- a/includes/specials/SpecialNewsletter.php +++ b/includes/specials/SpecialNewsletter.php @@ -527,7 +527,7 @@ ->numParams( $this->newsletter->getSubscriberCount() ) ->parseAsBlock() ); - $out->addReturnTo( $this->getPageTitle( $this->newsletter->getId() ) ); + $out->addReturnTo( Title::makeTitleSafe( NS_NEWSLETTER, $this->newsletter->getName() ) ); } } -- To view, visit https://gerrit.wikimedia.org/r/324361 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I82b494dd243250f906090dbaa85df8d5b1421481 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Newsletter Gerrit-Branch: master Gerrit-Owner: MtDu___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/vendor[master]: Update OOjs UI to v0.18.1
Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/324359 Change subject: Update OOjs UI to v0.18.1 .. Update OOjs UI to v0.18.1 Release notes: https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.18.1 Change-Id: I5fe3129c9ccf3fa20494b5934bca7487d8d36879 --- M composer.json M composer.lock M composer/installed.json M oojs/oojs-ui/.eslintrc.json M oojs/oojs-ui/History.md M oojs/oojs-ui/i18n/el.json M oojs/oojs-ui/package.json 7 files changed, 37 insertions(+), 19 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vendor refs/changes/59/324359/1 diff --git a/composer.json b/composer.json index 02d8104..08f6361 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ "mediawiki/at-ease": "1.1.0", "monolog/monolog": "1.18.2", "nmred/kafka-php": "0.1.5", - "oojs/oojs-ui": "0.18.0", + "oojs/oojs-ui": "0.18.1", "oyejorge/less.php": "1.7.0.10", "pear/console_getopt": "1.4.1", "pear/mail": "1.3.0", diff --git a/composer.lock b/composer.lock index 245..2d3478d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;, "This file is @generated automatically" ], -"hash": "b17b7a811c8ff679b7c6d108c1f81e83", -"content-hash": "da2b764402ee804df059aa5368f84c2d", +"hash": "daf95cab5f0e13ba012ec53bfae0e490", +"content-hash": "f7ace3b62ac0b6ae882b4c45c57641d1", "packages": [ { "name": "composer/semver", @@ -466,16 +466,16 @@ }, { "name": "oojs/oojs-ui", -"version": "v0.18.0", +"version": "v0.18.1", "source": { "type": "git", "url": "https://github.com/wikimedia/oojs-ui.git;, -"reference": "9bb664bf24be66b4d887b976fd6e71c460c15ffd" +"reference": "4f8a906bac3a2fb7e1df5bcf184c96c7f79c6624" }, "dist": { "type": "zip", -"url": "https://api.github.com/repos/wikimedia/oojs-ui/zipball/9bb664bf24be66b4d887b976fd6e71c460c15ffd;, -"reference": "9bb664bf24be66b4d887b976fd6e71c460c15ffd", +"url": "https://api.github.com/repos/wikimedia/oojs-ui/zipball/4f8a906bac3a2fb7e1df5bcf184c96c7f79c6624;, +"reference": "4f8a906bac3a2fb7e1df5bcf184c96c7f79c6624", "shasum": "" }, "require": { @@ -541,7 +541,7 @@ ], "description": "Provides library of common widgets, layouts, and windows.", "homepage": "https://www.mediawiki.org/wiki/OOjs_UI;, -"time": "2016-11-08 23:36:02" +"time": "2016-11-29 22:02:31" }, { "name": "oyejorge/less.php", diff --git a/composer/installed.json b/composer/installed.json index bb5d6a4..2674d04 100644 --- a/composer/installed.json +++ b/composer/installed.json @@ -1974,17 +1974,17 @@ }, { "name": "oojs/oojs-ui", -"version": "v0.18.0", -"version_normalized": "0.18.0.0", +"version": "v0.18.1", +"version_normalized": "0.18.1.0", "source": { "type": "git", "url": "https://github.com/wikimedia/oojs-ui.git;, -"reference": "9bb664bf24be66b4d887b976fd6e71c460c15ffd" +"reference": "4f8a906bac3a2fb7e1df5bcf184c96c7f79c6624" }, "dist": { "type": "zip", -"url": "https://api.github.com/repos/wikimedia/oojs-ui/zipball/9bb664bf24be66b4d887b976fd6e71c460c15ffd;, -"reference": "9bb664bf24be66b4d887b976fd6e71c460c15ffd", +"url": "https://api.github.com/repos/wikimedia/oojs-ui/zipball/4f8a906bac3a2fb7e1df5bcf184c96c7f79c6624;, +"reference": "4f8a906bac3a2fb7e1df5bcf184c96c7f79c6624", "shasum": "" }, "require": { @@ -1996,7 +1996,7 @@ "mediawiki/mediawiki-codesniffer": "0.6.0", "phpunit/phpunit": "4.8.21" }, -"time": "2016-11-08 23:36:02", +"time": "2016-11-29 22:02:31", "type": "library", "installation-source": "dist", "autoload": { diff --git a/oojs/oojs-ui/.eslintrc.json b/oojs/oojs-ui/.eslintrc.json index bb22a9a..aaf8b7f 100644 --- a/oojs/oojs-ui/.eslintrc.json +++ b/oojs/oojs-ui/.eslintrc.json @@ -13,8 +13,7 @@ }, "rules": { -"dot-notation": 0, - "valid-jsdoc": 0, - "wrap-iife": 0 +"dot-notation": [ "error", { "allowKeywords": true } ], +"valid-jsdoc": 0 } } diff --git a/oojs/oojs-ui/History.md b/oojs/oojs-ui/History.md index 07695a5..bed1b26 100644 ---
[MediaWiki-commits] [Gerrit] mediawiki...ReplaceText[master]: Remove Job::batchInsert() back compat
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/324358 Change subject: Remove Job::batchInsert() back compat .. Remove Job::batchInsert() back compat Breaks back compat < MW 1.21 Change-Id: I7f56968f6efca4bf7e546097aadd66e0de190d66 --- M SpecialReplaceText.php 1 file changed, 1 insertion(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ReplaceText refs/changes/58/324358/1 diff --git a/SpecialReplaceText.php b/SpecialReplaceText.php index da762ac..10ef63e 100644 --- a/SpecialReplaceText.php +++ b/SpecialReplaceText.php @@ -98,12 +98,7 @@ } } - // BC for 1.20 and lower - if ( class_exists( 'JobQueueGroup' ) ) { - JobQueueGroup::singleton()->push( $jobs ); - } else { - Job::batchInsert( $jobs ); - } + JobQueueGroup::singleton()->push( $jobs ); $count = $this->getLanguage()->formatNum( count( $jobs ) ); $out->addWikiMsg( -- To view, visit https://gerrit.wikimedia.org/r/324358 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7f56968f6efca4bf7e546097aadd66e0de190d66 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ReplaceText Gerrit-Branch: master Gerrit-Owner: Reedy___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Update OOjs UI to v0.18.1
Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/324357 Change subject: Update OOjs UI to v0.18.1 .. Update OOjs UI to v0.18.1 Release notes: https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.18.1 Change-Id: I5fe3129c9ccf3fa20494b5934bca7487d8d36879 --- M composer.json M resources/lib/oojs-ui/i18n/el.json M resources/lib/oojs-ui/oojs-ui-apex.js M resources/lib/oojs-ui/oojs-ui-core-apex.css M resources/lib/oojs-ui/oojs-ui-core-mediawiki.css M resources/lib/oojs-ui/oojs-ui-core.js M resources/lib/oojs-ui/oojs-ui-mediawiki.js M resources/lib/oojs-ui/oojs-ui-toolbars-apex.css M resources/lib/oojs-ui/oojs-ui-toolbars-mediawiki.css M resources/lib/oojs-ui/oojs-ui-toolbars.js M resources/lib/oojs-ui/oojs-ui-widgets-apex.css M resources/lib/oojs-ui/oojs-ui-widgets-mediawiki.css M resources/lib/oojs-ui/oojs-ui-widgets.js M resources/lib/oojs-ui/oojs-ui-windows-apex.css M resources/lib/oojs-ui/oojs-ui-windows-mediawiki.css M resources/lib/oojs-ui/oojs-ui-windows.js M resources/lib/oojs-ui/themes/mediawiki/icons-alerts.json M resources/lib/oojs-ui/themes/mediawiki/icons-content.json M resources/lib/oojs-ui/themes/mediawiki/icons-editing-advanced.json M resources/lib/oojs-ui/themes/mediawiki/icons-editing-core.json M resources/lib/oojs-ui/themes/mediawiki/icons-editing-list.json M resources/lib/oojs-ui/themes/mediawiki/icons-editing-styling.json M resources/lib/oojs-ui/themes/mediawiki/icons-interactions.json M resources/lib/oojs-ui/themes/mediawiki/icons-layout.json M resources/lib/oojs-ui/themes/mediawiki/icons-location.json M resources/lib/oojs-ui/themes/mediawiki/icons-media.json M resources/lib/oojs-ui/themes/mediawiki/icons-moderation.json M resources/lib/oojs-ui/themes/mediawiki/icons-movement.json M resources/lib/oojs-ui/themes/mediawiki/icons-user.json M resources/lib/oojs-ui/themes/mediawiki/icons-wikimedia.json M resources/lib/oojs-ui/themes/mediawiki/icons.json M resources/lib/oojs-ui/themes/mediawiki/images/icons/block-destructive.png M resources/lib/oojs-ui/themes/mediawiki/images/icons/block-destructive.svg M resources/lib/oojs-ui/themes/mediawiki/images/icons/cancel-destructive.png M resources/lib/oojs-ui/themes/mediawiki/images/icons/cancel-destructive.svg M resources/lib/oojs-ui/themes/mediawiki/images/icons/check-destructive.png M resources/lib/oojs-ui/themes/mediawiki/images/icons/check-destructive.svg M resources/lib/oojs-ui/themes/mediawiki/images/icons/lock-ltr-destructive.png M resources/lib/oojs-ui/themes/mediawiki/images/icons/lock-ltr-destructive.svg M resources/lib/oojs-ui/themes/mediawiki/images/icons/lock-rtl-destructive.png M resources/lib/oojs-ui/themes/mediawiki/images/icons/lock-rtl-destructive.svg M resources/lib/oojs-ui/themes/mediawiki/images/icons/tag-destructive.png M resources/lib/oojs-ui/themes/mediawiki/images/icons/tag-destructive.svg M resources/lib/oojs-ui/themes/mediawiki/images/icons/trash-destructive.png M resources/lib/oojs-ui/themes/mediawiki/images/icons/trash-destructive.svg M resources/lib/oojs-ui/themes/mediawiki/images/icons/unLock-ltr-destructive.png M resources/lib/oojs-ui/themes/mediawiki/images/icons/unLock-ltr-destructive.svg M resources/lib/oojs-ui/themes/mediawiki/images/icons/unLock-rtl-destructive.png M resources/lib/oojs-ui/themes/mediawiki/images/icons/unLock-rtl-destructive.svg M resources/lib/oojs-ui/themes/mediawiki/indicators.json 50 files changed, 148 insertions(+), 114 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/57/324357/1 diff --git a/composer.json b/composer.json index e1d9f47..19ca238 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ "ext-xml": "*", "liuggio/statsd-php-client": "1.0.18", "mediawiki/at-ease": "1.1.0", - "oojs/oojs-ui": "0.18.0", + "oojs/oojs-ui": "0.18.1", "oyejorge/less.php": "1.7.0.10", "php": ">=5.5.9", "psr/log": "1.0.0", diff --git a/resources/lib/oojs-ui/i18n/el.json b/resources/lib/oojs-ui/i18n/el.json index 8538417..98835d5 100644 --- a/resources/lib/oojs-ui/i18n/el.json +++ b/resources/lib/oojs-ui/i18n/el.json @@ -24,6 +24,7 @@ "ooui-dialog-process-dismiss": "Απόρριψη", "ooui-dialog-process-retry": "Δοκιμάστε ξανά", "ooui-dialog-process-continue": "Συνέχεια", + "ooui-selectfile-button-select": "Επιλέξτε ένα αρχείο", "ooui-selectfile-not-supported": "Επιλογή αρχείου δεν υποστηρίζεται", "ooui-selectfile-placeholder": "Κανένα αρχείο δεν είναι επιλεγμένο", "ooui-selectfile-dragdrop-placeholder": "Σύρετε το αρχείο εδώ" diff --git a/resources/lib/oojs-ui/oojs-ui-apex.js b/resources/lib/oojs-ui/oojs-ui-apex.js index 542447d..a96ae13 100644 --- a/resources/lib/oojs-ui/oojs-ui-apex.js +++ b/resources/lib/oojs-ui/oojs-ui-apex.js @@ -1,12 +1,12 @@ /*! - * OOjs
[MediaWiki-commits] [Gerrit] mediawiki...PdfHandler[master]: Replace Job::batchInsert() call with JobQueueGroup::singleto...
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/324356 Change subject: Replace Job::batchInsert() call with JobQueueGroup::singleton()->push() .. Replace Job::batchInsert() call with JobQueueGroup::singleton()->push() Decrease indenting Change-Id: Ib8c91a6ebf9a7addba3f98300f604ee1b433d5a2 --- M CreatePdfThumbnailsJob.class.php 1 file changed, 9 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PdfHandler refs/changes/56/324356/1 diff --git a/CreatePdfThumbnailsJob.class.php b/CreatePdfThumbnailsJob.class.php index aba204f..b8a67b2 100644 --- a/CreatePdfThumbnailsJob.class.php +++ b/CreatePdfThumbnailsJob.class.php @@ -113,14 +113,16 @@ $jobs = array(); for ( $i = 1; $i <= $pages; $i++ ) { - $jobs[] = new CreatePdfThumbnailsJob( $title, - array( 'page' => $i, 'jobtype' => self::BIG_THUMB ) - ); - $jobs[] = new CreatePdfThumbnailsJob( $title, - array( 'page' => $i, 'jobtype' => self::SMALL_THUMB ) - ); + $jobs[] = new CreatePdfThumbnailsJob( + $title, + array( 'page' => $i, 'jobtype' => self::BIG_THUMB ) + ); + $jobs[] = new CreatePdfThumbnailsJob( + $title, + array( 'page' => $i, 'jobtype' => self::SMALL_THUMB ) + ); } - Job::batchInsert( $jobs ); + JobQueueGroup::singleton()->push( $jobs ); return true; } } -- To view, visit https://gerrit.wikimedia.org/r/324356 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib8c91a6ebf9a7addba3f98300f604ee1b433d5a2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PdfHandler Gerrit-Branch: master Gerrit-Owner: Reedy___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Replace Linker::link() usage with LinkRenderer in the follow...
MtDu has uploaded a new change for review. https://gerrit.wikimedia.org/r/324355 Change subject: Replace Linker::link() usage with LinkRenderer in the following special pages: - SpecialAllPages - SpecialAncientpage- SpecialBlock - SpecialBrokenRedirects- SpecialDoubleRedirects .. Replace Linker::link() usage with LinkRenderer in the following special pages: - SpecialAllPages - SpecialAncientpage - SpecialBlock - SpecialBrokenRedirects - SpecialDoubleRedirects Bug: T149346 Change-Id: Ib9997ec29b5c0079acb79dc2772196b38665145d --- M includes/specials/SpecialAllPages.php M includes/specials/SpecialAncientpages.php M includes/specials/SpecialBlock.php M includes/specials/SpecialBrokenRedirects.php M includes/specials/SpecialDoubleRedirects.php 5 files changed, 37 insertions(+), 30 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/55/324355/1 diff --git a/includes/specials/SpecialAllPages.php b/includes/specials/SpecialAllPages.php index 4a2a619..4b8446a 100644 --- a/includes/specials/SpecialAllPages.php +++ b/includes/specials/SpecialAllPages.php @@ -204,6 +204,7 @@ ] ); + $linkRenderer = $this->getLinkRenderer(); if ( $res->numRows() > 0 ) { $out = Html::openElement( 'ul', [ 'class' => 'mw-allpages-chunk' ] ); @@ -213,7 +214,7 @@ $out .= 'page_is_redirect ? ' class="allpagesredirect"' : '' ) . '>' . - Linker::link( $t ) . + $linkRenderer->makeLink( $t ) . "\n"; } else { $out .= '[[' . htmlspecialchars( $s->page_title ) . "]]\n"; @@ -269,6 +270,7 @@ $navLinks = []; $self = $this->getPageTitle(); + $linkRenderer = $this->getLinkRenderer(); // Generate a "previous page" link if needed if ( $prevTitle ) { $query = [ 'from' => $prevTitle->getText() ]; @@ -281,9 +283,9 @@ $query['hideredirects'] = $hideredirects; } - $navLinks[] = Linker::linkKnown( + $navLinks[] = $linkRenderer->makeKnownLink( $self, - $this->msg( 'prevpage', $prevTitle->getText() )->escaped(), + $this->msg( 'prevpage', $prevTitle->getText() )->text(), [], $query ); @@ -304,9 +306,9 @@ $query['hideredirects'] = $hideredirects; } - $navLinks[] = Linker::linkKnown( + $navLinks[] = $linkRenderer->makeKnownLink( $self, - $this->msg( 'nextpage', $t->getText() )->escaped(), + $this->msg( 'nextpage', $t->getText() )->text(), [], $query ); diff --git a/includes/specials/SpecialAncientpages.php b/includes/specials/SpecialAncientpages.php index 9ee1b75..ecc030e 100644 --- a/includes/specials/SpecialAncientpages.php +++ b/includes/specials/SpecialAncientpages.php @@ -78,9 +78,10 @@ $d = $this->getLanguage()->userTimeAndDate( $result->value, $this->getUser() ); $title = Title::makeTitle( $result->namespace, $result->title ); - $link = Linker::linkKnown( + $linkRenderer = $this->getLinkRenderer(); + $link = $linkRenderer->makeKnownLink( $title, - htmlspecialchars( $wgContLang->convert( $title->getPrefixedText() ) ) + $wgContLang->convert( $title->getPrefixedText() ) ); return $this->getLanguage()->specialList( $link, htmlspecialchars( $d ) ); diff --git a/includes/specials/SpecialBlock.php b/includes/specials/SpecialBlock.php index ce7d24e..585f70b 100644 --- a/includes/specials/SpecialBlock.php +++ b/includes/specials/SpecialBlock.php @@ -372,12 +372,13 @@ $this->getOutput()->addModuleStyles( 'mediawiki.special' ); + $linkRenderer = $this->getLinkRenderer(); # Link to the user's contributions, if applicable if ( $this->target
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Fix flaky most-read spec test
Mholloway has uploaded a new change for review. https://gerrit.wikimedia.org/r/324354 Change subject: Fix flaky most-read spec test .. Fix flaky most-read spec test There's a window each day when the most-read spec test will fail because yesterday's pageview data isn't populated in RESTBase yet. Check the schema against the response for the day before yesterday instead. Change-Id: I3ed6e99a21707be1b112f0ed4a35a30081a03f02 --- M test/features/app/spec.js 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps refs/changes/54/324354/1 diff --git a/test/features/app/spec.js b/test/features/app/spec.js index 74e3f65..5f9b67d 100644 --- a/test/features/app/spec.js +++ b/test/features/app/spec.js @@ -11,9 +11,9 @@ const Ajv= require('ajv'); const date = new Date(); -const yesterday = new Date(Date.now() - dateUtil.ONE_DAY); -const dateString = date.getUTCFullYear() + '/' + dateUtil.pad(date.getUTCMonth() + 1) + '/' + dateUtil.pad(date.getUTCDate()); -const yesterdayString = yesterday.getUTCFullYear() + '/' + dateUtil.pad(yesterday.getUTCMonth() + 1) + '/' + dateUtil.pad(yesterday.getUTCDate()); +const ereyesterday = new Date(Date.now() - 2 * dateUtil.ONE_DAY); +const dateString = `${date.getUTCFullYear()}/${dateUtil.pad(date.getUTCMonth() + 1)}/${dateUtil.pad(date.getUTCDate())}`; +const ereyesterdayString = `${ereyesterday.getUTCFullYear()}/${dateUtil.pad(ereyesterday.getUTCMonth() + 1)}/${dateUtil.pad(ereyesterday.getUTCDate())}`; function staticSpecLoad() { @@ -320,8 +320,8 @@ return assertValidSchema(uri, '#/definitions/image'); }); -it('most-read response should conform to schema', function() { -const uri = server.config.uri + 'en.wikipedia.org/v1/page/most-read/' + yesterdayString; +it('most-read response should conform to schema', () => { +const uri = `${server.config.uri}en.wikipedia.org/v1/page/most-read/${ereyesterdayString}`; return assertValidSchema(uri, '#/definitions/mostread'); }); -- To view, visit https://gerrit.wikimedia.org/r/324354 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3ed6e99a21707be1b112f0ed4a35a30081a03f02 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: Mholloway___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove $wgSessionsInMemcached
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/324353 Change subject: Remove $wgSessionsInMemcached .. Remove $wgSessionsInMemcached Change-Id: Ia2b4d62ea504a3cb04f4c2bec49b16f155c8b0c9 --- M RELEASE-NOTES-1.29 M includes/DefaultSettings.php M includes/Setup.php 3 files changed, 3 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/53/324353/1 diff --git a/RELEASE-NOTES-1.29 b/RELEASE-NOTES-1.29 index 386dee4..da2eb7f 100644 --- a/RELEASE-NOTES-1.29 +++ b/RELEASE-NOTES-1.29 @@ -53,6 +53,8 @@ === Other changes in 1.29 === * Database::getSearchEngine() (deprecated in 1.28) was removed. Use SearchEngineFactory::getSearchEngineClass() instead. +* $wgSessionsInMemcached (deprecated in 1.20) was removed. No replacement is + required as all sessions are stored in Object Cache now. == Compatibility == diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index eb778b5..5557dca 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -2366,13 +2366,6 @@ $wgParserCacheExpireTime = 86400; /** - * Deprecated alias for $wgSessionsInObjectCache. - * - * @deprecated since 1.20; Use $wgSessionsInObjectCache - */ -$wgSessionsInMemcached = true; - -/** * @deprecated since 1.27, session data is always stored in object cache. */ $wgSessionsInObjectCache = true; diff --git a/includes/Setup.php b/includes/Setup.php index 357c76d..9f722af 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -462,7 +462,7 @@ } // Backwards compatibility warning -if ( !$wgSessionsInObjectCache && !$wgSessionsInMemcached ) { +if ( !$wgSessionsInObjectCache ) { wfDeprecated( '$wgSessionsInObjectCache = false', '1.27' ); if ( $wgSessionHandler ) { wfDeprecated( '$wgSessionsHandler', '1.27' ); -- To view, visit https://gerrit.wikimedia.org/r/324353 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia2b4d62ea504a3cb04f4c2bec49b16f155c8b0c9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Reedy___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ProofreadPage[master]: Replace FSRepo with FileRepo
jenkins-bot has submitted this change and it was merged. Change subject: Replace FSRepo with FileRepo .. Replace FSRepo with FileRepo Change-Id: Id6c31cf529667253f4414729e8dfea3b41bb1ae4 --- M tests/phpunit/ProofreadPageTestCase.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/phpunit/ProofreadPageTestCase.php b/tests/phpunit/ProofreadPageTestCase.php index 8a37c75..7a1eb7e 100644 --- a/tests/phpunit/ProofreadPageTestCase.php +++ b/tests/phpunit/ProofreadPageTestCase.php @@ -55,10 +55,10 @@ private function buildFileList() { $backend = new FSFileBackend( [ 'name' => 'localtesting', - 'wikiId' => wfWikiId(), + 'wikiId' => wfWikiID(), 'containerPaths' => [ 'data' => __DIR__ . '/../data/media/' ] ] ); - $fileRepo = new FSRepo( [ + $fileRepo = new FileRepo( [ 'name' => 'temp', 'url' => 'http://localhost/thumbtest', 'backend' => $backend -- To view, visit https://gerrit.wikimedia.org/r/324348 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id6c31cf529667253f4414729e8dfea3b41bb1ae4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ProofreadPage Gerrit-Branch: master Gerrit-Owner: ReedyGerrit-Reviewer: Krinkle Gerrit-Reviewer: Tpt Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Make protect.php maintenance script not ignore --user and --...
jenkins-bot has submitted this change and it was merged. Change subject: Make protect.php maintenance script not ignore --user and --reason parameters .. Make protect.php maintenance script not ignore --user and --reason parameters Google Code-In task Bug: T89713 Change-Id: If4832fb54011af171a74b0b1a59df207b5209044 --- M maintenance/protect.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Unicornisaurous: Looks good to me, but someone else must approve TTO: Looks good to me, approved D3r1ck01: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/maintenance/protect.php b/maintenance/protect.php index 31b2101..f6bb253 100644 --- a/maintenance/protect.php +++ b/maintenance/protect.php @@ -41,8 +41,8 @@ } public function execute() { - $userName = $this->getOption( 'u', false ); - $reason = $this->getOption( 'r', '' ); + $userName = $this->getOption( 'user', false ); + $reason = $this->getOption( 'reason', '' ); $cascade = $this->hasOption( 'cascade' ); -- To view, visit https://gerrit.wikimedia.org/r/324179 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If4832fb54011af171a74b0b1a59df207b5209044 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: FilipGerrit-Reviewer: Aklapper Gerrit-Reviewer: D3r1ck01 Gerrit-Reviewer: MarcoAurelio Gerrit-Reviewer: TTO Gerrit-Reviewer: Unicornisaurous Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Phabricator: Don't use vcs group, use phd
Dzahn has submitted this change and it was merged. Change subject: Phabricator: Don't use vcs group, use phd .. Phabricator: Don't use vcs group, use phd vcs group isn't actually used anywhere so don't require it. Bug: T146055 Change-Id: I56e9b2235a02dfd1ffe18b355cdff821e2de532f --- M modules/phabricator/manifests/phd.pp M modules/role/manifests/phabricator/main.pp 2 files changed, 8 insertions(+), 9 deletions(-) Approvals: Paladox: Looks good to me, but someone else must approve 20after4: Looks good to me, but someone else must approve Dzahn: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/phabricator/manifests/phd.pp b/modules/phabricator/manifests/phd.pp index 6d43b5c..703c63e 100644 --- a/modules/phabricator/manifests/phd.pp +++ b/modules/phabricator/manifests/phd.pp @@ -7,6 +7,10 @@ $settings = {}, $basedir = '/', ) { +group { 'phd': +ensure => present, +system => true, +} # PHD user needs perms to drop root perms on start file { "${basedir}/phabricator/scripts/daemon/": @@ -27,25 +31,20 @@ file { '/var/run/phd': ensure => directory, -owner => $settings['phd.user'], +owner => 'phd', group => 'phd', } file { $settings['phd.pid-directory']: ensure => 'directory', -owner => $settings['phd.user'], +owner => 'phd', group => 'phd', } file { $settings['phd.log-directory']: ensure => 'directory', -owner => $settings['phd.user'], +owner => 'phd', group => 'phd', -} - -group { 'phd': -ensure => present, -system => true, } user { $settings['phd.user']: diff --git a/modules/role/manifests/phabricator/main.pp b/modules/role/manifests/phabricator/main.pp index 4c29663..902256e 100644 --- a/modules/role/manifests/phabricator/main.pp +++ b/modules/role/manifests/phabricator/main.pp @@ -93,7 +93,7 @@ 'vcs' => { 'environment' => 'vcs', 'owner' => 'root', -'group' => 'vcs', +'group' => 'phd', 'phab_settings' => { 'mysql.user'=> $daemons_user, 'mysql.pass'=> $daemons_pass, -- To view, visit https://gerrit.wikimedia.org/r/323996 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I56e9b2235a02dfd1ffe18b355cdff821e2de532f Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: 20after4Gerrit-Reviewer: 20after4 Gerrit-Reviewer: Dzahn Gerrit-Reviewer: Paladox Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Remove jscs in preparation for node template update
jenkins-bot has submitted this change and it was merged. Change subject: Remove jscs in preparation for node template update .. Remove jscs in preparation for node template update The new node template update enforces code styling conventions with eslint. When that happens we no longer need to rely on jscs for code styling. Change-Id: I1df9549668dc1056c8affdbbc976d58f6dc40fbb --- D .jscsrc D Gruntfile.js M package.json 3 files changed, 1 insertion(+), 58 deletions(-) Approvals: Mholloway: Looks good to me, approved jenkins-bot: Verified diff --git a/.jscsrc b/.jscsrc deleted file mode 100644 index 27a0ed2..000 --- a/.jscsrc +++ /dev/null @@ -1,36 +0,0 @@ -{ - "preset": "wikimedia", - - "requireSpaceAfterLineComment": null, - "requireSpacesInsideParentheses": false, - "requireSpacesInsideBrackets": false, - "requireSpaceAfterKeywords": false, - "requireMultipleVarDecl": null, - "requireLineBreakAfterVariableAssignment": null, - "requireSpaceAfterBinaryOperators": null, - "validateQuoteMarks": null, - "disallowTrailingComma": null, - "disallowQuotedKeysInObjects": null, - "requireSpaceBeforeObjectValues": null, - "disallowDanglingUnderscores": null, - "disallowImplicitTypeConversion": null, - "requireCamelCaseOrUpperCaseIdentifiers": null, - "disallowSpaceAfterObjectKeys": null, - "requireSpaceBeforeBinaryOperators": null, - "disallowMultipleLineBreaks": null, - "requireDotNotation": null, - "disallowSpacesInsideParentheses": null, - "validateIndentation": 4, - "requireSpaceBeforeKeywords": null, - "disallowMixedSpacesAndTabs": null, - "requireLineFeedAtFileEnd": null, - "requireSpacesInsideObjectBrackets": null, - "requireSpaceBetweenArguments": null, - "disallowUnusedVariables": true, - "disallowVar": true, - "requireVarDeclFirst": null, - "jsDoc": null, - "excludeFiles": [ -"node_modules/**" - ] -} diff --git a/Gruntfile.js b/Gruntfile.js deleted file mode 100644 index 7f369b8..000 --- a/Gruntfile.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; - -module.exports = function ( grunt ) { - grunt.loadNpmTasks("grunt-jscs"); - - grunt.initConfig( { -jscs: { -src: ['lib/**/*.js', 'routes/*.js', 'test/**/*.js' ], -options: { -config: ".jscsrc", -requireCurlyBraces: [ "if" ] -} -} - } ); - - grunt.registerTask( 'test', [ 'jscs' ] ); - - grunt.registerTask( 'default', [ 'test' ] ); -}; diff --git a/package.json b/package.json index 8b84803..4b30e76 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "./app.js", "scripts": { "start": "service-runner", -"test": "grunt test && mocha && nsp check", +"test": "mocha && nsp check", "docker-start": "service-runner docker-start", "docker-test": "service-runner docker-test", "coverage": "istanbul cover _mocha -- -R spec" @@ -59,8 +59,6 @@ "ajv": "^4.7.7", "csv-parse": "^1.1.7", "extend": "^3.0.0", -"grunt": "^1.0.1", -"grunt-jscs": "^3.0.1", "istanbul": "^0.4.5", "mocha": "^3.1.2", "mocha-jshint": "^2.3.1", -- To view, visit https://gerrit.wikimedia.org/r/324266 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1df9549668dc1056c8affdbbc976d58f6dc40fbb Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: JdlrobsonGerrit-Reviewer: BearND Gerrit-Reviewer: Dbrant Gerrit-Reviewer: Fjalapeno Gerrit-Reviewer: GWicke Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Jhernandez Gerrit-Reviewer: Mholloway Gerrit-Reviewer: Mhurd Gerrit-Reviewer: Mobrovac Gerrit-Reviewer: Niedzielski Gerrit-Reviewer: Ppchelko Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Remove 'now using' message for CirrusSearch
jenkins-bot has submitted this change and it was merged. Change subject: Remove 'now using' message for CirrusSearch .. Remove 'now using' message for CirrusSearch This was used when first deploying CirrusSearch. It may have been useful then, but seems like cruft just hanging around now. Remove it to make things just that little bit simpler. Change-Id: Ifa1bdf9126d7e2fc5b6647afbd68ffaa6de950d1 --- M CirrusSearch.php M includes/Hooks.php 2 files changed, 6 insertions(+), 30 deletions(-) Approvals: Cindy-the-browser-test-bot: Looks good to me, but someone else must approve Tjones: Looks good to me, approved jenkins-bot: Verified diff --git a/CirrusSearch.php b/CirrusSearch.php index a108f29..c9af5ed 100644 --- a/CirrusSearch.php +++ b/CirrusSearch.php @@ -542,9 +542,6 @@ // whatever is configured). $wgCirrusSearchMoreLikeThisTTL = 0; -// Show the notification about this wiki using CirrusSearch on the search page. -$wgCirrusSearchShowNowUsing = false; - // CirrusSearch interwiki searching // Keys are the interwiki prefix, values are the index to search // Results are cached. @@ -1057,7 +1054,6 @@ $wgHooks[ 'LinksUpdateComplete' ][] = 'CirrusSearch\Hooks::onLinksUpdateCompleted'; $wgHooks[ 'ResourceLoaderGetConfigVars' ][] = 'CirrusSearch\Hooks::onResourceLoaderGetConfigVars'; $wgHooks[ 'SoftwareInfo' ][] = 'CirrusSearch\Hooks::onSoftwareInfo'; -$wgHooks[ 'SpecialSearchResultsPrepend' ][] = 'CirrusSearch\Hooks::onSpecialSearchResultsPrepend'; $wgHooks[ 'SpecialSearchResultsAppend' ][] = 'CirrusSearch\Hooks::onSpecialSearchResultsAppend'; $wgHooks[ 'TitleMove' ][] = 'CirrusSearch\Hooks::onTitleMove'; $wgHooks[ 'TitleMoveComplete' ][] = 'CirrusSearch\Hooks::onTitleMoveComplete'; diff --git a/includes/Hooks.php b/includes/Hooks.php index b7cda74..9b4db24 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -430,32 +430,6 @@ } /** -* Called to prepend text before search results and inject metrics -* @param SpecialSearch $specialSearch The SpecialPage object for Special:Search -* @param OutputPage $out The output page object -* @param string $term The term being searched for -* @return bool -*/ - public static function onSpecialSearchResultsPrepend( $specialSearch, $out, $term ) { - global $wgCirrusSearchShowNowUsing; - - // Prepend our message if needed - if ( $wgCirrusSearchShowNowUsing ) { - $out->addHTML( Xml::openElement( 'div', [ 'class' => 'cirrussearch-now-using' ] ) . - $specialSearch->msg( 'cirrussearch-now-using' )->parse() . - Xml::closeElement( 'div' ) ); - } - - // Embed metrics if this was a Cirrus page - $engine = $specialSearch->getSearchEngine(); - if ( $engine instanceof CirrusSearch ) { - $out->addJsConfigVars( $engine->getLastSearchMetrics() ); - } - - return true; - } - - /** * @param SpecialSearch $specialSearch * @param OutputPage $out * @param string $term @@ -467,6 +441,12 @@ if ( $wgCirrusSearchFeedbackLink ) { self::addSearchFeedbackLink( $wgCirrusSearchFeedbackLink, $specialSearch, $out ); } + + // Embed metrics if this was a Cirrus page + $engine = $specialSearch->getSearchEngine(); + if ( $engine instanceof CirrusSearch ) { + $out->addJsConfigVars( $engine->getLastSearchMetrics() ); + } return true; } -- To view, visit https://gerrit.wikimedia.org/r/324345 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifa1bdf9126d7e2fc5b6647afbd68ffaa6de950d1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: EBernhardsonGerrit-Reviewer: Cindy-the-browser-test-bot Gerrit-Reviewer: DCausse Gerrit-Reviewer: Gehel Gerrit-Reviewer: Manybubbles Gerrit-Reviewer: Smalyshev Gerrit-Reviewer: Tjones Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ConfirmAccount[master]: Replace FSRepo with FileRepo
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/324352 Change subject: Replace FSRepo with FileRepo .. Replace FSRepo with FileRepo Change-Id: Ia4d5ad5f594b17240ef5116be7922d62738b6871 --- M ConfirmAccount.config.php M backend/ConfirmAccount.class.php M business/AccountConfirmSubmission.php M business/AccountRequestSubmission.php 4 files changed, 36 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ConfirmAccount refs/changes/52/324352/1 diff --git a/ConfirmAccount.config.php b/ConfirmAccount.config.php index 5ac1a60..ed8b798 100644 --- a/ConfirmAccount.config.php +++ b/ConfirmAccount.config.php @@ -81,23 +81,23 @@ $wgConfirmAccountFSRepos = [ 'accountreqs' => [ # Location of attached files for pending requests 'name' => 'accountreqs', - 'directory' => isset( $wgFileStore['accountreqs'] ) + 'directory' => isset( $wgFileStore['accountreqs']['directory'] ) ? $wgFileStore['accountreqs']['directory'] : false, - 'url'=> isset( $wgFileStore['accountreqs'] ) ? + 'url'=> isset( $wgFileStore['accountreqs']['url'] ) ? $wgFileStore['accountreqs']['url'] : null, - 'hashLevels' => isset( $wgFileStore['accountreqs'] ) ? - $wgFileStore['accountreqs']['hash'] : 3 + 'hashLevels' => isset( $wgFileStore['accountreqs']['hash'] ) ? + $wgFileStore['accountreqs']['hash'] : 3, ], 'accountcreds' => [ # Location of credential files 'name' => 'accountcreds', - 'directory' => isset( $wgFileStore['accountcreds'] ) - ? $wgFileStore['accountcreds']['directory'] + 'directory' => isset( $wgFileStore['accountreqs']['directory'] ) + ? $wgFileStore['accountreqs']['directory'] : false, - 'url'=> isset( $wgFileStore['accountcreds'] ) ? + 'url'=> isset( $wgFileStore['accountcreds']['url'] ) ? $wgFileStore['accountcreds']['url'] : null, - 'hashLevels' => isset( $wgFileStore['accountcreds'] ) ? - $wgFileStore['accountcreds']['hash'] : 3 + 'hashLevels' => isset( $wgFileStore['accountcreds']['url'] ) ? + $wgFileStore['accountcreds']['hash'] : 3, ] ]; diff --git a/backend/ConfirmAccount.class.php b/backend/ConfirmAccount.class.php index aacc3ac..d15e6fb 100644 --- a/backend/ConfirmAccount.class.php +++ b/backend/ConfirmAccount.class.php @@ -8,7 +8,7 @@ global $wgRejectedAccountMaxAge, $wgConfirmAccountRejectAge, $wgConfirmAccountFSRepos; $dbw = wfGetDB( DB_MASTER ); - $repo = new FSRepo( $wgConfirmAccountFSRepos['accountreqs'] ); + $repo = self::getFileRepo( $wgConfirmAccountFSRepos['accountreqs'] ); # Select all items older than time $encCutoff $encCutoff = $dbw->addQuotes( $dbw->timestamp( time() - $wgRejectedAccountMaxAge ) ); @@ -326,4 +326,26 @@ [ 'LIMIT' => 200 ] // sanity ) ); } + + /** +* @param array $info +* @return FileRepo +*/ + public static function getFileRepo( $info ) { + $repoName = $info['name']; + $directory = $info['directory']; + $info['backend'] = new FSFileBackend( [ + 'name' => $repoName . '-backend', + 'wikiId' => wfWikiID(), + 'lockManager' => LockManagerGroup::singleton( wfWikiID() )->get( 'fsLockManager' ), + 'containerPaths' => [ + "{$repoName}-public" => "{$directory}", + "{$repoName}-temp" => "{$directory}/temp", + ], + 'fileMode' => 0644, + 'tmpDirectory' => wfTempDir() + ] + ); + return new FileRepo( $info ); + } } diff --git a/business/AccountConfirmSubmission.php b/business/AccountConfirmSubmission.php index 8b6ecf4..fc62d10 100644 --- a/business/AccountConfirmSubmission.php +++ b/business/AccountConfirmSubmission.php @@ -219,8 +219,8 @@ $key = $accReq->getFileStorageKey(); # Copy any attached files to new storage group if ( $formConfig['CV']['enabled'] && $key ) { - $repoOld = new FSRepo( $wgConfirmAccountFSRepos['accountreqs'] ); - $repoNew = new
[MediaWiki-commits] [Gerrit] mediawiki...ElectronPdfService[master]: Provide missing license file
Kghbln has uploaded a new change for review. https://gerrit.wikimedia.org/r/324351 Change subject: Provide missing license file .. Provide missing license file GPL-2.0+ accoring to "extension.json" file Bug: T123943 Change-Id: I56bcd294ff8acbaf81ff7c58cf61d3fd0139aab9 --- A COPYING 1 file changed, 339 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ElectronPdfService refs/changes/51/324351/1 diff --git a/COPYING b/COPYING new file mode 100644 index 000..d159169 --- /dev/null +++ b/COPYING @@ -0,0 +1,339 @@ +GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + +GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Update to service-template-node v0.5.0 (minus eslint)
jenkins-bot has submitted this change and it was merged. Change subject: Update to service-template-node v0.5.0 (minus eslint) .. Update to service-template-node v0.5.0 (minus eslint) Adds the latest template changes but defers activating eslint testing until a patch to follow, which fixes eslint errors and enables it. Change-Id: Ie0f3ed31f6ec1607f26e1b1bd0cf1cde4f1bfd0c --- A .eslintrc.yml M .travis.yml M config.dev.yaml M lib/api-util.js M lib/util.js M package.json M routes/info.js M routes/root.js M scripts/gen-init-scripts.rb 9 files changed, 97 insertions(+), 104 deletions(-) Approvals: Jdlrobson: Looks good to me, approved jenkins-bot: Verified diff --git a/.eslintrc.yml b/.eslintrc.yml new file mode 100644 index 000..9e2c225 --- /dev/null +++ b/.eslintrc.yml @@ -0,0 +1 @@ +extends: 'eslint-config-node-services' \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index fa7f265..48addf8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,6 @@ sudo: false node_js: - - "0.10" - - "0.12" - "4" - "6" = "node" diff --git a/config.dev.yaml b/config.dev.yaml index c0e04e2..3b0d891 100644 --- a/config.dev.yaml +++ b/config.dev.yaml @@ -64,14 +64,14 @@ # the template used for contacting the MW API mwapi_req: method: post -uri: 'https://{{domain}}/w/api.php' +uri: https://{{domain}}/w/api.php headers: user-agent: '{{user-agent}}' body: '{{ default(request.query, {}) }}' # the template used for contacting RESTBase restbase_req: -method: get -uri: 'https://{{domain}}/api/rest_v1/{+path}' +method: '{{request.method}}' +uri: https://{{domain}}/api/rest_v1/{+path} query: '{{ default(request.query, {}) }}' headers: '{{request.headers}}' body: '{{request.body}}' diff --git a/lib/api-util.js b/lib/api-util.js index e763c67..e8da8da 100644 --- a/lib/api-util.js +++ b/lib/api-util.js @@ -23,14 +23,14 @@ const request = app.mwapi_tpl.expand({ request: { -params: { domain: domain }, +params: { domain }, headers: { 'user-agent': app.conf.user_agent }, -query: query +query } }); -return preq(request).then(function(response) { -if(response.status < 200 || response.status > 399) { +return preq(request).then((response) => { +if (response.status < 200 || response.status > 399) { // there was an error when calling the upstream service, propagate that throw new HTTPError({ status: response.status, @@ -67,7 +67,7 @@ const request = app.restbase_tpl.expand({ request: { method: restReq.method, -params: { domain: domain, path: path }, +params: { domain, path }, query: restReq.query, headers: Object.assign({ 'user-agent': app.conf.user_agent }, restReq.headers), body: restReq.body @@ -87,7 +87,7 @@ function setupApiTemplates(app) { // set up the MW API request template -if(!app.conf.mwapi_req) { +if (!app.conf.mwapi_req) { app.conf.mwapi_req = { uri: 'http://{{domain}}/w/api.php', headers: { @@ -99,7 +99,7 @@ app.mwapi_tpl = new Template(app.conf.mwapi_req); // set up the RESTBase request template -if(!app.conf.restbase_req) { +if (!app.conf.restbase_req) { app.conf.restbase_req = { method: '{{request.method}}', uri: 'http://{{domain}}/api/rest_v1/{+path}', @@ -130,9 +130,9 @@ module.exports = { -mwApiGet: mwApiGet, -restApiGet: restApiGet, -setupApiTemplates: setupApiTemplates, -checkResponseStatus: checkResponseStatus +mwApiGet, +restApiGet, +setupApiTemplates, +checkResponseStatus }; diff --git a/lib/util.js b/lib/util.js index 4560e96..0e607e1 100644 --- a/lib/util.js +++ b/lib/util.js @@ -2,7 +2,6 @@ const BBPromise = require('bluebird'); -const util = require('util'); const express = require('express'); const uuid = require('cassandra-uuid'); const bunyan = require('bunyan'); @@ -11,36 +10,31 @@ /** * Error instance wrapping HTTP error responses */ -function HTTPError(response) { +class HTTPError extends Error { -Error.call(this); -Error.captureStackTrace(this, HTTPError); +constructor(response) { +super(); +Error.captureStackTrace(this, HTTPError); -if(response.constructor !== Object) { -// just assume this is just the error message -const msg = response; -response = { -status: 500, -type: 'internal_error', -title: 'InternalError', -detail: msg -}; +if (response.constructor !== Object) { +// just assume this is just the error message +
[MediaWiki-commits] [Gerrit] wikimedia...dash[deployment]: Merge branch 'master' into deployment
jenkins-bot has submitted this change and it was merged. Change subject: Merge branch 'master' into deployment .. Merge branch 'master' into deployment and run gulp 856ee2f Change package node-syslog to modern-syslog 1333742 Enable syslog on OSX 14572ce Update ganglia donation queue link 1b19cda Revert "Enable syslog on OSX" c585d2e Revert "Change package node-syslog to modern-syslog" 2b7189f Bandaid for Big English board Change-Id: I1c3d087073619ad878f812da2e74063cb483047a --- M dist/index.html M dist/js.manifest.json R dist/scripts-1870f9aa.js 3 files changed, 5 insertions(+), 5 deletions(-) Approvals: Ejegg: Looks good to me, approved jenkins-bot: Verified -- To view, visit https://gerrit.wikimedia.org/r/324349 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1c3d087073619ad878f812da2e74063cb483047a Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/dash Gerrit-Branch: deployment Gerrit-Owner: EjeggGerrit-Reviewer: Cdentinger Gerrit-Reviewer: Ejegg Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Replace FSRepo with FileRepo
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/324350 Change subject: Replace FSRepo with FileRepo .. Replace FSRepo with FileRepo Change-Id: Id6ca36cfa14077efc3d07fd5129ad9e4cc224e2c --- M tests/phpunit/includes/media/MediaWikiMediaTestCase.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/50/324350/1 diff --git a/tests/phpunit/includes/media/MediaWikiMediaTestCase.php b/tests/phpunit/includes/media/MediaWikiMediaTestCase.php index e854ab5..91e8459 100644 --- a/tests/phpunit/includes/media/MediaWikiMediaTestCase.php +++ b/tests/phpunit/includes/media/MediaWikiMediaTestCase.php @@ -1,6 +1,6 @@ $containers, 'tmpDirectory' => $this->getNewTempDirectory() ] ); - $this->repo = new FSRepo( $this->getRepoOptions() ); + $this->repo = new FileRepo( $this->getRepoOptions() ); } /** -- To view, visit https://gerrit.wikimedia.org/r/324350 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id6ca36cfa14077efc3d07fd5129ad9e4cc224e2c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Reedy___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...dash[deployment]: Merge branch 'master' into deployment
Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/324349 Change subject: Merge branch 'master' into deployment .. Merge branch 'master' into deployment and run gulp 856ee2f Change package node-syslog to modern-syslog 1333742 Enable syslog on OSX 14572ce Update ganglia donation queue link 1b19cda Revert "Enable syslog on OSX" c585d2e Revert "Change package node-syslog to modern-syslog" 2b7189f Bandaid for Big English board Change-Id: I1c3d087073619ad878f812da2e74063cb483047a --- M dist/index.html M dist/js.manifest.json R dist/scripts-1870f9aa.js 3 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/dash refs/changes/49/324349/1 -- To view, visit https://gerrit.wikimedia.org/r/324349 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1c3d087073619ad878f812da2e74063cb483047a Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/dash Gerrit-Branch: deployment Gerrit-Owner: Ejegg___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ProofreadPage[master]: Replace FSRepo with FileRepo
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/324348 Change subject: Replace FSRepo with FileRepo .. Replace FSRepo with FileRepo Change-Id: Id6c31cf529667253f4414729e8dfea3b41bb1ae4 --- M tests/phpunit/ProofreadPageTestCase.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ProofreadPage refs/changes/48/324348/1 diff --git a/tests/phpunit/ProofreadPageTestCase.php b/tests/phpunit/ProofreadPageTestCase.php index 8a37c75..7a1eb7e 100644 --- a/tests/phpunit/ProofreadPageTestCase.php +++ b/tests/phpunit/ProofreadPageTestCase.php @@ -55,10 +55,10 @@ private function buildFileList() { $backend = new FSFileBackend( [ 'name' => 'localtesting', - 'wikiId' => wfWikiId(), + 'wikiId' => wfWikiID(), 'containerPaths' => [ 'data' => __DIR__ . '/../data/media/' ] ] ); - $fileRepo = new FSRepo( [ + $fileRepo = new FileRepo( [ 'name' => 'temp', 'url' => 'http://localhost/thumbtest', 'backend' => $backend -- To view, visit https://gerrit.wikimedia.org/r/324348 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id6c31cf529667253f4414729e8dfea3b41bb1ae4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ProofreadPage Gerrit-Branch: master Gerrit-Owner: Reedy___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...dash[master]: Bandaid for Big English board
jenkins-bot has submitted this change and it was merged. Change subject: Bandaid for Big English board .. Bandaid for Big English board Uses day of year - 333 (Nov 28) instead of day of month. Really need to allow a generic campaign with configurable start and end dates. This fix is only good through Dec 29th, and disables year switching. It does speed up the query a bunch, though! Bug: T151820 Change-Id: Id41536ca0613d698305dbfc2cac2540cf9f3514c --- M src/components/widgets/amt-per-second-chart/amt-per-second-chart.js M src/components/widgets/distance-to-goal-chart/distance-to-goal-chart.js M src/components/widgets/totals-earned-chart/totals-earned-chart.html M src/components/widgets/totals-earned-chart/totals-earned-chart.js M widgets/big-english.js 5 files changed, 8 insertions(+), 8 deletions(-) Approvals: Cdentinger: Looks good to me, approved jenkins-bot: Verified diff --git a/src/components/widgets/amt-per-second-chart/amt-per-second-chart.js b/src/components/widgets/amt-per-second-chart/amt-per-second-chart.js index 39e056c..d713f1d 100644 --- a/src/components/widgets/amt-per-second-chart/amt-per-second-chart.js +++ b/src/components/widgets/amt-per-second-chart/amt-per-second-chart.js @@ -80,7 +80,7 @@ x: { tick: { count: 31, - format: function(x){ return 'Dec ' + ( Math.floor( x / 24 ) + 1 ); } + format: function(x){ return 'Day ' + ( Math.floor( x / 24 ) + 1 ); } } }, y: { @@ -94,7 +94,7 @@ title: function(x) { var day = Math.floor( x / 24 ) + 1; var hour = x % 24; - return 'Dec ' + day + ' ' + hour + ':00 ' + hour + ':59 UTC'; + return 'Day ' + day + ' ' + hour + ':00 ' + hour + ':59 UTC'; } } } diff --git a/src/components/widgets/distance-to-goal-chart/distance-to-goal-chart.js b/src/components/widgets/distance-to-goal-chart/distance-to-goal-chart.js index 170df01..2077e30 100644 --- a/src/components/widgets/distance-to-goal-chart/distance-to-goal-chart.js +++ b/src/components/widgets/distance-to-goal-chart/distance-to-goal-chart.js @@ -47,7 +47,7 @@ axis: { x: { tick: { - format: function(x){ return 'Dec ' + (x+1); } + format: function(x){ return 'Day ' + (x+1); } } }, y: { diff --git a/src/components/widgets/totals-earned-chart/totals-earned-chart.html b/src/components/widgets/totals-earned-chart/totals-earned-chart.html index 1f04336..6960fab 100644 --- a/src/components/widgets/totals-earned-chart/totals-earned-chart.html +++ b/src/components/widgets/totals-earned-chart/totals-earned-chart.html @@ -85,7 +85,7 @@ .00 Year - + Cancel @@ -121,4 +121,4 @@ -Bell sound by https://soundcloud.com/paul-kasinski/bell-fx-2-hit; target="_blank">Paul Kasinski \ No newline at end of file +Bell sound by https://soundcloud.com/paul-kasinski/bell-fx-2-hit; target="_blank">Paul Kasinski diff --git a/src/components/widgets/totals-earned-chart/totals-earned-chart.js b/src/components/widgets/totals-earned-chart/totals-earned-chart.js index 547fabb..e095084 100644 --- a/src/components/widgets/totals-earned-chart/totals-earned-chart.js +++ b/src/components/widgets/totals-earned-chart/totals-earned-chart.js @@ -214,7 +214,7 @@ axis: { x: { label: { - text: 'December ' + ( d.x + 1 ), + text: 'Day ' + ( d.x + 1 ),
[MediaWiki-commits] [Gerrit] wikimedia...dash[master]: Revert "Change package node-syslog to modern-syslog"
jenkins-bot has submitted this change and it was merged. Change subject: Revert "Change package node-syslog to modern-syslog" .. Revert "Change package node-syslog to modern-syslog" Needs more modern node version than we have on the dash box :( This reverts commit 856ee2fda074c8e8d056a04d094c1afc3c785602. Change-Id: I11d646da1a4f31537275905c14f3356c2fd230f8 --- M logger.js M package.json 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Ejegg: Looks good to me, approved jenkins-bot: Verified diff --git a/logger.js b/logger.js index 00e8a89..745c6d1 100644 --- a/logger.js +++ b/logger.js @@ -6,7 +6,7 @@ constMap = []; if ( hasSyslog ) { - syslog = require( 'modern-syslog' ); + syslog = require( 'node-syslog' ); /*jslint bitwise: true*/ syslog.init( 'dash', syslog.LOG_PID | syslog.LOG_ODELAY, syslog.LOG_LOCAL0 ); /*jslint bitwise: false*/ diff --git a/package.json b/package.json index 0cd9e7f..b7c186f 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "memory-cache": "0.0.5", "mysql": "^2.4.3", "mysql-promise": "^1.3.0", - "modern-syslog": "~1.1.2", + "node-syslog": "~1.1.7", "odata-parser": "~1.0.0", "passport": "^0.2.1", "passport-drupal": "0.3.3", -- To view, visit https://gerrit.wikimedia.org/r/324263 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I11d646da1a4f31537275905c14f3356c2fd230f8 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/dash Gerrit-Branch: master Gerrit-Owner: EjeggGerrit-Reviewer: Cdentinger Gerrit-Reviewer: Ejegg Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...dash[master]: Revert "Enable syslog on OSX"
jenkins-bot has submitted this change and it was merged. Change subject: Revert "Enable syslog on OSX" .. Revert "Enable syslog on OSX" This reverts commit 13337423c90a45a3bb5dfb3ead74b86d6f673d30. Change-Id: Ic60dcde9054e7f059efc4ccade1b1ad226dd0a20 --- M logger.js 1 file changed, 15 insertions(+), 9 deletions(-) Approvals: Ejegg: Looks good to me, approved jenkins-bot: Verified diff --git a/logger.js b/logger.js index b0ec072..00e8a89 100644 --- a/logger.js +++ b/logger.js @@ -1,18 +1,24 @@ -var LOG_DEBUG = 0, +var hasSyslog = !!process.platform.match(/linux/), + LOG_DEBUG = 0, LOG_INFO = 1, LOG_ERR = 2, - syslog = require( 'modern-syslog' ), + syslog, constMap = []; -/*jslint bitwise: true*/ -syslog.init( 'dash', syslog.LOG_PID | syslog.LOG_ODELAY, syslog.LOG_LOCAL0 ); -/*jslint bitwise: false*/ -constMap[LOG_DEBUG] = syslog.LOG_DEBUG; -constMap[LOG_INFO] = syslog.LOG_INFO; -constMap[LOG_ERR] = syslog.LOG_ERR; +if ( hasSyslog ) { + syslog = require( 'modern-syslog' ); + /*jslint bitwise: true*/ + syslog.init( 'dash', syslog.LOG_PID | syslog.LOG_ODELAY, syslog.LOG_LOCAL0 ); + /*jslint bitwise: false*/ + constMap[LOG_DEBUG] = syslog.LOG_DEBUG; + constMap[LOG_INFO] = syslog.LOG_INFO; + constMap[LOG_ERR] = syslog.LOG_ERR; +} function log( level, message ) { - syslog.log( constMap[level], message ); + if ( hasSyslog ) { + syslog.log( constMap[level], message ); + } if ( level === LOG_ERR ) { console.error( message ); } else { -- To view, visit https://gerrit.wikimedia.org/r/324262 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic60dcde9054e7f059efc4ccade1b1ad226dd0a20 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/dash Gerrit-Branch: master Gerrit-Owner: EjeggGerrit-Reviewer: Cdentinger Gerrit-Reviewer: Ejegg Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: refreshLinks.php: allow refreshing by categories, tracking o...
MaxSem has uploaded a new change for review. https://gerrit.wikimedia.org/r/324347 Change subject: refreshLinks.php: allow refreshing by categories, tracking or not .. refreshLinks.php: allow refreshing by categories, tracking or not Needed for selective updates of pages using a particular feature. Intended to be run in production, so needs to scale. Bug: T149723 Change-Id: If20fb1f91de8d4227def5b07d6d52b91161ed3fd --- M RELEASE-NOTES-1.29 M includes/specials/SpecialTrackingCategories.php M maintenance/refreshLinks.php 3 files changed, 98 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/47/324347/1 diff --git a/RELEASE-NOTES-1.29 b/RELEASE-NOTES-1.29 index 5b5640f..c85e6b8 100644 --- a/RELEASE-NOTES-1.29 +++ b/RELEASE-NOTES-1.29 @@ -54,6 +54,8 @@ === Other changes in 1.29 === * Database::getSearchEngine() (deprecated in 1.28) was removed. Use SearchEngineFactory::getSearchEngineClass() instead. +* refreshLinks.php now can be limited to a particular category with --category=... + or a tracking category with --tracking-category= == Compatibility == diff --git a/includes/specials/SpecialTrackingCategories.php b/includes/specials/SpecialTrackingCategories.php index 4c6a345..787db03 100644 --- a/includes/specials/SpecialTrackingCategories.php +++ b/includes/specials/SpecialTrackingCategories.php @@ -76,7 +76,7 @@ " ); - $trackingCategories = $this->prepareTrackingCategoriesData(); + $trackingCategories = $this->getTrackingCategories(); $batch = new LinkBatch(); foreach ( $trackingCategories as $catMsg => $data ) { @@ -145,7 +145,7 @@ * Read the global and extract title objects from the corresponding messages * @return array Array( 'msg' => Title, 'cats' => Title[] ) */ - private function prepareTrackingCategoriesData() { + public function getTrackingCategories() { $categories = array_merge( self::$coreTrackingCategories, ExtensionRegistry::getInstance()->getAttribute( 'TrackingCategories' ), diff --git a/maintenance/refreshLinks.php b/maintenance/refreshLinks.php index e7a4d06..9d54901 100644 --- a/maintenance/refreshLinks.php +++ b/maintenance/refreshLinks.php @@ -29,6 +29,8 @@ * @ingroup Maintenance */ class RefreshLinks extends Maintenance { + const REPORTING_INTERVAL = 100; + /** @var int|bool */ protected $namespace = false; @@ -43,6 +45,8 @@ $this->addOption( 'dfn-chunk-size', 'Maximum number of existent IDs to check per ' . 'query, default 10', false, true ); $this->addOption( 'namespace', 'Only fix pages in this namespace', false, true ); + $this->addOption( 'category', 'Only fix pages in this category', false, true ); + $this->addOption( 'tracking-category', 'Only fix pages in this tracking category', false, true ); $this->addArg( 'start', 'Page_id to start from, default 1', false ); $this->setBatchSize( 100 ); } @@ -61,7 +65,15 @@ } else { $this->namespace = (int)$ns; } - if ( !$this->hasOption( 'dfn-only' ) ) { + if ( ( $category = $this->getOption( 'category', false ) ) !== false ) { + $title = Title::makeTitle( NS_CATEGORY, $category ); + if ( !$title ) { + $this->error( "'$category' is an invalid category name!\n", true ); + } + $this->refreshCategory( $category ); + } elseif ( ( $category = $this->getOption( 'tracking-category', false ) ) !== false ) { + $this->refreshTrackingCategory( $category ); + } elseif ( !$this->hasOption( 'dfn-only' ) ) { $new = $this->getOption( 'new-only', false ); $redir = $this->getOption( 'redirects-only', false ); $oldRedir = $this->getOption( 'old-redirects-only', false ); @@ -89,7 +101,6 @@ private function doRefreshLinks( $start, $newOnly = false, $end = null, $redirectsOnly = false, $oldRedirectsOnly = false ) { - $reportingInterval = 100; $dbr = $this->getDB( DB_REPLICA, [ 'vslow' ] ); if ( $start === null ) { @@ -124,7 +135,7 @@ $i = 0; foreach ( $res as $row ) { - if ( !( ++$i % $reportingInterval ) ) { + if ( !( ++$i % self::REPORTING_INTERVAL ) ) { $this->output( "$i\n" );
[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[master]: Remove references from SpecialSearchResults hook handler
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/324346 Change subject: Remove references from SpecialSearchResults hook handler .. Remove references from SpecialSearchResults hook handler We have no need to take these in as references, so don't flag it as such. Change-Id: Ib8ff5458d2fa5f1a244b768a58fffd394c0d00e7 --- M WikimediaEventsHooks.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaEvents refs/changes/46/324346/1 diff --git a/WikimediaEventsHooks.php b/WikimediaEventsHooks.php index 9bb7857..0c50d73 100644 --- a/WikimediaEventsHooks.php +++ b/WikimediaEventsHooks.php @@ -452,7 +452,7 @@ * SERP or not. This ends up being non-trivial due to localization, so * make it trivial by injecting a boolean value to check. */ - public static function onSpecialSearchResults( $term, &$titleMatches, &$textMatches ) { + public static function onSpecialSearchResults( $term, $titleMatches, $textMatches ) { global $wgOut; $wgOut->addJsConfigVars( array( -- To view, visit https://gerrit.wikimedia.org/r/324346 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib8ff5458d2fa5f1a244b768a58fffd394c0d00e7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikimediaEvents Gerrit-Branch: master Gerrit-Owner: EBernhardson___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Remove 'now using' message for CirrusSearch
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/324345 Change subject: Remove 'now using' message for CirrusSearch .. Remove 'now using' message for CirrusSearch This was used when first deploying CirrusSearch. It may have been useful then, but seems like cruft just hanging around now. Remove it to make things just that little bit simpler. Change-Id: Ifa1bdf9126d7e2fc5b6647afbd68ffaa6de950d1 --- M CirrusSearch.php M includes/Hooks.php 2 files changed, 6 insertions(+), 30 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/45/324345/1 diff --git a/CirrusSearch.php b/CirrusSearch.php index a108f29..c9af5ed 100644 --- a/CirrusSearch.php +++ b/CirrusSearch.php @@ -542,9 +542,6 @@ // whatever is configured). $wgCirrusSearchMoreLikeThisTTL = 0; -// Show the notification about this wiki using CirrusSearch on the search page. -$wgCirrusSearchShowNowUsing = false; - // CirrusSearch interwiki searching // Keys are the interwiki prefix, values are the index to search // Results are cached. @@ -1057,7 +1054,6 @@ $wgHooks[ 'LinksUpdateComplete' ][] = 'CirrusSearch\Hooks::onLinksUpdateCompleted'; $wgHooks[ 'ResourceLoaderGetConfigVars' ][] = 'CirrusSearch\Hooks::onResourceLoaderGetConfigVars'; $wgHooks[ 'SoftwareInfo' ][] = 'CirrusSearch\Hooks::onSoftwareInfo'; -$wgHooks[ 'SpecialSearchResultsPrepend' ][] = 'CirrusSearch\Hooks::onSpecialSearchResultsPrepend'; $wgHooks[ 'SpecialSearchResultsAppend' ][] = 'CirrusSearch\Hooks::onSpecialSearchResultsAppend'; $wgHooks[ 'TitleMove' ][] = 'CirrusSearch\Hooks::onTitleMove'; $wgHooks[ 'TitleMoveComplete' ][] = 'CirrusSearch\Hooks::onTitleMoveComplete'; diff --git a/includes/Hooks.php b/includes/Hooks.php index b7cda74..9b4db24 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -430,32 +430,6 @@ } /** -* Called to prepend text before search results and inject metrics -* @param SpecialSearch $specialSearch The SpecialPage object for Special:Search -* @param OutputPage $out The output page object -* @param string $term The term being searched for -* @return bool -*/ - public static function onSpecialSearchResultsPrepend( $specialSearch, $out, $term ) { - global $wgCirrusSearchShowNowUsing; - - // Prepend our message if needed - if ( $wgCirrusSearchShowNowUsing ) { - $out->addHTML( Xml::openElement( 'div', [ 'class' => 'cirrussearch-now-using' ] ) . - $specialSearch->msg( 'cirrussearch-now-using' )->parse() . - Xml::closeElement( 'div' ) ); - } - - // Embed metrics if this was a Cirrus page - $engine = $specialSearch->getSearchEngine(); - if ( $engine instanceof CirrusSearch ) { - $out->addJsConfigVars( $engine->getLastSearchMetrics() ); - } - - return true; - } - - /** * @param SpecialSearch $specialSearch * @param OutputPage $out * @param string $term @@ -467,6 +441,12 @@ if ( $wgCirrusSearchFeedbackLink ) { self::addSearchFeedbackLink( $wgCirrusSearchFeedbackLink, $specialSearch, $out ); } + + // Embed metrics if this was a Cirrus page + $engine = $specialSearch->getSearchEngine(); + if ( $engine instanceof CirrusSearch ) { + $out->addJsConfigVars( $engine->getLastSearchMetrics() ); + } return true; } -- To view, visit https://gerrit.wikimedia.org/r/324345 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifa1bdf9126d7e2fc5b6647afbd68ffaa6de950d1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: EBernhardson___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: DiffElement: Use document slices with full internal lists
jenkins-bot has submitted this change and it was merged. Change subject: DiffElement: Use document slices with full internal lists .. DiffElement: Use document slices with full internal lists Change-Id: I543e81c4dd6dbbd393304426fbc90e861f7982a5 --- M src/ui/elements/ve.ui.DiffElement.js 1 file changed, 10 insertions(+), 15 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/src/ui/elements/ve.ui.DiffElement.js b/src/ui/elements/ve.ui.DiffElement.js index 6e6a9ed..30a0be0 100644 --- a/src/ui/elements/ve.ui.DiffElement.js +++ b/src/ui/elements/ve.ui.DiffElement.js @@ -157,23 +157,20 @@ * @return {string} HTML to display the action/move */ ve.ui.DiffElement.prototype.getNodeHtml = function ( node, action, move ) { - var nodeData, nodeDoc, nodeHtml; - - nodeDoc = action === 'remove' ? this.oldDoc : this.newDoc; + var nodeData, nodeHtml, + nodeDoc = action === 'remove' ? this.oldDoc : this.newDoc, + documentSlice = nodeDoc.cloneFromRange( node.getOuterRange() ); // Get the linear model for the node - nodeData = nodeDoc.getData( node.getOuterRange() ); + nodeData = documentSlice.data.data; // Add the classes to the outer element (in case there was a move) nodeData[ 0 ] = this.addClassesToNode( nodeData[ 0 ], nodeDoc, action, move ); // Get the html for the linear model with classes // Doc is always the new doc when inserting into the store - nodeHtml = ve.dm.converter.getDomFromModel( - nodeDoc.cloneWithData( - new ve.dm.ElementLinearData( this.newDoc.getStore(), nodeData ) - ) - ).body.innerHTML; + documentSlice.getStore().merge( this.newDoc.getStore() ); + nodeHtml = ve.dm.converter.getDomFromModel( documentSlice ).body.innerHTML; if ( action !== 'none' ) { nodeHtml = $( '' ).addClass( this.classPrefix + 'doc-child-change' ).append( nodeHtml ); @@ -195,7 +192,8 @@ iModified, jModified, classes, nodeHtml, newNodeIndex = this.oldToNew[ oldNodeIndex ].node, nodeRange = this.newDocChildren[ newNodeIndex ].getOuterRange(), - nodeData = this.newDoc.getData( nodeRange ), + documentSlice = this.newDoc.cloneFromRange( nodeRange ), + nodeData = documentSlice.data.data, alreadyProcessed = { remove: {}, insert: {} @@ -370,11 +368,8 @@ } } - nodeHtml = ve.dm.converter.getDomFromModel( - this.newDoc.cloneWithData( - new ve.dm.ElementLinearData( this.newDoc.getStore(), nodeData ) - ) - ).body.innerHTML; + documentSlice.getStore().merge( this.newDoc.getStore() ); + nodeHtml = ve.dm.converter.getDomFromModel( documentSlice ).body.innerHTML; // The following classes are used here: // * ve-ui-diffElement-doc-child-change -- To view, visit https://gerrit.wikimedia.org/r/322797 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I543e81c4dd6dbbd393304426fbc90e861f7982a5 Gerrit-PatchSet: 4 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: EsandersGerrit-Reviewer: Catrope Gerrit-Reviewer: Divec Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Sarahhaskins Gerrit-Reviewer: Tchanders Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Use isDisabled() instead of isBlank() in getGrantName in Use...
jenkins-bot has submitted this change and it was merged. Change subject: Use isDisabled() instead of isBlank() in getGrantName in User.php .. Use isDisabled() instead of isBlank() in getGrantName in User.php Bug: T151956 Change-Id: Ic23c75b784c725f8f73eb1cf98d2bdb3763ab09d --- M includes/user/User.php 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Florianschmidtwelzow: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/user/User.php b/includes/user/User.php index 82d8806..4950e27 100644 --- a/includes/user/User.php +++ b/includes/user/User.php @@ -5066,13 +5066,14 @@ /** * Get the description of a given right * +* @since 1.29 * @param string $right Right to query * @return string Localized description of the right */ public static function getRightDescription( $right ) { $key = "right-$right"; $msg = wfMessage( $key ); - return $msg->isBlank() ? $right : $msg->text(); + return $msg->isDisabled() ? $right : $msg->text(); } /** -- To view, visit https://gerrit.wikimedia.org/r/324337 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic23c75b784c725f8f73eb1cf98d2bdb3763ab09d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: MtDuGerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: Reedy Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Genealogy[master]: Match keys in extension.json with keys in i18n/en.json
jenkins-bot has submitted this change and it was merged. Change subject: Match keys in extension.json with keys in i18n/en.json .. Match keys in extension.json with keys in i18n/en.json Change-Id: I9a68bf8e35074023fd0deb825ee18eeefe6a9d88 --- M extension.json 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Samwilson: Looks good to me, approved jenkins-bot: Verified diff --git a/extension.json b/extension.json index 5b35c5d..574b2ad 100644 --- a/extension.json +++ b/extension.json @@ -1,11 +1,11 @@ { "name": "Genealogy", - "namemsg": "desc-genealogy", + "namemsg": "genealogy", "author": [ "Sam Wilson" ], "url": "https://www.mediawiki.org/wiki/Extension:Genealogy;, - "descriptionmsg": "genealogy-extension-desc", + "descriptionmsg": "genealogy-desc", "license-name": "GPL-3.0+", "type": "extension", "ExtensionMessagesFiles": { -- To view, visit https://gerrit.wikimedia.org/r/324177 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9a68bf8e35074023fd0deb825ee18eeefe6a9d88 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Genealogy Gerrit-Branch: master Gerrit-Owner: Raimond SpekkingGerrit-Reviewer: Samwilson Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Temporarily require Vagrant < 1.9.0
jenkins-bot has submitted this change and it was merged. Change subject: Temporarily require Vagrant < 1.9.0 .. Temporarily require Vagrant < 1.9.0 Vagrant 1.9.0 includes plugin loading changes that are not compatible with MediaWiki-Vagrant's plugin bootstrapping process. Bug: T151928 Change-Id: I81fa0647be9d8a11dac8f63f0755dc6dcf03fd83 --- M Vagrantfile 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: BryanDavis: Looks good to me, approved jenkins-bot: Verified diff --git a/Vagrantfile b/Vagrantfile index afc19a0..a4ef800 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -27,6 +27,10 @@ # http://www.mediawiki.org/wiki/How_to_become_a_MediaWiki_hacker # +# T151928: Vagrant 1.9.0 unable to install local mediawiki-vagrant plugin +Vagrant.require_version "< 1.9.0" + + # Ensure we're using the latest version of the plugin require_relative 'lib/mediawiki-vagrant/version' require 'fileutils' -- To view, visit https://gerrit.wikimedia.org/r/324344 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I81fa0647be9d8a11dac8f63f0755dc6dcf03fd83 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: BryanDavisGerrit-Reviewer: BryanDavis Gerrit-Reviewer: Dduvall Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Follow-up I3b706396 and Id8c53f8f: Fix -labs variations of w...
jenkins-bot has submitted this change and it was merged. Change subject: Follow-up I3b706396 and Id8c53f8f: Fix -labs variations of wmgM(F|Mobile) variables .. Follow-up I3b706396 and Id8c53f8f: Fix -labs variations of wmgM(F|Mobile) variables Bug: T151894 Change-Id: I8c7cfa93be0207a47712946b4bc9f04bf240b5bd --- M wmf-config/InitialiseSettings-labs.php 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Chad: Looks good to me, approved Jdlrobson: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/wmf-config/InitialiseSettings-labs.php b/wmf-config/InitialiseSettings-labs.php index f1ed239..0c19676 100644 --- a/wmf-config/InitialiseSettings-labs.php +++ b/wmf-config/InitialiseSettings-labs.php @@ -232,11 +232,11 @@ 'enwiki'=> true, ], - 'wmgMobileUrlTemplate' => [ + 'wgMobileUrlTemplate' => [ 'default' => '%h0.m.%h1.%h2.%h3.%h4', 'wikidatawiki' => 'm.%h0.%h1.%h2.%h3', // T87440 ], - 'wmgMFMobileFormatterHeadings' => [ + 'wgMFMobileFormatterHeadings' => [ 'default' => [ 'h2', 'h3', 'h4', 'h5', 'h6' ], // T110436, T110837 ], @@ -250,10 +250,10 @@ 'wgMFAllowNonJavaScriptEditing' => [ 'default' => true, ], - 'wmgMFPhotoUploadEndpoint' => [ + 'wgMFPhotoUploadEndpoint' => [ 'default' => 'https://commons.wikimedia.$variant.wmflabs.org/w/api.php', ], - 'wmgMFSpecialCaseMainPage' => [ + 'wgMFSpecialCaseMainPage' => [ 'default' => true, 'enwiki' => false, ], -- To view, visit https://gerrit.wikimedia.org/r/324340 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8c7cfa93be0207a47712946b4bc9f04bf240b5bd Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Alex MonkGerrit-Reviewer: Chad Gerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Allow API endpoint customization for mw.widgets.TitleWidget
jenkins-bot has submitted this change and it was merged. Change subject: Allow API endpoint customization for mw.widgets.TitleWidget .. Allow API endpoint customization for mw.widgets.TitleWidget Currently the API is not customizable and always points to current wiki's api returned by `new mw.Api()`. This patch allows users to specify their own API object for querying titles e.g. searching for titles on a different language Wikipedia when translating pages. Change-Id: I81811cdd1a0750a8335432eee8f971ab9e0b8ee7 --- M resources/src/mediawiki.widgets/mw.widgets.SearchInputWidget.js M resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js 2 files changed, 38 insertions(+), 14 deletions(-) Approvals: Krinkle: Looks good to me, but someone else must approve Esanders: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/src/mediawiki.widgets/mw.widgets.SearchInputWidget.js b/resources/src/mediawiki.widgets/mw.widgets.SearchInputWidget.js index 39bee7c..2ac75c5 100755 --- a/resources/src/mediawiki.widgets/mw.widgets.SearchInputWidget.js +++ b/resources/src/mediawiki.widgets/mw.widgets.SearchInputWidget.js @@ -78,7 +78,7 @@ * @inheritdoc mw.widgets.TitleWidget */ mw.widgets.SearchInputWidget.prototype.getSuggestionsPromise = function () { - var api = new mw.Api(), + var api = this.getApi(), promise, self = this; diff --git a/resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js b/resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js index e1e50ea..0e5e0c5 100644 --- a/resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js +++ b/resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js @@ -6,16 +6,6 @@ */ ( function ( $, mw ) { - var interwikiPrefixesPromise = new mw.Api().get( { - action: 'query', - meta: 'siteinfo', - siprop: 'interwikimap' - } ).then( function ( data ) { - return $.map( data.query.interwikimap, function ( interwiki ) { - return interwiki.prefix; - } ); - } ); - /** * Mixin for title widgets * @@ -36,6 +26,7 @@ * @cfg {boolean} [validateTitle=true] Whether the input must be a valid title (if set to true, * the widget will marks itself red for invalid inputs, including an empty query). * @cfg {Object} [cache] Result cache which implements a 'set' method, taking keyed values as an argument +* @cfg {mw.Api} [api] API object to use, creates a default mw.Api instance if not specified */ mw.widgets.TitleWidget = function MwWidgetsTitleWidget( config ) { // Config initialization @@ -56,6 +47,7 @@ this.excludeCurrentPage = !!config.excludeCurrentPage; this.validateTitle = config.validateTitle !== undefined ? config.validateTitle : true; this.cache = config.cache; + this.api = config.api || new mw.Api(); // Initialization this.$element.addClass( 'mw-widget-titleWidget' ); @@ -64,6 +56,10 @@ /* Setup */ OO.initClass( mw.widgets.TitleWidget ); + + /* Static properties */ + + mw.widgets.TitleWidget.static.interwikiPrefixesPromiseCache = {}; /* Methods */ @@ -93,6 +89,24 @@ this.namespace = namespace; }; + mw.widgets.TitleWidget.prototype.getInterwikiPrefixesPromise = function () { + var api = this.getApi(), + cache = this.constructor.static.interwikiPrefixesPromiseCache, + key = api.defaults.ajax.url; + if ( !cache.hasOwnProperty( key ) ) { + cache[ key ] = api.get( { + action: 'query', + meta: 'siteinfo', + siprop: 'interwikimap' + } ).then( function ( data ) { + return $.map( data.query.interwikimap, function ( interwiki ) { + return interwiki.prefix; + } ); + } ); + } + return cache[ key ]; + }; + /** * Get a promise which resolves with an API repsonse for suggested * links for the current query. @@ -101,6 +115,7 @@ */ mw.widgets.TitleWidget.prototype.getSuggestionsPromise = function () { var req, + api = this.getApi(), query = this.getQueryValue(), widget = this, promiseAbortObject = { abort: function () { @@ -108,7 +123,7 @@ } }; if ( mw.Title.newFromText(
[MediaWiki-commits] [Gerrit] mediawiki/core[wmf/1.29.0-wmf.4]: Rewrite logstash key conflict warning from I6677dbf6
jenkins-bot has submitted this change and it was merged. Change subject: Rewrite logstash key conflict warning from I6677dbf6 .. Rewrite logstash key conflict warning from I6677dbf6 * do not warn if something is overwritten with an identical value (happens a lot with 'ip') * move to LogstashFormatter so we can check for the value * instead of spamming errors, just add a flag to the logstash data Bug: T145133 Change-Id: I31caee865cd60c785126478ac75c9aefce78eaaf --- M autoload.php A includes/debug/logger/monolog/LogstashFormatter.php M includes/debug/logger/monolog/WikiProcessor.php A tests/phpunit/includes/debug/logger/monolog/LogstashFormatterTest.php 4 files changed, 140 insertions(+), 20 deletions(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/autoload.php b/autoload.php index 30ef985..f0bbe92 100644 --- a/autoload.php +++ b/autoload.php @@ -875,6 +875,7 @@ 'MediaWiki\\Logger\\Monolog\\LegacyFormatter' => __DIR__ . '/includes/debug/logger/monolog/LegacyFormatter.php', 'MediaWiki\\Logger\\Monolog\\LegacyHandler' => __DIR__ . '/includes/debug/logger/monolog/LegacyHandler.php', 'MediaWiki\\Logger\\Monolog\\LineFormatter' => __DIR__ . '/includes/debug/logger/monolog/LineFormatter.php', + 'MediaWiki\\Logger\\Monolog\\LogstashFormatter' => __DIR__ . '/includes/debug/logger/monolog/LogstashFormatter.php', 'MediaWiki\\Logger\\Monolog\\SyslogHandler' => __DIR__ . '/includes/debug/logger/monolog/SyslogHandler.php', 'MediaWiki\\Logger\\Monolog\\WikiProcessor' => __DIR__ . '/includes/debug/logger/monolog/WikiProcessor.php', 'MediaWiki\\Logger\\NullSpi' => __DIR__ . '/includes/debug/logger/NullSpi.php', diff --git a/includes/debug/logger/monolog/LogstashFormatter.php b/includes/debug/logger/monolog/LogstashFormatter.php new file mode 100644 index 000..553cbf6 --- /dev/null +++ b/includes/debug/logger/monolog/LogstashFormatter.php @@ -0,0 +1,83 @@ +contextPrefix ) { + return parent::formatV0( $record ); + } + + $context = !empty( $record['context'] ) ? $record['context'] : []; + $record['context'] = []; + $formatted = parent::formatV0( $record ); + + $formatted['@fields'] = $this->fixKeyConflicts( $formatted['@fields'], $context ); + return $formatted; + } + + /** +* Prevent key conflicts +* @param array $record +* @return array +*/ + protected function formatV1( array $record ) { + if ( $this->contextPrefix ) { + return parent::formatV1( $record ); + } + + $context = !empty( $record['context'] ) ? $record['context'] : []; + $record['context'] = []; + $formatted = parent::formatV1( $record ); + + $formatted = $this->fixKeyConflicts( $formatted, $context ); + return $formatted; + } + + /** +* Check whether some context field would overwrite another message key. If so, rename +* and flag. +* @param array $fields Fields to be sent to logstash +* @param array $context Copy of the original $record['context'] +* @return array Updated version of $fields +*/ + protected function fixKeyConflicts( array $fields, array $context ) { + foreach ( $context as $key => $val ) { + if ( + in_array( $key, $this->reservedKeys, true ) && + isset( $fields[$key] ) && $fields[$key] !== $val + ) { + $fields['logstash_formatter_key_conflict'][] = $key; + $key = 'c_' . $key; + } + $fields[$key] = $val; + } + return $fields; + } +} diff --git a/includes/debug/logger/monolog/WikiProcessor.php b/includes/debug/logger/monolog/WikiProcessor.php index 81e1e14..ad939a0 100644 --- a/includes/debug/logger/monolog/WikiProcessor.php +++ b/includes/debug/logger/monolog/WikiProcessor.php @@ -29,17 +29,6 @@ * @copyright © 2013 Bryan Davis and Wikimedia Foundation. */ class WikiProcessor { - /** @var array Keys which should not be used in log context */ - protected $reservedKeys = [ - // from monolog:src/Monolog/Formatter/LogstashFormatter.php#L71-L88 - 'message', 'channel', 'level', 'type', - // from WebProcessor - 'url', 'ip', 'http_method', 'server', 'referrer', - // from WikiProcessor - 'host', 'wiki', 'reqId', 'mwversion', - // from config magic - 'normalized_message', - ]; /** * @param array $record @@ -47,15 +36,6 @@
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Rewrite logstash key conflict warning from I6677dbf6
jenkins-bot has submitted this change and it was merged. Change subject: Rewrite logstash key conflict warning from I6677dbf6 .. Rewrite logstash key conflict warning from I6677dbf6 * do not warn if something is overwritten with an identical value (happens a lot with 'ip') * move to LogstashFormatter so we can check for the value * instead of spamming errors, just add a flag to the logstash data Bug: T145133 Change-Id: I31caee865cd60c785126478ac75c9aefce78eaaf --- M autoload.php A includes/debug/logger/monolog/LogstashFormatter.php M includes/debug/logger/monolog/WikiProcessor.php A tests/phpunit/includes/debug/logger/monolog/LogstashFormatterTest.php 4 files changed, 140 insertions(+), 20 deletions(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/autoload.php b/autoload.php index 30ef985..f0bbe92 100644 --- a/autoload.php +++ b/autoload.php @@ -875,6 +875,7 @@ 'MediaWiki\\Logger\\Monolog\\LegacyFormatter' => __DIR__ . '/includes/debug/logger/monolog/LegacyFormatter.php', 'MediaWiki\\Logger\\Monolog\\LegacyHandler' => __DIR__ . '/includes/debug/logger/monolog/LegacyHandler.php', 'MediaWiki\\Logger\\Monolog\\LineFormatter' => __DIR__ . '/includes/debug/logger/monolog/LineFormatter.php', + 'MediaWiki\\Logger\\Monolog\\LogstashFormatter' => __DIR__ . '/includes/debug/logger/monolog/LogstashFormatter.php', 'MediaWiki\\Logger\\Monolog\\SyslogHandler' => __DIR__ . '/includes/debug/logger/monolog/SyslogHandler.php', 'MediaWiki\\Logger\\Monolog\\WikiProcessor' => __DIR__ . '/includes/debug/logger/monolog/WikiProcessor.php', 'MediaWiki\\Logger\\NullSpi' => __DIR__ . '/includes/debug/logger/NullSpi.php', diff --git a/includes/debug/logger/monolog/LogstashFormatter.php b/includes/debug/logger/monolog/LogstashFormatter.php new file mode 100644 index 000..553cbf6 --- /dev/null +++ b/includes/debug/logger/monolog/LogstashFormatter.php @@ -0,0 +1,83 @@ +contextPrefix ) { + return parent::formatV0( $record ); + } + + $context = !empty( $record['context'] ) ? $record['context'] : []; + $record['context'] = []; + $formatted = parent::formatV0( $record ); + + $formatted['@fields'] = $this->fixKeyConflicts( $formatted['@fields'], $context ); + return $formatted; + } + + /** +* Prevent key conflicts +* @param array $record +* @return array +*/ + protected function formatV1( array $record ) { + if ( $this->contextPrefix ) { + return parent::formatV1( $record ); + } + + $context = !empty( $record['context'] ) ? $record['context'] : []; + $record['context'] = []; + $formatted = parent::formatV1( $record ); + + $formatted = $this->fixKeyConflicts( $formatted, $context ); + return $formatted; + } + + /** +* Check whether some context field would overwrite another message key. If so, rename +* and flag. +* @param array $fields Fields to be sent to logstash +* @param array $context Copy of the original $record['context'] +* @return array Updated version of $fields +*/ + protected function fixKeyConflicts( array $fields, array $context ) { + foreach ( $context as $key => $val ) { + if ( + in_array( $key, $this->reservedKeys, true ) && + isset( $fields[$key] ) && $fields[$key] !== $val + ) { + $fields['logstash_formatter_key_conflict'][] = $key; + $key = 'c_' . $key; + } + $fields[$key] = $val; + } + return $fields; + } +} diff --git a/includes/debug/logger/monolog/WikiProcessor.php b/includes/debug/logger/monolog/WikiProcessor.php index 81e1e14..ad939a0 100644 --- a/includes/debug/logger/monolog/WikiProcessor.php +++ b/includes/debug/logger/monolog/WikiProcessor.php @@ -29,17 +29,6 @@ * @copyright © 2013 Bryan Davis and Wikimedia Foundation. */ class WikiProcessor { - /** @var array Keys which should not be used in log context */ - protected $reservedKeys = [ - // from monolog:src/Monolog/Formatter/LogstashFormatter.php#L71-L88 - 'message', 'channel', 'level', 'type', - // from WebProcessor - 'url', 'ip', 'http_method', 'server', 'referrer', - // from WikiProcessor - 'host', 'wiki', 'reqId', 'mwversion', - // from config magic - 'normalized_message', - ]; /** * @param array $record @@ -47,15 +36,6 @@
[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Temporarily require Vagrant < 1.9.0
BryanDavis has uploaded a new change for review. https://gerrit.wikimedia.org/r/324344 Change subject: Temporarily require Vagrant < 1.9.0 .. Temporarily require Vagrant < 1.9.0 Vagrant 1.9.0 includes plugin loading changes that are not compatible with MediaWiki-Vagrant's plugin bootstrapping process. Bug: T151928 Change-Id: I81fa0647be9d8a11dac8f63f0755dc6dcf03fd83 --- M Vagrantfile 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/44/324344/1 diff --git a/Vagrantfile b/Vagrantfile index afc19a0..a4ef800 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -27,6 +27,10 @@ # http://www.mediawiki.org/wiki/How_to_become_a_MediaWiki_hacker # +# T151928: Vagrant 1.9.0 unable to install local mediawiki-vagrant plugin +Vagrant.require_version "< 1.9.0" + + # Ensure we're using the latest version of the plugin require_relative 'lib/mediawiki-vagrant/version' require 'fileutils' -- To view, visit https://gerrit.wikimedia.org/r/324344 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I81fa0647be9d8a11dac8f63f0755dc6dcf03fd83 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: BryanDavis___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Add labvirt-star.codfw.wmnet.crt
Andrew Bogott has submitted this change and it was merged. Change subject: Add labvirt-star.codfw.wmnet.crt .. Add labvirt-star.codfw.wmnet.crt One more step in making labtestvirt a more normal codfw virt host Change-Id: I0dab20b0782537c404c2184aba1a51515862950d --- A files/ssl/labvirt-star.codfw.wmnet.crt 1 file changed, 27 insertions(+), 0 deletions(-) Approvals: Andrew Bogott: Looks good to me, approved jenkins-bot: Verified diff --git a/files/ssl/labvirt-star.codfw.wmnet.crt b/files/ssl/labvirt-star.codfw.wmnet.crt new file mode 100644 index 000..a080cb8 --- /dev/null +++ b/files/ssl/labvirt-star.codfw.wmnet.crt @@ -0,0 +1,27 @@ +-BEGIN CERTIFICATE- +MIIEkDCCAngCCQD+RoHsggeKQTANBgkqhkiG9w0BAQsFADCBiTELMAkGA1UEBhMC +VVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAcMDVNhbiBGcmFuY2lzY28x +HTAbBgNVBAoMFFdpa2ltZWRpYSBGb3VuZGF0aW9uMRMwEQYDVQQLDApPcGVyYXRp +b25zMRkwFwYDVQQDDBBXTUYgQ0EgMjAxNC0yMDE3MB4XDTE2MTEyOTIyNDEyN1oX +DTE4MTEyOTIyNDEyN1owgYkxCzAJBgNVBAYTAlVTMQswCQYDVQQIDAJDQTEWMBQG +A1UEBwwNU2FuIEZyYW5jaXNjbzEdMBsGA1UECgwUV2lraW1lZGlhIEZvdW5kYXRp +b24xEzARBgNVBAsMCk9wZXJhdGlvbnMxITAfBgkqhkiG9w0BCQEWEnJvb3RAd2lr +aW1lZGlhLm9yZzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM88WQI6 +TX9bttqPyotChEv2BDgxf3qXjI5HfhGQmYfmI34jMaPe/BoRFjjmXT1kMpDFDJrU +MewPT8kG0TEp/k8bRlGLVAHUM7dNiT6AiYTX9oYWuB8m6pQU7AYl7VdAVXf84DEu +rlmO5G1wMlxaa6a1oPEwagf0Ie6NFV/r9etA+MjGVEbRerOoTqFPfpc/EOIiTOAQ +27SjOFoJ5hMjf5W3Kf6VoqOlKFsSEde6Oons8zMVVDF5PwqlYVyPsI19CyagXTma +2m27hC+X7EfBRjequZ4GVGAQ4ZMnQ/dMk9YRjNZSs75oMEF9QkjHE3uSP8SfP8aC +ainV443vn4VcxiECAwEAATANBgkqhkiG9w0BAQsFAAOCAgEApGZ8E9yR/XjRCjQK +G+xiZsMfq/PCJ/vLn9vFL/D4Nv5m45RaRgtit34v3X5MgMWXr1X3qzMfXSFC0UXQ +5MctkI7hcx0XkN8/W4ArwEVlCGZPvwA5BphOSK0MXfdGt/lWLqZY4VPMZHmeY889 +P1QNI0ve4e0Ujpm5v5ad9/WVdzIODnVIp2RNvWH6p649hoJyer28u7Dii8Xv+8xp +6rdOKBdR/PONpdq0bmnLQ5KF+36pLIn9iQ6sAf9xjojcDX+qep8AqK2JOwVkg7Qp +QV9/sIys3MhAvOUzGCJhDjCBDKBnba0D5dvxEnt0Go0ftmZ7aXa+xWH0AM3LQ91U +6B0jZFN0S7sQmaAFDgZI8cdp4Bzl0AfEI/iE7r8nCPujcgKvhjgL17i8Me8rYEq2 +UFzKSnbW52QsYe149a5PTwgVkwGQn/NRiAJ0FPqGvdsP5jiYfUZyuugqvEPUvIaW +0/D/ojaBCA5TVNFWPv0uBZh8Xl3FhFOujQgvVqnQlXkx1RPxW70F832T/iCSV0w0 +FoNihFVZIY8BeMBNFJguQvopq+lte6RBcCok+WcQqPqtbwI331ObqrbiFo2D0wfi +mosrU+oyc48ISdwofmbium+B9ILciR1w29m8wOJ6tXTGGuooBtTHhfp5Gt4U8/cI +em9QDZ9mcGgfpbmt538a4dysPKE= +-END CERTIFICATE- -- To view, visit https://gerrit.wikimedia.org/r/324342 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0dab20b0782537c404c2184aba1a51515862950d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew BogottGerrit-Reviewer: Andrew Bogott Gerrit-Reviewer: BBlack Gerrit-Reviewer: Ema Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: List grant codenames next to grants on Special:ListGrants
jenkins-bot has submitted this change and it was merged. Change subject: List grant codenames next to grants on Special:ListGrants .. List grant codenames next to grants on Special:ListGrants Bug: T145351 Change-Id: Ia07de6269fa6192071aaea5d750362685389001c --- M includes/specials/SpecialListgrants.php M includes/user/User.php M languages/i18n/en.json M languages/i18n/qqq.json 4 files changed, 23 insertions(+), 2 deletions(-) Approvals: Florianschmidtwelzow: Looks good to me, approved D3r1ck01: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/includes/specials/SpecialListgrants.php b/includes/specials/SpecialListgrants.php index 39c8ae8..2c92410 100644 --- a/includes/specials/SpecialListgrants.php +++ b/includes/specials/SpecialListgrants.php @@ -71,8 +71,14 @@ $id = \Sanitizer::escapeId( $grant ); $out->addHTML( \Html::rawElement( 'tr', [ 'id' => $id ], - "" . $this->msg( "grant-$grant" )->escaped() . "" . - "" . $grantCellHtml . '' + "" . + $this->msg( + "listgrants-grant-display", + \User::getGrantName( $grant ), + "" . $id . "" + )->parse() . + "" . + "" . $grantCellHtml . "" ) ); } diff --git a/includes/user/User.php b/includes/user/User.php index 82d8806..b6a64b0 100644 --- a/includes/user/User.php +++ b/includes/user/User.php @@ -5076,6 +5076,19 @@ } /** +* Get the name of a given grant +* +* @since 1.29 +* @param string $grant Grant to query +* @return string Localized name of the grant +*/ + public static function getGrantName( $grant ) { + $key = "grant-$grant"; + $msg = wfMessage( $key ); + return $msg->isDisabled() ? $grant : $msg->text(); + } + + /** * Make a new-style password hash * * @param string $password Plain-text password diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 9aa0f46..0b85a4b 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -2023,6 +2023,7 @@ "listgrants-summary": "The following is a list of grants with their associated access to user rights. Users can authorize applications to use their account, but with limited permissions based on the grants the user gave to the application. An application acting on behalf of a user cannot actually use rights that the user does not have however.\nThere may be [[{{MediaWiki:Listgrouprights-helppage}}|additional information]] about individual rights.", "listgrants-grant": "Grant", "listgrants-rights": "Rights", + "listgrants-grant-display": "$1 ($2)", "trackingcategories": "Tracking categories", "trackingcategories-summary": "This page lists tracking categories which are automatically populated by the MediaWiki software. Their names can be changed by altering the relevant system messages in the {{ns:8}} namespace.", "trackingcategories-msg": "Tracking category", diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index 7327012..9a1cd65 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -2207,6 +2207,7 @@ "listgrants-summary": "Explanatory text shown at the top of the grant/rights mapping table.\n\nRefers to {{msg-mw|Listgrouprights-helppage}}.", "listgrants-grant": "Used as table header for the grant/rights mapping table.\n{{Identical|Grant}}", "listgrants-rights": "Used as table header for the grant/rights mapping table.\n{{Identical|Right}}", + "listgrants-grant-display": "{{optional}}\nUsed to display the code name of a grant next to the grant. Parameters:\n* $1 - the text from the \"grant-...\" messages, i.e. {{msg-mw|Grant-highvolume}}\n* $2 - the codename of this grant", "trackingcategories": "[[Special:TrackingCategories]] page implementing list of Tracking categories [[mw:Special:MyLanguage/Help:Tracking categories|tracking category]].\n{{Identical|Tracking category}}", "trackingcategories-summary": "Description for [[Special:TrackingCategories]] page [[mw:Help:Tracking categories|tracking category]]", "trackingcategories-msg": "Header for the message column of the table on [[Special:TrackingCategories]]. This column lists the mediawiki message that controls the tracking category in question.\n{{Identical|Tracking category}}", -- To view, visit https://gerrit.wikimedia.org/r/324151 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType:
[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Less noisy queue consumer logging
Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/324343 Change subject: Less noisy queue consumer logging .. Less noisy queue consumer logging Bug: T151954 Change-Id: Ifc98c04c5778a7a1a63e084fb0f69a6707a6b1a8 --- M Core/QueueConsumers/BaseQueueConsumer.php 1 file changed, 12 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig refs/changes/43/324343/1 diff --git a/Core/QueueConsumers/BaseQueueConsumer.php b/Core/QueueConsumers/BaseQueueConsumer.php index 5367c51..fd10420 100644 --- a/Core/QueueConsumers/BaseQueueConsumer.php +++ b/Core/QueueConsumers/BaseQueueConsumer.php @@ -101,10 +101,18 @@ } $timeOk = $this->timeLimit === 0 || time() <= $startTime + $this->timeLimit; $countOk = $this->messageLimit === 0 || $processed < $this->messageLimit; - $debugMessage = 'Data is ' . ( $data === null ? '' : 'not ' ) . 'null, ' . - "time limit ($this->timeLimit) is " . ( $timeOk ? 'not ' : '' ) . 'elapsed, ' . - "message limit ($this->messageLimit) is " . ( $countOk ? 'not ' : '' ) . 'reached.'; - Logger::debug( $debugMessage ); + + $debugMessage = null; + if ( $data === null ) { + $debugMessage = 'Queue is empty'; + } else if ( !$timeOk ) { + $debugMessage = "Time limit ($this->timeLimit) is elapsed"; + } else if ( !$countOk ) { + $debugMessage = "Message limit ($this->messageLimit) is reached"; + } + if ( $debugMessage ) { + Logger::debug( $debugMessage ); + } } while( $timeOk && $countOk && $data !== null ); return $processed; -- To view, visit https://gerrit.wikimedia.org/r/324343 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifc98c04c5778a7a1a63e084fb0f69a6707a6b1a8 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/SmashPig Gerrit-Branch: master Gerrit-Owner: Ejegg___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Add labvirt-star.codfw.wmnet.crt
Andrew Bogott has uploaded a new change for review. https://gerrit.wikimedia.org/r/324342 Change subject: Add labvirt-star.codfw.wmnet.crt .. Add labvirt-star.codfw.wmnet.crt One more step in making labtestvirt a more normal codfw virt host Change-Id: I0dab20b0782537c404c2184aba1a51515862950d --- A files/ssl/labvirt-star.codfw.wmnet.crt 1 file changed, 27 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/42/324342/1 diff --git a/files/ssl/labvirt-star.codfw.wmnet.crt b/files/ssl/labvirt-star.codfw.wmnet.crt new file mode 100644 index 000..a080cb8 --- /dev/null +++ b/files/ssl/labvirt-star.codfw.wmnet.crt @@ -0,0 +1,27 @@ +-BEGIN CERTIFICATE- +MIIEkDCCAngCCQD+RoHsggeKQTANBgkqhkiG9w0BAQsFADCBiTELMAkGA1UEBhMC +VVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAcMDVNhbiBGcmFuY2lzY28x +HTAbBgNVBAoMFFdpa2ltZWRpYSBGb3VuZGF0aW9uMRMwEQYDVQQLDApPcGVyYXRp +b25zMRkwFwYDVQQDDBBXTUYgQ0EgMjAxNC0yMDE3MB4XDTE2MTEyOTIyNDEyN1oX +DTE4MTEyOTIyNDEyN1owgYkxCzAJBgNVBAYTAlVTMQswCQYDVQQIDAJDQTEWMBQG +A1UEBwwNU2FuIEZyYW5jaXNjbzEdMBsGA1UECgwUV2lraW1lZGlhIEZvdW5kYXRp +b24xEzARBgNVBAsMCk9wZXJhdGlvbnMxITAfBgkqhkiG9w0BCQEWEnJvb3RAd2lr +aW1lZGlhLm9yZzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM88WQI6 +TX9bttqPyotChEv2BDgxf3qXjI5HfhGQmYfmI34jMaPe/BoRFjjmXT1kMpDFDJrU +MewPT8kG0TEp/k8bRlGLVAHUM7dNiT6AiYTX9oYWuB8m6pQU7AYl7VdAVXf84DEu +rlmO5G1wMlxaa6a1oPEwagf0Ie6NFV/r9etA+MjGVEbRerOoTqFPfpc/EOIiTOAQ +27SjOFoJ5hMjf5W3Kf6VoqOlKFsSEde6Oons8zMVVDF5PwqlYVyPsI19CyagXTma +2m27hC+X7EfBRjequZ4GVGAQ4ZMnQ/dMk9YRjNZSs75oMEF9QkjHE3uSP8SfP8aC +ainV443vn4VcxiECAwEAATANBgkqhkiG9w0BAQsFAAOCAgEApGZ8E9yR/XjRCjQK +G+xiZsMfq/PCJ/vLn9vFL/D4Nv5m45RaRgtit34v3X5MgMWXr1X3qzMfXSFC0UXQ +5MctkI7hcx0XkN8/W4ArwEVlCGZPvwA5BphOSK0MXfdGt/lWLqZY4VPMZHmeY889 +P1QNI0ve4e0Ujpm5v5ad9/WVdzIODnVIp2RNvWH6p649hoJyer28u7Dii8Xv+8xp +6rdOKBdR/PONpdq0bmnLQ5KF+36pLIn9iQ6sAf9xjojcDX+qep8AqK2JOwVkg7Qp +QV9/sIys3MhAvOUzGCJhDjCBDKBnba0D5dvxEnt0Go0ftmZ7aXa+xWH0AM3LQ91U +6B0jZFN0S7sQmaAFDgZI8cdp4Bzl0AfEI/iE7r8nCPujcgKvhjgL17i8Me8rYEq2 +UFzKSnbW52QsYe149a5PTwgVkwGQn/NRiAJ0FPqGvdsP5jiYfUZyuugqvEPUvIaW +0/D/ojaBCA5TVNFWPv0uBZh8Xl3FhFOujQgvVqnQlXkx1RPxW70F832T/iCSV0w0 +FoNihFVZIY8BeMBNFJguQvopq+lte6RBcCok+WcQqPqtbwI331ObqrbiFo2D0wfi +mosrU+oyc48ISdwofmbium+B9ILciR1w29m8wOJ6tXTGGuooBtTHhfp5Gt4U8/cI +em9QDZ9mcGgfpbmt538a4dysPKE= +-END CERTIFICATE- -- To view, visit https://gerrit.wikimedia.org/r/324342 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0dab20b0782537c404c2184aba1a51515862950d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew Bogott___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Hygiene: Remove .travis.yml
Mholloway has uploaded a new change for review. https://gerrit.wikimedia.org/r/324341 Change subject: Hygiene: Remove .travis.yml .. Hygiene: Remove .travis.yml We don't use Travis for CI when developing this service and have no plans to, so this config file is unneeded. Change-Id: I3d701d3e447badaa9ccb6ee2dcc1777ef2705842 --- D .travis.yml 1 file changed, 0 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps refs/changes/41/324341/1 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index fa7f265..000 --- a/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: node_js - -sudo: false - -node_js: - - "0.10" - - "0.12" - - "4" - - "6" - = "node" -- To view, visit https://gerrit.wikimedia.org/r/324341 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3d701d3e447badaa9ccb6ee2dcc1777ef2705842 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: Mholloway___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Follow-up I3b706396 and Id8c53f8f: Fix -labs variations of w...
Alex Monk has uploaded a new change for review. https://gerrit.wikimedia.org/r/324340 Change subject: Follow-up I3b706396 and Id8c53f8f: Fix -labs variations of wmgM(F|Mobile) variables .. Follow-up I3b706396 and Id8c53f8f: Fix -labs variations of wmgM(F|Mobile) variables Bug: T151894 Change-Id: I8c7cfa93be0207a47712946b4bc9f04bf240b5bd --- M wmf-config/InitialiseSettings-labs.php 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/40/324340/1 diff --git a/wmf-config/InitialiseSettings-labs.php b/wmf-config/InitialiseSettings-labs.php index f1ed239..0c19676 100644 --- a/wmf-config/InitialiseSettings-labs.php +++ b/wmf-config/InitialiseSettings-labs.php @@ -232,11 +232,11 @@ 'enwiki'=> true, ], - 'wmgMobileUrlTemplate' => [ + 'wgMobileUrlTemplate' => [ 'default' => '%h0.m.%h1.%h2.%h3.%h4', 'wikidatawiki' => 'm.%h0.%h1.%h2.%h3', // T87440 ], - 'wmgMFMobileFormatterHeadings' => [ + 'wgMFMobileFormatterHeadings' => [ 'default' => [ 'h2', 'h3', 'h4', 'h5', 'h6' ], // T110436, T110837 ], @@ -250,10 +250,10 @@ 'wgMFAllowNonJavaScriptEditing' => [ 'default' => true, ], - 'wmgMFPhotoUploadEndpoint' => [ + 'wgMFPhotoUploadEndpoint' => [ 'default' => 'https://commons.wikimedia.$variant.wmflabs.org/w/api.php', ], - 'wmgMFSpecialCaseMainPage' => [ + 'wgMFSpecialCaseMainPage' => [ 'default' => true, 'enwiki' => false, ], -- To view, visit https://gerrit.wikimedia.org/r/324340 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8c7cfa93be0207a47712946b4bc9f04bf240b5bd Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Alex Monk___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[wmf/1.29.0-wmf.4]: Rewrite logstash key conflict warning from I6677dbf6
Chad has uploaded a new change for review. https://gerrit.wikimedia.org/r/324339 Change subject: Rewrite logstash key conflict warning from I6677dbf6 .. Rewrite logstash key conflict warning from I6677dbf6 * do not warn if something is overwritten with an identical value (happens a lot with 'ip') * move to LogstashFormatter so we can check for the value * instead of spamming errors, just add a flag to the logstash data Bug: T145133 Change-Id: I31caee865cd60c785126478ac75c9aefce78eaaf --- M autoload.php A includes/debug/logger/monolog/LogstashFormatter.php M includes/debug/logger/monolog/WikiProcessor.php A tests/phpunit/includes/debug/logger/monolog/LogstashFormatterTest.php 4 files changed, 140 insertions(+), 20 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/39/324339/1 diff --git a/autoload.php b/autoload.php index 30ef985..f0bbe92 100644 --- a/autoload.php +++ b/autoload.php @@ -875,6 +875,7 @@ 'MediaWiki\\Logger\\Monolog\\LegacyFormatter' => __DIR__ . '/includes/debug/logger/monolog/LegacyFormatter.php', 'MediaWiki\\Logger\\Monolog\\LegacyHandler' => __DIR__ . '/includes/debug/logger/monolog/LegacyHandler.php', 'MediaWiki\\Logger\\Monolog\\LineFormatter' => __DIR__ . '/includes/debug/logger/monolog/LineFormatter.php', + 'MediaWiki\\Logger\\Monolog\\LogstashFormatter' => __DIR__ . '/includes/debug/logger/monolog/LogstashFormatter.php', 'MediaWiki\\Logger\\Monolog\\SyslogHandler' => __DIR__ . '/includes/debug/logger/monolog/SyslogHandler.php', 'MediaWiki\\Logger\\Monolog\\WikiProcessor' => __DIR__ . '/includes/debug/logger/monolog/WikiProcessor.php', 'MediaWiki\\Logger\\NullSpi' => __DIR__ . '/includes/debug/logger/NullSpi.php', diff --git a/includes/debug/logger/monolog/LogstashFormatter.php b/includes/debug/logger/monolog/LogstashFormatter.php new file mode 100644 index 000..553cbf6 --- /dev/null +++ b/includes/debug/logger/monolog/LogstashFormatter.php @@ -0,0 +1,83 @@ +contextPrefix ) { + return parent::formatV0( $record ); + } + + $context = !empty( $record['context'] ) ? $record['context'] : []; + $record['context'] = []; + $formatted = parent::formatV0( $record ); + + $formatted['@fields'] = $this->fixKeyConflicts( $formatted['@fields'], $context ); + return $formatted; + } + + /** +* Prevent key conflicts +* @param array $record +* @return array +*/ + protected function formatV1( array $record ) { + if ( $this->contextPrefix ) { + return parent::formatV1( $record ); + } + + $context = !empty( $record['context'] ) ? $record['context'] : []; + $record['context'] = []; + $formatted = parent::formatV1( $record ); + + $formatted = $this->fixKeyConflicts( $formatted, $context ); + return $formatted; + } + + /** +* Check whether some context field would overwrite another message key. If so, rename +* and flag. +* @param array $fields Fields to be sent to logstash +* @param array $context Copy of the original $record['context'] +* @return array Updated version of $fields +*/ + protected function fixKeyConflicts( array $fields, array $context ) { + foreach ( $context as $key => $val ) { + if ( + in_array( $key, $this->reservedKeys, true ) && + isset( $fields[$key] ) && $fields[$key] !== $val + ) { + $fields['logstash_formatter_key_conflict'][] = $key; + $key = 'c_' . $key; + } + $fields[$key] = $val; + } + return $fields; + } +} diff --git a/includes/debug/logger/monolog/WikiProcessor.php b/includes/debug/logger/monolog/WikiProcessor.php index 81e1e14..ad939a0 100644 --- a/includes/debug/logger/monolog/WikiProcessor.php +++ b/includes/debug/logger/monolog/WikiProcessor.php @@ -29,17 +29,6 @@ * @copyright © 2013 Bryan Davis and Wikimedia Foundation. */ class WikiProcessor { - /** @var array Keys which should not be used in log context */ - protected $reservedKeys = [ - // from monolog:src/Monolog/Formatter/LogstashFormatter.php#L71-L88 - 'message', 'channel', 'level', 'type', - // from WebProcessor - 'url', 'ip', 'http_method', 'server', 'referrer', - // from WikiProcessor - 'host', 'wiki', 'reqId', 'mwversion', - // from config magic - 'normalized_message', - ]; /** * @param
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: API should allow querying user contribs by userid
Blackspirit96 has uploaded a new change for review. https://gerrit.wikimedia.org/r/324338 Change subject: API should allow querying user contribs by userid .. API should allow querying user contribs by userid It verifies that the userids are valid and then it gathers all the contribs. Anonymous users are not suported by userids because every anonymous user have userid === 0. Bug: T114465 Change-Id: Id4f4fb76ea06332a7c83a55922fdfda2d665e85a --- M includes/api/ApiQueryUserContributions.php 1 file changed, 26 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/38/324338/1 diff --git a/includes/api/ApiQueryUserContributions.php b/includes/api/ApiQueryUserContributions.php index b85bec4..4084b83 100644 --- a/includes/api/ApiQueryUserContributions.php +++ b/includes/api/ApiQueryUserContributions.php @@ -70,6 +70,28 @@ $this->prefixMode = true; $this->multiUserMode = true; $this->userprefix = $this->params['userprefix']; + } else if ( isset( $this->params['userids'] ) ) { + $this->userids = []; + if ( !is_array( $this->params['userids'] ) ) { + $this->params['userids'] = [ $this->params['userids'] ]; + } + + if ( !count( $this->params['userids'] ) ) { + $this->dieUsage( 'Userids parameter may not be empty.', 'param_userids' ); + } + + foreach ($this->params['userids'] as $uid) { + if ( is_null( $uid ) || $uid === 0) { + $this->dieUsage( "Userids parameter {$uid} is not valid.", 'param_userids' ); + } + + // check for anon user is not working because anon users have userid == 0 + $this->userids[] = $uid; + } + + $this->prefixMode = false; + $this->multiUserMode = ( count( $this->params['userids'] ) > 1 ); + $this->idMode = true; } else { $anyIPs = false; $this->userids = []; @@ -489,6 +511,10 @@ ApiBase::PARAM_TYPE => 'user', ApiBase::PARAM_ISMULTI => true ], + 'userids' => [ + ApiBase::PARAM_TYPE => 'integer', + ApiBase::PARAM_ISMULTI => true + ], 'userprefix' => null, 'dir' => [ ApiBase::PARAM_DFLT => 'older', -- To view, visit https://gerrit.wikimedia.org/r/324338 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id4f4fb76ea06332a7c83a55922fdfda2d665e85a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Blackspirit96___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Use isDisabled() instead of isBlank() in getGrantName in Use...
MtDu has uploaded a new change for review. https://gerrit.wikimedia.org/r/324337 Change subject: Use isDisabled() instead of isBlank() in getGrantName in User.php .. Use isDisabled() instead of isBlank() in getGrantName in User.php Bug: T151956 Change-Id: Ic23c75b784c725f8f73eb1cf98d2bdb3763ab09d --- M includes/user/User.php 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/37/324337/1 diff --git a/includes/user/User.php b/includes/user/User.php index 82d8806..4950e27 100644 --- a/includes/user/User.php +++ b/includes/user/User.php @@ -5066,13 +5066,14 @@ /** * Get the description of a given right * +* @since 1.29 * @param string $right Right to query * @return string Localized description of the right */ public static function getRightDescription( $right ) { $key = "right-$right"; $msg = wfMessage( $key ); - return $msg->isBlank() ? $right : $msg->text(); + return $msg->isDisabled() ? $right : $msg->text(); } /** -- To view, visit https://gerrit.wikimedia.org/r/324337 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic23c75b784c725f8f73eb1cf98d2bdb3763ab09d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: MtDu___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Use siteinfo for gallery options
Arlolra has uploaded a new change for review. https://gerrit.wikimedia.org/r/324336 Change subject: Use siteinfo for gallery options .. Use siteinfo for gallery options * Now that T151360 is resolved. Change-Id: I50b0e20537d9a870693d24dae5312e7a509fdaac --- M lib/config/WikiConfig.js M lib/ext/Gallery/index.js 2 files changed, 14 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/36/324336/1 diff --git a/lib/config/WikiConfig.js b/lib/config/WikiConfig.js index 905d89d..a3b200a 100644 --- a/lib/config/WikiConfig.js +++ b/lib/config/WikiConfig.js @@ -46,9 +46,16 @@ namespaces: resultConf.namespaces, namespacealiases: resultConf.namespacealiases, general: { - "case": resultConf.general["case"], - lang: resultConf.general.lang, - legaltitlechars: resultConf.general.legaltitlechars, + "case": general["case"], + lang: general.lang, + legaltitlechars: general.legaltitlechars, + // For the gallery extention + galleryoptions: Object.assign({ + imagesPerRow: 0, + imageWidth: 120, + imageHeight: 120, + mode: "traditional", + }, general.galleryoptions), }, }; diff --git a/lib/ext/Gallery/index.js b/lib/ext/Gallery/index.js index c793b33..b1fb315 100644 --- a/lib/ext/Gallery/index.js +++ b/lib/ext/Gallery/index.js @@ -15,7 +15,9 @@ var modes = require('./modes.js'); -var Opts = function(attrs) { +var Opts = function(env, attrs) { + Object.assign(this, env.conf.wiki.siteInfo.general.galleryoptions); + var perrow = parseInt(attrs.perrow, 10); if (!Number.isNaN(perrow)) { this.imagesPerRow = perrow; } @@ -31,12 +33,6 @@ this.showfilename = (attrs.showfilename !== undefined); this.caption = attrs.caption; }; - -// FIXME: Expose `wgGalleryOptions` from the MW API -Opts.prototype.imagesPerRow = 0; -Opts.prototype.imageWidth = 120; -Opts.prototype.imageHeight = 120; -Opts.prototype.mode = 'traditional'; // FIXME: This is too permissive. The php implementation only calls // `replaceInternalLinks` on the gallery caption. We should have a new @@ -160,7 +156,7 @@ var tokenHandler = function(manager, pipelineOpts, extToken, cb) { var env = manager.env; var argDict = Util.getArgInfo(extToken).dict; - var opts = new Opts(argDict.attrs); + var opts = new Opts(env, argDict.attrs); // FIXME: Only remove after VE switches to editing HTML. if (env.nativeGallery) { -- To view, visit https://gerrit.wikimedia.org/r/324336 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I50b0e20537d9a870693d24dae5312e7a509fdaac Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Arlolra___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] oojs/ui[master]: Tag v0.18.1
jenkins-bot has submitted this change and it was merged. Change subject: Tag v0.18.1 .. Tag v0.18.1 Change-Id: I7513c3233b07780bab7a90de8a3b249a8d33448f --- M History.md M package.json 2 files changed, 19 insertions(+), 1 deletion(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/History.md b/History.md index 07695a5..bed1b26 100644 --- a/History.md +++ b/History.md @@ -1,4 +1,22 @@ # OOjs UI Release History +## v0.18.1 / 2016-11-29 +### Features +* PopupElement: Allow $autoCloseIgnore to be overridden (Roan Kattouw) +* WindowManager: Allow $returnFocusTo to be null (Ed Sanders) + +### Styles +* MediaWiki theme: Reduce, align `margin` and `padding` of form elements (Volker E) +* MediaWiki theme: Replace color function with palette color (Volker E) +* MediaWiki theme: Standard placeholder colours for CapsuleMultiselectWidget too (Bartosz Dziewoński) +* MediaWiki theme: Tweak destructive red for background-independent contrast (Volker E) + +### Code +* Field & Fieldset: Make help popup code consistent (Ed Sanders) +* PopupWidget: Consistently use OO.ui.contains() for auto-closing (Roan Kattouw) +* build: Bump eslint-config-wikimedia to v0.3.0 and make pass (James D. Forrester) +* eslint: Re-enable wrap-iife and partially enable dot-notation (Ed Sanders) + + ## v0.18.0 / 2016-11-08 ### Breaking changes * [BREAKING CHANGE] ComboBoxWidget: Remove this deprecated alias for ComboBoxInputWidget (James D. Forrester) diff --git a/package.json b/package.json index b3ed7aa..45e9815 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "oojs-ui", - "version": "0.18.0", + "version": "0.18.1", "description": "User interface classes built on the OOjs framework.", "keywords": [ "oojs-plugin", -- To view, visit https://gerrit.wikimedia.org/r/324334 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7513c3233b07780bab7a90de8a3b249a8d33448f Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: JforresterGerrit-Reviewer: Catrope Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: mediawiki.notification: Improve scroll performance
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/324335 Change subject: mediawiki.notification: Improve scroll performance .. mediawiki.notification: Improve scroll performance (MacBook Pro, Latest Chrome, CPU throttle 5x) 1. Before * Duration of no-change scroll event (not crossing offset.top in ither direction) ~5ms * Duration of changed scroll event (crossing the offset.top and swapping classes) ~10ms * Paint: - 16ms for no-change frames (50-60fps) - 40ms for frames that paint a change. (25-30fps) 2. After storing isFloating as boolean and not checking className if nothing changed. * no-change scroll event: ~0.13ms * changed scroll event: ~2ms * Paint: - 15ms for no-change frame (60fps) - 33ms for no-change frame (30fps) 3. After changing $window.scrollTop() to window.pageYOffset. * no-change scroll event: 15μs (0.015ms) * changed scroll event: ~1ms * Paint: - 11ms for no-change frame (60fps) - 20ms for no-change frame (48fps) Change-Id: Ia48b00cd0834700ce79e72d4599c51ff8c6179b5 --- M resources/src/mediawiki/mediawiki.notification.js 1 file changed, 8 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/35/324335/1 diff --git a/resources/src/mediawiki/mediawiki.notification.js b/resources/src/mediawiki/mediawiki.notification.js index 926f8c5..e1287db 100644 --- a/resources/src/mediawiki/mediawiki.notification.js +++ b/resources/src/mediawiki/mediawiki.notification.js @@ -262,7 +262,8 @@ * @ignore */ function init() { - var offset, $window = $( window ); + var offset, + isFloating = false; $area = $( '' ) // Pause auto-hide timers when the mouse is in the notification area. @@ -289,13 +290,17 @@ $area.hide(); function updateAreaMode() { - var isFloating = $window.scrollTop() > offset.top; + var shouldFloat = window.pageYOffset > offset.top; + if ( isFloating === shouldFloat ) { + return; + } + isFloating = shouldFloat; $area .toggleClass( 'mw-notification-area-floating', isFloating ) .toggleClass( 'mw-notification-area-layout', !isFloating ); } - $window.on( 'scroll', updateAreaMode ); + $( window ).on( 'scroll', updateAreaMode ); // Initial mode updateAreaMode(); -- To view, visit https://gerrit.wikimedia.org/r/324335 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia48b00cd0834700ce79e72d4599c51ff8c6179b5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Krinkle___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] oojs/ui[master]: Tag v0.18.1
Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/324334 Change subject: Tag v0.18.1 .. Tag v0.18.1 Change-Id: I7513c3233b07780bab7a90de8a3b249a8d33448f --- M History.md M package.json 2 files changed, 19 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/34/324334/1 diff --git a/History.md b/History.md index 07695a5..bed1b26 100644 --- a/History.md +++ b/History.md @@ -1,4 +1,22 @@ # OOjs UI Release History +## v0.18.1 / 2016-11-29 +### Features +* PopupElement: Allow $autoCloseIgnore to be overridden (Roan Kattouw) +* WindowManager: Allow $returnFocusTo to be null (Ed Sanders) + +### Styles +* MediaWiki theme: Reduce, align `margin` and `padding` of form elements (Volker E) +* MediaWiki theme: Replace color function with palette color (Volker E) +* MediaWiki theme: Standard placeholder colours for CapsuleMultiselectWidget too (Bartosz Dziewoński) +* MediaWiki theme: Tweak destructive red for background-independent contrast (Volker E) + +### Code +* Field & Fieldset: Make help popup code consistent (Ed Sanders) +* PopupWidget: Consistently use OO.ui.contains() for auto-closing (Roan Kattouw) +* build: Bump eslint-config-wikimedia to v0.3.0 and make pass (James D. Forrester) +* eslint: Re-enable wrap-iife and partially enable dot-notation (Ed Sanders) + + ## v0.18.0 / 2016-11-08 ### Breaking changes * [BREAKING CHANGE] ComboBoxWidget: Remove this deprecated alias for ComboBoxInputWidget (James D. Forrester) diff --git a/package.json b/package.json index b3ed7aa..45e9815 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "oojs-ui", - "version": "0.18.0", + "version": "0.18.1", "description": "User interface classes built on the OOjs framework.", "keywords": [ "oojs-plugin", -- To view, visit https://gerrit.wikimedia.org/r/324334 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7513c3233b07780bab7a90de8a3b249a8d33448f Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: Jforrester___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] oojs/ui[master]: MediaWiki theme: Reduce, align `margin` and `padding` of for...
jenkins-bot has submitted this change and it was merged. Change subject: MediaWiki theme: Reduce, align `margin` and `padding` of form elements .. MediaWiki theme: Reduce, align `margin` and `padding` of form elements Unifying and aligning `margin` and `padding` of form elements across fieldLayouts and to M101 design guideline. Applying `margin-top` with `:first-child` override as it's supported by IE 7+ in contrast to `:last-child`. Also using more appropriate `margin` over `border` when applicable. This results in reduced, yet more harmonious usage of whitespace and so denser form views. Bug: T136790 Bug: T145675 Change-Id: Id721c75439c27da1b72f4c686268e9da6ef3f252 --- M src/themes/mediawiki/common.less M src/themes/mediawiki/layouts.less 2 files changed, 37 insertions(+), 33 deletions(-) Approvals: Bartosz Dziewoński: Looks good to me, but someone else must approve Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/src/themes/mediawiki/common.less b/src/themes/mediawiki/common.less index f9c6c8a..fda22e6 100644 --- a/src/themes/mediawiki/common.less +++ b/src/themes/mediawiki/common.less @@ -122,7 +122,7 @@ @border-color-input-binary-active: @color-progressive-active; @border-color-input-binary-on: @color-progressive; @box-shadow-input-binary: 0 0 0 1px rgba( 0, 0, 0, 0.1 ); -@padding-input-binary-label: 0.25em 0.25em 0.25em 0.5em; +@padding-input-binary-label: 0.25em 0.25em 0.25em 0.46875em; // Theme mixins diff --git a/src/themes/mediawiki/layouts.less b/src/themes/mediawiki/layouts.less index 8767ed6..2a169c4 100644 --- a/src/themes/mediawiki/layouts.less +++ b/src/themes/mediawiki/layouts.less @@ -35,46 +35,52 @@ } .theme-oo-ui-fieldLayout () { - margin-bottom: 1em; + // At base `font-size: 12.8px` we just relatively follow M101 design guideline here + margin-top: 1.640625em; // `1.5em` in the guideline, we go for `21px`/`1.640625em` - &:last-child { - margin-bottom: 0; - } - - &.oo-ui-fieldLayout-align-left, - &.oo-ui-fieldLayout-align-right { - &.oo-ui-labelElement > .oo-ui-fieldLayout-body > .oo-ui-labelElement-label { - padding-top: 0.5em; - margin-right: 5%; - width: 35%; - } - - > .oo-ui-fieldLayout-body > .oo-ui-fieldLayout-field { - width: 60%; - } - } - + &.oo-ui-labelElement, &.oo-ui-fieldLayout-align-inline { - margin-bottom: 1.25em; + margin-top: 1.171875em; // `1.25em` in the guideline, we go for `15px`/`1.171875em` + } - &.oo-ui-labelElement > .oo-ui-fieldLayout-body > .oo-ui-labelElement-label { - padding: @padding-input-binary-label; + &, + &.oo-ui-labelElement, + &.oo-ui-fieldLayout-align-inline { + &:first-child { + margin-top: 0; } } - &.oo-ui-fieldLayout-align-top { - &.oo-ui-labelElement > .oo-ui-fieldLayout-body > .oo-ui-labelElement-label { - padding-top: 0.25em; - padding-bottom: 0.5em; + &.oo-ui-labelElement { + & > .oo-ui-fieldLayout-body > .oo-ui-labelElement-label { + padding-bottom: 0.3125em; // equals `4px` at base `font-size: 12.8px` } - } - > .oo-ui-popupButtonWidget { - .oo-ui-inline-spacing( 0 ); + &.oo-ui-fieldLayout-align-inline > .oo-ui-fieldLayout-body > .oo-ui-labelElement-label { + padding: 0.3125em 0.46875em; // equals `4px 6px` at base `font-size: 12.8px` + // `6px` is not aligned to M101 design guideline, as checkbox and radios sizes aren't either + } + + &.oo-ui-fieldLayout-align-left, + &.oo-ui-fieldLayout-align-right { + & > .oo-ui-fieldLayout-body > .oo-ui-labelElement-label { + width: 35%; + margin-right: 5%; + padding-top: 0.3125em; + } + + > .oo-ui-fieldLayout-body > .oo-ui-fieldLayout-field { + width: 60%; + } + } } &-disabled > .oo-ui-fieldLayout-body > .oo-ui-labelElement-label { color: @color-disabled; + } + + > .oo-ui-popupButtonWidget { + .oo-ui-inline-spacing( 0 ); } &-messages { @@ -90,12 +96,11 @@ .oo-ui-iconWidget { display: table-cell; - border-right: 0.5em solid transparent; } .oo-ui-labelWidget {
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "Monolog: Add processor for XFF resolved IP"
Chad has uploaded a new change for review. https://gerrit.wikimedia.org/r/324333 Change subject: Revert "Monolog: Add processor for XFF resolved IP" .. Revert "Monolog: Add processor for XFF resolved IP" Causes segfault. This reverts commit 79b0adc5525b249d9d90371a9167aded38dc. Change-Id: I4d46a15ede6c6471925398f5a2bd716d15b139e5 --- M wmf-config/logging.php 1 file changed, 0 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/33/324333/1 diff --git a/wmf-config/logging.php b/wmf-config/logging.php index d56c9fa..45a8eb4 100644 --- a/wmf-config/logging.php +++ b/wmf-config/logging.php @@ -58,22 +58,6 @@ 'psr' => [ 'class' => '\\Monolog\\Processor\\PsrLogMessageProcessor', ], - 'xff-ip' => [ - 'factory' => function () { - /** -* Overwrite the 'ip' key set by WebProcessor with a version that -* honors XFF headers if we can. T114700 -*/ - return function( array $record ) { - try { - $record['ip'] = RequestContext::getMain()->getRequest()->getIP(); - } catch ( Exception $ignored ) { - // no-op - } - return $record; - }; - }, - ], 'web' => [ 'class' => '\\Monolog\\Processor\\WebProcessor', ], -- To view, visit https://gerrit.wikimedia.org/r/324333 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4d46a15ede6c6471925398f5a2bd716d15b139e5 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Chad___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "Monolog: Add processor for XFF resolved IP"
Chad has submitted this change and it was merged. Change subject: Revert "Monolog: Add processor for XFF resolved IP" .. Revert "Monolog: Add processor for XFF resolved IP" Causes segfault. This reverts commit 79b0adc5525b249d9d90371a9167aded38dc. Change-Id: I4d46a15ede6c6471925398f5a2bd716d15b139e5 --- M wmf-config/logging.php 1 file changed, 0 insertions(+), 16 deletions(-) Approvals: Chad: Verified; Looks good to me, approved diff --git a/wmf-config/logging.php b/wmf-config/logging.php index d56c9fa..45a8eb4 100644 --- a/wmf-config/logging.php +++ b/wmf-config/logging.php @@ -58,22 +58,6 @@ 'psr' => [ 'class' => '\\Monolog\\Processor\\PsrLogMessageProcessor', ], - 'xff-ip' => [ - 'factory' => function () { - /** -* Overwrite the 'ip' key set by WebProcessor with a version that -* honors XFF headers if we can. T114700 -*/ - return function( array $record ) { - try { - $record['ip'] = RequestContext::getMain()->getRequest()->getIP(); - } catch ( Exception $ignored ) { - // no-op - } - return $record; - }; - }, - ], 'web' => [ 'class' => '\\Monolog\\Processor\\WebProcessor', ], -- To view, visit https://gerrit.wikimedia.org/r/324333 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4d46a15ede6c6471925398f5a2bd716d15b139e5 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: ChadGerrit-Reviewer: Chad ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Rank aliases in search in order they appear in the messages ...
Smalyshev has uploaded a new change for review. https://gerrit.wikimedia.org/r/324332 Change subject: Rank aliases in search in order they appear in the messages file. .. Rank aliases in search in order they appear in the messages file. This will ensure the local page name (which is the first alias) is prioritized. Bug: T151660 Change-Id: I3cc266024f5e052d20ff55c4b2c6cbd2945e3dd3 --- M includes/PrefixSearch.php 1 file changed, 14 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/32/324332/1 diff --git a/includes/PrefixSearch.php b/includes/PrefixSearch.php index f6c4147..8920223 100644 --- a/includes/PrefixSearch.php +++ b/includes/PrefixSearch.php @@ -239,7 +239,7 @@ // canonical and alias title forms... $keys = []; foreach ( SpecialPageFactory::getNames() as $page ) { - $keys[$wgContLang->caseFold( $page )] = $page; + $keys[$wgContLang->caseFold( $page )] = [ 'page' => $page, 'rank' => 0 ]; } foreach ( $wgContLang->getSpecialPageAliases() as $page => $aliases ) { @@ -247,33 +247,34 @@ continue; } - foreach ( $aliases as $alias ) { - $keys[$wgContLang->caseFold( $alias )] = $alias; + foreach ( $aliases as $key => $alias ) { + $keys[$wgContLang->caseFold( $alias )] = [ 'page' => $alias, 'rank' => $key ]; } } ksort( $keys ); - $srchres = []; - $skipped = 0; + $matches = []; foreach ( $keys as $pageKey => $page ) { if ( $searchKey === '' || strpos( $pageKey, $searchKey ) === 0 ) { // bug 27671: Don't use SpecialPage::getTitleFor() here because it // localizes its input leading to searches for e.g. Special:All // returning Spezial:MediaWiki-Systemnachrichten and returning // Spezial:Alle_Seiten twice when $wgLanguageCode == 'de' - if ( $offset > 0 && $skipped < $offset ) { - $skipped++; - continue; + $matches[$page['rank']][] = Title::makeTitleSafe( NS_SPECIAL, $page['page'] ); + + if ( isset( $matches[0] ) && count( $matches[0] ) >= $limit + $offset ) { + break; } - $srchres[] = Title::makeTitleSafe( NS_SPECIAL, $page ); } - if ( count( $srchres ) >= $limit ) { - break; - } } - return $srchres; + // Ensure keys are in order + ksort($matches); + // Flatten the array + $matches = array_reduce( $matches, 'array_merge', [] ); + + return array_slice( $matches, $offset, $limit ); } /** -- To view, visit https://gerrit.wikimedia.org/r/324332 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3cc266024f5e052d20ff55c4b2c6cbd2945e3dd3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Smalyshev___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: labstore: configure etytree to mount public dumps
Rush has submitted this change and it was merged. Change subject: labstore: configure etytree to mount public dumps .. labstore: configure etytree to mount public dumps Change-Id: Ib71fe79a161171356b910a27ed041c13fecdd711 Bugs: T151933 --- M modules/labstore/files/nfs-mounts.yaml 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Andrew Bogott: Looks good to me, but someone else must approve Rush: Verified; Looks good to me, approved diff --git a/modules/labstore/files/nfs-mounts.yaml b/modules/labstore/files/nfs-mounts.yaml index aa7bbc2..b96669f 100644 --- a/modules/labstore/files/nfs-mounts.yaml +++ b/modules/labstore/files/nfs-mounts.yaml @@ -54,6 +54,10 @@ gid: 50068 mounts: project: true + etytree: +gid: 53231 +mounts: + dumps: true fastcci: gid: 50983 mounts: -- To view, visit https://gerrit.wikimedia.org/r/324326 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib71fe79a161171356b910a27ed041c13fecdd711 Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: RushGerrit-Reviewer: Andrew Bogott Gerrit-Reviewer: Rush Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits