[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Depool db1079
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/383308 ) Change subject: db-eqiad.php: Depool db1079 .. db-eqiad.php: Depool db1079 Going to optimize pagelinks and templatelinks Bug: T174509 Change-Id: Ib0b8d63ae2c64ce26daea93bce57d13250f7902f --- M wmf-config/db-eqiad.php 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Marostegui: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index 5af3c64..e363c34 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -168,8 +168,8 @@ 'db1034' => 1, # B2 1.4TB 64GB, watchlist, recentchanges, contributions, logpager # 'db1039' => 0, # B2 1.4TB 64GB 'db1069' => 0, # D1 2.8TB 160GB, vslow, dump, old master - 'db1079' => 300, # A2 3.6TB 512GB, api #master for db1102 (sanitarium 3) - 'db1086' => 500, # B3 3.6TB 512GB, api + # 'db1079' => 300, # A2 3.6TB 512GB, api #master for db1102 (sanitarium 3) #T174509 + 'db1086' => 200, # B3 3.6TB 512GB, api 'db1094' => 500, # D2 3.6TB 512GB ], 'silver' => [ @@ -426,7 +426,7 @@ 'db1069' => 1, ], 'api' => [ - 'db1079' => 100, + # 'db1079' => 100, 'db1086' => 1, ], 'watchlist' => [ -- To view, visit https://gerrit.wikimedia.org/r/383308 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib0b8d63ae2c64ce26daea93bce57d13250f7902f Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: MarosteguiGerrit-Reviewer: Jcrespo Gerrit-Reviewer: Marostegui Gerrit-Reviewer: Urbanecm Gerrit-Reviewer: Zoranzoki21 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]: db-eqiad.php: Depool db1079
Marostegui has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383308 ) Change subject: db-eqiad.php: Depool db1079 .. db-eqiad.php: Depool db1079 Going to optimize pagelinks and templatelinks Bug: T174509 Change-Id: Ib0b8d63ae2c64ce26daea93bce57d13250f7902f --- M wmf-config/db-eqiad.php 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/08/383308/1 diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index 5af3c64..e363c34 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -168,8 +168,8 @@ 'db1034' => 1, # B2 1.4TB 64GB, watchlist, recentchanges, contributions, logpager # 'db1039' => 0, # B2 1.4TB 64GB 'db1069' => 0, # D1 2.8TB 160GB, vslow, dump, old master - 'db1079' => 300, # A2 3.6TB 512GB, api #master for db1102 (sanitarium 3) - 'db1086' => 500, # B3 3.6TB 512GB, api + # 'db1079' => 300, # A2 3.6TB 512GB, api #master for db1102 (sanitarium 3) #T174509 + 'db1086' => 200, # B3 3.6TB 512GB, api 'db1094' => 500, # D2 3.6TB 512GB ], 'silver' => [ @@ -426,7 +426,7 @@ 'db1069' => 1, ], 'api' => [ - 'db1079' => 100, + # 'db1079' => 100, 'db1086' => 1, ], 'watchlist' => [ -- To view, visit https://gerrit.wikimedia.org/r/383308 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib0b8d63ae2c64ce26daea93bce57d13250f7902f Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Marostegui___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Depool db1071
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/383307 ) Change subject: db-eqiad.php: Depool db1071 .. db-eqiad.php: Depool db1071 Going to optimize pagelinks and templatelinks Bug: T174509 Change-Id: I8ca5a36f7f63dba85c1596405ae4a8370e747641 --- M wmf-config/db-eqiad.php 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Marostegui: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index 2472f5d..5af3c64 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -143,13 +143,13 @@ 's5' => [ 'db1063' => 0, # C5 2.8TB 128GB, master 'db1070' => 1, # D1 2.8TB 160GB, vslow, dump #ROW based replication - master for db1095 - 'db1071' => 50, # D1 2.8TB 160GB, api + # 'db1071' => 50, # D1 2.8TB 160GB, api #T174509 'db1082' => 300, # A2 3.6TB 512GB, api 'db1087' => 500, # C2 3.6TB 512GB 'db1092' => 500, # D2 3.6TB 512GB 'db1096' => 1, # A6 3.6TB 512GB, watchlist, recentchanges, contributions, logpager 'db1099' => 1, # B2 3.6TB 512GB, watchlist, recentchanges, contributions, logpager - # 'db1100' => 1, # C2 3.6TB 512GB, old master, crashed + 'db1100' => 1, # C2 3.6TB 512GB, old master #api #T174509 # 'db1104' => 100, # B3 3.6TB 512GB # Cloning db1106 'db1105' => 100, # C3 3.6TB 512GB #low weight after being provisioned 'db1106' => 100, # D3 3.6TB 512GB #low weight after being provisioned @@ -368,7 +368,7 @@ 'db1070' => 1, ], 'api' => [ - 'db1071' => 1, + 'db1100' => 1, 'db1082' => 1, ], 'watchlist' => [ -- To view, visit https://gerrit.wikimedia.org/r/383307 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8ca5a36f7f63dba85c1596405ae4a8370e747641 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: MarosteguiGerrit-Reviewer: Jcrespo Gerrit-Reviewer: Marostegui 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]: db-eqiad.php: Depool db1071
Marostegui has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383307 ) Change subject: db-eqiad.php: Depool db1071 .. db-eqiad.php: Depool db1071 Going to optimize pagelinks and templatelinks Bug: T174509 Change-Id: I8ca5a36f7f63dba85c1596405ae4a8370e747641 --- M wmf-config/db-eqiad.php 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/07/383307/1 diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index 2472f5d..5af3c64 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -143,13 +143,13 @@ 's5' => [ 'db1063' => 0, # C5 2.8TB 128GB, master 'db1070' => 1, # D1 2.8TB 160GB, vslow, dump #ROW based replication - master for db1095 - 'db1071' => 50, # D1 2.8TB 160GB, api + # 'db1071' => 50, # D1 2.8TB 160GB, api #T174509 'db1082' => 300, # A2 3.6TB 512GB, api 'db1087' => 500, # C2 3.6TB 512GB 'db1092' => 500, # D2 3.6TB 512GB 'db1096' => 1, # A6 3.6TB 512GB, watchlist, recentchanges, contributions, logpager 'db1099' => 1, # B2 3.6TB 512GB, watchlist, recentchanges, contributions, logpager - # 'db1100' => 1, # C2 3.6TB 512GB, old master, crashed + 'db1100' => 1, # C2 3.6TB 512GB, old master #api #T174509 # 'db1104' => 100, # B3 3.6TB 512GB # Cloning db1106 'db1105' => 100, # C3 3.6TB 512GB #low weight after being provisioned 'db1106' => 100, # D3 3.6TB 512GB #low weight after being provisioned @@ -368,7 +368,7 @@ 'db1070' => 1, ], 'api' => [ - 'db1071' => 1, + 'db1100' => 1, 'db1082' => 1, ], 'watchlist' => [ -- To view, visit https://gerrit.wikimedia.org/r/383307 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8ca5a36f7f63dba85c1596405ae4a8370e747641 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Marostegui___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Depool db1076
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/383306 ) Change subject: db-eqiad.php: Depool db1076 .. db-eqiad.php: Depool db1076 Going to optimize pagelinks and templatelinks Bug: T174509 Change-Id: Ia50b404846c9199eafd632ceb6a3f001bac489bf --- M wmf-config/db-eqiad.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Marostegui: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index 2b73727..2472f5d 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -117,7 +117,7 @@ 'db1021' => 0, # B1 1.4TB 64GB, vslow, dump 'db1060' => 1, # C2 2.8TB 96GB, api #master for sanitarium #T153743 'db1074' => 300, # A2 3.6TB 512GB, api - 'db1076' => 500, # B1 3.6TB 512GB + # 'db1076' => 500, # B1 3.6TB 512GB #T174509 'db1090' => 500, # C3 3.6TB 512GB 'db1101' => 1, # C2 3.6TB 512GB, watchlist, recentchanges, contributions, logpager, old master 2 ], -- To view, visit https://gerrit.wikimedia.org/r/383306 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia50b404846c9199eafd632ceb6a3f001bac489bf Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: MarosteguiGerrit-Reviewer: Jcrespo Gerrit-Reviewer: Marostegui Gerrit-Reviewer: Urbanecm Gerrit-Reviewer: Zoranzoki21 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]: db-eqiad.php: Depool db1076
Marostegui has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383306 ) Change subject: db-eqiad.php: Depool db1076 .. db-eqiad.php: Depool db1076 Going to optimize pagelinks and templatelinks Bug: T174509 Change-Id: Ia50b404846c9199eafd632ceb6a3f001bac489bf --- M wmf-config/db-eqiad.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/06/383306/1 diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index 2b73727..2472f5d 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -117,7 +117,7 @@ 'db1021' => 0, # B1 1.4TB 64GB, vslow, dump 'db1060' => 1, # C2 2.8TB 96GB, api #master for sanitarium #T153743 'db1074' => 300, # A2 3.6TB 512GB, api - 'db1076' => 500, # B1 3.6TB 512GB + # 'db1076' => 500, # B1 3.6TB 512GB #T174509 'db1090' => 500, # C3 3.6TB 512GB 'db1101' => 1, # C2 3.6TB 512GB, watchlist, recentchanges, contributions, logpager, old master 2 ], -- To view, visit https://gerrit.wikimedia.org/r/383306 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia50b404846c9199eafd632ceb6a3f001bac489bf Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Marostegui___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Depool db1080
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/383305 ) Change subject: db-eqiad.php: Depool db1080 .. db-eqiad.php: Depool db1080 Going to optimize templatelinks and pagelinks Bug: T174509 Change-Id: I972fc944f7cc757fc41f1b602d7c63f55ec8f49b --- M wmf-config/db-eqiad.php 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Marostegui: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index 1264ddf..2b73727 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -106,9 +106,9 @@ 'db1051' => 1, # B3 2.8TB 96GB, watchlist, recentchanges, contributions, logpager 'db1055' => 1, # C2 2.8TB 96GB, watchlist, recentchanges, contributions, logpager 'db1065' => 0, # D1 2.8TB 160GB, vslow, dump, master for sanitarium - 'db1066' => 50, # D1 2.8TB 160GB, api - 'db1073' => 50, # B3 2.8TB 160GB, api - 'db1080' => 300, # A2 3.6TB 512GB, api #T172679#3650005 + 'db1066' => 1, # D1 2.8TB 160GB, api + 'db1073' => 1, # B3 2.8TB 160GB, api + # 'db1080' => 300, # A2 3.6TB 512GB, api #T172679#3650005 #T174509 'db1083' => 500, # B1 3.6TB 512GB 'db1089' => 500, # C3 3.6TB 512GB ], @@ -273,7 +273,7 @@ 'db1065' => 1, ], 'api' => [ - 'db1080' => 1, + # 'db1080' => 1, 'db1073' => 1, 'db1066' => 1, ], -- To view, visit https://gerrit.wikimedia.org/r/383305 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I972fc944f7cc757fc41f1b602d7c63f55ec8f49b Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: MarosteguiGerrit-Reviewer: Jcrespo Gerrit-Reviewer: Marostegui Gerrit-Reviewer: Urbanecm Gerrit-Reviewer: Zoranzoki21 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]: db-eqiad.php: Depool db1080
Marostegui has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383305 ) Change subject: db-eqiad.php: Depool db1080 .. db-eqiad.php: Depool db1080 Going to optimize templatelinks and pagelinks Bug: T174509 Change-Id: I972fc944f7cc757fc41f1b602d7c63f55ec8f49b --- M wmf-config/db-eqiad.php 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/05/383305/1 diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index 1264ddf..2b73727 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -106,9 +106,9 @@ 'db1051' => 1, # B3 2.8TB 96GB, watchlist, recentchanges, contributions, logpager 'db1055' => 1, # C2 2.8TB 96GB, watchlist, recentchanges, contributions, logpager 'db1065' => 0, # D1 2.8TB 160GB, vslow, dump, master for sanitarium - 'db1066' => 50, # D1 2.8TB 160GB, api - 'db1073' => 50, # B3 2.8TB 160GB, api - 'db1080' => 300, # A2 3.6TB 512GB, api #T172679#3650005 + 'db1066' => 1, # D1 2.8TB 160GB, api + 'db1073' => 1, # B3 2.8TB 160GB, api + # 'db1080' => 300, # A2 3.6TB 512GB, api #T172679#3650005 #T174509 'db1083' => 500, # B1 3.6TB 512GB 'db1089' => 500, # C3 3.6TB 512GB ], @@ -273,7 +273,7 @@ 'db1065' => 1, ], 'api' => [ - 'db1080' => 1, + # 'db1080' => 1, 'db1073' => 1, 'db1066' => 1, ], -- To view, visit https://gerrit.wikimedia.org/r/383305 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I972fc944f7cc757fc41f1b602d7c63f55ec8f49b Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Marostegui___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: DesktopArticleTarget.init: Load 'mediawiki.action.view.postE...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382614 ) Change subject: DesktopArticleTarget.init: Load 'mediawiki.action.view.postEdit' via loader .. DesktopArticleTarget.init: Load 'mediawiki.action.view.postEdit' via loader Bug: T164148 Change-Id: I537144bfd52ff84499f5d086f5d05efe2ba0493b --- M extension.json M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js 3 files changed, 5 insertions(+), 2 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/extension.json b/extension.json index f5e35b8..db9c1ed 100644 --- a/extension.json +++ b/extension.json @@ -282,7 +282,6 @@ "mediawiki.user", "mediawiki.util", "mediawiki.api.options", - "mediawiki.action.view.postEdit", "user.options", "ext.visualEditor.supportCheck", "ext.visualEditor.track" diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js index e03535b..cafbf3f 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js +++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js @@ -1119,6 +1119,9 @@ } if ( uri.query.venotify ) { + // Load postEdit code to execute the queued event below, which will handle it once it arrives + mw.loader.load( 'mediawiki.action.view.postEdit' ); + // The following messages can be used here: // postedit-confirmation-saved // postedit-confirmation-created diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js index 1132dcd..f3ed051 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js @@ -969,7 +969,8 @@ // Update module JS config values and notify ResourceLoader of any new // modules needed to be added to the page mw.config.set( jsconfigvars ); - mw.loader.load( modules ); + // Also load postEdit in case it's needed, below. + mw.loader.load( modules.concat( [ 'mediawiki.action.view.postEdit' ] ) ); mw.config.set( { wgIsRedirect: !!isRedirect -- To view, visit https://gerrit.wikimedia.org/r/382614 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I537144bfd52ff84499f5d086f5d05efe2ba0493b Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: JforresterGerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: Esanders Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Krinkle Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...GlobalPreferences[master]: Set up local_preferences table
Samwilson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383304 ) Change subject: Set up local_preferences table .. Set up local_preferences table This adds a new local_preferences table, of exactly the same design as the global_preferences and user_properties tables. No integration into the rest of GlobalPreferences is done yet. Change-Id: I8e15f1570f314cae63a38325589f3d4811919bc6 --- M includes/Hooks.php R sql/create_global_preferences.sql A sql/create_local_preferences.sql 3 files changed, 15 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GlobalPreferences refs/changes/04/383304/1 diff --git a/includes/Hooks.php b/includes/Hooks.php index 5a461fb..7a35919 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -189,12 +189,18 @@ */ public static function onLoadExtensionSchemaUpdates( DatabaseUpdater $updater ) { global $wgGlobalPreferencesDB; + + // Global preferences table. if ( is_null( $wgGlobalPreferencesDB ) || $wgGlobalPreferencesDB === wfWikiID() ) { // Only add the table if it's supposed to be on this wiki. - $sqlPath = __DIR__ . '/../schema.sql'; + $sqlPath = __DIR__ . '/../sql/create_global_preferences.sql'; $updater->addExtensionTable( 'global_preferences', $sqlPath ); } + // Local preferences table. + $sqlPath = __DIR__ . '/../sql/create_local_preferences.sql'; + $updater->addExtensionTable( 'local_preferences', $sqlPath ); + return true; } diff --git a/schema.sql b/sql/create_global_preferences.sql similarity index 100% rename from schema.sql rename to sql/create_global_preferences.sql diff --git a/sql/create_local_preferences.sql b/sql/create_local_preferences.sql new file mode 100644 index 000..c9af6fa --- /dev/null +++ b/sql/create_local_preferences.sql @@ -0,0 +1,8 @@ +CREATE TABLE local_preferences ( + gp_user INT(11) NOT NULL, + gp_property VARBINARY(255) NOT NULL, + gp_value BLOB +) /*$wgDBTableOptions*/; + +CREATE UNIQUE INDEX /*i*/local_preferences_user_property ON /*_*/local_preferences (gp_user,gp_property); +CREATE INDEX /*i*/local_preferences_property ON /*_*/local_preferences (gp_property); -- To view, visit https://gerrit.wikimedia.org/r/383304 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8e15f1570f314cae63a38325589f3d4811919bc6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GlobalPreferences 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...Equivset[master]: readme: Fix for compat with Doxygen Markdown
Krinkle has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383303 ) Change subject: readme: Fix for compat with Doxygen Markdown .. readme: Fix for compat with Doxygen Markdown The tripple-backtick syntax works for GitHub only. Using PRE with lang="" attribute work in both GitHub, GitBlit and Doxygen. Also make use of containers explicit in Travis CI config (Default). Change-Id: Id605edb197471811013c34de3ca49e13ea7e1ee7 --- M .travis.yml M README.md 2 files changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/libs/Equivset refs/changes/03/383303/1 diff --git a/.travis.yml b/.travis.yml index 25460a7..da7f291 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,4 @@ +sudo: false language: php php: - "5.5" diff --git a/README.md b/README.md index c2ab69f..5548179 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ # Equivset + A mapping of "equivalent" characters to prevent spoofing. ## Usage -```php + + use Wikimedia\Equivset\Equivset; $equivset = new Equivset(); @@ -22,9 +24,10 @@ // Get the entire set. $all = $equivset->all(); -``` + ## Contributing + All changes should be made to `./data/equivset.in`. Then run `bin/console generate-equivset` to generate the JSON, serialized, and plain text versions of the equivset in `./dist`. -- To view, visit https://gerrit.wikimedia.org/r/383303 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id605edb197471811013c34de3ca49e13ea7e1ee7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/libs/Equivset 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...BoilerPlate[master]: Move classes into src directory, and remove exclusions for p...
Samwilson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383302 ) Change subject: Move classes into src directory, and remove exclusions for phpcs .. Move classes into src directory, and remove exclusions for phpcs Bug: T97105 Change-Id: Ia85f6fd7367f63e0922ec64f2c9bb46a48e416e0 --- M README.md M extension.json M phpcs.xml R src/Hooks.php R src/SpecialHelloWorld.php 5 files changed, 17 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BoilerPlate refs/changes/02/383302/1 diff --git a/README.md b/README.md index c973562..4bec7a3 100644 --- a/README.md +++ b/README.md @@ -12,9 +12,10 @@ This automates the recommended code checkers for PHP and JavaScript code in Wikimedia projects (see https://www.mediawiki.org/wiki/Continuous_integration/Entry_points). To take advantage of this automation. - # install nodejs, npm, and PHP composer - # change to the extension's directory - # npm install - # composer install + +1. install nodejs, npm, and PHP composer +2. change to the extension's directory +3. `npm install` +4. `composer install` Once set up, running `npm test` and `composer test` will run automated code checks. diff --git a/extension.json b/extension.json index 51c48ce..0f3b1ae 100644 --- a/extension.json +++ b/extension.json @@ -9,8 +9,8 @@ "license-name": "MIT", "type": "other", "AutoloadClasses": { - "MediaWiki\\Extension\\BoilerPlate\\Hooks": "BoilerPlate.hooks.php", - "MediaWiki\\Extension\\BoilerPlate\\SpecialHelloWorld": "specials/SpecialHelloWorld.php" + "MediaWiki\\Extension\\BoilerPlate\\Hooks": "src/Hooks.php", + "MediaWiki\\Extension\\BoilerPlate\\SpecialHelloWorld": "src/SpecialHelloWorld.php" }, "ConfigRegistry": { "boilerplate": "GlobalVarConfig::newInstance" diff --git a/phpcs.xml b/phpcs.xml index e688c40..95b1ff2 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -1,11 +1,6 @@ - - - - - - + . diff --git a/BoilerPlate.hooks.php b/src/Hooks.php similarity index 100% rename from BoilerPlate.hooks.php rename to src/Hooks.php diff --git a/specials/SpecialHelloWorld.php b/src/SpecialHelloWorld.php similarity index 92% rename from specials/SpecialHelloWorld.php rename to src/SpecialHelloWorld.php index 5e1162b..292135b 100644 --- a/specials/SpecialHelloWorld.php +++ b/src/SpecialHelloWorld.php @@ -42,7 +42,8 @@ 'myfield2' => [ 'section' => 'section1', 'label-message' => 'testform-myfield2', - 'class' => 'HTMLTextField', // same as type 'text' + // HTMLTextField class is the same as type 'text' + 'class' => 'HTMLTextField', ], 'myfield3' => [ 'class' => 'HTMLTextField', @@ -94,6 +95,10 @@ $htmlForm->show(); } + /** +* @param string[] $formData The submitted form data. +* @return bool|string +*/ static function trySubmit( $formData ) { if ( $formData['myfield1'] == 'Fleep' ) { return true; @@ -102,6 +107,9 @@ return 'HAHA FAIL'; } + /** +* @return string +*/ protected function getGroupName() { return 'other'; } -- To view, visit https://gerrit.wikimedia.org/r/383302 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia85f6fd7367f63e0922ec64f2c9bb46a48e416e0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BoilerPlate 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] wikimedia...SmashPig[master]: Add .editorconfig
Eileen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383301 ) Change subject: Add .editorconfig .. Add .editorconfig I couldn't actually find in the MediaWiki standard that it says we should use tabs instead of spaces, but that is what is happening in this module. Shame MediaWiki doesn't use psr-2 - would be one less, but like drupal they probably chose a standard before psr-2 won the standards war. I was amused to read the page as they advocated various things as 'being more readable' - when people clearly have differing opinions on that. Anyway, this isn't working in my IDE as well as I might hope with the spaces vs tabs, but I'm pretty sure it is right & the magic is in getting the IDE to work right (or waiting for a release that does). Bug: T177725 Change-Id: I317c068b28dd2cdede9d854e187fb952ac0fe3e2 --- A .editorconfig 1 file changed, 15 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig refs/changes/01/383301/1 diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000..9ec2faa --- /dev/null +++ b/.editorconfig @@ -0,0 +1,15 @@ +# This file is for unifying the coding style for different editors and IDEs +# editorconfig.org + +# WMF-special coding standard +# https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP + +root = true + +[*.php] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +indent_style = tab +indent_size = 4 -- To view, visit https://gerrit.wikimedia.org/r/383301 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I317c068b28dd2cdede9d854e187fb952ac0fe3e2 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/SmashPig Gerrit-Branch: master Gerrit-Owner: Eileen___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Add editorconfig to various drupal dirs with drupal whitespa...
Eileen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383300 ) Change subject: Add editorconfig to various drupal dirs with drupal whitespace standard .. Add editorconfig to various drupal dirs with drupal whitespace standard Bug: T177725 Change-Id: I2ea0ac49a03791135df199320508b43bd38ae0cc --- A sites/.editorconfig A sites/all/modules/.editorconfig A sites/default/civicrm/extensions/org.wikimedia.datachecks/.editorconfig A sites/default/civicrm/extensions/org.wikimedia.omnimail/.editorconfig A sites/default/civicrm/extensions/org.wikimedia.rip/.editorconfig A sites/default/civicrm/extensions/org.wikimedia.unsubscribeemail/.editorconfig 6 files changed, 84 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/00/383300/1 diff --git a/sites/.editorconfig b/sites/.editorconfig new file mode 100644 index 000..ccc6a28 --- /dev/null +++ b/sites/.editorconfig @@ -0,0 +1,14 @@ +# Drupal editor configuration normalization +# @see http://editorconfig.org/ + +# This is the top-most .editorconfig file; do not search in parent directories. +root = true + +# All files. +[*] +end_of_line = LF +indent_style = space +indent_size = 2 +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true diff --git a/sites/all/modules/.editorconfig b/sites/all/modules/.editorconfig new file mode 100644 index 000..ccc6a28 --- /dev/null +++ b/sites/all/modules/.editorconfig @@ -0,0 +1,14 @@ +# Drupal editor configuration normalization +# @see http://editorconfig.org/ + +# This is the top-most .editorconfig file; do not search in parent directories. +root = true + +# All files. +[*] +end_of_line = LF +indent_style = space +indent_size = 2 +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true diff --git a/sites/default/civicrm/extensions/org.wikimedia.datachecks/.editorconfig b/sites/default/civicrm/extensions/org.wikimedia.datachecks/.editorconfig new file mode 100644 index 000..ccc6a28 --- /dev/null +++ b/sites/default/civicrm/extensions/org.wikimedia.datachecks/.editorconfig @@ -0,0 +1,14 @@ +# Drupal editor configuration normalization +# @see http://editorconfig.org/ + +# This is the top-most .editorconfig file; do not search in parent directories. +root = true + +# All files. +[*] +end_of_line = LF +indent_style = space +indent_size = 2 +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true diff --git a/sites/default/civicrm/extensions/org.wikimedia.omnimail/.editorconfig b/sites/default/civicrm/extensions/org.wikimedia.omnimail/.editorconfig new file mode 100644 index 000..ccc6a28 --- /dev/null +++ b/sites/default/civicrm/extensions/org.wikimedia.omnimail/.editorconfig @@ -0,0 +1,14 @@ +# Drupal editor configuration normalization +# @see http://editorconfig.org/ + +# This is the top-most .editorconfig file; do not search in parent directories. +root = true + +# All files. +[*] +end_of_line = LF +indent_style = space +indent_size = 2 +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true diff --git a/sites/default/civicrm/extensions/org.wikimedia.rip/.editorconfig b/sites/default/civicrm/extensions/org.wikimedia.rip/.editorconfig new file mode 100644 index 000..ccc6a28 --- /dev/null +++ b/sites/default/civicrm/extensions/org.wikimedia.rip/.editorconfig @@ -0,0 +1,14 @@ +# Drupal editor configuration normalization +# @see http://editorconfig.org/ + +# This is the top-most .editorconfig file; do not search in parent directories. +root = true + +# All files. +[*] +end_of_line = LF +indent_style = space +indent_size = 2 +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true diff --git a/sites/default/civicrm/extensions/org.wikimedia.unsubscribeemail/.editorconfig b/sites/default/civicrm/extensions/org.wikimedia.unsubscribeemail/.editorconfig new file mode 100644 index 000..ccc6a28 --- /dev/null +++ b/sites/default/civicrm/extensions/org.wikimedia.unsubscribeemail/.editorconfig @@ -0,0 +1,14 @@ +# Drupal editor configuration normalization +# @see http://editorconfig.org/ + +# This is the top-most .editorconfig file; do not search in parent directories. +root = true + +# All files. +[*] +end_of_line = LF +indent_style = space +indent_size = 2 +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true -- To view, visit https://gerrit.wikimedia.org/r/383300 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2ea0ac49a03791135df199320508b43bd38ae0cc Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Eileen___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ConfirmEdit[master]: [WIP]Outreachy microtask: write a CAPTCHA plugin that can fa...
Smarita has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383299 ) Change subject: [WIP]Outreachy microtask: write a CAPTCHA plugin that can fall back to another algorithm .. [WIP]Outreachy microtask: write a CAPTCHA plugin that can fall back to another algorithm This captcha plugin, presents the user with a simple button asking him whether he is a robot. If he clicks on "Yes" then the page reloads and the captcha changes to SimpleCaptcha. Kindly note that this is a WIP and hence DO NOT MERGE BUG: T177034 Change-Id: I4bbaa8fba6a85aed05fe8ab26263007973968494 --- A SimplerCaptcha.php A SimplerCaptcha/ApiSimplerCaptchaReload.php A SimplerCaptcha/HTMLSimplerCaptchaField.php A SimplerCaptcha/SimplerCaptcha.class.php A SimplerCaptcha/SimplerCaptcha.php A SimplerCaptcha/extension.json A SimplerCaptcha/resources/ext.confirmEdit.simplerCaptcha.css A SimplerCaptcha/resources/ext.confirmEdit.simplerCaptcha.js M includes/ConfirmEditHooks.php 9 files changed, 407 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ConfirmEdit refs/changes/99/383299/1 diff --git a/SimplerCaptcha.php b/SimplerCaptcha.php new file mode 100644 index 000..91dca97 --- /dev/null +++ b/SimplerCaptcha.php @@ -0,0 +1,2 @@ + 'apihelp-simplercaptchareload-example-1', + ]; + } +} diff --git a/SimplerCaptcha/HTMLSimplerCaptchaField.php b/SimplerCaptcha/HTMLSimplerCaptchaField.php new file mode 100644 index 000..9bbe787 --- /dev/null +++ b/SimplerCaptcha/HTMLSimplerCaptchaField.php @@ -0,0 +1,73 @@ +showCreateHelp = !empty( $params['showCreateHelp'] ); + } + + public function getInputHTML( $value ) { + global $wgEnableAPI; + + $out = $this->mParent->getOutput(); + + // Uses addModuleStyles so it is loaded when JS is disabled. + $out->addModuleStyles( 'ext.confirmEdit.simplerCaptcha.styles' ); + + if ( $wgEnableAPI ) { + // Loaded only if JS is enabled + $out->addModules( 'ext.confirmEdit.simplerCaptcha' ); + + $captchaReload = Html::element( + 'small', + [ 'class' => 'confirmedit-captcha-reload simplercaptcha-reload' ], + $this->mParent->msg( 'simplercaptcha-reload-text' )->text() + ); + } else { + $captchaReload = ''; + } + + $html = Html::openElement( 'div', [ 'class' => 'simplercaptcha-captcha-container' ] ) + . Html::openElement( 'div', [ 'class' => 'simplercaptcha-captcha-and-reload' ] ) + . Html::linkButton( + "Yes, I am a bot!", + [ 'id' => 'bot'] +). "\n" + ; + + $html .= Html::closeElement( 'div' ); + + return $html; + } + + public function getLabel() { + // slight abuse of what getLabel() should mean; $mLabel is used for the pre-label text + // as the actual label is always the same + return $this->mParent->msg( 'captcha-label' )->text() . ' ' + . $this->mParent->msg( 'simplercaptcha-captcha' )->text(); + } + + public function getLabelHtml( $cellAttributes = [] ) { + $labelHtml = parent::getLabelHtml( $cellAttributes ); + if ( $this->mLabel ) { + // use raw element, the message will contain a link + $labelHtml = Html::rawElement( 'p', [], $this->mLabel ) . $labelHtml; + } + return $labelHtml; + } +} diff --git a/SimplerCaptcha/SimplerCaptcha.class.php b/SimplerCaptcha/SimplerCaptcha.class.php new file mode 100644 index 000..e4d622d --- /dev/null +++ b/SimplerCaptcha/SimplerCaptcha.class.php @@ -0,0 +1,169 @@ +getCaptcha(); + $index = $this->storeCaptcha( $info ); + + if ( $wgEnableAPI ) { + // Loaded only if JS is enabled + $modules[] = 'ext.confirmEdit.simplerCaptcha'; + + $captchaReload = Html::element( + 'small', + [ + 'class' => 'confirmedit-captcha-reload simplercaptcha-reload' + ], + wfMessage( 'simplercaptcha-reload-text' )->text() + ); + } else { + $captchaReload = ''; + } + + $form = Html::openElement( 'div' ) . + Html::element( 'label', [ + 'for' => 'wpCaptchaWord', + ], +
[MediaWiki-commits] [Gerrit] wikidata...gui[master]: gitignore npm-debug.log
Yurik has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383298 ) Change subject: gitignore npm-debug.log .. gitignore npm-debug.log Change-Id: I53b08564575f76106b4e43334d0ab0cdd3e8f0d8 --- M .gitignore 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui refs/changes/98/383298/1 diff --git a/.gitignore b/.gitignore index 3433e74..709d14c 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ .idea package-lock.json *.iml +npm-debug.log -- To view, visit https://gerrit.wikimedia.org/r/383298 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I53b08564575f76106b4e43334d0ab0cdd3e8f0d8 Gerrit-PatchSet: 1 Gerrit-Project: wikidata/query/gui Gerrit-Branch: master Gerrit-Owner: Yurik___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...UniversalLanguageSelector[master]: Use WCAG level AA conforming WikimediaUI color
VolkerE has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383297 ) Change subject: Use WCAG level AA conforming WikimediaUI color .. Use WCAG level AA conforming WikimediaUI color Applying WCAG level AA conforming WikimediaUI color `#54595d` instead of library out-of-box one. Change-Id: I6cbce473f1235bb29dac95e8129445e8bf0a8c20 --- M resources/css/ext.uls-vector.less 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/97/383297/1 diff --git a/resources/css/ext.uls-vector.less b/resources/css/ext.uls-vector.less index 1d2e193..f9e129d 100644 --- a/resources/css/ext.uls-vector.less +++ b/resources/css/ext.uls-vector.less @@ -15,4 +15,8 @@ .uls-filtersuggestion { color: #72777d; } + + .uls-lcd-region-title { + color: #54595d; + } } -- To view, visit https://gerrit.wikimedia.org/r/383297 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6cbce473f1235bb29dac95e8129445e8bf0a8c20 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: VolkerE___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...AdvancedSearch[master]: Use variable already in scope
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/383045 ) Change subject: Use variable already in scope .. Use variable already in scope Change-Id: Ieab09680b5ae509b2d6e77086809c1f9eb82ad48 --- M modules/dm/ext.advancedSearch.SearchModel.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Gabriel Birke: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/dm/ext.advancedSearch.SearchModel.js b/modules/dm/ext.advancedSearch.SearchModel.js index 7db542b..a7af335 100644 --- a/modules/dm/ext.advancedSearch.SearchModel.js +++ b/modules/dm/ext.advancedSearch.SearchModel.js @@ -194,7 +194,7 @@ if ( !fileType ) { return false; } - var generalFileType = this.getOption( 'filetype' ).replace( /\/.*/, '' ); + var generalFileType = fileType.replace( /\/.*/, '' ); return FILETYPES_WITH_DIMENSIONS.indexOf( generalFileType ) !== -1; }; -- To view, visit https://gerrit.wikimedia.org/r/383045 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ieab09680b5ae509b2d6e77086809c1f9eb82ad48 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AdvancedSearch Gerrit-Branch: master Gerrit-Owner: Jeroen De DauwGerrit-Reviewer: Addshore Gerrit-Reviewer: Andrew-WMDE Gerrit-Reviewer: Gabriel Birke Gerrit-Reviewer: Tobias Gritschacher Gerrit-Reviewer: WMDE-Fisch 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...AdvancedSearch[master]: Support dimensions for images and videos
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382679 ) Change subject: Support dimensions for images and videos .. Support dimensions for images and videos The list of supported image types broke when we started to use actual mime types. Now we're checking 'filetypes' (the first group of items in the file type selection) and the 1st part of MIME types. Bug: T176613 Change-Id: I9dcd5edad5df1d98f7cf9e60e898ca6662211174 --- M modules/dm/ext.advancedSearch.SearchModel.js M tests/qunit/dm/SearchModel.test.js 2 files changed, 31 insertions(+), 12 deletions(-) Approvals: Pablo Grass (WMDE): Looks good to me, but someone else must approve jenkins-bot: Verified Jeroen De Dauw: Looks good to me, approved diff --git a/modules/dm/ext.advancedSearch.SearchModel.js b/modules/dm/ext.advancedSearch.SearchModel.js index e34cbeb..7db542b 100644 --- a/modules/dm/ext.advancedSearch.SearchModel.js +++ b/modules/dm/ext.advancedSearch.SearchModel.js @@ -8,9 +8,9 @@ // Internal constants var FILETYPES_WITH_DIMENSIONS = [ 'bitmap', - 'video', - 'jpeg', - 'tiff' + 'vector', + 'image', + 'video' ]; /** @@ -190,7 +190,12 @@ * @return {boolean} */ mw.libs.advancedSearch.dm.SearchModel.prototype.filetypeSupportsDimensions = function () { - return FILETYPES_WITH_DIMENSIONS.indexOf( this.getOption( 'filetype' ) ) > -1; + var fileType = this.getOption( 'filetype' ); + if ( !fileType ) { + return false; + } + var generalFileType = this.getOption( 'filetype' ).replace( /\/.*/, '' ); + return FILETYPES_WITH_DIMENSIONS.indexOf( generalFileType ) !== -1; }; /** diff --git a/tests/qunit/dm/SearchModel.test.js b/tests/qunit/dm/SearchModel.test.js index 54bf3fb..7516aa4 100644 --- a/tests/qunit/dm/SearchModel.test.js +++ b/tests/qunit/dm/SearchModel.test.js @@ -145,24 +145,38 @@ assert.deepEqual( model.getOption( 'fileh' ), [ '>', '' ] ); } ); - QUnit.test( 'File types support dimensions configured', function ( assert ) { - assert.expect( 5 ); + QUnit.test( 'Image and Video file types support dimensions', function ( assert ) { + assert.expect( 10 ); var model = new SearchModel(); - model.storeOption( 'filetype', 'bitmap' ); - assert.ok( model.filetypeSupportsDimensions() ); + assert.notOk( model.filetypeSupportsDimensions(), 'Images are not supported when filetype is not set' ); + + model.storeOption( 'filetype', 'image' ); + assert.ok( model.filetypeSupportsDimensions(), 'General image type must be supported' ); model.storeOption( 'filetype', 'video' ); + assert.ok( model.filetypeSupportsDimensions(), 'General video type must be supported' ); + + model.storeOption( 'filetype', 'bitmap' ); + assert.ok( model.filetypeSupportsDimensions(), 'File type of bitmap must be supported' ); + + model.storeOption( 'filetype', 'vector' ); + assert.ok( model.filetypeSupportsDimensions(), 'File type of vector (drawing) must be supported' ); + + model.storeOption( 'filetype', 'image/jpeg' ); + assert.ok( model.filetypeSupportsDimensions(), 'Image MIME type must be supported' ); + + model.storeOption( 'filetype', 'image/svg+xml', 'Complex image MIME types must be supported' ); assert.ok( model.filetypeSupportsDimensions() ); - model.storeOption( 'filetype', 'jpeg' ); + model.storeOption( 'filetype', 'video/ogg', 'Video MIME types must be supported' ); assert.ok( model.filetypeSupportsDimensions() ); - model.storeOption( 'filetype', 'tiff' ); - assert.ok( model.filetypeSupportsDimensions() ); + model.storeOption( 'filetype', 'audio', 'Audio must not support dimensions' ); + assert.notOk( model.filetypeSupportsDimensions() ); - model.storeOption( 'filetype', 'random' ); + model.storeOption( 'filetype', 'audio/wav', 'Audio MIME types must not support dimensions' ); assert.notOk( model.filetypeSupportsDimensions() ); } ); -- To view, visit https://gerrit.wikimedia.org/r/382679 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9dcd5edad5df1d98f7cf9e60e898ca6662211174 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AdvancedSearch Gerrit-Branch: master Gerrit-Owner: Gabriel BirkeGerrit-Reviewer:
[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Merge branch 'master' of https://gerrit.wikimedia.org/r/wiki...
Eileen has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/383296 ) Change subject: Merge branch 'master' of https://gerrit.wikimedia.org/r/wikimedia/fundraising/crm into deployment .. Merge branch 'master' of https://gerrit.wikimedia.org/r/wikimedia/fundraising/crm into deployment + 3fdd4449ae46f4bc6c8586e888c7c700f395c84d The big group clean up. + bc006f63575a42223710cecfc9f494ad07c03ae8 Last change introduced an error when no address conflict exits Change-Id: Ie0a05f08d5a3b4b7e2d69baecba45a5f95e12cc6 --- D sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php 1 file changed, 0 insertions(+), 1,795 deletions(-) Approvals: jenkins-bot: Verified Eileen: Looks good to me, approved diff --git a/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php b/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php deleted file mode 100644 index 14c3bc3..000 --- a/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php +++ /dev/null @@ -1,1795 +0,0 @@ -<<< HEAD (00da4b Merge branch 'master' of https://gerrit.wikimedia.org/r/wiki) -=== -imitateAdminUser(); -$this->doDuckHunt(); -// Run through the merge first to make sure there aren't pre-existing contacts in the DB -// that will ruin the tests. -$this->callAPISuccess('Job', 'process_batch_merge', array('mode' => 'safe')); - -$this->contactID = $this->breedDuck(array(wmf_civicrm_get_custom_field_name('do_not_solicit') => 0)); -$this->contactID2 = $this->breedDuck(array(wmf_civicrm_get_custom_field_name('do_not_solicit') => 1)); - } - - public function tearDown() { -$this->callAPISuccess('Contribution', 'get', array( - 'contact_id' => array('IN' => array($this->contactID, $this->contactID2)), - 'api.Contribution.delete' => 1, -)); -$this->callAPISuccess('Contact', 'delete', array('id' => $this->contactID)); -$this->callAPISuccess('Contact', 'delete', array('id' => $this->contactID2)); -parent::tearDown(); - } - - /** - * Test that the merge hook causes our custom fields to not be treated as conflicts. - * - * We also need to check the custom data fields afterwards. - */ - public function testMergeHook() { -$this->callAPISuccess('Contribution', 'create', array( - 'contact_id' => $this->contactID, - 'financial_type_id' => 'Cash', - 'total_amount' => 10, - 'currency' => 'USD', - // Should cause 'is_2014 to be true. - 'receive_date' => '2014-08-04', - wmf_civicrm_get_custom_field_name('original_currency') => 'NZD', - wmf_civicrm_get_custom_field_name('original_amount') => 8, -)); -$this->callAPISuccess('Contribution', 'create', array( - 'contact_id' => $this->contactID2, - 'financial_type_id' => 'Cash', - 'total_amount' => 5, - 'currency' => 'USD', - // Should cause 'is_2012_donor to be true. - 'receive_date' => '2013-01-04', -)); -$this->callAPISuccess('Contribution', 'create', array( - 'contact_id' => $this->contactID2, - 'financial_type_id' => 'Cash', - 'total_amount' => 9, - 'currency' => 'NZD', - // Should cause 'is_2015_donor to be true. - 'receive_date' => '2016-04-04', -)); -$contact = $this->callAPISuccess('Contact', 'get', array( - 'id' => $this->contactID, - 'sequential' => 1, - 'return' => array(wmf_civicrm_get_custom_field_name('lifetime_usd_total'), wmf_civicrm_get_custom_field_name('do_not_solicit')), -)); -$this->assertEquals(10, $contact['values'][0][wmf_civicrm_get_custom_field_name('lifetime_usd_total')]); -$result = $this->callAPISuccess('Job', 'process_batch_merge', array( - 'criteria' => array('contact' => array('id' => array('IN' => array($this->contactID, $this->contactID2, -)); -$this->assertEquals(1, count($result['values']['merged'])); -$contact = $this->callAPISuccess('Contact', 'get', array( - 'id' => $this->contactID, - 'sequential' => 1, - 'return' => array( -wmf_civicrm_get_custom_field_name('lifetime_usd_total'), -wmf_civicrm_get_custom_field_name('do_not_solicit'), -wmf_civicrm_get_custom_field_name('last_donation_amount'), -wmf_civicrm_get_custom_field_name('last_donation_currency'), -wmf_civicrm_get_custom_field_name('last_donation_usd'), -wmf_civicrm_get_custom_field_name('last_donation_date'), -wmf_civicrm_get_custom_field_name('is_2011_donor'), -wmf_civicrm_get_custom_field_name('is_2012_donor'), -wmf_civicrm_get_custom_field_name('is_2013_donor'), -wmf_civicrm_get_custom_field_name('is_2014_donor'), -wmf_civicrm_get_custom_field_name('is_2015_donor'), -wmf_civicrm_get_custom_field_name('is_2016_donor'), - ), -)); -$this->assertEquals(24, $contact['values'][0][wmf_civicrm_get_custom_field_name('lifetime_usd_total')]); -
[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Merge branch 'master' of https://gerrit.wikimedia.org/r/wiki...
Eileen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383296 ) Change subject: Merge branch 'master' of https://gerrit.wikimedia.org/r/wikimedia/fundraising/crm into deployment .. Merge branch 'master' of https://gerrit.wikimedia.org/r/wikimedia/fundraising/crm into deployment + 3fdd4449ae46f4bc6c8586e888c7c700f395c84d The big group clean up. + bc006f63575a42223710cecfc9f494ad07c03ae8 Last change introduced an error when no address conflict exits Change-Id: Ie0a05f08d5a3b4b7e2d69baecba45a5f95e12cc6 --- D sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php 1 file changed, 0 insertions(+), 1,795 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/96/383296/1 diff --git a/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php b/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php deleted file mode 100644 index 14c3bc3..000 --- a/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php +++ /dev/null @@ -1,1795 +0,0 @@ -<<< HEAD (00da4b Merge branch 'master' of https://gerrit.wikimedia.org/r/wiki) -=== -imitateAdminUser(); -$this->doDuckHunt(); -// Run through the merge first to make sure there aren't pre-existing contacts in the DB -// that will ruin the tests. -$this->callAPISuccess('Job', 'process_batch_merge', array('mode' => 'safe')); - -$this->contactID = $this->breedDuck(array(wmf_civicrm_get_custom_field_name('do_not_solicit') => 0)); -$this->contactID2 = $this->breedDuck(array(wmf_civicrm_get_custom_field_name('do_not_solicit') => 1)); - } - - public function tearDown() { -$this->callAPISuccess('Contribution', 'get', array( - 'contact_id' => array('IN' => array($this->contactID, $this->contactID2)), - 'api.Contribution.delete' => 1, -)); -$this->callAPISuccess('Contact', 'delete', array('id' => $this->contactID)); -$this->callAPISuccess('Contact', 'delete', array('id' => $this->contactID2)); -parent::tearDown(); - } - - /** - * Test that the merge hook causes our custom fields to not be treated as conflicts. - * - * We also need to check the custom data fields afterwards. - */ - public function testMergeHook() { -$this->callAPISuccess('Contribution', 'create', array( - 'contact_id' => $this->contactID, - 'financial_type_id' => 'Cash', - 'total_amount' => 10, - 'currency' => 'USD', - // Should cause 'is_2014 to be true. - 'receive_date' => '2014-08-04', - wmf_civicrm_get_custom_field_name('original_currency') => 'NZD', - wmf_civicrm_get_custom_field_name('original_amount') => 8, -)); -$this->callAPISuccess('Contribution', 'create', array( - 'contact_id' => $this->contactID2, - 'financial_type_id' => 'Cash', - 'total_amount' => 5, - 'currency' => 'USD', - // Should cause 'is_2012_donor to be true. - 'receive_date' => '2013-01-04', -)); -$this->callAPISuccess('Contribution', 'create', array( - 'contact_id' => $this->contactID2, - 'financial_type_id' => 'Cash', - 'total_amount' => 9, - 'currency' => 'NZD', - // Should cause 'is_2015_donor to be true. - 'receive_date' => '2016-04-04', -)); -$contact = $this->callAPISuccess('Contact', 'get', array( - 'id' => $this->contactID, - 'sequential' => 1, - 'return' => array(wmf_civicrm_get_custom_field_name('lifetime_usd_total'), wmf_civicrm_get_custom_field_name('do_not_solicit')), -)); -$this->assertEquals(10, $contact['values'][0][wmf_civicrm_get_custom_field_name('lifetime_usd_total')]); -$result = $this->callAPISuccess('Job', 'process_batch_merge', array( - 'criteria' => array('contact' => array('id' => array('IN' => array($this->contactID, $this->contactID2, -)); -$this->assertEquals(1, count($result['values']['merged'])); -$contact = $this->callAPISuccess('Contact', 'get', array( - 'id' => $this->contactID, - 'sequential' => 1, - 'return' => array( -wmf_civicrm_get_custom_field_name('lifetime_usd_total'), -wmf_civicrm_get_custom_field_name('do_not_solicit'), -wmf_civicrm_get_custom_field_name('last_donation_amount'), -wmf_civicrm_get_custom_field_name('last_donation_currency'), -wmf_civicrm_get_custom_field_name('last_donation_usd'), -wmf_civicrm_get_custom_field_name('last_donation_date'), -wmf_civicrm_get_custom_field_name('is_2011_donor'), -wmf_civicrm_get_custom_field_name('is_2012_donor'), -wmf_civicrm_get_custom_field_name('is_2013_donor'), -wmf_civicrm_get_custom_field_name('is_2014_donor'), -wmf_civicrm_get_custom_field_name('is_2015_donor'), -wmf_civicrm_get_custom_field_name('is_2016_donor'), - ), -)); -$this->assertEquals(24,
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Last change introduced an error when no address conflict exits
Eileen has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/383295 ) Change subject: Last change introduced an error when no address conflict exits .. Last change introduced an error when no address conflict exits e.g hitting error on civicrm/contact/merge?reset=1=3986284=4244149=update=13={}=5=288 Bug T176699 Change-Id: I438fe2dd9f86b1a2a49fe7119ecb0656e04e3c4f --- M sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php M sites/all/modules/wmf_civicrm/wmf_civicrm.module 2 files changed, 27 insertions(+), 0 deletions(-) Approvals: jenkins-bot: Verified Ejegg: Looks good to me, approved diff --git a/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php b/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php index 9066984..f295002 100644 --- a/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php +++ b/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php @@ -735,6 +735,29 @@ } /** + * Test that we still cope when there is no address conflict + * + * Bug T176699 + */ + public function testBatchMergeNoRealConflictOnAddressButAnotherConflictResolved() { +$this->callAPISuccess('Address', 'create', array( + 'contact_id' => $this->contactID2, + 'country' => 'Korea, Republic of', + 'location_type_id' => 1, +)); +$this->callAPISuccess('Address', 'create', array( + 'contact_id' => $this->contactID, + 'country' => 'Korea, Republic of', + 'location_type_id' => 1, +)); +$this->contributionCreate(array('contact_id' => $this->contactID, 'receive_date' => '2010-01-01', 'total_amount' => 500)); + +$result = $this->callAPISuccess('Job', 'process_batch_merge', array('mode' => 'safe')); +$this->assertEquals(0, count($result['values']['skipped'])); +$this->assertEquals(1, count($result['values']['merged'])); + } + + /** * Test that we don't see a city named after a country as the same as a country * when it has no country. * diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module b/sites/all/modules/wmf_civicrm/wmf_civicrm.module index 17233c8..5fc5076 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module @@ -4043,6 +4043,10 @@ $keysToIgnore = array('id', 'is_primary', 'is_billing', 'manual_geo_code', 'contact_id', 'reset_date', 'hold_date', 'display', 'location_type_id'); $comparisonAddress = array_diff_key($comparisonAddress, array_flip($keysToIgnore)); $mainAddress = array_diff_key($mainAddress, array_flip($keysToIgnore)); +if ($mainAddress === $comparisonAddress) { + // They are the same... which to choose, which to choose :-) + return FALSE; +} if (count($comparisonAddress) === 1 && !empty($comparisonAddress['country_id']) && !empty($mainAddress['country_id']) -- To view, visit https://gerrit.wikimedia.org/r/383295 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I438fe2dd9f86b1a2a49fe7119ecb0656e04e3c4f Gerrit-PatchSet: 2 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: EileenGerrit-Reviewer: Eileen Gerrit-Reviewer: Ejegg Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Use GitHub to clone MediaWiki
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382942 ) Change subject: Use GitHub to clone MediaWiki .. Use GitHub to clone MediaWiki Using gerrit to move around lots of data is fragile and has resulted in frequent MediaWiki-Vagrant installation failures. To prevent them, clone from GitHub then change the remote URL once done. Bug: T152801 Change-Id: If99c76cab60afece23ca0fcace05dd740051369f --- M puppet/modules/git/manifests/clone.pp M puppet/modules/mediawiki/manifests/init.pp 2 files changed, 22 insertions(+), 5 deletions(-) Approvals: Krinkle: Looks good to me, but someone else must approve BryanDavis: Looks good to me, approved jenkins-bot: Verified diff --git a/puppet/modules/git/manifests/clone.pp b/puppet/modules/git/manifests/clone.pp index 1d08f62..fdd44d1 100644 --- a/puppet/modules/git/manifests/clone.pp +++ b/puppet/modules/git/manifests/clone.pp @@ -16,6 +16,10 @@ # Remote URL for the repository. If unspecified, the resource title # will be interpolated into $git::urlformat. # +# [*temp_remote*] +# Remote used for the checkout only (after that the remote URL will +# be set to $remote). This is used as a workaround for T152801. +# # [*owner*] # User that should own the checked out repository. Git commands will run as # this user so the user must have the ability to create the target @@ -51,6 +55,7 @@ $directory, $branch = undef, $remote = undef, +$temp_remote= undef, $owner = $::share_owner, $group = $::share_group, $ensure = 'present', @@ -68,6 +73,7 @@ undef => sprintf($git::urlformat, $title), default => $remote, } +$temp_repository = pick($temp_remote, $repository) $arg_branch = $branch ? { undef => '', @@ -83,7 +89,7 @@ } exec { "git_clone_${title}": -command => "/usr/bin/git ${options} clone ${arg_recurse} ${arg_depth} ${arg_branch} ${repository} ${directory}", +command => "/usr/bin/git ${options} clone ${arg_recurse} ${arg_depth} ${arg_branch} ${temp_repository} ${directory}", cwd => '/', creates => "${directory}/.git", user=> $owner, @@ -91,6 +97,16 @@ require => Package['git'], timeout => 0, } +if ($temp_repository != $repository) { +exec { "reset ${title} remote": +command => "/usr/bin/git remote set-url origin ${repository}", +cwd => $directory, +user=> $owner, +group => $group, +subscribe => Exec["git_clone_${title}"], +refreshonly => true, +} +} if (!defined(File[$directory])) { file { $directory: diff --git a/puppet/modules/mediawiki/manifests/init.pp b/puppet/modules/mediawiki/manifests/init.pp index c719c77..3b893c2 100644 --- a/puppet/modules/mediawiki/manifests/init.pp +++ b/puppet/modules/mediawiki/manifests/init.pp @@ -86,10 +86,11 @@ $managed_settings_dir = "${settings_dir}/puppet-managed" git::clone { 'mediawiki/core': -directory => $dir, -branch=> $branch, -depth => $git_depth, -options => '-c http.postBuffer=1048576000', # T152801 +# T152801 - avoid using gerrit for the initial cloning +temp_remote => 'https://github.com/wikimedia/mediawiki.git', +directory => $dir, +branch => $branch, +depth => $git_depth, } mediawiki::skin { 'Vector': } -- To view, visit https://gerrit.wikimedia.org/r/382942 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If99c76cab60afece23ca0fcace05dd740051369f Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Gergő TiszaGerrit-Reviewer: BryanDavis Gerrit-Reviewer: Dduvall Gerrit-Reviewer: Krinkle Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Last change introduced an error when no address conflict exits
Eileen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383295 ) Change subject: Last change introduced an error when no address conflict exits .. Last change introduced an error when no address conflict exits e.g hitting error on civicrm/contact/merge?reset=1=3986284=4244149=update=13={}=5=288 Bug T176699 Change-Id: I438fe2dd9f86b1a2a49fe7119ecb0656e04e3c4f --- M sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php M sites/all/modules/wmf_civicrm/wmf_civicrm.module 2 files changed, 29 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/95/383295/1 diff --git a/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php b/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php index 9066984..baf4082 100644 --- a/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php +++ b/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php @@ -735,6 +735,31 @@ } /** + * Test that we still cope when there is no address conflict + * + * Bug T176699 + */ + public function testBatchMergeNoRealConflictOnAddressButAnotherConflictResolved() { +$this->callAPISuccess('Address', 'create', array( + 'contact_id' => $this->contactID2, + 'country' => 'Korea, Republic of', + 'location_type_id' => 1, + 'first_name' => 'Two words', +)); +$this->callAPISuccess('Address', 'create', array( + 'contact_id' => $this->contactID, + 'country' => 'Korea, Republic of', + 'location_type_id' => 1, + 'first_name' => 'twowords', +)); +$this->contributionCreate(array('contact_id' => $this->contactID, 'receive_date' => '2010-01-01', 'total_amount' => 500)); + +$result = $this->callAPISuccess('Job', 'process_batch_merge', array('mode' => 'safe')); +$this->assertEquals(0, count($result['values']['skipped'])); +$this->assertEquals(1, count($result['values']['merged'])); + } + + /** * Test that we don't see a city named after a country as the same as a country * when it has no country. * diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module b/sites/all/modules/wmf_civicrm/wmf_civicrm.module index 17233c8..5fc5076 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module @@ -4043,6 +4043,10 @@ $keysToIgnore = array('id', 'is_primary', 'is_billing', 'manual_geo_code', 'contact_id', 'reset_date', 'hold_date', 'display', 'location_type_id'); $comparisonAddress = array_diff_key($comparisonAddress, array_flip($keysToIgnore)); $mainAddress = array_diff_key($mainAddress, array_flip($keysToIgnore)); +if ($mainAddress === $comparisonAddress) { + // They are the same... which to choose, which to choose :-) + return FALSE; +} if (count($comparisonAddress) === 1 && !empty($comparisonAddress['country_id']) && !empty($mainAddress['country_id']) -- To view, visit https://gerrit.wikimedia.org/r/383295 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I438fe2dd9f86b1a2a49fe7119ecb0656e04e3c4f Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Eileen___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Vector[master]: Align simpleSearch `border` with inputs elsewhere
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/383292 ) Change subject: Align simpleSearch `border` with inputs elsewhere .. Align simpleSearch `border` with inputs elsewhere Aligning - `border-color` - `:hover` `border-color` - `border-radius` and introducing `transition` to be on par with inputs elsewhere. Bug: T177808 Change-Id: I41c2719c13935d07f4310c0c752bdfc7377d8670 --- M components/search.less 1 file changed, 7 insertions(+), 1 deletion(-) Approvals: jenkins-bot: Verified Jdlrobson: Looks good to me, approved diff --git a/components/search.less b/components/search.less index f66c839..34cbd96 100644 --- a/components/search.less +++ b/components/search.less @@ -29,12 +29,18 @@ margin-top: 0.65em; position: relative; min-height: 1px; /* Gotta trigger hasLayout for IE7 */ - border: solid 1px #aaa; + border: 1px solid @colorGray10; + border-radius: @borderRadius; color: #000; background-color: #fff; .background-image( 'images/search-fade.png' ); background-position: top left; background-repeat: repeat-x; + .transition( border-color 250ms ); + + &:hover { + border-color: @colorGray7; + } // Styles for both the search input and the button input { -- To view, visit https://gerrit.wikimedia.org/r/383292 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I41c2719c13935d07f4310c0c752bdfc7377d8670 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Vector Gerrit-Branch: master Gerrit-Owner: VolkerEGerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Ladsgroup 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...Vector[master]: simpleSearch: Reduce selector specificity & clean up
VolkerE has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383293 ) Change subject: simpleSearch: Reduce selector specificity & clean up .. simpleSearch: Reduce selector specificity & clean up Reducing selector specificity and cleaning up CSS as in reducing properties and putting main colors on top of selectors. Change-Id: I91959f07404382fcc143607ab4cd5cf0c9aed13e --- M components/search.less 1 file changed, 10 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Vector refs/changes/93/383293/1 diff --git a/components/search.less b/components/search.less index 34cbd96..308d557 100644 --- a/components/search.less +++ b/components/search.less @@ -13,12 +13,16 @@ form, input { - margin: 0; - margin-top: 0.4em; + margin: 0.4em 0 0; } } -div#simpleSearch { +#simpleSearch { + background-color: #fff; + .background-image( 'images/search-fade.png' ); + background-position: top left; + background-repeat: repeat-x; + color: #000; display: block; width: 12.6em; width: 20vw; /* responsive width */ @@ -31,11 +35,6 @@ min-height: 1px; /* Gotta trigger hasLayout for IE7 */ border: 1px solid @colorGray10; border-radius: @borderRadius; - color: #000; - background-color: #fff; - .background-image( 'images/search-fade.png' ); - background-position: top left; - background-repeat: repeat-x; .transition( border-color 250ms ); &:hover { @@ -44,11 +43,11 @@ // Styles for both the search input and the button input { + background-color: transparent; + color: #000; margin: 0; padding: 0; border: 0; - background-color: transparent; - color: #000; } // The search input @@ -103,7 +102,7 @@ } #searchButton { - .background-image-svg('images/search-ltr.svg', 'images/search-ltr.png'); + .background-image-svg( 'images/search-ltr.svg', 'images/search-ltr.png' ); background-position: center center; background-repeat: no-repeat; } -- To view, visit https://gerrit.wikimedia.org/r/383293 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I91959f07404382fcc143607ab4cd5cf0c9aed13e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Vector Gerrit-Branch: master Gerrit-Owner: VolkerE___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Vector[master]: Align simpleSearch `border` with inputs elsewhere
VolkerE has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383292 ) Change subject: Align simpleSearch `border` with inputs elsewhere .. Align simpleSearch `border` with inputs elsewhere Aligning - `border-color` - `:hover` `border-color` - `border-radius` and introducing `transition` to be on par with inputs elsewhere. Bug: T177808 Change-Id: I41c2719c13935d07f4310c0c752bdfc7377d8670 --- M components/search.less 1 file changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Vector refs/changes/92/383292/1 diff --git a/components/search.less b/components/search.less index f66c839..34cbd96 100644 --- a/components/search.less +++ b/components/search.less @@ -29,12 +29,18 @@ margin-top: 0.65em; position: relative; min-height: 1px; /* Gotta trigger hasLayout for IE7 */ - border: solid 1px #aaa; + border: 1px solid @colorGray10; + border-radius: @borderRadius; color: #000; background-color: #fff; .background-image( 'images/search-fade.png' ); background-position: top left; background-repeat: repeat-x; + .transition( border-color 250ms ); + + &:hover { + border-color: @colorGray7; + } // Styles for both the search input and the button input { -- To view, visit https://gerrit.wikimedia.org/r/383292 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I41c2719c13935d07f4310c0c752bdfc7377d8670 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Vector Gerrit-Branch: master Gerrit-Owner: VolkerE___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Manage merge on Country vs full address
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382634 ) Change subject: Manage merge on Country vs full address .. Manage merge on Country vs full address Dear reviewer, I am sorry to put you through this. I'd forgotten how soul destroyingly awful this code is & why I am has sworn not to touch is again until I had refactored the upstream code. On the bright side sneaking in the next change - only difference is additional postal_code suffix will be only one place. Bug: T176699 Change-Id: I192ea4c1cecf9db0860376767858cb2d9e775fbe --- A .editorconfig M sites/all/modules/offline2civicrm/tests/BenevityTest.php M sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php M sites/all/modules/wmf_civicrm/wmf_civicrm.module 4 files changed, 362 insertions(+), 9 deletions(-) Approvals: jenkins-bot: Verified Ejegg: Looks good to me, approved diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000..ccc6a28 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,14 @@ +# Drupal editor configuration normalization +# @see http://editorconfig.org/ + +# This is the top-most .editorconfig file; do not search in parent directories. +root = true + +# All files. +[*] +end_of_line = LF +indent_style = space +indent_size = 2 +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true diff --git a/sites/all/modules/offline2civicrm/tests/BenevityTest.php b/sites/all/modules/offline2civicrm/tests/BenevityTest.php index faec0ce..78487a5 100644 --- a/sites/all/modules/offline2civicrm/tests/BenevityTest.php +++ b/sites/all/modules/offline2civicrm/tests/BenevityTest.php @@ -31,7 +31,7 @@ "); $this->ensureAnonymousContactExists(); \Civi::$statics = array(); -$countries = $this->callAPISuccess('Country', 'get', array()); +$countries = $this->callAPISuccess('Country', 'get', array('options' => array('limit' => 0))); $this->callAPISuccess('Setting', 'create', array('countryLimit' => array_keys($countries['values']))); $this->callAPISuccess('Setting', 'create', array('provinceLimit' => array())); diff --git a/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php b/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php index 442ab18..9066984 100644 --- a/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php +++ b/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php @@ -540,6 +540,227 @@ } /** + * Test that we don't see country only as conflicting with country plus. + * + * Bug T176699 + */ + public function testBatchMergeResolvableConflictCountryVsFullAddress() { +$this->callAPISuccess('Address', 'create', array( + 'country_id' => 'MX', + 'contact_id' => $this->contactID, + 'location_type_id' => 1, +)); +$this->callAPISuccess('Address', 'create', array( + 'country_id' => 'MX', + 'contact_id' => $this->contactID2, + 'street_address' => 'First on the left after you cross the border', + 'location_type_id' => 1, +)); +$this->callAPISuccess('Address', 'create', array( + 'country_id' => 'MX', + 'contact_id' => $this->contactID2, + 'street_address' => 'A different address', + 'location_type_id' => 2, +)); +$this->contributionCreate(array('contact_id' => $this->contactID2, 'receive_date' => '2010-01-01', 'total_amount' => 500)); + +$result = $this->callAPISuccess('Job', 'process_batch_merge', array('mode' => 'safe')); +$this->assertEquals(1, count($result['values']['merged'])); +$contact = $this->callAPISuccessGetSingle('Contact', array('email' => 'the_...@duckland.com')); +$this->assertEquals('Mexico', $contact['country']); +$this->assertEquals('First on the left after you cross the border', $contact['street_address']); +$address = $this->callAPISuccessGetSingle('Address', array('street_address' => 'A different address')); +$this->assertEquals($contact['id'], $address['contact_id']); + } + + /** + * Test that we don't see country only as conflicting with country plus. + * + * In this variant the most recent donor is the one with the lower contact + * ID (the one we are going to keep). Real world this is pretty rare but + * perhaps after some merging in strange orders it could happen. + * + * Bug T176699 + */ + public function testBatchMergeResolvableConflictCountryVsFullAddressOutOfOrder() { +$this->callAPISuccess('Address', 'create', array( + 'country_id' => 'MX', + 'contact_id' => $this->contactID, + 'location_type_id' => 1, +)); +$this->callAPISuccess('Address', 'create', array( + 'country_id' => 'MX', + 'contact_id' => $this->contactID2, + 'street_address' => 'First on the left after you cross the border', + 'location_type_id' => 1, +)); +$this->callAPISuccess('Address', 'create', array( + 'country_id' => 'MX', +
[MediaWiki-commits] [Gerrit] wikimedia...civicrm[master]: Remove temp tables pro-actively.
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382533 ) Change subject: Remove temp tables pro-actively. .. Remove temp tables pro-actively. These were the only places I could find that I thought we were likely to hit a moderate number of times where temp tables are created and not deliberately turned up. The most prevalent of these was the dedupe one, but that is probably only once per run. We could merge https://gerrit.wikimedia.org/r/#/c/380667/ to reduce group cache table creation & increase the group cache time out so we rebuild the groups we do use, but those ARE being dropped Change-Id: I47a66ed27b36e7f1289f603c9c59db7fade1af72 --- M CRM/Activity/BAO/Activity.php M CRM/Dedupe/BAO/RuleGroup.php M CRM/Dedupe/Finder.php M CRM/Mailing/BAO/Recipients.php 4 files changed, 8 insertions(+), 4 deletions(-) Approvals: jenkins-bot: Verified Ejegg: Looks good to me, approved diff --git a/CRM/Activity/BAO/Activity.php b/CRM/Activity/BAO/Activity.php index 84a46cf..ffe8fd1 100644 --- a/CRM/Activity/BAO/Activity.php +++ b/CRM/Activity/BAO/Activity.php @@ -1105,7 +1105,8 @@ } } } - +CRM_Core_DAO::executeQuery("DROP TEMPORARY TABLE IF EXISTS {$activityTempTable}"); +CRM_Core_DAO::executeQuery("DROP TEMPORARY TABLE IF EXISTS {$activityContactTempTable}"); return $values; } diff --git a/CRM/Dedupe/BAO/RuleGroup.php b/CRM/Dedupe/BAO/RuleGroup.php index b3b0ef1..7557af3 100644 --- a/CRM/Dedupe/BAO/RuleGroup.php +++ b/CRM/Dedupe/BAO/RuleGroup.php @@ -133,7 +133,9 @@ * Return the SQL query for dropping the temporary table. */ public function tableDropQuery() { -return 'DROP TEMPORARY TABLE IF EXISTS dedupe'; +CRM_Core_DAO::executeQuery( 'DROP TEMPORARY TABLE IF EXISTS dedupe'); +CRM_Core_DAO::executeQuery("DROP TEMPORARY TABLE IF EXISTS dedupe_copy"); +CRM_Core_DAO::executeQuery("DROP TEMPORARY TABLE IF EXISTS dedupe_copy2"); } /** diff --git a/CRM/Dedupe/Finder.php b/CRM/Dedupe/Finder.php index aa092e4..fd5d1c9 100644 --- a/CRM/Dedupe/Finder.php +++ b/CRM/Dedupe/Finder.php @@ -85,7 +85,7 @@ while ($dao->fetch()) { $dupes[] = array($dao->id1, $dao->id2, $dao->weight); } -$dao->query($rgBao->tableDropQuery()); +$rgBao->tableDropQuery(); return $dupes; } @@ -156,7 +156,7 @@ $dupes[] = $dao->id; } } -$dao->query($rgBao->tableDropQuery()); +$rgBao->tableDropQuery(); return array_diff($dupes, $except); } diff --git a/CRM/Mailing/BAO/Recipients.php b/CRM/Mailing/BAO/Recipients.php index 27e3918..f5812a7 100644 --- a/CRM/Mailing/BAO/Recipients.php +++ b/CRM/Mailing/BAO/Recipients.php @@ -120,6 +120,7 @@ SET mr.mailing_id = $newMailingID "; CRM_Core_DAO::executeQuery($sql); +CRM_Core_DAO::executeQuery("DROP TEMPORARY TABLE IF EXISTS srcMailing_$sourceMailingId"); } /** -- To view, visit https://gerrit.wikimedia.org/r/382533 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I47a66ed27b36e7f1289f603c9c59db7fade1af72 Gerrit-PatchSet: 2 Gerrit-Project: wikimedia/fundraising/crm/civicrm Gerrit-Branch: master Gerrit-Owner: EileenGerrit-Reviewer: Ejegg Gerrit-Reviewer: Mepps 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...process-control[master]: Fix failmail suppression
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/383284 ) Change subject: Fix failmail suppression .. Fix failmail suppression Bug: T172303 Change-Id: Ia184c684ff6059c7d39aaba136277a9a7f624d44 --- M processcontrol/runner.py 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: jenkins-bot: Verified Eileen: Looks good to me, approved diff --git a/processcontrol/runner.py b/processcontrol/runner.py index 32a3e08..188cca4 100644 --- a/processcontrol/runner.py +++ b/processcontrol/runner.py @@ -65,7 +65,7 @@ job_history.record_success() config.log.info("Successfully completed {slug}.".format(slug=self.job.slug)) except (JobFailure, lock.LockError) as ex: -if ex is lock.LockError and ex.code == lock.LockError.LOCK_EXISTS and self.job.allow_overtime: +if isinstance(ex, lock.LockError) and ex.code == lock.LockError.LOCK_EXISTS and self.job.allow_overtime: config.log.info("Previous job is still running, but that's OK.") job_history.record_skipped(self.start_time) else: -- To view, visit https://gerrit.wikimedia.org/r/383284 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia184c684ff6059c7d39aaba136277a9a7f624d44 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/process-control Gerrit-Branch: master Gerrit-Owner: EjeggGerrit-Reviewer: Awight Gerrit-Reviewer: Cdentinger Gerrit-Reviewer: Eileen Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...dash[master]: Add config for Big English 2017
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/383272 ) Change subject: Add config for Big English 2017 .. Add config for Big English 2017 Starting October 2 this year! Change-Id: I49365904dd2dc407bafa612403dea923f71f3ced --- M src/components/widgets/totals-earned-chart/totals-earned-chart.js 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: jenkins-bot: Verified Eileen: Looks good to me, approved 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 618caf2..d9fc523 100644 --- a/src/components/widgets/totals-earned-chart/totals-earned-chart.js +++ b/src/components/widgets/totals-earned-chart/totals-earned-chart.js @@ -38,6 +38,11 @@ self.campaigns = [ new Campaign( { + name: '2017', + startDate: Date.UTC( 2017, 9, 2 ), + endDate: Date.UTC( 2018, 0, 1 ) + } ), + new Campaign( { name: '2016', startDate: Date.UTC( 2016, 10, 29 ), endDate: Date.UTC( 2017, 0, 1 ) -- To view, visit https://gerrit.wikimedia.org/r/383272 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I49365904dd2dc407bafa612403dea923f71f3ced Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/dash Gerrit-Branch: master Gerrit-Owner: EjeggGerrit-Reviewer: Eileen Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Manage merge on has-postal-suffix vs no-has-postal-suffix.
Eileen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383290 ) Change subject: Manage merge on has-postal-suffix vs no-has-postal-suffix. .. Manage merge on has-postal-suffix vs no-has-postal-suffix. This along with country is the most prevalent simple pattern that I have observed and since we have injured our brains by going into this part of the code we should kill this too. Bug: T177807 Change-Id: I73b4c4adcb702c2ae73dff20cdb5fa6d61536311 --- M sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php M sites/all/modules/wmf_civicrm/wmf_civicrm.module 2 files changed, 103 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/90/383290/1 diff --git a/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php b/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php index 9066984..6e53967 100644 --- a/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php +++ b/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php @@ -761,6 +761,70 @@ } /** + * Test that we don't the addition of a postal suffix only as a conflict. + * + * Bug T177807 + */ + public function testBatchMergeResolvableConflictPostalSuffixExists() { +$this->callAPISuccess('Address', 'create', array( + 'country_id' => 'MX', + 'contact_id' => $this->contactID2, + 'location_type_id' => 1, + 'street_address' => 'First on the left after you cross the border', + 'postal_code' => 90210, + 'postal_code_suffix' => , +)); +$this->callAPISuccess('Address', 'create', array( + 'country_id' => 'MX', + 'contact_id' => $this->contactID, + 'street_address' => 'First on the left after you cross the border', + 'postal_code' => 90210, + 'location_type_id' => 1, +)); +$this->contributionCreate(array('contact_id' => $this->contactID2, 'receive_date' => '2010-01-01', 'total_amount' => 500)); + +$result = $this->callAPISuccess('Job', 'process_batch_merge', array('mode' => 'safe')); +$this->assertEquals(1, count($result['values']['merged'])); +$contact = $this->callAPISuccessGetSingle('Contact', array('email' => 'the_...@duckland.com')); +$this->assertEquals('Mexico', $contact['country']); +$this->assertEquals('', $contact['postal_code_suffix']); +$this->assertEquals('90210', $contact['postal_code']); +$this->assertEquals('First on the left after you cross the border', $contact['street_address']); + } + + /** + * Test that we don't the addition of a postal suffix only as a conflict. + * + * Bug T177807 + */ + public function testBatchMergeResolvableConflictPostalSuffixExistsReverse() { +$this->callAPISuccess('Address', 'create', array( + 'country_id' => 'MX', + 'contact_id' => $this->contactID2, + 'location_type_id' => 1, + 'street_address' => 'First on the left after you cross the border', + 'postal_code' => 90210, +)); +$this->callAPISuccess('Address', 'create', array( + 'country_id' => 'MX', + 'contact_id' => $this->contactID, + 'street_address' => 'First on the left after you cross the border', + 'postal_code' => 90210, + 'location_type_id' => 1, + 'postal_code_suffix' => , +)); +$this->contributionCreate(array('contact_id' => $this->contactID2, 'receive_date' => '2010-01-01', 'total_amount' => 500)); + +$result = $this->callAPISuccess('Job', 'process_batch_merge', array('mode' => 'safe')); +$this->assertEquals(1, count($result['values']['merged'])); +$contact = $this->callAPISuccessGetSingle('Contact', array('email' => 'the_...@duckland.com')); +$this->assertEquals('Mexico', $contact['country']); +$this->assertEquals('', $contact['postal_code_suffix']); +$this->assertEquals('90210', $contact['postal_code']); +$this->assertEquals('First on the left after you cross the border', $contact['street_address']); + } + + /** * Test that a conflict on casing in first names is handled. * * We do a best effort on this to get the more correct on assuming that 1 capital letter in a diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module b/sites/all/modules/wmf_civicrm/wmf_civicrm.module index 387cbd2..9bc5424 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module @@ -2710,6 +2710,10 @@ $valueToKeep = trim($valueToKeep); $valueToOverwrite = trim($valueToOverwrite); + if (_wmf_civicrm_merge_is_only_extra_postal_code_suffix($valueToKeep, $valueToOverwrite, $blockToKeep, $blockToOverwrite)) { +return TRUE; + } + if (!stristr($valueToKeep, $valueToOverwrite) && !stristr($valueToOverwrite, $valueToKeep)) { return FALSE; } @@ -2723,6 +2727,31 @@ ) { // One of the values is a country & it is a subset of the other value. We // can get past
[MediaWiki-commits] [Gerrit] mediawiki...Gadgets[master]: Remove nested foreach references
Reedy has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383289 ) Change subject: Remove nested foreach references .. Remove nested foreach references No modification done... Bug: T173850 Change-Id: If4fce9b1386b5ae5ea02b85a7dfb3e60c0ce62a6 --- M api/ApiQueryGadgets.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gadgets refs/changes/89/383289/1 diff --git a/api/ApiQueryGadgets.php b/api/ApiQueryGadgets.php index bd20a76..618858d 100644 --- a/api/ApiQueryGadgets.php +++ b/api/ApiQueryGadgets.php @@ -174,8 +174,8 @@ ]; $result = $this->getResult(); - foreach ( $metadata as &$data ) { - foreach ( $data as $key => &$value ) { + foreach ( $metadata as $data ) { + foreach ( $data as $key => $value ) { if ( is_array( $value ) ) { $tag = isset( $tagNames[$key] ) ? $tagNames[$key] : $key; $result->setIndexedTagName( $value, $tag ); -- To view, visit https://gerrit.wikimedia.org/r/383289 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If4fce9b1386b5ae5ea02b85a7dfb3e60c0ce62a6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Gadgets 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...crm[master]: Remove duplicate spaces, html & and odd whitespace in name f...
Eileen has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382062 ) Change subject: Remove duplicate spaces, html & and odd whitespace in name fields .. Remove duplicate spaces, html & and odd whitespace in name fields Bug: T175744 Change-Id: Ib97d4edd2fba8a7bbd6efa8761cd08c4fe857006 --- M sites/all/modules/wmf_civicrm/tests/phpunit/ImportMessageTest.php M sites/all/modules/wmf_civicrm/wmf_civicrm.module 2 files changed, 89 insertions(+), 2 deletions(-) Approvals: jenkins-bot: Verified Ejegg: Looks good to me, approved diff --git a/sites/all/modules/wmf_civicrm/tests/phpunit/ImportMessageTest.php b/sites/all/modules/wmf_civicrm/tests/phpunit/ImportMessageTest.php index 586ca1d..1ab5ba3 100644 --- a/sites/all/modules/wmf_civicrm/tests/phpunit/ImportMessageTest.php +++ b/sites/all/modules/wmf_civicrm/tests/phpunit/ImportMessageTest.php @@ -426,7 +426,65 @@ ), ), ), -// US address import is geocoded + // Strip duff characters + array( +array_merge($this->getMinimalImportData($gateway_txn_id), + array( +'first_name' => 'Baa baa black sheep', + )), +array( + 'contact' => array( +'first_name' => 'Baa baa black sheep', + ), + 'contribution' => $this->getBaseContribution($gateway_txn_id), +), + ), + 'white_space_cleanup' => array( +array_merge($this->getMinimalImportData($gateway_txn_id), + array( +// The multiple spaces & trailing ideographic space should go. +// Internally I have set it to reduce multiple ideographic space to only one. +// However, I've had second thoughts about my earlier update change to +// convert them as they are formatted differently & the issue was not the +// existance of them but the strings of several of them in a row. +'first_name' => 'Baa baa' . html_entity_decode("") . html_entity_decode("") . 'black sheep' .html_entity_decode(""), +'middle_name' => ' Have you any wool', +'last_name' => ' Yes sir yes sir ' . html_entity_decode('') . ' three bags full', + )), +array( + 'contact' => array( +'first_name' => 'Baa baa' . html_entity_decode("") . 'black sheep', +'middle_name' => 'Have you any wool', +'last_name' => 'Yes sir yes sir three bags full', +'display_name' => 'Baa baa' . html_entity_decode("") . 'black sheep Yes sir yes sir three bags full', + ), + 'contribution' => $this->getBaseContribution($gateway_txn_id), +), + ), + 'ampersands' => array( +array_merge($this->getMinimalImportData($gateway_txn_id), + array( +// The multiple spaces & trailing ideographic space should go. +// Internally I have set it to reduce multiple ideographic space to only one. +// However, I've had second thoughts about my earlier update change to +// convert them as they are formatted differently & the issue was not the +// existance of them but the strings of several of them in a row. +'first_name' => 'Jack Jill', +'middle_name' => 'Jack Jill', +'last_name' => 'Jack & Jill', + )), +array( + 'contact' => array( +'first_name' => 'Jack & Jill', +'middle_name' => 'Jack & Jill', +'last_name' => 'Jack & Jill', +'display_name' => 'Jack & Jill Jack & Jill', + ), + 'contribution' => $this->getBaseContribution($gateway_txn_id), +), + ), + + // US address import is geocoded array( array( 'city' => 'Somerville', diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module b/sites/all/modules/wmf_civicrm/wmf_civicrm.module index d281f47..ad203ee 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module @@ -1076,7 +1076,7 @@ if (strtolower($msg['contact_type']) !== "organization") { foreach (array('first_name', 'last_name', 'middle_name') as $name) { if (isset($msg[$name])) { - $contact[$name] = substr(trim($msg[$name]), 0, 64); + $contact[$name] = wmf_civicrm_string_clean($msg[$name], 64); } } } @@ -1285,6 +1285,35 @@ } /** + * Clean up a string by + * - trimming preceding & ending whitespace + * - removing any in-string double whitespace + * + * @param string $string + *
[MediaWiki-commits] [Gerrit] mediawiki...Collection[master]: Update test HTML hierarchy
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/383285 ) Change subject: Update test HTML hierarchy .. Update test HTML hierarchy Since I3fce14de04b9e10f7a1953f842e75f065bddd8ef, the header element is wrapped in a cover-page container. Bug: T177801 Change-Id: Ie86995afaf0a3b24becc02eadd4d23bf401f4af8 --- M tests/data/BookRendererTest/chapters.html M tests/data/BookRendererTest/header_conflict.html M tests/data/BookRendererTest/id_conflict.html M tests/data/BookRendererTest/single_page.html M tests/data/BookRendererTest/two_pages.html 5 files changed, 20 insertions(+), 10 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/data/BookRendererTest/chapters.html b/tests/data/BookRendererTest/chapters.html index d1efb94..11437e3 100644 --- a/tests/data/BookRendererTest/chapters.html +++ b/tests/data/BookRendererTest/chapters.html @@ -1,7 +1,9 @@ - + + Book title Book subtitle - + + Table of Contents diff --git a/tests/data/BookRendererTest/header_conflict.html b/tests/data/BookRendererTest/header_conflict.html index 10242e8..d7969e9 100644 --- a/tests/data/BookRendererTest/header_conflict.html +++ b/tests/data/BookRendererTest/header_conflict.html @@ -1,7 +1,9 @@ - + + Book title Book subtitle - + + Table of Contents diff --git a/tests/data/BookRendererTest/id_conflict.html b/tests/data/BookRendererTest/id_conflict.html index f8f8cdf..dcdef4e 100644 --- a/tests/data/BookRendererTest/id_conflict.html +++ b/tests/data/BookRendererTest/id_conflict.html @@ -1,7 +1,9 @@ - + + Book title Book subtitle - + + Table of Contents diff --git a/tests/data/BookRendererTest/single_page.html b/tests/data/BookRendererTest/single_page.html index d376326..ef3063f 100644 --- a/tests/data/BookRendererTest/single_page.html +++ b/tests/data/BookRendererTest/single_page.html @@ -1,7 +1,9 @@ - + + Book title Book subtitle - + + Table of Contents diff --git a/tests/data/BookRendererTest/two_pages.html b/tests/data/BookRendererTest/two_pages.html index 52ad0ec..052c14b 100644 --- a/tests/data/BookRendererTest/two_pages.html +++ b/tests/data/BookRendererTest/two_pages.html @@ -1,7 +1,9 @@ - + + Book title Book subtitle - + + Table of Contents -- To view, visit https://gerrit.wikimedia.org/r/383285 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie86995afaf0a3b24becc02eadd4d23bf401f4af8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Collection Gerrit-Branch: master Gerrit-Owner: JdlrobsonGerrit-Reviewer: C. Scott Ananian Gerrit-Reviewer: Krinkle Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Collection[master]: Deal with cases where contributors and images are not defined
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/383250 ) Change subject: Deal with cases where contributors and images are not defined .. Deal with cases where contributors and images are not defined Fix test warnings Tests still fail but it's clearer to why. Bug: T177801 Change-Id: I24d0146e35c6444fc1ffc3c7f673196964492a33 --- M includes/BookRenderer.php 1 file changed, 10 insertions(+), 3 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/BookRenderer.php b/includes/BookRenderer.php index e79cd7a..7ee24a7 100644 --- a/includes/BookRenderer.php +++ b/includes/BookRenderer.php @@ -114,9 +114,12 @@ } else { $metadataLevel = 0; } + $hasImages = isset( $metadata['images'] ) && $metadata['images']; + $hasLicense = isset( $metadata['license'] ) && $metadata['license']; + $outline = array_merge( $outline, $this->getAdditionalBookChapters( $tocHeadingCounter, $metadataLevel, - $metadata['images'], $metadata['license'] ) + $hasImages, $hasLicense ) ); $templateData = [ @@ -127,17 +130,21 @@ 'outline' => $outline, 'html' => $bookBodyHtml, ]; - if ( $metadata['images'] ) { + if ( $hasImages ) { $templateData['images'] = [ 'data' => $metadata['images'], 'level' => $headingCounter->incrementAndGetTopLevel(), ]; + } else { + $templateData['images'] = false; } - if ( $metadata['license'] ) { + if ( $hasLicense ) { $templateData['license'] = [ 'data' => $metadata['license'], 'level' => $headingCounter->incrementAndGetTopLevel(), ]; + } else { + $templateData['license'] = false; } return $templateData; } -- To view, visit https://gerrit.wikimedia.org/r/383250 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I24d0146e35c6444fc1ffc3c7f673196964492a33 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Collection Gerrit-Branch: master Gerrit-Owner: JdlrobsonGerrit-Reviewer: C. Scott Ananian Gerrit-Reviewer: Krinkle Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...dash[master]: Update links in donation age widget
Eileen has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382362 ) Change subject: Update links in donation age widget .. Update links in donation age widget Grafana, not ganglia Change-Id: Id560d6540f869456ca814cbb9e5c95020db4ce80 --- M src/components/widgets/donation-age/donation-age.html 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: jenkins-bot: Verified Eileen: Looks good to me, approved diff --git a/src/components/widgets/donation-age/donation-age.html b/src/components/widgets/donation-age/donation-age.html index 86cdb94..af3a6aa 100644 --- a/src/components/widgets/donation-age/donation-age.html +++ b/src/components/widgets/donation-age/donation-age.html @@ -12,7 +12,8 @@ Average age of last 10 donations Initial: Civi: - https://ganglia.wikimedia.org/latest/graph_all_periods.php?c=Fundraising%20eqiad=frqueue1001.frack.eqiad.wmnet=2hr=small===Donations%20Queue=messages=large; >donation queue graphs + https://grafana.wikimedia.org/dashboard/db/fundraising-redis; >donation queue graphs + https://grafana.wikimedia.org/dashboard/db/fundraising-database; >database activity graphs -- To view, visit https://gerrit.wikimedia.org/r/382362 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id560d6540f869456ca814cbb9e5c95020db4ce80 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/dash Gerrit-Branch: master Gerrit-Owner: EjeggGerrit-Reviewer: Eileen Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] performance/docroot[master]: index: Change footer link to team page on mediawiki.org
Krinkle has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383288 ) Change subject: index: Change footer link to team page on mediawiki.org .. index: Change footer link to team page on mediawiki.org The Wikitech page is mostly internal docs and not all that useful. Change-Id: I0a1126f32fec961d02765e4e61f241b7b09309ee --- M public_html/index.html M src/_includes/footer.html 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/performance/docroot refs/changes/88/383288/1 diff --git a/public_html/index.html b/public_html/index.html index c57436a..916bc33 100644 --- a/public_html/index.html +++ b/public_html/index.html @@ -522,7 +522,7 @@ -More information at https://wikitech.wikimedia.org/wiki/Performance;>https://wikitech.wikimedia.org/wiki/Performance. +More information at https://www.mediawiki.org/wiki/Wikimedia_Performance_Team;>https://www.mediawiki.org/wiki/Wikimedia_Performance_Team. https://www.wikimedia.org;>https://www.wikimedia.org/static/images/wikimedia-button.png; srcset="https://www.wikimedia.org/static/images/wikimedia-button-2x.png 2x" width="88" height="31" alt="Wikimedia Foundation"> diff --git a/src/_includes/footer.html b/src/_includes/footer.html index b58d6a2..e02c5b1 100644 --- a/src/_includes/footer.html +++ b/src/_includes/footer.html @@ -1,6 +1,6 @@ -More information at https://wikitech.wikimedia.org/wiki/Performance;>https://wikitech.wikimedia.org/wiki/Performance. +More information at https://www.mediawiki.org/wiki/Wikimedia_Performance_Team;>https://www.mediawiki.org/wiki/Wikimedia_Performance_Team. https://www.wikimedia.org;>https://www.wikimedia.org/static/images/wikimedia-button.png; srcset="https://www.wikimedia.org/static/images/wikimedia-button-2x.png 2x" width="88" height="31" alt="Wikimedia Foundation"> -- To view, visit https://gerrit.wikimedia.org/r/383288 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0a1126f32fec961d02765e4e61f241b7b09309ee Gerrit-PatchSet: 1 Gerrit-Project: performance/docroot 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] wikimedia...crm[master]: Fix ImportMessageTest to actually test contact.
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381923 ) Change subject: Fix ImportMessageTest to actually test contact. .. Fix ImportMessageTest to actually test contact. It turns out the vars in array_intersect_key were around the wrong way, creating a false comparison. http://php.net/manual/en/function.array-intersect-key.php Also, allow for prefix & suffix to not be set. Bug: T175744 (preparatory) Change-Id: Ia2820e51a38bdc60536d44b10037e3f8fb1d93c4 --- M sites/all/modules/wmf_civicrm/tests/phpunit/ImportMessageTest.php M sites/all/modules/wmf_civicrm/wmf_civicrm.module 2 files changed, 18 insertions(+), 11 deletions(-) Approvals: jenkins-bot: Verified Ejegg: Looks good to me, approved diff --git a/sites/all/modules/wmf_civicrm/tests/phpunit/ImportMessageTest.php b/sites/all/modules/wmf_civicrm/tests/phpunit/ImportMessageTest.php index 3cba6c7..586ca1d 100644 --- a/sites/all/modules/wmf_civicrm/tests/phpunit/ImportMessageTest.php +++ b/sites/all/modules/wmf_civicrm/tests/phpunit/ImportMessageTest.php @@ -88,13 +88,15 @@ if ( !empty( $expected['contact'] ) ) { $contact = $this->callAPISuccessGetSingle('Contact', array('id' => $contribution['contact_id'])); $renamedFields = array('prefix' => 1, 'suffix' => 1); -$this->assertEquals( array_diff_key($expected['contact'], $renamedFields), array_intersect_key( $expected['contact'], $contact ) ); +$this->assertEquals( array_diff_key($expected['contact'], $renamedFields), array_intersect_key( $contact, $expected['contact'] ), print_r(array_intersect_key( $contact, $expected['contact'] ), TRUE) . " does not match " . print_r(array_diff_key($expected['contact'], $renamedFields), TRUE)); foreach (array_keys($renamedFields) as $renamedField) { + if (isset($expected['contact'][$renamedField])) { $this->assertEquals(civicrm_api3('OptionValue', 'getvalue', array( -'value' => $contact[$renamedField . '_id'], -'option_group_id' => 'individual_' . $renamedField, -'return' => 'name', + 'value' => $contact[$renamedField . '_id'], + 'option_group_id' => 'individual_' . $renamedField, + 'return' => 'name', )), $expected['contact'][$renamedField]); + } } } @@ -195,7 +197,7 @@ 'email' => 'nob...@wikimedia.org', 'first_name' => 'First', 'fee' => '0.03', -'preferred_language' => 'en_US', +'language' => 'en_US', 'gateway' => 'test_gateway', 'gateway_txn_id' => $gateway_txn_id, 'gateway_status' => 'P', @@ -224,7 +226,7 @@ 'middle_name' => 'Middle', 'prefix' => $new_prefix, 'suffix' => 'Sr.', -'preferred_language' => 'en_US', +'preferred_language' => 'en', ), 'contribution' => array( 'address_id' => '', @@ -286,7 +288,7 @@ 'gateway_txn_id' => $gateway_txn_id, 'gross' => '1.23', 'payment_method' => 'cc', - 'preferred_language' => 'en_ZZ', + 'language' => 'en_ZZ', 'name_prefix' => $new_prefix, 'name_suffix' => 'Sr.', ), @@ -310,7 +312,7 @@ 'gateway_txn_id' => $gateway_txn_id, 'gross' => '1.23', 'payment_method' => 'cc', - 'preferred_language' => 'zz_ZZ', + 'language' => 'zz_ZZ', 'name_prefix' => $new_prefix, 'name_suffix' => 'Sr.', 'prefix' => $new_prefix, @@ -318,7 +320,7 @@ ), array( 'contact' => array( -'preferred_language' => 'zz_ZZ', +'preferred_language' => 'zz', 'prefix' => $new_prefix, 'suffix' => 'Sr.', ), diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module b/sites/all/modules/wmf_civicrm/wmf_civicrm.module index 8dfffbf..d281f47 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module @@ -1147,8 +1147,13 @@ 'is_opt_out', ); foreach ( $direct_fields as $field ) { -if ( isset( $msg[$field] ) ) { -$contact[$field] = $msg[$field]; +if ( isset( $msg[$field] )) { +if (in_array($msg[$field], array(0, 1, '0', '1', TRUE, FALSE), TRUE)) { +$contact[$field] = $msg[$field]; +} +elseif (strtoupper($msg[$field]) === 'Y') { +
[MediaWiki-commits] [Gerrit] mediawiki...Collection[master]: Stop testing chapter generation in templates
Jdlrobson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383287 ) Change subject: Stop testing chapter generation in templates .. Stop testing chapter generation in templates The outline was exposed on metadata for testing. We don't want to do this - we will add tests specifically for table of contents generation. Bug: T177801 Change-Id: Ie52ea6a8aa35736717b7c3d697a5da0082f02518 --- M tests/phpunit/includes/BookRendererTest.php 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection refs/changes/87/383287/1 diff --git a/tests/phpunit/includes/BookRendererTest.php b/tests/phpunit/includes/BookRendererTest.php index ffe4528..81f332a 100644 --- a/tests/phpunit/includes/BookRendererTest.php +++ b/tests/phpunit/includes/BookRendererTest.php @@ -26,7 +26,6 @@ $html = $renderer->renderBook( $collection, $pages, $metadata ); $this->assertSameExceptWhitespace( $expectedHtml, $html, 'HTML mismatch' ); $this->assertArraySame( $expectedSections, $metadata['sections'], 'Section mismatch' ); - $this->assertArraySame( $expectedOutline, $metadata['outline'], 'Outline mismatch' ); } public function provideRenderBook() { -- To view, visit https://gerrit.wikimedia.org/r/383287 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie52ea6a8aa35736717b7c3d697a5da0082f02518 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Collection 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] mediawiki...Collection[master]: Update test HTML hierarchy
Jdlrobson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383285 ) Change subject: Update test HTML hierarchy .. Update test HTML hierarchy Since I3fce14de04b9e10f7a1953f842e75f065bddd8ef, the header element is wrapped in a cover-page container. Bug: T177801 Change-Id: Ie86995afaf0a3b24becc02eadd4d23bf401f4af8 --- M tests/data/BookRendererTest/chapters.html M tests/data/BookRendererTest/header_conflict.html M tests/data/BookRendererTest/id_conflict.html M tests/data/BookRendererTest/single_page.html M tests/data/BookRendererTest/two_pages.html 5 files changed, 20 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection refs/changes/85/383285/1 diff --git a/tests/data/BookRendererTest/chapters.html b/tests/data/BookRendererTest/chapters.html index d1efb94..11437e3 100644 --- a/tests/data/BookRendererTest/chapters.html +++ b/tests/data/BookRendererTest/chapters.html @@ -1,7 +1,9 @@ - + + Book title Book subtitle - + + Table of Contents diff --git a/tests/data/BookRendererTest/header_conflict.html b/tests/data/BookRendererTest/header_conflict.html index 10242e8..d7969e9 100644 --- a/tests/data/BookRendererTest/header_conflict.html +++ b/tests/data/BookRendererTest/header_conflict.html @@ -1,7 +1,9 @@ - + + Book title Book subtitle - + + Table of Contents diff --git a/tests/data/BookRendererTest/id_conflict.html b/tests/data/BookRendererTest/id_conflict.html index f8f8cdf..dcdef4e 100644 --- a/tests/data/BookRendererTest/id_conflict.html +++ b/tests/data/BookRendererTest/id_conflict.html @@ -1,7 +1,9 @@ - + + Book title Book subtitle - + + Table of Contents diff --git a/tests/data/BookRendererTest/single_page.html b/tests/data/BookRendererTest/single_page.html index d376326..ef3063f 100644 --- a/tests/data/BookRendererTest/single_page.html +++ b/tests/data/BookRendererTest/single_page.html @@ -1,7 +1,9 @@ - + + Book title Book subtitle - + + Table of Contents diff --git a/tests/data/BookRendererTest/two_pages.html b/tests/data/BookRendererTest/two_pages.html index 52ad0ec..052c14b 100644 --- a/tests/data/BookRendererTest/two_pages.html +++ b/tests/data/BookRendererTest/two_pages.html @@ -1,7 +1,9 @@ - + + Book title Book subtitle - + + Table of Contents -- To view, visit https://gerrit.wikimedia.org/r/383285 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie86995afaf0a3b24becc02eadd4d23bf401f4af8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Collection 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] mediawiki...Collection[master]: Update test mock to return license info
Jdlrobson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383286 ) Change subject: Update test mock to return license info .. Update test mock to return license info Broken by I759c3492d3bdaba67917db9ffe6685b9a5c32293 This adds additional stubbing. Bug: T177801 Change-Id: I9720df2b365dca8a87d7a07a1b62528aec1042eb --- M tests/phpunit/includes/DataProviderTest.php 1 file changed, 11 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection refs/changes/86/383286/1 diff --git a/tests/phpunit/includes/DataProviderTest.php b/tests/phpunit/includes/DataProviderTest.php index 6be5f18..126eca6 100644 --- a/tests/phpunit/includes/DataProviderTest.php +++ b/tests/phpunit/includes/DataProviderTest.php @@ -101,8 +101,17 @@ $dataProvider->expects( $this->any() ) ->method( 'makeActionApiRequest' ) ->willReturnCallback( function ( $params ) use ( $parse, $contributors ) { - if ( - $params['action'] === 'query' && $params['prop'] === 'contributors' + if ( isset( $params['meta'] ) && $params['siprop'] === 'rightsinfo' ) { + return [ + 'query' => [ + 'rightsinfo' => [ + 'url' => '//creativecommons.org/licenses/by-sa/3.0/', + 'text' => 'Creative Commons Attribution-Share Alike 3.0', + ], + ] + ]; + } else if ( + $params['action'] === 'query' && $params['prop'] === 'contributors|images' && !isset( $params['meta'] ) && !isset( $params['list'] ) ) { return [ 'query' => [ 'pages' => $contributors ] ]; -- To view, visit https://gerrit.wikimedia.org/r/383286 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9720df2b365dca8a87d7a07a1b62528aec1042eb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Collection 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] wikimedia...process-control[master]: Fix failmail suppression
Ejegg has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383284 ) Change subject: Fix failmail suppression .. Fix failmail suppression Bug: T172303 Change-Id: Ia184c684ff6059c7d39aaba136277a9a7f624d44 --- M processcontrol/runner.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/process-control refs/changes/84/383284/1 diff --git a/processcontrol/runner.py b/processcontrol/runner.py index 32a3e08..188cca4 100644 --- a/processcontrol/runner.py +++ b/processcontrol/runner.py @@ -65,7 +65,7 @@ job_history.record_success() config.log.info("Successfully completed {slug}.".format(slug=self.job.slug)) except (JobFailure, lock.LockError) as ex: -if ex is lock.LockError and ex.code == lock.LockError.LOCK_EXISTS and self.job.allow_overtime: +if isinstance(ex, lock.LockError) and ex.code == lock.LockError.LOCK_EXISTS and self.job.allow_overtime: config.log.info("Previous job is still running, but that's OK.") job_history.record_skipped(self.start_time) else: -- To view, visit https://gerrit.wikimedia.org/r/383284 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia184c684ff6059c7d39aaba136277a9a7f624d44 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/process-control 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] wikimedia...crm[master]: Remove attempt to set sort_name & display_name.
Ejegg has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382106 ) Change subject: Remove attempt to set sort_name & display_name. .. Remove attempt to set sort_name & display_name. On testing I found that what we were setting was being ignored (otherwise the cleanups would not have flowed through). I have done an upstream PR to address length handling in core https://github.com/civicrm/civicrm-core/pull/11063 I don't think it's pressing for us to address long_name handling (ie. we can suck that PR in now or wait for the next update) but removing these 2 lines gets rid of the misleading impression that they have an effect Change-Id: I0be0a8883e19378019adf29f9b4cb76add4e812e --- M sites/all/modules/wmf_civicrm/wmf_civicrm.module 1 file changed, 0 insertions(+), 3 deletions(-) Approvals: jenkins-bot: Verified Ejegg: Looks good to me, approved diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module b/sites/all/modules/wmf_civicrm/wmf_civicrm.module index 50eaab3..8dfffbf 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module @@ -1079,9 +1079,6 @@ $contact[$name] = substr(trim($msg[$name]), 0, 64); } } - // @todo this may not be needed as core may handle, but unsure how it handles over-long strings. - $contact['sort_name'] = substr(trim($msg['last_name'] . ', ' . $msg['first_name'], ' ,'), 0, 128); - $contact['display_name'] = substr($msg['first_name'] . ' ' . $msg['last_name'], 0, 128 ); } if ( strtolower( $msg['contact_type'] ) == "organization" ){ // @todo probably can remove handling for sort name and display name now. -- To view, visit https://gerrit.wikimedia.org/r/382106 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0be0a8883e19378019adf29f9b4cb76add4e812e Gerrit-PatchSet: 2 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: EileenGerrit-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...Wikibase[master]: Make tests QUnit 2 compatible
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/370300 ) Change subject: Make tests QUnit 2 compatible .. Make tests QUnit 2 compatible * Remove QUnit.expect() in favour of assert.expect(). * Replace QUnit.stop/start with assert.async(). Remove redundant use of assert.expect() where the async handler is already strict. Bug: T170515 Bug: T177764 Change-Id: Ib1a8b6dfacf851d569c697ee3780c7e8f2bb052c --- M view/tests/qunit/jquery/ui/jquery.ui.tagadata.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.aliasesview.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.entityselector.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.entitytermsforlanguageview.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.listview.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.pagesuggester.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.sitelinkgroupview.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.sitelinklistview.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.snaklistview.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.statementview.tests.js M view/tests/qunit/wikibase/entityChangers/AliasesChanger.tests.js M view/tests/qunit/wikibase/entityChangers/DescriptionsChanger.tests.js M view/tests/qunit/wikibase/entityChangers/LabelsChanger.tests.js M view/tests/qunit/wikibase/entityChangers/SiteLinkSetsChanger.tests.js M view/tests/qunit/wikibase/entityChangers/SiteLinksChanger.tests.js M view/tests/qunit/wikibase/entityChangers/StatementsChanger.tests.js M view/tests/qunit/wikibase/store/store.CachingEntityStore.tests.js M view/tests/qunit/wikibase/store/store.CombiningEntityStore.tests.js 18 files changed, 89 insertions(+), 224 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/view/tests/qunit/jquery/ui/jquery.ui.tagadata.tests.js b/view/tests/qunit/jquery/ui/jquery.ui.tagadata.tests.js index fa0c531..515d0e1 100644 --- a/view/tests/qunit/jquery/ui/jquery.ui.tagadata.tests.js +++ b/view/tests/qunit/jquery/ui/jquery.ui.tagadata.tests.js @@ -96,19 +96,17 @@ } ); QUnit.test( 'removeTag()', function ( assert ) { - assert.expect( 2 ); var $tagadata = createTagadata(), - tagadata = $tagadata.data( 'tagadata' ); - - QUnit.stop(); + tagadata = $tagadata.data( 'tagadata' ), + done = assert.async( 2 ); $tagadata.one( 'tagadatatagremoved', function () { - QUnit.start(); - assert.ok( true, 'Removed tag.' ); + + done(); } ); tagadata.removeTag( tagadata.getTag( 'B' ) ); @@ -118,23 +116,23 @@ false, 'Trying to remove non-existent tag returns "false".' ); + + done(); } ); QUnit.test( 'removeAll()', function ( assert ) { var $tagadata = createTagadata(), tagadata = $tagadata.data( 'tagadata' ), + done = assert.async(), i = tagadata.getTags().length; - - QUnit.stop(); $tagadata.on( 'tagadatatagremoved', function () { if ( --i === 0 ) { - QUnit.start(); - assert.ok( true, 'Removed all tags.' ); + done(); } } ); diff --git a/view/tests/qunit/jquery/wikibase/jquery.wikibase.aliasesview.tests.js b/view/tests/qunit/jquery/wikibase/jquery.wikibase.aliasesview.tests.js index a744cb3..1fcdfeb 100644 --- a/view/tests/qunit/jquery/wikibase/jquery.wikibase.aliasesview.tests.js +++ b/view/tests/qunit/jquery/wikibase/jquery.wikibase.aliasesview.tests.js @@ -68,34 +68,22 @@ } ); QUnit.test( 'Instantiating tagadata widget on startEditing()', function ( assert ) { - assert.expect( 1 ); var $aliasesview = createAliasesview(), aliasesview = $aliasesview.data( 'aliasesview' ); - QUnit.stop(); - - aliasesview.startEditing() - .done( function () { + return aliasesview.startEditing().done( function () { assert.ok( aliasesview.$list.data( 'tagadata' ) !== undefined, 'Instantiated tagadata widget.' ); - } ) - .fail( function ()
[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: WIP add contact_id and _hash to the rest of the places
Ejegg has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383283 ) Change subject: WIP add contact_id and _hash to the rest of the places .. WIP add contact_id and _hash to the rest of the places Need to at least store them in session. Putting the stuff in the hidden fields too, to keep them across session death to the extent we keep anything. Bug: T177663 Change-Id: Ide99711deddc569ea83cafbdad808533e2e9e0a0 --- M gateway_common/DonationData.php M gateway_common/donation.api.php M gateway_forms/mustache/index.html.mustache M modules/js/ext.donationInterface.forms.js 4 files changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/83/383283/1 diff --git a/gateway_common/DonationData.php b/gateway_common/DonationData.php index b53579a..6888b41 100644 --- a/gateway_common/DonationData.php +++ b/gateway_common/DonationData.php @@ -975,6 +975,8 @@ $fields[] = 'order_id'; $fields[] = 'appeal'; $fields[] = 'referrer'; + $fields[] = 'contact_id'; + $fields[] = 'contact_hash'; return $fields; } diff --git a/gateway_common/donation.api.php b/gateway_common/donation.api.php index f488033..5703a5c 100644 --- a/gateway_common/donation.api.php +++ b/gateway_common/donation.api.php @@ -131,6 +131,8 @@ public function getAllowedParams() { return array( 'gateway' => $this->defineParam( true ), + 'contact_id' => $this->defineParam( false ), + 'contact_hash' => $this->defineParam( false ), 'amount' => $this->defineParam( false ), 'currency' => $this->defineParam( false ), 'first_name' => $this->defineParam( false ), diff --git a/gateway_forms/mustache/index.html.mustache b/gateway_forms/mustache/index.html.mustache index cc794a3..b8ca5fe 100644 --- a/gateway_forms/mustache/index.html.mustache +++ b/gateway_forms/mustache/index.html.mustache @@ -43,6 +43,8 @@ + + diff --git a/modules/js/ext.donationInterface.forms.js b/modules/js/ext.donationInterface.forms.js index f11019c..88ae071 100644 --- a/modules/js/ext.donationInterface.forms.js +++ b/modules/js/ext.donationInterface.forms.js @@ -45,6 +45,8 @@ var sendData = { action: 'donate', gateway: $( '#gateway' ).val(), + contact_id: $( '#contact_id' ).val(), + contact_hash: $( '#contact_hash' ).val(), currency: $( '#currency' ).val(), amount: $( '#amount' ).val(), first_name: $( '#first_name' ).val(), -- To view, visit https://gerrit.wikimedia.org/r/383283 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ide99711deddc569ea83cafbdad808533e2e9e0a0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface 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] mediawiki...VisualEditor[master]: Update VE core submodule to master (c5c5123)
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/383253 ) Change subject: Update VE core submodule to master (c5c5123) .. Update VE core submodule to master (c5c5123) New changes: 1c8ca38 Don't assume events have an originalEvent object c5c5123 Localisation updates from https://translatewiki.net. Bug: T176104 Change-Id: I2e503ee6b3d4484a4f1b3567fde7281bef68a7b9 --- M lib/ve 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/lib/ve b/lib/ve index 4e29d19..c5c5123 16 --- a/lib/ve +++ b/lib/ve @@ -1 +1 @@ -Subproject commit 4e29d197dc149a562068b112506fa7bd0cbc4c21 +Subproject commit c5c5123cbf6a629f7cdb89c9929b7a1e0e1e681c -- To view, visit https://gerrit.wikimedia.org/r/383253 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2e503ee6b3d4484a4f1b3567fde7281bef68a7b9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: CatropeGerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Add and [srcset] to DOMPurify exceptions
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/383131 ) Change subject: Add and [srcset] to DOMPurify exceptions .. Add and [srcset] to DOMPurify exceptions Change-Id: I680430540542f5fa7cdae923ed5faecacf928bc5 --- M src/dm/ve.dm.Change.js 1 file changed, 11 insertions(+), 4 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/src/dm/ve.dm.Change.js b/src/dm/ve.dm.Change.js index cf41931..5400321 100644 --- a/src/dm/ve.dm.Change.js +++ b/src/dm/ve.dm.Change.js @@ -131,16 +131,23 @@ }; ve.dm.Change.static.deserializeValue = function ( serialized ) { - var rdfaAttrs; + var addTags, addAttrs; if ( serialized.type === 'annotation' ) { return ve.dm.annotationFactory.createFromElement( serialized.value ); } else if ( serialized.type === 'domNodeArray' ) { - rdfaAttrs = [ 'about', 'rel', 'resource', 'property', 'content', 'datatype', 'typeof' ]; + // TODO: Move MW-specific rules to ve-mw + addTags = [ 'figure-inline' ]; + addAttrs = [ + 'srcset', + // RDFa + 'about', 'rel', 'resource', 'property', 'content', 'datatype', 'typeof' + ]; return serialized.value.map( function ( nodeHtml ) { return DOMPurify.sanitize( $.parseHTML( nodeHtml )[ 0 ], { - ADD_ATTR: rdfaAttrs, - ADD_URI_SAFE_ATTR: rdfaAttrs, + ADD_TAGS: addTags, + ADD_ATTR: addAttrs, + ADD_URI_SAFE_ATTR: addAttrs, FORBID_TAGS: [ 'style' ], RETURN_DOM_FRAGMENT: true } ).childNodes[ 0 ]; -- To view, visit https://gerrit.wikimedia.org/r/383131 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I680430540542f5fa7cdae923ed5faecacf928bc5 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: EsandersGerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Upgrade DOMPurify 0.8.5 > 1.0.2
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/383130 ) Change subject: Upgrade DOMPurify 0.8.5 > 1.0.2 .. Upgrade DOMPurify 0.8.5 > 1.0.2 Change-Id: If901fdb0330e26cdc53e5b3f6c35cf9416987f4b --- M lib/dompurify/purify.js 1 file changed, 932 insertions(+), 877 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/lib/dompurify/purify.js b/lib/dompurify/purify.js index dde448d..77f001b 100644 --- a/lib/dompurify/purify.js +++ b/lib/dompurify/purify.js @@ -1,895 +1,950 @@ -;(function(factory) { -'use strict'; -/* global window: false, define: false, module: false */ -var root = typeof window === 'undefined' ? null : window; +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global.DOMPurify = factory()); +}(this, (function () { 'use strict'; -// HACK: Modified from upstream to prevent breaking module.exports -root.DOMPurify = factory(root); -}(function factory(window) { -'use strict'; +var html = ['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']; -var DOMPurify = function(window) { -return factory(window); -}; +// SVG +var svg = ['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'audio', 'canvas', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'video', 'view', 'vkern']; -/** - * Version label, exposed for easier checks - * if DOMPurify is up to date or not - */ -DOMPurify.version = '0.8.5'; +var svgFilters = ['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'feSpecularLighting', 'feTile', 'feTurbulence']; -/** - * Array of elements that DOMPurify removed during sanitation. - * Empty if nothing was removed. - */ -DOMPurify.removed = []; +var mathMl = ['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmuliscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mpspace', 'msqrt', 'mystyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover']; -if (!window || !window.document || window.document.nodeType !== 9) { -// not running in a browser, provide a factory function -// so that you can pass your own Window -DOMPurify.isSupported = false; -return DOMPurify; +var text = ['#text']; + +var html$1 = ['accept', 'action', 'align', 'alt', 'autocomplete', 'background', 'bgcolor', 'border', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'coords', 'datetime', 'default', 'dir', 'disabled', 'download', 'enctype', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'ismap', 'label', 'lang', 'list', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'multiple', 'name', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'span', 'srclang', 'start', 'src', 'step', 'style', 'summary', 'tabindex', 'title', 'type', 'usemap', 'valign', 'value', 'width', 'xmlns']; + +var svg$1 = ['accent-height', 'accumulate', 'additivive', 'alignment-baseline',
[MediaWiki-commits] [Gerrit] wikimedia...dash[master]: Add config for Big English 2017
Ejegg has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383272 ) Change subject: Add config for Big English 2017 .. Add config for Big English 2017 Starting October 2 this year! Change-Id: I49365904dd2dc407bafa612403dea923f71f3ced --- M src/components/widgets/totals-earned-chart/totals-earned-chart.js 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/dash refs/changes/72/383272/1 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 618caf2..d9fc523 100644 --- a/src/components/widgets/totals-earned-chart/totals-earned-chart.js +++ b/src/components/widgets/totals-earned-chart/totals-earned-chart.js @@ -38,6 +38,11 @@ self.campaigns = [ new Campaign( { + name: '2017', + startDate: Date.UTC( 2017, 9, 2 ), + endDate: Date.UTC( 2018, 0, 1 ) + } ), + new Campaign( { name: '2016', startDate: Date.UTC( 2016, 10, 29 ), endDate: Date.UTC( 2017, 0, 1 ) -- To view, visit https://gerrit.wikimedia.org/r/383272 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I49365904dd2dc407bafa612403dea923f71f3ced Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/dash 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] mediawiki...RelatedArticles[master]: build: Update eslint and stylelint
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/383139 ) Change subject: build: Update eslint and stylelint .. build: Update eslint and stylelint Change-Id: I82bfb5fbfea4997f3048305574d2ff7d28ecd1b8 --- M package.json M resources/ext.relatedArticles.cards/CardModel.js M resources/ext.relatedArticles.readMore.gateway/RelatedPagesGateway.js M tests/qunit/ext.relatedArticles.readMore.gateway/test_RelatedPagesGateway.js 4 files changed, 6 insertions(+), 6 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/package.json b/package.json index eb10f3d..e5a4f66 100644 --- a/package.json +++ b/package.json @@ -4,12 +4,12 @@ "test": "grunt test" }, "devDependencies": { -"eslint-config-wikimedia": "0.4.0", +"eslint-config-wikimedia": "0.5.0", "grunt": "1.0.1", "grunt-banana-checker": "0.6.0", -"grunt-eslint": "19.0.0", +"grunt-eslint": "20.0.0", "grunt-jsonlint": "1.1.0", -"grunt-stylelint": "0.7.0", +"grunt-stylelint": "0.8.0", "stylelint": "7.8.0", "stylelint-config-wikimedia": "0.4.1" } diff --git a/resources/ext.relatedArticles.cards/CardModel.js b/resources/ext.relatedArticles.cards/CardModel.js index 3210687..ac12a4b 100644 --- a/resources/ext.relatedArticles.cards/CardModel.js +++ b/resources/ext.relatedArticles.cards/CardModel.js @@ -13,7 +13,7 @@ * an article */ function CardModel( attributes ) { - CardModel[ 'super' ].apply( this, arguments ); + CardModel.super.apply( this, arguments ); /** * @property {Object} attributes of the model */ diff --git a/resources/ext.relatedArticles.readMore.gateway/RelatedPagesGateway.js b/resources/ext.relatedArticles.readMore.gateway/RelatedPagesGateway.js index 5bb8b16..737e345 100644 --- a/resources/ext.relatedArticles.readMore.gateway/RelatedPagesGateway.js +++ b/resources/ext.relatedArticles.readMore.gateway/RelatedPagesGateway.js @@ -76,7 +76,7 @@ if ( relatedPages.length ) { parameters.pilimit = relatedPages.length; - parameters[ 'continue' ] = ''; // jscs:ignore requireDotNotation + parameters.continue = ''; parameters.titles = relatedPages; } else if ( this.useCirrusSearch ) { diff --git a/tests/qunit/ext.relatedArticles.readMore.gateway/test_RelatedPagesGateway.js b/tests/qunit/ext.relatedArticles.readMore.gateway/test_RelatedPagesGateway.js index 65eace4..36959a3 100644 --- a/tests/qunit/ext.relatedArticles.readMore.gateway/test_RelatedPagesGateway.js +++ b/tests/qunit/ext.relatedArticles.readMore.gateway/test_RelatedPagesGateway.js @@ -70,7 +70,7 @@ QUnit.test( 'When limit is higher than number of cards, no limit is enforced.', function ( assert ) { var gateway = new RelatedPagesGateway( this.api, 'Foo', lotsaRelatedPages, true ), - // needed to get page images etc.. + // needed to get page images etc.. stub = this.sandbox.stub( this.api, 'get' ) .returns( $.Deferred().resolve( relatedPages ) ); -- To view, visit https://gerrit.wikimedia.org/r/383139 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I82bfb5fbfea4997f3048305574d2ff7d28ecd1b8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/RelatedArticles Gerrit-Branch: master Gerrit-Owner: EsandersGerrit-Reviewer: Jforrester Gerrit-Reviewer: Pmiazga 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...TextExtracts[master]: build: Upgrade linters
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/383136 ) Change subject: build: Upgrade linters .. build: Upgrade linters Change-Id: Ie377edfccd078e08a1cdb5c9e021a4b96a41599b --- A .eslintrc.json M Gruntfile.js M package.json 3 files changed, 11 insertions(+), 7 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 000..e2131d2 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "wikimedia" +} diff --git a/Gruntfile.js b/Gruntfile.js index 8083e14..f88449c 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,14 +1,14 @@ -/*jshint node:true */ +/* eslint-env node, es6 */ module.exports = function ( grunt ) { grunt.loadNpmTasks( 'grunt-banana-checker' ); + grunt.loadNpmTasks( 'grunt-eslint' ); grunt.loadNpmTasks( 'grunt-jsonlint' ); - grunt.loadNpmTasks( 'grunt-contrib-jshint' ); grunt.initConfig( { banana: { all: 'i18n/' }, - jshint: { + eslint: { all: [ '**/*.js', '!node_modules/**', @@ -23,6 +23,6 @@ } } ); - grunt.registerTask( 'test', [ 'jsonlint', 'banana', 'jshint' ] ); + grunt.registerTask( 'test', [ 'jsonlint', 'banana', 'eslint' ] ); grunt.registerTask( 'default', 'test' ); }; diff --git a/package.json b/package.json index 1a74a78..a912dcf 100644 --- a/package.json +++ b/package.json @@ -4,9 +4,10 @@ "test": "grunt test" }, "devDependencies": { +"eslint-config-wikimedia": "0.5.0", "grunt": "1.0.1", -"grunt-banana-checker": "0.4.0", -"grunt-contrib-jshint": "1.1.0", -"grunt-jsonlint": "1.0.7" +"grunt-banana-checker": "0.6.0", +"grunt-eslint": "20.0.0", +"grunt-jsonlint": "1.1.0" } } -- To view, visit https://gerrit.wikimedia.org/r/383136 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie377edfccd078e08a1cdb5c9e021a4b96a41599b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TextExtracts Gerrit-Branch: master Gerrit-Owner: EsandersGerrit-Reviewer: Jforrester Gerrit-Reviewer: Pmiazga 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...RelatedArticles[master]: build: Cleanup eslint config
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/383138 ) Change subject: build: Cleanup eslint config .. build: Cleanup eslint config Change-Id: Icbdf65233ba343f973a5dd3c93088861c1d90ff5 --- M .eslintrc.json M Gruntfile.js 2 files changed, 2 insertions(+), 5 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/.eslintrc.json b/.eslintrc.json index f1d8e8a..2ada874 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -2,16 +2,13 @@ "extends": "wikimedia", "env": { "browser": true, - "es6": true, "jquery": true, "qunit": true }, "globals": { - "browser": false, "mw": false, "OO": false, - "mediaWiki": false, - "require": false + "mediaWiki": false }, "rules": { "no-use-before-define": 1 diff --git a/Gruntfile.js b/Gruntfile.js index 52420ee..28acf01 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,4 +1,4 @@ -/* jshint node:true */ +/* eslint-env node, es6 */ module.exports = function ( grunt ) { var conf = grunt.file.readJSON( 'extension.json' ); -- To view, visit https://gerrit.wikimedia.org/r/383138 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icbdf65233ba343f973a5dd3c93088861c1d90ff5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/RelatedArticles Gerrit-Branch: master Gerrit-Owner: EsandersGerrit-Reviewer: Jforrester Gerrit-Reviewer: Pmiazga Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: WIP Check contact_hash if contact_id exists
Ejegg has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383260 ) Change subject: WIP Check contact_hash if contact_id exists .. WIP Check contact_hash if contact_id exists TODO: tests Bug: T177663 Change-Id: Id8bbd8711b6742b99a552e363fe604b73df33385 --- M sites/all/modules/wmf_civicrm/wmf_civicrm.module 1 file changed, 21 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/60/383260/1 diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module b/sites/all/modules/wmf_civicrm/wmf_civicrm.module index 50eaab3..f6b065c 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module @@ -223,7 +223,27 @@ } } -if ( !$msg['contact_id'] ) { +$createNewContact = true; +if (!empty($msg['contact_id'])) { + $createNewContact = false; + // TODO: chase down merge targets for deleted contacts + if (isset($msg['contact_hash'])) { +// This message came from the donations front-end. We need to verify +// the hash before using the existing contact. +$existing = civicrm_api3('Contact', 'getSingle', array( + 'id' => $msg['contact_id'], + 'return' => 'hash' +)); +// If the contact doesn't exist, or the hash doesn't match, act like +// it's a new donor. +if (!$existing || $existing['hash'] !== $msg['contact_hash']) { + $createNewContact = true; + unset($msg['contact_id']); + unset($msg['contact_hash']); +} + } +} +if ( $createNewContact ) { wmf_civicrm_message_create_contact($msg); } else { -- To view, visit https://gerrit.wikimedia.org/r/383260 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id8bbd8711b6742b99a552e363fe604b73df33385 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm 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] mediawiki...VisualEditor[master]: Update VE core submodule to master (c5c5123)
Catrope has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383253 ) Change subject: Update VE core submodule to master (c5c5123) .. Update VE core submodule to master (c5c5123) New changes: 1c8ca38 Don't assume events have an originalEvent object c5c5123 Localisation updates from https://translatewiki.net. Bug: T176104 Change-Id: I2e503ee6b3d4484a4f1b3567fde7281bef68a7b9 --- M lib/ve 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/53/383253/1 diff --git a/lib/ve b/lib/ve index 4e29d19..c5c5123 16 --- a/lib/ve +++ b/lib/ve @@ -1 +1 @@ -Subproject commit 4e29d197dc149a562068b112506fa7bd0cbc4c21 +Subproject commit c5c5123cbf6a629f7cdb89c9929b7a1e0e1e681c -- To view, visit https://gerrit.wikimedia.org/r/383253 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2e503ee6b3d4484a4f1b3567fde7281bef68a7b9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Catrope___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Collection[master]: Deal with cases where contributors and images are not defined
Jdlrobson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383250 ) Change subject: Deal with cases where contributors and images are not defined .. Deal with cases where contributors and images are not defined Fix test warnings Tests still fail but it's clearer to why. Bug: T177801 Change-Id: I24d0146e35c6444fc1ffc3c7f673196964492a33 --- M includes/BookRenderer.php 1 file changed, 10 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection refs/changes/50/383250/1 diff --git a/includes/BookRenderer.php b/includes/BookRenderer.php index e79cd7a..7ee24a7 100644 --- a/includes/BookRenderer.php +++ b/includes/BookRenderer.php @@ -114,9 +114,12 @@ } else { $metadataLevel = 0; } + $hasImages = isset( $metadata['images'] ) && $metadata['images']; + $hasLicense = isset( $metadata['license'] ) && $metadata['license']; + $outline = array_merge( $outline, $this->getAdditionalBookChapters( $tocHeadingCounter, $metadataLevel, - $metadata['images'], $metadata['license'] ) + $hasImages, $hasLicense ) ); $templateData = [ @@ -127,17 +130,21 @@ 'outline' => $outline, 'html' => $bookBodyHtml, ]; - if ( $metadata['images'] ) { + if ( $hasImages ) { $templateData['images'] = [ 'data' => $metadata['images'], 'level' => $headingCounter->incrementAndGetTopLevel(), ]; + } else { + $templateData['images'] = false; } - if ( $metadata['license'] ) { + if ( $hasLicense ) { $templateData['license'] = [ 'data' => $metadata['license'], 'level' => $headingCounter->incrementAndGetTopLevel(), ]; + } else { + $templateData['license'] = false; } return $templateData; } -- To view, visit https://gerrit.wikimedia.org/r/383250 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I24d0146e35c6444fc1ffc3c7f673196964492a33 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Collection 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/mediawiki-config[master]: PHP CodeSniffer no more process autogenerated files
Hashar has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383234 ) Change subject: PHP CodeSniffer no more process autogenerated files .. PHP CodeSniffer no more process autogenerated files In wmf-config, interwiki.php and trusuted-xff.php are autogenerated. It makes little sense to pass them through PHP CodeSniffer. Moreover they each have a lot of tokens which make the analysis quite slow. On my machine that went from 25 seconds to 6 seconds. Change-Id: I195712e91ca6d97438177baf53fc3ade5a5b0e22 --- M phpcs.xml 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/34/383234/1 diff --git a/phpcs.xml b/phpcs.xml index 03dbc95..70be49a 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -39,4 +39,7 @@ \.git/ vendor/ wmf-config/PrivateSettings.php + + wmf-config/interwiki.php + wmf-config/trusted-xff.php -- To view, visit https://gerrit.wikimedia.org/r/383234 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I195712e91ca6d97438177baf53fc3ade5a5b0e22 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Hashar___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Disable OCG services
Jdlrobson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383210 ) Change subject: Disable OCG services .. Disable OCG services Bug: T177795 Change-Id: I2f820a5c5be5986b14f1c5ce0f52f3fd6140a6a3 --- M wmf-config/CommonSettings.php M wmf-config/LabsServices.php M wmf-config/ProductionServices.php 3 files changed, 14 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/10/383210/1 diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index c932ae9..8edea41 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -650,6 +650,20 @@ wfLoadSkin( 'Timeless' ); // T154371 } +// The Print logo for Vector should use the same wordmark as Minerva +// This avoids duplicate config entries (T169732) +if ( + isset( $wgMinervaCustomLogos['copyright'] ) && + isset( $wgMinervaCustomLogos['copyright-height'] ) && + isset( $wgMinervaCustomLogos['copyright-width'] ) +) { + $wgVectorPrintLogo = [ + 'width' => $wgMinervaCustomLogos['copyright-width'], + 'height' => $wgMinervaCustomLogos['copyright-height'], + 'url' => $wgMinervaCustomLogos['copyright'], + ]; +} + // Grants and rights // Note these have to be visible on all wikis, not just the ones the // extension is enabled on, for proper display in OAuth pages and such. @@ -1824,7 +1838,6 @@ if ( $wmgUseCollection ) { // PediaPress / PDF generation include "$IP/extensions/Collection/Collection.php"; - $wgCollectionMWServeURL = $wmfLocalServices['ocg']; // Use pediapress server for POD function (T73675) $wgCollectionCommandToServeURL = [ 'zip_post' => "{$wmfLocalServices['urldownloader']}|https://pediapress.com/wmfup/;, diff --git a/wmf-config/LabsServices.php b/wmf-config/LabsServices.php index 70b5455..1ec6b7e 100644 --- a/wmf-config/LabsServices.php +++ b/wmf-config/LabsServices.php @@ -20,7 +20,6 @@ 'deployment-elastic06.deployment-prep.eqiad.wmflabs', 'deployment-elastic07.deployment-prep.eqiad.wmflabs', ], - 'ocg' => 'http://deployment-pdf01:8000', 'urldownloader' => 'http://deployment-urldownloader.deployment-prep.eqiad.wmflabs:8080', 'parsoid' => 'http://deployment-parsoid09.deployment-prep.eqiad.wmflabs:8000', 'mathoid' => 'http://deployment-mathoid.eqiad.wmflabs:10042', diff --git a/wmf-config/ProductionServices.php b/wmf-config/ProductionServices.php index 447ac5b..7a4044b 100644 --- a/wmf-config/ProductionServices.php +++ b/wmf-config/ProductionServices.php @@ -15,7 +15,6 @@ 'udp2log' => 'mwlog1001.eqiad.wmnet:8420', 'statsd' => 'statsd.eqiad.wmnet', 'search' => [ 'search.svc.eqiad.wmnet' ], # elasticsearch must be accessed by hostname for SSL certificate verification to work - 'ocg' => 'http://ocg.svc.eqiad.wmnet:8000', 'urldownloader' => 'http://url-downloader.eqiad.wikimedia.org:8080', 'parsoid' => 'http://parsoid.discovery.wmnet:8000', 'mathoid' => 'http://mathoid.discovery.wmnet:10042', @@ -33,7 +32,6 @@ 'udp2log' => 'mwlog1001.eqiad.wmnet:8420', 'statsd' => 'statsd.eqiad.wmnet', 'search' => [ 'search.svc.codfw.wmnet' ], # elasticsearch must be accessed by hostname for SSL certificate verification to work - 'ocg' => 'http://ocg.svc.eqiad.wmnet:8000', 'urldownloader' => 'http://url-downloader.codfw.wikimedia.org:8080', 'parsoid' => 'http://parsoid.discovery.wmnet:8000', 'mathoid' => 'http://mathoid.discovery.wmnet:10042', -- To view, visit https://gerrit.wikimedia.org/r/383210 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2f820a5c5be5986b14f1c5ce0f52f3fd6140a6a3 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config 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]: puppetmaster: don't include ruby-ldap packages
Andrew Bogott has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/383192 ) Change subject: puppetmaster: don't include ruby-ldap packages .. puppetmaster: don't include ruby-ldap packages We don't use the ldap enc anymore, so shouldn't need this. Change-Id: Ia6e7842ec34fece0a7eee57139eb2afe9fee2505 --- M modules/puppetmaster/manifests/init.pp 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Andrew Bogott: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/puppetmaster/manifests/init.pp b/modules/puppetmaster/manifests/init.pp index c8613aa..b7bdafe 100644 --- a/modules/puppetmaster/manifests/init.pp +++ b/modules/puppetmaster/manifests/init.pp @@ -85,7 +85,6 @@ 'rails', 'ruby-json', 'ruby-mysql', -'ruby-ldap', ]: ensure => present, } -- To view, visit https://gerrit.wikimedia.org/r/383192 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia6e7842ec34fece0a7eee57139eb2afe9fee2505 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew BogottGerrit-Reviewer: Andrew Bogott 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]: puppetmaster: don't include ruby-ldap packages
Andrew Bogott has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383192 ) Change subject: puppetmaster: don't include ruby-ldap packages .. puppetmaster: don't include ruby-ldap packages We don't use the ldap enc anymore, so shouldn't need this. Change-Id: Ia6e7842ec34fece0a7eee57139eb2afe9fee2505 --- M modules/puppetmaster/manifests/init.pp 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/92/383192/1 diff --git a/modules/puppetmaster/manifests/init.pp b/modules/puppetmaster/manifests/init.pp index c8613aa..b7bdafe 100644 --- a/modules/puppetmaster/manifests/init.pp +++ b/modules/puppetmaster/manifests/init.pp @@ -85,7 +85,6 @@ 'rails', 'ruby-json', 'ruby-mysql', -'ruby-ldap', ]: ensure => present, } -- To view, visit https://gerrit.wikimedia.org/r/383192 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia6e7842ec34fece0a7eee57139eb2afe9fee2505 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] translatewiki[master]: [Checkuser] Add key to ignore
Raimond Spekking has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/383190 ) Change subject: [Checkuser] Add key to ignore .. [Checkuser] Add key to ignore https://gerrit.wikimedia.org/r/#/c/380420/11/i18n/en.json Change-Id: I2fc2a4da832372d25c3df4da52dcddcd76cb7b9f --- M groups/MediaWiki/mediawiki-extensions.txt 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Raimond Spekking: Verified; Looks good to me, approved diff --git a/groups/MediaWiki/mediawiki-extensions.txt b/groups/MediaWiki/mediawiki-extensions.txt index db7797f..a31a672 100644 --- a/groups/MediaWiki/mediawiki-extensions.txt +++ b/groups/MediaWiki/mediawiki-extensions.txt @@ -581,7 +581,7 @@ Check User aliasfile = CheckUser/CheckUser.alias.php -ignored = checkuser-toollinks +ignored = checkuser-toollinks, checkuser-userlinks-ip optional = group-checkuser.css, group-checkuser.js Cirrus Search -- To view, visit https://gerrit.wikimedia.org/r/383190 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2fc2a4da832372d25c3df4da52dcddcd76cb7b9f Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Raimond SpekkingGerrit-Reviewer: Raimond Spekking ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: [Checkuser] Add key to ignore
Raimond Spekking has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383190 ) Change subject: [Checkuser] Add key to ignore .. [Checkuser] Add key to ignore https://gerrit.wikimedia.org/r/#/c/380420/11/i18n/en.json Change-Id: I2fc2a4da832372d25c3df4da52dcddcd76cb7b9f --- M groups/MediaWiki/mediawiki-extensions.txt 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/90/383190/1 diff --git a/groups/MediaWiki/mediawiki-extensions.txt b/groups/MediaWiki/mediawiki-extensions.txt index db7797f..a31a672 100644 --- a/groups/MediaWiki/mediawiki-extensions.txt +++ b/groups/MediaWiki/mediawiki-extensions.txt @@ -581,7 +581,7 @@ Check User aliasfile = CheckUser/CheckUser.alias.php -ignored = checkuser-toollinks +ignored = checkuser-toollinks, checkuser-userlinks-ip optional = group-checkuser.css, group-checkuser.js Cirrus Search -- To view, visit https://gerrit.wikimedia.org/r/383190 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2fc2a4da832372d25c3df4da52dcddcd76cb7b9f Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Raimond Spekking___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Unwrap types in function docs from {}
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/383181 ) Change subject: Unwrap types in function docs from {} .. Unwrap types in function docs from {} {} is used in javascript, not in php Used @(?:param|return|var|throws) \{[^\}]+\} to find Change-Id: I2e0c9c64b6528f3899d2809d585b5e4859838007 --- M includes/utils/AutoloadGenerator.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Fomafix: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/utils/AutoloadGenerator.php b/includes/utils/AutoloadGenerator.php index 4f639c1..421a890 100644 --- a/includes/utils/AutoloadGenerator.php +++ b/includes/utils/AutoloadGenerator.php @@ -156,8 +156,8 @@ /** * Generates a PHP file setting up autoload information. * -* @param {string} $commandName Command name to include in comment -* @param {string} $filename of PHP file to put autoload information in. +* @param string $commandName Command name to include in comment +* @param string $filename of PHP file to put autoload information in. * @return string */ protected function generatePHPAutoload( $commandName, $filename ) { -- To view, visit https://gerrit.wikimedia.org/r/383181 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2e0c9c64b6528f3899d2809d585b5e4859838007 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: UmherirrenderGerrit-Reviewer: Fomafix 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]: [WIP] Removing from whitelist tables that no longer exist
Nuria has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383185 ) Change subject: [WIP] Removing from whitelist tables that no longer exist .. [WIP] Removing from whitelist tables that no longer exist Bug: T171629 Change-Id: I225ea76761c0f8ce6224f164957508ca18c0fa0a --- M modules/role/files/mariadb/eventlogging_purging_whitelist.tsv 1 file changed, 0 insertions(+), 53 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/85/383185/1 diff --git a/modules/role/files/mariadb/eventlogging_purging_whitelist.tsv b/modules/role/files/mariadb/eventlogging_purging_whitelist.tsv index b0dd574..9069c9b 100644 --- a/modules/role/files/mariadb/eventlogging_purging_whitelist.tsv +++ b/modules/role/files/mariadb/eventlogging_purging_whitelist.tsv @@ -14,23 +14,14 @@ Echo event_revisionId Echo event_sender Echo event_version -_EchoInteraction clientValidated EchoInteractionclientValidated -_EchoInteraction event_action EchoInteractionevent_action -_EchoInteraction event_context EchoInteractionevent_context -_EchoInteraction event_mobile EchoInteractionevent_mobile -_EchoInteraction event_notificationType EchoInteractionevent_notificationType -_EchoInteraction event_version EchoInteractionevent_version -_EchoInteraction isTruncated EchoInteractionisTruncated -_EchoInteraction webHost EchoInteractionwebHost -_EchoInteraction wiki EchoInteractionwiki Echo isTruncated EchoMail clientValidated @@ -680,50 +671,6 @@ PageContentSaveCompleteisTruncated PageContentSaveCompletewebHost PageContentSaveCompletewiki -PageCreation clientValidated -PageCreation event_namespace -PageCreation event_pageId -PageCreation event_revId -PageCreation event_title -PageCreation event_userId -PageCreation event_userText -PageCreation isTruncated -PageCreation webHost -PageCreation wiki -PageDeletion clientValidated -PageDeletion event_comment -PageDeletion event_namespace -PageDeletion event_pageId -PageDeletion event_title -PageDeletion event_userId -PageDeletion event_userText -PageDeletion isTruncated -PageDeletion webHost -PageDeletion wiki -PageMove clientValidated -PageMove event_comment -PageMove event_newNamespace -PageMove event_newTitle -PageMove event_oldNamespace -PageMove event_oldTitle -PageMove event_pageId -PageMove event_redirectId -PageMove event_userId -PageMove event_userText -PageMove isTruncated -PageMove webHost -PageMove wiki -PageRestorationclientValidated -PageRestorationevent_comment -PageRestorationevent_namespace -PageRestorationevent_newPageId -PageRestorationevent_oldPageId -PageRestorationevent_title -PageRestorationevent_userId -PageRestorationevent_userText -PageRestorationisTruncated -PageRestorationwebHost -PageRestorationwiki Popups event_sessionToken Popups event_version Popups event_pageIdSource -- To view, visit https://gerrit.wikimedia.org/r/383185 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I225ea76761c0f8ce6224f164957508ca18c0fa0a Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Nuria___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...codesniffer[master]: Unwrap types in function docs from {}
Umherirrender has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383184 ) Change subject: Unwrap types in function docs from {} .. Unwrap types in function docs from {} Add sniff for @throws, @param, @return to check for {string} Change-Id: Ib1c7a41c07484f7c3af7f806fbc375df44b543bf --- M MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php M MediaWiki/Tests/files/Commenting/commenting_function.php M MediaWiki/Tests/files/Commenting/commenting_function.php.expect M MediaWiki/Tests/files/Commenting/commenting_function.php.fixed 4 files changed, 80 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/codesniffer refs/changes/84/383184/1 diff --git a/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php b/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php index 8bd2db2..d2b1cc4 100644 --- a/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php +++ b/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php @@ -274,6 +274,23 @@ $fixType = true; } } + $matches = []; + if ( preg_match( '/^(\p{P}+)(.*)(\p{P}+)$/', $type, $matches ) ) { + $error = 'Expected parameter type not wrapped in punctuation; %s and %s found'; + $data = [ + $matches[1], $matches[3] + ]; + $fix = $phpcsFile->addFixableError( + $error, + $retType, + 'NotPunctuationReturnType', + $data + ); + $type = $matches[2]; + if ( $fix === true ) { + $fixType = true; + } + } // Check the type for short types $explodedType = explode( '|', $type ); foreach ( $explodedType as $index => $singleType ) { @@ -366,6 +383,27 @@ if ( $exception === null ) { $error = 'Exception type missing for @throws tag in function comment'; $phpcsFile->addError( $error, $tag, 'InvalidThrows' ); + } else { + // Check for unneeded punctation on exceptions + $matches = []; + if ( preg_match( '/^(\p{P}+)(.*)(\p{P}+)$/', $exception, $matches ) ) { + $error = 'Expected parameter type not wrapped in punctuation; %s and %s found'; + $data = [ + $matches[1], $matches[3] + ]; + $fix = $phpcsFile->addFixableError( + $error, + $tag, + 'NotPunctuationException', + $data + ); + if ( $fix === true ) { + $phpcsFile->fixer->replaceToken( + $tag + 2, + $matches[2] . ( $comment === null ? '' : ' ' . $comment ) + ); + } + } } } // end foreach @@ -517,6 +555,27 @@ $phpcsFile->fixer->replaceToken( ( $param['tag'] + 1 ), str_repeat( ' ', $spaces ) ); } } + // Check for unneeded punctation on parameter type + $matches = []; + if ( preg_match( '/^(\p{P}+)(.*)(\p{P}+)$/', $param['type'], $matches ) ) { + $error = 'Expected parameter type not wrapped in punctuation; %s and %s found'; + $data = [ + $matches[1], $matches[3] + ]; + $fix = $phpcsFile->addFixableError( + $error, + $param['tag'], + 'NotPunctuationParamType', + $data +
[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: updatePerUserBlacklist wfWaitForSlaves()
Dbarratt has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383183 ) Change subject: updatePerUserBlacklist wfWaitForSlaves() .. updatePerUserBlacklist wfWaitForSlaves() Commit a live hack. Master branch would have to be updated. Bug: T173475 Change-Id: I80bec4ed0d92e04eed311b4e0d906ead7432abe8 --- M maintenance/updatePerUserBlacklist.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/83/383183/1 diff --git a/maintenance/updatePerUserBlacklist.php b/maintenance/updatePerUserBlacklist.php index 83d29b5..94e2aaa 100644 --- a/maintenance/updatePerUserBlacklist.php +++ b/maintenance/updatePerUserBlacklist.php @@ -79,7 +79,7 @@ ] ); $processed += $dbw->affectedRows(); - $dbFactory->waitForSlaves(); + wfWaitForSlaves(); } $this->output( "Updated $processed Users\n" ); -- To view, visit https://gerrit.wikimedia.org/r/383183 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I80bec4ed0d92e04eed311b4e0d906ead7432abe8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: DbarrattGerrit-Reviewer: Hashar ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Echo[wmf/1.31.0-wmf.2]: updatePerUserBlacklist wfWaitForSlaves()
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/383182 ) Change subject: updatePerUserBlacklist wfWaitForSlaves() .. updatePerUserBlacklist wfWaitForSlaves() Commit a live hack. Master branch would have to be updated. Bug: T173475 Change-Id: Idd194d89fc3243301add47747b29e1aacec029d0 --- M maintenance/updatePerUserBlacklist.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/maintenance/updatePerUserBlacklist.php b/maintenance/updatePerUserBlacklist.php index 83d29b5..94e2aaa 100644 --- a/maintenance/updatePerUserBlacklist.php +++ b/maintenance/updatePerUserBlacklist.php @@ -79,7 +79,7 @@ ] ); $processed += $dbw->affectedRows(); - $dbFactory->waitForSlaves(); + wfWaitForSlaves(); } $this->output( "Updated $processed Users\n" ); -- To view, visit https://gerrit.wikimedia.org/r/383182 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idd194d89fc3243301add47747b29e1aacec029d0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: wmf/1.31.0-wmf.2 Gerrit-Owner: HasharGerrit-Reviewer: Dbarratt Gerrit-Reviewer: Hashar 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]: Enable new print styles on Vector in test wiki
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/383180 ) Change subject: Enable new print styles on Vector in test wiki .. Enable new print styles on Vector in test wiki This time with added protection! We'll deploy to production later on to allow us to debug several issues with the logo. Bug: T169732 Change-Id: Idb765f28f74ac660c9eccc27e6b61ad9ac5d5248 --- M wmf-config/InitialiseSettings.php 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 46b4de6..6eedbe8 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -7176,6 +7176,12 @@ 'nostalgiawiki' => 'nostalgia', ], +// T169732 +'wgVectorExperimentalPrintStyles' => [ + 'default' => false, + 'testwiki' => true, +], + 'wgVectorResponsive' => [ 'default' => false, 'testwiki' => true, -- To view, visit https://gerrit.wikimedia.org/r/383180 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idb765f28f74ac660c9eccc27e6b61ad9ac5d5248 Gerrit-PatchSet: 3 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: JdlrobsonGerrit-Reviewer: Hashar Gerrit-Reviewer: Urbanecm Gerrit-Reviewer: Zoranzoki21 Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Echo[wmf/1.31.0-wmf.2]: updatePerUserBlacklist wfWaitForSlaves()
Hashar has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383182 ) Change subject: updatePerUserBlacklist wfWaitForSlaves() .. updatePerUserBlacklist wfWaitForSlaves() Commit a live hack. Master branch would have to be updated. Bug: T173475 Change-Id: Idd194d89fc3243301add47747b29e1aacec029d0 --- M maintenance/updatePerUserBlacklist.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/82/383182/1 diff --git a/maintenance/updatePerUserBlacklist.php b/maintenance/updatePerUserBlacklist.php index 83d29b5..94e2aaa 100644 --- a/maintenance/updatePerUserBlacklist.php +++ b/maintenance/updatePerUserBlacklist.php @@ -79,7 +79,7 @@ ] ); $processed += $dbw->affectedRows(); - $dbFactory->waitForSlaves(); + wfWaitForSlaves(); } $this->output( "Updated $processed Users\n" ); -- To view, visit https://gerrit.wikimedia.org/r/383182 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idd194d89fc3243301add47747b29e1aacec029d0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: wmf/1.31.0-wmf.2 Gerrit-Owner: Hashar___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Unwrap types in function docs from {}
Umherirrender has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383181 ) Change subject: Unwrap types in function docs from {} .. Unwrap types in function docs from {} {} is used in javascript, not in php Used @(?:param|return|var|throws) \{[^\}]+\} to find Change-Id: I2e0c9c64b6528f3899d2809d585b5e4859838007 --- M includes/utils/AutoloadGenerator.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/81/383181/1 diff --git a/includes/utils/AutoloadGenerator.php b/includes/utils/AutoloadGenerator.php index 4f639c1..421a890 100644 --- a/includes/utils/AutoloadGenerator.php +++ b/includes/utils/AutoloadGenerator.php @@ -156,8 +156,8 @@ /** * Generates a PHP file setting up autoload information. * -* @param {string} $commandName Command name to include in comment -* @param {string} $filename of PHP file to put autoload information in. +* @param string $commandName Command name to include in comment +* @param string $filename of PHP file to put autoload information in. * @return string */ protected function generatePHPAutoload( $commandName, $filename ) { -- To view, visit https://gerrit.wikimedia.org/r/383181 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2e0c9c64b6528f3899d2809d585b5e4859838007 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Enable new print styles on Vector
Jdlrobson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383180 ) Change subject: Enable new print styles on Vector .. Enable new print styles on Vector This time with added protection! Bug: T169732 Change-Id: Idb765f28f74ac660c9eccc27e6b61ad9ac5d5248 --- M wmf-config/CommonSettings.php M wmf-config/InitialiseSettings.php 2 files changed, 19 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/80/383180/1 diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index c932ae9..881bb64 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -650,6 +650,20 @@ wfLoadSkin( 'Timeless' ); // T154371 } +// The Print logo for Vector should use the same wordmark as Minerva +// This avoids duplicate config entries (T169732) +if ( + isset( $wgMinervaCustomLogos['copyright'] ) && + isset( $wgMinervaCustomLogos['copyright-height'] ) && + isset( $wgMinervaCustomLogos['copyright-width'] ) +) { + $wgVectorPrintLogo = [ + 'width' => $wgMinervaCustomLogos['copyright-width'], + 'height' => $wgMinervaCustomLogos['copyright-height'], + 'url' => $wgMinervaCustomLogos['copyright'], + ]; +} + // Grants and rights // Note these have to be visible on all wikis, not just the ones the // extension is enabled on, for proper display in OAuth pages and such. diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 46b4de6..f7a217a 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -7176,6 +7176,11 @@ 'nostalgiawiki' => 'nostalgia', ], +// T169732 +'wgVectorExperimentalPrintStyles' => [ + 'default' => true, +], + 'wgVectorResponsive' => [ 'default' => false, 'testwiki' => true, -- To view, visit https://gerrit.wikimedia.org/r/383180 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idb765f28f74ac660c9eccc27e6b61ad9ac5d5248 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config 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/mediawiki-config[master]: Revert "Enable new print styles on Vector"
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/383178 ) Change subject: Revert "Enable new print styles on Vector" .. Revert "Enable new print styles on Vector" 166 Notice: Undefined index: copyright-width in /srv/mediawiki/wmf-config/CommonSettings.php on line 656 166 Notice: Undefined index: copyright in /srv/mediawiki/wmf-config/CommonSettings.php on line 658 166 Notice: Undefined index: copyright-height in /srv/mediawiki/wmf-config/CommonSettings.php on line 657 This reverts commit a2f4667954e844273bb2e655d5bd3e5fe10d8b75. Change-Id: Ibaa3e8237bf1fbd7763cfda5bf9031213a4f4e4f --- M wmf-config/CommonSettings.php M wmf-config/InitialiseSettings.php 2 files changed, 0 insertions(+), 13 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index 0dc18ce..c932ae9 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -650,14 +650,6 @@ wfLoadSkin( 'Timeless' ); // T154371 } -// The Print logo for Vector should use the same wordmark as Minerva -// This avoids duplicate config entries (T169732) -$wgVectorPrintLogo = [ - 'width' => $wgMinervaCustomLogos['copyright-width'], - 'height' => $wgMinervaCustomLogos['copyright-height'], - 'url' => $wgMinervaCustomLogos['copyright'], -]; - // Grants and rights // Note these have to be visible on all wikis, not just the ones the // extension is enabled on, for proper display in OAuth pages and such. diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index f7a217a..46b4de6 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -7176,11 +7176,6 @@ 'nostalgiawiki' => 'nostalgia', ], -// T169732 -'wgVectorExperimentalPrintStyles' => [ - 'default' => true, -], - 'wgVectorResponsive' => [ 'default' => false, 'testwiki' => true, -- To view, visit https://gerrit.wikimedia.org/r/383178 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibaa3e8237bf1fbd7763cfda5bf9031213a4f4e4f Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: HasharGerrit-Reviewer: Hashar Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Urbanecm Gerrit-Reviewer: Zoranzoki21 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]: Check config variables are set before applying
Jdlrobson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383179 ) Change subject: Check config variables are set before applying .. Check config variables are set before applying Bug: T169732 Change-Id: I979210617b594da60a883371c6d7073341add81f --- M wmf-config/CommonSettings.php 1 file changed, 11 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/79/383179/1 diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index 0dc18ce..881bb64 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -652,11 +652,17 @@ // The Print logo for Vector should use the same wordmark as Minerva // This avoids duplicate config entries (T169732) -$wgVectorPrintLogo = [ - 'width' => $wgMinervaCustomLogos['copyright-width'], - 'height' => $wgMinervaCustomLogos['copyright-height'], - 'url' => $wgMinervaCustomLogos['copyright'], -]; +if ( + isset( $wgMinervaCustomLogos['copyright'] ) && + isset( $wgMinervaCustomLogos['copyright-height'] ) && + isset( $wgMinervaCustomLogos['copyright-width'] ) +) { + $wgVectorPrintLogo = [ + 'width' => $wgMinervaCustomLogos['copyright-width'], + 'height' => $wgMinervaCustomLogos['copyright-height'], + 'url' => $wgMinervaCustomLogos['copyright'], + ]; +} // Grants and rights // Note these have to be visible on all wikis, not just the ones the -- To view, visit https://gerrit.wikimedia.org/r/383179 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I979210617b594da60a883371c6d7073341add81f Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config 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/mediawiki-config[master]: Revert "Enable new print styles on Vector"
Hello Urbanecm, jenkins-bot, Jdlrobson, Zoranzoki21, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/383178 to review the following change. Change subject: Revert "Enable new print styles on Vector" .. Revert "Enable new print styles on Vector" 166 Notice: Undefined index: copyright-width in /srv/mediawiki/wmf-config/CommonSettings.php on line 656 166 Notice: Undefined index: copyright in /srv/mediawiki/wmf-config/CommonSettings.php on line 658 166 Notice: Undefined index: copyright-height in /srv/mediawiki/wmf-config/CommonSettings.php on line 657 This reverts commit a2f4667954e844273bb2e655d5bd3e5fe10d8b75. Change-Id: Ibaa3e8237bf1fbd7763cfda5bf9031213a4f4e4f --- M wmf-config/CommonSettings.php M wmf-config/InitialiseSettings.php 2 files changed, 0 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/78/383178/1 diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index 0dc18ce..c932ae9 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -650,14 +650,6 @@ wfLoadSkin( 'Timeless' ); // T154371 } -// The Print logo for Vector should use the same wordmark as Minerva -// This avoids duplicate config entries (T169732) -$wgVectorPrintLogo = [ - 'width' => $wgMinervaCustomLogos['copyright-width'], - 'height' => $wgMinervaCustomLogos['copyright-height'], - 'url' => $wgMinervaCustomLogos['copyright'], -]; - // Grants and rights // Note these have to be visible on all wikis, not just the ones the // extension is enabled on, for proper display in OAuth pages and such. diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index f7a217a..46b4de6 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -7176,11 +7176,6 @@ 'nostalgiawiki' => 'nostalgia', ], -// T169732 -'wgVectorExperimentalPrintStyles' => [ - 'default' => true, -], - 'wgVectorResponsive' => [ 'default' => false, 'testwiki' => true, -- To view, visit https://gerrit.wikimedia.org/r/383178 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibaa3e8237bf1fbd7763cfda5bf9031213a4f4e4f Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: HasharGerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Urbanecm Gerrit-Reviewer: Zoranzoki21 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...GWToolset[master]: Unwrap types in function docs from {}
Umherirrender has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383177 ) Change subject: Unwrap types in function docs from {} .. Unwrap types in function docs from {} {} is used in javascript, not in php Used @(?:param|return|var|throws) \{[^\}]+\} to find Change-Id: Ie1cfdba43f0075a7930af1472596ed5a21d09405 --- M includes/Adapters/Php/MappingPhpAdapter.php M includes/Adapters/Php/MediawikiTemplatePhpAdapter.php M includes/Adapters/Php/MetadataPhpAdapter.php M includes/Config.php M includes/Forms/MetadataDetectForm.php M includes/Forms/MetadataMappingForm.php M includes/Forms/PreviewForm.php M includes/GWTException.php M includes/Handlers/Forms/FormHandler.php M includes/Handlers/Forms/MetadataDetectHandler.php M includes/Handlers/Forms/MetadataMappingHandler.php M includes/Handlers/UploadHandler.php M includes/Handlers/Xml/XmlDetectHandler.php M includes/Handlers/Xml/XmlHandler.php M includes/Handlers/Xml/XmlMappingHandler.php M includes/Helpers/FileChecks.php M includes/Helpers/GWTFileBackend.php M includes/Helpers/WikiChecks.php M includes/Hooks/Hooks.php M includes/Jobs/GWTFileBackendCleanupJob.php M includes/Jobs/UploadMediafileJob.php M includes/Jobs/UploadMetadataJob.php M includes/Models/Mapping.php M includes/Models/MediawikiTemplate.php M includes/Models/Metadata.php M includes/Php/File.php M includes/Specials/SpecialGWToolset.php M includes/Utils.php 28 files changed, 486 insertions(+), 486 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GWToolset refs/changes/77/383177/1 diff --git a/includes/Adapters/Php/MappingPhpAdapter.php b/includes/Adapters/Php/MappingPhpAdapter.php index 73acc97..99585f6 100644 --- a/includes/Adapters/Php/MappingPhpAdapter.php +++ b/includes/Adapters/Php/MappingPhpAdapter.php @@ -24,11 +24,11 @@ /** * @todo is the content returned by the WikiPage filtered? -* @param {array} $options +* @param array $options * -* @throws {GWTException} +* @throws GWTException * -* @return {string} +* @return string * the content of the wikipage referred to by the wiki title */ public function retrieve( array $options = [] ) { diff --git a/includes/Adapters/Php/MediawikiTemplatePhpAdapter.php b/includes/Adapters/Php/MediawikiTemplatePhpAdapter.php index 6b0bee9..2fea594 100644 --- a/includes/Adapters/Php/MediawikiTemplatePhpAdapter.php +++ b/includes/Adapters/Php/MediawikiTemplatePhpAdapter.php @@ -26,7 +26,7 @@ * returns an indexed array of key values from the Config::$mediawiki_templates * array, which represents the mediawiki templates handled by the extension * -* @return {array} +* @return array */ public function getKeys() { return array_keys( Config::$mediawiki_templates ); @@ -40,9 +40,9 @@ * - attempts to retrieve a TemplateData version of the template * - falls back to a Config::$mediawiki_templates version if not found * -* @param {array} $options -* @throws {GWTException} -* @return {array} +* @param array $options +* @throws GWTException +* @return array */ public function retrieve( array $options = [] ) { $result = [ 'mediawiki_template_json' => '' ]; @@ -100,9 +100,9 @@ * if TemplateData isfound, it is prepared as a JSON string in an expected * format -- {"parameter name":""} * -* @param {Title} $Title -* @throws {MWException} -* @return {null|string} +* @param Title $Title +* @throws MWException +* @return null|string * null or a JSON representation of the MediaWiki template parameters */ protected function retrieveTemplateData( Title $Title ) { diff --git a/includes/Adapters/Php/MetadataPhpAdapter.php b/includes/Adapters/Php/MetadataPhpAdapter.php index 368b081..7f2588e 100644 --- a/includes/Adapters/Php/MetadataPhpAdapter.php +++ b/includes/Adapters/Php/MetadataPhpAdapter.php @@ -14,25 +14,25 @@ class MetadataPhpAdapter implements DataAdapterInterface { /** -* @param {array} $options +* @param array $options */ public function create( array $options = [] ) { } /** -* @param {array} $options +* @param array $options */ public function delete( array $options = [] ) { } /** -* @param {array} $options +* @param array $options */ public function retrieve( array $options = [] ) { } /** -* @param {array} $options +* @param array $options */ public function update( array $options = [] ) { } diff --git a/includes/Config.php b/includes/Config.php index
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Change empty result states
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383176 ) Change subject: Change empty result states .. Change empty result states - Drop minimum height for search results container. - Don't show missing pages while searching in New translation dialog. - Show message when there are no search results for user input query. - Remove red border for validation on New translation dialog input field. - Provide option to close search results on Escape key. - Don't close search results when New translation dialog input field is tabbed out. Bug: T177469 Bug: T177470 Depends-On: I9e7dd451c61a6a88679628acbbf28d45c0a1e0e8 Change-Id: I70cc3fa25e153b29486b0d42adf7bd8cd17d9ee8 --- M extension.json M i18n/en.json M i18n/qqq.json M modules/source/ext.cx.source.selector.js M modules/source/styles/ext.cx.source.selector.less M modules/ui/widgets/mw.cx.ui.PageSelectorWidget.js 6 files changed, 105 insertions(+), 32 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/76/383176/1 diff --git a/extension.json b/extension.json index 0b8226d..e6d0130 100644 --- a/extension.json +++ b/extension.json @@ -369,8 +369,9 @@ "cx-sourceselector-dialog-error-title-in-use", "cx-sourceselector-dialog-error-no-source-article", "cx-sourceselector-embedded-selected-item-pageviews", - "cx-sourceselector-embedded-recent-edits", + "cx-sourceselector-embedded-recent-edits-header", "cx-sourceselector-embedded-recent-edits-no-results", + "cx-sourceselector-embedded-search-no-results", "cx-license-agreement", "cx-error-server-connection" ] diff --git a/i18n/en.json b/i18n/en.json index 41d3cab..f890f7b 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -99,8 +99,9 @@ "cx-sourceselector-dialog-error-no-source-article": "The page to translate does not exist in $1", "cx-sourceselector-missing-in-target-language": "Missing in $1", "cx-sourceselector-embedded-selected-item-pageviews": "{{PLURAL:$1|$1 visit per|$1 visits per|0=No visits this}} week", - "cx-sourceselector-embedded-recent-edits": "Recently edited by you", + "cx-sourceselector-embedded-recent-edits-header": "Recently edited by you", "cx-sourceselector-embedded-recent-edits-no-results": "Think of any topic of your interest. You don’t need to be an expert to create a great translation.", + "cx-sourceselector-embedded-search-no-results": "No pages found for '$1' in $2", "cx-mt-abuse-warning-title": "Your translation {{PLURAL:$1|contains}} $1% of unmodified machine-translated text", "cx-mt-abuse-warning-text": "Machine translation is provided only as a starting point. You need to make sure that the content is accurate and reads naturally in your language.", "cx-publish-captcha-title": "Security question", diff --git a/i18n/qqq.json b/i18n/qqq.json index 550145d..98fd369 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -108,8 +108,9 @@ "cx-sourceselector-dialog-error-no-source-article": "Error that indicates there is no page with the specified title in the source language to translate.\n\nParameters:\n* $1 - the source language", "cx-sourceselector-missing-in-target-language": "Label appended to search result in Special:ContentTranslation when using the \"Start new article\" feature, which indicates that matching article is missing in target language.\n\nParameters:\n* $1 - The autonym of the language", "cx-sourceselector-embedded-selected-item-pageviews": "Label appended to selected item in New translation embedded dialog on Content Translation dashboard, used for representing number of page visits in the last week.\n$1 - number of visits per week", - "cx-sourceselector-embedded-recent-edits": "Label used in New translation embedded dialog, above the suggestions based on user's Recently edited pages.", + "cx-sourceselector-embedded-recent-edits-header": "Label used in New translation embedded dialog, above the suggestions based on user's Recently edited pages.", "cx-sourceselector-embedded-recent-edits-no-results": "Message used in New translation embedded dialog, when there are no suggestions based on user's Recently edited pages.", + "cx-sourceselector-embedded-search-no-results": "Message used in New translation embedded dialog, displayed when there are no search results for user's input query.\n\nParameters:\n* $1 - User's input query\n* $2 - Autonym name of currently selected source language", "cx-mt-abuse-warning-title": "Title text shown in machine translation
[MediaWiki-commits] [Gerrit] mediawiki...Echo[wmf/1.31.0-wmf.2]: Reapply "Use User Ids instead of User Names for Echo Mute""
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/383173 ) Change subject: Reapply "Use User Ids instead of User Names for Echo Mute"" .. Reapply "Use User Ids instead of User Names for Echo Mute"" This time incorporate https://gerrit.wikimedia.org/r/#/c/382561/ : Use main Database Connection for Maintenance Script This reverts commit 0bd54ee5386a6e55a77c6b6e5ec6654ad1c369f7. Bug: T173475 Change-Id: Ia97b0629cc92022b2539e33caa0b68ab3d1fdcd2 --- M Hooks.php M extension.json M includes/ContainmentSet.php A maintenance/updatePerUserBlacklist.php 4 files changed, 130 insertions(+), 5 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified Dbarratt: Looks good to me, but someone else must approve diff --git a/Hooks.php b/Hooks.php index 8e3db35..4a7c06a 100644 --- a/Hooks.php +++ b/Hooks.php @@ -490,10 +490,15 @@ } if ( $wgEchoPerUserBlacklist ) { + $lookup = CentralIdLookup::factory(); + $ids = $user->getOption( 'echo-notifications-blacklist', [] ); + $names = $ids ? $lookup->namesFromCentralIds( $ids, $user ) : []; + $preferences['echo-notifications-blacklist'] = [ 'type' => 'usersmultiselect', 'label-message' => 'echo-pref-notifications-blacklist', 'section' => 'echo/blocknotificationslist', + 'default' => implode( "\n", $names ) ]; } @@ -1252,6 +1257,10 @@ $options['echo-subscriptions-email-edit-user-talk'] = $options['enotifusertalkpages']; } + if ( isset( $options['echo-notifications-blacklist'] ) ) { + $options['echo-notifications-blacklist'] = array_map( 'intval', explode( "\n", $options['echo-notifications-blacklist'] ) ); + } + return true; } @@ -1270,6 +1279,28 @@ unset( $options['echo-subscriptions-email-edit-user-talk'] ); } + // Convert usernames to ids. + if ( isset( $options['echo-notifications-blacklist'] ) ) { + if ( $options['echo-notifications-blacklist'] ) { + $value = $options['echo-notifications-blacklist']; + // Notification Blacklist may be an array of ids or a string of new line + // delimnated user names. + if ( is_array( $value ) ) { + $ids = array_filter( $value, 'is_numeric' ); + } else { + $lookup = CentralIdLookup::factory(); + $names = explode( "\n", $value ); + $ids = $lookup->centralIdsFromNames( $names, $user ); + } + + $user->setOption( 'echo-notifications-blacklist', $ids ); + $options['echo-notifications-blacklist'] = implode( "\n", $user->getOption( 'echo-notifications-blacklist' ) ); + } else { + // If the blacklist is empty, set it to null rather than an empty string. + $options['echo-notifications-blacklist'] = null; + } + } + return true; } diff --git a/extension.json b/extension.json index 39606db..dc21551 100644 --- a/extension.json +++ b/extension.json @@ -1019,6 +1019,7 @@ "SpecialNotificationsMarkRead": "includes/special/SpecialNotificationsMarkRead.php", "SuppressionMaintenanceTest": "tests/phpunit/maintenance/SupressionMaintenanceTest.php", "TestDiscussionParser": "maintenance/testDiscussionParser.php", - "UpdateEchoSchemaForSuppression": "maintenance/updateEchoSchemaForSuppression.php" + "UpdateEchoSchemaForSuppression": "maintenance/updateEchoSchemaForSuppression.php", + "EchoUpdatePerUserBlacklist": "maintenance/updatePerUserBlacklist.php" } } diff --git a/includes/ContainmentSet.php b/includes/ContainmentSet.php index 4b6ce1f..d5cfff5 100644 --- a/includes/ContainmentSet.php +++ b/includes/ContainmentSet.php @@ -71,12 +71,12 @@ * @param string $preferenceName */ public function addFromUserOption( $preferenceName ) { - $preference = $this->recipient->getOption( $preferenceName ); + $preference = $this->recipient->getOption( $preferenceName, [] ); if ( $preference ) { - $items =
[MediaWiki-commits] [Gerrit] mediawiki...Collection[master]: Testdonotmerge
Jdlrobson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383175 ) Change subject: Testdonotmerge .. Testdonotmerge Change-Id: Idf6a2df409faaf8b3039fef63f80724a2e1ac473 --- R tests/phpunit/BookRendererTest.php R tests/phpunit/DataProviderTest.php R tests/phpunit/HeadingCounterTest.php 3 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection refs/changes/75/383175/1 diff --git a/tests/phpunit/includes/BookRendererTest.php b/tests/phpunit/BookRendererTest.php similarity index 100% rename from tests/phpunit/includes/BookRendererTest.php rename to tests/phpunit/BookRendererTest.php diff --git a/tests/phpunit/includes/DataProviderTest.php b/tests/phpunit/DataProviderTest.php similarity index 100% rename from tests/phpunit/includes/DataProviderTest.php rename to tests/phpunit/DataProviderTest.php diff --git a/tests/phpunit/includes/HeadingCounterTest.php b/tests/phpunit/HeadingCounterTest.php similarity index 100% rename from tests/phpunit/includes/HeadingCounterTest.php rename to tests/phpunit/HeadingCounterTest.php -- To view, visit https://gerrit.wikimedia.org/r/383175 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idf6a2df409faaf8b3039fef63f80724a2e1ac473 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Collection 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/mediawiki-config[master]: Enable new print styles on Vector
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/383170 ) Change subject: Enable new print styles on Vector .. Enable new print styles on Vector Bug: T169732 Change-Id: I085f711f78a93b9d7dc327a09a3b65fd8a991c16 --- M wmf-config/CommonSettings.php M wmf-config/InitialiseSettings.php 2 files changed, 13 insertions(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index c932ae9..0dc18ce 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -650,6 +650,14 @@ wfLoadSkin( 'Timeless' ); // T154371 } +// The Print logo for Vector should use the same wordmark as Minerva +// This avoids duplicate config entries (T169732) +$wgVectorPrintLogo = [ + 'width' => $wgMinervaCustomLogos['copyright-width'], + 'height' => $wgMinervaCustomLogos['copyright-height'], + 'url' => $wgMinervaCustomLogos['copyright'], +]; + // Grants and rights // Note these have to be visible on all wikis, not just the ones the // extension is enabled on, for proper display in OAuth pages and such. diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 46b4de6..f7a217a 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -7176,6 +7176,11 @@ 'nostalgiawiki' => 'nostalgia', ], +// T169732 +'wgVectorExperimentalPrintStyles' => [ + 'default' => true, +], + 'wgVectorResponsive' => [ 'default' => false, 'testwiki' => true, -- To view, visit https://gerrit.wikimedia.org/r/383170 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I085f711f78a93b9d7dc327a09a3b65fd8a991c16 Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: JdlrobsonGerrit-Reviewer: Hashar Gerrit-Reviewer: Urbanecm Gerrit-Reviewer: Zoranzoki21 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]: Add option to hide missing pages while searching
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383174 ) Change subject: Add option to hide missing pages while searching .. Add option to hide missing pages while searching Bug: T177469 Change-Id: I9e7dd451c61a6a88679628acbbf28d45c0a1e0e8 --- M resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js 1 file changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/74/383174/1 diff --git a/resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js b/resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js index db56bd3..35a8591 100644 --- a/resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js +++ b/resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js @@ -32,7 +32,8 @@ // Config initialization config = $.extend( { maxLength: 255, - limit: 10 + limit: 10, + showMissing: true }, config ); // Properties @@ -44,6 +45,7 @@ this.showRedirectTargets = config.showRedirectTargets !== false; this.showImages = !!config.showImages; this.showDescriptions = !!config.showDescriptions; + this.showMissing = !!config.showMissing; this.excludeCurrentPage = !!config.excludeCurrentPage; this.validateTitle = config.validateTitle !== undefined ? config.validateTitle : true; this.cache = config.cache; @@ -227,6 +229,9 @@ for ( index in data.pages ) { suggestionPage = data.pages[ index ]; + if ( !this.showMissing && suggestionPage.missing !== undefined ) { + continue; + } // When excludeCurrentPage is set, don't list the current page unless the user has type the full title if ( this.excludeCurrentPage && suggestionPage.title === currentPageName && suggestionPage.title !== titleObj.getPrefixedText() ) { continue; -- To view, visit https://gerrit.wikimedia.org/r/383174 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9e7dd451c61a6a88679628acbbf28d45c0a1e0e8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Petar.petkovic___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Echo[wmf/1.31.0-wmf.2]: Reapply "Use User Ids instead of User Names for Echo Mute""
Hello Thcipriani, jenkins-bot, Dbarratt, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/383173 to review the following change. Change subject: Reapply "Use User Ids instead of User Names for Echo Mute"" .. Reapply "Use User Ids instead of User Names for Echo Mute"" This reverts commit 0bd54ee5386a6e55a77c6b6e5ec6654ad1c369f7. Change-Id: Ia97b0629cc92022b2539e33caa0b68ab3d1fdcd2 --- M Hooks.php M extension.json M includes/ContainmentSet.php A maintenance/updatePerUserBlacklist.php 4 files changed, 131 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/73/383173/1 diff --git a/Hooks.php b/Hooks.php index 8e3db35..4a7c06a 100644 --- a/Hooks.php +++ b/Hooks.php @@ -490,10 +490,15 @@ } if ( $wgEchoPerUserBlacklist ) { + $lookup = CentralIdLookup::factory(); + $ids = $user->getOption( 'echo-notifications-blacklist', [] ); + $names = $ids ? $lookup->namesFromCentralIds( $ids, $user ) : []; + $preferences['echo-notifications-blacklist'] = [ 'type' => 'usersmultiselect', 'label-message' => 'echo-pref-notifications-blacklist', 'section' => 'echo/blocknotificationslist', + 'default' => implode( "\n", $names ) ]; } @@ -1252,6 +1257,10 @@ $options['echo-subscriptions-email-edit-user-talk'] = $options['enotifusertalkpages']; } + if ( isset( $options['echo-notifications-blacklist'] ) ) { + $options['echo-notifications-blacklist'] = array_map( 'intval', explode( "\n", $options['echo-notifications-blacklist'] ) ); + } + return true; } @@ -1270,6 +1279,28 @@ unset( $options['echo-subscriptions-email-edit-user-talk'] ); } + // Convert usernames to ids. + if ( isset( $options['echo-notifications-blacklist'] ) ) { + if ( $options['echo-notifications-blacklist'] ) { + $value = $options['echo-notifications-blacklist']; + // Notification Blacklist may be an array of ids or a string of new line + // delimnated user names. + if ( is_array( $value ) ) { + $ids = array_filter( $value, 'is_numeric' ); + } else { + $lookup = CentralIdLookup::factory(); + $names = explode( "\n", $value ); + $ids = $lookup->centralIdsFromNames( $names, $user ); + } + + $user->setOption( 'echo-notifications-blacklist', $ids ); + $options['echo-notifications-blacklist'] = implode( "\n", $user->getOption( 'echo-notifications-blacklist' ) ); + } else { + // If the blacklist is empty, set it to null rather than an empty string. + $options['echo-notifications-blacklist'] = null; + } + } + return true; } diff --git a/extension.json b/extension.json index 39606db..dc21551 100644 --- a/extension.json +++ b/extension.json @@ -1019,6 +1019,7 @@ "SpecialNotificationsMarkRead": "includes/special/SpecialNotificationsMarkRead.php", "SuppressionMaintenanceTest": "tests/phpunit/maintenance/SupressionMaintenanceTest.php", "TestDiscussionParser": "maintenance/testDiscussionParser.php", - "UpdateEchoSchemaForSuppression": "maintenance/updateEchoSchemaForSuppression.php" + "UpdateEchoSchemaForSuppression": "maintenance/updateEchoSchemaForSuppression.php", + "EchoUpdatePerUserBlacklist": "maintenance/updatePerUserBlacklist.php" } } diff --git a/includes/ContainmentSet.php b/includes/ContainmentSet.php index 4b6ce1f..d5cfff5 100644 --- a/includes/ContainmentSet.php +++ b/includes/ContainmentSet.php @@ -71,12 +71,12 @@ * @param string $preferenceName */ public function addFromUserOption( $preferenceName ) { - $preference = $this->recipient->getOption( $preferenceName ); + $preference = $this->recipient->getOption( $preferenceName, [] ); if ( $preference ) { - $items = explode( "\n", $preference ); - - $this->addArray( $items ); +
[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Pass contact_id and contact_hash when both given
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382844 ) Change subject: Pass contact_id and contact_hash when both given .. Pass contact_id and contact_hash when both given Don't pass contact_id if the hash is not also given. Bug: T177663 Change-Id: Icf707bdf9f6ea8dff0697e23f1ec59cb491e6348 --- M gateway_common/DonationData.php M gateway_common/gateway.adapter.php M tests/phpunit/Adapter/GatewayAdapterTest.php 3 files changed, 115 insertions(+), 11 deletions(-) Approvals: Mepps: Looks good to me, approved jenkins-bot: Verified diff --git a/gateway_common/DonationData.php b/gateway_common/DonationData.php index d57b470..b53579a 100644 --- a/gateway_common/DonationData.php +++ b/gateway_common/DonationData.php @@ -42,6 +42,8 @@ 'amountGiven', 'amountOther', 'appeal', + 'contact_id', + 'contact_hash', 'email', // @deprecated 'emailAdd', @@ -950,6 +952,8 @@ */ public static function getRetryFields() { $fields = array( + 'contact_id', + 'contact_hash', 'gateway', 'country', 'currency', diff --git a/gateway_common/gateway.adapter.php b/gateway_common/gateway.adapter.php index 405af61..f76efd5 100644 --- a/gateway_common/gateway.adapter.php +++ b/gateway_common/gateway.adapter.php @@ -1829,9 +1829,28 @@ // FIXME: Note that we're not using any existing date or ts fields. Why is that? $queueMessage['date'] = time(); + $queueMessage = $this->addContactMessageFields( $queueMessage ); return $queueMessage; } + /** +* IMPORTANT: only add the contact_id to a message if the contact_hash +* is preset. We don't want to allow overwriting arbitrary CiviCRM +* contacts. +* +* @param array $message +* @return array +*/ + protected function addContactMessageFields( $message ) { + $contactId = $this->getData_Unstaged_Escaped( 'contact_id' ); + $contactHash = $this->getData_Unstaged_Escaped( 'contact_hash' ); + if ( $contactId && $contactHash ) { + $message['contact_id'] = $contactId; + $message['contact_hash'] = $contactHash; + } + return $message; + } + public function addStandardMessageFields( $transaction ) { // basically, add all the stuff we have come to take for granted, because syslog. $transaction['gateway_txn_id'] = $this->getTransactionGatewayTxnId(); diff --git a/tests/phpunit/Adapter/GatewayAdapterTest.php b/tests/phpunit/Adapter/GatewayAdapterTest.php index d8acd3c..697e02f 100644 --- a/tests/phpunit/Adapter/GatewayAdapterTest.php +++ b/tests/phpunit/Adapter/GatewayAdapterTest.php @@ -37,17 +37,6 @@ */ class DonationInterface_Adapter_GatewayAdapterTest extends DonationInterfaceTestCase { - /** -* @param $name string The name of the test case -* @param $data array Any parameters read from a dataProvider -* @param $dataName string|int The name or index of the data set -*/ - public function __construct( $name = null, array $data = array(), $dataName = '' ) { - global $wgDonationInterfaceTest; - $wgDonationInterfaceTest = true; - parent::__construct( $name, $data, $dataName ); - } - public function setUp() { parent::setUp(); @@ -476,4 +465,96 @@ $is_rectified = $gateway->rectifyOrphan(); $this->assertEquals( PaymentResult::newEmpty(), $is_rectified, 'rectifyOrphan did not return empty PaymentResult' ); } + + public function testGetDonationQueueMessage() { + $data = $this->getDonorTestData( 'FR' ); + $gateway = $this->getFreshGatewayObject( $data ); + $exposed = TestingAccessWrapper::newFromObject( $gateway ); + $message = $exposed->getQueueDonationMessage(); + $expected = array_intersect_key( $data, array_flip( DonationData::getMessageFields() ) ); + $expected += array( + 'gateway_txn_id' => false, + 'response' => false, + 'gateway_account' => 'test', + 'fee' => 0, + 'contribution_tracking_id' => $exposed->getData_Unstaged_Escaped( 'contribution_tracking_id' ), + 'utm_source' => '..', + 'email' => '', + 'gateway' => $gateway::getIdentifier(), + 'order_id' =>
[MediaWiki-commits] [Gerrit] analytics/refinery[master]: Fix druid datasources for proj-family uniques jobs
Joal has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383172 ) Change subject: Fix druid datasources for proj-family uniques jobs .. Fix druid datasources for proj-family uniques jobs Update the per-project-family datasource names to only contain hyphens Bug: T175162 Change-Id: Iabba15d6f1a7559404e29035f5fed6d6b06d550c --- M oozie/unique_devices/per_project_family/druid/daily/load_unique_devices_per_project_family_daily.json.template M oozie/unique_devices/per_project_family/druid/monthly/load_unique_devices_per_project_family_monthly.json.template 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/refinery refs/changes/72/383172/1 diff --git a/oozie/unique_devices/per_project_family/druid/daily/load_unique_devices_per_project_family_daily.json.template b/oozie/unique_devices/per_project_family/druid/daily/load_unique_devices_per_project_family_daily.json.template index 937db12..356d3f3 100644 --- a/oozie/unique_devices/per_project_family/druid/daily/load_unique_devices_per_project_family_daily.json.template +++ b/oozie/unique_devices/per_project_family/druid/daily/load_unique_devices_per_project_family_daily.json.template @@ -9,7 +9,7 @@ } }, "dataSchema" : { - "dataSource" : "unique-devices-per_project_family-daily", + "dataSource" : "unique-devices-per-project-family-daily", "granularitySpec" : { "type" : "uniform", "segmentGranularity" : "day", diff --git a/oozie/unique_devices/per_project_family/druid/monthly/load_unique_devices_per_project_family_monthly.json.template b/oozie/unique_devices/per_project_family/druid/monthly/load_unique_devices_per_project_family_monthly.json.template index a75633d..877deaf 100644 --- a/oozie/unique_devices/per_project_family/druid/monthly/load_unique_devices_per_project_family_monthly.json.template +++ b/oozie/unique_devices/per_project_family/druid/monthly/load_unique_devices_per_project_family_monthly.json.template @@ -9,7 +9,7 @@ } }, "dataSchema" : { - "dataSource" : "unique-devices-per_project_family-monthly", + "dataSource" : "unique-devices-per-project-family-monthly", "granularitySpec" : { "type" : "uniform", "segmentGranularity" : "month", -- To view, visit https://gerrit.wikimedia.org/r/383172 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iabba15d6f1a7559404e29035f5fed6d6b06d550c Gerrit-PatchSet: 1 Gerrit-Project: analytics/refinery Gerrit-Branch: master Gerrit-Owner: Joal___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] analytics/refinery[master]: Fix oozie jobs loading druid proj-family uniques
Nuria has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/383171 ) Change subject: Fix oozie jobs loading druid proj-family uniques .. Fix oozie jobs loading druid proj-family uniques This removes 'wikimedia' project family from being loaded in druid for per-project-family datasource, as it is different in nature from other families (see associated task for details). Bug: T174640 Change-Id: I8a0a113a1696219624fdfe816a00414fb09bbb3f --- M oozie/unique_devices/per_project_family/druid/daily/generate_druid_unique_devices_per_project_family_daily.hql M oozie/unique_devices/per_project_family/druid/monthly/generate_druid_unique_devices_per_project_family_monthly.hql 2 files changed, 4 insertions(+), 2 deletions(-) Approvals: Nuria: Verified; Looks good to me, approved diff --git a/oozie/unique_devices/per_project_family/druid/daily/generate_druid_unique_devices_per_project_family_daily.hql b/oozie/unique_devices/per_project_family/druid/daily/generate_druid_unique_devices_per_project_family_daily.hql index a3eb92b..6bc703b 100644 --- a/oozie/unique_devices/per_project_family/druid/daily/generate_druid_unique_devices_per_project_family_daily.hql +++ b/oozie/unique_devices/per_project_family/druid/daily/generate_druid_unique_devices_per_project_family_daily.hql @@ -49,7 +49,8 @@ FROM ${source_table} WHERE year = ${year} AND month = ${month} -AND day = ${day}; +AND day = ${day} +AND project_family != 'wikimedia'; DROP TABLE IF EXISTS tmp_druid_unique_devices_per_project_family_daily_${year}_${month}_${day}; diff --git a/oozie/unique_devices/per_project_family/druid/monthly/generate_druid_unique_devices_per_project_family_monthly.hql b/oozie/unique_devices/per_project_family/druid/monthly/generate_druid_unique_devices_per_project_family_monthly.hql index 75371db..1d85ceb 100644 --- a/oozie/unique_devices/per_project_family/druid/monthly/generate_druid_unique_devices_per_project_family_monthly.hql +++ b/oozie/unique_devices/per_project_family/druid/monthly/generate_druid_unique_devices_per_project_family_monthly.hql @@ -46,7 +46,8 @@ uniques_estimate AS uniques_estimate FROM ${source_table} WHERE year = ${year} -AND month = ${month}; +AND month = ${month} +AND project_family != 'wikimedia'; DROP TABLE IF EXISTS tmp_druid_unique_devices_per_project_family_monthly_${year}_${month}; -- To view, visit https://gerrit.wikimedia.org/r/383171 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8a0a113a1696219624fdfe816a00414fb09bbb3f Gerrit-PatchSet: 1 Gerrit-Project: analytics/refinery Gerrit-Branch: master Gerrit-Owner: JoalGerrit-Reviewer: Nuria Gerrit-Reviewer: Ottomata ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Enable NewUserMessage for SUL accounts too on hi.wikiversity
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382964 ) Change subject: Enable NewUserMessage for SUL accounts too on hi.wikiversity .. Enable NewUserMessage for SUL accounts too on hi.wikiversity Bug: T177690 Change-Id: I23413329e01dd5c8e7f04c90fc697b4b8fafc692 --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified Zoranzoki21: Looks good to me, but someone else must approve diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 049e1db..46b4de6 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -12816,6 +12816,7 @@ 'guwikisource' => true, // T42872 'hiwiki' => true, 'hiwikiquote' => true, // T133775 + 'hiwikiversity' => true, // T177690 'hifwiki' => true, // T99824 'incubatorwiki' => true, 'kkwiki' => true, // T149563 -- To view, visit https://gerrit.wikimedia.org/r/382964 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I23413329e01dd5c8e7f04c90fc697b4b8fafc692 Gerrit-PatchSet: 5 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Jayprakash12345 <0freerunn...@gmail.com> Gerrit-Reviewer: DerecksonGerrit-Reviewer: Hashar Gerrit-Reviewer: MarcoAurelio Gerrit-Reviewer: Urbanecm Gerrit-Reviewer: Zoranzoki21 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]: Enable NewUserMessage for SUL accounts too on dty.wiki
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382960 ) Change subject: Enable NewUserMessage for SUL accounts too on dty.wiki .. Enable NewUserMessage for SUL accounts too on dty.wiki Bug: T177688 Change-Id: I6d778d55781d7e3cdebd90e2b10d08ff7a34d12e --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified Zoranzoki21: Looks good to me, but someone else must approve diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 246707f..049e1db 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -12804,6 +12804,7 @@ 'arwikisource' => true, 'bhwiki' => true, // T97920 'commonswiki' => true, + 'dtywiki' => true, // T177688 'enwikinews' => true, 'fawikibooks' => true, // T91861 'fawikinews' => true, -- To view, visit https://gerrit.wikimedia.org/r/382960 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6d778d55781d7e3cdebd90e2b10d08ff7a34d12e Gerrit-PatchSet: 5 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Jayprakash12345 <0freerunn...@gmail.com> Gerrit-Reviewer: DerecksonGerrit-Reviewer: Hashar Gerrit-Reviewer: MarcoAurelio Gerrit-Reviewer: Urbanecm Gerrit-Reviewer: Zoranzoki21 Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Introduce mw.wikibase.getLabelByLang
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/383043 ) Change subject: Introduce mw.wikibase.getLabelByLang .. Introduce mw.wikibase.getLabelByLang Implementation is in WikibaseLanguageIndependentLuaBindings because the function does not depend on the content/ user language, but the language is explicitely passed in. Bug: T173262 Change-Id: I573afbb6fd5384af4dc7e9b921d26cd379e87a0b --- M client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php M client/includes/DataAccess/Scribunto/WikibaseLanguageIndependentLuaBindings.php M client/includes/DataAccess/Scribunto/mw.wikibase.lua M client/tests/phpunit/includes/DataAccess/Scribunto/LuaWikibaseLibraryTests.lua M client/tests/phpunit/includes/DataAccess/Scribunto/WikibaseLanguageIndependentLuaBindingsTest.php M docs/lua.wiki 6 files changed, 215 insertions(+), 1 deletion(-) Approvals: jenkins-bot: Verified Thiemo Mättig (WMDE): Looks good to me, approved diff --git a/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php b/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php index ffbe1fd..2a181f3 100644 --- a/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php +++ b/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php @@ -270,6 +270,9 @@ $wikibaseClient->getStore()->getSiteLinkLookup(), $wikibaseClient->getSettings(), $this->getUsageAccumulator(), + $this->getEntityIdParser(), + $wikibaseClient->getTermLookup(), + $wikibaseClient->getTermsLanguages(), $wikibaseClient->getSettings()->getSetting( 'siteGlobalID' ) ); } @@ -296,6 +299,7 @@ // these can't be called from user code, unless explicitly exposed in Lua. $lib = [ 'getLabel' => [ $this, 'getLabel' ], + 'getLabelByLanguage' => [ $this, 'getLabelByLanguage' ], 'getEntity' => [ $this, 'getEntity' ], 'getEntityStatements' => [ $this, 'getEntityStatements' ], 'getSetting' => [ $this, 'getSetting' ], @@ -447,6 +451,21 @@ } /** +* Wrapper for getLabelByLanguage in WikibaseLanguageIndependentLuaBindings +* +* @param string $prefixedEntityId +* @param string $languageCode +* +* @return string[]|null[] +*/ + public function getLabelByLanguage( $prefixedEntityId, $languageCode ) { + $this->checkType( 'getLabelByLanguage', 1, $prefixedEntityId, 'string' ); + $this->checkType( 'getLabelByLanguage', 2, $languageCode, 'string' ); + + return [ $this->getLanguageIndependentLuaBindings()->getLabelByLanguage( $prefixedEntityId, $languageCode ) ]; + } + + /** * Wrapper for getDescription in Scribunto_LuaWikibaseLibraryImplementation * * @param string $prefixedEntityId diff --git a/client/includes/DataAccess/Scribunto/WikibaseLanguageIndependentLuaBindings.php b/client/includes/DataAccess/Scribunto/WikibaseLanguageIndependentLuaBindings.php index 78295b7..9f999c3 100644 --- a/client/includes/DataAccess/Scribunto/WikibaseLanguageIndependentLuaBindings.php +++ b/client/includes/DataAccess/Scribunto/WikibaseLanguageIndependentLuaBindings.php @@ -4,8 +4,13 @@ use InvalidArgumentException; use Wikibase\Client\Usage\UsageAccumulator; +use Wikibase\DataModel\Entity\EntityIdParser; +use Wikibase\DataModel\Entity\EntityIdParsingException; use Wikibase\DataModel\Entity\ItemId; use Wikibase\DataModel\SiteLink; +use Wikibase\DataModel\Services\Lookup\TermLookup; +use Wikibase\DataModel\Services\Lookup\TermLookupException; +use Wikibase\Lib\ContentLanguages; use Wikibase\Lib\Store\SiteLinkLookup; use Wikibase\SettingsArray; @@ -37,6 +42,21 @@ private $usageAccumulator; /** +* @var EntityIdParser +*/ + private $entityIdParser; + + /** +* @var TermLookup +*/ + private $termLookup; + + /** +* @var ContentLanguages +*/ + private $termsLanguages; + + /** * @var string */ private $siteId; @@ -44,18 +64,27 @@ /** * @param SiteLinkLookup $siteLinkLookup * @param SettingsArray $settings -* @param UsageAccumulator $usageAccumulator for tracking title usage via getEntityId. +* @param UsageAccumulator $usageAccumulator +* @param EntityIdParser $entityIdParser +* @param TermLookup $termLookup +* @param ContentLanguages $termsLanguages * @param string $siteId */ public function __construct(
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Add autopatrolled user group to sd.wikipedia
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382934 ) Change subject: Add autopatrolled user group to sd.wikipedia .. Add autopatrolled user group to sd.wikipedia Bug: T177141 Change-Id: I536996e2f49a925b241948cef289eef0f2fe5c5b --- M wmf-config/InitialiseSettings.php 1 file changed, 9 insertions(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified Zoranzoki21: Looks good to me, but someone else must approve diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 3638a1d..246707f 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -9276,6 +9276,9 @@ 'autopatrolled' => [ 'autopatrol' => true, ], 'flood' => [ 'bot' => true, ], // T111753 ], + '+sdwiki' => [ + 'autopatrolled' => [ 'autopatrol' => true ], // T177141 + ], '+sewikimedia' => [ '*' => [ 'edit' => false, @@ -10288,6 +10291,9 @@ '+scowiki' => [ 'sysop' => [ 'rollbacker', 'autopatrolled', 'flood', ] // T111753 ], + '+sdwiki' => [ + 'sysop' => [ 'autopatrolled' ], // T177141 + ], '+sewikimedia' => [ 'bureaucrat' => [ 'medlem' ], 'sysop' => [ 'medlem' ], @@ -11051,6 +11057,9 @@ '+scowiki' => [ 'sysop' => [ 'rollbacker', 'autopatrolled', 'flood', ] // T111753 ], + '+sdwiki' => [ + 'sysop' => [ 'autopatrolled' ], // T177141 + ], '+sewikimedia' => [ 'bureaucrat' => [ 'sysop', 'bureaucrat', 'medlem' ], ], -- To view, visit https://gerrit.wikimedia.org/r/382934 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I536996e2f49a925b241948cef289eef0f2fe5c5b Gerrit-PatchSet: 5 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Jayprakash12345 <0freerunn...@gmail.com> Gerrit-Reviewer: DerecksonGerrit-Reviewer: Hashar Gerrit-Reviewer: MarcoAurelio Gerrit-Reviewer: Urbanecm Gerrit-Reviewer: Zoranzoki21 Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] analytics/refinery[master]: Fix oozie jobs loading druid proj-family uniques
Joal has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383171 ) Change subject: Fix oozie jobs loading druid proj-family uniques .. Fix oozie jobs loading druid proj-family uniques This removes 'wikimedia' project family from being loaded in druid for per-project-family datasource, as it is different in nature from other families (see associated task for details). Bug: T174640 Change-Id: I8a0a113a1696219624fdfe816a00414fb09bbb3f --- M oozie/unique_devices/per_project_family/druid/daily/generate_druid_unique_devices_per_project_family_daily.hql M oozie/unique_devices/per_project_family/druid/monthly/generate_druid_unique_devices_per_project_family_monthly.hql 2 files changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/refinery refs/changes/71/383171/1 diff --git a/oozie/unique_devices/per_project_family/druid/daily/generate_druid_unique_devices_per_project_family_daily.hql b/oozie/unique_devices/per_project_family/druid/daily/generate_druid_unique_devices_per_project_family_daily.hql index a3eb92b..6bc703b 100644 --- a/oozie/unique_devices/per_project_family/druid/daily/generate_druid_unique_devices_per_project_family_daily.hql +++ b/oozie/unique_devices/per_project_family/druid/daily/generate_druid_unique_devices_per_project_family_daily.hql @@ -49,7 +49,8 @@ FROM ${source_table} WHERE year = ${year} AND month = ${month} -AND day = ${day}; +AND day = ${day} +AND project_family != 'wikimedia'; DROP TABLE IF EXISTS tmp_druid_unique_devices_per_project_family_daily_${year}_${month}_${day}; diff --git a/oozie/unique_devices/per_project_family/druid/monthly/generate_druid_unique_devices_per_project_family_monthly.hql b/oozie/unique_devices/per_project_family/druid/monthly/generate_druid_unique_devices_per_project_family_monthly.hql index 75371db..1d85ceb 100644 --- a/oozie/unique_devices/per_project_family/druid/monthly/generate_druid_unique_devices_per_project_family_monthly.hql +++ b/oozie/unique_devices/per_project_family/druid/monthly/generate_druid_unique_devices_per_project_family_monthly.hql @@ -46,7 +46,8 @@ uniques_estimate AS uniques_estimate FROM ${source_table} WHERE year = ${year} -AND month = ${month}; +AND month = ${month} +AND project_family != 'wikimedia'; DROP TABLE IF EXISTS tmp_druid_unique_devices_per_project_family_monthly_${year}_${month}; -- To view, visit https://gerrit.wikimedia.org/r/383171 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8a0a113a1696219624fdfe816a00414fb09bbb3f Gerrit-PatchSet: 1 Gerrit-Project: analytics/refinery Gerrit-Branch: master Gerrit-Owner: Joal___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CheckUser[master]: CheckUser "contributions" link should be a red link for non-...
Huji has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/380420 ) Change subject: CheckUser "contributions" link should be a red link for non-existent accounts .. CheckUser "contributions" link should be a red link for non-existent accounts In Special:CheckUser, when a user had tried create and account while this was prevented by abusefilter, his or her "contributions" link was still blue instead of a red link (as if that user actually exists). The patch add takes advantage of the existing yet unsued css class .mw-anonuserlink, and turn the link to red. Bug: T170507 Change-Id: I669affa176f6c5b0dbf61ac3ca4e77a4fb6eb3e5 --- M i18n/en.json M i18n/qqq.json M specials/SpecialCheckUser.php 3 files changed, 50 insertions(+), 9 deletions(-) Approvals: Huji: Looks good to me, approved jenkins-bot: Verified diff --git a/i18n/en.json b/i18n/en.json index ce5d335..cfe7fe9 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -81,8 +81,7 @@ "checkuser-create-action": "was created", "checkuser-email-action": "sent an email to user \"$1\"", "checkuser-reset-action": "reset password for user \"$1\"", - "checkuser-userlinks-ip": "([[User_talk:$1|talk]] | [[Special:Contributions/$1|contribs]] | [[Special:Block/$1|block]] | [https://www.robtex.com/whois/$1.html WHOIS/RDNS])", - "checkuser-userlinks": "([[User_talk:$1|talk]] | [[Special:Contributions/$1|contribs]] | [[Special:Block/$1|block]])", + "checkuser-userlinks-ip": "([https://www.robtex.com/whois/$1.html WHOIS/RDNS])", "checkuser-toollinks": "[[https://www.robtex.com/whois/$1.html WHOIS/RDNS] ·\n[https://www.robtex.com/rbls/$1.html RBLs] ·\n[http://www.dnsstuff.com/tools/tracert.ch?ip=$1 Traceroute] ·\n[https://www.ip2location.com/$1 Geolocate] ·\n[https://www.dan.me.uk/torcheck?ip=$1 Tor check]]", "checkuser-token-fail": "Session failure. Please try again.", "group-checkuser.css": "/* CSS placed here will affect checkuser only */", diff --git a/i18n/qqq.json b/i18n/qqq.json index a80836a..4a5a710 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -104,7 +104,6 @@ "checkuser-email-action": "Logged text when a user sends an e-mail. Probably preceded by the name of the checkuser.\n\nParameters:\n* $1 - a salted MD5 hash for the user an email was sent to", "checkuser-reset-action": "Logged text when a user resets a password. Parameters:\n* $1 - the username for which the password was reset. Can be used for GENDER.", "checkuser-userlinks-ip": "Links shown next to an IP address in a CheckUser result entry. $1 - IP address\n\nSee also:\n*{{msg-mw|Signature}}\n*{{msg-mw|Checkuser-userlinks}}", - "checkuser-userlinks": "Links shown next to a user in a CheckUser result entry. $1 - Name of user\n\nSee also:\n*{{msg-mw|Signature}}\n*{{msg-mw|Checkuser-userlinks-ip}}", "checkuser-toollinks": "{{notranslate}}\nParameters:\n* $1 - IP address", "checkuser-token-fail": "Error message shown when the CSRF token does not match the current session.", "group-checkuser.css": "{{doc-group|checkuser|css}}", diff --git a/specials/SpecialCheckUser.php b/specials/SpecialCheckUser.php index 135d825..cee2dd2 100644 --- a/specials/SpecialCheckUser.php +++ b/specials/SpecialCheckUser.php @@ -1074,12 +1074,34 @@ $s .= ''; $s .= Xml::check( 'users[]', false, [ 'value' => $name ] ) . ''; // Load user object - $user = User::newFromName( $name, false ); + $usernfn = User::newFromName( $name, false ); // Add user page and tool links - $s .= Linker::userLink( -1, $name ) . ' '; + if ( !IP::isIPAddress( $usernfn ) ) { + $idforlinknfn = -1; + } else { + $idforlinknfn = $users_ids[$name]; + } + $user = User::newFromId( $users_ids[$name] ); + $classnouser = false; + if ( IP::isIPAddress( $name ) !== IP::isIPAddress( $user ) ) { + // User does not exist + $idforlink = -1; + $classnouser = true; + } else { + $idforlink = $users_ids[$name]; + } + if ( $classnouser === true ) { + $s .= ''; + } else { + $s .= ''; + } +
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "New throttle rule"
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/383150 ) Change subject: Revert "New throttle rule" .. Revert "New throttle rule" This reverts commit 2ea95915f53079488275f493496f1654c97bc590. Change-Id: I6aea645affbfc206cd348799ae4d58d1afc173c2 --- M wmf-config/throttle.php 1 file changed, 0 insertions(+), 8 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/throttle.php b/wmf-config/throttle.php index 06cfbe1..62c29b0 100644 --- a/wmf-config/throttle.php +++ b/wmf-config/throttle.php @@ -28,12 +28,4 @@ # ]; ## Add throttling definitions below. -$wmgThrottlingExceptions[] = [ -'from' => '2017-10-09T10:00 +0:00', -'to' => '2017-10-09T17:00 +0:00', -'IP' => '193.147.222.102', -'dbname' => [ 'cawiki', 'commonswiki' ], -'value' => 180 -]; - ## Add throttling definitions above. -- To view, visit https://gerrit.wikimedia.org/r/383150 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6aea645affbfc206cd348799ae4d58d1afc173c2 Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Zoranzoki21Gerrit-Reviewer: Hashar Gerrit-Reviewer: Urbanecm Gerrit-Reviewer: Zfilipin Gerrit-Reviewer: Zoranzoki21 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]: Enable new print styles on Vector
Jdlrobson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383170 ) Change subject: Enable new print styles on Vector .. Enable new print styles on Vector Bug: T169732 Change-Id: I085f711f78a93b9d7dc327a09a3b65fd8a991c16 --- M wmf-config/CommonSettings.php M wmf-config/InitialiseSettings.php 2 files changed, 13 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/70/383170/1 diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index c932ae9..0dc18ce 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -650,6 +650,14 @@ wfLoadSkin( 'Timeless' ); // T154371 } +// The Print logo for Vector should use the same wordmark as Minerva +// This avoids duplicate config entries (T169732) +$wgVectorPrintLogo = [ + 'width' => $wgMinervaCustomLogos['copyright-width'], + 'height' => $wgMinervaCustomLogos['copyright-height'], + 'url' => $wgMinervaCustomLogos['copyright'], +]; + // Grants and rights // Note these have to be visible on all wikis, not just the ones the // extension is enabled on, for proper display in OAuth pages and such. diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 3638a1d..f742993 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -7176,6 +7176,11 @@ 'nostalgiawiki' => 'nostalgia', ], +// T169732 +'wgVectorExperimentalPrintStyles' => [ + 'default' => true, +], + 'wgVectorResponsive' => [ 'default' => false, 'testwiki' => true, -- To view, visit https://gerrit.wikimedia.org/r/383170 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I085f711f78a93b9d7dc327a09a3b65fd8a991c16 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config 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] mediawiki...Translate[master]: Align near colors to WCAG conforming ones
VolkerE has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383169 ) Change subject: Align near colors to WCAG conforming ones .. Align near colors to WCAG conforming ones Aligning near text colors of subtle elements to WCAG conforming ones of WikimediaUI palette. Change-Id: I397f028e4161c2ca91d7cf51499a704ece535e06 --- M resources/css/ext.translate.editor.css M resources/css/ext.translate.groupselector.css M resources/css/ext.translate.messagetable.less M resources/css/ext.translate.pagemode.css M resources/css/ext.translate.proofread.css M resources/css/ext.translate.special.managetranslatorsandbox.css M resources/css/ext.translate.special.searchtranslations.css M resources/css/ext.translate.special.translate.css M resources/css/ext.translate.special.translationstash.css M resources/css/ext.translate.statsbar.css M resources/css/ext.translate.workflowselector.css 11 files changed, 30 insertions(+), 30 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/69/383169/1 diff --git a/resources/css/ext.translate.editor.css b/resources/css/ext.translate.editor.css index 8313393..e2aeb0f 100644 --- a/resources/css/ext.translate.editor.css +++ b/resources/css/ext.translate.editor.css @@ -130,8 +130,8 @@ } .tux-message-editor .shortcutinfo { + color: #54595d; font-size: 13px; - color: #555; padding: 0 5px 5px 10px; display: none; } @@ -265,7 +265,7 @@ } .in-other-language .language { - color: #565656; + color: #54595d; overflow: hidden; text-overflow: ellipsis; } @@ -352,7 +352,7 @@ .tux-editor-request-right { font-size: 13px; padding: 0 5px; - color: #555; + color: #54595d; } .tux-editor-ask-permission { @@ -413,13 +413,13 @@ } .infocolumn .loading { + color: #54595d; padding: 10px; font-size: 14px; - color: #565656; } .tux-message-tools-menu li a { - color: #555; + color: #54595d; display: block; font-size: 14px; padding: 0 2px; diff --git a/resources/css/ext.translate.groupselector.css b/resources/css/ext.translate.groupselector.css index 9f999dd..a2b5e40 100644 --- a/resources/css/ext.translate.groupselector.css +++ b/resources/css/ext.translate.groupselector.css @@ -143,6 +143,7 @@ } .grid .row .tux-grouplist__item__subgroups { + color: #72777d; position: absolute; /* grid override */ padding: 0 15px 2px 0; /* grid override */ font-weight: normal; @@ -150,6 +151,5 @@ bottom: 0; right: 0; text-align: right; - color: #777; font-size: 10pt; } diff --git a/resources/css/ext.translate.messagetable.less b/resources/css/ext.translate.messagetable.less index 02a85b0..3336d86 100644 --- a/resources/css/ext.translate.messagetable.less +++ b/resources/css/ext.translate.messagetable.less @@ -81,8 +81,8 @@ } .tux-list-translation { + color: #54595d; white-space: nowrap; - color: #565656; padding-left: 5px; text-overflow: ellipsis; unicode-bidi: -webkit-isolate; @@ -117,7 +117,7 @@ } .tux-messagetable-loader { - color: #565656; + color: #54595d; padding: 15px; top: 0; background: #f0f0f0 16px 50%; @@ -267,8 +267,8 @@ } .tux-empty-list-guide { + color: #54595d; font-size: 15px; - color: #565656; padding: 5px 0; } diff --git a/resources/css/ext.translate.pagemode.css b/resources/css/ext.translate.pagemode.css index 6abcc90..fa0982e 100644 --- a/resources/css/ext.translate.pagemode.css +++ b/resources/css/ext.translate.pagemode.css @@ -48,7 +48,7 @@ } .tux-messagelist .tux-message-pagemode .tux-pagemode-source { - color: #555; + color: #54595d; font-size: 16px; line-height: 1.5em; padding-right: 25px; diff --git a/resources/css/ext.translate.proofread.css b/resources/css/ext.translate.proofread.css index 9d031db..bf4bb36 100644 --- a/resources/css/ext.translate.proofread.css +++ b/resources/css/ext.translate.proofread.css @@ -48,7 +48,7 @@ } .tux-messagelist .tux-message-proofread .tux-proofread-source { - color: #555; + color: #54595d; font-size: 16px; line-height: 1.5em; padding-right: 25px; @@ -77,7 +77,7 @@ } .translated-by-self { - color: #777; + color: #72777d; text-align: right; font-size: 12px; margin-right: 5px; @@ -162,8 +162,8 @@ } .tux-proofread-edit-label { + color: #72777d; position: relative; - color: #777; display: inline-block; font-size: 13px; padding-top: 30px; @@ -171,7 +171,7 @@ } .tux-proofread-count { - color: #777; + color: #72777d; font-size: 15px; padding-right: 5px; text-align:
[MediaWiki-commits] [Gerrit] mediawiki...codesniffer[master]: Add sniff for @params instead of @param
Umherirrender has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383168 ) Change subject: Add sniff for @params instead of @param .. Add sniff for @params instead of @param Change-Id: Ide4e4e19633d374c1d5e445ad336601d54e5f6df --- M MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php M MediaWiki/Tests/files/Commenting/commenting_function.php M MediaWiki/Tests/files/Commenting/commenting_function.php.expect 3 files changed, 20 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/codesniffer refs/changes/68/383168/1 diff --git a/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php b/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php index 8bd2db2..60451ba 100644 --- a/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php +++ b/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php @@ -417,9 +417,19 @@ $maxType = 0; $maxVar = 0; foreach ( $tokens[$commentStart]['comment_tags'] as $pos => $tag ) { - if ( $tokens[$tag]['content'] !== '@param' ) { + $tagContent = $tokens[$tag]['content']; + if ( $tagContent !== '@param' && $tagContent !== '@params' ) { continue; } + + if ( $tagContent === '@params' ) { + $error = 'Use @param tag in function comment instead of @params'; + $fix = $phpcsFile->addFixableError( $error, $tag, 'PluralParams' ); + if ( $fix === true ) { + $phpcsFile->fixer->replaceToken( $tag, '@param' ); + } + } + $paramSpace = 0; $type = ''; $typeSpace = 0; diff --git a/MediaWiki/Tests/files/Commenting/commenting_function.php b/MediaWiki/Tests/files/Commenting/commenting_function.php index ffa889a..51a6863 100644 --- a/MediaWiki/Tests/files/Commenting/commenting_function.php +++ b/MediaWiki/Tests/files/Commenting/commenting_function.php @@ -93,8 +93,8 @@ } /** -* @param bool $aBool A bool -* @param int $anInt An int +* @params bool $aBool A bool +* @params int $anInt An int * @returns bool And some text * @throw \Exception * @cover this::testTagTypos() diff --git a/MediaWiki/Tests/files/Commenting/commenting_function.php.expect b/MediaWiki/Tests/files/Commenting/commenting_function.php.expect index a140814..5da4ae2 100644 --- a/MediaWiki/Tests/files/Commenting/commenting_function.php.expect +++ b/MediaWiki/Tests/files/Commenting/commenting_function.php.expect @@ -66,6 +66,12 @@ | | (MediaWiki.Commenting.FunctionComment.SpacingBeforeReturnType) 89 | ERROR | [x] Expected 1 spaces after return type; 4 found | | (MediaWiki.Commenting.FunctionComment.SpacingAfterReturnType) + 96 | ERROR | [x] Use @param tag in function comment instead of + | | @params + | | (MediaWiki.Commenting.FunctionComment.PluralParams) + 97 | ERROR | [x] Use @param tag in function comment instead of + | | @params + | | (MediaWiki.Commenting.FunctionComment.PluralParams) 98 | ERROR | [x] Use @return tag in function comment instead of | | @returns | | (MediaWiki.Commenting.FunctionComment.PluralReturns) @@ -87,4 +93,4 @@ | | (MediaWiki.Files.OneClassPerFile.MultipleFound) 197 | ERROR | [ ] Only one class is allowed in a file | | (MediaWiki.Files.OneClassPerFile.MultipleFound) -PHPCBF CAN FIX THE 32 MARKED SNIFF VIOLATIONS AUTOMATICALLY +PHPCBF CAN FIX THE 34 MARKED SNIFF VIOLATIONS AUTOMATICALLY -- To view, visit https://gerrit.wikimedia.org/r/383168 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ide4e4e19633d374c1d5e445ad336601d54e5f6df Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/codesniffer Gerrit-Branch: master Gerrit-Owner: Umherirrender___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Fix return of Hooks::newArticleCampaign
Umherirrender has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383167 ) Change subject: Fix return of Hooks::newArticleCampaign .. Fix return of Hooks::newArticleCampaign Change-Id: I24ef9b1f3c51f2e3ea7c8379cfd410559029e288 --- M ContentTranslation.hooks.php 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/67/383167/1 diff --git a/ContentTranslation.hooks.php b/ContentTranslation.hooks.php index c611c79..f880cc3 100644 --- a/ContentTranslation.hooks.php +++ b/ContentTranslation.hooks.php @@ -211,7 +211,6 @@ * Hook: EditPage::showEditForm:initial * @param EditPage $newPage * @param OutputPage $out -* @return true */ public static function newArticleCampaign( EditPage $newPage, OutputPage $out ) { global $wgContentTranslationCampaigns, $wgContentTranslationEventLogging; @@ -226,7 +225,7 @@ $user->isAnon() || self::isBetaFeatureEnabled( $user ) ) { - return true; + return; } // If EventLogging integration is enabled, load the event logging functions module -- To view, visit https://gerrit.wikimedia.org/r/383167 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I24ef9b1f3c51f2e3ea7c8379cfd410559029e288 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Umherirrender___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] data-values/value-view[master]: Simplify QUnit assertions a little
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/383117 ) Change subject: Simplify QUnit assertions a little .. Simplify QUnit assertions a little Bug: T177764 Change-Id: I4159ecda6995f430b3dbdbb2593a9b3bb247aab6 --- M tests/lib/jquery.ui/jquery.ui.inputextender.tests.js M tests/lib/jquery/jquery.animateWithEvent.tests.js M tests/src/jquery.valueview.valueview.tests.js 3 files changed, 10 insertions(+), 36 deletions(-) Approvals: Lucas Werkmeister (WMDE): Looks good to me, approved jenkins-bot: Verified diff --git a/tests/lib/jquery.ui/jquery.ui.inputextender.tests.js b/tests/lib/jquery.ui/jquery.ui.inputextender.tests.js index 0970ef0..4bdd11f 100644 --- a/tests/lib/jquery.ui/jquery.ui.inputextender.tests.js +++ b/tests/lib/jquery.ui/jquery.ui.inputextender.tests.js @@ -77,9 +77,7 @@ .fail( function() { deferred.reject(); } ) - .always( function() { - done(); // *1* - } ); + .always( done ); } ); ( callbacks.afterCallingShowExtension || $.noop )( instance ); diff --git a/tests/lib/jquery/jquery.animateWithEvent.tests.js b/tests/lib/jquery/jquery.animateWithEvent.tests.js index d214b94..ec4d332 100644 --- a/tests/lib/jquery/jquery.animateWithEvent.tests.js +++ b/tests/lib/jquery/jquery.animateWithEvent.tests.js @@ -47,10 +47,9 @@ QUnit.test( 'special start callback', function( assert ) { assert.expect( 2 ); - var done = assert.async(); var $elem = $( '' ); - $elem.animateWithEvent( + return $elem.animateWithEvent( 'foopurpose', { width: 200 }, {}, @@ -65,18 +64,15 @@ ); } - ).promise().done( function() { - done(); - } ); + ); } ); QUnit.test( 'options.start callback', function( assert ) { assert.expect( 2 ); var $elem = $( '' ); - var done = assert.async(); var animationEventsAnimation; - $elem.animateWithEvent( + return $elem.animateWithEvent( 'foopurpose', { width: 200 }, { @@ -96,9 +92,7 @@ }, function( animationEvent ) { animationEventsAnimation = animationEvent.animation; } - ).promise().done( function() { - done(); - } ); + ); } ); QUnit.test( 'On jQuery set of multiple elements', function( assert ) { @@ -119,9 +113,7 @@ if ( $confirmedElems.length >= $elems.length ) { done(); } - } ).promise().done( function() { - done(); - } ); + } ).promise().done( done ); assert.ok( $elems.length === $confirmedElems.length diff --git a/tests/src/jquery.valueview.valueview.tests.js b/tests/src/jquery.valueview.valueview.tests.js index 31bc393..2974e50 100644 --- a/tests/src/jquery.valueview.valueview.tests.js +++ b/tests/src/jquery.valueview.valueview.tests.js @@ -125,7 +125,6 @@ QUnit.test( 'getFormattedValue with DOM', function( assert ) { assert.expect( 4 ); - var done = assert.async(); var vvArgs = $.extend( { value: stringValue }, initVv.defaultOpts.vvArgs ); @@ -139,7 +138,7 @@ vvArgs: vvArgs } ); - vvInst.draw() + return vvInst.draw() .done( function() { assert.equal( vvInst.getFormattedValue(), 'FORMATTED VALUE' ); sinon.assert.notCalled( vvArgs.htmlFormatter.format ); @@ -149,19 +148,11 @@ vvArgs.htmlFormatter.format.restore(); vvArgs.plaintextFormatter.format.restore(); vvArgs.parserStore.getParser.restore(); - } ) - .fail( function() { - assert.ok( - false, - 'draw() returned rejected promise.' - ); - } ) - .always( done ); + } ); } ); QUnit.test( 'getFormattedValue without DOM', function( assert ) { assert.expect( 4 ); - var done = assert.async();
[MediaWiki-commits] [Gerrit] mediawiki...TwoColConflict[master]: Show a message when simulate page loaded while BF disabled
Addshore has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383166 ) Change subject: Show a message when simulate page loaded while BF disabled .. Show a message when simulate page loaded while BF disabled Bug: T177758 Change-Id: If1cf779c99ce0f9e8796a35a405af8d98111fe5e --- M i18n/en.json M i18n/qqq.json M includes/SpecialConflictTestPage/SpecialConflictTestPage.php 3 files changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TwoColConflict refs/changes/66/383166/1 diff --git a/i18n/en.json b/i18n/en.json index c3c64b3..895d4ea 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -43,6 +43,7 @@ "twoColConflict-previous-dialog": "Previous", "twoColConflict-next-dialog": "Next", "twoColConflict-close-dialog": "Close", + "twoColConflict-test-needsbeta": "You must enable the 'Two column edit conflict' beta feature in your preferences to use this special page.", "twoColConflict-test-title-label": "Enter the title of a wiki page for which the edit conflict should be simulated:", "twoColConflict-test-title-submit": "Show edit page", "twoColConflict-test-title-not-existing": "There is no page with this title.", diff --git a/i18n/qqq.json b/i18n/qqq.json index 2ce89e0..9163544 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -48,6 +48,7 @@ "twoColConflict-previous-dialog": "Label of the button to go to the previous tutorial slide.\n{{Identical|Previous}}", "twoColConflict-next-dialog": "Label of the button to go to the next tutorial slide.\n{{Identical|Next}}", "twoColConflict-close-dialog": "Label of the button to close the RevisionSlider tutorial.\n{{Identical|Close}}", + "twoColConflict-test-needsbeta": "Error message show on the conflict test page if the beta feature is not enabled.", "twoColConflict-test-title-label": "Label for the conflict test page input box to load an article.", "twoColConflict-test-title-submit": "Submit button on the conflict test page to load an article.", "twoColConflict-test-title-not-existing": "Error message shown on the conflict test page when the submitted title does not exist.", diff --git a/includes/SpecialConflictTestPage/SpecialConflictTestPage.php b/includes/SpecialConflictTestPage/SpecialConflictTestPage.php index 54115fc..3c83c48 100644 --- a/includes/SpecialConflictTestPage/SpecialConflictTestPage.php +++ b/includes/SpecialConflictTestPage/SpecialConflictTestPage.php @@ -19,6 +19,7 @@ */ public function execute( $subPage ) { if ( !$this->isInBetaAndEnabled() ) { + $this->showWarningBox( ( new Message( 'twoColConflict-test-needsbeta' ) )->parse() ); return; } -- To view, visit https://gerrit.wikimedia.org/r/383166 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If1cf779c99ce0f9e8796a35a405af8d98111fe5e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TwoColConflict Gerrit-Branch: master Gerrit-Owner: Addshore___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...MinervaNeue[master]: Hlist tweaks (size and color)
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/383157 ) Change subject: Hlist tweaks (size and color) .. Hlist tweaks (size and color) * Font size should be relative to context * Only apply linkColor to links in footer Bug: T169315 Change-Id: Ibb25d8b63e4efaf8b2bc4c28e3bac95a6a16db86 --- M resources/skins.minerva.base.styles/footer.less M skinStyles/mediawiki.hlist/minerva.less 2 files changed, 8 insertions(+), 2 deletions(-) Approvals: jenkins-bot: Verified Jdlrobson: Looks good to me, approved diff --git a/resources/skins.minerva.base.styles/footer.less b/resources/skins.minerva.base.styles/footer.less index b3739df..51563b0 100644 --- a/resources/skins.minerva.base.styles/footer.less +++ b/resources/skins.minerva.base.styles/footer.less @@ -6,6 +6,13 @@ overflow: auto; padding-bottom: 6px; + // links should be separated by same color + .hlist { + li:after { + color: @linkColor; + } + } + .last-modified-bar { border-bottom: solid 1px @footerBorderColor; background-color: @lastModifiedBarBgColor; diff --git a/skinStyles/mediawiki.hlist/minerva.less b/skinStyles/mediawiki.hlist/minerva.less index d6a0f06..abe6279 100644 --- a/skinStyles/mediawiki.hlist/minerva.less +++ b/skinStyles/mediawiki.hlist/minerva.less @@ -31,8 +31,7 @@ // Make sure we override any site styles content: '•' !important; padding-left: 8px; - color: @linkColor; - font-size: 16px; + font-size: 1em; line-height: 1; } :last-child:after { -- To view, visit https://gerrit.wikimedia.org/r/383157 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibb25d8b63e4efaf8b2bc4c28e3bac95a6a16db86 Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/skins/MinervaNeue Gerrit-Branch: master Gerrit-Owner: JdlrobsonGerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Pmiazga Gerrit-Reviewer: Zoranzoki21 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...WikibaseQualityConstraints[master]: Clarify that entity units need full concept URIs
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/383156 ) Change subject: Clarify that entity units need full concept URIs .. Clarify that entity units need full concept URIs Change-Id: If8e9fa1731bfe087f96627ed4fc4f790974d7b98 --- M extension.json 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: WMDE-leszek: Looks good to me, approved jenkins-bot: Verified diff --git a/extension.json b/extension.json index 24685e4..14ba46e 100644 --- a/extension.json +++ b/extension.json @@ -331,12 +331,12 @@ }, "WBQualityConstraintsYearUnit": { "value": "http://www.wikidata.org/entity/Q577;, - "description": "The unit used for a quantity that represents a difference between two dates, in years.", + "description": "The unit used for a quantity that represents a difference between two dates, in years. Note that for entity units, the full concept URI must be used, not just the entity ID.", "public": true }, "WBQualityConstraintsSecondUnit": { "value": "http://www.wikidata.org/entity/Q11574;, - "description": "The unit used for a quantity that represents a difference between two dates, in seconds.", + "description": "The unit used for a quantity that represents a difference between two dates, in seconds. Note that for entity units, the full concept URI must be used, not just the entity ID.", "public": true } }, -- To view, visit https://gerrit.wikimedia.org/r/383156 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If8e9fa1731bfe087f96627ed4fc4f790974d7b98 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikibaseQualityConstraints Gerrit-Branch: master Gerrit-Owner: Lucas Werkmeister (WMDE)Gerrit-Reviewer: WMDE-leszek 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...WikibaseQualityConstraints[master]: Add support for “year” ranges
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382204 ) Change subject: Add support for “year” ranges .. Add support for “year” ranges RangeCheckerHelper gains support for calculating the difference between two TimeValues in years, instead of in seconds (SI base unit). Sub-year differences are not calculated accurately, but dates within the year are respected: the difference between March and April of the same year is reported as 0.5 years, which is more than 0 years but less than 1 year. ConstraintParameterParser reports an error if exactly one range endpoint has the unit “year” and the other one has a different unit. Since years can’t be converted to another standard time unit, we cannot compare against such a range. DiffWithinRangeChecker checks if the range was specified in years, and if so, has RangeCheckerHelper calculate the difference in years as well instead of in seconds. This requires injecting a Config into DiffWithinRangeChecker so that it knows the “year” unit. Taken together, this adds support for “year” ranges to “difference within range” constraints, e. g. “difference between date of birth and date of death must be within 0 to 150 years”. Without the extra date-within-the-year handling, this would fail to reject items with date of birth after the date of death, but within the same year. And if years were simply converted to 365.2425 days (the average length of a year in the Gregorian calendar), then an item with date of birth January 1st, 1820 and date of death 150 years later to the day would incorrectly be reported as violation because the difference of 54787 days is slightly more than 150×365.2425 days = 54786.3750 days. Bug: T164371 Change-Id: I1b6bdc1a4731e3a98d9de0b0086eae504204b196 --- M i18n/en.json M i18n/qqq.json M includes/ConstraintCheck/Checker/DiffWithinRangeChecker.php M includes/ConstraintCheck/Helper/ConstraintParameterParser.php M includes/ConstraintCheck/Helper/RangeCheckerHelper.php M includes/ConstraintReportFactory.php M tests/phpunit/Checker/RangeChecker/DiffWithinRangeCheckerTest.php M tests/phpunit/Checker/RangeChecker/RangeCheckerHelperTest.php M tests/phpunit/Helper/ConstraintParameterParserTest.php 9 files changed, 281 insertions(+), 15 deletions(-) Approvals: WMDE-leszek: Looks good to me, approved jenkins-bot: Verified diff --git a/i18n/en.json b/i18n/en.json index 7939b0e..31fb2e1 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -108,6 +108,7 @@ "wbqc-violation-message-no-qualifiers": "$1 statements should not have any qualifiers.", "wbqc-violation-message-qualifiers": "$2 is not a valid qualifier for $1 – the only valid {{PLURAL:$3|1=qualifier is $5.|2=qualifiers are $5 and $6.|qualifiers are:$4}}", "wbqc-violation-message-range-parameters-needed": "Properties with values of type \"$1\" with constraint \"$4\" need the parameters \"$2\" and \"$3\".", + "wbqc-violation-message-range-parameters-one-year": "Endpoints of a time-unit range must either both or neither have the unit \"year\" because years cannot be converted losslessly to seconds.", "wbqc-violation-message-range-quantity-closed": "The value for $1 ($2) should be between $3 and $4 ([$3; $4]).", "wbqc-violation-message-range-quantity-leftopen": "The value for $1 ($2) should be no more than $3 ((−∞; $3]).", "wbqc-violation-message-range-quantity-rightopen": "The value for $1 ($2) should be no less than $3 ([$3; ∞)).", diff --git a/i18n/qqq.json b/i18n/qqq.json index 8575536..717d402 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -104,6 +104,7 @@ "wbqc-violation-message-no-qualifiers": "Message for a violation of the “Qualifiers” constraint, when a statement has a qualifier but the property has no permitted qualifiers. This is a special case of {{msg-mw|wbqc-violation-message-qualifiers}}. Parameters:\n* $1 is the qualifier property that is not permitted.\n{{Related|wbqc-violation-message-qualifiers}}", "wbqc-violation-message-qualifiers": "Message for a violation of the “Qualifiers” constraint, when a statement has a qualifier that is not permitted. Parameters:\n* $1 is the property of the statement.\n* $2 is the qualifier property that is not permitted.\n* $3 is the number of permitted qualifiers. (This number is always greater than zero, since the special case of no permitted qualifiers is handled by the separate message {{msg-mw|wbqc-violation-message-no-qualifiers}}.)\n* $4 is an HTML list of all permitted qualifiers.\n* $5, $6 etc. are the individual permitted qualifiers.\n{{Related|wbqc-violation-message-no-qualifiers}}", "wbqc-violation-message-range-parameters-needed": "Message for when a constraint needs two specific parameters to form a range, but one or both of them are missing. Parameters:\n* $1 is the data type (\"quantity\" or \"time\").\n* $2 is the