[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Depool db1097
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/392377 ) Change subject: db-eqiad.php: Depool db1097 .. db-eqiad.php: Depool db1097 The idea is to move db1097 to become a new multi-instance host serving recentchanges service on s5/s8 and s4 In order to make sure s4 performs fine, let's leave the proposed new config for a few days before removing db1097 Bug: T178359 Change-Id: I13a246cde47a6253bb9621f5437b63cab3bf5a8c --- M wmf-config/db-eqiad.php 1 file changed, 6 insertions(+), 5 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 472e496..aebac7e 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -136,10 +136,10 @@ 'db1053' => 1, # A2 2.8TB 96GB, watchlist, recentchanges, contributions, logpager 'db1056' => 1, # C2 2.8TB 96GB, watchlist, recentchanges, contributions, logpager 'db1064' => 0, # D1 2.8TB 160GB, vslow, dump #Master for db1095 - new sanitarium - 'db1081' => 300, # A2 3.6TB 512GB, api - 'db1084' => 500, # B1 3.6TB 512GB + 'db1081' => 100, # A2 3.6TB 512GB, api #lower weight T178359 + 'db1084' => 300, # B1 3.6TB 512GB, api #T178359 'db1091' => 500, # D2 3.6TB 512GB - 'db1097' => 1, # D1 3.6TB 512GB, api, old master + # 'db1097' => 1, # D1 3.6TB 512GB, api, old master #T178359 'db1103:3314' => 1, # A3 3.6TB 512GB # rc, log: s2 and s4 ], 's5' => [ @@ -351,8 +351,9 @@ 'db1064' => 1, ], 'api' => [ - 'db1081' => 1, - 'db1097' => 3, + 'db1081' => 2, + 'db1084' => 1, + # 'db1097' => 3, ], 'watchlist' => [ 'db1053' => 1, -- To view, visit https://gerrit.wikimedia.org/r/392377 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I13a246cde47a6253bb9621f5437b63cab3bf5a8c 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 db1097
Marostegui has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392377 ) Change subject: db-eqiad.php: Depool db1097 .. db-eqiad.php: Depool db1097 The idea is to move db1097 to become a new multi-instance host serving recentchanges service on s5/s8 and s4 In order to make sure s4 performs fine, let's leave the proposed new config for a few days before removing db1097 Bug: T178359 Change-Id: I13a246cde47a6253bb9621f5437b63cab3bf5a8c --- M wmf-config/db-eqiad.php 1 file changed, 6 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/77/392377/1 diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index 472e496..aebac7e 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -136,10 +136,10 @@ 'db1053' => 1, # A2 2.8TB 96GB, watchlist, recentchanges, contributions, logpager 'db1056' => 1, # C2 2.8TB 96GB, watchlist, recentchanges, contributions, logpager 'db1064' => 0, # D1 2.8TB 160GB, vslow, dump #Master for db1095 - new sanitarium - 'db1081' => 300, # A2 3.6TB 512GB, api - 'db1084' => 500, # B1 3.6TB 512GB + 'db1081' => 100, # A2 3.6TB 512GB, api #lower weight T178359 + 'db1084' => 300, # B1 3.6TB 512GB, api #T178359 'db1091' => 500, # D2 3.6TB 512GB - 'db1097' => 1, # D1 3.6TB 512GB, api, old master + # 'db1097' => 1, # D1 3.6TB 512GB, api, old master #T178359 'db1103:3314' => 1, # A3 3.6TB 512GB # rc, log: s2 and s4 ], 's5' => [ @@ -351,8 +351,9 @@ 'db1064' => 1, ], 'api' => [ - 'db1081' => 1, - 'db1097' => 3, + 'db1081' => 2, + 'db1084' => 1, + # 'db1097' => 3, ], 'watchlist' => [ 'db1053' => 1, -- To view, visit https://gerrit.wikimedia.org/r/392377 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I13a246cde47a6253bb9621f5437b63cab3bf5a8c 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/core[master]: Special:UserRights: Show/hide the expiry selection with CSS
Fomafix has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392376 ) Change subject: Special:UserRights: Show/hide the expiry selection with CSS .. Special:UserRights: Show/hide the expiry selection with CSS This prevents a FOUC on loading. Change-Id: I33a4b0a13dab92156aeea96529573ad49fa2d616 --- M includes/specials/SpecialUserrights.php M resources/src/mediawiki.special/mediawiki.special.userrights.css M resources/src/mediawiki.special/mediawiki.special.userrights.js 3 files changed, 10 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/76/392376/1 diff --git a/includes/specials/SpecialUserrights.php b/includes/specials/SpecialUserrights.php index 4e4394d..5c779f0 100644 --- a/includes/specials/SpecialUserrights.php +++ b/includes/specials/SpecialUserrights.php @@ -847,10 +847,6 @@ } $checkboxHtml = Xml::checkLabel( $text, "wpGroup-" . $group, "wpGroup-" . $group, $checkbox['set'], $attr ); - $ret .= "\t\t" . ( ( $checkbox['disabled'] && $checkbox['disabled-expiry'] ) - ? Xml::tags( 'div', [ 'class' => 'mw-userrights-disabled' ], $checkboxHtml ) - : Xml::tags( 'div', [], $checkboxHtml ) - ) . "\n"; if ( $this->canProcessExpiries() ) { $uiUser = $this->getUser(); @@ -939,8 +935,12 @@ 'id' => "mw-userrights-nested-wpGroup-$group", 'class' => 'mw-userrights-nested', ]; - $ret .= "\t\t\t" . Xml::tags( 'div', $divAttribs, $expiryHtml ) . "\n"; + $checkboxHtml .= "\t\t\t" . Xml::tags( 'div', $divAttribs, $expiryHtml ) . "\n"; } + $ret .= "\t\t" . ( ( $checkbox['disabled'] && $checkbox['disabled-expiry'] ) + ? Xml::tags( 'div', [ 'class' => 'mw-userrights-disabled' ], $checkboxHtml ) + : Xml::tags( 'div', [], $checkboxHtml ) + ) . "\n"; } $ret .= "\t\n"; } diff --git a/resources/src/mediawiki.special/mediawiki.special.userrights.css b/resources/src/mediawiki.special/mediawiki.special.userrights.css index acfdb56..a71f39a 100644 --- a/resources/src/mediawiki.special/mediawiki.special.userrights.css +++ b/resources/src/mediawiki.special/mediawiki.special.userrights.css @@ -22,3 +22,7 @@ .mw-userrights-groups * th { text-align: left; } + +#mw-userrights-form2 input[type=checkbox]:not( :checked ) ~ div { + display: none; +} diff --git a/resources/src/mediawiki.special/mediawiki.special.userrights.js b/resources/src/mediawiki.special/mediawiki.special.userrights.js index 3f864dd..702f4c4 100644 --- a/resources/src/mediawiki.special/mediawiki.special.userrights.js +++ b/resources/src/mediawiki.special/mediawiki.special.userrights.js @@ -6,12 +6,7 @@ // Replace successbox with notifications convertmessagebox(); - // Dynamically show/hide the expiry selection underneath each checkbox - $( '#mw-userrights-form2 input[type=checkbox]' ).on( 'change', function ( e ) { - $( '#mw-userrights-nested-' + e.target.id ).toggle( e.target.checked ); - } ).trigger( 'change' ); - - // Also dynamically show/hide the "other time" input under each dropdown + // Dynamically show/hide the "other time" input under each dropdown $( '.mw-userrights-nested select' ).on( 'change', function ( e ) { $( e.target.parentNode ).find( 'input' ).toggle( $( e.target ).val() === 'other' ); } ).trigger( 'change' ); -- To view, visit https://gerrit.wikimedia.org/r/392376 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I33a4b0a13dab92156aeea96529573ad49fa2d616 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Fomafix___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: objectcache: make sure variant keys are namespaced as keys s...
Aaron Schulz has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392375 ) Change subject: objectcache: make sure variant keys are namespaced as keys should be .. objectcache: make sure variant keys are namespaced as keys should be Change-Id: I02597d6dbc2febace25ef6d1981f69dc704efe8d --- M includes/libs/objectcache/WANObjectCache.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/75/392375/1 diff --git a/includes/libs/objectcache/WANObjectCache.php b/includes/libs/objectcache/WANObjectCache.php index 73e4a9a..1d96e6a 100644 --- a/includes/libs/objectcache/WANObjectCache.php +++ b/includes/libs/objectcache/WANObjectCache.php @@ -917,7 +917,7 @@ // Value existed before with a different version; use variant key. // Reflect purges to $key by requiring that this key value be newer. $value = $this->doGetWithSetCallback( - 'cache-variant:' . md5( $key ) . ":$version", + $this->makeGlobalKey( 'woc-cache-variant', md5( $key ), $version ), $ttl, $callback, // Regenerate value if not newer than $key -- To view, visit https://gerrit.wikimedia.org/r/392375 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I02597d6dbc2febace25ef6d1981f69dc704efe8d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: install_server: Reimage db1063
Marostegui has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/392374 ) Change subject: install_server: Reimage db1063 .. install_server: Reimage db1063 Bug: T180714 Change-Id: I4a215c355ddb276bc1a7f80d0bc4746f050e0463 --- M modules/install_server/files/autoinstall/netboot.cfg 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Marostegui: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/install_server/files/autoinstall/netboot.cfg b/modules/install_server/files/autoinstall/netboot.cfg index a0dfc3f..979be93 100755 --- a/modules/install_server/files/autoinstall/netboot.cfg +++ b/modules/install_server/files/autoinstall/netboot.cfg @@ -64,7 +64,7 @@ conf200[123]) echo partman/raid1-lvm-ext4-srv.cfg ;; \ cp1008|cp300[3-9]|cp3010) echo partman/varnish-oldssd.cfg ;; \ cp[12345][0-9][0-9][0-9]) echo partman/varnish.cfg ;; \ -db1059|db109[6-9]|db110[0-9]|db111[0-2]) echo partman/db.cfg ;; \ +db1059|db109[6-9]|db110[0-9]|db111[0-2]|db1063) echo partman/db.cfg ;; \ db207[1-9]|db208[0-9]|db209[0-2]) echo partman/db.cfg ;; \ db[0-8][0-9]|db10[0-8][0-9]|db109[0-5]|db110[78]|db20[0-2][0-9]|db2030|db203[3-9]|db20[4-7][0-9]|dbstore[1-2]00[1-9]|es[1-2]01[1-9]) echo partman/db-no-srv-format.cfg ;; \ deploy[12]001|flerovium|furud) echo partman/raid1-lvm-ext4-srv-noswap.cfg;; \ -- To view, visit https://gerrit.wikimedia.org/r/392374 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4a215c355ddb276bc1a7f80d0bc4746f050e0463 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production 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/puppet[production]: install_server: Reimage db1063
Marostegui has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392374 ) Change subject: install_server: Reimage db1063 .. install_server: Reimage db1063 Bug: T180714 Change-Id: I4a215c355ddb276bc1a7f80d0bc4746f050e0463 --- M modules/install_server/files/autoinstall/netboot.cfg 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/74/392374/1 diff --git a/modules/install_server/files/autoinstall/netboot.cfg b/modules/install_server/files/autoinstall/netboot.cfg index a0dfc3f..979be93 100755 --- a/modules/install_server/files/autoinstall/netboot.cfg +++ b/modules/install_server/files/autoinstall/netboot.cfg @@ -64,7 +64,7 @@ conf200[123]) echo partman/raid1-lvm-ext4-srv.cfg ;; \ cp1008|cp300[3-9]|cp3010) echo partman/varnish-oldssd.cfg ;; \ cp[12345][0-9][0-9][0-9]) echo partman/varnish.cfg ;; \ -db1059|db109[6-9]|db110[0-9]|db111[0-2]) echo partman/db.cfg ;; \ +db1059|db109[6-9]|db110[0-9]|db111[0-2]|db1063) echo partman/db.cfg ;; \ db207[1-9]|db208[0-9]|db209[0-2]) echo partman/db.cfg ;; \ db[0-8][0-9]|db10[0-8][0-9]|db109[0-5]|db110[78]|db20[0-2][0-9]|db2030|db203[3-9]|db20[4-7][0-9]|dbstore[1-2]00[1-9]|es[1-2]01[1-9]) echo partman/db-no-srv-format.cfg ;; \ deploy[12]001|flerovium|furud) echo partman/raid1-lvm-ext4-srv-noswap.cfg;; \ -- To view, visit https://gerrit.wikimedia.org/r/392374 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4a215c355ddb276bc1a7f80d0bc4746f050e0463 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Marostegui___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: start full dump runs on first of the month again, delay seco...
ArielGlenn has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/392373 ) Change subject: start full dump runs on first of the month again, delay second run .. start full dump runs on first of the month again, delay second run This month's first run was deplayed a couple of days due to the move to the new nfs server; the second run needs a couple days of delay as well so the first run can complete. Change-Id: I41ce406867f82f3927bdc42004d558bc7f8853b7 --- M modules/snapshot/manifests/dumps/cron.pp 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: ArielGlenn: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/snapshot/manifests/dumps/cron.pp b/modules/snapshot/manifests/dumps/cron.pp index afe8867..6e17368 100644 --- a/modules/snapshot/manifests/dumps/cron.pp +++ b/modules/snapshot/manifests/dumps/cron.pp @@ -34,7 +34,7 @@ ensure => 'present', environment => 'MAILTO=ops-du...@wikimedia.org', user=> $user, -command => "/usr/local/bin/fulldumps.sh 03 14 ${runtype} full > /dev/null", +command => "/usr/local/bin/fulldumps.sh 01 14 ${runtype} full > /dev/null", minute => '05', hour=> [8, 20], monthday=> '01-14', @@ -44,7 +44,7 @@ ensure => 'present', environment => 'MAILTO=ops-du...@wikimedia.org', user=> $user, -command => "/usr/local/bin/fulldumps.sh 20 25 ${runtype} partial > /dev/null", +command => "/usr/local/bin/fulldumps.sh 22 27 ${runtype} partial > /dev/null", minute => '05', hour=> [8, 20], monthday=> '20-25', -- To view, visit https://gerrit.wikimedia.org/r/392373 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I41ce406867f82f3927bdc42004d558bc7f8853b7 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: ArielGlennGerrit-Reviewer: ArielGlenn 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]: start full dump runs on first of the month again, delay seco...
ArielGlenn has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392373 ) Change subject: start full dump runs on first of the month again, delay second run .. start full dump runs on first of the month again, delay second run This month's first run was deplayed a couple of days due to the move to the new nfs server; the second run needs a couple days of delay as well so the first run can complete. Change-Id: I41ce406867f82f3927bdc42004d558bc7f8853b7 --- M modules/snapshot/manifests/dumps/cron.pp 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/73/392373/1 diff --git a/modules/snapshot/manifests/dumps/cron.pp b/modules/snapshot/manifests/dumps/cron.pp index afe8867..6e17368 100644 --- a/modules/snapshot/manifests/dumps/cron.pp +++ b/modules/snapshot/manifests/dumps/cron.pp @@ -34,7 +34,7 @@ ensure => 'present', environment => 'MAILTO=ops-du...@wikimedia.org', user=> $user, -command => "/usr/local/bin/fulldumps.sh 03 14 ${runtype} full > /dev/null", +command => "/usr/local/bin/fulldumps.sh 01 14 ${runtype} full > /dev/null", minute => '05', hour=> [8, 20], monthday=> '01-14', @@ -44,7 +44,7 @@ ensure => 'present', environment => 'MAILTO=ops-du...@wikimedia.org', user=> $user, -command => "/usr/local/bin/fulldumps.sh 20 25 ${runtype} partial > /dev/null", +command => "/usr/local/bin/fulldumps.sh 22 27 ${runtype} partial > /dev/null", minute => '05', hour=> [8, 20], monthday=> '20-25', -- To view, visit https://gerrit.wikimedia.org/r/392373 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I41ce406867f82f3927bdc42004d558bc7f8853b7 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: ArielGlenn___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/software[master]: s5.hosts: Add db1109 and db1110 to s5
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/392372 ) Change subject: s5.hosts: Add db1109 and db1110 to s5 .. s5.hosts: Add db1109 and db1110 to s5 db1109 and db1110 will be new slaves in s5 cloned from db1082 Bug: T180700 Change-Id: I92d94439d76fe944e8bf354b882f0f7a431f947d --- M dbtools/s5.hosts 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Marostegui: Looks good to me, approved jenkins-bot: Verified diff --git a/dbtools/s5.hosts b/dbtools/s5.hosts index 106ccb2..a791d60 100644 --- a/dbtools/s5.hosts +++ b/dbtools/s5.hosts @@ -33,5 +33,7 @@ db1104.eqiad.wmnet 3306 db1106.eqiad.wmnet 3306 db1101.eqiad.wmnet 3315 +db1109.eqiad.wmnet 3306 +db1110.eqiad.wmnet 3306 db1063.eqiad.wmnet 3306 db1070.eqiad.wmnet 3306 -- To view, visit https://gerrit.wikimedia.org/r/392372 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I92d94439d76fe944e8bf354b882f0f7a431f947d Gerrit-PatchSet: 1 Gerrit-Project: operations/software 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/software[master]: s5.hosts: Add db1109 and db1110 to s5
Marostegui has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392372 ) Change subject: s5.hosts: Add db1109 and db1110 to s5 .. s5.hosts: Add db1109 and db1110 to s5 db1109 and db1110 will be new slaves in s5 cloned from db1082 Bug: T180700 Change-Id: I92d94439d76fe944e8bf354b882f0f7a431f947d --- M dbtools/s5.hosts 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/software refs/changes/72/392372/1 diff --git a/dbtools/s5.hosts b/dbtools/s5.hosts index 106ccb2..a791d60 100644 --- a/dbtools/s5.hosts +++ b/dbtools/s5.hosts @@ -33,5 +33,7 @@ db1104.eqiad.wmnet 3306 db1106.eqiad.wmnet 3306 db1101.eqiad.wmnet 3315 +db1109.eqiad.wmnet 3306 +db1110.eqiad.wmnet 3306 db1063.eqiad.wmnet 3306 db1070.eqiad.wmnet 3306 -- To view, visit https://gerrit.wikimedia.org/r/392372 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I92d94439d76fe944e8bf354b882f0f7a431f947d Gerrit-PatchSet: 1 Gerrit-Project: operations/software 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 db1082
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/392371 ) Change subject: db-eqiad.php: Depool db1082 .. db-eqiad.php: Depool db1082 Going to clone db1109 and db1110 from db1082 Bug: T177208 Change-Id: I71c0fde7a5f37ef73be665080fc8cc8a079c3a1c --- 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 831b6ba..472e496 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -146,13 +146,13 @@ 'db1070' => 0, # D1 2.8TB 160GB, master # 'db1063' => 0, # C5 2.8TB 128GB, master, crashed #T180714 # 'db1071' => 1, # D1 2.8TB 160GB, future s8 master - 'db1082' => 300, # A2 3.6TB 512GB, api + # 'db1082' => 300, # A2 3.6TB 512GB, api #T177208 'db1087' => 500, # C2 3.6TB 512GB 'db1092' => 500, # D2 3.6TB 512GB 'db1096' => 1, # A6 3.6TB 512GB, watchlist, recentchanges, contributions, logpager #T174569 'db1099' => 1, # B2 3.6TB 512GB, watchlist, recentchanges, contributions, logpager 'db1100' => 1, # C2 3.6TB 512GB, old master, vslow - 'db1104' => 300, # B3 3.6TB 512GB, api + 'db1104' => 100, # B3 3.6TB 512GB, api #low weight 'db1106' => 500, # D3 3.6TB 512GB ], 's6' => [ @@ -388,7 +388,7 @@ 'db1100' => 1, ], 'api' => [ - 'db1082' => 1, + # 'db1082' => 1, 'db1104' => 1, ], 'watchlist' => [ -- To view, visit https://gerrit.wikimedia.org/r/392371 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I71c0fde7a5f37ef73be665080fc8cc8a079c3a1c 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 db1082
Marostegui has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392371 ) Change subject: db-eqiad.php: Depool db1082 .. db-eqiad.php: Depool db1082 Going to clone db1109 and db1110 from db1082 Bug: T177208 Change-Id: I71c0fde7a5f37ef73be665080fc8cc8a079c3a1c --- 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/71/392371/1 diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index 831b6ba..472e496 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -146,13 +146,13 @@ 'db1070' => 0, # D1 2.8TB 160GB, master # 'db1063' => 0, # C5 2.8TB 128GB, master, crashed #T180714 # 'db1071' => 1, # D1 2.8TB 160GB, future s8 master - 'db1082' => 300, # A2 3.6TB 512GB, api + # 'db1082' => 300, # A2 3.6TB 512GB, api #T177208 'db1087' => 500, # C2 3.6TB 512GB 'db1092' => 500, # D2 3.6TB 512GB 'db1096' => 1, # A6 3.6TB 512GB, watchlist, recentchanges, contributions, logpager #T174569 'db1099' => 1, # B2 3.6TB 512GB, watchlist, recentchanges, contributions, logpager 'db1100' => 1, # C2 3.6TB 512GB, old master, vslow - 'db1104' => 300, # B3 3.6TB 512GB, api + 'db1104' => 100, # B3 3.6TB 512GB, api #low weight 'db1106' => 500, # D3 3.6TB 512GB ], 's6' => [ @@ -388,7 +388,7 @@ 'db1100' => 1, ], 'api' => [ - 'db1082' => 1, + # 'db1082' => 1, 'db1104' => 1, ], 'watchlist' => [ -- To view, visit https://gerrit.wikimedia.org/r/392371 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I71c0fde7a5f37ef73be665080fc8cc8a079c3a1c 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]: Revert "mariadb: Depool db1100, pool db1071 instead"
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/392370 ) Change subject: Revert "mariadb: Depool db1100, pool db1071 instead" .. Revert "mariadb: Depool db1100, pool db1071 instead" This reverts commit 331b1b974ca77b8113f715ddbc546857aa95d715. Change-Id: I475c17f89d44370613a67210f6763bd636421233 --- 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 8f6bdb0..831b6ba 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -145,13 +145,13 @@ 's5' => [ 'db1070' => 0, # D1 2.8TB 160GB, master # 'db1063' => 0, # C5 2.8TB 128GB, master, crashed #T180714 - 'db1071' => 1, # D1 2.8TB 160GB, future s8 master, vslow, dump + # 'db1071' => 1, # D1 2.8TB 160GB, future s8 master '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 #T174569 'db1099' => 1, # B2 3.6TB 512GB, watchlist, recentchanges, contributions, logpager - # 'db1100' => 1, # C2 3.6TB 512GB, old master, vslow + 'db1100' => 1, # C2 3.6TB 512GB, old master, vslow 'db1104' => 300, # B3 3.6TB 512GB, api 'db1106' => 500, # D3 3.6TB 512GB ], @@ -382,10 +382,10 @@ ], 's5' => [ 'vslow' => [ - 'db1071' => 1, + 'db1100' => 1, ], 'dump' => [ - 'db1071' => 1, + 'db1100' => 1, ], 'api' => [ 'db1082' => 1, -- To view, visit https://gerrit.wikimedia.org/r/392370 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I475c17f89d44370613a67210f6763bd636421233 Gerrit-PatchSet: 2 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]: Revert "mariadb: Depool db1100, pool db1071 instead"
Hello jenkins-bot, Jcrespo, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/392370 to review the following change. Change subject: Revert "mariadb: Depool db1100, pool db1071 instead" .. Revert "mariadb: Depool db1100, pool db1071 instead" This reverts commit 331b1b974ca77b8113f715ddbc546857aa95d715. Change-Id: I475c17f89d44370613a67210f6763bd636421233 --- 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/70/392370/1 diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index 8f6bdb0..831b6ba 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -145,13 +145,13 @@ 's5' => [ 'db1070' => 0, # D1 2.8TB 160GB, master # 'db1063' => 0, # C5 2.8TB 128GB, master, crashed #T180714 - 'db1071' => 1, # D1 2.8TB 160GB, future s8 master, vslow, dump + # 'db1071' => 1, # D1 2.8TB 160GB, future s8 master '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 #T174569 'db1099' => 1, # B2 3.6TB 512GB, watchlist, recentchanges, contributions, logpager - # 'db1100' => 1, # C2 3.6TB 512GB, old master, vslow + 'db1100' => 1, # C2 3.6TB 512GB, old master, vslow 'db1104' => 300, # B3 3.6TB 512GB, api 'db1106' => 500, # D3 3.6TB 512GB ], @@ -382,10 +382,10 @@ ], 's5' => [ 'vslow' => [ - 'db1071' => 1, + 'db1100' => 1, ], 'dump' => [ - 'db1071' => 1, + 'db1100' => 1, ], 'api' => [ 'db1082' => 1, -- To view, visit https://gerrit.wikimedia.org/r/392370 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I475c17f89d44370613a67210f6763bd636421233 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: MarosteguiGerrit-Reviewer: Jcrespo 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]: Adding .luachecrc with a minimum configuration
John Erling Blad has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392369 ) Change subject: Adding .luachecrc with a minimum configuration .. Adding .luachecrc with a minimum configuration The linter "luacheck" need a special configuration file to make it stop complaining. In addition to the configuration file a few changes are made to remove specific lints. This does not add the linter to the toolchain, it is only added for in-editor use. Bug: T180925 Change-Id: I091b46fdf358c36f02b36a65223f643a2c9e41b2 --- A .luacheckrc M client/includes/DataAccess/Scribunto/mw.wikibase.entity.lua 2 files changed, 11 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/69/392369/1 diff --git a/.luacheckrc b/.luacheckrc new file mode 100644 index 000..c92e319 --- /dev/null +++ b/.luacheckrc @@ -0,0 +1,5 @@ +stds.scribunto = { + globals = {"mw", "mw_interface"}, -- these globals can be set and accessed. +} +std = "min+scribunto" +files["client/includes/DataAccess/Scribunto/mw.wikibase.entity.lua"].ignore = {"431"} diff --git a/client/includes/DataAccess/Scribunto/mw.wikibase.entity.lua b/client/includes/DataAccess/Scribunto/mw.wikibase.entity.lua index 989a572..158d37e 100644 --- a/client/includes/DataAccess/Scribunto/mw.wikibase.entity.lua +++ b/client/includes/DataAccess/Scribunto/mw.wikibase.entity.lua @@ -46,7 +46,7 @@ entity.claims = {} local pseudoClaimsMetatable = {} - pseudoClaimsMetatable.__index = function( emptyTable, propertyId ) + pseudoClaimsMetatable.__index = function( emptyTable, propertyId ) -- luacheck: no unused args if isValidPropertyId( propertyId ) then -- Only attempt to track the usage if we have a valid property id. php.addStatementUsage( entity.id, propertyId ) @@ -55,18 +55,18 @@ return actualEntityClaims[propertyId] end - pseudoClaimsMetatable.__newindex = function( emptyTable, propertyId, data ) + pseudoClaimsMetatable.__newindex = function( emptyTable, propertyId, data ) -- luacheck: no unused args error( 'Entity cannot be modified' ) end - local logNext = function( emptyTable, propertyId ) + local logNext = function( emptyTable, propertyId ) -- luacheck: no unused args if isValidPropertyId( propertyId ) then php.addStatementUsage( entity.id, propertyId ) end return next( actualEntityClaims, propertyId ) end - pseudoClaimsMetatable.__pairs = function( emptyTable ) + pseudoClaimsMetatable.__pairs = function( emptyTable ) -- luacheck: no unused args return logNext, {}, nil end @@ -211,7 +211,7 @@ local statements = {} local bestRank = 'normal' - for k, statement in pairs( entity.claims[propertyId] ) do + for _, statement in pairs( entity.claims[propertyId] ) do if statement.rank == bestRank then statements[#statements + 1] = statement elseif statement.rank == 'preferred' then @@ -233,7 +233,7 @@ local properties = {} local n = 0 - for k, v in pairs( entity.claims ) do + for k, _ in pairs( entity.claims ) do n = n + 1 properties[n] = k end -- To view, visit https://gerrit.wikimedia.org/r/392369 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I091b46fdf358c36f02b36a65223f643a2c9e41b2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: John Erling Blad___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Collection[master]: Use a meaningful key name in getBookFromCache()
Aaron Schulz has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392368 ) Change subject: Use a meaningful key name in getBookFromCache() .. Use a meaningful key name in getBookFromCache() Change-Id: I6bf80012505f3ba1c37c76d2934d6f086d735d1d --- M includes/BookRenderingMediator.php 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection refs/changes/68/392368/1 diff --git a/includes/BookRenderingMediator.php b/includes/BookRenderingMediator.php index 9d30550..9c7d068 100644 --- a/includes/BookRenderingMediator.php +++ b/includes/BookRenderingMediator.php @@ -95,7 +95,10 @@ return in_array( $key, [ 'type', 'title', 'revision' ], true ); } ); }, $keyBase['items'] ); - $key = $this->htmlCache->makeGlobalKey( md5( json_encode( $keyBase ) ) ); + $key = $this->htmlCache->makeGlobalKey( + 'collection-book', + md5( json_encode( $keyBase ) ) + ); $book = $this->htmlCache->get( $key ); if ( !$book ) { -- To view, visit https://gerrit.wikimedia.org/r/392368 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6bf80012505f3ba1c37c76d2934d6f086d735d1d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Collection Gerrit-Branch: master Gerrit-Owner: Aaron Schulz___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix some broke cache key generations
Aaron Schulz has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392367 ) Change subject: Fix some broke cache key generations .. Fix some broke cache key generations Change-Id: Ib724fe0cfa866351caee89d3451b6c4b7b6a4578 --- M includes/changes/ChangesList.php M includes/media/TransformationalImageHandler.php 2 files changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/67/392367/1 diff --git a/includes/changes/ChangesList.php b/includes/changes/ChangesList.php index bc50096..5b8559e 100644 --- a/includes/changes/ChangesList.php +++ b/includes/changes/ChangesList.php @@ -576,7 +576,9 @@ return ''; } $cache = $this->watchMsgCache; - return $cache->getWithSetCallback( $count, $cache::TTL_INDEFINITE, + return $cache->getWithSetCallback( + $cache->makeKey( 'watching-users-msg', $count ), + $cache::TTL_INDEFINITE, function () use ( $count ) { return $this->msg( 'number_of_watching_users_RCview' ) ->numParams( $count )->escaped(); diff --git a/includes/media/TransformationalImageHandler.php b/includes/media/TransformationalImageHandler.php index de438da..85430d2 100644 --- a/includes/media/TransformationalImageHandler.php +++ b/includes/media/TransformationalImageHandler.php @@ -512,7 +512,7 @@ $cache = MediaWikiServices::getInstance()->getLocalServerObjectCache(); $method = __METHOD__; return $cache->getWithSetCallback( - 'imagemagick-version', + $cache->makeGlobalKey( 'imagemagick-version' ), $cache::TTL_HOUR, function () use ( $method ) { global $wgImageMagickConvertCommand; -- To view, visit https://gerrit.wikimedia.org/r/392367 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib724fe0cfa866351caee89d3451b6c4b7b6a4578 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ThrottleOverride[master]: Improve 'exemption applied' message
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379696 ) Change subject: Improve 'exemption applied' message .. Improve 'exemption applied' message Change the message to link somewhere (Special:ThrottleOverrideList). Also add an appropriate page title. Once again, most of this is c from Special:Block. Bug: T174186 Change-Id: I03276c79c11cc65d5c9e22f7a1441004af1a5bb1 --- M SpecialOverrideThrottle.php M i18n/en.json M i18n/qqq.json 3 files changed, 7 insertions(+), 3 deletions(-) Approvals: BryanDavis: Looks good to me, approved jenkins-bot: Verified diff --git a/SpecialOverrideThrottle.php b/SpecialOverrideThrottle.php index b2a2739..7599ece 100644 --- a/SpecialOverrideThrottle.php +++ b/SpecialOverrideThrottle.php @@ -283,7 +283,9 @@ } function onSuccess() { - $this->getOutput()->addWikiMsg( 'throttleoverride-success' ); + $out = $this->getOutput(); + $out->setPageTitle( $this->msg( 'throttleoverride-success-sub' ) ); + $out->addWikiMsg( 'throttleoverride-success', wfEscapeWikiText( $this->target ) ); } protected function getGroupName() { diff --git a/i18n/en.json b/i18n/en.json index 83f218b..e087d98 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -18,7 +18,8 @@ "throttleoverride-text": "Enter the IP address or range you want to exempt from certain throttles, and how long the exemption should last for.\nAn optional reason can be given for the logs.", "throttleoverride-ipaddress": "IP address or range", "throttleoverride-showlog": "This ip address or range has previously been exempted from throttles. The log is provided below for reference.", - "throttleoverride-success": "The exemption was applied.", + "throttleoverride-success": "The exemption for $1 was applied.\nSee the [[Special:ThrottleOverrideList|list of throttle overrides]] to review exemptions.", + "throttleoverride-success-sub": "Throttle override succeeded", "throttleoverride-types": "Throttle types:", "throttleoverride-types-all": "All types", "throttleoverride-types-actcreate": "Account creation", diff --git a/i18n/qqq.json b/i18n/qqq.json index 9a64997..31b4930 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -21,7 +21,8 @@ "throttleoverride-text": "Intro text on [[Special:OverrideThrottle]]", "throttleoverride-ipaddress": "Label for the IP address field on [[Special:OverrideThrottle]]", "throttleoverride-showlog": "Shown when displaying an extract of the throttleoverride log.", - "throttleoverride-success": "Text displayed after a successful submission on [[Special:OverrideThrottle]]", + "throttleoverride-success": "Text displayed after a successful submission on [[Special:OverrideThrottle]].\n\nParameters:\n* $1 - the IP address or range that was modified.", + "throttleoverride-success-sub": "Used as page title in [[Special:ThrottleOverride]].\n\nThis message is the subject for the following message:\n* {{msg-mw|throttleoverride-success}}", "throttleoverride-types": "Label for the types of throttles that can be overridden.\n{{Identical|Throttle type}}", "throttleoverride-types-all": "Label for the throttle type representing all types (used in [[Special:ThrottleOverrideList]]).\n{{Identical|All types}}", "throttleoverride-types-actcreate": "Label for the throttle type for account creations", -- To view, visit https://gerrit.wikimedia.org/r/379696 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I03276c79c11cc65d5c9e22f7a1441004af1a5bb1 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/ThrottleOverride Gerrit-Branch: master Gerrit-Owner: EddieGPGerrit-Reviewer: BryanDavis Gerrit-Reviewer: Reedy Gerrit-Reviewer: Siebrand Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ThrottleOverride[master]: Show log excerpt on Special:ThrottleOverride
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/380485 ) Change subject: Show log excerpt on Special:ThrottleOverride .. Show log excerpt on Special:ThrottleOverride Show excerpts of previous exemptions for the same ip range if possible. Bug: T93719 Depends-on: I8ab1fc53badc93afc6971afc2e4f17350a207bbe Change-Id: Ia382856c6fa0562c3b068bf21186271f7cc27bb0 --- M SpecialOverrideThrottle.php M extension.json M i18n/en.json M i18n/qqq.json A resources/ext.throttleoverride.specialOverrideThrottle.css 5 files changed, 34 insertions(+), 0 deletions(-) Approvals: BryanDavis: Looks good to me, approved jenkins-bot: Verified diff --git a/SpecialOverrideThrottle.php b/SpecialOverrideThrottle.php index f4770e1..b2a2739 100644 --- a/SpecialOverrideThrottle.php +++ b/SpecialOverrideThrottle.php @@ -27,6 +27,9 @@ function __construct() { parent::__construct( 'OverrideThrottle', 'throttleoverride' ); + + $out = $this->getOutput(); + $out->addModules( 'ext.throttleoverride.specialOverrideThrottle' ); } function getMessagePrefix() { @@ -290,4 +293,26 @@ protected function getDisplayFormat() { return 'ooui'; } + + protected function postText() { + $out = ''; + if ( $this->par ) { + # Get the relevant extract from the log. + $ipTitle = Title::makeTitleSafe( NS_USER, $this->par ); + + LogEventsList::showLogExtract( + $out, + 'throttleoverride', + $ipTitle, + '', + [ + 'lim' => 10, + 'msgKey' => [ 'throttleoverride-showlog' ], + 'showIfEmpty' => false + ] + ); + } + + return $out; + } } diff --git a/extension.json b/extension.json index b44f537..877be67 100644 --- a/extension.json +++ b/extension.json @@ -66,6 +66,10 @@ "ext.throttleoverride.list": { "position": "top", "styles": "ext.throttleoverride.list.css" + }, + "ext.throttleoverride.specialOverrideThrottle": { + "position": "top", + "styles": "ext.throttleoverride.specialOverrideThrottle.css" } }, "ResourceFileModulePaths": { diff --git a/i18n/en.json b/i18n/en.json index 57a89bd..83f218b 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -17,6 +17,7 @@ "throttleoverride-legend": "Exemption information", "throttleoverride-text": "Enter the IP address or range you want to exempt from certain throttles, and how long the exemption should last for.\nAn optional reason can be given for the logs.", "throttleoverride-ipaddress": "IP address or range", + "throttleoverride-showlog": "This ip address or range has previously been exempted from throttles. The log is provided below for reference.", "throttleoverride-success": "The exemption was applied.", "throttleoverride-types": "Throttle types:", "throttleoverride-types-all": "All types", diff --git a/i18n/qqq.json b/i18n/qqq.json index 81af443..9a64997 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -20,6 +20,7 @@ "throttleoverride-legend": "Label for the legend on [[Special:OverrideThrottle]]", "throttleoverride-text": "Intro text on [[Special:OverrideThrottle]]", "throttleoverride-ipaddress": "Label for the IP address field on [[Special:OverrideThrottle]]", + "throttleoverride-showlog": "Shown when displaying an extract of the throttleoverride log.", "throttleoverride-success": "Text displayed after a successful submission on [[Special:OverrideThrottle]]", "throttleoverride-types": "Label for the types of throttles that can be overridden.\n{{Identical|Throttle type}}", "throttleoverride-types-all": "Label for the throttle type representing all types (used in [[Special:ThrottleOverrideList]]).\n{{Identical|All types}}", diff --git a/resources/ext.throttleoverride.specialOverrideThrottle.css b/resources/ext.throttleoverride.specialOverrideThrottle.css new file mode 100644 index 000..eb1cf48 --- /dev/null +++ b/resources/ext.throttleoverride.specialOverrideThrottle.css @@ -0,0 +1,3 @@ +.mw-warning-with-logexcerpt { + margin-top: 10px; +} -- To view, visit https://gerrit.wikimedia.org/r/380485 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia382856c6fa0562c3b068bf21186271f7cc27bb0 Gerrit-PatchSet: 4
[MediaWiki-commits] [Gerrit] mediawiki...ThrottleOverride[master]: Log throttle overrides
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/368588 ) Change subject: Log throttle overrides .. Log throttle overrides Exemptions for throttles which were added through Special:OverrideThrottle are now logged in a new log 'throttleoverride'. Bug: T62421 Change-Id: I8ab1fc53badc93afc6971afc2e4f17350a207bbe --- M SpecialOverrideThrottle.php A ThrottleOverrideLogFormatter.php M extension.json M i18n/en.json M i18n/qqq.json 5 files changed, 95 insertions(+), 3 deletions(-) Approvals: BryanDavis: Looks good to me, approved jenkins-bot: Verified diff --git a/SpecialOverrideThrottle.php b/SpecialOverrideThrottle.php index 5e9433e..f4770e1 100644 --- a/SpecialOverrideThrottle.php +++ b/SpecialOverrideThrottle.php @@ -147,6 +147,7 @@ function onSubmit( array $data ) { $types = implode( ',', $data['Throttles'] ); + $reason = trim( $data['Reason'] ); $parsedRange = IP::parseRange( $data['Target'] ); $errors = self::validateFields( $data['Target'], @@ -155,6 +156,7 @@ $parsedRange ); + // Require confirmation if there already is a row for that target. if ( !$data['Modify'] && $this->throttleId ) { $errors[] = [ 'throttleoverride-rule-alreadyexists', $this->target ]; } @@ -163,16 +165,31 @@ return $errors; } + // Create a log entry + $logEntry = new ManualLogEntry( 'throttleoverride', 'created' ); + $logEntry->setPerformer( $this->getUser() ); + $logEntry->setTarget( Title::makeTitle( NS_USER, $this->target ) ); + $logEntry->setComment( $reason ); + $logEntry->setParameters( [ + '4::throttles' => $types, + '5::expiry' => $data['Expiry'], + ] ); + $logId = $logEntry->insert(); + $logEntry->publish( $logId ); + + // Save the new exemption $dbw = wfGetDB( DB_MASTER ); $row = [ 'thr_target' => $this->target, 'thr_expiry' => $dbw->encodeExpiry( $data['Expiry'] ), - 'thr_reason' => trim( $data['Reason'] ), + 'thr_reason' => $reason, 'thr_type' => $types, 'thr_range_start' => $parsedRange[0], 'thr_range_end' => $parsedRange[1], ]; + // If there already is an exemption for that target AND the user already confirmed + // to override it, update the db row. Otherwise insert a new row. if ( $data['Modify'] && $this->throttleId ) { $dbw->update( 'throttle_override', $row, diff --git a/ThrottleOverrideLogFormatter.php b/ThrottleOverrideLogFormatter.php new file mode 100644 index 000..2a99cb3 --- /dev/null +++ b/ThrottleOverrideLogFormatter.php @@ -0,0 +1,51 @@ +http://www.gnu.org/licenses/>. + * + * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 3.0 or later + */ + +/** + * This class formats throttleoverride log entries. + * + */ +class ThrottleOverrideLogFormatter extends LogFormatter { + + protected function getMessageParameters() { + $params = parent::getMessageParameters(); + $context = RequestContext::getMain(); + $language = $context->getLanguage(); + + // Link the target ip to the contributions page + $targetUser = User::newFromName( $this->entry->getTarget()->getText(), false ); + $params[2] = Message::rawParam( $this->makeUserLink( $targetUser ) ); + + // Build a (human-readable) list of throttle types + $types = []; + foreach ( explode( ',', $params[3] ) as $type ) { + $types[] = wfMessage( "throttleoverride-log-type-{$type}" )->text(); + } + $params[3] = $language->listToText( $types ); + + // Make the timestamp human-readable. + $params[4] = $language->formatExpiry( $params[4] ); + + // The additional parameter $6 counts the number of throttle types for {{PLURAL:$6|...}} use. + $params[5] = count( $types ); + return $params; + } +} diff --git a/extension.json b/extension.json index 8121c13..b44f537 100644 --- a/extension.json +++ b/extension.json @@ -13,6 +13,12 @@ "OverrideThrottle": "SpecialOverrideThrottle", "ThrottleOverrideList": "SpecialThrottleOverrideList" }, + "LogTypes": [ + "throttleoverride" +
[MediaWiki-commits] [Gerrit] mediawiki...ThrottleOverride[master]: Introduce config variable for throttle types
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/380061 ) Change subject: Introduce config variable for throttle types .. Introduce config variable for throttle types There is no need and it isn't desired to give the possibility to override all types of throttles, e.g. most wikis won't have a reason to allow certain ips to bypass the "password recovery email" throttle. $wgThrottleOverrideTypes gives the possibility to select fewer or more options than are enabled by default. Note that this patch disables "mailpassword" and "emailuser" throttles by default although those were part of the UI before. Also fix wrong linking in ThrottleOverridePage, the special page is name OverrideThrottle and not ThrottleOverride. Bug: T62419 Change-Id: Ic489d845d7167cbf522206c9cc858b9c5cee17be --- M SpecialOverrideThrottle.php M SpecialThrottleOverrideList.php M ThrottleOverridePager.php M extension.json 4 files changed, 17 insertions(+), 4 deletions(-) Approvals: BryanDavis: Looks good to me, approved jenkins-bot: Verified diff --git a/SpecialOverrideThrottle.php b/SpecialOverrideThrottle.php index 8144e30..5e9433e 100644 --- a/SpecialOverrideThrottle.php +++ b/SpecialOverrideThrottle.php @@ -46,7 +46,8 @@ // move - A page is moved (ping-limiter) // mailpassword - User requests a password recovery (ping-limiter) // emailuser - User emails another user (ping-limiter) - $throttleTypes = [ 'actcreate', 'edit', 'move', 'mailpassword', 'emailuser' ]; + global $wgThrottleOverrideTypes; + $throttleTypes = array_keys( array_filter( $wgThrottleOverrideTypes ) ); // Construct an array of message => type. $throttles = []; diff --git a/SpecialThrottleOverrideList.php b/SpecialThrottleOverrideList.php index e78c3ff..7113ce3 100644 --- a/SpecialThrottleOverrideList.php +++ b/SpecialThrottleOverrideList.php @@ -32,9 +32,12 @@ function getFormFields() { global $wgRateLimits; + global $wgThrottleOverrideTypes; + $throttleTypes = array_keys( array_filter( $wgThrottleOverrideTypes ) ); + $throttleTypes = array_merge( [ 'all' ], $throttleTypes ); $throttles = []; - foreach ( [ 'all', 'actcreate', 'edit', 'move', 'mailpassword', 'emailuser' ] as $type ) { + foreach ( $throttleTypes as $type ) { if ( $type == 'all' || $type == 'actcreate' || isset( $wgRateLimits[$type] ) ) { // For grepping. The following messages are used here: // throttleoverride-types-all diff --git a/ThrottleOverridePager.php b/ThrottleOverridePager.php index 8cd7799..6bbc62a 100644 --- a/ThrottleOverridePager.php +++ b/ThrottleOverridePager.php @@ -97,10 +97,10 @@ $formatted = htmlspecialchars( $language->formatExpiry( $value, /* User preference timezone */true ) ); - // Show link to Special:ThrottleOverride/$Username if we're allowed to manipulate throttles. + // Show link to Special:OverrideThrottle/$Username if we're allowed to manipulate throttles. if ( $this->getUser()->isAllowed( 'throttleoverride' ) ) { $link = $linkRenderer->makeKnownLink( - SpecialPage::getTitleFor( 'ThrottleOverride', IP::prettifyIP( $row->thr_target ) ), + SpecialPage::getTitleFor( 'OverrideThrottle', IP::prettifyIP( $row->thr_target ) ), $this->msg( 'throttleoverride-list-change' )->text() ); diff --git a/extension.json b/extension.json index fa01b73..8121c13 100644 --- a/extension.json +++ b/extension.json @@ -44,6 +44,15 @@ "IPv4": 16, "IPv6": 19 } + }, + "ThrottleOverrideTypes": { + "value": { + "actcreate": true, + "edit": true, + "move": true, + "mailpassword": false, + "emailuser": false + } } }, "ResourceModules": { -- To view, visit https://gerrit.wikimedia.org/r/380061 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic489d845d7167cbf522206c9cc858b9c5cee17be Gerrit-PatchSet: 6 Gerrit-Project: mediawiki/extensions/ThrottleOverride Gerrit-Branch: master
[MediaWiki-commits] [Gerrit] mediawiki...cxserver[master]: Update dependent node module versions
Santhosh has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392366 ) Change subject: Update dependent node module versions .. Update dependent node module versions Bug: T151397 Change-Id: Ia1e1e04e799531868353ec8b06ecc3572969b0f9 --- M package.json 1 file changed, 17 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/cxserver refs/changes/66/392366/1 diff --git a/package.json b/package.json index ceb29c9..b2adfb9 100644 --- a/package.json +++ b/package.json @@ -15,23 +15,23 @@ "node": ">=6.11.1" }, "dependencies": { -"bluebird": "^3.4.1", -"body-parser": "^1.15.2", -"bunyan": "^1.8.1", +"bluebird": "^3.5.1", +"body-parser": "^1.18.2", +"bunyan": "^1.8.12", "cassandra-uuid": "^0.0.2", -"compression": "^1.6.2", +"compression": "^1.7.1", "core-js": "^2.4.1", -"domino": "^1.0.25", -"express": "^4.16.0", -"html-entities": "1.2.0", -"js-yaml": "^3.6.1", +"domino": "^1.0.30", +"express": "^4.16.2", +"html-entities": "^1.2.1", +"js-yaml": "^3.10.0", "jsonwebtoken": "~5.6.0", "language-data": "git+https://github.com/wikimedia/language-data#master;, -"mediawiki-title": "^0.6.4", -"preq": "^0.5.2", +"mediawiki-title": "^0.6.5", +"preq": "^0.5.3", "sax": "1.2.1", -"service-runner": "^2.2.5", -"swagger-router": "^0.4.6", +"service-runner": "^2.4.2", +"swagger-router": "^0.7.1", "swagger-ui": "git+https://github.com/wikimedia/swagger-ui#master;, "dompurify": "^1.0.2", "jsdom": "^10.1.0" @@ -39,12 +39,13 @@ "devDependencies": { "async": "^1.4.2", "check-dependencies": "^0.12.0", -"extend": "^3.0.0", -"mocha": "^2.5.3", +"extend": "^3.0.1", +"mocha": "^4.0.1", +"eslint": "^4.11.0", "mocha-eslint": "^4.1.0", -"mocha-lcov-reporter": "^1.2.0", +"mocha-lcov-reporter": "^1.3.0", "node-inspector": "^0.12.6", -"nsp": "^2.6.1", +"nsp": "^3.1.0", "eslint-config-wikimedia": "0.5.0" }, "scripts": { -- To view, visit https://gerrit.wikimedia.org/r/392366 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia1e1e04e799531868353ec8b06ecc3572969b0f9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/cxserver Gerrit-Branch: master Gerrit-Owner: Santhosh___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...WikimediaMaintenance[master]: Update for Maintenance::error( $err, $die ) deprecation
BryanDavis has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392365 ) Change subject: Update for Maintenance::error( $err, $die ) deprecation .. Update for Maintenance::error( $err, $die ) deprecation Depends-On: I75699008638f7e99b11210c7bb9e2e131fca7c9e Change-Id: I0d53b8fe1cb1a8b9d25d6375b73b40621b4b570c --- M addWiki.php M bug-53687/fixOrphans.php M changeSkinPref.php M cleanupBug41615.php M createExtensionTables.php M dumpInterwiki.php M getJobQueueLengths.php M getPageCounts.php M removeDeletedWikis.php 9 files changed, 18 insertions(+), 20 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaMaintenance refs/changes/65/392365/1 diff --git a/addWiki.php b/addWiki.php index 3b6d80a..be26cbc 100644 --- a/addWiki.php +++ b/addWiki.php @@ -58,7 +58,7 @@ $wmgVersionNumber, $wmgAddWikiNotify, $wgPasswordSender; if ( !$wmgVersionNumber ) { // set in CommonSettings.php - $this->error( '$wmgVersionNumber is not set, please use MWScript.php wrapper.', true ); + $this->fatalError( '$wmgVersionNumber is not set, please use MWScript.php wrapper.' ); } $lang = $this->getArg( 0 ); @@ -68,7 +68,7 @@ $languageNames = Language::fetchLanguageNames(); if ( !isset( $languageNames[$lang] ) ) { - $this->error( "Language $lang not found in Names.php", true ); + $this->fatalError( "Language $lang not found in Names.php" ); } $name = $languageNames[$lang]; diff --git a/bug-53687/fixOrphans.php b/bug-53687/fixOrphans.php index b21644e..aed77e4 100644 --- a/bug-53687/fixOrphans.php +++ b/bug-53687/fixOrphans.php @@ -18,8 +18,7 @@ $fileName = $this->getArg( 0 ); $f = fopen( $fileName, 'r' ); if ( !$f ) { - $this->error( "Unable to open list file \"$fileName\"" ); - exit( 1 ); + $this->fatalError( "Unable to open list file \"$fileName\"" ); } $lineNumber = 0; $dryRun = $this->getOption( 'dry-run' ); diff --git a/changeSkinPref.php b/changeSkinPref.php index 1de1005..47ba184 100644 --- a/changeSkinPref.php +++ b/changeSkinPref.php @@ -47,10 +47,10 @@ $user = User::newFromName( $userName ); $wiki = wfWikiID(); if ( !$user || $user->getId() === 0 ) { - $this->error( "User $userName does not exist or is invalid.", 1 ); + $this->fatalError( "User $userName does not exist or is invalid." ); } if ( !array_key_exists( $newSkin, Skin::getSkinNames() ) ) { - $this->error( "$newSkin is not a valid skin", 1 ); + $this->fatalError( "$newSkin is not a valid skin" ); } $skin = $user->getOption( 'skin' ); if ( $skin === $newSkin ) { diff --git a/cleanupBug41615.php b/cleanupBug41615.php index 2d5bcac..d478a00 100644 --- a/cleanupBug41615.php +++ b/cleanupBug41615.php @@ -24,7 +24,7 @@ $logFile = $this->getOption( 'logdir' ) . "/$wgDBname"; if ( !file_put_contents( $logFile, "STARTED " . wfTimestamp() . "\n", FILE_APPEND ) ) { - $this->error( "Could not write to log file", 1 ); // die + $this->fatalError( "Could not write to log file" ); } # Mangle throw the log as log_comment can have newlines and such... @@ -49,7 +49,7 @@ } if ( ( count( $binlog ) % 2 ) != 0 ) { - $this->error( "Binlog dump entries not matched up.\n", 1 ); + $this->fatalError( "Binlog dump entries not matched up.\n" ); } $binlog = array_chunk( $binlog, 2 ); // there should be pairs of corresponding logs @@ -60,7 +60,7 @@ // 1351692955 itwiki DELETE /* WikiPage::doDeleteArticleReal Guidomac */ // FROM `page` WHERE page_id = '4258611' if ( !preg_match( "!^\d+ (\w+) DELETE .* WHERE page_id = '(\d+)'!", $dEntry, $m ) ) { - $this->error( "Could not parse '$dEntry'.", 1 ); + $this->fatalError( "Could not parse '$dEntry'." ); } $info = [ 'wiki' => $m[1], 'page_id' => $m[2] ]; // 1351692955 itwiki INSERT /* ManualLogEntry::insert Guidomac */ INTO `logging` @@ -68,7 +68,7 @@ // VALUES (NULL,'delete','delete','20121031141555','276491','Guidomac','0','Doesn\'t_Matter','0','([[WP:IMMEDIATA|C1]])
[MediaWiki-commits] [Gerrit] mediawiki...namespaceizer[master]: Core alias list
Legoktm has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/372521 ) Change subject: Core alias list .. Core alias list Bug: T166010 Change-Id: I05949673837e797093da7b4e4241c00077f912ec --- A .gitignore A .gitreview A bin/dumpCoreAliases.php A composer.json A src/AutoloadLoader.php A src/CoreAliases.php 6 files changed, 646 insertions(+), 0 deletions(-) Approvals: Legoktm: Verified; Looks good to me, approved diff --git a/.gitignore b/.gitignore new file mode 100644 index 000..4719332 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +*~ +.*.swp +/vendor +/composer.lock +/composer.local.json diff --git a/.gitreview b/.gitreview new file mode 100644 index 000..dc4e124 --- /dev/null +++ b/.gitreview @@ -0,0 +1,6 @@ +[gerrit] +host=gerrit.wikimedia.org +port=29418 +project=mediawiki/tools/namespaceizer.git +defaultbranch=master +defaultrebase=0 diff --git a/bin/dumpCoreAliases.php b/bin/dumpCoreAliases.php new file mode 100644 index 000..e115c2b --- /dev/null +++ b/bin/dumpCoreAliases.php @@ -0,0 +1,84 @@ +\n"; + exit( 1 ); +} + +if ( $argv[0] === '--counts' ) { + $report = 'counts'; + array_shift( $argv ); +} elseif ( $argv[0] === '--3col' ) { + $report = '3col'; + array_shift( $argv ); +} elseif ( $argv[0] === '--classes' ) { + $report = 'classes'; + array_shift( $argv ); +} else { + $report = 'php'; +} + +if ( !count( $argv ) ) { + echo "Usage: $self \n"; + exit( 1 ); +} + +$file = $argv[0]; + +$autoload = AutoloadLoader::getAutoloadClasses( $file ); +if ( $autoload === false ) { + echo "Unable to open autoload file $file\n"; + exit( 1 ); +} + +$ca = new CoreAliases( $autoload ); +$aliases = $ca->getAliases(); + +asort( $aliases ); + +$counts = []; +if ( $report === 'php' ) { + print " $new ) { + if ( $report === 'classes' ) { + print "$old\t$new\n"; + } elseif ( $report === 'php' ) { + print "\t'" . + strtr( $old, [ "\\" => "", "'" => "\\'" ] ) . + "' => '" . + strtr( $new, [ "\\" => "", "'" => "\\'" ] ) . + "',\n"; + } else { + if ( preg_match( '/(.*)([^]*)$/', $new, $m ) ) { + if ( $report === 'counts' ) { + if ( !isset( $counts[$m[1]] ) ) { + $counts[$m[1]] = 0; + } + $counts[$m[1]]++; + } elseif ( $report === '3col' ) { + print "$old\t{$m[1]}\t{$m[2]}\n"; + } + } + } +} +if ( $report === 'php' ) { + print "];\n"; +} + +if ( $report === 'counts' ) { + foreach ( $counts as $ns => $count ) { + print "$ns\t$count\n"; + } +} diff --git a/composer.json b/composer.json new file mode 100644 index 000..1a2d50d --- /dev/null +++ b/composer.json @@ -0,0 +1,9 @@ +{ + "name": "mediawiki/namespaceizer", + "description": "Namespace migration script", + "autoload": { + "psr-4": { + "MediaWiki\\Tool\\Namespaceizer\\": "src/" + } + } +} diff --git a/src/AutoloadLoader.php b/src/AutoloadLoader.php new file mode 100644 index 000..ea04c06 --- /dev/null +++ b/src/AutoloadLoader.php @@ -0,0 +1,16 @@ + 'MediaWiki', + 'includes/actions' => 'MediaWiki\Action', + 'includes/api' => null, + 'includes/auth' => 'MediaWiki\Auth', + 'includes/cache' => 'MediaWiki', // to parent + 'includes/cache/localisation' => 'MediaWiki\Language\LocalisationCache', + 'includes/changes' => 'MediaWiki\Changes', + 'includes/changetags' => 'MediaWiki\ChangeTags', + 'includes/clientpool' => 'MediaWiki', // to parent + 'includes/collation' => 'MediaWiki\Collation', + 'includes/compat' => 'MediaWiki', // to parent + 'includes/compat/normal' => 'MediaWiki', // to parent + 'includes/composer' => null, + 'includes/config' => 'MediaWiki\Config', + 'includes/content' => 'MediaWiki\Content', + 'includes/context' => 'MediaWiki\Context', + 'includes/dao' => 'MediaWiki\Dao', + 'includes/db' => 'MediaWiki\Db', + 'includes/debug' => 'MediaWiki', // to parent + 'includes/debug/logger' => 'MediaWiki\Logger', // to parent + 'includes/debug/logger/monolog' => 'MediaWiki\Logger\Monolog', // to parent + 'includes/deferred' => 'MediaWiki\Deferred', + 'includes/diff' => 'MediaWiki\Diff', + 'includes/edit' => 'MediaWiki\Edit', // single class +
[MediaWiki-commits] [Gerrit] mediawiki...namespaceizer[master]: Added conflict and reserved word detection
Tim Starling has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392364 ) Change subject: Added conflict and reserved word detection .. Added conflict and reserved word detection Detect conflicts due to two classes being renamed to the same thing. Exempt existing class_alias() calls. Detect class names that use PHP reserved words. Change-Id: I91762c902b049fea472a189073acc87ab0ada85f --- M bin/dumpCoreAliases.php M src/CoreAliases.php 2 files changed, 241 insertions(+), 117 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/namespaceizer refs/changes/64/392364/1 diff --git a/bin/dumpCoreAliases.php b/bin/dumpCoreAliases.php index e115c2b..b270f53 100644 --- a/bin/dumpCoreAliases.php +++ b/bin/dumpCoreAliases.php @@ -9,76 +9,94 @@ require __DIR__ . '/../vendor/autoload.php'; -$self = array_shift( $argv ); - -if ( !count( $argv ) ) { - echo "Usage: $self \n"; - exit( 1 ); +function warnCallback( $msg ) { + fwrite( STDERR, "WARNING: $msg\n" ); } -if ( $argv[0] === '--counts' ) { - $report = 'counts'; - array_shift( $argv ); -} elseif ( $argv[0] === '--3col' ) { - $report = '3col'; - array_shift( $argv ); -} elseif ( $argv[0] === '--classes' ) { - $report = 'classes'; - array_shift( $argv ); -} else { - $report = 'php'; +function errorCallback( $msg ) { + fwrite( STDERR, "ERROR: $msg\n" ); } -if ( !count( $argv ) ) { - echo "Usage: $self \n"; - exit( 1 ); -} +function dumpCoreAliases() { + global $argv; -$file = $argv[0]; + $self = array_shift( $argv ); -$autoload = AutoloadLoader::getAutoloadClasses( $file ); -if ( $autoload === false ) { - echo "Unable to open autoload file $file\n"; - exit( 1 ); -} + if ( !count( $argv ) ) { + echo "Usage: $self \n"; + exit( 1 ); + } -$ca = new CoreAliases( $autoload ); -$aliases = $ca->getAliases(); - -asort( $aliases ); - -$counts = []; -if ( $report === 'php' ) { - print " $new ) { - if ( $report === 'classes' ) { - print "$old\t$new\n"; - } elseif ( $report === 'php' ) { - print "\t'" . - strtr( $old, [ "\\" => "", "'" => "\\'" ] ) . - "' => '" . - strtr( $new, [ "\\" => "", "'" => "\\'" ] ) . - "',\n"; + if ( $argv[0] === '--counts' ) { + $report = 'counts'; + array_shift( $argv ); + } elseif ( $argv[0] === '--3col' ) { + $report = '3col'; + array_shift( $argv ); + } elseif ( $argv[0] === '--classes' ) { + $report = 'classes'; + array_shift( $argv ); } else { - if ( preg_match( '/(.*)([^]*)$/', $new, $m ) ) { - if ( $report === 'counts' ) { - if ( !isset( $counts[$m[1]] ) ) { - $counts[$m[1]] = 0; + $report = 'php'; + } + + if ( !count( $argv ) ) { + echo "Usage: $self \n"; + exit( 1 ); + } + + $file = $argv[0]; + + $autoload = AutoloadLoader::getAutoloadClasses( $file ); + if ( $autoload === false ) { + echo "Unable to open autoload file $file\n"; + exit( 1 ); + } + + $ca = new CoreAliases( $autoload, 'errorCallback', 'warnCallback' ); + $aliases = $ca->getAliases(); + + if ( $aliases === false ) { + exit( 1 ); + } + + asort( $aliases ); + + $counts = []; + if ( $report === 'php' ) { + print " $new ) { + if ( $report === 'classes' ) { + print "$old\t$new\n"; + } elseif ( $report === 'php' ) { + print "\t'" . + strtr( $old, [ "\\" => "", "'" => "\\'" ] ) . + "' => '" . + strtr( $new, [ "\\" => "", "'" => "\\'" ] ) . + "',\n"; + } else { + if ( preg_match( '/(.*)([^]*)$/', $new, $m ) ) { + if ( $report === 'counts' ) { + if ( !isset( $counts[$m[1]] ) ) { + $counts[$m[1]] = 0; + } + $counts[$m[1]]++; + } elseif ( $report === '3col' ) { + print "$old\t{$m[1]}\t{$m[2]}\n"; } - $counts[$m[1]]++; - } elseif ( $report === '3col' ) { - print
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Maintenance: add die() method
BryanDavis has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392363 ) Change subject: Maintenance: add die() method .. Maintenance: add die() method Deprecate the second argument to Maintenance::error() in favor of a new Maintenance::die() method. This is intended to make it easier to review flow control in maintenance scripts. Change-Id: I75699008638f7e99b11210c7bb9e2e131fca7c9e --- M maintenance/Maintenance.php M maintenance/backup.inc M maintenance/benchmarks/benchmarkJSMinPlus.php M maintenance/benchmarks/benchmarkParse.php M maintenance/benchmarks/benchmarkPurge.php M maintenance/benchmarks/benchmarkTidy.php M maintenance/changePassword.php M maintenance/checkComposerLockUpToDate.php M maintenance/cleanupSpam.php M maintenance/cleanupTitles.php M maintenance/cleanupUploadStash.php M maintenance/compareParsers.php M maintenance/convertExtensionToRegistration.php M maintenance/copyFileBackend.php M maintenance/copyJobQueue.php M maintenance/createAndPromote.php M maintenance/createCommonPasswordCdb.php M maintenance/deleteBatch.php M maintenance/deleteDefaultMessages.php M maintenance/deleteEqualMessages.php M maintenance/dumpBackup.php M maintenance/dumpIterator.php M maintenance/edit.php M maintenance/eraseArchivedFile.php M maintenance/exportSites.php M maintenance/findHooks.php M maintenance/findOrphanedFiles.php M maintenance/fixDoubleRedirects.php M maintenance/fixTimestamps.php M maintenance/formatInstallDoc.php M maintenance/generateJsonI18n.php M maintenance/generateSitemap.php M maintenance/getConfiguration.php M maintenance/getText.php M maintenance/hhvm/makeRepo.php M maintenance/importDump.php M maintenance/importImages.php M maintenance/importTextFiles.php M maintenance/install.php M maintenance/invalidateUserSessions.php M maintenance/language/generateCollationData.php M maintenance/language/generateNormalizerDataAr.php M maintenance/language/langmemusage.php M maintenance/makeTestEdits.php M maintenance/manageJobs.php M maintenance/mctest.php M maintenance/mergeMessageFileList.php M maintenance/migrateFileRepoLayout.php M maintenance/migrateUserGroup.php M maintenance/minify.php M maintenance/moveBatch.php M maintenance/mwdocgen.php M maintenance/pageExists.php M maintenance/populateContentModel.php M maintenance/populateImageSha1.php M maintenance/populateRevisionLength.php M maintenance/populateRevisionSha1.php M maintenance/protect.php M maintenance/pruneFileCache.php M maintenance/purgeParserCache.php M maintenance/reassignEdits.php M maintenance/rebuildFileCache.php M maintenance/rebuildLocalisationCache.php M maintenance/rebuildSitesCache.php M maintenance/rebuildrecentchanges.php M maintenance/rebuildtextindex.php M maintenance/recountCategories.php M maintenance/refreshImageMetadata.php M maintenance/refreshLinks.php M maintenance/removeUnusedAccounts.php M maintenance/renameDbPrefix.php M maintenance/resetUserEmail.php M maintenance/rollbackEdits.php M maintenance/runJobs.php M maintenance/shell.php M maintenance/sql.php M maintenance/sqlite.php M maintenance/storage/checkStorage.php M maintenance/storage/compressOld.php M maintenance/storage/dumpRev.php M maintenance/storage/orphanStats.php M maintenance/syncFileBackend.php M maintenance/undelete.php M maintenance/update.php M maintenance/updateDoubleWidthSearch.php M maintenance/updateExtensionJsonSchema.php M maintenance/updateRestrictions.php M maintenance/updateSpecialPages.php M maintenance/userOptions.php M maintenance/validateRegistrationFile.php M maintenance/view.php M maintenance/wrapOldPasswords.php 92 files changed, 259 insertions(+), 259 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/63/392363/1 diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php index d37b990..2f629e8 100644 --- a/maintenance/Maintenance.php +++ b/maintenance/Maintenance.php @@ -398,19 +398,31 @@ * Throw an error to the user. Doesn't respect --quiet, so don't use * this for non-error output * @param string $err The error to display -* @param int $die If > 0, go ahead and die out using this int as the code +* @param int $die Deprecated since 1.31, use Maintenance::die() instead */ protected function error( $err, $die = 0 ) { + if ( intval( $die ) !== 0 ) { + wfDeprecated( __METHOD__ . '( $err, $die )' , '1.31' ); + $this->die( $err, intval( $die ) ); + } $this->outputChanneled( false ); if ( PHP_SAPI == 'cli' ) { fwrite( STDERR, $err . "\n" ); } else { print $err; } - $die = intval( $die ); - if ( $die > 0 ) { - die( $die ); - } + } + + /** +* Output a message and
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Revert "[MCR] Readd various field & cond method tests for Re...
Hello Daniel Kinzler, Addshore, jenkins-bot, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/392362 to review the following change. Change subject: Revert "[MCR] Readd various field & cond method tests for Revision" .. Revert "[MCR] Readd various field & cond method tests for Revision" These tests break if $wgCommentTableSchemaMigrationStage is not MIGRATION_OLD. If you're going to re-add them, make sure they work regardless of this setting. This reverts commit b2ff18b9ed04fb20dfbf5675c8a3884c704d13bc. Change-Id: Iece09164d23089df0aba1ceef33cf1d6103bb52c --- M tests/phpunit/includes/RevisionTest.php 1 file changed, 0 insertions(+), 179 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/62/392362/1 diff --git a/tests/phpunit/includes/RevisionTest.php b/tests/phpunit/includes/RevisionTest.php index a4f55d0..b7e410c 100644 --- a/tests/phpunit/includes/RevisionTest.php +++ b/tests/phpunit/includes/RevisionTest.php @@ -577,183 +577,4 @@ $this->assertSame( 'BBAAA', $cache->get( $cacheKey ) ); } - /** -* @covers Revision::userJoinCond -*/ - public function testUserJoinCond() { - $this->hideDeprecated( 'Revision::userJoinCond' ); - $this->assertEquals( - [ 'LEFT JOIN', [ 'rev_user != 0', 'user_id = rev_user' ] ], - Revision::userJoinCond() - ); - } - - /** -* @covers Revision::pageJoinCond -*/ - public function testPageJoinCond() { - $this->hideDeprecated( 'Revision::pageJoinCond' ); - $this->assertEquals( - [ 'INNER JOIN', [ 'page_id = rev_page' ] ], - Revision::pageJoinCond() - ); - } - - public function provideSelectFields() { - yield [ - true, - [ - 'rev_id', - 'rev_page', - 'rev_text_id', - 'rev_timestamp', - 'rev_user_text', - 'rev_user', - 'rev_minor_edit', - 'rev_deleted', - 'rev_len', - 'rev_parent_id', - 'rev_sha1', - 'rev_comment_text' => 'rev_comment', - 'rev_comment_data' => 'NULL', - 'rev_comment_cid' => 'NULL', - 'rev_content_format', - 'rev_content_model', - ] - ]; - yield [ - false, - [ - 'rev_id', - 'rev_page', - 'rev_text_id', - 'rev_timestamp', - 'rev_user_text', - 'rev_user', - 'rev_minor_edit', - 'rev_deleted', - 'rev_len', - 'rev_parent_id', - 'rev_sha1', - 'rev_comment_text' => 'rev_comment', - 'rev_comment_data' => 'NULL', - 'rev_comment_cid' => 'NULL', - ] - ]; - } - - /** -* @dataProvider provideSelectFields -* @covers Revision::selectFields -* @todo a true unit test would mock CommentStore -*/ - public function testSelectFields( $contentHandlerUseDB, $expected ) { - $this->hideDeprecated( 'Revision::selectFields' ); - $this->setMwGlobals( 'wgContentHandlerUseDB', $contentHandlerUseDB ); - $this->assertEquals( $expected, Revision::selectFields() ); - } - - public function provideSelectArchiveFields() { - yield [ - true, - [ - 'ar_id', - 'ar_page_id', - 'ar_rev_id', - 'ar_text', - 'ar_text_id', - 'ar_timestamp', - 'ar_user_text', - 'ar_user', - 'ar_minor_edit', - 'ar_deleted', - 'ar_len', - 'ar_parent_id', - 'ar_sha1', -
[MediaWiki-commits] [Gerrit] mediawiki...SocialProfile[master]: Convert SystemGifts to use extension registration
SamanthaNguyen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392361 ) Change subject: Convert SystemGifts to use extension registration .. Convert SystemGifts to use extension registration Bug: T152865 Change-Id: Ia077907a113afeb9da91e45f8922af6be08df38c --- M SocialProfile.php D SystemGifts/SystemGifts.php A SystemGifts/extension.json M SystemGifts/i18n/en.json M SystemGifts/i18n/qqq.json 5 files changed, 102 insertions(+), 106 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SocialProfile refs/changes/61/392361/1 diff --git a/SocialProfile.php b/SocialProfile.php index 15f5a28..7ea60c0 100644 --- a/SocialProfile.php +++ b/SocialProfile.php @@ -161,8 +161,10 @@ // Loader files require_once( "$IP/extensions/SocialProfile/UserProfile/UserProfile.php" ); // Profile page configuration loader file require_once( "$IP/extensions/SocialProfile/UserGifts/Gifts.php" ); // UserGifts (user-to-user gifting functionality) loader file -require_once( "$IP/extensions/SocialProfile/SystemGifts/SystemGifts.php" ); // SystemGifts (awards functionality) loader file -wfLoadExtension( 'SocialProfile/UserActivity' ); // UserActivity - recent social changes +wfLoadExtensions( [ + 'SocialProfile/SystemGifts', // SystemGifts (awards functionality) + 'SocialProfile/UserActivity' // UserActivity - recent social changes +] ); $wgHooks['BeforePageDisplay'][] = 'SocialProfileHooks::onBeforePageDisplay'; $wgHooks['CanonicalNamespaces'][] = 'SocialProfileHooks::onCanonicalNamespaces'; diff --git a/SystemGifts/SystemGifts.php b/SystemGifts/SystemGifts.php deleted file mode 100644 index 6979ae0..000 --- a/SystemGifts/SystemGifts.php +++ /dev/null @@ -1,104 +0,0 @@ - 'SystemGift.css', - 'localBasePath' => __DIR__, - 'remoteExtPath' => 'SocialProfile/SystemGifts', - 'position' => 'top' -); - -$wgResourceModules['ext.socialprofile.special.removemastersystemgift.css'] = array( - 'styles' => 'SpecialRemoveMasterSystemGift.css', - 'localBasePath' => __DIR__, - 'remoteExtPath' => 'SocialProfile/SystemGifts', - 'position' => 'top' -); - -$wgResourceModules['ext.socialprofile.special.systemgiftmanager.css'] = array( - 'styles' => 'SpecialSystemGiftManager.css', - 'localBasePath' => __DIR__, - 'remoteExtPath' => 'SocialProfile/SystemGifts', - 'position' => 'top' -); - -$wgResourceModules['ext.socialprofile.special.systemgiftmanagerlogo.css'] = array( - 'styles' => 'SpecialSystemGiftManagerLogo.css', - 'localBasePath' => __DIR__, - 'remoteExtPath' => 'SocialProfile/SystemGifts', - 'position' => 'top' -); - -$wgResourceModules['ext.socialprofile.special.topawards.css'] = array( - 'styles' => 'SpecialTopAwards.css', - 'localBasePath' => __DIR__, - 'remoteExtPath' => 'SocialProfile/SystemGifts', - 'position' => 'top' -); - -$wgResourceModules['ext.socialprofile.special.viewsystemgift.css'] = array( - 'styles' => 'SpecialViewSystemGift.css', - 'localBasePath' => __DIR__, - 'remoteExtPath' => 'SocialProfile/SystemGifts', - 'position' => 'top' -); - -$wgResourceModules['ext.socialprofile.special.viewsystemgifts.css'] = array( - 'styles' => 'SpecialViewSystemGifts.css', - 'localBasePath' => __DIR__, - 'remoteExtPath' => 'SocialProfile/SystemGifts', - 'position' => 'top' -); - -// Echo (Notifications) stuff -$wgAutoloadClasses['EchoUserSystemGiftPresentationModel'] = "{$wgSystemGiftsDirectory}/EchoUserSystemGiftPresentationModel.php"; - -$wgHooks['BeforeCreateEchoEvent'][] = 'UserSystemGiftsHooks::onBeforeCreateEchoEvent'; -$wgHooks['EchoGetDefaultNotifiedUsers'][] = 'UserSystemGiftsHooks::onEchoGetDefaultNotifiedUsers'; -$wgHooks['EchoGetBundleRules'][] = 'UserSystemGiftsHooks::onEchoGetBundleRules'; - -$wgDefaultUserOptions['echo-subscriptions-web-social-award'] = true; -$wgDefaultUserOptions['echo-subscriptions-email-social-award'] = false; diff --git a/SystemGifts/extension.json b/SystemGifts/extension.json new file mode 100644 index 000..eebc98b --- /dev/null +++ b/SystemGifts/extension.json @@ -0,0 +1,96 @@ +{ + "name": "SystemGifts", + "author": [ + "Aaron Wright", + "David Pean", + "Jack Phoenix" + ], + "license-name": "GPL-2.0+", + "descriptionmsg": "systemgifts-desc", + "type": "other", + "MessagesDirs": { + "SystemGifts": [ + "i18n" + ] + }, + "ExtensionMessagesFiles": { + "SystemGiftsAlias": "SystemGifts.alias.php" + }, + "AutoloadClasses": { + "SystemGifts": "SystemGiftsClass.php", + "UserSystemGifts": "UserSystemGiftsClass.php", + "UserSystemGiftsHooks": "UserSystemGiftsHooks.php", +
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Improve documentation of $wgReferrerPolicy
Gergő Tisza has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392360 ) Change subject: Improve documentation of $wgReferrerPolicy .. Improve documentation of $wgReferrerPolicy Reference current version of the spec. Change-Id: I1cca89b9e46a2b5ae8242715eddfdbd23ccb2d83 --- M includes/DefaultSettings.php 1 file changed, 9 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/60/392360/1 diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 3cd7ef1..90277da 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -320,10 +320,16 @@ /** * Value for the referrer policy meta tag. - * One of 'never', 'default', 'origin', 'always'. Setting it to false just - * prevents the meta tag from being output. - * See https://www.w3.org/TR/referrer-policy/ for details. + * One of the values defined in the Referrer Policy specification: + * https://w3c.github.io/webappsec-referrer-policy/ + * ('no-referrer', 'no-referrer-when-downgrade', 'same-origin', + * 'origin', 'strict-origin', 'origin-when-cross-origin', + * 'strict-origin-when-cross-origin', or 'unsafe-url') + * Setting it to false prevents the meta tag from being output + * (which results in falling back to the Referrer-Policy header, + * or 'no-referrer-when-downgrade' if that's not set either.) * + * @var string|bool * @since 1.25 */ $wgReferrerPolicy = false; -- To view, visit https://gerrit.wikimedia.org/r/392360 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1cca89b9e46a2b5ae8242715eddfdbd23ccb2d83 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gergő Tisza___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...BatchUserRights[master]: [WIP] Add GENDER support for 'batchuserrights-userload-error'
MarcoAurelio has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392359 ) Change subject: [WIP] Add GENDER support for 'batchuserrights-userload-error' .. [WIP] Add GENDER support for 'batchuserrights-userload-error' Bug: T128553 Change-Id: I67f85b4ba99efbc26d32f82be679851c592b2334 --- 0 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BatchUserRights refs/changes/59/392359/1 -- To view, visit https://gerrit.wikimedia.org/r/392359 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I67f85b4ba99efbc26d32f82be679851c592b2334 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BatchUserRights Gerrit-Branch: master Gerrit-Owner: MarcoAurelioGerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...SocialProfile[master]: Convert UserRelationship to use extension registration
SamanthaNguyen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392340 ) Change subject: Convert UserRelationship to use extension registration .. Convert UserRelationship to use extension registration Bug: T152865 Change-Id: Ia43cdc132314f784a785904fc03fb844df5cbbcb --- M SocialProfile.php A UserRelationship/extension.json M UserRelationship/i18n/en.json M UserRelationship/i18n/qqq.json 4 files changed, 63 insertions(+), 31 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SocialProfile refs/changes/40/392340/1 diff --git a/SocialProfile.php b/SocialProfile.php index 15f5a28..001b669 100644 --- a/SocialProfile.php +++ b/SocialProfile.php @@ -29,7 +29,6 @@ $wgMessagesDirs['SocialProfileUserBoard'] = __DIR__ . '/UserBoard/i18n'; $wgMessagesDirs['SocialProfileUserProfile'] = __DIR__ . '/UserProfile/i18n'; -$wgMessagesDirs['SocialProfileUserRelationship'] = __DIR__ . '/UserRelationship/i18n'; $wgMessagesDirs['SocialProfileUserStats'] = __DIR__ . '/UserStats/i18n'; $wgExtensionMessagesFiles['SocialProfileNamespaces'] = __DIR__ . '/SocialProfile.namespaces.php'; @@ -38,19 +37,14 @@ // Classes to be autoloaded $wgAutoloadClasses['GenerateTopUsersReport'] = __DIR__ . '/UserStats/GenerateTopUsersReport.php'; $wgAutoloadClasses['EchoUserBoardMessagePresentationModel'] = __DIR__ . '/UserBoard/EchoUserBoardMessagePresentationModel.php'; -$wgAutoloadClasses['EchoUserRelationshipPresentationModel'] = __DIR__ . '/UserRelationship/EchoUserRelationshipPresentationModel.php'; $wgAutoloadClasses['EchoUserLevelAdvancePresentationModel'] = __DIR__ . '/UserStats/EchoUserLevelAdvancePresentationModel.php'; -$wgAutoloadClasses['SpecialAddRelationship'] = __DIR__ . '/UserRelationship/SpecialAddRelationship.php'; $wgAutoloadClasses['SpecialBoardBlast'] = __DIR__ . '/UserBoard/SpecialSendBoardBlast.php'; $wgAutoloadClasses['SpecialEditProfile'] = __DIR__ . '/UserProfile/SpecialEditProfile.php'; $wgAutoloadClasses['SpecialPopulateUserProfiles'] = __DIR__ . '/UserProfile/SpecialPopulateExistingUsersProfiles.php'; -$wgAutoloadClasses['SpecialRemoveRelationship'] = __DIR__ . '/UserRelationship/SpecialRemoveRelationship.php'; $wgAutoloadClasses['SpecialToggleUserPage'] = __DIR__ . '/UserProfile/SpecialToggleUserPageType.php'; $wgAutoloadClasses['SpecialUpdateProfile'] = __DIR__ . '/UserProfile/SpecialUpdateProfile.php'; $wgAutoloadClasses['SpecialUploadAvatar'] = __DIR__ . '/UserProfile/SpecialUploadAvatar.php'; $wgAutoloadClasses['UploadAvatar'] = __DIR__ . '/UserProfile/SpecialUploadAvatar.php'; -$wgAutoloadClasses['SpecialViewRelationshipRequests'] = __DIR__ . '/UserRelationship/SpecialViewRelationshipRequests.php'; -$wgAutoloadClasses['SpecialViewRelationships'] = __DIR__ . '/UserRelationship/SpecialViewRelationships.php'; $wgAutoloadClasses['SpecialViewUserBoard'] = __DIR__ . '/UserBoard/SpecialUserBoard.php'; $wgAutoloadClasses['RemoveAvatar'] = __DIR__ . '/UserProfile/SpecialRemoveAvatar.php'; $wgAutoloadClasses['UpdateEditCounts'] = __DIR__ . '/UserStats/SpecialUpdateEditCounts.php'; @@ -59,8 +53,6 @@ $wgAutoloadClasses['UserProfile'] = __DIR__ . '/UserProfile/UserProfileClass.php'; $wgAutoloadClasses['UserProfileHooks'] = __DIR__ . '/UserProfile/UserProfileHooks.php'; $wgAutoloadClasses['UserProfilePage'] = __DIR__ . '/UserProfile/UserProfilePage.php'; -$wgAutoloadClasses['UserRelationship'] = __DIR__ . '/UserRelationship/UserRelationshipClass.php'; -$wgAutoloadClasses['UserRelationshipHooks'] = __DIR__ . '/UserRelationship/UserRelationshipHooks.php'; $wgAutoloadClasses['UserStatsHooks'] = __DIR__ . '/UserStats/UserStatsHooks.php'; $wgAutoloadClasses['UserLevel'] = __DIR__ . '/UserStats/UserStatsClass.php'; $wgAutoloadClasses['UserStats'] = __DIR__ . '/UserStats/UserStatsClass.php'; @@ -83,9 +75,6 @@ $wgAutoloadClasses['ApiSendUserBoardMessage'] = __DIR__ . '/UserBoard/ApiSendUserBoardMessage.php'; $wgAPIModules['socialprofile-send-message'] = 'ApiSendUserBoardMessage'; -$wgAutoloadClasses['ApiRelationshipResponse'] = __DIR__ . '/UserRelationship/ApiRelationshipResponse.php'; -$wgAPIModules['socialprofile-request-response'] = 'ApiRelationshipResponse'; - // Echo (Notifications) stuff // UserBoard $wgHooks['BeforeCreateEchoEvent'][] = 'UserBoardHooks::onBeforeCreateEchoEvent'; @@ -94,10 +83,6 @@ $wgDefaultUserOptions['echo-subscriptions-web-social-msg'] = true; $wgDefaultUserOptions['echo-subscriptions-email-social-msg'] = false; - -// UserRelationship -$wgHooks['BeforeCreateEchoEvent'][] = 'UserRelationshipHooks::onBeforeCreateEchoEvent'; -$wgHooks['EchoGetDefaultNotifiedUsers'][] = 'UserRelationshipHooks::onEchoGetDefaultNotifiedUsers'; $wgDefaultUserOptions['echo-subscriptions-web-social-rel'] = true; $wgDefaultUserOptions['echo-subscriptions-email-social-rel'] = false; @@ -162,7 +147,10 @@ require_once(
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: noc: Link to Grafana instead of Ganglia
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/392317 ) Change subject: noc: Link to Grafana instead of Ganglia .. noc: Link to Grafana instead of Ganglia Closes https://github.com/wikimedia/operations-mediawiki-config/pull/12. Change-Id: I43142b672369b1a9a1cc6a3deff92f456b27fa1a --- M docroot/noc/index.html 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/docroot/noc/index.html b/docroot/noc/index.html index 17fcef9..039e899 100644 --- a/docroot/noc/index.html +++ b/docroot/noc/index.html @@ -25,7 +25,7 @@ Core DB Replication Layout and Lag DB clusters Database cluster info - https://ganglia.wikimedia.org/;>Ganglia + https://grafana.wikimedia.org/;>Grafana Server utilization https://phabricator.wikimedia.org/;>Phabricator Bug tracker -- To view, visit https://gerrit.wikimedia.org/r/392317 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I43142b672369b1a9a1cc6a3deff92f456b27fa1a Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: KrinkleGerrit-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] operations/mediawiki-config[master]: noc: Link to Grafana instead of Ganglia
Krinkle has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392317 ) Change subject: noc: Link to Grafana instead of Ganglia .. noc: Link to Grafana instead of Ganglia Closes https://github.com/wikimedia/operations-mediawiki-config/pull/12. Change-Id: I43142b672369b1a9a1cc6a3deff92f456b27fa1a --- M docroot/noc/index.html 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/17/392317/1 diff --git a/docroot/noc/index.html b/docroot/noc/index.html index 17fcef9..039e899 100644 --- a/docroot/noc/index.html +++ b/docroot/noc/index.html @@ -25,7 +25,7 @@ Core DB Replication Layout and Lag DB clusters Database cluster info - https://ganglia.wikimedia.org/;>Ganglia + https://grafana.wikimedia.org/;>Grafana Server utilization https://phabricator.wikimedia.org/;>Phabricator Bug tracker -- To view, visit https://gerrit.wikimedia.org/r/392317 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I43142b672369b1a9a1cc6a3deff92f456b27fa1a Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Krinkle___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: mariadb: Depool db1100, pool db1071 instead
Jcrespo has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/392316 ) Change subject: mariadb: Depool db1100, pool db1071 instead .. mariadb: Depool db1100, pool db1071 instead Change-Id: I350e349fb52618440ad83188b3cabd4069167cfe --- M wmf-config/db-eqiad.php 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: jenkins-bot: Verified Jcrespo: Looks good to me, approved diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index 831b6ba..8f6bdb0 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -145,13 +145,13 @@ 's5' => [ 'db1070' => 0, # D1 2.8TB 160GB, master # 'db1063' => 0, # C5 2.8TB 128GB, master, crashed #T180714 - # 'db1071' => 1, # D1 2.8TB 160GB, future s8 master + 'db1071' => 1, # D1 2.8TB 160GB, future s8 master, vslow, dump '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 #T174569 'db1099' => 1, # B2 3.6TB 512GB, watchlist, recentchanges, contributions, logpager - 'db1100' => 1, # C2 3.6TB 512GB, old master, vslow + # 'db1100' => 1, # C2 3.6TB 512GB, old master, vslow 'db1104' => 300, # B3 3.6TB 512GB, api 'db1106' => 500, # D3 3.6TB 512GB ], @@ -382,10 +382,10 @@ ], 's5' => [ 'vslow' => [ - 'db1100' => 1, + 'db1071' => 1, ], 'dump' => [ - 'db1100' => 1, + 'db1071' => 1, ], 'api' => [ 'db1082' => 1, -- To view, visit https://gerrit.wikimedia.org/r/392316 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I350e349fb52618440ad83188b3cabd4069167cfe Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: JcrespoGerrit-Reviewer: Jcrespo 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]: mariadb: Depool db1100, pool db1071 instead
Jcrespo has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392316 ) Change subject: mariadb: Depool db1100, pool db1071 instead .. mariadb: Depool db1100, pool db1071 instead Change-Id: I350e349fb52618440ad83188b3cabd4069167cfe --- 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/16/392316/1 diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index 831b6ba..8f6bdb0 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -145,13 +145,13 @@ 's5' => [ 'db1070' => 0, # D1 2.8TB 160GB, master # 'db1063' => 0, # C5 2.8TB 128GB, master, crashed #T180714 - # 'db1071' => 1, # D1 2.8TB 160GB, future s8 master + 'db1071' => 1, # D1 2.8TB 160GB, future s8 master, vslow, dump '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 #T174569 'db1099' => 1, # B2 3.6TB 512GB, watchlist, recentchanges, contributions, logpager - 'db1100' => 1, # C2 3.6TB 512GB, old master, vslow + # 'db1100' => 1, # C2 3.6TB 512GB, old master, vslow 'db1104' => 300, # B3 3.6TB 512GB, api 'db1106' => 500, # D3 3.6TB 512GB ], @@ -382,10 +382,10 @@ ], 's5' => [ 'vslow' => [ - 'db1100' => 1, + 'db1071' => 1, ], 'dump' => [ - 'db1100' => 1, + 'db1071' => 1, ], 'api' => [ 'db1082' => 1, -- To view, visit https://gerrit.wikimedia.org/r/392316 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I350e349fb52618440ad83188b3cabd4069167cfe Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Jcrespo___ 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: Load 0 for db1100
Marostegui has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392315 ) Change subject: db-eqiad.php: Load 0 for db1100 .. db-eqiad.php: Load 0 for db1100 db1100 is serving vslow service, it should have weight 0 Change-Id: I5a1dc75dc22f7a2378a832780301654953f1c1dd --- 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/15/392315/1 diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index 831b6ba..274093b 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -151,7 +151,7 @@ 'db1092' => 500, # D2 3.6TB 512GB 'db1096' => 1, # A6 3.6TB 512GB, watchlist, recentchanges, contributions, logpager #T174569 'db1099' => 1, # B2 3.6TB 512GB, watchlist, recentchanges, contributions, logpager - 'db1100' => 1, # C2 3.6TB 512GB, old master, vslow + 'db1100' => 0, # C2 3.6TB 512GB, old master, vslow 'db1104' => 300, # B3 3.6TB 512GB, api 'db1106' => 500, # D3 3.6TB 512GB ], -- To view, visit https://gerrit.wikimedia.org/r/392315 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5a1dc75dc22f7a2378a832780301654953f1c1dd 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] pywikibot/core[master]: [bugfix] fix xml decoding
Xqt has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392314 ) Change subject: [bugfix] fix xml decoding .. [bugfix] fix xml decoding - read xml encoding from xml file if no charset is given - use utf-8 as default Bug: T180915 Change-Id: I4091eb8428b2c0bffbda657ee59583857363e1d5 --- M pywikibot/comms/threadedhttp.py 1 file changed, 9 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/14/392314/1 diff --git a/pywikibot/comms/threadedhttp.py b/pywikibot/comms/threadedhttp.py index 4e1f9e1..a52b758 100644 --- a/pywikibot/comms/threadedhttp.py +++ b/pywikibot/comms/threadedhttp.py @@ -1,13 +1,14 @@ # -*- coding: utf-8 -*- """Http backend layer, formerly providing a httplib2 wrapper.""" from __future__ import absolute_import, unicode_literals -# (C) Pywikibot team, 2007-2015 +# (C) Pywikibot team, 2007-2017 __version__ = '$Id$' __docformat__ = 'epytext' # standard python libraries import codecs +import re import sys if sys.version_info[0] > 2: @@ -127,6 +128,13 @@ elif 'json' in content_type: # application/json | application/sparql-results+json self._header_encoding = 'utf-8' +elif 'xml' in content_type: +header = self.raw[:100].splitlines()[0] +m = re.search('encoding="(?P.+)"', header) +if m: +self._header_encoding = m.group('encoding') +else: +self._header_encoding = 'utf-8' else: self._header_encoding = None return self._header_encoding -- To view, visit https://gerrit.wikimedia.org/r/392314 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4091eb8428b2c0bffbda657ee59583857363e1d5 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Xqt___ 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 (cca896ac3)
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/391978 ) Change subject: Update VE core submodule to master (cca896ac3) .. Update VE core submodule to master (cca896ac3) New changes: c7ef30a30 Get a ve.ce.BranchNode position's corresponding DOM position 5f9b3f5d1 Localisation updates from https://translatewiki.net. Change-Id: I3456a20420153b1c31fa39b0541f6b93b7d582ec --- M lib/ve 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Esanders: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/ve b/lib/ve index 7d7966d..cca896a 16 --- a/lib/ve +++ b/lib/ve @@ -1 +1 @@ -Subproject commit 7d7966df9c7135dcb78a24dfc2a81f0dd76da7b5 +Subproject commit cca896ac37fe2b8c9c049542fb1ec9062d158062 -- To view, visit https://gerrit.wikimedia.org/r/391978 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3456a20420153b1c31fa39b0541f6b93b7d582ec Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: JforresterGerrit-Reviewer: Esanders Gerrit-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] mediawiki/core[master]: Move Specia:UserRights css to existing css module
Reedy has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392313 ) Change subject: Move Specia:UserRights css to existing css module .. Move Specia:UserRights css to existing css module Bug: T180914 Change-Id: I0e3cf5e3d69f32a30e5fe6dc0d2fd964c4f5720c --- M includes/specials/SpecialUserrights.php M resources/src/mediawiki.special/mediawiki.special.css M resources/src/mediawiki.special/mediawiki.special.userrights.css 3 files changed, 12 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/13/392313/1 diff --git a/includes/specials/SpecialUserrights.php b/includes/specials/SpecialUserrights.php index 0a712ef..142093a 100644 --- a/includes/specials/SpecialUserrights.php +++ b/includes/specials/SpecialUserrights.php @@ -140,7 +140,6 @@ $this->setHeaders(); $this->outputHeader(); - $out->addModuleStyles( 'mediawiki.special' ); $this->addHelpLink( 'Help:Assigning permissions' ); $this->switchForm(); diff --git a/resources/src/mediawiki.special/mediawiki.special.css b/resources/src/mediawiki.special/mediawiki.special.css index 7f3b09a..5d0ec49 100644 --- a/resources/src/mediawiki.special/mediawiki.special.css +++ b/resources/src/mediawiki.special/mediawiki.special.css @@ -122,16 +122,3 @@ color: #72777d; font-size: 90%; } - -/* Special:UserRights */ -.mw-userrights-disabled { - color: #72777d; -} -.mw-userrights-groups * td, -.mw-userrights-groups * th { - padding-right: 1.5em; -} - -.mw-userrights-groups * th { - text-align: left; -} diff --git a/resources/src/mediawiki.special/mediawiki.special.userrights.css b/resources/src/mediawiki.special/mediawiki.special.userrights.css index a4b4087..acfdb56 100644 --- a/resources/src/mediawiki.special/mediawiki.special.userrights.css +++ b/resources/src/mediawiki.special/mediawiki.special.userrights.css @@ -10,3 +10,15 @@ display: inline-block; vertical-align: middle; } + +.mw-userrights-disabled { + color: #72777d; +} +.mw-userrights-groups * td, +.mw-userrights-groups * th { + padding-right: 1.5em; +} + +.mw-userrights-groups * th { + text-align: left; +} -- To view, visit https://gerrit.wikimedia.org/r/392313 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0e3cf5e3d69f32a30e5fe6dc0d2fd964c4f5720c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Reedy___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...SpamDiffTool[master]: Correctly access properties of DifferenceEngine
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/392311 ) Change subject: Correctly access properties of DifferenceEngine .. Correctly access properties of DifferenceEngine Regression from (and follow up to) I83f030e6628534d9b76fbd4f8ece9833de8f39ac Change-Id: I43c45ec49df87bae744f1a04feca369181911778 --- M SpamDiffTool.body.php M extension.json 2 files changed, 3 insertions(+), 3 deletions(-) Approvals: Jack Phoenix: Looks good to me, approved jenkins-bot: Verified diff --git a/SpamDiffTool.body.php b/SpamDiffTool.body.php index 9554062..3aa0607 100644 --- a/SpamDiffTool.body.php +++ b/SpamDiffTool.body.php @@ -243,8 +243,8 @@ $de = new DifferenceEngine( $title, $oldid, $diff, $rcid ); $de->loadText(); - $ocontent = $de->$mOldRev->getContent(); - $ncontent = $de->$mNewRev->getContent(); + $ocontent = $de->mOldRev->getContent(); + $ncontent = $de->mNewRev->getContent(); $otext = ContentHandler::getContentText( $ocontent ); $ntext = ContentHandler::getContentText( $ncontent ); $ota = explode( "\n", $wgContLang->segmentForDiff( $otext ) ); diff --git a/extension.json b/extension.json index ae08810..c602da5 100644 --- a/extension.json +++ b/extension.json @@ -1,6 +1,6 @@ { "name": "SpamDiffTool", - "version": "1.1", + "version": "1.1.1", "author": [ "Travis Derouin", "Alexandre Emsenhuber", -- To view, visit https://gerrit.wikimedia.org/r/392311 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I43c45ec49df87bae744f1a04feca369181911778 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SpamDiffTool Gerrit-Branch: master Gerrit-Owner: SamanthaNguyenGerrit-Reviewer: Jack Phoenix Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Enable wgNamespacesWithSubpages for hiwikiversity
Jayprakash12345 has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392312 ) Change subject: Enable wgNamespacesWithSubpages for hiwikiversity .. Enable wgNamespacesWithSubpages for hiwikiversity Change-Id: I407f726ba5c0baf6b2a0516b60b73bef900c5cc3 --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/12/392312/2 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index dd734f2..9a02f6e 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -4706,6 +4706,7 @@ ], '+fiwikiversity' => [ 0 => 1, 6 => 0, 8 => 0, 10 => 0 ], '+frwikiversity' => [ 0 => 1, 6 => 0, 8 => 0, 112 => 1, 113 => 1 ], + '+hiwikiversity' => [ 0 => 1 ], // T180913 '+itwikiversity' => [ 0 => 1, 6 => 0, 8 => 0, 14 => 0 ], '+ptwikiversity' => [ 0 => 1, 10 => 0 ], '+ruwikiversity' => [ 0 => 1, 6 => 1, 14 => 1 ], -- To view, visit https://gerrit.wikimedia.org/r/392312 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I407f726ba5c0baf6b2a0516b60b73bef900c5cc3 Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Jayprakash12345 <0freerunn...@gmail.com> Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...SpamDiffTool[master]: Correctly access properties of DifferenceEngine
SamanthaNguyen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392311 ) Change subject: Correctly access properties of DifferenceEngine .. Correctly access properties of DifferenceEngine Regression from (and follow up to) I83f030e6628534d9b76fbd4f8ece9833de8f39ac Change-Id: I43c45ec49df87bae744f1a04feca369181911778 --- M SpamDiffTool.body.php M extension.json 2 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SpamDiffTool refs/changes/11/392311/1 diff --git a/SpamDiffTool.body.php b/SpamDiffTool.body.php index 9554062..3aa0607 100644 --- a/SpamDiffTool.body.php +++ b/SpamDiffTool.body.php @@ -243,8 +243,8 @@ $de = new DifferenceEngine( $title, $oldid, $diff, $rcid ); $de->loadText(); - $ocontent = $de->$mOldRev->getContent(); - $ncontent = $de->$mNewRev->getContent(); + $ocontent = $de->mOldRev->getContent(); + $ncontent = $de->mNewRev->getContent(); $otext = ContentHandler::getContentText( $ocontent ); $ntext = ContentHandler::getContentText( $ncontent ); $ota = explode( "\n", $wgContLang->segmentForDiff( $otext ) ); diff --git a/extension.json b/extension.json index ae08810..c602da5 100644 --- a/extension.json +++ b/extension.json @@ -1,6 +1,6 @@ { "name": "SpamDiffTool", - "version": "1.1", + "version": "1.1.1", "author": [ "Travis Derouin", "Alexandre Emsenhuber", -- To view, visit https://gerrit.wikimedia.org/r/392311 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I43c45ec49df87bae744f1a04feca369181911778 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SpamDiffTool Gerrit-Branch: master Gerrit-Owner: SamanthaNguyen___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: planet: Update template / css / item look
Paladox has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/389498 ) Change subject: planet: Update template / css / item look .. planet: Update template / css / item look Change-Id: Ie82be0398e1fd23ad495243e4b79ee185862a9db --- 0 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/98/389498/1 -- To view, visit https://gerrit.wikimedia.org/r/389498 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie82be0398e1fd23ad495243e4b79ee185862a9db Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: PaladoxGerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Wikidata[master]: New Wikidata Build - 2017-11-19T10:00:02+0000
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/392301 ) Change subject: New Wikidata Build - 2017-11-19T10:00:02+ .. New Wikidata Build - 2017-11-19T10:00:02+ Change-Id: Icc11ed4399091b322ddf18d1b9041ae482d4ed10 --- M composer.lock M extensions/ArticlePlaceholder/i18n/fa.json M extensions/Constraints/i18n/cs.json M extensions/Constraints/i18n/ko.json M extensions/Wikibase/client/i18n/ais.json M extensions/Wikibase/lib/i18n/fa.json M extensions/Wikibase/repo/i18n/ais.json M extensions/Wikibase/repo/i18n/be-tarask.json M extensions/Wikibase/repo/i18n/fa.json M vendor/composer/installed.json 10 files changed, 46 insertions(+), 19 deletions(-) Approvals: Aude: Looks good to me, approved jenkins-bot: Verified diff --git a/composer.lock b/composer.lock index ecc5814..dc4b699 100644 --- a/composer.lock +++ b/composer.lock @@ -665,12 +665,12 @@ "source": { "type": "git", "url": "https://github.com/wikimedia/mediawiki-extensions-ArticlePlaceholder.git;, -"reference": "5a91118980af5a58c976a78636e601474d2fb6bc" +"reference": "c2861951013fec4075fb62c27c66440957bdbc3b" }, "dist": { "type": "zip", -"url": "https://api.github.com/repos/wikimedia/mediawiki-extensions-ArticlePlaceholder/zipball/5a91118980af5a58c976a78636e601474d2fb6bc;, -"reference": "5a91118980af5a58c976a78636e601474d2fb6bc", +"url": "https://api.github.com/repos/wikimedia/mediawiki-extensions-ArticlePlaceholder/zipball/c2861951013fec4075fb62c27c66440957bdbc3b;, +"reference": "c2861951013fec4075fb62c27c66440957bdbc3b", "shasum": "" }, "require": { @@ -694,7 +694,7 @@ ], "description": "Provides a special page with Wikibase information about a certain topic, with invitation to create an article for the topic", "homepage": "https://www.mediawiki.org/wiki/Extension:ArticlePlaceholder;, -"time": "2017-11-13 14:15:16" +"time": "2017-11-18 21:33:47" }, { "name": "propertysuggester/property-suggester", @@ -855,7 +855,7 @@ "source": { "type": "git", "url": "https://gerrit.wikimedia.org/r/mediawiki/extensions/WikibaseQualityConstraints;, -"reference": "d36cca9ae75d1f7bfb714ac9931fcee99c797bc0" +"reference": "164ad69ca0328eea7bf2444b75465b5d6af61276" }, "require": { "php": ">=5.5.9", @@ -906,7 +906,7 @@ "support": { "issues": "https://phabricator.wikimedia.org/project/profile/1202/; }, -"time": "2017-11-17 22:04:34" +"time": "2017-11-18 22:05:03" }, { "name": "wikibase/data-model", @@ -1228,7 +1228,7 @@ "source": { "type": "git", "url": "https://gerrit.wikimedia.org/r/mediawiki/extensions/Wikibase;, -"reference": "6a45c37dd0059fb77f88d646e23ad62ad542ee7f" +"reference": "2bfdde926bd25f64db4fe23313f37973e56304e8" }, "require": { "composer/installers": ">=1.0.1", @@ -1289,7 +1289,7 @@ "issues": "https://phabricator.wikimedia.org/;, "irc": "irc://irc.freenode.net/wikidata" }, -"time": "2017-11-17 22:04:11" +"time": "2017-11-18 22:04:37" }, { "name": "wikibase/wikimedia-badges", diff --git a/extensions/ArticlePlaceholder/i18n/fa.json b/extensions/ArticlePlaceholder/i18n/fa.json index ed4bee1..87beb2f 100644 --- a/extensions/ArticlePlaceholder/i18n/fa.json +++ b/extensions/ArticlePlaceholder/i18n/fa.json @@ -7,6 +7,7 @@ }, "createtopicpage": "ایجاد صفحه", "articleplaceholder-abouttopic": "درباره موضوع", + "articleplaceholder-abouttopic-no-entity-error": "این یک شناسه معتبر آیتم نیست.", "articleplaceholder-abouttopic-create-article-title": "یک مقاله جدید بسازید", "articleplaceholder-abouttopic-create-article-label": "عنوان مقاله", "articleplaceholder-abouttopic-create-article-mandatory": "عنوان مقاله اجباری است.", diff --git a/extensions/Constraints/i18n/cs.json b/extensions/Constraints/i18n/cs.json index 62bf7ba..3ca5fe8 100644 --- a/extensions/Constraints/i18n/cs.json +++ b/extensions/Constraints/i18n/cs.json @@ -42,6 +42,8 @@ "wbqc-parameterissues-long": "Tyto nedostatky jsou problémy definice omezení na vlastnosti, nikoli tohoto výroku.", "wbqc-constrainttypehelp-short": "Nápověda", "wbqc-constrainttypehelp-long": "Stránka s nápovědou pro tento typ omezení", + "wbqc-cached-generic": "Tato
[MediaWiki-commits] [Gerrit] mediawiki...Scribunto[master]: Add a property "talkNsText" to mw.title objects
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392309 ) Change subject: Add a property "talkNsText" to mw.title objects .. Add a property "talkNsText" to mw.title objects Bug:T180911 Change-Id: I847ac4b7587b98be06b25fe14765e9efdc7b774d --- M engines/LuaCommon/lualib/mw.title.lua 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Scribunto refs/changes/09/392309/1 diff --git a/engines/LuaCommon/lualib/mw.title.lua b/engines/LuaCommon/lualib/mw.title.lua index 5cd72ab..9f4ea53 100644 --- a/engines/LuaCommon/lualib/mw.title.lua +++ b/engines/LuaCommon/lualib/mw.title.lua @@ -63,6 +63,10 @@ data.subjectNsText = ns.subject.name data.canTalk = ns.talk ~= nil + if ns.talk ~= nil then + data.talkNsText = ns.talk.name + end + data.prefixedText = data.text if data.nsText ~= '' then data.prefixedText = string.gsub( data.nsText .. ':' .. data.prefixedText, '_', ' ' ) -- To view, visit https://gerrit.wikimedia.org/r/392309 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I847ac4b7587b98be06b25fe14765e9efdc7b774d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Scribunto Gerrit-Branch: master Gerrit-Owner: Gerrit Patch UploaderGerrit-Reviewer: Gerrit Patch Uploader Gerrit-Reviewer: Vlakoff ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labs/icinga2[master]: Auto create /var/lib/icinga2/certs/
Paladox has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392308 ) Change subject: Auto create /var/lib/icinga2/certs/ .. Auto create /var/lib/icinga2/certs/ Change-Id: I59b3ff11fb575c8d1f5f2d67219aeac4b8794e55 --- 0 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/icinga2 refs/changes/08/392308/1 -- To view, visit https://gerrit.wikimedia.org/r/392308 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I59b3ff11fb575c8d1f5f2d67219aeac4b8794e55 Gerrit-PatchSet: 1 Gerrit-Project: labs/icinga2 Gerrit-Branch: master Gerrit-Owner: Paladox___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labs/icinga2[master]: Auto create /var/lib/icinga2/certs/
Paladox has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/392308 ) Change subject: Auto create /var/lib/icinga2/certs/ .. Auto create /var/lib/icinga2/certs/ Change-Id: I59b3ff11fb575c8d1f5f2d67219aeac4b8794e55 --- M manifests/init.pp 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: Paladox: Verified; Looks good to me, approved diff --git a/manifests/init.pp b/manifests/init.pp index c56e708..ab5cf14 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -232,6 +232,12 @@ group => 'nagios', } +file { '/var/lib/icinga2/certs': +ensure => directory, +owner => 'nagios', +group => 'nagios', +} + file { '/var/run/icinga2/': ensure => directory, owner => 'nagios', -- To view, visit https://gerrit.wikimedia.org/r/392308 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I59b3ff11fb575c8d1f5f2d67219aeac4b8794e55 Gerrit-PatchSet: 2 Gerrit-Project: labs/icinga2 Gerrit-Branch: master Gerrit-Owner: PaladoxGerrit-Reviewer: Paladox ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labs/icinga2[master]: Remove api.conf it's not in conf.d
Paladox has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/392307 ) Change subject: Remove api.conf it's not in conf.d .. Remove api.conf it's not in conf.d Change-Id: Id608daede51d11ba81611bfd905398d3609e26ae --- M manifests/init.pp D templates/api.conf.erb 2 files changed, 0 insertions(+), 17 deletions(-) Approvals: Paladox: Verified; Looks good to me, approved diff --git a/manifests/init.pp b/manifests/init.pp index e1947bf..c56e708 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -85,14 +85,6 @@ notify => Base::Service_unit['icinga2'], } -file { '/etc/icinga2/conf.d/api.conf': -ensure => present, -content => template('icinga2/api.conf.erb'), -owner => 'root', -group => 'root', -notify => Base::Service_unit['icinga2'], -} - file { '/etc/icinga2/conf.d/api-users.conf': ensure => present, content => template('icinga2/api-users.conf.erb'), diff --git a/templates/api.conf.erb b/templates/api.conf.erb deleted file mode 100644 index 0480684..000 --- a/templates/api.conf.erb +++ /dev/null @@ -1,9 +0,0 @@ -/** - * The API listener is used for distributed monitoring setups. - */ -object ApiListener "api" { - //accept_config = false - //accept_commands = false - - ticket_salt = TicketSalt -} -- To view, visit https://gerrit.wikimedia.org/r/392307 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id608daede51d11ba81611bfd905398d3609e26ae Gerrit-PatchSet: 2 Gerrit-Project: labs/icinga2 Gerrit-Branch: master Gerrit-Owner: PaladoxGerrit-Reviewer: Paladox ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labs/icinga2[master]: Remove api.conf it's not in conf.d
Paladox has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392307 ) Change subject: Remove api.conf it's not in conf.d .. Remove api.conf it's not in conf.d Change-Id: Id608daede51d11ba81611bfd905398d3609e26ae --- 0 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/icinga2 refs/changes/07/392307/1 -- To view, visit https://gerrit.wikimedia.org/r/392307 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id608daede51d11ba81611bfd905398d3609e26ae Gerrit-PatchSet: 1 Gerrit-Project: labs/icinga2 Gerrit-Branch: master Gerrit-Owner: Paladox___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labs/icinga2[master]: Upgrade icinga2 to 2.8.0
Paladox has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/392306 ) Change subject: Upgrade icinga2 to 2.8.0 .. Upgrade icinga2 to 2.8.0 Change-Id: I4005438fba5958e18f3c8c41ddcacc1d957b1e1a --- M files/timeperiods.conf M manifests/init.pp A templates/api.conf.erb 3 files changed, 18 insertions(+), 9 deletions(-) Approvals: Paladox: Verified; Looks good to me, approved diff --git a/files/timeperiods.conf b/files/timeperiods.conf index 0a07741..10acbda 100644 --- a/files/timeperiods.conf +++ b/files/timeperiods.conf @@ -1,13 +1,9 @@ /** - * Sample timeperiods for Icinga 2 requiring - * 'legacy-timeperiod' template from the Icinga - * Template Library (ITL). + * Sample timeperiods for Icinga 2. * Check the documentation for details. */ object TimePeriod "24x7" { - import "legacy-timeperiod" - display_name = "Icinga 2 24x7 TimePeriod" ranges = { "monday"= "00:00-24:00" @@ -21,8 +17,6 @@ } object TimePeriod "9to5" { - import "legacy-timeperiod" - display_name = "Icinga 2 9to5 TimePeriod" ranges = { "monday"= "09:00-17:00" @@ -34,8 +28,6 @@ } object TimePeriod "never" { - import "legacy-timeperiod" - display_name = "Icinga 2 never TimePeriod" ranges = { } diff --git a/manifests/init.pp b/manifests/init.pp index c56e708..e1947bf 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -85,6 +85,14 @@ notify => Base::Service_unit['icinga2'], } +file { '/etc/icinga2/conf.d/api.conf': +ensure => present, +content => template('icinga2/api.conf.erb'), +owner => 'root', +group => 'root', +notify => Base::Service_unit['icinga2'], +} + file { '/etc/icinga2/conf.d/api-users.conf': ensure => present, content => template('icinga2/api-users.conf.erb'), diff --git a/templates/api.conf.erb b/templates/api.conf.erb new file mode 100644 index 000..0480684 --- /dev/null +++ b/templates/api.conf.erb @@ -0,0 +1,9 @@ +/** + * The API listener is used for distributed monitoring setups. + */ +object ApiListener "api" { + //accept_config = false + //accept_commands = false + + ticket_salt = TicketSalt +} -- To view, visit https://gerrit.wikimedia.org/r/392306 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4005438fba5958e18f3c8c41ddcacc1d957b1e1a Gerrit-PatchSet: 2 Gerrit-Project: labs/icinga2 Gerrit-Branch: master Gerrit-Owner: PaladoxGerrit-Reviewer: Paladox ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labs/icinga2[master]: Upgrade icinga2 to 2.8.0
Paladox has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392306 ) Change subject: Upgrade icinga2 to 2.8.0 .. Upgrade icinga2 to 2.8.0 Change-Id: I4005438fba5958e18f3c8c41ddcacc1d957b1e1a --- 0 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/icinga2 refs/changes/06/392306/1 -- To view, visit https://gerrit.wikimedia.org/r/392306 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4005438fba5958e18f3c8c41ddcacc1d957b1e1a Gerrit-PatchSet: 1 Gerrit-Project: labs/icinga2 Gerrit-Branch: master Gerrit-Owner: Paladox___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Enable the new recent changes filters
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/392305 ) Change subject: Enable the new recent changes filters .. Enable the new recent changes filters This requires disabling the "clean" listing from clean changes. In practice this is not an issue due to use script we have that makes the user tool links compact with JavaScript. I fixed that to use the wikipage.content hook so it works well with the new filters. This also removes the annoying bug that headings are duplicated in the recent changes listings. Change-Id: I9f14e03320b6f478f19a2a0c0a1bbd2d980be773 --- M TranslatewikiSettings.php 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: jenkins-bot: Verified Nikerabbit: Looks good to me, approved diff --git a/TranslatewikiSettings.php b/TranslatewikiSettings.php index 852d820..1feb378 100644 --- a/TranslatewikiSettings.php +++ b/TranslatewikiSettings.php @@ -233,6 +233,8 @@ wfLoadExtension( 'CleanChanges' ); $wgCCUserFilter = true; $wgCCTrailerFilter = true; +$wgStructuredChangeFiltersShowPreference = true; +$wgCCFiltersOnly = true; $wgNamespacesToBeSearchedDefault[NS_MAIN] = true; $wgNamespacesToBeSearchedDefault[NS_MEDIAWIKI] = true; -- To view, visit https://gerrit.wikimedia.org/r/392305 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9f14e03320b6f478f19a2a0c0a1bbd2d980be773 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: NikerabbitGerrit-Reviewer: Nikerabbit Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Enable the new recent changes filters
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392305 ) Change subject: Enable the new recent changes filters .. Enable the new recent changes filters This requires disabling the "clean" listing from clean changes. In practice this is not an issue due to use script we have that makes the user tool links compact with JavaScript. I fixed that to use the wikipage.content hook so it works well with the new filters. This also removes the annoying bug that headings are duplicated in the recent changes listings. Change-Id: I9f14e03320b6f478f19a2a0c0a1bbd2d980be773 --- M TranslatewikiSettings.php 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/05/392305/1 diff --git a/TranslatewikiSettings.php b/TranslatewikiSettings.php index 852d820..1feb378 100644 --- a/TranslatewikiSettings.php +++ b/TranslatewikiSettings.php @@ -233,6 +233,8 @@ wfLoadExtension( 'CleanChanges' ); $wgCCUserFilter = true; $wgCCTrailerFilter = true; +$wgStructuredChangeFiltersShowPreference = true; +$wgCCFiltersOnly = true; $wgNamespacesToBeSearchedDefault[NS_MAIN] = true; $wgNamespacesToBeSearchedDefault[NS_MEDIAWIKI] = true; -- To view, visit https://gerrit.wikimedia.org/r/392305 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9f14e03320b6f478f19a2a0c0a1bbd2d980be773 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] pywikibot...xqbot[master]: [IMPR] Improvements fro deletion requests notifier
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/392304 ) Change subject: [IMPR] Improvements fro deletion requests notifier .. [IMPR] Improvements fro deletion requests notifier Change-Id: I80a058b5efc440e6cb4dd29dec2e46a00e2e26e0 --- M afd_notice.py 1 file changed, 45 insertions(+), 35 deletions(-) Approvals: jenkins-bot: Verified Xqt: Looks good to me, approved diff --git a/afd_notice.py b/afd_notice.py index 65704f0..e02d1f4 100644 --- a/afd_notice.py +++ b/afd_notice.py @@ -193,14 +193,10 @@ # inform creator if creator and creator != latest: -if creator in self.ignoreUser: -pywikibot.output('>>> Creator {0} has opted out' - .format(creator)) -else: -user = pywikibot.User(self.site, creator) -if self.could_be_informed(user): -pywikibot.output('>>> Creator is ' + creator) -self.inform(user, page=page.title(), action='angelegte') +user = pywikibot.User(self.site, creator) +if self.could_be_informed(user, 'Creator'): +pywikibot.output('>>> Creator is ' + creator) +self.inform(user, page=page.title(), action='angelegte') # inform main authors for articles for author, percent in self.find_authors(page): @@ -210,14 +206,14 @@ continue if (author != latest and author != creator): user = pywikibot.User(self.site, author) -if self.could_be_informed(user): +if self.could_be_informed(user, 'Main author'): pywikibot.output('>>> Main author {0} with {1} % edits' .format(author, percent)) self.inform(user, page=page.title(), action='%süberarbeitete' % ( 'stark ' if percent >= 25 else '')) -def could_be_informed(self, user): +def could_be_informed(self, user, group): """Check whether user could be informed. Also print additional informations. @@ -226,14 +222,17 @@ @return: whether user could be informed or not @rtype: bool """ -if not user.isRegistered(): -pywikibot.output('>>> Created by IP user, skipping') +if user.username in self.ignoreUser: +pywikibot.output('>>> {0} {1} has opted out' + .format(group, user.username)) +elif not user.isRegistered(): +pywikibot.output('>>> {0} is an IP user, skipping'.format(group)) elif user.isBlocked(): -pywikibot.output('>>> Creator {0} is blocked, skipping' - .format(user.username)) +pywikibot.output('>>> {0} {1} is blocked, skipping' + .format(group, user.username)) elif 'bot' in user.groups(): -pywikibot.output('>>> Creator {0} is a bot, skipping' - .format(user.username)) +pywikibot.output('>>> {0} {1} is a bot, skipping' + .format(group, user.username)) else: return True return False @@ -253,25 +252,35 @@ if page.namespace() == pywikibot.site.Namespace.MAIN: url = ('https://tools.wmflabs.org/wikihistory/dewiki/' 'getauthors.php?page_id={0}'.format(page.pageid)) -try: -r = fetch(url) -except requests.exceptions.ConnectionError: -pywikibot.exception() -else: -if r.status not in (200, ): -pywikibot.warning('wikihistory request status is %d' - % r.status) +retries = 0 +while retries < 5: +retries += 1 +try: +r = fetch(url) +except requests.exceptions.ConnectionError: +pywikibot.exception() else: -pattern = r'>(?P.+?)\s\((?P\d{1,3})&' -for main, main_cnt in re.findall(pattern, - r.decode('utf-8')): -main_cnt = int(main_cnt) -percent += main_cnt -if ' weitere' in main: -break -yield main, main_cnt -if percent > 50: -break +if r.status not in (200, ): +pywikibot.warning('wikihistory request status is %d' + % r.status) +elif 'Timeout' in r.decode('utf-8'): +
[MediaWiki-commits] [Gerrit] pywikibot...xqbot[master]: [IMPR] Improvements fro deletion requests notifier
Xqt has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392304 ) Change subject: [IMPR] Improvements fro deletion requests notifier .. [IMPR] Improvements fro deletion requests notifier Change-Id: I80a058b5efc440e6cb4dd29dec2e46a00e2e26e0 --- M afd_notice.py 1 file changed, 43 insertions(+), 35 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/bots/xqbot refs/changes/04/392304/1 diff --git a/afd_notice.py b/afd_notice.py index 65704f0..d70b127 100644 --- a/afd_notice.py +++ b/afd_notice.py @@ -193,14 +193,10 @@ # inform creator if creator and creator != latest: -if creator in self.ignoreUser: -pywikibot.output('>>> Creator {0} has opted out' - .format(creator)) -else: -user = pywikibot.User(self.site, creator) -if self.could_be_informed(user): -pywikibot.output('>>> Creator is ' + creator) -self.inform(user, page=page.title(), action='angelegte') +user = pywikibot.User(self.site, creator) +if self.could_be_informed(user, 'Creator'): +pywikibot.output('>>> Creator is ' + creator) +self.inform(user, page=page.title(), action='angelegte') # inform main authors for articles for author, percent in self.find_authors(page): @@ -210,14 +206,14 @@ continue if (author != latest and author != creator): user = pywikibot.User(self.site, author) -if self.could_be_informed(user): +if self.could_be_informed(user, 'Main author'): pywikibot.output('>>> Main author {0} with {1} % edits' .format(author, percent)) self.inform(user, page=page.title(), action='%süberarbeitete' % ( 'stark ' if percent >= 25 else '')) -def could_be_informed(self, user): +def could_be_informed(self, user, group): """Check whether user could be informed. Also print additional informations. @@ -226,14 +222,17 @@ @return: whether user could be informed or not @rtype: bool """ -if not user.isRegistered(): -pywikibot.output('>>> Created by IP user, skipping') +if user.username in self.ignoreUser: +pywikibot.output('>>> {0} {1} has opted out' + .format(group, user.username)) +elif not user.isRegistered(): +pywikibot.output('>>> {0} is an IP user, skipping'.format(group)) elif user.isBlocked(): -pywikibot.output('>>> Creator {0} is blocked, skipping' - .format(user.username)) +pywikibot.output('>>> {0} {1} is blocked, skipping' + .format(group, user.username)) elif 'bot' in user.groups(): -pywikibot.output('>>> Creator {0} is a bot, skipping' - .format(user.username)) +pywikibot.output('>>> {0} {1} is a bot, skipping' + .format(group, user.username)) else: return True return False @@ -253,25 +252,33 @@ if page.namespace() == pywikibot.site.Namespace.MAIN: url = ('https://tools.wmflabs.org/wikihistory/dewiki/' 'getauthors.php?page_id={0}'.format(page.pageid)) -try: -r = fetch(url) -except requests.exceptions.ConnectionError: -pywikibot.exception() -else: -if r.status not in (200, ): -pywikibot.warning('wikihistory request status is %d' - % r.status) +retries = 0 +while retries < 5: +retries += 1 +try: +r = fetch(url) +except requests.exceptions.ConnectionError: +pywikibot.exception() else: -pattern = r'>(?P.+?)\s\((?P\d{1,3})&' -for main, main_cnt in re.findall(pattern, - r.decode('utf-8')): -main_cnt = int(main_cnt) -percent += main_cnt -if ' weitere' in main: -break -yield main, main_cnt -if percent > 50: -break +if r.status not in (200, ): +pywikibot.warning('wikihistory request status is %d' + % r.status) +elif 'Timeout' in r.decode('utf-8'): +
[MediaWiki-commits] [Gerrit] pywikibot...xqbot[master]: [IMPR] Check page restrictions for ww only
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/392303 ) Change subject: [IMPR] Check page restrictions for ww only .. [IMPR] Check page restrictions for ww only Other improvements Change-Id: I7e263fc23560c899d8d71d8be9cfa660ce730569 --- M checkvotes.py 1 file changed, 4 insertions(+), 3 deletions(-) Approvals: jenkins-bot: Verified Xqt: Looks good to me, approved diff --git a/checkvotes.py b/checkvotes.py index fa761ed..eb0534a 100644 --- a/checkvotes.py +++ b/checkvotes.py @@ -62,7 +62,7 @@ page = pywikibot.Page(site, 'Wikipedia:Kandidaturen') text = page.get() FOLDER = 'Wikipedia:Adminkandidaturen/' -R = re.compile(r'\{\{%s(.+?)[\||\}]' % FOLDER) +R = re.compile(r'\{\{:?%s(.+?)[\||\}]' % FOLDER) for pagename in R.findall(text): if pagename.lower() != 'intro': if not votepage or votepage == pagename: @@ -194,6 +194,7 @@ } ignore_server_errors = True +ignore_save_related_errors = True def __init__(self, generator, template, always, blockinfo, **kwargs): """ @@ -530,9 +531,9 @@ # page.getRestrictions() may delete the content # if revision ID has been changed (bug: T93364) -# TODO: für Prüfung hier ausschließen +global ww restrictions = page.getRestrictions() -if restrictions: +if ww and restrictions: if 'edit' in restrictions and restrictions['edit']: if 'sysop' in restrictions['edit']: pywikibot.output('\nPage %s is locked; skipping.' -- To view, visit https://gerrit.wikimedia.org/r/392303 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7e263fc23560c899d8d71d8be9cfa660ce730569 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/bots/xqbot Gerrit-Branch: master Gerrit-Owner: XqtGerrit-Reviewer: Xqt Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] pywikibot...xqbot[master]: [IMPR] Check page restrictions for ww only
Xqt has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392303 ) Change subject: [IMPR] Check page restrictions for ww only .. [IMPR] Check page restrictions for ww only Other improvements Change-Id: I7e263fc23560c899d8d71d8be9cfa660ce730569 --- M checkvotes.py 1 file changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/bots/xqbot refs/changes/03/392303/1 diff --git a/checkvotes.py b/checkvotes.py index fa761ed..eb0534a 100644 --- a/checkvotes.py +++ b/checkvotes.py @@ -62,7 +62,7 @@ page = pywikibot.Page(site, 'Wikipedia:Kandidaturen') text = page.get() FOLDER = 'Wikipedia:Adminkandidaturen/' -R = re.compile(r'\{\{%s(.+?)[\||\}]' % FOLDER) +R = re.compile(r'\{\{:?%s(.+?)[\||\}]' % FOLDER) for pagename in R.findall(text): if pagename.lower() != 'intro': if not votepage or votepage == pagename: @@ -194,6 +194,7 @@ } ignore_server_errors = True +ignore_save_related_errors = True def __init__(self, generator, template, always, blockinfo, **kwargs): """ @@ -530,9 +531,9 @@ # page.getRestrictions() may delete the content # if revision ID has been changed (bug: T93364) -# TODO: für Prüfung hier ausschließen +global ww restrictions = page.getRestrictions() -if restrictions: +if ww and restrictions: if 'edit' in restrictions and restrictions['edit']: if 'sysop' in restrictions['edit']: pywikibot.output('\nPage %s is locked; skipping.' -- To view, visit https://gerrit.wikimedia.org/r/392303 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7e263fc23560c899d8d71d8be9cfa660ce730569 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/bots/xqbot Gerrit-Branch: master Gerrit-Owner: Xqt___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Vector[master]: Restore indicator for menuForceShow of tab menus
Fomafix has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392302 ) Change subject: Restore indicator for menuForceShow of tab menus .. Restore indicator for menuForceShow of tab menus The previous indicator was removed in 7a42af066b because of a position transition. An indicator is useful to distinguish between the hover and the click actions. Change-Id: Icf765d4985aea36e4f4f6653e769aafaf3c30d07 --- M components/tabs.less 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Vector refs/changes/02/392302/1 diff --git a/components/tabs.less b/components/tabs.less index 5e162dd..b1120ec 100644 --- a/components/tabs.less +++ b/components/tabs.less @@ -167,6 +167,12 @@ } } +div.vectorMenu.menuForceShow h3 span:after { + background-position-y: 13%; + transform: scaleY( -1 ); +} + + div.vectorMenu div.menu { // Match the width of the dropdown "heading" (the tab) min-width: 100%; -- To view, visit https://gerrit.wikimedia.org/r/392302 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icf765d4985aea36e4f4f6653e769aafaf3c30d07 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Vector Gerrit-Branch: master Gerrit-Owner: Fomafix___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Wikidata[master]: New Wikidata Build - 2017-11-19T10:00:02+0000
WikidataBuilder has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392301 ) Change subject: New Wikidata Build - 2017-11-19T10:00:02+ .. New Wikidata Build - 2017-11-19T10:00:02+ Change-Id: Icc11ed4399091b322ddf18d1b9041ae482d4ed10 --- M composer.lock M extensions/ArticlePlaceholder/i18n/fa.json M extensions/Constraints/i18n/cs.json M extensions/Constraints/i18n/ko.json M extensions/Wikibase/client/i18n/ais.json M extensions/Wikibase/lib/i18n/fa.json M extensions/Wikibase/repo/i18n/ais.json M extensions/Wikibase/repo/i18n/be-tarask.json M extensions/Wikibase/repo/i18n/fa.json M vendor/composer/installed.json 10 files changed, 46 insertions(+), 19 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikidata refs/changes/01/392301/1 diff --git a/composer.lock b/composer.lock index ecc5814..dc4b699 100644 --- a/composer.lock +++ b/composer.lock @@ -665,12 +665,12 @@ "source": { "type": "git", "url": "https://github.com/wikimedia/mediawiki-extensions-ArticlePlaceholder.git;, -"reference": "5a91118980af5a58c976a78636e601474d2fb6bc" +"reference": "c2861951013fec4075fb62c27c66440957bdbc3b" }, "dist": { "type": "zip", -"url": "https://api.github.com/repos/wikimedia/mediawiki-extensions-ArticlePlaceholder/zipball/5a91118980af5a58c976a78636e601474d2fb6bc;, -"reference": "5a91118980af5a58c976a78636e601474d2fb6bc", +"url": "https://api.github.com/repos/wikimedia/mediawiki-extensions-ArticlePlaceholder/zipball/c2861951013fec4075fb62c27c66440957bdbc3b;, +"reference": "c2861951013fec4075fb62c27c66440957bdbc3b", "shasum": "" }, "require": { @@ -694,7 +694,7 @@ ], "description": "Provides a special page with Wikibase information about a certain topic, with invitation to create an article for the topic", "homepage": "https://www.mediawiki.org/wiki/Extension:ArticlePlaceholder;, -"time": "2017-11-13 14:15:16" +"time": "2017-11-18 21:33:47" }, { "name": "propertysuggester/property-suggester", @@ -855,7 +855,7 @@ "source": { "type": "git", "url": "https://gerrit.wikimedia.org/r/mediawiki/extensions/WikibaseQualityConstraints;, -"reference": "d36cca9ae75d1f7bfb714ac9931fcee99c797bc0" +"reference": "164ad69ca0328eea7bf2444b75465b5d6af61276" }, "require": { "php": ">=5.5.9", @@ -906,7 +906,7 @@ "support": { "issues": "https://phabricator.wikimedia.org/project/profile/1202/; }, -"time": "2017-11-17 22:04:34" +"time": "2017-11-18 22:05:03" }, { "name": "wikibase/data-model", @@ -1228,7 +1228,7 @@ "source": { "type": "git", "url": "https://gerrit.wikimedia.org/r/mediawiki/extensions/Wikibase;, -"reference": "6a45c37dd0059fb77f88d646e23ad62ad542ee7f" +"reference": "2bfdde926bd25f64db4fe23313f37973e56304e8" }, "require": { "composer/installers": ">=1.0.1", @@ -1289,7 +1289,7 @@ "issues": "https://phabricator.wikimedia.org/;, "irc": "irc://irc.freenode.net/wikidata" }, -"time": "2017-11-17 22:04:11" +"time": "2017-11-18 22:04:37" }, { "name": "wikibase/wikimedia-badges", diff --git a/extensions/ArticlePlaceholder/i18n/fa.json b/extensions/ArticlePlaceholder/i18n/fa.json index ed4bee1..87beb2f 100644 --- a/extensions/ArticlePlaceholder/i18n/fa.json +++ b/extensions/ArticlePlaceholder/i18n/fa.json @@ -7,6 +7,7 @@ }, "createtopicpage": "ایجاد صفحه", "articleplaceholder-abouttopic": "درباره موضوع", + "articleplaceholder-abouttopic-no-entity-error": "این یک شناسه معتبر آیتم نیست.", "articleplaceholder-abouttopic-create-article-title": "یک مقاله جدید بسازید", "articleplaceholder-abouttopic-create-article-label": "عنوان مقاله", "articleplaceholder-abouttopic-create-article-mandatory": "عنوان مقاله اجباری است.", diff --git a/extensions/Constraints/i18n/cs.json b/extensions/Constraints/i18n/cs.json index 62bf7ba..3ca5fe8 100644 --- a/extensions/Constraints/i18n/cs.json +++ b/extensions/Constraints/i18n/cs.json @@ -42,6 +42,8 @@ "wbqc-parameterissues-long": "Tyto nedostatky jsou problémy definice omezení na vlastnosti, nikoli tohoto výroku.", "wbqc-constrainttypehelp-short": "Nápověda", "wbqc-constrainttypehelp-long": "Stránka s nápovědou pro tento typ omezení", +
[MediaWiki-commits] [Gerrit] wikimedia...autoreporter[master]: Add interleaved test analysis
Chelsyx has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/392102 ) Change subject: Add interleaved test analysis .. Add interleaved test analysis Bug: T176493 Change-Id: I795023856963030e67e85e1cde7352842aa3a7a8 --- M README.md M functions.R M modules/data/data_aggregation.R M modules/data/data_cleansing.R M modules/data/fetch_data.R M modules/explore_similar/esclicks.R M modules/explore_similar/hover_over.R A modules/interleaved_test/data_processing.R A modules/interleaved_test/interleaved_preference.R A modules/interleaved_test/page_dwelltime.R M modules/setup.R M modules/sister_search/iwclicks.R M modules/sister_search/sidebar_results.R M modules/sister_search/ssclicks.R M modules/stat_test/engagement.R M modules/stat_test/first_clicked.R M modules/stat_test/max_clicked.R M modules/stat_test/paulscore.R A modules/stat_test/remove_interleaved_data.R M modules/stat_test/return_rate.R M modules/stat_test/search_abandon_rate.R M modules/stat_test/serp_from_autocomplete.R M modules/stat_test/serp_load_time.R M modules/stat_test/serp_offset.R M modules/stat_test/visited_page.R M modules/stat_test/zrr.R M modules/test_summary/browser_os.R M modules/test_summary/events.R M modules/test_summary/searches.R M report.Rmd M run.R 31 files changed, 483 insertions(+), 148 deletions(-) Approvals: Chelsyx: Verified; Looks good to me, approved diff --git a/README.md b/README.md index 11f34a5..b0ae2f8 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,8 @@ ```R install.packages(c("tidyverse", "toOrdinal", "jsonlite", "yaml", "rmarkdown", "tools", - "knitr", "RMySQL", "data.table", "lubridate", "binom", "survival", "survminer", "import")) + "knitr", "RMySQL", "data.table", "lubridate", "binom", "survival", "survminer", "import", + "BayesFactor", "formattable", "DT", "htmltools", "scales", "Rcpp", "urltools", "rlang", "RColorBrewer")) devtools::install_git("https://gerrit.wikimedia.org/r/p/wikimedia/discovery/wmf.git;) devtools::install_git("https://gerrit.wikimedia.org/r/p/wikimedia/discovery/polloi.git;) devtools::install_github("bearloga/BCDA") diff --git a/functions.R b/functions.R index a4c6367..8be26c1 100644 --- a/functions.R +++ b/functions.R @@ -1,5 +1,6 @@ # PaulScore Calculation -query_score <- function(positions, F) { # 0-based positions +# 0-based positions +query_score <- function(positions, F) { if (length(positions) == 1 || all(is.na(positions))) { # no clicks were made return(0) @@ -66,7 +67,7 @@ ggplot2::geom_bar(stat = "identity", position = "dodge") + ggplot2::scale_fill_brewer("Group", palette = "Set1") + ggplot2::scale_y_continuous(labels = polloi::compress) + -ggplot2::geom_text(aes_string(label = y, vjust = -0.5), position = position_dodge(width = 1), size = geom_text_size) + +ggplot2::geom_text(aes_string(label = y, vjust = -0.05), position = position_dodge(width = 1), size = geom_text_size) + ggplot2::labs(y = y_lab, x = x_lab, title = title, subtitle = subtitle, caption = caption) } @@ -79,3 +80,59 @@ ggplot2::scale_color_brewer(palette = "Set1") + ggplot2::labs(x = NULL, color = "Group", y = y_lab, title = title, subtitle = subtitle) } + +cppFunction('CharacterVector fill_in(CharacterVector ids) { + CharacterVector new_ids(ids.size()); + String current_id = ids[0]; + new_ids[0] = current_id; + for (int i = 1; i < ids.size(); i++) { +if (ids[i] != NA_STRING) { + current_id = ids[i]; +} +new_ids[i] = current_id; + } + return new_ids; +}') + +cppFunction('NumericVector cumunique(CharacterVector ids) { + NumericVector count(ids.size()); + String current_id = ids[0]; + count[0] = 1; + for (int i = 1; i < ids.size(); i++) { +if (ids[i] == current_id) { + count[i] = count[i-1]; +} else { + count[i] = count[i-1] + 1; + current_id = ids[i]; +} + } + return count; +}') + +# Process interleaved team draft +process_session <- function(df) { + processed_session <- unsplit(lapply(split(df, df$serp_id), function(df) { +if (is.na(df$event_extraParams[1]) || df$event_extraParams[1] == "") { + visited_pages <- rep(as.character(NA), times = nrow(df)) +} else { + from_json <- jsonlite::fromJSON(df$event_extraParams[1], simplifyVector = FALSE) + if (!("teamDraft" %in% names(from_json)) || all(is.na(df$article_id))) { +visited_pages <- rep(as.character(NA), times = nrow(df)) + } else { +team_a <- unlist(from_json$teamDraft$a) +team_b <- unlist(from_json$teamDraft$b) +visited_pages <- vapply(df$article_id, function(article_id) { + if (article_id %in% team_a) { +return("A") + } else if (article_id %in% team_b) { +return("B") + } else { +return(as.character(NA)) + } +}, "") + } +} +return(visited_pages) + }), df$serp_id) +