[MediaWiki-commits] [Gerrit] Add rsvg to OpenStackManager nodes - change (operations/puppet)
Ryan Lane has submitted this change and it was merged. Change subject: Add rsvg to OpenStackManager nodes .. Add rsvg to OpenStackManager nodes Change-Id: Ie4306b58bc9324e318c0d11d9b316ef5a9137140 --- M manifests/openstack.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Ryan Lane: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/openstack.pp b/manifests/openstack.pp index af0abb0..b85b98b 100644 --- a/manifests/openstack.pp +++ b/manifests/openstack.pp @@ -463,7 +463,7 @@ $controller_hostname = $novaconfig[controller_hostname] - package { [ 'php5', 'php5-cli', 'php5-mysql', 'php5-ldap', 'php5-uuid', 'php5-curl', 'php-apc', 'php-luasandbox', 'imagemagick' ]: + package { [ 'php5', 'php5-cli', 'php5-mysql', 'php5-ldap', 'php5-uuid', 'php5-curl', 'php-apc', 'php-luasandbox', 'imagemagick', 'librsvg2-bin' ]: ensure = present; } -- To view, visit https://gerrit.wikimedia.org/r/71519 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie4306b58bc9324e318c0d11d9b316ef5a9137140 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ryan Lane rl...@wikimedia.org Gerrit-Reviewer: Ryan Lane rl...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Drop a code path in wfBCP47() which is never reached. - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Drop a code path in wfBCP47() which is never reached. .. Drop a code path in wfBCP47() which is never reached. count( $codeSegment ) 0 should be never true in a foreach loop of $codeSegment itself. See also Iffe166f3. Change-Id: I453b5ec3379951a2ad6e34b9835907c2eba3046b --- M includes/GlobalFunctions.php 1 file changed, 10 insertions(+), 15 deletions(-) Approvals: Matmarex: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index a44e45b..4f9347a 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -3750,22 +3750,17 @@ $codeSegment = explode( '-', $code ); $codeBCP = array(); foreach ( $codeSegment as $segNo = $seg ) { - if ( count( $codeSegment ) 0 ) { - // when previous segment is x, it is a private segment and should be lc - if ( $segNo 0 strtolower( $codeSegment[( $segNo - 1 )] ) == 'x' ) { - $codeBCP[$segNo] = strtolower( $seg ); - // ISO 3166 country code - } elseif ( ( strlen( $seg ) == 2 ) ( $segNo 0 ) ) { - $codeBCP[$segNo] = strtoupper( $seg ); - // ISO 15924 script code - } elseif ( ( strlen( $seg ) == 4 ) ( $segNo 0 ) ) { - $codeBCP[$segNo] = ucfirst( strtolower( $seg ) ); - // Use lowercase for other cases - } else { - $codeBCP[$segNo] = strtolower( $seg ); - } + // when previous segment is x, it is a private segment and should be lc + if ( $segNo 0 strtolower( $codeSegment[( $segNo - 1 )] ) == 'x' ) { + $codeBCP[$segNo] = strtolower( $seg ); + // ISO 3166 country code + } elseif ( ( strlen( $seg ) == 2 ) ( $segNo 0 ) ) { + $codeBCP[$segNo] = strtoupper( $seg ); + // ISO 15924 script code + } elseif ( ( strlen( $seg ) == 4 ) ( $segNo 0 ) ) { + $codeBCP[$segNo] = ucfirst( strtolower( $seg ) ); + // Use lowercase for other cases } else { - // Use lowercase for single segment $codeBCP[$segNo] = strtolower( $seg ); } } -- To view, visit https://gerrit.wikimedia.org/r/71300 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I453b5ec3379951a2ad6e34b9835907c2eba3046b Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Liangent liang...@gmail.com Gerrit-Reviewer: Matmarex matma@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] Added 404-01 (Aircel India) - change (operations/puppet)
Yurik has uploaded a new change for review. https://gerrit.wikimedia.org/r/71521 Change subject: Added 404-01 (Aircel India) .. Added 404-01 (Aircel India) Change-Id: I004911269af24dac8cdedfbaaf9dc66aae6092a6 --- M templates/varnish/zero.inc.vcl.erb 1 file changed, 17 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/21/71521/1 diff --git a/templates/varnish/zero.inc.vcl.erb b/templates/varnish/zero.inc.vcl.erb index 9952a98..8a1d601 100644 --- a/templates/varnish/zero.inc.vcl.erb +++ b/templates/varnish/zero.inc.vcl.erb @@ -295,6 +295,19 @@ 41.223.184.152/30; } +acl carrier_404_01 { // Aircel India + 27.248.0.0/16; + 49.136.0.0/15; + 49.138.0.0/16; + 49.139.224.0/19; + 58.68.26.150; + 101.208.0.0/12; + 118.102.183.46; + 118.102.186.29; + 118.102.186.30; + 118.102.186.240/28; +} + sub tag_carrier { /* For wiki zero project - tags partnered carriers The values for the X-CS headers are obtained from @@ -424,6 +437,10 @@ if (req.http.host ~ (^(en|ur)\.(zero|m)|^(zero|m))\.([a-zA-Z0-9-]+)\.org) { set req.http.X-CS = 410-01; } + } else if (client.ip ~ carrier_404_01) { + if (req.http.host ~ (^(en|hi|ta)\.(zero|m)|^(zero|m))\.([a-zA-Z0-9-]+)\.org) { + set req.http.X-CS = 404-01; + } } else if (client.ip ~ carrier_510_11) { set req.http.X-DfltLang = id; if (req.http.X-Subdomain == ZERO) { -- To view, visit https://gerrit.wikimedia.org/r/71521 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I004911269af24dac8cdedfbaaf9dc66aae6092a6 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yurik yu...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update TimedMediaHandler for cherry-pick of Ide7208394f - change (mediawiki/core)
Catrope has submitted this change and it was merged. Change subject: Update TimedMediaHandler for cherry-pick of Ide7208394f .. Update TimedMediaHandler for cherry-pick of Ide7208394f Change-Id: Ie9c6655194592811bd5da8c2c186cb299aca25f7 --- M extensions/TimedMediaHandler 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Catrope: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/extensions/TimedMediaHandler b/extensions/TimedMediaHandler index fac3ddd..8c3992c 16 --- a/extensions/TimedMediaHandler +++ b/extensions/TimedMediaHandler -Subproject commit fac3ddd3c424e27a57a0e38b800a8ce4ca9e0168 +Subproject commit 8c3992cf002c50a889c8092a741f7aba54804d01 -- To view, visit https://gerrit.wikimedia.org/r/71394 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie9c6655194592811bd5da8c2c186cb299aca25f7 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.22wmf8 Gerrit-Owner: Catrope roan.katt...@gmail.com Gerrit-Reviewer: Catrope roan.katt...@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] Update VisualEditor to master - change (mediawiki/core)
Catrope has submitted this change and it was merged. Change subject: Update VisualEditor to master .. Update VisualEditor to master Change-Id: I57c890b7e1ad598e3cd5967ea09ec16cf8e5f86c --- M extensions/VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Catrope: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/extensions/VisualEditor b/extensions/VisualEditor index 40f39c0..680e0e5 16 --- a/extensions/VisualEditor +++ b/extensions/VisualEditor -Subproject commit 40f39c0886294b0a3d8eea8814119d34527ad56e +Subproject commit 680e0e5ec0dee96b68a1fc3a3f8def7bc782bf54 -- To view, visit https://gerrit.wikimedia.org/r/71517 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I57c890b7e1ad598e3cd5967ea09ec16cf8e5f86c Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.22wmf8 Gerrit-Owner: Catrope roan.katt...@gmail.com Gerrit-Reviewer: Catrope roan.katt...@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] Render dates as headings - change (mediawiki...Echo)
Jdlrobson has uploaded a new change for review. https://gerrit.wikimedia.org/r/71522 Change subject: Render dates as headings .. Render dates as headings Not doing this leads to unnecessary styling in mobile and is more semantically correct Bug 49269 Change-Id: Icbb390b6c807118c1b775aa4f962de06b5f7c091 --- M special/SpecialNotifications.php 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/22/71522/1 diff --git a/special/SpecialNotifications.php b/special/SpecialNotifications.php index 5b48eea..1d19e4c 100644 --- a/special/SpecialNotifications.php +++ b/special/SpecialNotifications.php @@ -56,7 +56,9 @@ // Output the date header if it has not been displayed if ( $dateHeader !== $row['timestamp']['date'] ) { $dateHeader = $row['timestamp']['date']; - $notices .= Html::rawElement( 'li', array( 'class' = 'mw-echo-date-section' ), $dateHeader ); + $notices .= Html::openElement( 'li' ); + $notices .= Html::element( 'h2', array( 'class' = 'mw-echo-date-section' ), $dateHeader ); + $notices .= Html::closeElement( 'li' ); } $class = 'mw-echo-notification'; -- To view, visit https://gerrit.wikimedia.org/r/71522 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icbb390b6c807118c1b775aa4f962de06b5f7c091 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Jdlrobson jrob...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Bug 49269: Echo markup adjustments - change (mediawiki...Echo)
Jdlrobson has uploaded a new change for review. https://gerrit.wikimedia.org/r/71523 Change subject: Bug 49269: Echo markup adjustments .. Bug 49269: Echo markup adjustments separate into multiple ul elements with headings dividing them This removes need for unnecessary styling rules in mobile web Change-Id: I8acaef726ea0cc639054cf36d6c3649c7ab25bee --- M special/SpecialNotifications.php 1 file changed, 11 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/23/71523/1 diff --git a/special/SpecialNotifications.php b/special/SpecialNotifications.php index 1d19e4c..8e9ad6a 100644 --- a/special/SpecialNotifications.php +++ b/special/SpecialNotifications.php @@ -52,13 +52,17 @@ $dateHeader = ''; $notices = ''; $unread = array(); + $openListElement = false; + $html = Html::openElement( 'div', array( 'id' = 'mw-echo-special-container' ) ); foreach ( $notif as $row ) { // Output the date header if it has not been displayed if ( $dateHeader !== $row['timestamp']['date'] ) { $dateHeader = $row['timestamp']['date']; - $notices .= Html::openElement( 'li' ); + if ( $openListElement ) { + $notices .= Html::closeElement( 'ul' ); + } $notices .= Html::element( 'h2', array( 'class' = 'mw-echo-date-section' ), $dateHeader ); - $notices .= Html::closeElement( 'li' ); + $notices .= Html::openElement( 'ul', array( 'id' = 'mw-echo-special-container' ), $notices ); } $class = 'mw-echo-notification'; @@ -77,7 +81,11 @@ $row['*'] ); } - $html = Html::rawElement( 'ul', array( 'id' = 'mw-echo-special-container' ), $notices ); + $html .= $notices; + if ( $openListElement ) { + $html .= Html::closeElement( 'ul' ); + } + $html .= Html::closeElement( 'div' ); // Build the more link if ( $nextContinue ) { -- To view, visit https://gerrit.wikimedia.org/r/71523 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8acaef726ea0cc639054cf36d6c3649c7ab25bee Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Jdlrobson jrob...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added 404-01 (Aircel India) - change (operations/puppet)
Lcarr has submitted this change and it was merged. Change subject: Added 404-01 (Aircel India) .. Added 404-01 (Aircel India) Change-Id: I004911269af24dac8cdedfbaaf9dc66aae6092a6 --- M templates/varnish/zero.inc.vcl.erb 1 file changed, 17 insertions(+), 0 deletions(-) Approvals: Lcarr: Looks good to me, approved jenkins-bot: Verified diff --git a/templates/varnish/zero.inc.vcl.erb b/templates/varnish/zero.inc.vcl.erb index 9952a98..8a1d601 100644 --- a/templates/varnish/zero.inc.vcl.erb +++ b/templates/varnish/zero.inc.vcl.erb @@ -295,6 +295,19 @@ 41.223.184.152/30; } +acl carrier_404_01 { // Aircel India + 27.248.0.0/16; + 49.136.0.0/15; + 49.138.0.0/16; + 49.139.224.0/19; + 58.68.26.150; + 101.208.0.0/12; + 118.102.183.46; + 118.102.186.29; + 118.102.186.30; + 118.102.186.240/28; +} + sub tag_carrier { /* For wiki zero project - tags partnered carriers The values for the X-CS headers are obtained from @@ -424,6 +437,10 @@ if (req.http.host ~ (^(en|ur)\.(zero|m)|^(zero|m))\.([a-zA-Z0-9-]+)\.org) { set req.http.X-CS = 410-01; } + } else if (client.ip ~ carrier_404_01) { + if (req.http.host ~ (^(en|hi|ta)\.(zero|m)|^(zero|m))\.([a-zA-Z0-9-]+)\.org) { + set req.http.X-CS = 404-01; + } } else if (client.ip ~ carrier_510_11) { set req.http.X-DfltLang = id; if (req.http.X-Subdomain == ZERO) { -- To view, visit https://gerrit.wikimedia.org/r/71521 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I004911269af24dac8cdedfbaaf9dc66aae6092a6 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yurik yu...@wikimedia.org Gerrit-Reviewer: Lcarr lc...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Install ArticleFeedbackv5 on pt.wikibooks.org - change (operations/mediawiki-config)
Helder.wiki has uploaded a new change for review. https://gerrit.wikimedia.org/r/71524 Change subject: Install ArticleFeedbackv5 on pt.wikibooks.org .. Install ArticleFeedbackv5 on pt.wikibooks.org Bug: 48777 Change-Id: I53e76f0bb46b7bab9d62b9b72aab512ec8fb22e1 --- M wmf-config/InitialiseSettings.php 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/24/71524/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 16d96fd..79ebddf 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -10533,6 +10533,7 @@ 'dewiki' = true, // Bug 42693 'enwiki' = true, 'frwiki' = true, + 'ptwikibooks' = true, 'testwiki' = true, ), /* @@ -10553,6 +10554,7 @@ 'dewiki' = array( NS_MAIN ), 'enwiki' = array( NS_MAIN, NS_HELP, NS_PROJECT ), 'frwiki' = array( NS_MAIN, NS_HELP ), + 'ptwikibooks' = array( NS_MAIN, NS_HELP, NS_PROJECT ), ), /* * The percentage of articles AFTv5 will be displayed on (based on the last 3 digits @@ -10564,6 +10566,7 @@ 'testwiki' = array( NS_MAIN = 10, NS_HELP = 100 ), 'dewiki' = array( NS_MAIN = 0.1 ), // ~ 1500 articles out of 1.5 mio in total 'frwiki' = array( NS_MAIN = 0, NS_HELP = 100 ), + 'ptwikibooks' = 100, ), /* * Articles that include this category, will display AFTv5, regardless of lottery. @@ -10589,6 +10592,7 @@ 'dewiki' = array( 'Wikipedia:Artikel-Feedback_Ausschlussliste', 'Wikipedia:Artikel-Feedback/Ausschlussliste' ), 'enwiki' = array( 'Article_Feedback_Blacklist' ), 'frwiki' = array( 'Wikipédia:Outil_de_retour_des_lecteurs/exclus' ), + 'ptwikibooks' = array( 'Páginas que não podem ser avaliadas pelos leitores' ), ), /** * Email address that oversight requests will mail to. @@ -10622,6 +10626,7 @@ 'dewiki' = true, 'enwiki' = true, 'frwiki' = true, + 'ptwikibooks' = true, ), 'wmgArticleFeedbackv5CTABuckets' = array( 'default' = array( -- To view, visit https://gerrit.wikimedia.org/r/71524 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I53e76f0bb46b7bab9d62b9b72aab512ec8fb22e1 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Helder.wiki helder.w...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] let systemuser l10nupdate have bash as shell so it can run l... - change (operations/puppet)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/71525 Change subject: let systemuser l10nupdate have bash as shell so it can run l10nupdate scripts via dsh on new mw* hosts. .. let systemuser l10nupdate have bash as shell so it can run l10nupdate scripts via dsh on new mw* hosts. apergos sudo -u l10nupdate ... mutante if i'd give it a bash, it works anomie apergos, mutante: Yeah, it used to work, until relatively recently. anomie mutante, apergos: So, since the /bin/false shell is the problem, can we get an appropriate shell set? Or is there some other way for sync-l10nupdate-1 to work? Change-Id: I55cbb6177fd30bf21bfa1ebc37f88a9eeca8c98c --- M modules/mediawiki/manifests/users/l10nupdate.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/25/71525/1 diff --git a/modules/mediawiki/manifests/users/l10nupdate.pp b/modules/mediawiki/manifests/users/l10nupdate.pp index 0861885..f724369 100644 --- a/modules/mediawiki/manifests/users/l10nupdate.pp +++ b/modules/mediawiki/manifests/users/l10nupdate.pp @@ -5,7 +5,7 @@ require groups::l10nupdate - systemuser { 'l10nupdate': name = 'l10nupdate', home = '/home/l10nupdate', default_group = 10002 } + systemuser { 'l10nupdate': name = 'l10nupdate', home = '/home/l10nupdate', default_group = 10002, shell = '/bin/bash' } file { /home/l10nupdate/.ssh: -- To view, visit https://gerrit.wikimedia.org/r/71525 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I55cbb6177fd30bf21bfa1ebc37f88a9eeca8c98c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn dz...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Implement mw.toolbar.addButtons - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Implement mw.toolbar.addButtons .. Implement mw.toolbar.addButtons Example: ``` var skinPath; if ( mw.toolbar ) { skinPath = mw.config.get( 'stylepath' ); mw.toolbar.addButtons( [ { imageFile: skinPath + '/common/images/button_bold.png', speedTip: 'add foo tag', tagOpen: 'foo', tagClose: '/foo', sampleText: 'foo here', imageId: 'foo-id' }, { // .. } ] ); mw.toolbar.addButtons( { imageFile: skinPath + '/common/images/button_bold.png', speedTip: 'add foo tag', tagOpen: 'foo', tagClose: '/foo', sampleText: 'foo here', imageId: 'foo-id' }, { // .. } ); mw.toolbar.addButton( { imageFile: skinPath + '/common/images/button_link.png', speedTip: 'add baz tag', tagOpen: 'baz', tagClose: '/baz', sampleText: 'baz here', imageId: 'baz-id' } ); mw.toolbar.addButton( skinPath + '/common/images/button_link.png', 'add baz2 tag', 'baz2', '/baz2', 'baz2 here', 'baz2-id' ); } ``` Clean up: * Rename currentFocused to $currentFocused (we are using jQuery); * Add missing dependency 'mediawiki.legacy.wikibits', since this module uses the array window.mwCustomEditButtons. Bug: 40518 Change-Id: I76d1f753cb9e1c119d9b5e7f565acd684f5516d1 --- M RELEASE-NOTES-1.22 M resources/Resources.php M resources/mediawiki.action/mediawiki.action.edit.js 3 files changed, 44 insertions(+), 13 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22 index ca653ef..0932155 100644 --- a/RELEASE-NOTES-1.22 +++ b/RELEASE-NOTES-1.22 @@ -115,6 +115,8 @@ * (bug 46513) Vector: Add the collapsibleTabs script from the Vector extension. * Added $wgRecentChangesFlags for defining new flags for RecentChanges and watchlists. +* (bug 40518) mw.toolbar: Implemented mw.toolbar.addButtons for adding multiple + button objects in one call. === Bug fixes in 1.22 === * Disable Special:PasswordReset when $wgEnableEmail is false. Previously one diff --git a/resources/Resources.php b/resources/Resources.php index f931ad8..d6852c3 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -719,6 +719,7 @@ 'mediawiki.action.edit' = array( 'scripts' = 'resources/mediawiki.action/mediawiki.action.edit.js', 'dependencies' = array( + 'mediawiki.legacy.wikibits', 'jquery.textSelection', 'jquery.byteLimit', ), diff --git a/resources/mediawiki.action/mediawiki.action.edit.js b/resources/mediawiki.action/mediawiki.action.edit.js index 1c5a018..d29ee42 100644 --- a/resources/mediawiki.action/mediawiki.action.edit.js +++ b/resources/mediawiki.action/mediawiki.action.edit.js @@ -5,7 +5,7 @@ * @singleton */ ( function ( mw, $ ) { - var toolbar, isReady, $toolbar, queue, slice, currentFocused; + var toolbar, isReady, $toolbar, queue, slice, $currentFocused; /** * Internal helper that does the actual insertion of the button into the toolbar. @@ -44,6 +44,12 @@ isReady = false; $toolbar = false; + /** +* @private +* @property {Array} +* Contains button objects (and for backwards compatibilty, it can +* also contains an arguments array for insertButton). +*/ queue = []; slice = queue.slice; @@ -75,6 +81,27 @@ queue.push( slice.call( arguments ) ); } }, + /** +* Example usage: +* addButtons( [ { .. }, { .. }, { .. } ] ); +* addButtons( { .. }, { .. } ); +* +* @param {Object|Array} [buttons...] An array of button objects or the first +* button object in a list of variadic arguments. +*/ + addButtons: function ( buttons ) { + if ( !$.isArray( buttons ) ) { + buttons = slice.call( arguments ); + } + if ( isReady ) { + $.each( buttons, function () { + insertButton( this ); + } ); + } else { + // Push each button into the queue + queue.push.apply( queue, buttons ); + } + }, /** * Apply tagOpen/tagClose to selection in currently focused textarea. @@ -86,12 +113,12 @@ * @param
[MediaWiki-commits] [Gerrit] Resizing Images Sometimes Sets Unusable Size - change (mediawiki...VisualEditor)
Christian has uploaded a new change for review. https://gerrit.wikimedia.org/r/71526 Change subject: Resizing Images Sometimes Sets Unusable Size .. Resizing Images Sometimes Sets Unusable Size Resize handle event handling was set up to bind on focus and unbind on document mouse up. The problem is that focus can be set programmatically and sometimes more than once. This would cause the image to be properly resized once, but immediately resized again to 0x0. Now, before binding events to the resize handles, all resize handle events are unbound. Change-Id: I22b7902d303b5ca43e132c121d743d6815980fc6 --- M modules/ve/ce/ve.ce.ResizableNode.js 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/26/71526/1 diff --git a/modules/ve/ce/ve.ce.ResizableNode.js b/modules/ve/ce/ve.ce.ResizableNode.js index 19e1cea..0f5faca 100644 --- a/modules/ve/ce/ve.ce.ResizableNode.js +++ b/modules/ve/ce/ve.ce.ResizableNode.js @@ -20,8 +20,6 @@ this.ratio = this.model.getAttribute( 'width' ) / this.model.getAttribute( 'height' ); this.resizing = false; this.$resizeHandles = this.$$( 'div' ); - this.onResizeHandlesCornerMouseDownHandler = - ve.bind( this.onResizeHandlesCornerMouseDown, this ); // Events this.connect( this, { @@ -78,6 +76,10 @@ .end() .children() .on( 'mousedown', this.onResizeHandlesCornerMouseDownHandler ); + + this.$resizeHandles.children() + .off() + .on( 'mousedown', ve.bind( this.onResizeHandlesCornerMouseDown, this ) ); }; /** -- To view, visit https://gerrit.wikimedia.org/r/71526 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I22b7902d303b5ca43e132c121d743d6815980fc6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Christian christ...@wikia-inc.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Re-added __NOTOC__ that shouldn't have been removed, impro... - change (mediawiki...DataTransfer)
Yaron Koren has uploaded a new change for review. https://gerrit.wikimedia.org/r/71527 Change subject: Re-added __NOTOC__ that shouldn't have been removed, improved comments .. Re-added __NOTOC__ that shouldn't have been removed, improved comments Change-Id: I920e14f3107670a8f731c78ced46a5e4e9a23a15 --- M includes/DT_PageStructure.php 1 file changed, 10 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataTransfer refs/changes/27/71527/1 diff --git a/includes/DT_PageStructure.php b/includes/DT_PageStructure.php index b27000d..f5a91ec 100644 --- a/includes/DT_PageStructure.php +++ b/includes/DT_PageStructure.php @@ -120,7 +120,7 @@ $freeText = $mw-replace( '', $freeText ); } // Avoid edit links. - $freeText = $wgParser-parse( __NOEDITSECTION__\n . $freeText, $wgTitle, new ParserOptions() )-getText(); + $freeText = $wgParser-parse( __NOTOC__ __NOEDITSECTION__\n . $freeText, $wgTitle, new ParserOptions() )-getText(); } else { $freeText = $this-mFreeText; } @@ -130,7 +130,8 @@ } /** - * Class that holds the structure of a single wiki page. + * Class that holds the structure of a single wiki page. It is used for both + * turning wikitext into XML, and vice versa. * * @author Yaron Koren */ @@ -175,6 +176,10 @@ return $pageStructure; } + /** +* Parses the contents of a wiki page, turning template calls into +* an arracy of DTPageComponent objects. +*/ public function parsePageContents( $page_contents ) { // escape out variables like {{PAGENAME}} $page_contents = str_replace( '{{PAGENAME}}', '#123;#123;PAGENAME#125;#125;', $page_contents ); @@ -320,6 +325,9 @@ return null; } + /** +* Used when doing a merge in an XML or CSV import. +*/ public function mergeInPageStructure( $secondPageStructure ) { // If there are any templates that have one instance in both // pages, replace values for their fields with values from -- To view, visit https://gerrit.wikimedia.org/r/71527 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I920e14f3107670a8f731c78ced46a5e4e9a23a15 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataTransfer Gerrit-Branch: master Gerrit-Owner: Yaron Koren yaro...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] WIP Bug 50474: Remove children of references node - change (mediawiki...Parsoid)
GWicke has uploaded a new change for review. https://gerrit.wikimedia.org/r/71528 Change subject: WIP Bug 50474: Remove children of references node .. WIP Bug 50474: Remove children of references node Make sure we don't keep old references content around on re-render. Change-Id: I79ad1e5d69ebb506078fa5903d1ff78b6ff82433 --- M js/lib/ext.Cite.js 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/28/71528/1 diff --git a/js/lib/ext.Cite.js b/js/lib/ext.Cite.js index 82dfdbc..356750b 100644 --- a/js/lib/ext.Cite.js +++ b/js/lib/ext.Cite.js @@ -448,6 +448,11 @@ refsNode.setAttribute('data-mw', dataMW); + // Remove all children from the references node + while (refsNode.firstChild) { + refsNode.removeChild(refsNode.firstChild); + } + if (refGroup) { refGroup.refs.map(refGroup.renderLine.bind(refGroup, refsNode)); } -- To view, visit https://gerrit.wikimedia.org/r/71528 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I79ad1e5d69ebb506078fa5903d1ff78b6ff82433 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: GWicke gwi...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] giving neon its own gmetad to reduce disk usage - change (operations/puppet)
Lcarr has uploaded a new change for review. https://gerrit.wikimedia.org/r/71529 Change subject: giving neon its own gmetad to reduce disk usage .. giving neon its own gmetad to reduce disk usage Change-Id: I45e34ce305cd25af6c48662f13fe63f6ac9deb55 --- M manifests/ganglia.pp 1 file changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/29/71529/1 diff --git a/manifests/ganglia.pp b/manifests/ganglia.pp index 465c488..c1f6213 100644 --- a/manifests/ganglia.pp +++ b/manifests/ganglia.pp @@ -269,6 +269,15 @@ } $rra_sizes = 'RRA:AVERAGE:0:1:4032 RRA:AVERAGE:0.17:6:2016 RRA:MAX:0.17:6:2016 RRA:AVERAGE:0.042:288:732 RRA:MAX:0.042:288:732' } + # neon runs gmetad for ganglios + /^neon$/: { + $data_sources = { + Miscellaneous = hooper.wikimedia.org tarin.pmtpa.wmnet, + Miscellaneous eqiad = carbon.wikimedia.org ms1004.eqiad.wmnet, + Analytics cluster eqiad = analytics1003.eqiad.wmnet analytics1011.eqiad.wmnet, + } + $rra_sizes = 'RRA:AVERAGE:0.5:1:360 RRA:AVERAGE:0.5:24:245 RRA:AVERAGE:0.5:168:241 RRA:AVERAGE:0.5:672:241 RRA:AVERAGE:0.5:5760:371 + } default: { $data_sources = { Decommissioned servers pmtpa = eiximenis.wikimedia.org, -- To view, visit https://gerrit.wikimedia.org/r/71529 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I45e34ce305cd25af6c48662f13fe63f6ac9deb55 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Lcarr lc...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Re-added __NOTOC__ that shouldn't have been removed, impro... - change (mediawiki...DataTransfer)
Yaron Koren has submitted this change and it was merged. Change subject: Re-added __NOTOC__ that shouldn't have been removed, improved comments .. Re-added __NOTOC__ that shouldn't have been removed, improved comments Change-Id: I920e14f3107670a8f731c78ced46a5e4e9a23a15 --- M includes/DT_PageStructure.php 1 file changed, 10 insertions(+), 2 deletions(-) Approvals: Yaron Koren: Verified; Looks good to me, approved diff --git a/includes/DT_PageStructure.php b/includes/DT_PageStructure.php index b27000d..f5a91ec 100644 --- a/includes/DT_PageStructure.php +++ b/includes/DT_PageStructure.php @@ -120,7 +120,7 @@ $freeText = $mw-replace( '', $freeText ); } // Avoid edit links. - $freeText = $wgParser-parse( __NOEDITSECTION__\n . $freeText, $wgTitle, new ParserOptions() )-getText(); + $freeText = $wgParser-parse( __NOTOC__ __NOEDITSECTION__\n . $freeText, $wgTitle, new ParserOptions() )-getText(); } else { $freeText = $this-mFreeText; } @@ -130,7 +130,8 @@ } /** - * Class that holds the structure of a single wiki page. + * Class that holds the structure of a single wiki page. It is used for both + * turning wikitext into XML, and vice versa. * * @author Yaron Koren */ @@ -175,6 +176,10 @@ return $pageStructure; } + /** +* Parses the contents of a wiki page, turning template calls into +* an arracy of DTPageComponent objects. +*/ public function parsePageContents( $page_contents ) { // escape out variables like {{PAGENAME}} $page_contents = str_replace( '{{PAGENAME}}', '#123;#123;PAGENAME#125;#125;', $page_contents ); @@ -320,6 +325,9 @@ return null; } + /** +* Used when doing a merge in an XML or CSV import. +*/ public function mergeInPageStructure( $secondPageStructure ) { // If there are any templates that have one instance in both // pages, replace values for their fields with values from -- To view, visit https://gerrit.wikimedia.org/r/71527 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I920e14f3107670a8f731c78ced46a5e4e9a23a15 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataTransfer Gerrit-Branch: master Gerrit-Owner: Yaron Koren yaro...@gmail.com Gerrit-Reviewer: Yaron Koren yaro...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Tablesorter: colspan property was incorrectly accessed - change (mediawiki/core)
TheDJ has uploaded a new change for review. https://gerrit.wikimedia.org/r/71530 Change subject: Tablesorter: colspan property was incorrectly accessed .. Tablesorter: colspan property was incorrectly accessed Due to mixing up of colspan attribute and colSpan property we had a hidden bug in the resolving of the list of to be sorted columns when colspan was being used on headers. Change-Id: I264afb565afbe555733bad499bad6f9c87894982 --- M resources/jquery/jquery.tablesorter.js M tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js 2 files changed, 11 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/30/71530/1 diff --git a/resources/jquery/jquery.tablesorter.js b/resources/jquery/jquery.tablesorter.js index 405c600..42d29c3 100644 --- a/resources/jquery/jquery.tablesorter.js +++ b/resources/jquery/jquery.tablesorter.js @@ -301,10 +301,7 @@ } $tableHeaders = $tableHeaders.children( 'th' ).each( function ( index ) { this.column = realCellIndex; - - var colspan = this.colspan; - colspan = colspan ? parseInt( colspan, 10 ) : 1; - realCellIndex += colspan; + realCellIndex += this.colSpan; this.order = 0; this.count = 0; @@ -758,7 +755,7 @@ var cell = this; // Get current column index - var columns = headerToColumns[this.column]; + var columns = headerToColumns[columnToHeader[this.column]]; var newSortList = $.map( columns, function (c) { // jQuery helpfully flattens the arrays... return [[c, cell.order]]; diff --git a/tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js b/tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js index 4353464..a327fe3 100644 --- a/tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js +++ b/tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js @@ -362,7 +362,7 @@ function ( $table ) { // Make colspanned header for test $table.find( 'tr:eq(0) th:eq(1), tr:eq(0) th:eq(2)' ).remove(); - $table.find( 'tr:eq(0) th:eq(0)' ).prop( 'colspan', '3' ); + $table.find( 'tr:eq(0) th:eq(0)' ).attr( 'colspan', '3' ); $table.tablesorter(); $table.find( '.headerSort:eq(0)' ).click(); @@ -375,7 +375,7 @@ function ( $table ) { // Make colspanned header for test $table.find( 'tr:eq(0) th:eq(1), tr:eq(0) th:eq(2)' ).remove(); - $table.find( 'tr:eq(0) th:eq(0)' ).prop( 'colspan', '3' ); + $table.find( 'tr:eq(0) th:eq(0)' ).attr( 'colspan', '3' ); $table.tablesorter(); $table.find( '.headerSort:eq(0)' ).click(); @@ -389,7 +389,7 @@ function ( $table ) { // Make colspanned header for test $table.find( 'tr:eq(0) th:eq(1), tr:eq(0) th:eq(2)' ).remove(); - $table.find( 'tr:eq(0) th:eq(0)' ).prop( 'colspan', '3' ); + $table.find( 'tr:eq(0) th:eq(0)' ).attr( 'colspan', '3' ); $table.tablesorter(); $table.find( '.headerSort:eq(1)' ).click(); @@ -402,7 +402,7 @@ function ( $table ) { // Make colspanned header for test $table.find( 'tr:eq(0) th:eq(1), tr:eq(0) th:eq(2)' ).remove(); - $table.find( 'tr:eq(0) th:eq(0)' ).prop( 'colspan', '3' ); + $table.find( 'tr:eq(0) th:eq(0)' ).attr( 'colspan', '3' ); $table.tablesorter(); $table.find( '.headerSort:eq(1)' ).click(); @@ -561,12 +561,12 @@ $table.find( 'tr:eq(3) td:eq(1), tr:eq(4) td:eq(1)' ).remove(); // - Set rowspan for 2nd cell of 3rd row to 3. // This covers the removed cell in the 4th and 5th row. - $table.find( 'tr:eq(2) td:eq(1)' ).prop( 'rowspan', '3' ); + $table.find( 'tr:eq(2) td:eq(1)' ).attr( 'rowspan', '3' ); $table.tablesorter(); assert.equal( - $table.find( 'tr:eq(2) td:eq(1)' ).prop( 'rowspan' ), +
[MediaWiki-commits] [Gerrit] giving neon its own gmetad to reduce disk usage - change (operations/puppet)
Lcarr has submitted this change and it was merged. Change subject: giving neon its own gmetad to reduce disk usage .. giving neon its own gmetad to reduce disk usage Change-Id: I45e34ce305cd25af6c48662f13fe63f6ac9deb55 --- M manifests/ganglia.pp 1 file changed, 9 insertions(+), 0 deletions(-) Approvals: Lcarr: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/ganglia.pp b/manifests/ganglia.pp index 465c488..11bcf55 100644 --- a/manifests/ganglia.pp +++ b/manifests/ganglia.pp @@ -269,6 +269,15 @@ } $rra_sizes = 'RRA:AVERAGE:0:1:4032 RRA:AVERAGE:0.17:6:2016 RRA:MAX:0.17:6:2016 RRA:AVERAGE:0.042:288:732 RRA:MAX:0.042:288:732' } + # neon runs gmetad for ganglios + /^neon$/: { + $data_sources = { + Miscellaneous = hooper.wikimedia.org tarin.pmtpa.wmnet, + Miscellaneous eqiad = carbon.wikimedia.org ms1004.eqiad.wmnet, + Analytics cluster eqiad = analytics1003.eqiad.wmnet analytics1011.eqiad.wmnet, + } + $rra_sizes = 'RRA:AVERAGE:0.5:1:360 RRA:AVERAGE:0.5:24:245 RRA:AVERAGE:0.5:168:241 RRA:AVERAGE:0.5:672:241 RRA:AVERAGE:0.5:5760:371' + } default: { $data_sources = { Decommissioned servers pmtpa = eiximenis.wikimedia.org, -- To view, visit https://gerrit.wikimedia.org/r/71529 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I45e34ce305cd25af6c48662f13fe63f6ac9deb55 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Lcarr lc...@wikimedia.org Gerrit-Reviewer: Lcarr lc...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make 'visualeditor-enable' pref hidden on wikis where VE is ... - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Make 'visualeditor-enable' pref hidden on wikis where VE is default .. Make 'visualeditor-enable' pref hidden on wikis where VE is default Bug: 48666 Change-Id: Ica186b9374ddaa0f2f6b2a84e5dff851011b68a4 --- M wmf-config/CommonSettings.php 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index 9ebe00e..34a0497 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -1907,6 +1907,7 @@ } if ( $wmgVisualEditorDefault ) { $wgDefaultUserOptions['visualeditor-enable'] = 1; + $wgHiddenPrefs[] = 'visualeditor-enable'; // Bug 48666 } if ( $wmgVisualEditorExperimental ) { $wgVisualEditorEnableExperimentalCode = true; -- To view, visit https://gerrit.wikimedia.org/r/70652 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ica186b9374ddaa0f2f6b2a84e5dff851011b68a4 Gerrit-PatchSet: 3 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: Catrope roan.katt...@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] Enable VisualEditor for all logged-in users (but not anons) ... - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Enable VisualEditor for all logged-in users (but not anons) on enwiki .. Enable VisualEditor for all logged-in users (but not anons) on enwiki Bug: 49997 Change-Id: I7fa967db7abdc17e3e7d0547fa8941d2c912c1d5 --- M wmf-config/CommonSettings.php M wmf-config/InitialiseSettings.php 2 files changed, 12 insertions(+), 1 deletion(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index 34a0497..84a9363 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -1912,6 +1912,10 @@ if ( $wmgVisualEditorExperimental ) { $wgVisualEditorEnableExperimentalCode = true; } + // Bug 5 - to remove once roll-out is complete. + if ( $wmgVisualEditorDisableForAnons ) { + $wgVisualEditorDisableForAnons = true; + } if ( $wmgVisualEditorEnableEventLogging ) { $wgVisualEditorEnableEventLogging = true; } diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index de59236..8233ae8 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -10514,7 +10514,8 @@ 'wmgVisualEditorDefault' = array( 'default' = false, - 'mediawikiwiki' = true // Enabled for all users + 'mediawikiwiki' = true, + 'enwiki' = true ), 'wmgVisualEditorExperimental' = array( @@ -10526,6 +10527,12 @@ 'default' = true, ), +// Bug 5 - to remove once roll-out complete +'wmgVisualEditorDisableForAnons' = array( + 'default' = false, + 'enwiki' = true, // Bug 49997: Temporarily set during enwiki phased deployment +), + 'wmgVisualEditorEnableEventLogging' = array( 'default' = false, 'enwiki' = true, -- To view, visit https://gerrit.wikimedia.org/r/71261 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7fa967db7abdc17e3e7d0547fa8941d2c912c1d5 Gerrit-PatchSet: 6 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: Catrope roan.katt...@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] Bug 50474: Remove children of references node - change (mediawiki...Parsoid)
jenkins-bot has submitted this change and it was merged. Change subject: Bug 50474: Remove children of references node .. Bug 50474: Remove children of references node Make sure we don't keep old references content around on re-render. Change-Id: I79ad1e5d69ebb506078fa5903d1ff78b6ff82433 --- M js/lib/ext.Cite.js 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified diff --git a/js/lib/ext.Cite.js b/js/lib/ext.Cite.js index 82dfdbc..356750b 100644 --- a/js/lib/ext.Cite.js +++ b/js/lib/ext.Cite.js @@ -448,6 +448,11 @@ refsNode.setAttribute('data-mw', dataMW); + // Remove all children from the references node + while (refsNode.firstChild) { + refsNode.removeChild(refsNode.firstChild); + } + if (refGroup) { refGroup.refs.map(refGroup.renderLine.bind(refGroup, refsNode)); } -- To view, visit https://gerrit.wikimedia.org/r/71528 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I79ad1e5d69ebb506078fa5903d1ff78b6ff82433 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: GWicke gwi...@wikimedia.org Gerrit-Reviewer: Subramanya Sastry ssas...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add difflink to mention email notification - change (mediawiki...Echo)
Bsitu has uploaded a new change for review. https://gerrit.wikimedia.org/r/71531 Change subject: Add difflink to mention email notification .. Add difflink to mention email notification Change-Id: I521ff0387dc7079ebf0c7f58a34d799673833b7c --- M Echo.i18n.php M Echo.php 2 files changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/31/71531/1 diff --git a/Echo.i18n.php b/Echo.i18n.php index bd034bb..585dd3f 100644 --- a/Echo.i18n.php +++ b/Echo.i18n.php @@ -129,9 +129,12 @@ $3 -View more: +View mention: $4 + +View changes: +$6 $5', 'notification-mention-email-batch-body' = '$1 {{GENDER:$1|mentioned}} you on $2', @@ -463,6 +466,7 @@ * $3 is the edit summary * $4 is the link to the talk page section title * $5 is the email footer +* $6 is a link to the diff view of the changes that were made See also: * {{msg-mw|Notification-mention}} diff --git a/Echo.php b/Echo.php index fa62b04..59cc268 100755 --- a/Echo.php +++ b/Echo.php @@ -495,7 +495,7 @@ 'email-subject-message' = 'notification-mention-email-subject', 'email-subject-params' = array( 'agent' ), 'email-body-message' = 'notification-mention-email-body', - 'email-body-params' = array( 'agent', 'title', 'summary', 'subject-link', 'email-footer' ), + 'email-body-params' = array( 'agent', 'title', 'summary', 'subject-link', 'email-footer', 'difflink' ), 'email-body-batch-message' = 'notification-mention-email-batch-body', 'email-body-batch-params' = array( 'agent', 'title' ), 'icon' = 'chat', -- To view, visit https://gerrit.wikimedia.org/r/71531 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I521ff0387dc7079ebf0c7f58a34d799673833b7c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Bsitu bs...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix spelling (localised) - change (mediawiki...CentralNotice)
Shirayuki has uploaded a new change for review. https://gerrit.wikimedia.org/r/71532 Change subject: Fix spelling (localised) .. Fix spelling (localised) For consistency Change-Id: Ic691811322b997f20f1dc85bfd298f29af225d90 --- M CentralNotice.i18n.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice refs/changes/32/71532/1 diff --git a/CentralNotice.i18n.php b/CentralNotice.i18n.php index 3734f8a..a884061 100644 --- a/CentralNotice.i18n.php +++ b/CentralNotice.i18n.php @@ -126,7 +126,7 @@ 'centralnotice-banner-collapsible' = 'Collapsible', 'centralnotice-banner-fundraising' = 'This is a fundraising banner', 'centralnotice-banner-autolink' = 'Automatically create landing page link', - 'centralnotice-banner-autolink-help' = 'When enabled CentralNotice will automatically create a localized link to $3 with a landing page selected at random. There must be an anchor tag with $1 in the banner body.', + 'centralnotice-banner-autolink-help' = 'When enabled CentralNotice will automatically create a localised link to $3 with a landing page selected at random. There must be an anchor tag with $1 in the banner body.', 'centralnotice-banner-landing-pages' = 'Landing pages (comma-separated)', 'centralnotice-banner-landing-pages-default' = 'e.g. JimmyAppeal01', 'centralnotice-banner-mixins' = 'Mixins (comma-separated):', -- To view, visit https://gerrit.wikimedia.org/r/71532 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic691811322b997f20f1dc85bfd298f29af225d90 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralNotice Gerrit-Branch: master Gerrit-Owner: Shirayuki shirayuk...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable gender survey on English Wikipedia. - change (operations/mediawiki-config)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/71533 Change subject: Enable gender survey on English Wikipedia. .. Enable gender survey on English Wikipedia. Change-Id: I855880fa06a6480ac644b5cce2678fea6ce78787 --- M wmf-config/CommonSettings.php M wmf-config/InitialiseSettings.php 2 files changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/33/71533/1 diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index 3873fd5..8c39afa 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -1925,6 +1925,10 @@ $wgVisualEditorEnableSplitTest = true; } + if ( $wmgVisualEditorEnableGenderSurvey ) { + $wgVisualEditorEnableGenderSurvey = true; + } + // Also include the Parsoid extension when VE is enabled require_once( $IP/extensions/Parsoid/php/Parsoid.php ); // List the parsoid cache servers to keep up to date. diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 98c1277..ed47e68 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -10395,6 +10395,11 @@ 'enwiki' = true, ), +'wmgVisualEditorEnableGenderSurvey' = array( + 'default' = false, + 'enwiki' = true, +), + 'wmgUseRSSExtension' = array( 'default' = false, 'foundationwiki' = true, -- To view, visit https://gerrit.wikimedia.org/r/71533 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I855880fa06a6480ac644b5cce2678fea6ce78787 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Adds auto translate feature. - change (mediawiki...LiveTranslate)
Yaron Koren has submitted this change and it was merged. Change subject: Adds auto translate feature. .. Adds auto translate feature. Auto translates the text if 1) query string contains language=xx 2) 'lt_user_lang' cookie is set 3) user has specified a language in his preferences. Sets a cookie on manual tranlation and on occurance of a query string with language=xx Complete functionability can be disabled by setting $egAutoTranslate to false. Change-Id: I28677e54d10a1c2073e3b063033140cdbf20ba41 --- M LiveTranslate.hooks.php M LiveTranslate.php M LiveTranslate_Settings.php M includes/LiveTranslate_Functions.php M includes/jquery.liveTranslate.js 5 files changed, 239 insertions(+), 149 deletions(-) Approvals: Yaron Koren: Verified; Looks good to me, approved diff --git a/LiveTranslate.hooks.php b/LiveTranslate.hooks.php index 499db9e..95c4512 100644 --- a/LiveTranslate.hooks.php +++ b/LiveTranslate.hooks.php @@ -26,7 +26,7 @@ public static function onArticleViewHeader( Article $article, $outputDone, $useParserCache ) { global $egLiveTranslateLanguages; $egLiveTranslateLanguages = array_unique( $egLiveTranslateLanguages ); - + $title = $article-getTitle(); $currentLang = LiveTranslateFunctions::getCurrentLang( $title ); @@ -155,17 +155,21 @@ global $wgOut; $langs = array(); - - foreach ( LiveTranslateFunctions::getLanguages( $currentLang ) as $label = $code ) { + $translateLanguages = LiveTranslateFunctions::getLanguages( $currentLang ); + + foreach ( $translateLanguages as $label = $code ) { $langs[] = $code|$label; } + $autoTranslateLang = LiveTranslateFunctions::getAutoTranslateLang( $currentLang ); + $wgOut-addHTML( Html::rawElement( 'div', array( 'id' = 'livetranslatediv', 'sourcelang' = $currentLang, - 'languages' = implode( '||', $langs ) + 'languages' = implode( '||', $langs ), + 'autolang' = in_array( $autoTranslateLang, $translateLanguages ) ? $autoTranslateLang : $currentLang ) ) ); @@ -213,7 +217,7 @@ 'memory_id', $egLiveTranslateIP . '/sql/LT_addTMField.sql' ); - + $wgExtNewFields[] = array( 'live_translate_memories', 'memory_version_hash', @@ -249,7 +253,7 @@ $egLiveTranslateIP . '/sql/LT_addTMField.sql', true ) ); - + $updater-addExtensionUpdate( array( 'addField', 'live_translate_memories', @@ -322,9 +326,12 @@ return true; } - public static function onOutputPageParserOutput( $outputpage, $parseroutput ) { + public static function onOutputPageParserOutput( OutputPage $out, ParserOutput $parseroutput ) { + if ( $out-getRequest()-getVal( 'language', '' ) !== '' ){ // check URL to set cookies + LiveTranslateFunctions::setAutoTranslationCookie( $out-getRequest()-getVal( 'language' ) ); + } + $magicWords = isset( $parseroutput-mLTMagicWords ) ? $parseroutput-mLTMagicWords : array(); return true; } - } diff --git a/LiveTranslate.php b/LiveTranslate.php index 4cd421a..2a38c65 100644 --- a/LiveTranslate.php +++ b/LiveTranslate.php @@ -2,7 +2,7 @@ /** * Initialization file for the Live Translate extension. - * + * * Documentation: http://www.mediawiki.org/wiki/Extension:Live_Translate * Support http://www.mediawiki.org/wiki/Extension_talk:Live_Translate * Source code: http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/LiveTranslate @@ -95,7 +95,7 @@ 'remoteExtPath' = 'LiveTranslate', 'group' = 'ext.livetranslate' ); - + $wgResourceModules['ext.livetranslate'] = $moduleTemplate + array( 'scripts' = array( 'includes/jquery.replaceText.js', @@ -107,13 +107,13 @@ 'dependencies' = array(
[MediaWiki-commits] [Gerrit] Fix spelling (localised) - change (mediawiki...CentralNotice)
jenkins-bot has submitted this change and it was merged. Change subject: Fix spelling (localised) .. Fix spelling (localised) For consistency Change-Id: Ic691811322b997f20f1dc85bfd298f29af225d90 --- M CentralNotice.i18n.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Mwalker: Looks good to me, approved jenkins-bot: Verified diff --git a/CentralNotice.i18n.php b/CentralNotice.i18n.php index 3734f8a..a884061 100644 --- a/CentralNotice.i18n.php +++ b/CentralNotice.i18n.php @@ -126,7 +126,7 @@ 'centralnotice-banner-collapsible' = 'Collapsible', 'centralnotice-banner-fundraising' = 'This is a fundraising banner', 'centralnotice-banner-autolink' = 'Automatically create landing page link', - 'centralnotice-banner-autolink-help' = 'When enabled CentralNotice will automatically create a localized link to $3 with a landing page selected at random. There must be an anchor tag with $1 in the banner body.', + 'centralnotice-banner-autolink-help' = 'When enabled CentralNotice will automatically create a localised link to $3 with a landing page selected at random. There must be an anchor tag with $1 in the banner body.', 'centralnotice-banner-landing-pages' = 'Landing pages (comma-separated)', 'centralnotice-banner-landing-pages-default' = 'e.g. JimmyAppeal01', 'centralnotice-banner-mixins' = 'Mixins (comma-separated):', -- To view, visit https://gerrit.wikimedia.org/r/71532 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic691811322b997f20f1dc85bfd298f29af225d90 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralNotice Gerrit-Branch: master Gerrit-Owner: Shirayuki shirayuk...@gmail.com Gerrit-Reviewer: Mwalker mwal...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove trailing whitespace. - change (operations/mediawiki-config)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/71534 Change subject: Remove trailing whitespace. .. Remove trailing whitespace. Change-Id: Ifd2fbc43c719d77c88d9b37958cf3c36ed0efa7c --- M wmf-config/InitialiseSettings.php 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/34/71534/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 98c1277..3b615b1 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -5322,7 +5322,7 @@ 101 = 'Kişi_tartışma', ), 'ukwikisource' = array( // bug 48308 - NS_PROJECT_TALK = 'Обговорення_Вікіджерел', + NS_PROJECT_TALK = 'Обговорення_Вікіджерел', 102 = 'Автор', // Author 103 = 'Обговорення_автора', ), @@ -8400,7 +8400,7 @@ 'confirmed', // bug 45124 'propertycreator', // bug 46953 ), - 'bureaucrat' = array( + 'bureaucrat' = array( 'translationadmin', // bug 44395 'flood', // bug 48013 ), @@ -9928,7 +9928,7 @@ 'plwiki' = array( 'flood' = array( 'flood' ) ), // https://bugzilla.wikimedia.org/show_bug.cgi?id=20155 , bug 21238 'strategywiki' = array( 'sysop' = array( 'flood' ) ), 'srwiki' = array( 'sysop' = array( 'flood' ) ), - 'wikidata' = array( + 'wikidata' = array( 'sysop' = array( 'flood', 'translationadmin' ), // Bug 48013, Bug 46856 'flood' = array( 'flood' ), // Bug 48013 ), -- To view, visit https://gerrit.wikimedia.org/r/71534 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifd2fbc43c719d77c88d9b37958cf3c36ed0efa7c Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update protection handling for core change I6bf650a3 - change (mediawiki...FlaggedRevs)
Anomie has uploaded a new change for review. https://gerrit.wikimedia.org/r/71537 Change subject: Update protection handling for core change I6bf650a3 .. Update protection handling for core change I6bf650a3 Gerrit change I6bf650a3 to mediawiki/core changed the rights used for the default page protection levels, and changed the behavior of the 'editprotected' right. This changes FlaggedRevs to match. Change-Id: Iac866bc19fdd47476559b940ea27b73ad4248616 --- M backend/FlaggedRevs.class.php M backend/FlaggedRevs.hooks.php 2 files changed, 9 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FlaggedRevs refs/changes/37/71537/1 diff --git a/backend/FlaggedRevs.class.php b/backend/FlaggedRevs.class.php index 42eeca4..910bb43 100644 --- a/backend/FlaggedRevs.class.php +++ b/backend/FlaggedRevs.class.php @@ -502,8 +502,13 @@ } # Don't let them choose levels above their own rights if ( $right == 'sysop' ) { - // special case, rewrite sysop to protect and editprotected - if ( !$user-isAllowed( 'protect' ) !$user-isAllowed( 'editprotected' ) ) { + // special case, rewrite sysop to editprotected + if ( !$user-isAllowed( 'editprotected' ) ) { + return false; + } + } elseif ( $right == 'autoconfirmed' ) { + // special case, rewrite autoconfirmed to editsemiprotected + if ( !$user-isAllowed( 'editsemiprotected' ) ) { return false; } } elseif ( !$user-isAllowed( $right ) ) { diff --git a/backend/FlaggedRevs.hooks.php b/backend/FlaggedRevs.hooks.php index b22e50c..9a16917 100644 --- a/backend/FlaggedRevs.hooks.php +++ b/backend/FlaggedRevs.hooks.php @@ -340,11 +340,8 @@ // Backwards compatibility, rewrite sysop - protect $right = ( $right === 'sysop' ) ? 'protect' : $right; if ( $right != '' !$user-isAllowed( $right ) ) { - // 'editprotected' bypasses this restriction - if ( !$user-isAllowed( 'editprotected' ) ) { - $result = false; - return false; - } + $result = false; + return false; } } } -- To view, visit https://gerrit.wikimedia.org/r/71537 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iac866bc19fdd47476559b940ea27b73ad4248616 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/FlaggedRevs Gerrit-Branch: master Gerrit-Owner: Anomie bjor...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Give Gabriel shell on the Parsoid Varnishes again - change (operations/puppet)
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/71535 Change subject: Give Gabriel shell on the Parsoid Varnishes again .. Give Gabriel shell on the Parsoid Varnishes again He used to have it so he could run varnishstat, but it went away when we moved to the new boxes. Change-Id: I1688384884c10e7d8f3535d01e1c2d46beec680c --- M manifests/site.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/35/71535/1 diff --git a/manifests/site.pp b/manifests/site.pp index 9d5af67..bde1bf6 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -371,7 +371,7 @@ node 'cp1045.eqiad.wmnet', 'cp1058.eqiad.wmnet' { $ganglia_aggregator = true - include role::cache::parsoid + include role::cache::parsoid, admins::parsoid } node 'cp1046.eqiad.wmnet', 'cp1047.eqiad.wmnet', 'cp1059.eqiad.wmnet', 'cp1060.eqiad.wmnet' { -- To view, visit https://gerrit.wikimedia.org/r/71535 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1688384884c10e7d8f3535d01e1c2d46beec680c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Catrope roan.katt...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update protection configs for core change I6bf650a3 - change (operations/mediawiki-config)
Anomie has uploaded a new change for review. https://gerrit.wikimedia.org/r/71538 Change subject: Update protection configs for core change I6bf650a3 .. Update protection configs for core change I6bf650a3 Change I6bf650a3 to mediawiki/core changed how the 'editprotected' right works, and the rights used for editing protected pages. This changes the group configurations for various wikis to give the same results as under the old system. Change-Id: Idd54dfb133f731e0b1dec748f8eeb03a95b56a60 --- M wmf-config/InitialiseSettings.php 1 file changed, 20 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/38/71538/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 98c1277..9b14b79 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -6529,6 +6529,7 @@ 'move' = true, 'upload' = true, 'autoconfirmed' = true, + 'editsemiprotected' = true, 'reupload' = true, 'skipcaptcha' = true, 'collectionsaveascommunitypage' = true, @@ -6555,6 +6556,7 @@ 'move' = true, 'upload' = true, 'autoconfirmed' = true, + 'editsemiprotected' = true, 'reupload' = true, 'skipcaptcha' = true, 'collectionsaveascommunitypage' = true, @@ -6598,6 +6600,7 @@ 'move-rootuserpages' = false, 'patrol' = false, 'protect' = false, + 'editprotected' = false, 'rollback' = false, 'trackback' = false, 'upload' = false, @@ -6665,6 +6668,7 @@ '+checkuserwiki' = array( // http://bugzilla.wikimedia.org/show_bug.cgi?id=28781 'autoconfirmed' = array( 'autoconfirmed' = false, + 'editsemiprotected' = false, 'reupload' = false, 'upload' = false, 'move' = false, @@ -6674,6 +6678,7 @@ ), 'confirmed' = array( 'autoconfirmed' = false, + 'editsemiprotected' = false, 'reupload' = false, 'upload' = false, 'move' = false, @@ -6851,7 +6856,7 @@ ), 'eswikinews' = array( 'bot' = array( 'editprotected' = true ), - 'editprotected' = array( 'editprotected' = true ), + 'editprotected' = array( 'editprotected' = true, 'editsemiprotected' = true ), 'flood' = array( 'bot' = true ), ), 'eswikivoyage' = array( @@ -6913,8 +6918,8 @@ 'frwiktionary' = array( 'patroller' = array( 'patrol' = true, 'autopatrol' = true, 'rollback' = true, ), 'autopatrolled' = array( 'autopatrol' = true ), - 'botadmin' = array( 'autopatrol' = true, 'autoconfirmed' = true, 'suppressredirect' = true, 'nominornewtalk' = true, 'noratelimit' = true, 'skipcaptcha' = true, 'apihighlimits' = true, 'writeapi' = true, -'bot' = true, 'createaccount' = true, 'import' = true, 'patrol' = true, 'protect' = true, 'editusercss' = true, 'edituserjs' = true, 'editinterface' = true, 'browsearchive' = true, 'movefile' = true, 'move' = true, + 'botadmin' = array( 'autopatrol' = true, 'autoconfirmed' = true, 'editsemiprotected' = true, 'suppressredirect' = true, 'nominornewtalk' = true, 'noratelimit' = true, 'skipcaptcha' = true, 'apihighlimits' = true, 'writeapi' = true, +'bot' = true, 'createaccount' = true, 'import' = true, 'patrol' = true, 'protect' = true, 'editprotected' = true, 'editusercss' = true, 'edituserjs' = true, 'editinterface' = true, 'browsearchive' = true, 'movefile' = true, 'move' = true, 'move-rootuserpages' = true, 'undelete' = true, 'rollback' = true, 'delete' = true, 'deleterevision' = true, 'reupload' = true ), ), @@ -7075,6 +7080,7 @@ 'interface_editor' = array( 'editinterface' = true, 'editprotected' = true, + 'editsemiprotected' = true, 'edituserjs' = true, 'editusercss' = true, 'delete' = true, @@ -7126,8 +7132,8 @@ 'patroller' = array( 'patrol' = true ), 'rollbacker' = array( 'rollback' = true ), 'botadmin' = array( - 'blockemail' = true, 'block' = true, 'ipblock-exempt' = true,
[MediaWiki-commits] [Gerrit] Fix protection rights usage - change (mediawiki/core)
Anomie has uploaded a new change for review. https://gerrit.wikimedia.org/r/71536 Change subject: Fix protection rights usage .. Fix protection rights usage It has long been recognized that using the 'protect' right to control the ability to edit sysop-protected pages is troublesome. r31247 fixed this by adding an 'editprotected' right, but for some reason in r32164 this was changed to bypass protection completely instead of fixing the bug identified in r31462. This patch goes back to do it the right way: editprotected no longer bypasses all protection, and it is used instead of 'protect' for controlling access to sysop-protected pages. For good measure, the same is done with autoconfirmed protection (semiprotection): a new editsemiprotected right is created instead of overloading the existing autoconfirmed right. This also fixes bug 27152 by making editprotected no longer special. Bug: 13137 Bug: 27152 Change-Id: I6bf650a3fbdab8589ae6945c8c916eafd949e41c --- M RELEASE-NOTES-1.22 M includes/DefaultSettings.php M includes/ProtectionForm.php M includes/Title.php M includes/User.php M includes/WikiPage.php M languages/messages/MessagesEn.php M languages/messages/MessagesQqq.php M maintenance/dictionary/mediawiki.dic M maintenance/language/messages.inc M tests/phpunit/includes/TitlePermissionTest.php 11 files changed, 109 insertions(+), 30 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/36/71536/1 diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22 index fb8896a..72d7137 100644 --- a/RELEASE-NOTES-1.22 +++ b/RELEASE-NOTES-1.22 @@ -31,6 +31,12 @@ * New rights 'editmyusercss', 'editmyuserjs', 'viewmywatchlist', and 'editmywatchlist' restrict actions that were formerly allowed by default. They have been added to the default for $wgGroupPermissions['*']. +* The 'editprotected' right no longer allows bypassing of all page protection + restrictions. Any group using it for this purpose will now need to have all + the individual rights listed in $wgRestrictionTypes for the same effect. +* The 'protect' and 'autoconfirmed' rights are no longer used for the default + page protection levels. The rights 'editprotected' and 'editsemiprotected' + are now used for this purpose instead. === New features in 1.22 === * (bug 44525) mediawiki.jqueryMsg can now parse (whitelisted) HTML elements and attributes. @@ -119,6 +125,10 @@ watchlists. * (bug 40518) mw.toolbar: Implemented mw.toolbar.addButtons for adding multiple button objects in one call. +* Rights used for the default protection levels ('sysop' and 'autoconfirmed') + are now used just for that purpose, instead of overloading other rights. This + allows easy granting of the ability to edit sysop-protected pages without + also granting the ability to protect and unprotect. === Bug fixes in 1.22 === * Disable Special:PasswordReset when $wgEnableEmail is false. Previously one diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 31659f3..8578b7c 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -3896,17 +3896,18 @@ // Implicit group for accounts that pass $wgAutoConfirmAge $wgGroupPermissions['autoconfirmed']['autoconfirmed'] = true; +$wgGroupPermissions['autoconfirmed']['editsemiprotected'] = true; // Users with bot privilege can have their edits hidden // from various log pages by default $wgGroupPermissions['bot']['bot'] = true; $wgGroupPermissions['bot']['autoconfirmed'] = true; +$wgGroupPermissions['bot']['editsemiprotected'] = true; $wgGroupPermissions['bot']['nominornewtalk'] = true; $wgGroupPermissions['bot']['autopatrol'] = true; $wgGroupPermissions['bot']['suppressredirect'] = true; $wgGroupPermissions['bot']['apihighlimits'] = true; $wgGroupPermissions['bot']['writeapi'] = true; -#$wgGroupPermissions['bot']['editprotected'] = true; // can edit all protected pages without cascade protection enabled // Most extra permission abilities go to this group $wgGroupPermissions['sysop']['block'] = true; @@ -3927,6 +3928,7 @@ $wgGroupPermissions['sysop']['patrol'] = true; $wgGroupPermissions['sysop']['autopatrol'] = true; $wgGroupPermissions['sysop']['protect'] = true; +$wgGroupPermissions['sysop']['editprotected'] = true; $wgGroupPermissions['sysop']['proxyunbannable'] = true; $wgGroupPermissions['sysop']['rollback'] = true; $wgGroupPermissions['sysop']['upload'] = true; @@ -3934,6 +3936,7 @@ $wgGroupPermissions['sysop']['reupload-shared'] = true; $wgGroupPermissions['sysop']['unwatchedpages'] = true; $wgGroupPermissions['sysop']['autoconfirmed'] = true; +$wgGroupPermissions['sysop']['editsemiprotected'] = true; $wgGroupPermissions['sysop']['ipblock-exempt'] = true; $wgGroupPermissions['sysop']['blockemail'] = true; $wgGroupPermissions['sysop']['markbotedits'] = true; @@ -4032,7 +4035,8 @@ * dictates the order on the protection form's
[MediaWiki-commits] [Gerrit] Improve UI for page protection with $wgNamespaceProtection - change (mediawiki/core)
Anomie has uploaded a new change for review. https://gerrit.wikimedia.org/r/71539 Change subject: Improve UI for page protection with $wgNamespaceProtection .. Improve UI for page protection with $wgNamespaceProtection Right now, if you set $wgNamespaceProtection, the protection interface is confusing: it will allow you to apply useless protection levels for any namespace except MediaWiki, where it will refuse to let you set any protection at all. The fix is to find which restriction levels are more restrictive than the $wgNamespaceProtection restriction (i.e. where there is at least one group that can pass $wgNamespaceProtection but not the level from $wgRestrictionLevels), and use only those in the protection form. If there are no such levels, we can skip showing the protect tab entirely. Change-Id: I9e2b29ade566abcd008ea2ad1e2f9818e315bb32 --- M RELEASE-NOTES-1.22 M includes/EditPage.php M includes/Namespace.php M includes/ProtectionForm.php M includes/SkinTemplate.php 5 files changed, 75 insertions(+), 41 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/39/71539/1 diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22 index 72d7137..cb4cc91 100644 --- a/RELEASE-NOTES-1.22 +++ b/RELEASE-NOTES-1.22 @@ -129,6 +129,10 @@ are now used just for that purpose, instead of overloading other rights. This allows easy granting of the ability to edit sysop-protected pages without also granting the ability to protect and unprotect. +* For namespaces with $wgNamespaceProtection (including the MediaWiki + namespace), the protect tab will be shown iff there are restriction levels + available that would restrict editing beyond what $wgNamespaceProtection + already applies. The protection form will offer only those protection levels. === Bug fixes in 1.22 === * Disable Special:PasswordReset when $wgEnableEmail is false. Previously one diff --git a/includes/EditPage.php b/includes/EditPage.php index 84bb493..04593c4 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -2397,7 +2397,9 @@ } } - if ( $this-mTitle-getNamespace() != NS_MEDIAWIKI $this-mTitle-isProtected( 'edit' ) ) { + if ( $this-mTitle-isProtected( 'edit' ) + MWNamespace::getRestrictionLevels( $this-mTitle-getNamespace() ) !== array( '' ) + ) { # Is the title semi-protected? if ( $this-mTitle-isSemiProtected() ) { $noticeMsg = 'semiprotectedpagewarning'; @@ -2599,7 +2601,9 @@ $attribs = array( 'style' = 'display:none;' ); } else { $classes = array(); // Textarea CSS - if ( $this-mTitle-getNamespace() != NS_MEDIAWIKI $this-mTitle-isProtected( 'edit' ) ) { + if ( $this-mTitle-isProtected( 'edit' ) + MWNamespace::getRestrictionLevels( $this-mTitle-getNamespace() ) !== array( '' ) + ) { # Is the title semi-protected? if ( $this-mTitle-isSemiProtected() ) { $classes[] = 'mw-textarea-sprotected'; diff --git a/includes/Namespace.php b/includes/Namespace.php index 8001b41..939abcd 100644 --- a/includes/Namespace.php +++ b/includes/Namespace.php @@ -433,4 +433,61 @@ ? $wgNamespaceContentModels[$index] : null; } + + /** +* Determine which restriction levels it makes sense to use in a namespace, +* optionally filtered by a user's rights. +* +* @since 1.22 +* @param int $index Index to check +* @param User $user User to check +* @return bool +*/ + public static function getRestrictionLevels( $index, User $user = null ) { + global $wgNamespaceProtection, $wgRestrictionLevels; + + if ( !isset( $wgNamespaceProtection[$index] ) ) { + // All levels are valid if there's no namespace restriction. + return $wgRestrictionLevels; + } + + // First, get the list of groups that can edit this namespace. + $namespaceGroups = array(); + $combine = 'array_merge'; + foreach ( (array)$wgNamespaceProtection[$index] as $right ) { + if ( $right == 'sysop' ) { + $right = 'editprotected'; // BC + } + if ( $right == 'autoconfirmed' ) { + $right = 'editsemiprotected'; // BC + } + if ( $right != '' ) { + $namespaceGroups = call_user_func(
[MediaWiki-commits] [Gerrit] SquidUpdate debug message are now in 'squid' group - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: SquidUpdate debug message are now in 'squid' group .. SquidUpdate debug message are now in 'squid' group To debug purging issues in beta, it would be useful to have all squid related messages grouped at the same place. wfDebug() is logged on beta but it has a good amount of spam which is not that useful. Regrouping all squid operations under the debug log group 'squid' will make it easier to investigate. Change-Id: I2585f38307ae56ec3e05e7a8d6d9dab31bfa --- M includes/cache/SquidUpdate.php 1 file changed, 7 insertions(+), 4 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/cache/SquidUpdate.php b/includes/cache/SquidUpdate.php index dd71801..0ee41e5 100644 --- a/includes/cache/SquidUpdate.php +++ b/includes/cache/SquidUpdate.php @@ -129,7 +129,7 @@ return; } - wfDebug( Squid purge: . implode( ' ', $urlArr ) . \n ); + wfDebugLog( 'squid', __METHOD__ . ': ' . implode( ' ', $urlArr ) . \n ); if ( $wgHTCPMulticastRouting ) { SquidUpdate::HTCPPurge( $urlArr ); @@ -197,7 +197,8 @@ $url = SquidUpdate::expand( $url ); $conf = self::getRuleForURL( $url, $wgHTCPMulticastRouting ); if ( !$conf ) { - wfDebug( No HTCP rule configured for URL $url , skipping\n ); + wfDebugLog( 'squid', __METHOD__ . + No HTCP rule configured for URL $url , skipping\n ); continue; } if ( !isset( $conf['host'] ) || !isset( $conf['port'] ) ) { @@ -225,13 +226,15 @@ $htcpTransID, $htcpSpecifier, 2 ); // Send out - wfDebug( Purging URL $url via HTCP\n ); + wfDebugLog( 'squid', __METHOD__ . + Purging URL $url via HTCP\n ); socket_sendto( $conn, $htcpPacket, $htcpLen, 0, $conf['host'], $conf['port'] ); } } else { $errstr = socket_strerror( socket_last_error() ); - wfDebug( __METHOD__ . (): Error opening UDP socket: $errstr\n ); + wfDebugLog( 'squid', __METHOD__ . + : Error opening UDP socket: $errstr\n ); } wfProfileOut( __METHOD__ ); } -- To view, visit https://gerrit.wikimedia.org/r/71342 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2585f38307ae56ec3e05e7a8d6d9dab31bfa Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org Gerrit-Reviewer: Catrope roan.katt...@gmail.com Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: Reedy re...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable gender survey on English Wikipedia. - change (operations/mediawiki-config)
Ori.livneh has submitted this change and it was merged. Change subject: Enable gender survey on English Wikipedia. .. Enable gender survey on English Wikipedia. Change-Id: I855880fa06a6480ac644b5cce2678fea6ce78787 --- M wmf-config/CommonSettings.php M wmf-config/InitialiseSettings.php 2 files changed, 9 insertions(+), 0 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index 3873fd5..8c39afa 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -1925,6 +1925,10 @@ $wgVisualEditorEnableSplitTest = true; } + if ( $wmgVisualEditorEnableGenderSurvey ) { + $wgVisualEditorEnableGenderSurvey = true; + } + // Also include the Parsoid extension when VE is enabled require_once( $IP/extensions/Parsoid/php/Parsoid.php ); // List the parsoid cache servers to keep up to date. diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 98c1277..ed47e68 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -10395,6 +10395,11 @@ 'enwiki' = true, ), +'wmgVisualEditorEnableGenderSurvey' = array( + 'default' = false, + 'enwiki' = true, +), + 'wmgUseRSSExtension' = array( 'default' = false, 'foundationwiki' = true, -- To view, visit https://gerrit.wikimedia.org/r/71533 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I855880fa06a6480ac644b5cce2678fea6ce78787 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org Gerrit-Reviewer: Ori.livneh o...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove enwiki override for wgVisualEditorEnableSplitTest. - change (operations/mediawiki-config)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/71540 Change subject: Remove enwiki override for wgVisualEditorEnableSplitTest. .. Remove enwiki override for wgVisualEditorEnableSplitTest. The preference no longer matters, but there is no need to set it either. Change-Id: I22b78cf980ab18ac1414abd4171728e21e5b34f2 --- M wmf-config/InitialiseSettings.php 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/40/71540/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 98c1277..1144b0c 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -10392,7 +10392,6 @@ // Bug 49604 - to remove once complete. 'wmgVisualEditorEnableSplitTest' = array( 'default' = false, - 'enwiki' = true, ), 'wmgUseRSSExtension' = array( -- To view, visit https://gerrit.wikimedia.org/r/71540 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I22b78cf980ab18ac1414abd4171728e21e5b34f2 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove trailing whitespace. - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Remove trailing whitespace. .. Remove trailing whitespace. Change-Id: Ifd2fbc43c719d77c88d9b37958cf3c36ed0efa7c --- M wmf-config/InitialiseSettings.php 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Spage: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 98c1277..3b615b1 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -5322,7 +5322,7 @@ 101 = 'Kişi_tartışma', ), 'ukwikisource' = array( // bug 48308 - NS_PROJECT_TALK = 'Обговорення_Вікіджерел', + NS_PROJECT_TALK = 'Обговорення_Вікіджерел', 102 = 'Автор', // Author 103 = 'Обговорення_автора', ), @@ -8400,7 +8400,7 @@ 'confirmed', // bug 45124 'propertycreator', // bug 46953 ), - 'bureaucrat' = array( + 'bureaucrat' = array( 'translationadmin', // bug 44395 'flood', // bug 48013 ), @@ -9928,7 +9928,7 @@ 'plwiki' = array( 'flood' = array( 'flood' ) ), // https://bugzilla.wikimedia.org/show_bug.cgi?id=20155 , bug 21238 'strategywiki' = array( 'sysop' = array( 'flood' ) ), 'srwiki' = array( 'sysop' = array( 'flood' ) ), - 'wikidata' = array( + 'wikidata' = array( 'sysop' = array( 'flood', 'translationadmin' ), // Bug 48013, Bug 46856 'flood' = array( 'flood' ), // Bug 48013 ), -- To view, visit https://gerrit.wikimedia.org/r/71534 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifd2fbc43c719d77c88d9b37958cf3c36ed0efa7c Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org Gerrit-Reviewer: Spage sp...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable gender survey on test and test2. - change (operations/mediawiki-config)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/71541 Change subject: Enable gender survey on test and test2. .. Enable gender survey on test and test2. Change-Id: Icc1d0cd5c3c6d41f85546fef20101cc7e9b087a3 --- M wmf-config/InitialiseSettings.php 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/41/71541/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index ed47e68..f7b6bca 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -10397,6 +10397,8 @@ 'wmgVisualEditorEnableGenderSurvey' = array( 'default' = false, + 'testwiki' = true, + 'test2wiki' = true, 'enwiki' = true, ), -- To view, visit https://gerrit.wikimedia.org/r/71541 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icc1d0cd5c3c6d41f85546fef20101cc7e9b087a3 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable gender survey on test and test2. - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Enable gender survey on test and test2. .. Enable gender survey on test and test2. Change-Id: Icc1d0cd5c3c6d41f85546fef20101cc7e9b087a3 --- M wmf-config/InitialiseSettings.php 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Spage: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index ed47e68..f7b6bca 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -10397,6 +10397,8 @@ 'wmgVisualEditorEnableGenderSurvey' = array( 'default' = false, + 'testwiki' = true, + 'test2wiki' = true, 'enwiki' = true, ), -- To view, visit https://gerrit.wikimedia.org/r/71541 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icc1d0cd5c3c6d41f85546fef20101cc7e9b087a3 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org Gerrit-Reviewer: Spage sp...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] got knockout and wtforms communicating well - change (analytics/wikimetrics)
Milimetric has submitted this change and it was merged. Change subject: got knockout and wtforms communicating well .. got knockout and wtforms communicating well Change-Id: I65e110ca6e5404be751b13349beef1307da9336e --- M wikimetrics/controllers/metrics.py M wikimetrics/metrics/bytes_added.py M wikimetrics/static/js/jobCreate.js A wikimetrics/static/js/knockout.util.js D wikimetrics/templates/form.html A wikimetrics/templates/form_for_metrics.html M wikimetrics/templates/request.html 7 files changed, 105 insertions(+), 57 deletions(-) Approvals: Milimetric: Verified; Looks good to me, approved diff --git a/wikimetrics/controllers/metrics.py b/wikimetrics/controllers/metrics.py index fd6fc2e..8da1f17 100644 --- a/wikimetrics/controllers/metrics.py +++ b/wikimetrics/controllers/metrics.py @@ -60,9 +60,7 @@ metric_form = metric_classes[name]() return render_template( -'form.html', +'form_for_metrics.html', form=metric_form, -form_class='metric-configuration', action=request.url, -submit_text='Save Configuration', ) diff --git a/wikimetrics/metrics/bytes_added.py b/wikimetrics/metrics/bytes_added.py index 2bf7b47..f488b0a 100644 --- a/wikimetrics/metrics/bytes_added.py +++ b/wikimetrics/metrics/bytes_added.py @@ -1,9 +1,28 @@ from metric import Metric from flask.ext import wtf +from wtforms.compat import text_type __all__ = [ 'BytesAdded', ] + + +def better_bool(value): +if type(value) is bool: +return value +elif type(value) is list: +value = value[0] + +return str(value).strip().lower() in ['yes', 'y', 'true'] + + +class BetterBooleanField(wtf.BooleanField): + +def process_formdata(self, valuelist): +# Checkboxes and submit buttons simply do not send a value when +# unchecked/not pressed. So the actual value= doesn't matter for +# purpose of determining .data, only whether one exists or not. +self.data = better_bool(valuelist) class BytesAdded(Metric): @@ -55,10 +74,10 @@ start_date = wtf.DateField() end_date= wtf.DateField() namespace = wtf.IntegerField(default=0) -positive_total = wtf.BooleanField(default=True) -negative_total = wtf.BooleanField(default=True) -absolute_total = wtf.BooleanField(default=True) -net_total = wtf.BooleanField(default=True) +positive_total = BetterBooleanField(default=True) +negative_total = BetterBooleanField(default=True) +absolute_total = BetterBooleanField(default=True) +net_total = BetterBooleanField(default=True) def __call__(self, user_ids, session): diff --git a/wikimetrics/static/js/jobCreate.js b/wikimetrics/static/js/jobCreate.js index ea1917c..79e18d3 100644 --- a/wikimetrics/static/js/jobCreate.js +++ b/wikimetrics/static/js/jobCreate.js @@ -1,25 +1,6 @@ $(document).ready(function(){ // set up async handlers for any async forms // TODO: replace with a decent plugin -$(document).on('submit', 'form.metric-configuration', function(e){ -e.preventDefault(); -e.stopPropagation(); - -var form = $(this); - -$.post(form.attr('action'), form.serialize()) -.done(function(htmlToReplaceWith){ -form.replaceWith(htmlToReplaceWith); -// if no validation errors, save the metric into the viewModel -if (form.find('ul.error-list').length === 0) { -// save to viewModel.metrics -// search in viewModel.metrics -// set metric properties -} -}) -.fail(function(){ -}); -}); $(document).on('submit', 'form.job-request', function(e){ // same thing as metric-configuration, but passing viewModel.request().responses() @@ -41,24 +22,33 @@ metrics: ko.observableArray([]), toggleMetric: function(metric){ -// TODO: this should work but... doesn't? -// if (!metric.configure().length) { -// metric.configure = ko.observable(); -// ... -// metric.configure(configureForm); - if (metric.selected()){ -// fetch form to edit metric with +// fetch form to configure metric with $.get('/metrics/configure/' + metric.name, function(configureForm){ -$(metric.tabIdSelector() + '-configure').html(configureForm); +metric.configure(configureForm); }).fail(failure); } else { -$(metric.tabIdSelector() + '-configure').html(''); +metric.configure(''); } return true; }, +saveMetricConfiguration: function(formElement){ +
[MediaWiki-commits] [Gerrit] got knockout and wtforms communicating well - change (analytics/wikimetrics)
Milimetric has uploaded a new change for review. https://gerrit.wikimedia.org/r/71542 Change subject: got knockout and wtforms communicating well .. got knockout and wtforms communicating well Change-Id: I65e110ca6e5404be751b13349beef1307da9336e --- M wikimetrics/controllers/metrics.py M wikimetrics/metrics/bytes_added.py M wikimetrics/static/js/jobCreate.js A wikimetrics/static/js/knockout.util.js D wikimetrics/templates/form.html A wikimetrics/templates/form_for_metrics.html M wikimetrics/templates/request.html 7 files changed, 105 insertions(+), 57 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/wikimetrics refs/changes/42/71542/1 diff --git a/wikimetrics/controllers/metrics.py b/wikimetrics/controllers/metrics.py index fd6fc2e..8da1f17 100644 --- a/wikimetrics/controllers/metrics.py +++ b/wikimetrics/controllers/metrics.py @@ -60,9 +60,7 @@ metric_form = metric_classes[name]() return render_template( -'form.html', +'form_for_metrics.html', form=metric_form, -form_class='metric-configuration', action=request.url, -submit_text='Save Configuration', ) diff --git a/wikimetrics/metrics/bytes_added.py b/wikimetrics/metrics/bytes_added.py index 2bf7b47..f488b0a 100644 --- a/wikimetrics/metrics/bytes_added.py +++ b/wikimetrics/metrics/bytes_added.py @@ -1,9 +1,28 @@ from metric import Metric from flask.ext import wtf +from wtforms.compat import text_type __all__ = [ 'BytesAdded', ] + + +def better_bool(value): +if type(value) is bool: +return value +elif type(value) is list: +value = value[0] + +return str(value).strip().lower() in ['yes', 'y', 'true'] + + +class BetterBooleanField(wtf.BooleanField): + +def process_formdata(self, valuelist): +# Checkboxes and submit buttons simply do not send a value when +# unchecked/not pressed. So the actual value= doesn't matter for +# purpose of determining .data, only whether one exists or not. +self.data = better_bool(valuelist) class BytesAdded(Metric): @@ -55,10 +74,10 @@ start_date = wtf.DateField() end_date= wtf.DateField() namespace = wtf.IntegerField(default=0) -positive_total = wtf.BooleanField(default=True) -negative_total = wtf.BooleanField(default=True) -absolute_total = wtf.BooleanField(default=True) -net_total = wtf.BooleanField(default=True) +positive_total = BetterBooleanField(default=True) +negative_total = BetterBooleanField(default=True) +absolute_total = BetterBooleanField(default=True) +net_total = BetterBooleanField(default=True) def __call__(self, user_ids, session): diff --git a/wikimetrics/static/js/jobCreate.js b/wikimetrics/static/js/jobCreate.js index ea1917c..79e18d3 100644 --- a/wikimetrics/static/js/jobCreate.js +++ b/wikimetrics/static/js/jobCreate.js @@ -1,25 +1,6 @@ $(document).ready(function(){ // set up async handlers for any async forms // TODO: replace with a decent plugin -$(document).on('submit', 'form.metric-configuration', function(e){ -e.preventDefault(); -e.stopPropagation(); - -var form = $(this); - -$.post(form.attr('action'), form.serialize()) -.done(function(htmlToReplaceWith){ -form.replaceWith(htmlToReplaceWith); -// if no validation errors, save the metric into the viewModel -if (form.find('ul.error-list').length === 0) { -// save to viewModel.metrics -// search in viewModel.metrics -// set metric properties -} -}) -.fail(function(){ -}); -}); $(document).on('submit', 'form.job-request', function(e){ // same thing as metric-configuration, but passing viewModel.request().responses() @@ -41,24 +22,33 @@ metrics: ko.observableArray([]), toggleMetric: function(metric){ -// TODO: this should work but... doesn't? -// if (!metric.configure().length) { -// metric.configure = ko.observable(); -// ... -// metric.configure(configureForm); - if (metric.selected()){ -// fetch form to edit metric with +// fetch form to configure metric with $.get('/metrics/configure/' + metric.name, function(configureForm){ -$(metric.tabIdSelector() + '-configure').html(configureForm); +metric.configure(configureForm); }).fail(failure); } else { -$(metric.tabIdSelector() + '-configure').html(''); +metric.configure(''); } return true; },
[MediaWiki-commits] [Gerrit] Allow (optional) title normalization in wbgetentities - change (mediawiki...Wikibase)
Hoo man has uploaded a new change for review. https://gerrit.wikimedia.org/r/71543 Change subject: Allow (optional) title normalization in wbgetentities .. Allow (optional) title normalization in wbgetentities Change-Id: I1d010e5d5e07209f23c93636163f722d0d247a29 --- M repo/includes/api/GetEntities.php 1 file changed, 23 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/43/71543/1 diff --git a/repo/includes/api/GetEntities.php b/repo/includes/api/GetEntities.php index 9969088..694bd24 100644 --- a/repo/includes/api/GetEntities.php +++ b/repo/includes/api/GetEntities.php @@ -13,6 +13,7 @@ use Wikibase\EntityId; use Wikibase\Item; use Wikibase\EntityContentFactory; +use Wikibase\Settings; /** * API module to get the data for one or more Wikibase entities. @@ -26,6 +27,7 @@ * @licence GNU GPL v2+ * @author John Erling Blad jeb...@gmail.com * @author Jeroen De Dauw jeroended...@gmail.com + * @author Marius Hoch h...@online.de */ class GetEntities extends ApiWikibase { @@ -49,6 +51,7 @@ $numSites = count( $params['sites'] ); $numTitles = count( $params['titles'] ); $max = max( $numSites, $numTitles ); + if ( $numSites === 0 || $numTitles === 0 ) { wfProfileOut( __METHOD__ ); $this-dieUsage( $this-msg( 'wikibase-api-ids-xor-wikititles' )-text(), 'id-xor-wikititle' ); @@ -63,12 +66,23 @@ $id = StoreFactory::getStore()-newSiteLinkCache()-getItemIdForLink( $siteId, $title ); + // Try harder by requesting normalization on the external site. + // For performance reasons we only do this if the user asked for it and only for one title! + if ( $id === false $numSites === 1 $numTitles === 1 $params['normalize'] === true +Settings::get( 'normalizeItemByTitlePageNames' ) === true ) + { + $siteObj = \SiteSQLStore::newInstance()-getSite( $siteId ); + if ( $siteObj ) { + $title = $siteObj-normalizePageName( $title ); + $id = StoreFactory::getStore()-newSiteLinkCache()-getItemIdForLink( $siteId, $title ); + } + } + if ( $id === false ) { $this-getResult()-addValue( 'entities', (string)(--$missing), array( 'site' = $siteId, 'title' = $title, 'missing' = ) ); - } - else { + } else { $id = new EntityId( Item::ENTITY_TYPE, $id ); $params['ids'][] = $id-getPrefixedId(); } @@ -247,6 +261,10 @@ ApiBase::PARAM_TYPE = Utils::getLanguageCodes(), ApiBase::PARAM_ISMULTI = true, ), + 'normalize' = array( + ApiBase::PARAM_TYPE = 'boolean', + ApiBase::PARAM_DFLT = false + ), ) ); } @@ -276,6 +294,9 @@ 'languages' = array( 'By default the internationalized values are returned in all available languages.', 'This parameter allows filtering these down to one or more languages by providing one or more language codes.' ), + 'normalize' = array( 'Try to normalize the page title against the client site.', + 'This only works if exactly one site and one page have been given.' + ), ) ); } -- To view, visit https://gerrit.wikimedia.org/r/71543 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1d010e5d5e07209f23c93636163f722d0d247a29 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Hoo man h...@online.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org
[MediaWiki-commits] [Gerrit] Changed $egAutoTranslate to $egLTAutoTranslate, fix for MW ... - change (mediawiki...LiveTranslate)
Yaron Koren has uploaded a new change for review. https://gerrit.wikimedia.org/r/71544 Change subject: Changed $egAutoTranslate to $egLTAutoTranslate, fix for MW = 1.6, typo fixes .. Changed $egAutoTranslate to $egLTAutoTranslate, fix for MW = 1.6, typo fixes Change-Id: I5d0ccffcefd1593b869775345d024fd71928a585 --- M LiveTranslate_Settings.php M includes/LiveTranslate_Functions.php M includes/ext.lt.google.js M includes/ext.lt.ms.js 4 files changed, 16 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LiveTranslate refs/changes/44/71544/1 diff --git a/LiveTranslate_Settings.php b/LiveTranslate_Settings.php index 6c367bc..dbe067c 100644 --- a/LiveTranslate_Settings.php +++ b/LiveTranslate_Settings.php @@ -80,4 +80,4 @@ $egLiveTranslateLanguages[] = 'de'; # Auto-translation enabled. -$egAutoTranslate = true; +$egLTAutoTranslate = true; diff --git a/includes/LiveTranslate_Functions.php b/includes/LiveTranslate_Functions.php index c60524e..23fd644 100644 --- a/includes/LiveTranslate_Functions.php +++ b/includes/LiveTranslate_Functions.php @@ -82,7 +82,7 @@ case LTS_MS: $wgOut-addScript( Html::inlineScript( - 'var ltMsAppId = ' . FormatJson::encode( $GLOBALS['egLiveTranslateMSAppId'] ) . ';' + 'var ltMsAppId = ' . FormatJson::encode( LTMSHTTPTranslator::getAppId() ) . ';' ) ); $wgOut-addHeadItem( @@ -171,7 +171,7 @@ } /** -* Returns the language that wikitext should be auto-translated to, if $egAutoTranslate is set to true. +* Returns the language that wikitext should be auto-translated to, if $egLTAutoTranslate is set to true. * Auto-translation happens if the query string contains language= or the user preference for language, * or even using a cookie set by Live Translate previously. * @@ -182,9 +182,9 @@ * @return string Language to auto-translate to */ public static function getAutoTranslateLang( $currentLang ) { - global $wgRequest, $wgUser, $egAutoTranslate; + global $wgRequest, $wgUser, $egLTAutoTranslate; - if( !$egAutoTranslate ) { + if( !$egLTAutoTranslate ) { return $currentLang; } diff --git a/includes/ext.lt.google.js b/includes/ext.lt.google.js index 4bb2a22..ddd1d75 100644 --- a/includes/ext.lt.google.js +++ b/includes/ext.lt.google.js @@ -38,7 +38,7 @@ var sentenceCount = 0; var currentLength = 0; - // Find the scentances that can be put in the current chunk. + // Find the sentences that can be put in the current chunk. for ( i in untranslatedsentences ) { sentenceCount++; @@ -47,7 +47,7 @@ } else if ( untranslatedsentences[i].length 0 ) { if ( currentLength == 0 ) { - // If the first scentance is longer then the max chunk legth, split it. + // If the first sentence is longer then the max chunk length, split it. partToUse = untranslatedsentences[i].substr( 0, currentMaxSize - currentLength ); remainingPart = untranslatedsentences[i].substr( currentMaxSize - currentLength ); } @@ -67,17 +67,17 @@ } } - // If there is a remaining part, re-add it to the scentances to translate list. + // If there is a remaining part, re-add it to the sentences to translate list. if ( remainingPart !== false ) { untranslatedsentences.unshift( remainingPart ); } - // If there is a partial scentance, add it to the chunk. + // If there is a partial sentence, add it to the chunk. if ( partToUse !== false ) { chunk += partToUse; } - // If the lenght is 0, the element has been translated. + // If the length is 0, the element has been translated. if ( chunk.length == 0 ) { this.handleTranslationCompletion(); return; @@ -176,4 +176,4 @@ } } -}; })( jQuery,
[MediaWiki-commits] [Gerrit] Changed $egAutoTranslate to $egLTAutoTranslate, fix for MW ... - change (mediawiki...LiveTranslate)
Yaron Koren has submitted this change and it was merged. Change subject: Changed $egAutoTranslate to $egLTAutoTranslate, fix for MW = 1.6, typo fixes .. Changed $egAutoTranslate to $egLTAutoTranslate, fix for MW = 1.6, typo fixes Change-Id: I5d0ccffcefd1593b869775345d024fd71928a585 --- M LiveTranslate_Settings.php M includes/LiveTranslate_Functions.php M includes/ext.lt.google.js M includes/ext.lt.ms.js 4 files changed, 16 insertions(+), 16 deletions(-) Approvals: Yaron Koren: Verified; Looks good to me, approved diff --git a/LiveTranslate_Settings.php b/LiveTranslate_Settings.php index 6c367bc..dbe067c 100644 --- a/LiveTranslate_Settings.php +++ b/LiveTranslate_Settings.php @@ -80,4 +80,4 @@ $egLiveTranslateLanguages[] = 'de'; # Auto-translation enabled. -$egAutoTranslate = true; +$egLTAutoTranslate = true; diff --git a/includes/LiveTranslate_Functions.php b/includes/LiveTranslate_Functions.php index c60524e..23fd644 100644 --- a/includes/LiveTranslate_Functions.php +++ b/includes/LiveTranslate_Functions.php @@ -82,7 +82,7 @@ case LTS_MS: $wgOut-addScript( Html::inlineScript( - 'var ltMsAppId = ' . FormatJson::encode( $GLOBALS['egLiveTranslateMSAppId'] ) . ';' + 'var ltMsAppId = ' . FormatJson::encode( LTMSHTTPTranslator::getAppId() ) . ';' ) ); $wgOut-addHeadItem( @@ -171,7 +171,7 @@ } /** -* Returns the language that wikitext should be auto-translated to, if $egAutoTranslate is set to true. +* Returns the language that wikitext should be auto-translated to, if $egLTAutoTranslate is set to true. * Auto-translation happens if the query string contains language= or the user preference for language, * or even using a cookie set by Live Translate previously. * @@ -182,9 +182,9 @@ * @return string Language to auto-translate to */ public static function getAutoTranslateLang( $currentLang ) { - global $wgRequest, $wgUser, $egAutoTranslate; + global $wgRequest, $wgUser, $egLTAutoTranslate; - if( !$egAutoTranslate ) { + if( !$egLTAutoTranslate ) { return $currentLang; } diff --git a/includes/ext.lt.google.js b/includes/ext.lt.google.js index 4bb2a22..ddd1d75 100644 --- a/includes/ext.lt.google.js +++ b/includes/ext.lt.google.js @@ -38,7 +38,7 @@ var sentenceCount = 0; var currentLength = 0; - // Find the scentances that can be put in the current chunk. + // Find the sentences that can be put in the current chunk. for ( i in untranslatedsentences ) { sentenceCount++; @@ -47,7 +47,7 @@ } else if ( untranslatedsentences[i].length 0 ) { if ( currentLength == 0 ) { - // If the first scentance is longer then the max chunk legth, split it. + // If the first sentence is longer then the max chunk length, split it. partToUse = untranslatedsentences[i].substr( 0, currentMaxSize - currentLength ); remainingPart = untranslatedsentences[i].substr( currentMaxSize - currentLength ); } @@ -67,17 +67,17 @@ } } - // If there is a remaining part, re-add it to the scentances to translate list. + // If there is a remaining part, re-add it to the sentences to translate list. if ( remainingPart !== false ) { untranslatedsentences.unshift( remainingPart ); } - // If there is a partial scentance, add it to the chunk. + // If there is a partial sentence, add it to the chunk. if ( partToUse !== false ) { chunk += partToUse; } - // If the lenght is 0, the element has been translated. + // If the length is 0, the element has been translated. if ( chunk.length == 0 ) { this.handleTranslationCompletion(); return; @@ -176,4 +176,4 @@ } } -}; })( jQuery, window.liveTranslate ); \ No newline at end of file +}; })( jQuery,
[MediaWiki-commits] [Gerrit] Add GuidedTour survey about user gender - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Add GuidedTour survey about user gender .. Add GuidedTour survey about user gender Disabled by default, enabled with $wgVisualEditorEnableGenderSurvey. Change-Id: I2b4aba6a95a33474c3e68423d478aa78e57d86ad --- M VisualEditor.hooks.php M VisualEditor.i18n.php M VisualEditor.php A modules/ve/init/mw/tours/vegendersurvey.js A modules/ve/init/mw/ve.init.mw.genderSurvey.css A modules/ve/init/mw/ve.init.mw.genderSurvey.js 6 files changed, 122 insertions(+), 2 deletions(-) Approvals: Krinkle: Looks good to me, but someone else must approve Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php index 0e5e0f5..03461bc 100644 --- a/VisualEditor.hooks.php +++ b/VisualEditor.hooks.php @@ -13,7 +13,8 @@ protected static $supportedSkins = array( 'vector', 'apex', 'monobook' ); public static function onSetup() { - global $wgVisualEditorEnableEventLogging, $wgResourceModules; + global $wgVisualEditorEnableEventLogging, $wgResourceModules, + $wgVisualEditorEnableGenderSurvey; if ( $wgVisualEditorEnableEventLogging ) { if ( class_exists( 'ResourceLoaderSchemaModule' ) ) { @@ -24,6 +25,14 @@ 'schema' = 'Edit', 'revision' = 5570274, ); + + if ( $wgVisualEditorEnableGenderSurvey ) { + $wgResourceModules['schema.GenderSurvey'] = array( + 'class' = 'ResourceLoaderSchemaModule', + 'schema' = 'GenderSurvey', + 'revision' = '5607845', + ); + } } else { wfWarn( 'VisualEditor is configured to use EventLogging, but the extension is ' . ' not available. Disabling wgVisualEditorEnableEventLogging.' ); @@ -79,6 +88,23 @@ return true; } + // Temporary survey in conjuction with split test (bug 49604) + // To be removed once no longer needed. + // Depends on GuidedTour and EventLogging + public static function onBeforeWelcomeCreation( $welcomeCreationMsg, $injectHtml ) { + global $wgOut, $wgVisualEditorEnableGenderSurvey; + + if ( $wgVisualEditorEnableGenderSurvey ) { + $wgOut-addModules( array( + 'ext.guidedTour.lib', + 'ext.guidedTour.tour.vegendersurvey', + 'ext.visualEditor.genderSurvey' + ) ); + } + + return true; + } + public static function onGetPreferences( $user, $preferences ) { $preferences['visualeditor-enable'] = array( 'type' = 'toggle', diff --git a/VisualEditor.i18n.php b/VisualEditor.i18n.php index 171c980..d09172b 100644 --- a/VisualEditor.i18n.php +++ b/VisualEditor.i18n.php @@ -147,6 +147,11 @@ 'visualeditor-usernamespacepagelink' = 'Project:User namespace', 'visualeditor-viewpage-savewarning' = 'Are you sure you want to go back to view mode without saving first?', 'visualeditor-window-title' = 'Inspect', + 'guidedtour-tour-vegendersurvey-title' = 'Please select your gender', + 'guidedtour-tour-vegendersurvey-description' = 'By participating in this survey, you consent to the transfer of the information you submit to the Wikimedia Foundation in the United States and elsewhere. The information collected is for internal research purposes only and will not be publicly associated with your account. However, we may share the results of this survey with the public in anonymized or aggregated forms.', + 'guidedtour-tour-vegendersurvey-male' = 'Male', + 'guidedtour-tour-vegendersurvey-female' = 'Female', + 'guidedtour-tour-vegendersurvey-optout' = 'Prefer not to say', ); /** Message documentation (Message documentation) @@ -396,6 +401,11 @@ {{doc-important|Do not translate Project; it is automatically converted to the wiki\'s project namespace.}}', 'visualeditor-viewpage-savewarning' = 'Text shown when the user tries to leave the editor without saving their changes', 'visualeditor-window-title' = 'Title of an unnamed inspector', + 'guidedtour-tour-vegendersurvey-title' = 'Title of gender survey guider', + 'guidedtour-tour-vegendersurvey-description' = 'Description of gender survey guider', +
[MediaWiki-commits] [Gerrit] Use the wbgetentities normalization in jquery.wikibase.linkitem - change (mediawiki...Wikibase)
Hoo man has uploaded a new change for review. https://gerrit.wikimedia.org/r/71545 Change subject: Use the wbgetentities normalization in jquery.wikibase.linkitem .. Use the wbgetentities normalization in jquery.wikibase.linkitem Fixes an often reported flaw... Change-Id: I5e518b577c061502d1652eff647fb6794cf80ffb --- M client/resources/jquery.wikibase/jquery.wikibase.linkitem.js M lib/resources/wikibase.RepoApi/wikibase.RepoApi.js 2 files changed, 15 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/45/71545/1 diff --git a/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js b/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js index ae0f8a1..5052f45 100644 --- a/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js +++ b/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js @@ -332,9 +332,17 @@ // Show a spinning animation and do an API request this._showSpinner(); - this.repoApi.getEntitiesByPage( this.targetSite, this.targetArticle, ['info', 'sitelinks'], mw.config.get( 'wgUserLanguage' ), 'sitelinks', 'ascending' ) - .done( $.proxy( this._onEntityLoad, this ) ) - .fail( $.proxy( this._onError, this ) ); + this.repoApi.getEntitiesByPage( + this.targetSite, + this.targetArticle, + ['info', 'sitelinks'], + mw.config.get( 'wgUserLanguage' ), + 'sitelinks', + 'ascending', + true + ) + .done( $.proxy( this._onEntityLoad, this ) ) + .fail( $.proxy( this._onError, this ) ); }, /** diff --git a/lib/resources/wikibase.RepoApi/wikibase.RepoApi.js b/lib/resources/wikibase.RepoApi/wikibase.RepoApi.js index 9946867..658184a 100644 --- a/lib/resources/wikibase.RepoApi/wikibase.RepoApi.js +++ b/lib/resources/wikibase.RepoApi/wikibase.RepoApi.js @@ -120,9 +120,10 @@ * default: null (unsorted) * @param {String} [dir] Sort direction may be 'ascending' or 'descending' * default: null (ascending) +* @param {bool}[normalize] Whether to normalize titles server side * @return {jQuery.Promise} */ - getEntitiesByPage: function( sites, titles, props, languages, sort, dir ) { + getEntitiesByPage: function( sites, titles, props, languages, sort, dir, normalize ) { var params = { action: 'wbgetentities', sites: this._normalizeParam( sites ), @@ -130,7 +131,8 @@ props: this._normalizeParam( props ), languages: this._normalizeParam( languages ), sort: this._normalizeParam( sort ), - dir: dir || undefined + dir: dir || undefined, + normalize: normalize || undefined }; return this.get( params ); -- To view, visit https://gerrit.wikimedia.org/r/71545 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5e518b577c061502d1652eff647fb6794cf80ffb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Hoo man h...@online.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add difflink to mention email notification - change (mediawiki...Echo)
jenkins-bot has submitted this change and it was merged. Change subject: Add difflink to mention email notification .. Add difflink to mention email notification Change-Id: I521ff0387dc7079ebf0c7f58a34d799673833b7c --- M Echo.i18n.php M Echo.php 2 files changed, 6 insertions(+), 2 deletions(-) Approvals: EBernhardson (WMF): Looks good to me, approved jenkins-bot: Verified diff --git a/Echo.i18n.php b/Echo.i18n.php index bd034bb..585dd3f 100644 --- a/Echo.i18n.php +++ b/Echo.i18n.php @@ -129,9 +129,12 @@ $3 -View more: +View mention: $4 + +View changes: +$6 $5', 'notification-mention-email-batch-body' = '$1 {{GENDER:$1|mentioned}} you on $2', @@ -463,6 +466,7 @@ * $3 is the edit summary * $4 is the link to the talk page section title * $5 is the email footer +* $6 is a link to the diff view of the changes that were made See also: * {{msg-mw|Notification-mention}} diff --git a/Echo.php b/Echo.php index fa62b04..59cc268 100755 --- a/Echo.php +++ b/Echo.php @@ -495,7 +495,7 @@ 'email-subject-message' = 'notification-mention-email-subject', 'email-subject-params' = array( 'agent' ), 'email-body-message' = 'notification-mention-email-body', - 'email-body-params' = array( 'agent', 'title', 'summary', 'subject-link', 'email-footer' ), + 'email-body-params' = array( 'agent', 'title', 'summary', 'subject-link', 'email-footer', 'difflink' ), 'email-body-batch-message' = 'notification-mention-email-batch-body', 'email-body-batch-params' = array( 'agent', 'title' ), 'icon' = 'chat', -- To view, visit https://gerrit.wikimedia.org/r/71531 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I521ff0387dc7079ebf0c7f58a34d799673833b7c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Bsitu bs...@wikimedia.org Gerrit-Reviewer: EBernhardson (WMF) ebernhard...@wikimedia.org Gerrit-Reviewer: Kaldari rkald...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Disable AFTv5 feedback submission on dewiki - change (operations/mediawiki-config)
Se4598 has uploaded a new change for review. https://gerrit.wikimedia.org/r/71546 Change subject: Disable AFTv5 feedback submission on dewiki .. Disable AFTv5 feedback submission on dewiki as per https://de.wikipedia.org/wiki/Wikipedia:Meinungsbilder/Artikel-Feedback this should be disable most (probably not all) ways for feedback submission. aftv5 itself should stay on for now. Change-Id: I03409e3de3f27a77d6d21df8e5ff1b02ed66474e --- M wmf-config/InitialiseSettings.php 1 file changed, 2 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/46/71546/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 5a9c797..c76a878 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -10576,7 +10576,7 @@ 'wmgArticleFeedbackv5LotteryOdds' = array( 'default' = 0, 'testwiki' = array( NS_MAIN = 10, NS_HELP = 100 ), - 'dewiki' = array( NS_MAIN = 0.1 ), // ~ 1500 articles out of 1.5 mio in total + 'dewiki' = array( NS_MAIN = 0 ), 'frwiki' = array( NS_MAIN = 0, NS_HELP = 100 ), ), /* @@ -10585,12 +10585,7 @@ 'wmgArticleFeedbackv5Categories' = array( 'default' = array(), 'testwiki' = array( 'Article_Feedback_5', 'Article_Feedback_5_Additional_Articles' ), - 'dewiki' = array( - 'Wikipedia:Artikel-Feedback Grundstock', - 'Wikipedia:Artikel-Feedback/Artikelgrundstock', - 'Wikipedia:Artikel-Feedback/Artikel des Tages oder Schon gewusst', - 'Wikipedia:Artikel-Feedback/Zusätzliche Artikel', - ), + 'dewiki' = array(), 'enwiki' = array( 'Article_Feedback_5', 'Article_Feedback_5_Additional_Articles' ), 'frwiki' = array( 'Wikipédia:Outil_de_retour_des_lecteurs' ), ), -- To view, visit https://gerrit.wikimedia.org/r/71546 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I03409e3de3f27a77d6d21df8e5ff1b02ed66474e Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Se4598 se4...@gmx.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] update Wikibase setting variables - change (operations/mediawiki-config)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/71547 Change subject: update Wikibase setting variables .. update Wikibase setting variables - use only $wgWBRepoSettings for wikidata - use only $wgWBClientSettings for clients $wgWBSettings is deprecated Change-Id: I2e9d03b2ab9575def40b848c67d3118e1f4985ee --- M wmf-config/CommonSettings.php 1 file changed, 17 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/47/71547/1 diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index 8c39afa..48c287a 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -2474,26 +2474,26 @@ $wgExtraNamespaces[WB_NS_QUERY] = 'Query'; $wgExtraNamespaces[WB_NS_QUERY_TALK] = 'Query_talk'; - $wgWBSettings['changesAsJson'] = true; + $wgWBRepoSettings['changesAsJson'] = true; $wgWBRepoSettings['dataSquidMaxage'] = 1 * 60 * 60; // Assigning the correct content models to the namespaces - $wgWBSettings['entityNamespaces'][CONTENT_MODEL_WIKIBASE_ITEM] = NS_MAIN; - $wgWBSettings['entityNamespaces'][CONTENT_MODEL_WIKIBASE_PROPERTY] = WB_NS_PROPERTY; + $wgWBRepoSettings['entityNamespaces'][CONTENT_MODEL_WIKIBASE_ITEM] = NS_MAIN; + $wgWBRepoSettings['entityNamespaces'][CONTENT_MODEL_WIKIBASE_PROPERTY] = WB_NS_PROPERTY; - $wgWBSettings['idBlacklist'] = array( 1, 2, 3, 4, 5, 8, 13, 23, 24, 42, 80, 666, 1337, 1868, 1971, 2000, 2001, 2012, 2013 ); + $wgWBRepoSettings['idBlacklist'] = array( 1, 2, 3, 4, 5, 8, 13, 23, 24, 42, 80, 666, 1337, 1868, 1971, 2000, 2001, 2012, 2013 ); - $wgWBSettings['withoutTermSearchKey'] = false; + $wgWBRepoSettings['withoutTermSearchKey'] = false; - $wgWBSettings['clientDbList'] = array_merge( + $wgWBRepoSettings['clientDbList'] = array_merge( array( 'test2wiki' = 'test2wiki' ), array_map( 'trim', file( getRealmSpecificFilename( $IP/../wikipedia.dblist ) ) ) ); - $wgWBSettings['localClientDatabases'] = array_combine( - $wgWBSettings['clientDbList'], - $wgWBSettings['clientDbList'] + $wgWBRepoSettings['localClientDatabases'] = array_combine( + $wgWBRepoSettings['clientDbList'], + $wgWBRepoSettings['clientDbList'] ); $wgGroupPermissions['*']['property-create'] = false; @@ -2505,20 +2505,20 @@ require_once( $IP/extensions/Wikibase/lib/WikibaseLib.php ); require_once( $IP/extensions/Wikibase/client/WikibaseClient.php ); - $wgWBSettings['changesDatabase'] = 'wikidatawiki'; - $wgWBSettings['repoDatabase'] = 'wikidatawiki'; + $wgWBClientSettings['changesDatabase'] = 'wikidatawiki'; + $wgWBClientSettings['repoDatabase'] = 'wikidatawiki'; // to be safe, keeping this here although $wgDBname is default setting - $wgWBSettings['siteGlobalID'] = $wgDBname; - $wgWBSettings['repoUrl'] = //{$wmfHostnames['wikidata']}; + $wgWBClientSettings['siteGlobalID'] = $wgDBname; + $wgWBClientSettings['repoUrl'] = //{$wmfHostnames['wikidata']}; - $wgWBSettings['repoNamespaces'] = array( + $wgWBClientSettings['repoNamespaces'] = array( 'wikibase-item' = '', 'wikibase-property' = 'Property' ); - $wgWBSettings['allowDataTransclusion'] = true; - $wgWBSettings['enableSiteLinkWidget'] = true; + $wgWBClientSettings['allowDataTransclusion'] = true; + $wgWBClientSettings['enableSiteLinkWidget'] = true; $wgHooks['SetupAfterCache'][] = 'wmfWBClientExcludeNS'; @@ -2534,7 +2534,7 @@ }; foreach( $wmgWikibaseClientSettings as $setting = $value ) { - $wgWBSettings[$setting] = $value; + $wgWBClientSettings[$setting] = $value; } } -- To view, visit https://gerrit.wikimedia.org/r/71547 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2e9d03b2ab9575def40b848c67d3118e1f4985ee Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Aude aude.w...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make GenderSurvey a number, not string. - change (mediawiki...VisualEditor)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/71548 Change subject: Make GenderSurvey a number, not string. .. Make GenderSurvey a number, not string. Change-Id: I86f528070be66ae617337bb5df64951aad9b5f58 --- M VisualEditor.hooks.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/48/71548/1 diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php index 8698aeb..dc1bc3d 100644 --- a/VisualEditor.hooks.php +++ b/VisualEditor.hooks.php @@ -28,7 +28,7 @@ $wgResourceModules['schema.GenderSurvey'] = array( 'class' = 'ResourceLoaderSchemaModule', 'schema' = 'GenderSurvey', - 'revision' = '5607845', + 'revision' = 5607845, ); } else { wfWarn( 'VisualEditor is configured to use EventLogging, but the extension is ' . -- To view, visit https://gerrit.wikimedia.org/r/71548 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I86f528070be66ae617337bb5df64951aad9b5f58 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] set propagateChangesToRepo Wikibase setting to false for tes... - change (operations/mediawiki-config)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/71549 Change subject: set propagateChangesToRepo Wikibase setting to false for test2wiki .. set propagateChangesToRepo Wikibase setting to false for test2wiki Change-Id: I9fcaa1a4d33c901bc5425cab1d58c18b5decde99 --- M wmf-config/CommonSettings.php M wmf-config/InitialiseSettings.php 2 files changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/49/71549/1 diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index 48c287a..70c31b8 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -2519,6 +2519,7 @@ $wgWBClientSettings['allowDataTransclusion'] = true; $wgWBClientSettings['enableSiteLinkWidget'] = true; + $wgWBClientSettings['propagateChangesToRepo'] = true; $wgHooks['SetupAfterCache'][] = 'wmfWBClientExcludeNS'; diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 5a9c797..ca3f688 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -12229,6 +12229,7 @@ ), 'test2wiki' = array( 'siteGlobalID' = 'enwiki', + 'propagateChangesToRepo' = false, ), 'be_x_oldwiki' = array( 'sort' = 'alphabetic', -- To view, visit https://gerrit.wikimedia.org/r/71549 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9fcaa1a4d33c901bc5425cab1d58c18b5decde99 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Aude aude.w...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Set enableSiteLinkWidget to true per default - change (mediawiki...Wikibase)
Hoo man has uploaded a new change for review. https://gerrit.wikimedia.org/r/71550 Change subject: Set enableSiteLinkWidget to true per default .. Set enableSiteLinkWidget to true per default This doesn't harm and is probably what users expect it to be. (Per Aude) Change-Id: I18a69b0e3478c5976c794c850813de9c9593c011 --- M client/config/WikibaseClient.default.php M docs/options.wiki 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/50/71550/1 diff --git a/client/config/WikibaseClient.default.php b/client/config/WikibaseClient.default.php index 23a7946..f0b167f 100644 --- a/client/config/WikibaseClient.default.php +++ b/client/config/WikibaseClient.default.php @@ -56,7 +56,7 @@ 'wikibase-property' = 'Property' ), 'allowDataTransclusion' = true, - 'enableSiteLinkWidget' = false, + 'enableSiteLinkWidget' = true, 'propagateChangesToRepo' = true, 'siteGroup' = 'wikipedia', //TODO: require this to be set, default doesn't make sense. diff --git a/docs/options.wiki b/docs/options.wiki index a707795..1dfd557 100644 --- a/docs/options.wiki +++ b/docs/options.wiki @@ -84,7 +84,7 @@ ) /poem ;allowDataTransclusion: switch to enable data transclusion features like the nowiki{{#property}}/nowiki parser function and the ttwikibase/tt Scribunto module. Defaults to tttrue/tt. -;enableSiteLinkWidget: switch to enable or disable add site link widget. Defaults to ttfalse/tt. +;enableSiteLinkWidget: switch to enable or disable add site link widget. Defaults to tttrue/tt. ;propagateChangesToRepo: switch to enable or disable the propagation of client changes to the repo. Defaults to tttrue/tt. === Expert Settings === -- To view, visit https://gerrit.wikimedia.org/r/71550 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I18a69b0e3478c5976c794c850813de9c9593c011 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Hoo man h...@online.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Per its own documentation, make showMessage()'s wrap default... - change (mediawiki...VisualEditor)
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/71551 Change subject: Per its own documentation, make showMessage()'s wrap default to 'warning' .. Per its own documentation, make showMessage()'s wrap default to 'warning' This was producing some lovely visualeditor-savedialog-label-undefined garbage. Change-Id: I0852fea9088738d9a93e25bd3b104b9aa07c256d --- M modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/51/71551/1 diff --git a/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js b/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js index eb29d5c..3939500 100644 --- a/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js +++ b/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js @@ -2190,6 +2190,9 @@ var $message; if ( !this.messages[name] ) { options = options || {}; + if ( options.wrap === undefined ) { + options.wrap = 'warning'; + } $message = $( 'div class=ve-init-mw-viewPageTarget-saveDialog-message/div' ); if ( options.wrap !== false ) { $message.append( $( 'p').append( -- To view, visit https://gerrit.wikimedia.org/r/71551 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0852fea9088738d9a93e25bd3b104b9aa07c256d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Catrope roan.katt...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make GenderSurvey a number, not string. - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Make GenderSurvey a number, not string. .. Make GenderSurvey a number, not string. Change-Id: I86f528070be66ae617337bb5df64951aad9b5f58 --- M VisualEditor.hooks.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php index ef76f87..263bab7 100644 --- a/VisualEditor.hooks.php +++ b/VisualEditor.hooks.php @@ -30,7 +30,7 @@ $wgResourceModules['schema.GenderSurvey'] = array( 'class' = 'ResourceLoaderSchemaModule', 'schema' = 'GenderSurvey', - 'revision' = '5607845', + 'revision' = 5607845, ); } } else { -- To view, visit https://gerrit.wikimedia.org/r/71548 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I86f528070be66ae617337bb5df64951aad9b5f58 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org Gerrit-Reviewer: Ori.livneh o...@wikimedia.org Gerrit-Reviewer: Spage sp...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Set enableSiteLinkWidget to true per default - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Set enableSiteLinkWidget to true per default .. Set enableSiteLinkWidget to true per default This doesn't harm and is probably what users expect it to be. (Per Aude) Change-Id: I18a69b0e3478c5976c794c850813de9c9593c011 --- M client/config/WikibaseClient.default.php M docs/options.wiki 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Aude: Looks good to me, approved jenkins-bot: Verified diff --git a/client/config/WikibaseClient.default.php b/client/config/WikibaseClient.default.php index 23a7946..f0b167f 100644 --- a/client/config/WikibaseClient.default.php +++ b/client/config/WikibaseClient.default.php @@ -56,7 +56,7 @@ 'wikibase-property' = 'Property' ), 'allowDataTransclusion' = true, - 'enableSiteLinkWidget' = false, + 'enableSiteLinkWidget' = true, 'propagateChangesToRepo' = true, 'siteGroup' = 'wikipedia', //TODO: require this to be set, default doesn't make sense. diff --git a/docs/options.wiki b/docs/options.wiki index a707795..1dfd557 100644 --- a/docs/options.wiki +++ b/docs/options.wiki @@ -84,7 +84,7 @@ ) /poem ;allowDataTransclusion: switch to enable data transclusion features like the nowiki{{#property}}/nowiki parser function and the ttwikibase/tt Scribunto module. Defaults to tttrue/tt. -;enableSiteLinkWidget: switch to enable or disable add site link widget. Defaults to ttfalse/tt. +;enableSiteLinkWidget: switch to enable or disable add site link widget. Defaults to tttrue/tt. ;propagateChangesToRepo: switch to enable or disable the propagation of client changes to the repo. Defaults to tttrue/tt. === Expert Settings === -- To view, visit https://gerrit.wikimedia.org/r/71550 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I18a69b0e3478c5976c794c850813de9c9593c011 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Hoo man h...@online.de Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update VisualEditor for gender survey. - change (mediawiki/core)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/71552 Change subject: Update VisualEditor for gender survey. .. Update VisualEditor for gender survey. Change-Id: I50e413f0379b9865871a5cad7b6c7705165c2f6f --- M extensions/VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/52/71552/1 diff --git a/extensions/VisualEditor b/extensions/VisualEditor index 680e0e5..d86c425 16 --- a/extensions/VisualEditor +++ b/extensions/VisualEditor -Subproject commit 680e0e5ec0dee96b68a1fc3a3f8def7bc782bf54 +Subproject commit d86c425e108bac1bec56891a2c039785594bc288 -- To view, visit https://gerrit.wikimedia.org/r/71552 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I50e413f0379b9865871a5cad7b6c7705165c2f6f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.22wmf8 Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update VisualEditor for gender survey. - change (mediawiki/core)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/71553 Change subject: Update VisualEditor for gender survey. .. Update VisualEditor for gender survey. Change-Id: I69116d78589f37c13bdc90c9c2c8717cbe01d908 --- M extensions/VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/53/71553/1 diff --git a/extensions/VisualEditor b/extensions/VisualEditor index 680e0e5..d86c425 16 --- a/extensions/VisualEditor +++ b/extensions/VisualEditor -Subproject commit 680e0e5ec0dee96b68a1fc3a3f8def7bc782bf54 +Subproject commit d86c425e108bac1bec56891a2c039785594bc288 -- To view, visit https://gerrit.wikimedia.org/r/71553 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I69116d78589f37c13bdc90c9c2c8717cbe01d908 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.22wmf9 Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] skin: Convert table of contents from table to div - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: skin: Convert table of contents from table to div .. skin: Convert table of contents from table to div It makes no sense semantically; it was only used to make the TOC not span full width of the page, which is easily achieved with CSS. Bug: 658 Change-Id: I4ecd0659d1f955a9b593d281a3fef0a81c218a52 --- M RELEASE-NOTES-1.22 M includes/Linker.php M skins/common/commonContent.css M skins/common/oldshared.css M skins/modern/main.css M tests/parser/parserTests.txt M tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js 7 files changed, 109 insertions(+), 42 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22 index fb8896a..6393252 100644 --- a/RELEASE-NOTES-1.22 +++ b/RELEASE-NOTES-1.22 @@ -162,6 +162,11 @@ * (bug 41281) Fixed ugly output if file size could not be extracted for multi-page media. * (bug 50315) list=logevents API module will now output log entries by anonymous users. * (bug 38911) Handle headers with rowspan in jquery.tablesorter +* (bug 658) Converted the table of contents on wiki pages from table to div + and adjusted skin CSS accordingly. The CSS was carefully crafted to be + backwards-compatible in all reasonable cases (uses of the __TOC__ magic word, + the #toc CSS id and the .toc CSS class). However, particularly bad abuse of + the id or the class can possibly break. === API changes in 1.22 === * (bug 25553) The JSON output formatter now leaves forward slashes unescaped diff --git a/includes/Linker.php b/includes/Linker.php index 3529d28..5bb9230 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -1688,10 +1688,10 @@ $lang = wfGetLangObj( $lang ); $title = wfMessage( 'toc' )-inLanguage( $lang )-escaped(); - return 'table id=toc class=toctrtd' + return 'div id=toc class=toc' . 'div id=toctitleh2' . $title . /h2/div\n . $toc - . /ul\n/td/tr/table\n; + . /ul\n/div\n; } /** diff --git a/skins/common/commonContent.css b/skins/common/commonContent.css index a36fa48..ee102f7 100644 --- a/skins/common/commonContent.css +++ b/skins/common/commonContent.css @@ -14,6 +14,36 @@ padding: 5px; font-size: 95%; } + +/** + * We want to display the ToC element with intrinsic width. There are a few good + * old ways of making it this way, including floating it or making it a table. + * Both are clearly suboptimal. + * + * Thus we use display: inline-block. It is treated as an inline element with + * regard to text flow, but this isn't an issue here as the ToC is always + * sandwiched between other block-level elements. + */ +#toc, +.toc { + display: -moz-inline-block; + display: inline-block; + zoom: 1; + *display: inline; + padding: 7px; +} + +/* CSS for backwards-compatibility with cached page renders and creative uses in wikitext */ +table#toc, +table.toc { + border-collapse: collapse; +} +/* Remove additional paddings inside table-cells that are not present in divs */ +table#toc td, +table.toc td { + padding: 0; +} + #toc h2, .toc h2 { display: inline; diff --git a/skins/common/oldshared.css b/skins/common/oldshared.css index 2a9c25f..7f90c77 100644 --- a/skins/common/oldshared.css +++ b/skins/common/oldshared.css @@ -121,6 +121,21 @@ padding: 5px; font-size: 95%; text-align: center; + display: -moz-inline-block; + display: inline-block; + zoom: 1; + *display: inline; + padding: 7px; +} +/* CSS for backwards-compatibility with cached page renders and creative uses in wikitext */ +table#toc, +table.toc { + border-collapse: collapse; +} +/* Remove additional paddings inside table-cells that are not present in divs */ +table#toc td, +table.toc td { + padding: 0; } #toc h2, .toc h2 { diff --git a/skins/modern/main.css b/skins/modern/main.css index f222028..47a2542 100644 --- a/skins/modern/main.css +++ b/skins/modern/main.css @@ -546,6 +546,23 @@ border-spacing: 0; background-color: #f0f0f0; border: solid 1px #bb; + display: -moz-inline-block; + display: inline-block; + zoom: 1; + *display: inline; + padding: 7px; +} + +/* CSS for backwards-compatibility with cached page renders and creative uses in wikitext */ +table#toc, +table.toc { + border-collapse: collapse; +} + +/* Remove additional paddings inside table-cells that are not present in divs */ +table#toc td, +table.toc td { + padding: 0; } #toc tr, #toc td { diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index 17f9437..34ec408 100644 --- a/tests/parser/parserTests.txt +++
[MediaWiki-commits] [Gerrit] Update VisualEditor for gender survey. - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Update VisualEditor for gender survey. .. Update VisualEditor for gender survey. Change-Id: I50e413f0379b9865871a5cad7b6c7705165c2f6f --- M extensions/VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Spage: Looks good to me, approved jenkins-bot: Verified diff --git a/extensions/VisualEditor b/extensions/VisualEditor index 680e0e5..d86c425 16 --- a/extensions/VisualEditor +++ b/extensions/VisualEditor -Subproject commit 680e0e5ec0dee96b68a1fc3a3f8def7bc782bf54 +Subproject commit d86c425e108bac1bec56891a2c039785594bc288 -- To view, visit https://gerrit.wikimedia.org/r/71552 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I50e413f0379b9865871a5cad7b6c7705165c2f6f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.22wmf8 Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org Gerrit-Reviewer: Spage sp...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Per its own documentation, make showMessage()'s wrap default... - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Per its own documentation, make showMessage()'s wrap default to 'warning' .. Per its own documentation, make showMessage()'s wrap default to 'warning' This was producing some lovely visualeditor-savedialog-label-undefined garbage. Change-Id: I0852fea9088738d9a93e25bd3b104b9aa07c256d --- M modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js b/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js index eb29d5c..3939500 100644 --- a/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js +++ b/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js @@ -2190,6 +2190,9 @@ var $message; if ( !this.messages[name] ) { options = options || {}; + if ( options.wrap === undefined ) { + options.wrap = 'warning'; + } $message = $( 'div class=ve-init-mw-viewPageTarget-saveDialog-message/div' ); if ( options.wrap !== false ) { $message.append( $( 'p').append( -- To view, visit https://gerrit.wikimedia.org/r/71551 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0852fea9088738d9a93e25bd3b104b9aa07c256d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Catrope roan.katt...@gmail.com Gerrit-Reviewer: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update VisualEditor for gender survey. - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Update VisualEditor for gender survey. .. Update VisualEditor for gender survey. Change-Id: I69116d78589f37c13bdc90c9c2c8717cbe01d908 --- M extensions/VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Spage: Looks good to me, approved jenkins-bot: Verified diff --git a/extensions/VisualEditor b/extensions/VisualEditor index 680e0e5..d86c425 16 --- a/extensions/VisualEditor +++ b/extensions/VisualEditor -Subproject commit 680e0e5ec0dee96b68a1fc3a3f8def7bc782bf54 +Subproject commit d86c425e108bac1bec56891a2c039785594bc288 -- To view, visit https://gerrit.wikimedia.org/r/71553 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I69116d78589f37c13bdc90c9c2c8717cbe01d908 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.22wmf9 Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org Gerrit-Reviewer: Spage sp...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Blacklist Firefox = 10 per reports that it's broken - change (mediawiki...VisualEditor)
Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/71554 Change subject: Blacklist Firefox = 10 per reports that it's broken .. Blacklist Firefox = 10 per reports that it's broken Bug: 50534 Change-Id: I732a6cceb0790bf22488e4db292b62c43276783f --- M modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/54/71554/1 diff --git a/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js b/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js index eb29d5c..9cd24dc 100644 --- a/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js +++ b/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js @@ -202,6 +202,7 @@ // when trying to save a page (bug 49187) 'msie': [['=', 10]], 'android': [['', 3]], + 'firefox': [['=', 10]] // Bug 50534 // Blacklist all versions: 'opera': null, 'blackberry': null -- To view, visit https://gerrit.wikimedia.org/r/71554 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I732a6cceb0790bf22488e4db292b62c43276783f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Jforrester jforres...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix display of 'please check this edit' tag - change (mediawiki...VisualEditor)
Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/71555 Change subject: Fix display of 'please check this edit' tag .. Fix display of 'please check this edit' tag Change-Id: I09f8926f7f65f092cf37eb661d90602677d04924 --- M VisualEditor.i18n.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/55/71555/1 diff --git a/VisualEditor.i18n.php b/VisualEditor.i18n.php index b099988..5cf4964 100644 --- a/VisualEditor.i18n.php +++ b/VisualEditor.i18n.php @@ -9,7 +9,7 @@ 'accesskey-ca-ve-edit' = 'v', 'tag-visualeditor' = '[[Special:Tags|Tag]]: [[{{MediaWiki:Visualeditor-descriptionpagelink}}|VisualEditor]]', 'tag-visualeditor-description' = 'Edit made using the [[{{MediaWiki:Visualeditor-descriptionpagelink}}|VisualEditor]]', - 'tag-visualeditor-needcheck' = '[[Special:Tags|Tag]]: [[{{MediaWiki:Visualeditor-descriptionpagelink}}|VisualEditor]]: Check', + 'tag-visualeditor-needcheck' = '[[Special:Tags|Tag]]: [[{{MediaWiki:Visualeditor-descriptionpagelink}}|VisualEditor: Check]]', 'tag-visualeditor-needcheck-description' = 'Edit made using the [[{{MediaWiki:Visualeditor-descriptionpagelink}}|VisualEditor]] where the system detected the wikitext possibly having unintended changes.', 'tooltip-ca-createsource' = 'Create the source code of this page', 'tooltip-ca-editsource' = 'Edit the source code of this page', -- To view, visit https://gerrit.wikimedia.org/r/71555 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I09f8926f7f65f092cf37eb661d90602677d04924 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Jforrester jforres...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Include namespace in labels created via jquery.wikibase.link... - change (mediawiki...Wikibase)
Hoo man has uploaded a new change for review. https://gerrit.wikimedia.org/r/71556 Change subject: Include namespace in labels created via jquery.wikibase.linkitem .. Include namespace in labels created via jquery.wikibase.linkitem Bug: 47774 Change-Id: I340fa52344c9e10ba006aad1afb065af6987bc86 --- M client/resources/Resources.php M client/resources/jquery.wikibase/jquery.wikibase.linkitem.js 2 files changed, 9 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/56/71556/1 diff --git a/client/resources/Resources.php b/client/resources/Resources.php index 2a117a0..3c6679b 100644 --- a/client/resources/Resources.php +++ b/client/resources/Resources.php @@ -53,6 +53,7 @@ 'jquery.wikibase.siteselector', 'mediawiki.api', 'mediawiki.util', + 'mediawiki.Title', 'mediawiki.jqueryMsg', 'wikibase.client.currentSite', 'wikibase.sites', diff --git a/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js b/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js index ae0f8a1..abd8c2d 100644 --- a/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js +++ b/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js @@ -4,7 +4,7 @@ * * @since 0.4 * -* Author: Marius Hoch h...@online.de +* Author: Marius Hoch h...@online.de */ ( function( wb, mw, $ ) { 'use strict'; @@ -480,11 +480,16 @@ var entityData = { labels: {}, sitelinks: {} - }; + }, title; + + title = new mw.Title( + mw.config.get( 'wgTitle' ), mw.config.get( 'wgNamespaceNumber' ) + ); + // Label (page title) entityData.labels[ mw.config.get( 'wgContentLanguage' ) ] = { language: mw.config.get( 'wgContentLanguage' ), - value: mw.config.get( 'wgTitle' ) + value: title.getPrefixedText() }; // Link this page entityData.sitelinks[ mw.config.get( 'wbCurrentSite' ).globalSiteId ] = { -- To view, visit https://gerrit.wikimedia.org/r/71556 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I340fa52344c9e10ba006aad1afb065af6987bc86 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Hoo man h...@online.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove enwiki override for wgVisualEditorEnableSplitTest. - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Remove enwiki override for wgVisualEditorEnableSplitTest. .. Remove enwiki override for wgVisualEditorEnableSplitTest. The preference no longer matters, but there is no need to set it either. Change-Id: I22b78cf980ab18ac1414abd4171728e21e5b34f2 --- M wmf-config/InitialiseSettings.php 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Catrope: Looks good to me, approved Jforrester: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 98c1277..1144b0c 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -10392,7 +10392,6 @@ // Bug 49604 - to remove once complete. 'wmgVisualEditorEnableSplitTest' = array( 'default' = false, - 'enwiki' = true, ), 'wmgUseRSSExtension' = array( -- To view, visit https://gerrit.wikimedia.org/r/71540 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I22b78cf980ab18ac1414abd4171728e21e5b34f2 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org Gerrit-Reviewer: Catrope roan.katt...@gmail.com Gerrit-Reviewer: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Making Check Imports More Agnostic - change (wikimedia...crm)
Mwalker has uploaded a new change for review. https://gerrit.wikimedia.org/r/71557 Change subject: Making Check Imports More Agnostic .. Making Check Imports More Agnostic Change-Id: I0d6640e1b8857571ac50dd5b66c3e164c1d637f2 --- M sites/all/modules/offline2civicrm/import_checks.drush.inc M sites/all/modules/wmf_common/wmf_civicrm/wmf_civicrm.install M sites/all/modules/wmf_common/wmf_civicrm/wmf_civicrm.module 3 files changed, 43 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/57/71557/1 diff --git a/sites/all/modules/offline2civicrm/import_checks.drush.inc b/sites/all/modules/offline2civicrm/import_checks.drush.inc index 4187e0e..e9d300d 100644 --- a/sites/all/modules/offline2civicrm/import_checks.drush.inc +++ b/sites/all/modules/offline2civicrm/import_checks.drush.inc @@ -77,7 +77,6 @@ city = _get_value( City, $row, $headers ), state_province = _get_value( State, $row, $headers ), postal_code = _get_value( Postal Code, $row, $headers ), - gateway = merkle, payment_method = _get_value( Payment Instrument, $row, $headers ), payment_submethod = , check_number = _get_value( Check Number, $row, $headers ), @@ -95,14 +94,37 @@ import_batch_number = _get_value( Batch, $row, $headers ), ); - if( _get_value( 'Organization Name', $row, $headers, FALSE ) === FALSE ){ + $contype = _get_value( 'Contribution Type', $row, $headers ); + switch ( $contype ) { + case Merkle: + $msg['gateway'] = merkle; + break; + + case Arizona Lockbox: + $msg['gateway'] = arizonalockbox; + break; + + default: + throw new WmfException( 'CIVI_REQ_FIELD', Contribution Type '$contype' is unknown whilst importing checks! ); + break; + } + + // Attempt to get the organization name if it exists... + // Merkle used the Organization Name column header where AZL uses Company + $orgname = _get_value( 'Organization Name', $row, $headers, FALSE ); + if ( $orgname === FALSE ) { + $orgname = _get_value( 'Company', $row, $headers, FALSE ); + } + + if( $orgname === FALSE ) { + // If it's still false let's just assume it's an individual $msg['contact_type'] = Individual; $msg[first_name] = _get_value( First Name, $row, $headers ); $msg[middle_name] = _get_value( Middle Name, $row, $headers ); $msg[last_name] = _get_value( Last Name, $row, $headers ); } else { $msg['contact_type'] = Organization; - $msg['organization_name'] = _get_value( Organization Name, $row, $headers ); + $msg['organization_name'] = $orgname; } // check for additional address information @@ -141,7 +163,7 @@ $msg['gateway_txn_id'] = md5( $msg['check_number'] . $name_salt ); // check to see if we have already processed this check - if ( $existing = wmf_civicrm_get_contributions_from_gateway_id( merkle, $msg['gateway_txn_id'] ) ){ + if ( $existing = wmf_civicrm_get_contributions_from_gateway_id( $msg['gateway'], $msg['gateway_txn_id'] ) ){ // if so, move on watchdog('offline2civicrm', 'Contribution matches existing contribution (id: ' . $existing[0]['id'] . ') Skipping', array(), WATCHDOG_INFO); diff --git a/sites/all/modules/wmf_common/wmf_civicrm/wmf_civicrm.install b/sites/all/modules/wmf_common/wmf_civicrm/wmf_civicrm.install index 11f138a..f161318 100644 --- a/sites/all/modules/wmf_common/wmf_civicrm/wmf_civicrm.install +++ b/sites/all/modules/wmf_common/wmf_civicrm/wmf_civicrm.install @@ -479,3 +479,14 @@ $ret[] = array( 'success' = false, 'query' = $api-errorMsg() ); } } + +/** + * Add new check processor! + */ +function wmf_civicrm_update_6008() +{ +
[MediaWiki-commits] [Gerrit] Blacklist Firefox = 10 per reports that it's broken - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Blacklist Firefox = 10 per reports that it's broken .. Blacklist Firefox = 10 per reports that it's broken Bug: 50534 Change-Id: I732a6cceb0790bf22488e4db292b62c43276783f --- M modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js M modules/ve/test/init/mw/targets/ve.init.mw.ViewPageTarget.test.js 2 files changed, 4 insertions(+), 1 deletion(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js b/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js index eb29d5c..c1bafd6 100644 --- a/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js +++ b/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js @@ -201,7 +201,10 @@ // requests to the VisualEditor/Parsoid API which is causing silent failures // when trying to save a page (bug 49187) 'msie': [['=', 10]], + // Android 2.x and below support CE but don't trigger keyboard input 'android': [['', 3]], + // Bug 50534 - apparently Firefox is broken in versions 10 and below + 'firefox': [['=', 10]], // Blacklist all versions: 'opera': null, 'blackberry': null diff --git a/modules/ve/test/init/mw/targets/ve.init.mw.ViewPageTarget.test.js b/modules/ve/test/init/mw/targets/ve.init.mw.ViewPageTarget.test.js index aceccdb..19a7fc1 100644 --- a/modules/ve/test/init/mw/targets/ve.init.mw.ViewPageTarget.test.js +++ b/modules/ve/test/init/mw/targets/ve.init.mw.ViewPageTarget.test.js @@ -38,7 +38,7 @@ { 'msg': 'Firefox 10', 'userAgent': 'Mozilla/5.0 (X11; Mageia; Linux x86_64; rv:10.0.9) Gecko/20100101 Firefox/10.0.9', - 'matches': [] + 'matches': [ 'blacklist' ] }, { 'msg': 'Firefox 11', -- To view, visit https://gerrit.wikimedia.org/r/71554 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I732a6cceb0790bf22488e4db292b62c43276783f Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: Catrope roan.katt...@gmail.com Gerrit-Reviewer: Krinkle krinklem...@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] Fix display of 'please check this edit' tag - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Fix display of 'please check this edit' tag .. Fix display of 'please check this edit' tag Change-Id: I09f8926f7f65f092cf37eb661d90602677d04924 --- M VisualEditor.i18n.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/VisualEditor.i18n.php b/VisualEditor.i18n.php index b099988..5cf4964 100644 --- a/VisualEditor.i18n.php +++ b/VisualEditor.i18n.php @@ -9,7 +9,7 @@ 'accesskey-ca-ve-edit' = 'v', 'tag-visualeditor' = '[[Special:Tags|Tag]]: [[{{MediaWiki:Visualeditor-descriptionpagelink}}|VisualEditor]]', 'tag-visualeditor-description' = 'Edit made using the [[{{MediaWiki:Visualeditor-descriptionpagelink}}|VisualEditor]]', - 'tag-visualeditor-needcheck' = '[[Special:Tags|Tag]]: [[{{MediaWiki:Visualeditor-descriptionpagelink}}|VisualEditor]]: Check', + 'tag-visualeditor-needcheck' = '[[Special:Tags|Tag]]: [[{{MediaWiki:Visualeditor-descriptionpagelink}}|VisualEditor: Check]]', 'tag-visualeditor-needcheck-description' = 'Edit made using the [[{{MediaWiki:Visualeditor-descriptionpagelink}}|VisualEditor]] where the system detected the wikitext possibly having unintended changes.', 'tooltip-ca-createsource' = 'Create the source code of this page', 'tooltip-ca-editsource' = 'Edit the source code of this page', -- To view, visit https://gerrit.wikimedia.org/r/71555 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I09f8926f7f65f092cf37eb661d90602677d04924 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: Catrope roan.katt...@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] Search widget key commands - change (mediawiki...VisualEditor)
Trevor Parscal has uploaded a new change for review. https://gerrit.wikimedia.org/r/71558 Change subject: Search widget key commands .. Search widget key commands Objective: * Enable navigating search results using keyboard up and down keys * Bubble up query input enter events Changes: ve.ui.SearchWidget.js * Route query input events to emit * Add handler for keydown events * Support navigating through the list of results using vertical arrow keys Change-Id: Ia2e4b27075a8ab2e29a69294e9f7847e8f5a3f83 --- M modules/ve/ui/widgets/ve.ui.SearchWidget.js 1 file changed, 22 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/58/71558/1 diff --git a/modules/ve/ui/widgets/ve.ui.SearchWidget.js b/modules/ve/ui/widgets/ve.ui.SearchWidget.js index 5cd3a8b..b335cca 100644 --- a/modules/ve/ui/widgets/ve.ui.SearchWidget.js +++ b/modules/ve/ui/widgets/ve.ui.SearchWidget.js @@ -35,8 +35,9 @@ this.$results = this.$$( 'div' ); // Events - this.query.connect( this, { 'change': 'onQueryChange' } ); + this.query.connect( this, { 'change': 'onQueryChange', 'enter': [ 'emit', 'enter' ] } ); this.results.connect( this, { 'select': 'onResultsSelect' } ); + this.query.$.on( 'keydown', ve.bind( this.onQueryKeydown, this ) ); // Initialization this.$query @@ -61,9 +62,29 @@ * @param {Object|null} item Item data or null if no item is selected */ +/** + * @event enter + */ + /* Methods */ /** + * Handle query key down events. + * + * @method + * @param {jQuery.Event} e Key down event + */ +ve.ui.SearchWidget.prototype.onQueryKeydown = function ( e ) { + var selectedItem, + dir = e.which === ve.Keys.DOWN ? 1 : ( e.which === ve.Keys.UP ? -1 : 0 ); + + if ( dir ) { + selectedItem = this.results.getSelectedItem(); + this.results.selectItem( this.results.getRelativeSelectableItem( selectedItem, dir ) ); + } +}; + +/** * Handle select widget select events. * * Clears existing results. Subclasses should repopulate items according to new query. -- To view, visit https://gerrit.wikimedia.org/r/71558 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia2e4b27075a8ab2e29a69294e9f7847e8f5a3f83 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Trevor Parscal tpars...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Select widget relative item fixes - change (mediawiki...VisualEditor)
Trevor Parscal has uploaded a new change for review. https://gerrit.wikimedia.org/r/71560 Change subject: Select widget relative item fixes .. Select widget relative item fixes Changes: ve.ui.SelectWidget.js * Make getRelativeSelectableItem properly loop around * Replace confusing and broken getClosestSelectableItem with getFirstSelectableItem since that's the only use case we had for it anyway ve.ui.PagedDialog.js, ve.ui.LookupInputWidget.js * Update calls to getClosestSelectableItem to use new method Change-Id: I2399d01a45c43d1ad663ed6c6de156e796065306 --- M modules/ve/ui/dialogs/ve.ui.PagedDialog.js M modules/ve/ui/widgets/ve.ui.LookupInputWidget.js M modules/ve/ui/widgets/ve.ui.SelectWidget.js 3 files changed, 25 insertions(+), 31 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/60/71560/1 diff --git a/modules/ve/ui/dialogs/ve.ui.PagedDialog.js b/modules/ve/ui/dialogs/ve.ui.PagedDialog.js index 7f387a5..7f45322 100644 --- a/modules/ve/ui/dialogs/ve.ui.PagedDialog.js +++ b/modules/ve/ui/dialogs/ve.ui.PagedDialog.js @@ -122,7 +122,7 @@ // Auto-select first item when nothing is selected yet if ( !this.outlineWidget.getSelectedItem() ) { - this.outlineWidget.selectItem( this.outlineWidget.getClosestSelectableItem( 0 ) ); + this.outlineWidget.selectItem( this.outlineWidget.getFirstSelectableItem() ); } return this; @@ -145,7 +145,7 @@ // Auto-select first item when nothing is selected anymore if ( !this.outlineWidget.getSelectedItem() ) { - this.outlineWidget.selectItem( this.outlineWidget.getClosestSelectableItem( 0 ) ); + this.outlineWidget.selectItem( this.outlineWidget.getFirstSelectableItem() ); } return this; diff --git a/modules/ve/ui/widgets/ve.ui.LookupInputWidget.js b/modules/ve/ui/widgets/ve.ui.LookupInputWidget.js index 1b2b489..b9d44b3 100644 --- a/modules/ve/ui/widgets/ve.ui.LookupInputWidget.js +++ b/modules/ve/ui/widgets/ve.ui.LookupInputWidget.js @@ -143,7 +143,7 @@ */ ve.ui.LookupInputWidget.prototype.initializeLookupMenuSelection = function () { if ( !this.lookupMenu.getSelectedItem() ) { - this.lookupMenu.selectItem( this.lookupMenu.getClosestSelectableItem( 0 ), true ); + this.lookupMenu.selectItem( this.lookupMenu.getFirstSelectableItem(), true ); } this.lookupMenu.highlightItem( this.lookupMenu.getSelectedItem() ); }; diff --git a/modules/ve/ui/widgets/ve.ui.SelectWidget.js b/modules/ve/ui/widgets/ve.ui.SelectWidget.js index 633f8ae..38c8549 100644 --- a/modules/ve/ui/widgets/ve.ui.SelectWidget.js +++ b/modules/ve/ui/widgets/ve.ui.SelectWidget.js @@ -282,53 +282,47 @@ * @returns {ve.ui.OptionWidget|null} Item at position, `null` if there are no items in the menu */ ve.ui.SelectWidget.prototype.getRelativeSelectableItem = function ( item, direction ) { - var index = this.items.indexOf( item ), - i = direction 0 ? - // Default to 0 instead of -1, if nothing is selected let's start at the beginning - Math.max( 0, index + direction ) : - // Default to n-1 instead of -1, if nothing is selected let's start at the end - Math.min( index + direction, this.items.length - 1 ), + var inc = direction 0 ? 1 : -1, len = this.items.length, - inc = direction 0 ? 1 : -1, - stopAt = i; - // Iterate to the next item in the sequence - while ( i = len ) { + index = item instanceof ve.ui.OptionWidget ? + ve.indexOf( item, this.items ) : ( inc 0 ? -1 : 0 ), + stopAt = Math.max( Math.min( index, len - 1 ), 0 ), + i = inc 0 ? + // Default to 0 instead of -1, if nothing is selected let's start at the beginning + Math.max( index, -1 ) : + // Default to n-1 instead of -1, if nothing is selected let's start at the end + Math.min( index, len ); + + while ( true ) { + i = ( i + inc + len ) % len; item = this.items[i]; if ( item instanceof ve.ui.OptionWidget item.isSelectable() ) { return item; } - // Wrap around - i = ( i + inc + len ) % len; + // Stop iterating when we've looped all the way around if ( i === stopAt ) { - // We've looped around, I guess we're all alone - return item; + break; } } return null; }; /** - * Selects the next item in the menu. + * Get the next selectable item. * * @method - *
[MediaWiki-commits] [Gerrit] Emit select null on selected item removal - change (mediawiki...VisualEditor)
Trevor Parscal has uploaded a new change for review. https://gerrit.wikimedia.org/r/71561 Change subject: Emit select null on selected item removal .. Emit select null on selected item removal Issues: * Selected item is removed, but no select even was emitted Changes: ve.ui.SelectWidget.js * On remove, emit select null when removing a selected item * On clear, emit select null always Change-Id: I1a94b0f8a841611b20e09f6c02f37fb9589e85c3 --- M modules/ve/ui/widgets/ve.ui.SelectWidget.js 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/61/71561/1 diff --git a/modules/ve/ui/widgets/ve.ui.SelectWidget.js b/modules/ve/ui/widgets/ve.ui.SelectWidget.js index 38c8549..5dc76f3 100644 --- a/modules/ve/ui/widgets/ve.ui.SelectWidget.js +++ b/modules/ve/ui/widgets/ve.ui.SelectWidget.js @@ -377,6 +377,9 @@ // Remove existing item delete this.hashes[hash]; } + if ( item.isSelected() ) { + this.selectItem( null ); + } } ve.ui.GroupElement.prototype.removeItems.call( this, items ); @@ -399,6 +402,7 @@ // Clear all items this.hashes = {}; ve.ui.GroupElement.prototype.clearItems.call( this ); + this.selectItem( null ); this.emit( 'remove', items ); -- To view, visit https://gerrit.wikimedia.org/r/71561 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1a94b0f8a841611b20e09f6c02f37fb9589e85c3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Trevor Parscal tpars...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Category moving improvements - change (mediawiki...VisualEditor)
Trevor Parscal has uploaded a new change for review. https://gerrit.wikimedia.org/r/71559 Change subject: Category moving improvements .. Category moving improvements Changes: ve.dm.MetaList.js * Auto-initialize index to the end of the list (like the docs claim) even when not providing an offset ve.ui.MWCategoryInputWidget.js * Cleanup fix for not offering to move the last category to the end ve.ui.MWCategoryWidget.js * Allow pressing cancel on the meta dialog after moving a category to the end without crashing Change-Id: I45059bda022639f7942f1799a42ecf8a4d962df0 --- M modules/ve/dm/ve.dm.MetaList.js M modules/ve/ui/widgets/ve.ui.MWCategoryInputWidget.js M modules/ve/ui/widgets/ve.ui.MWCategoryWidget.js 3 files changed, 17 insertions(+), 26 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/59/71559/1 diff --git a/modules/ve/dm/ve.dm.MetaList.js b/modules/ve/dm/ve.dm.MetaList.js index 858c7d3..861b06a 100644 --- a/modules/ve/dm/ve.dm.MetaList.js +++ b/modules/ve/dm/ve.dm.MetaList.js @@ -251,8 +251,8 @@ * Insert new metadata into the document. This builds and processes a transaction that inserts * metadata into the document. * @param {Object|ve.dm.MetaItem} meta Metadata element (or MetaItem) to insert - * @param {Number} [offset] Offset at which to insert the new metadata - * @param {Number} [index] Index at which to insert the new metadata, or undefined to add to the end + * @param {Number} [offset] Offset to insert the new metadata, or undefined to add to the end + * @param {Number} [index] Index to insert the new metadata, or undefined to add to the end */ ve.dm.MetaList.prototype.insertMeta = function ( meta, offset, index ) { var tx; @@ -261,8 +261,8 @@ } if ( offset === undefined ) { offset = this.document.data.getLength(); - index = 0; - } else if ( index === undefined ) { + } + if ( index === undefined ) { index = ( this.document.metadata.getData( offset ) || [] ).length; } tx = ve.dm.Transaction.newFromMetadataInsertion( this.document, offset, index, [ meta ] ); diff --git a/modules/ve/ui/widgets/ve.ui.MWCategoryInputWidget.js b/modules/ve/ui/widgets/ve.ui.MWCategoryInputWidget.js index c9f446f..1eebe89 100644 --- a/modules/ve/ui/widgets/ve.ui.MWCategoryInputWidget.js +++ b/modules/ve/ui/widgets/ve.ui.MWCategoryInputWidget.js @@ -106,7 +106,7 @@ matchingCategories = data || []; // Existing categories - for ( i = 0, len = existingCategories.length; i len; i++ ) { + for ( i = 0, len = existingCategories.length - 1; i len; i++ ) { item = existingCategories[i]; // Verify that item starts with category.value if ( item.lastIndexOf( category.value, 0 ) === 0 ) { @@ -120,7 +120,7 @@ for ( i = 0, len = matchingCategories.length; i len; i++ ) { item = matchingCategories[i]; if ( - ve.indexOf( item, existingCategoryItems ) === -1 + ve.indexOf( item, existingCategories ) === -1 item.lastIndexOf( category.value, 0 ) === 0 ) { if ( item === category.value ) { @@ -132,15 +132,6 @@ // New category if ( !exactMatch ) { newCategoryItems.push( category.value ); - } - - // bug 48556: Don't actually offer to move the very last category in the list - we kept it in - // the list thus far so that other lists would not grab it for themselves, but now it's time to - // say goodbye - if ( - existingCategoryItems[existingCategoryItems.length - 1] === - existingCategories[existingCategories.length - 1] ) { - existingCategoryItems.pop(); } // Add sections for non-empty groups diff --git a/modules/ve/ui/widgets/ve.ui.MWCategoryWidget.js b/modules/ve/ui/widgets/ve.ui.MWCategoryWidget.js index 1ccd80c..971debc 100644 --- a/modules/ve/ui/widgets/ve.ui.MWCategoryWidget.js +++ b/modules/ve/ui/widgets/ve.ui.MWCategoryWidget.js @@ -104,8 +104,16 @@ * @param {ve.ui.MenuItemWidget} item Selected item */ ve.ui.MWCategoryWidget.prototype.onLookupMenuItemSelect = function ( item ) { - if ( item item.getData() !== '' ) { - this.emit( 'newCategory', this.input.getCategoryItemFromValue( item.getData() ) ); + var value = item item.getData(); + + if ( value value !== '' ) { + // Remove existing items by value + if ( value in this.categories ) { + this.categories[value].metaItem.remove(); + } + // Add new item + this.emit( 'newCategory', this.input.getCategoryItemFromValue( value ) ); +
[MediaWiki-commits] [Gerrit] Template parameter adding - change (mediawiki...VisualEditor)
Trevor Parscal has uploaded a new change for review. https://gerrit.wikimedia.org/r/71562 Change subject: Template parameter adding .. Template parameter adding Objective: * Allow browsing, searching and adding documented parameters Changes: ve.ui.MWTransclusionDialog.js * Replace regular text input with ve.ui.ParameterSearchWidget * Fix uses of $(), this.frame.$$ is correct ve.ui.Dialog.css * Change rules for addParameterFieldset to make search widget auto-size vertically ve.ui.Widget.css * Add styles for ve.ui.MWParameterResultWidget ve.ui.MWParameterSearchWidget.js, ve.ui.MWParameterResultWidget.js * New classes * Provides a way to search and select parameter for a template * Displays parameter label, name, aliases and description *.php * Links to new files and messages Change-Id: Ie5dbe8c44ce5d64c4b49b09517fb66cd30dd7304 --- M VisualEditor.i18n.php M VisualEditor.php M modules/ve/ui/dialogs/ve.ui.MWTransclusionDialog.js M modules/ve/ui/styles/ve.ui.Dialog.css M modules/ve/ui/styles/ve.ui.Widget.css A modules/ve/ui/widgets/ve.ui.MWParameterResultWidget.js A modules/ve/ui/widgets/ve.ui.MWParameterSearchWidget.js 7 files changed, 338 insertions(+), 54 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/62/71562/1 diff --git a/VisualEditor.i18n.php b/VisualEditor.i18n.php index 3ad6bab..4bdc504 100644 --- a/VisualEditor.i18n.php +++ b/VisualEditor.i18n.php @@ -66,7 +66,6 @@ 'visualeditor-dialog-transclusion-add-template' = 'Add template', 'visualeditor-dialog-transclusion-content' = 'Content', 'visualeditor-dialog-transclusion-options' = 'Options', - 'visualeditor-dialog-transclusion-param-name' = 'Parameter name', 'visualeditor-dialog-transclusion-placeholder' = 'New template', 'visualeditor-dialog-transclusion-remove-content' = 'Remove content', 'visualeditor-dialog-transclusion-remove-param' = 'Remove parameter', @@ -125,6 +124,9 @@ 'visualeditor-notification-saved' = 'Your changes to $1 have been saved.', 'visualeditor-outline-control-move-down' = 'Move item down', 'visualeditor-outline-control-move-up' = 'Move item up', + 'visualeditor-parameter-input-placeholder' = 'Parameter name', + 'visualeditor-parameter-search-no-unused' = 'No unused parameters', + 'visualeditor-parameter-search-unknown' = 'Unknown parameter', 'visualeditor-preference-enable' = 'Enable VisualEditor (only in the [[{{MediaWiki:Visualeditor-mainnamespacepagelink}}|main]] and [[{{MediaWiki:Visualeditor-usernamespacepagelink}}|user]] namespaces)', 'visualeditor-reference-input-placeholder' = 'What do you want to reference?', 'visualeditor-reference-search-create' = 'Create new source', @@ -287,8 +289,6 @@ {{Identical|Content}}', 'visualeditor-dialog-transclusion-options' = 'Label for section with options for templates, content or parameters. {{Identical|Options}}', - 'visualeditor-dialog-transclusion-param-name' = 'Placeholder text label for an input for adding a parameter to a template. -{{Identical|Parameter name}}', 'visualeditor-dialog-transclusion-placeholder' = 'Label for section with options for adding a new template to a multi part transclusion', 'visualeditor-dialog-transclusion-remove-content' = 'Label for button that removes content between transclusion parts', 'visualeditor-dialog-transclusion-remove-param' = 'Label for button that removes a parameter from a template', @@ -375,6 +375,8 @@ 'visualeditor-notification-saved' = 'Shown after a user saves a page, $1 is a page name.', 'visualeditor-outline-control-move-down' = 'Tool tip for a button that moves items in a list down one place', 'visualeditor-outline-control-move-up' = 'Tool tip for a button that moves items in a list up one place', + 'visualeditor-parameter-input-placeholder' = 'Placeholder text label for an input for adding a parameter to a template. +{{Identical|Parameter name}}', 'visualeditor-preference-enable' = 'Label for the user preference to enable VisualEditor. Links are in {{msg-mw|Visualeditor-mainnamespacepagelink}} and {{msg-mw|visualeditor-usernamespacepagelink}}.', 'visualeditor-reference-input-placeholder' = 'Placeholder text for reference search field.', @@ -482,7 +484,7 @@ 'visualeditor-dialog-transclusion-add-template' = 'أضف قالبا', 'visualeditor-dialog-transclusion-content' = 'المحتوى', 'visualeditor-dialog-transclusion-options' = 'خيارات', - 'visualeditor-dialog-transclusion-param-name' = 'اسم المعامل', + 'visualeditor-parameter-input-placeholder' = 'اسم المعامل', 'visualeditor-dialog-transclusion-placeholder' = 'قالب جديد', 'visualeditor-dialog-transclusion-remove-content' = 'أزل محتوى',
[MediaWiki-commits] [Gerrit] Dont wrap IEW with spans when they are in fosterable posns i... - change (mediawiki...Parsoid)
Subramanya Sastry has uploaded a new change for review. https://gerrit.wikimedia.org/r/71563 Change subject: Dont wrap IEW with spans when they are in fosterable posns in tables .. Dont wrap IEW with spans when they are in fosterable posns in tables * On the following wikitext snippet, Parsoid was adding span wrappers around IEW emitted by the {{WDL}} tpl. These would then get fostered out and introduce dirty diffs by emitting span/span on RTing. {| |5th {{WDL|7|2|2|3}} || 5 || 7 || 6 |} * This patch makes fixes by not span-wrapping IEW in fosterable posns in tables. * Also fixed getAboutSiblings to continue collecting siblings across IEW gaps when in fosterable position. * Fixes parsing of above snippet. * No change in parser test results (TODO: need to come up with a good test case for this to prevent regressions). Change-Id: Idaf069866510f63921334c272982ec6e38297bea --- M js/lib/mediawiki.DOMPostProcessor.js M js/lib/mediawiki.DOMUtils.js M js/lib/mediawiki.WikitextSerializer.js 3 files changed, 34 insertions(+), 28 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/63/71563/1 diff --git a/js/lib/mediawiki.DOMPostProcessor.js b/js/lib/mediawiki.DOMPostProcessor.js index a783f86..8245de5 100644 --- a/js/lib/mediawiki.DOMPostProcessor.js +++ b/js/lib/mediawiki.DOMPostProcessor.js @@ -1329,13 +1329,16 @@ var next = n.nextSibling; if ( n.nodeType === Node.TEXT_NODE || n.nodeType === Node.COMMENT_NODE ) { - span = doc.createElement( 'span' ); - span.setAttribute( 'about', about ); - // attach the new span to the DOM - n.parentNode.insertBefore( span, n ); - // move the text node into the span - span.appendChild( n ); - n = span; + // Dont add span-wrappers for IEW in fosterable positions + if (!DU.isFosterablePosition(n) || !DU.isIEW(n)) { + span = doc.createElement( 'span' ); + span.setAttribute( 'about', about ); + // attach the new span to the DOM + n.parentNode.insertBefore( span, n ); + // move the text node into the span + span.appendChild( n ); + n = span; + } } else if (n.nodeType === Node.ELEMENT_NODE) { n.setAttribute( 'about', about ); } diff --git a/js/lib/mediawiki.DOMUtils.js b/js/lib/mediawiki.DOMUtils.js index 512d4a2..21a5b27 100644 --- a/js/lib/mediawiki.DOMUtils.js +++ b/js/lib/mediawiki.DOMUtils.js @@ -672,6 +672,22 @@ } }, + getAboutSiblings: function(node, about) { + var nodes = [node]; + + node = node.nextSibling; + while (node ( + this.isElt(node) node.getAttribute('about') === about || + this.isFosterablePosition(node) !this.isElt(node) this.isIEW(node) + )) + { + nodes.push(node); + node = node.nextSibling; + } + + return nodes; + }, + /** * Extract transclusion and extension expansions from a DOM, and return * them in a structure like this: @@ -697,6 +713,8 @@ * } */ extractExpansions: function (doc) { + var DU = this; + var node = doc.body, expansion, expansions = { @@ -705,17 +723,6 @@ files: {} }; - function getAboutSiblings(node, about) { - var nodes = [node]; - node = node.nextSibling; - while (node node.nodeType === node.ELEMENT_NODE - node.getAttribute('about') === about) - { - nodes.push(node); - node = node.nextSibling; - } - return nodes; - } function doExtractExpansions (node) { var nodes, expAccum, @@ -731,8 +738,8 @@ .test(typeOf) about) || /\b(?:mw:Image(?:\b|\/))/.test(typeOf))
[MediaWiki-commits] [Gerrit] Bug 50255: Talk page shows a talk button - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Bug 50255: Talk page shows a talk button .. Bug 50255: Talk page shows a talk button Correct bad css rule Replace it with a css rule which hides talk button on talk pages Change-Id: I89466dcc5cc6cea8bdcbb3d4e821b3da5fbbd184 --- M less/common/pageactions.less M stylesheets/common/pageactions.css 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: JGonera: Looks good to me, approved jenkins-bot: Verified diff --git a/less/common/pageactions.less b/less/common/pageactions.less index 9406ffe..d1af5a1 100644 --- a/less/common/pageactions.less +++ b/less/common/pageactions.less @@ -4,7 +4,7 @@ #ca-upload, #ca-edit, .client-nojs #ca-watch.cta, -#ca-edit.istalk { +#ca-talk.selected { display: none; } diff --git a/stylesheets/common/pageactions.css b/stylesheets/common/pageactions.css index 3abd217..2cfca2d 100644 --- a/stylesheets/common/pageactions.css +++ b/stylesheets/common/pageactions.css @@ -1,7 +1,7 @@ #ca-upload, #ca-edit, .client-nojs #ca-watch.cta, -#ca-edit.istalk { +#ca-talk.selected { display: none; } #section_0 { -- To view, visit https://gerrit.wikimedia.org/r/71389 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I89466dcc5cc6cea8bdcbb3d4e821b3da5fbbd184 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: JGonera jgon...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update VisualEditor to master - change (mediawiki/core)
Catrope has submitted this change and it was merged. Change subject: Update VisualEditor to master .. Update VisualEditor to master Change-Id: I05358adbce3f0e325323584ea36a52a4d6333a15 (cherry picked from commit b6c2690049fb1e1d1462f21bc087ee2284329fa8) --- M extensions/VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Catrope: Verified; Looks good to me, approved diff --git a/extensions/VisualEditor b/extensions/VisualEditor index d86c425..d57fd0d 16 --- a/extensions/VisualEditor +++ b/extensions/VisualEditor -Subproject commit d86c425e108bac1bec56891a2c039785594bc288 +Subproject commit d57fd0d2598e6ae8c973485d78539d14c538e539 -- To view, visit https://gerrit.wikimedia.org/r/71565 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I05358adbce3f0e325323584ea36a52a4d6333a15 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.22wmf8 Gerrit-Owner: Catrope roan.katt...@gmail.com Gerrit-Reviewer: Catrope roan.katt...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update VisualEditor to master - change (mediawiki/core)
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/71564 Change subject: Update VisualEditor to master .. Update VisualEditor to master Change-Id: I05358adbce3f0e325323584ea36a52a4d6333a15 --- M extensions/VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/64/71564/1 diff --git a/extensions/VisualEditor b/extensions/VisualEditor index d86c425..d57fd0d 16 --- a/extensions/VisualEditor +++ b/extensions/VisualEditor -Subproject commit d86c425e108bac1bec56891a2c039785594bc288 +Subproject commit d57fd0d2598e6ae8c973485d78539d14c538e539 -- To view, visit https://gerrit.wikimedia.org/r/71564 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I05358adbce3f0e325323584ea36a52a4d6333a15 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.22wmf9 Gerrit-Owner: Catrope roan.katt...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update VisualEditor to master - change (mediawiki/core)
Catrope has submitted this change and it was merged. Change subject: Update VisualEditor to master .. Update VisualEditor to master Change-Id: I05358adbce3f0e325323584ea36a52a4d6333a15 --- M extensions/VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Catrope: Verified; Looks good to me, approved diff --git a/extensions/VisualEditor b/extensions/VisualEditor index d86c425..d57fd0d 16 --- a/extensions/VisualEditor +++ b/extensions/VisualEditor -Subproject commit d86c425e108bac1bec56891a2c039785594bc288 +Subproject commit d57fd0d2598e6ae8c973485d78539d14c538e539 -- To view, visit https://gerrit.wikimedia.org/r/71564 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I05358adbce3f0e325323584ea36a52a4d6333a15 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.22wmf9 Gerrit-Owner: Catrope roan.katt...@gmail.com Gerrit-Reviewer: Catrope roan.katt...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert tcpircbot: IPv4 cidr instead of IPv4-mapped IPv6 - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: Revert tcpircbot: IPv4 cidr instead of IPv4-mapped IPv6 .. Revert tcpircbot: IPv4 cidr instead of IPv4-mapped IPv6 This reverts commit 71686b73b30f53a6c0c4c17eff75983877389551. Change-Id: I772f1dd0cb2bea3f1ad7f128b022962680f4092d --- M manifests/site.pp 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/manifests/site.pp b/manifests/site.pp index 9d5af67..5d3b587 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -2082,10 +2082,10 @@ channel = '#wikimedia-operations', password = $passwords::logmsgbot::logmsgbot_password, cidr = [ - '10.64.21.123/32',# vanadium - '10.64.0.196/32', # tin - '208.80.152.165/32', # fenari - '127.0.0.1/32', # loopback + ':::10.64.21.123/128',# vanadium + ':::10.64.0.196/128', # tin + ':::208.80.152.165/128', # fenari + ':::127.0.0.1/128', # loopback ], } } -- To view, visit https://gerrit.wikimedia.org/r/71566 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I772f1dd0cb2bea3f1ad7f128b022962680f4092d Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh o...@wikimedia.org Gerrit-Reviewer: Dzahn dz...@wikimedia.org Gerrit-Reviewer: Faidon fai...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Making Check Imports More Agnostic - change (wikimedia...crm)
Katie Horn has submitted this change and it was merged. Change subject: Making Check Imports More Agnostic .. Making Check Imports More Agnostic Change-Id: I0d6640e1b8857571ac50dd5b66c3e164c1d637f2 --- M sites/all/modules/offline2civicrm/import_checks.drush.inc M sites/all/modules/wmf_common/wmf_civicrm/wmf_civicrm.install M sites/all/modules/wmf_common/wmf_civicrm/wmf_civicrm.module 3 files changed, 45 insertions(+), 8 deletions(-) Approvals: Katie Horn: Verified; Looks good to me, approved diff --git a/sites/all/modules/offline2civicrm/import_checks.drush.inc b/sites/all/modules/offline2civicrm/import_checks.drush.inc index 4187e0e..e9d300d 100644 --- a/sites/all/modules/offline2civicrm/import_checks.drush.inc +++ b/sites/all/modules/offline2civicrm/import_checks.drush.inc @@ -77,7 +77,6 @@ city = _get_value( City, $row, $headers ), state_province = _get_value( State, $row, $headers ), postal_code = _get_value( Postal Code, $row, $headers ), - gateway = merkle, payment_method = _get_value( Payment Instrument, $row, $headers ), payment_submethod = , check_number = _get_value( Check Number, $row, $headers ), @@ -95,14 +94,37 @@ import_batch_number = _get_value( Batch, $row, $headers ), ); - if( _get_value( 'Organization Name', $row, $headers, FALSE ) === FALSE ){ + $contype = _get_value( 'Contribution Type', $row, $headers ); + switch ( $contype ) { + case Merkle: + $msg['gateway'] = merkle; + break; + + case Arizona Lockbox: + $msg['gateway'] = arizonalockbox; + break; + + default: + throw new WmfException( 'CIVI_REQ_FIELD', Contribution Type '$contype' is unknown whilst importing checks! ); + break; + } + + // Attempt to get the organization name if it exists... + // Merkle used the Organization Name column header where AZL uses Company + $orgname = _get_value( 'Organization Name', $row, $headers, FALSE ); + if ( $orgname === FALSE ) { + $orgname = _get_value( 'Company', $row, $headers, FALSE ); + } + + if( $orgname === FALSE ) { + // If it's still false let's just assume it's an individual $msg['contact_type'] = Individual; $msg[first_name] = _get_value( First Name, $row, $headers ); $msg[middle_name] = _get_value( Middle Name, $row, $headers ); $msg[last_name] = _get_value( Last Name, $row, $headers ); } else { $msg['contact_type'] = Organization; - $msg['organization_name'] = _get_value( Organization Name, $row, $headers ); + $msg['organization_name'] = $orgname; } // check for additional address information @@ -141,7 +163,7 @@ $msg['gateway_txn_id'] = md5( $msg['check_number'] . $name_salt ); // check to see if we have already processed this check - if ( $existing = wmf_civicrm_get_contributions_from_gateway_id( merkle, $msg['gateway_txn_id'] ) ){ + if ( $existing = wmf_civicrm_get_contributions_from_gateway_id( $msg['gateway'], $msg['gateway_txn_id'] ) ){ // if so, move on watchdog('offline2civicrm', 'Contribution matches existing contribution (id: ' . $existing[0]['id'] . ') Skipping', array(), WATCHDOG_INFO); diff --git a/sites/all/modules/wmf_common/wmf_civicrm/wmf_civicrm.install b/sites/all/modules/wmf_common/wmf_civicrm/wmf_civicrm.install index 11f138a..de53ae0 100644 --- a/sites/all/modules/wmf_common/wmf_civicrm/wmf_civicrm.install +++ b/sites/all/modules/wmf_common/wmf_civicrm/wmf_civicrm.install @@ -479,3 +479,14 @@ $ret[] = array( 'success' = false, 'query' = $api-errorMsg() ); } } + +/** + * Add new check processor! + */ +function wmf_civicrm_update_6008() +{ + wmf_civicrm_bootstrap_civi(); +
[MediaWiki-commits] [Gerrit] Dont wrap IEW with spans when they are in fosterable posns i... - change (mediawiki...Parsoid)
jenkins-bot has submitted this change and it was merged. Change subject: Dont wrap IEW with spans when they are in fosterable posns in tables .. Dont wrap IEW with spans when they are in fosterable posns in tables * On the following wikitext snippet, Parsoid was adding span wrappers around IEW emitted by the {{WDL}} tpl. These would then get fostered out and introduce dirty diffs by emitting span/span on RTing. {| |5th {{WDL|7|2|2|3}} || 5 || 7 || 6 |} * This patch makes fixes by not span-wrapping IEW in fosterable posns in tables. * Also fixed getAboutSiblings to continue collecting siblings across IEW gaps when in fosterable position. * Fixes parsing of above snippet. * No change in parser test results (TODO: need to come up with a good test case for this to prevent regressions). Change-Id: Idaf069866510f63921334c272982ec6e38297bea --- M js/lib/mediawiki.DOMPostProcessor.js M js/lib/mediawiki.DOMUtils.js M js/lib/mediawiki.WikitextSerializer.js 3 files changed, 37 insertions(+), 28 deletions(-) Approvals: GWicke: Looks good to me, approved jenkins-bot: Verified diff --git a/js/lib/mediawiki.DOMPostProcessor.js b/js/lib/mediawiki.DOMPostProcessor.js index a783f86..e11ef23 100644 --- a/js/lib/mediawiki.DOMPostProcessor.js +++ b/js/lib/mediawiki.DOMPostProcessor.js @@ -1329,13 +1329,19 @@ var next = n.nextSibling; if ( n.nodeType === Node.TEXT_NODE || n.nodeType === Node.COMMENT_NODE ) { - span = doc.createElement( 'span' ); - span.setAttribute( 'about', about ); - // attach the new span to the DOM - n.parentNode.insertBefore( span, n ); - // move the text node into the span - span.appendChild( n ); - n = span; + // Dont add span-wrappers in fosterable positions + // + // NOTE: there cannot be any non-IEW text in fosterable position + // since the HTML tree builder would already have fostered it out. + if (!DU.isFosterablePosition(n)) { + span = doc.createElement( 'span' ); + span.setAttribute( 'about', about ); + // attach the new span to the DOM + n.parentNode.insertBefore( span, n ); + // move the text node into the span + span.appendChild( n ); + n = span; + } } else if (n.nodeType === Node.ELEMENT_NODE) { n.setAttribute( 'about', about ); } diff --git a/js/lib/mediawiki.DOMUtils.js b/js/lib/mediawiki.DOMUtils.js index 512d4a2..21a5b27 100644 --- a/js/lib/mediawiki.DOMUtils.js +++ b/js/lib/mediawiki.DOMUtils.js @@ -672,6 +672,22 @@ } }, + getAboutSiblings: function(node, about) { + var nodes = [node]; + + node = node.nextSibling; + while (node ( + this.isElt(node) node.getAttribute('about') === about || + this.isFosterablePosition(node) !this.isElt(node) this.isIEW(node) + )) + { + nodes.push(node); + node = node.nextSibling; + } + + return nodes; + }, + /** * Extract transclusion and extension expansions from a DOM, and return * them in a structure like this: @@ -697,6 +713,8 @@ * } */ extractExpansions: function (doc) { + var DU = this; + var node = doc.body, expansion, expansions = { @@ -705,17 +723,6 @@ files: {} }; - function getAboutSiblings(node, about) { - var nodes = [node]; - node = node.nextSibling; - while (node node.nodeType === node.ELEMENT_NODE - node.getAttribute('about') === about) - { - nodes.push(node); - node = node.nextSibling; - } - return nodes; - } function doExtractExpansions (node) { var nodes, expAccum, @@ -731,8 +738,8 @@
[MediaWiki-commits] [Gerrit] More concise i18n message - change (mediawiki...Disambiguator)
Kaldari has uploaded a new change for review. https://gerrit.wikimedia.org/r/71567 Change subject: More concise i18n message .. More concise i18n message Change-Id: I1978e3eacc06f5622031e5ab4c1132a7e66b8372 --- M Disambiguator.i18n.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Disambiguator refs/changes/67/71567/1 diff --git a/Disambiguator.i18n.php b/Disambiguator.i18n.php index c01ec0b..12479fa 100644 --- a/Disambiguator.i18n.php +++ b/Disambiguator.i18n.php @@ -15,12 +15,12 @@ # Special:DisambiguationPages 'disambiguationpages' = 'Disambiguation pages', 'disambiguationpages-summary' = The following is a list of all disambiguation pages on {{SITENAME}}.br / -A page is treated as a disambiguation page if the page contains the tag codenowiki__DISAMBIG__/nowiki/code (or an equivalent alias)., +A page is treated as a disambiguation page if it contains the tag codenowiki__DISAMBIG__/nowiki/code (or an equivalent alias)., # Special:DisambiguationPageLinks 'disambiguationpagelinks' = 'Pages linking to disambiguation pages', 'disambiguationpagelinks-summary' = The following pages contain at least one link to a disambiguation page. They may need to link to a more appropriate page instead.br / -A page is treated as a disambiguation page if the page contains the tag codenowiki__DISAMBIG__/nowiki/code (or an equivalent alias)., +A page is treated as a disambiguation page if it contains the tag codenowiki__DISAMBIG__/nowiki/code (or an equivalent alias)., ); /** Message documentation (Message documentation) -- To view, visit https://gerrit.wikimedia.org/r/71567 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1978e3eacc06f5622031e5ab4c1132a7e66b8372 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Disambiguator Gerrit-Branch: master Gerrit-Owner: Kaldari rkald...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix for edit links, RTL wikis with LTR interface - change (mediawiki...VisualEditor)
Mooeypoo has uploaded a new change for review. https://gerrit.wikimedia.org/r/71568 Change subject: Fix for edit links, RTL wikis with LTR interface .. Fix for edit links, RTL wikis with LTR interface Added both bidi-isolation and directionality. Since the directionality has to come from the user interface (and not the wiki dir itself) I had to read the $('body') direction. The other option could be adding a mw.config.get().userLanguageDir that picks up the interface directionality on top of the wiki directionality. Bug: 50543 Change-Id: I9a00e9545a46f13750ab0d118b23d05573ee1a2e --- M modules/ve/init/mw/styles/ve.init.mw.ViewPageTarget.css M modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js 2 files changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/68/71568/1 diff --git a/modules/ve/init/mw/styles/ve.init.mw.ViewPageTarget.css b/modules/ve/init/mw/styles/ve.init.mw.ViewPageTarget.css index 450b15d..f08524e 100644 --- a/modules/ve/init/mw/styles/ve.init.mw.ViewPageTarget.css +++ b/modules/ve/init/mw/styles/ve.init.mw.ViewPageTarget.css @@ -327,6 +327,10 @@ .mw-editsection { white-space: nowrap; padding-right: 0.25em; + /* bidi isolation: */ + unicode-bidi: -moz-isolate; + unicode-bidi: -webkit-isolate; + unicode-bidi: isolate; } .mw-editsection-divider { diff --git a/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js b/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js index deb05fc..f2ce4b0 100644 --- a/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js +++ b/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js @@ -1242,6 +1242,8 @@ $editsections = $( '#mw-content-text .mw-editsection' ), handler = ve.bind( this.onEditSectionLinkClick, this ); + // match direction to the user interface + $editsections.css( 'direction', $( 'body' ).css( 'direction' ) ); // The visibility css construct ensures we always occupy the same space in the layout. // This prevents the heading from changing its wrap when the user toggles editSourceLink. $editsections.each( function () { -- To view, visit https://gerrit.wikimedia.org/r/71568 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9a00e9545a46f13750ab0d118b23d05573ee1a2e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Mooeypoo mor...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Puppetizing hive client, server and metastore. - change (operations...cdh4)
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/71569 Change subject: Puppetizing hive client, server and metastore. .. Puppetizing hive client, server and metastore. This change is not yet ready for review! Change-Id: Ie7a024d371526d59c1f124230e3cce8342b1791c --- M README.md M manifests/hive.pp A manifests/hive/defaults.pp A manifests/hive/master.pp A manifests/hive/metastore.pp A manifests/hive/metastore/mysql.pp A manifests/hive/server.pp M manifests/sqoop.pp A templates/hive/hive-site.xml.erb M tests/Makefile M tests/hive.pp A tests/hive_master.pp A tests/hive_metastore.pp A tests/hive_metastore_mysql.pp A tests/hive_server.pp 15 files changed, 607 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet/cdh4 refs/changes/69/71569/1 diff --git a/README.md b/README.md index 549c141..1849441 100644 --- a/README.md +++ b/README.md @@ -4,15 +4,19 @@ Cloudera's Distribution 4 (CDH4) for Apache Hadoop. # Description + Installs HDFS, YARN or MR1, Hive, HBase, Pig, Sqoop, Zookeeper, Oozie and Hue. Note that, in order for this module to work, you will have to ensure that: -* Sun JRE version 6 or greater is installed -* Your package manager is configured with a repository containing the +- Sun JRE version 6 or greater is installed +- Your package manager is configured with a repository containing the Cloudera 4 packages. +This module has been tested using CDH 4.2.1 on Ubuntu Precise 12.04.2 LTS + # Installation: + Clone (or copy) this repository into your puppet modules/cdh4 directory: ```bash git clone git://github.com/wikimedia/cloudera-cdh4-puppet.git modules/cdh4 @@ -28,6 +32,7 @@ # Usage ## For all Hadoop nodes: + ```puppet include cdh4 @@ -51,14 +56,45 @@ If you would like to use MRv1 instead of YARN, set ```use_yarn``` to false. ## For your Hadoop master node: + ```puppet include cdh4::hadoop::master ``` This installs and starts up the NameNode. If using YARN this will install and set up ResourceManager and HistoryServer. If using MRv1, this will install and set up the JobTracker. ### For your Hadoop worker nodes: + ```puppet include cdh4::hadoop::worker ``` This installs and starts up the DataNode. If using YARN, this will install and set up the NodeManager. If using MRv1, this will install and set up the TaskTracker. + +## For all Hive enabled nodes: + +```puppet +class { 'cdh4::hive': + metastore_host = 'hive-metastore-node.domain.org', + zookeeper_hosts = ['zk1.domain.org', 'zk2.domain.org'], + jdbc_password = $secret_password, +} +``` + +## For your Hive master node (hive-server2 and hive-metastore): + +Include the same ```cdh4::hive``` class as indicated above, and then: + +```puppet +class { 'cdh4::hive::master': } +``` + +By default, a Hive metastore backend MySQL database will be used. You must +separately ensure that your $metastore_database (e.g. mysql) package is installed. +If you want to disable automatic setup of your metastore backend +database, set the ```metastore_database``` parameter to undef: + +```puppet +class { 'cdh4::hive::master': + metastore_database = undef, +} +``` diff --git a/manifests/hive.pp b/manifests/hive.pp index 71ca4bf..6156bdf 100644 --- a/manifests/hive.pp +++ b/manifests/hive.pp @@ -1,10 +1,86 @@ # == Class cdh4::hive # # Installs Hive packages (needed for Hive Client). -# Use cdh4::hive::server to install and set up a Hive server. +# Use this in conjunction with cdh4::hive::master to install and set up a +# Hive Server and Hive Metastore. # -class cdh4::hive { +# == Parameters +# $metastore_host- fqdn of the metastore host +# $zookeeper_hosts - Array of zookeeper hostname/IP(:port)s. +# Default: undef (zookeeper lock management +# will not be used). +# +# $jdbc_database - Metastore JDBC database name. +# Default: 'hive_metastore' +# $jdbc_username - Metastore JDBC username. Default: hive +# $jdbc_password - Metastore JDBC password. Default: hive +# $jdbc_host - Metastore JDBC hostname. Default: localhost +# $jdbc_driver - Metastore JDBC driver class name. +# Default: org.apache.derby.jdbc.EmbeddedDriver +# $jdbc_protocol - Metastore JDBC protocol. Default: mysql +# +# $exec_parallel_thread_number - Number of jobs at most can be executed in parallel. +# Set this to 0 to disable parallel execution. +# $optimize_skewjoin - Enable or disable skew join optimization. +# Default: false +# $skewjoin_key - Number of rows where skew join is used. +#- Default: 1 +#
[MediaWiki-commits] [Gerrit] Updating README.md - change (operations...cdh4)
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/71570 Change subject: Updating README.md .. Updating README.md Change-Id: I145b3517b58259ad5cd1d8fd1dfb40eebe076730 --- M README.md 1 file changed, 21 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet/cdh4 refs/changes/70/71570/1 diff --git a/README.md b/README.md index 549c141..a7dc38d 100644 --- a/README.md +++ b/README.md @@ -4,23 +4,26 @@ Cloudera's Distribution 4 (CDH4) for Apache Hadoop. # Description -Installs HDFS, YARN or MR1, Hive, HBase, Pig, Sqoop, Zookeeper, Oozie and +Installs HDFS, YARN or MR1, Hive, Pig, Sqoop, Zookeeper, Oozie and Hue. Note that, in order for this module to work, you will have to ensure that: -* Sun JRE version 6 or greater is installed +* Sun JRE version 6 is installed. * Your package manager is configured with a repository containing the Cloudera 4 packages. + +Note that many of the above mentioned services are not yet implemented in v0.2. +See the v0.1 branch if you'd like to use these now. # Installation: Clone (or copy) this repository into your puppet modules/cdh4 directory: ```bash -git clone git://github.com/wikimedia/cloudera-cdh4-puppet.git modules/cdh4 +git clone git://github.com/wikimedia/puppet-cdh4.git modules/cdh4 ``` Or you could also use a git submodule: ```bash -git submodule add git://github.com/wikimedia/operations-puppet-cdh4.git modules/cdh4 +git submodule add git://github.com/wikimedia/puppet-cdh4.git modules/cdh4 git commit -m 'Adding modules/cdh4 as a git submodule.' git submodule init git submodule update ``` @@ -54,11 +57,23 @@ ```puppet include cdh4::hadoop::master ``` -This installs and starts up the NameNode. If using YARN this will install and set up ResourceManager and HistoryServer. If using MRv1, this will install and set up the JobTracker. +This installs and starts up the NameNode. If using YARN this will install +and set up ResourceManager and HistoryServer. If using MRv1, this will install +and set up the JobTracker. ### For your Hadoop worker nodes: ```puppet include cdh4::hadoop::worker ``` -This installs and starts up the DataNode. If using YARN, this will install and set up the NodeManager. If using MRv1, this will install and set up the TaskTracker. +This installs and starts up the DataNode. If using YARN, this will install +and set up the NodeManager. If using MRv1, this will install and set up the +TaskTracker. + +# Notes: + +## Coming Soon: + +- Hive +- Oozie +- Hue -- To view, visit https://gerrit.wikimedia.org/r/71570 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I145b3517b58259ad5cd1d8fd1dfb40eebe076730 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet/cdh4 Gerrit-Branch: master Gerrit-Owner: Ottomata o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Updating README.md - change (operations...cdh4)
Ottomata has submitted this change and it was merged. Change subject: Updating README.md .. Updating README.md Change-Id: I145b3517b58259ad5cd1d8fd1dfb40eebe076730 --- M README.md 1 file changed, 21 insertions(+), 6 deletions(-) Approvals: Ottomata: Verified; Looks good to me, approved diff --git a/README.md b/README.md index 549c141..a7dc38d 100644 --- a/README.md +++ b/README.md @@ -4,23 +4,26 @@ Cloudera's Distribution 4 (CDH4) for Apache Hadoop. # Description -Installs HDFS, YARN or MR1, Hive, HBase, Pig, Sqoop, Zookeeper, Oozie and +Installs HDFS, YARN or MR1, Hive, Pig, Sqoop, Zookeeper, Oozie and Hue. Note that, in order for this module to work, you will have to ensure that: -* Sun JRE version 6 or greater is installed +* Sun JRE version 6 is installed. * Your package manager is configured with a repository containing the Cloudera 4 packages. + +Note that many of the above mentioned services are not yet implemented in v0.2. +See the v0.1 branch if you'd like to use these now. # Installation: Clone (or copy) this repository into your puppet modules/cdh4 directory: ```bash -git clone git://github.com/wikimedia/cloudera-cdh4-puppet.git modules/cdh4 +git clone git://github.com/wikimedia/puppet-cdh4.git modules/cdh4 ``` Or you could also use a git submodule: ```bash -git submodule add git://github.com/wikimedia/operations-puppet-cdh4.git modules/cdh4 +git submodule add git://github.com/wikimedia/puppet-cdh4.git modules/cdh4 git commit -m 'Adding modules/cdh4 as a git submodule.' git submodule init git submodule update ``` @@ -54,11 +57,23 @@ ```puppet include cdh4::hadoop::master ``` -This installs and starts up the NameNode. If using YARN this will install and set up ResourceManager and HistoryServer. If using MRv1, this will install and set up the JobTracker. +This installs and starts up the NameNode. If using YARN this will install +and set up ResourceManager and HistoryServer. If using MRv1, this will install +and set up the JobTracker. ### For your Hadoop worker nodes: ```puppet include cdh4::hadoop::worker ``` -This installs and starts up the DataNode. If using YARN, this will install and set up the NodeManager. If using MRv1, this will install and set up the TaskTracker. +This installs and starts up the DataNode. If using YARN, this will install +and set up the NodeManager. If using MRv1, this will install and set up the +TaskTracker. + +# Notes: + +## Coming Soon: + +- Hive +- Oozie +- Hue -- To view, visit https://gerrit.wikimedia.org/r/71570 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I145b3517b58259ad5cd1d8fd1dfb40eebe076730 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet/cdh4 Gerrit-Branch: master Gerrit-Owner: Ottomata o...@wikimedia.org Gerrit-Reviewer: Ottomata o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Allow running the AbuseFilter parser tests via phpunit - change (mediawiki...AbuseFilter)
Hoo man has uploaded a new change for review. https://gerrit.wikimedia.org/r/71571 Change subject: Allow running the AbuseFilter parser tests via phpunit .. Allow running the AbuseFilter parser tests via phpunit I've also added myself to the credits file as I'm the only maintainer of this extension for a while now. Change-Id: Id998172ea2abd70b8243de9db1a96cc2cfa47a64 --- M AbuseFilter.hooks.php M AbuseFilter.php R tests/legacyParserTest.php R tests/parserTests/arith.r R tests/parserTests/arith.t R tests/parserTests/arrays.r R tests/parserTests/arrays.t R tests/parserTests/bug25373.r R tests/parserTests/bug25373.t R tests/parserTests/cast.r R tests/parserTests/cast.t R tests/parserTests/ccnorm.r R tests/parserTests/ccnorm.t R tests/parserTests/comment.r R tests/parserTests/comment.t R tests/parserTests/count.r R tests/parserTests/count.t R tests/parserTests/eq.r R tests/parserTests/eq.t R tests/parserTests/float.r R tests/parserTests/float.t R tests/parserTests/ifthen.r R tests/parserTests/ifthen.t R tests/parserTests/in.r R tests/parserTests/in.t R tests/parserTests/lcase.r R tests/parserTests/lcase.t R tests/parserTests/length.r R tests/parserTests/length.t R tests/parserTests/like.r R tests/parserTests/like.t R tests/parserTests/norm.r R tests/parserTests/norm.t R tests/parserTests/numbers.r R tests/parserTests/numbers.t R tests/parserTests/ord.r R tests/parserTests/ord.t R tests/parserTests/prec.r R tests/parserTests/prec.t R tests/parserTests/regex.r R tests/parserTests/regex.t R tests/parserTests/rmdoubles.r R tests/parserTests/rmdoubles.t R tests/parserTests/rmspecials.r R tests/parserTests/rmspecials.t R tests/parserTests/specialratio.r R tests/parserTests/specialratio.t R tests/parserTests/string.r R tests/parserTests/string.t R tests/parserTests/tern.r R tests/parserTests/tern.t R tests/parserTests/ucase.r R tests/parserTests/ucase.t R tests/parserTests/utf8.r R tests/parserTests/utf8.t R tests/parserTests/vars.r R tests/parserTests/vars.t R tests/parserTests/whitespace.r R tests/parserTests/whitespace1.r R tests/parserTests/whitespace1.t R tests/parserTests/wptest1.r R tests/parserTests/wptest1.t R tests/parserTests/wptest2.r R tests/parserTests/wptest2.t R tests/parserTests/wptest3.r R tests/parserTests/wptest3.t A tests/phpunit/parserTest.php 67 files changed, 97 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter refs/changes/71/71571/1 diff --git a/AbuseFilter.hooks.php b/AbuseFilter.hooks.php index 96b421c..31e7871 100644 --- a/AbuseFilter.hooks.php +++ b/AbuseFilter.hooks.php @@ -560,4 +560,23 @@ } return true; } + + /** +* Hook to add PHPUnit test cases. +* @see https://www.mediawiki.org/wiki/Manual:Hooks/UnitTestsList +* +* @param array $files +* +* @return bool +*/ + public static function onUnitTestsList( array $files ) { + $testDir = __DIR__ . '/tests/phpunit'; + + $files = array_merge( + $files, + glob( $testDir . '/*Test.php' ) + ); + + return true; + } } diff --git a/AbuseFilter.php b/AbuseFilter.php index 67ceddc..aa79051 100644 --- a/AbuseFilter.php +++ b/AbuseFilter.php @@ -18,7 +18,7 @@ $wgExtensionCredits['antispam'][] = array( 'path' = __FILE__, 'name' = 'Abuse Filter', - 'author' = array( 'Andrew Garrett', 'River Tarnell', 'Victor Vasiliev' ), + 'author' = array( 'Andrew Garrett', 'River Tarnell', 'Victor Vasiliev', 'Marius Hoch' ), 'descriptionmsg' = 'abusefilter-desc', 'url' = 'https://www.mediawiki.org/wiki/Extension:AbuseFilter', ); @@ -87,6 +87,7 @@ $wgHooks['UploadVerifyFile'][] = 'AbuseFilterHooks::onUploadVerifyFile'; $wgHooks['MakeGlobalVariablesScript'][] = 'AbuseFilterHooks::onMakeGlobalVariablesScript'; $wgHooks['ArticleSaveComplete'][] = 'AbuseFilterHooks::onArticleSaveComplete'; +$wgHooks['UnitTestsList'][] = 'AbuseFilterHooks::onUnitTestsList'; $wgAvailableRights[] = 'abusefilter-modify'; $wgAvailableRights[] = 'abusefilter-log-detail'; diff --git a/phpTest.php b/tests/legacyParserTest.php similarity index 86% rename from phpTest.php rename to tests/legacyParserTest.php index 97ae897..36efd08 100644 --- a/phpTest.php +++ b/tests/legacyParserTest.php @@ -5,11 +5,11 @@ require_once ( getenv( 'MW_INSTALL_PATH' ) !== false ? getenv( 'MW_INSTALL_PATH' ) . /maintenance/commandLine.inc - : __DIR__ . '/../../maintenance/commandLine.inc' ); + : __DIR__ . '/../../../maintenance/commandLine.inc' ); $tester = new AbuseFilterParser; -$test_path = __DIR__ . /tests; +$test_path = __DIR__ . /parserTests; $tests = glob( $test_path . /*.t ); $check = 0; @@ -19,7 +19,7 @@ $result = substr( $test, 0, - 2 ) . .r; $rule = trim(
[MediaWiki-commits] [Gerrit] Make AbuseFilter work without AntiSpoof - change (mediawiki...AbuseFilter)
Hoo man has uploaded a new change for review. https://gerrit.wikimedia.org/r/71572 Change subject: Make AbuseFilter work without AntiSpoof .. Make AbuseFilter work without AntiSpoof This dependency isn't really needed in many cases while it can cause troubles if not fulfilled. Change-Id: I9990e99c4d3d49b5bc400bbc4a0ec02142d6f055 --- M AbuseFilter.parser.php 1 file changed, 7 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter refs/changes/72/71572/1 diff --git a/AbuseFilter.parser.php b/AbuseFilter.parser.php index 601c8bd..e3786e6 100644 --- a/AbuseFilter.parser.php +++ b/AbuseFilter.parser.php @@ -1931,8 +1931,13 @@ if ( is_null( $equivset ) || is_null( $replacementArray ) ) { global $IP; - require_once( $IP/extensions/AntiSpoof/equivset.php ); - $replacementArray = new ReplacementArray( $equivset ); + if ( is_readable( $IP/extensions/AntiSpoof/equivset.php ) ) { + require_once( $IP/extensions/AntiSpoof/equivset.php ); + $replacementArray = new ReplacementArray( $equivset ); + } else { + // AntiSpoof isn't available, so there's nothing we can do + return $s; + } } return $replacementArray-replace( $s ); -- To view, visit https://gerrit.wikimedia.org/r/71572 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9990e99c4d3d49b5bc400bbc4a0ec02142d6f055 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AbuseFilter Gerrit-Branch: master Gerrit-Owner: Hoo man h...@online.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Clear shallowFallbacks in LocalisationCache::unload - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Clear shallowFallbacks in LocalisationCache::unload .. Clear shallowFallbacks in LocalisationCache::unload When a language code is unloaded, it also needs to clear the shallowFallbacks entry. Otherwise the next time that language is used it will incorrectly think that the other setup done by initShallowFallbacks is still set up, leading to warnings. Change-Id: Idf6a78f56a3bb864cc921427ac82972594610047 --- M includes/cache/LocalisationCache.php 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Tim Starling: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/cache/LocalisationCache.php b/includes/cache/LocalisationCache.php index bdc2d78..1bfd17b 100644 --- a/includes/cache/LocalisationCache.php +++ b/includes/cache/LocalisationCache.php @@ -928,6 +928,7 @@ unset( $this-loadedItems[$code] ); unset( $this-loadedSubitems[$code] ); unset( $this-initialisedLangs[$code] ); + unset( $this-shallowFallbacks[$code] ); foreach ( $this-shallowFallbacks as $shallowCode = $fbCode ) { if ( $fbCode === $code ) { -- To view, visit https://gerrit.wikimedia.org/r/71520 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idf6a78f56a3bb864cc921427ac82972594610047 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Anomie bjor...@wikimedia.org Gerrit-Reviewer: Ori.livneh o...@wikimedia.org Gerrit-Reviewer: Tim Starling tstarl...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use markdown in readme file and link to TravisCI and Jenkins... - change (mediawiki...SemanticMediaWiki)
jenkins-bot has submitted this change and it was merged. Change subject: Use markdown in readme file and link to TravisCI and Jenkins build status .. Use markdown in readme file and link to TravisCI and Jenkins build status Change-Id: I9d000206c1f82e41f34ffab0e90de54b0da0bd71 --- R README.md 1 file changed, 19 insertions(+), 7 deletions(-) Approvals: Mwjames: Looks good to me, approved jenkins-bot: Verified diff --git a/README b/README.md similarity index 84% rename from README rename to README.md index 4c925c4..3801832 100644 --- a/README +++ b/README.md @@ -1,12 +1,20 @@ -== About == +About Semantic MediaWiki + Semantic MediaWiki is a project for extending MediaWiki with semantic functions that enable machine-reading of wiki-content. For details and -further links, see http://semantic-mediawiki.org +further links, see https://semantic-mediawiki.org Notes on installing Semantic MediaWiki are found in the file INSTALL. -== Contact == +Build status + + +* TravisCI: [![Build Status](https://secure.travis-ci.org/wikimedia/mediawiki-extensions-SemanticMediaWiki.png?branch=master)](http://travis-ci.org/wikimedia/mediawiki-extensions-SemanticMediaWiki) +* [WMF Jenkins](https://integration.wikimedia.org/ci/job/mwext-SemanticMediaWiki-testextensions-master/lastBuild/) + +Contact +--- If you have remarks, questions, or suggestions, please send them to semediawiki-us...@lists.sourceforge.net. You can subscribe to this @@ -23,7 +31,8 @@ mar...@semantic-mediawiki.org. Do not contact Markus directly if you just need free technical support -- that is what the user list is for. -== Developers == +Developers +-- Development is coordinated by Jeroen De Dauw and Markus Krötzsch. @@ -34,7 +43,8 @@ Halo project funded by Vulcan Inc., where development is coordinated by ontoprise GmbH, Karlsruhe, Germany. -== Contributors == +Contributors + * Denny Vrandecic is one of the original core developers. @@ -57,14 +67,16 @@ : were designed and realised by Markus Krötzsch. A previous version of : the SMW logo has been realised by Rozana Vrandecic. -== Translations == +Translations + Translations to various languages are provided and maintained by many people. In general, main contributors can be found in the message files. Special thanks are due to Siebrand Mazeland and the translatewiki.net project for the excellent translation service they provide. -== Credits to other projects == +Credits to other projects +- * Most icons used by Semantic MediaWiki are derived from the Crystal Clear : icon theme for KDE, which was created by Everaldo (everaldo.com). -- To view, visit https://gerrit.wikimedia.org/r/69979 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9d000206c1f82e41f34ffab0e90de54b0da0bd71 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/SemanticMediaWiki Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Foxtrott s7ep...@gmail.com Gerrit-Reviewer: Markus Kroetzsch mar...@semantic-mediawiki.org Gerrit-Reviewer: Mwjames jamesin.hongkon...@gmail.com Gerrit-Reviewer: Nischayn22 nischay...@gmail.com Gerrit-Reviewer: Yaron Koren yaro...@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] SMWQueryPage::getSearchForm() add search form - change (mediawiki...SemanticMediaWiki)
Mwjames has uploaded a new change for review. https://gerrit.wikimedia.org/r/71573 Change subject: SMWQueryPage::getSearchForm() add search form .. SMWQueryPage::getSearchForm() add search form * Add search form similar to that found in Special:Categories used in [1] * Add QueryPageTest [1] https://gerrit.wikimedia.org/r/#/c/70041/ Change-Id: Ic008776070bae9e4d2c16223545ae4256546308f --- M includes/SMW_QueryPage.php M languages/SMW_Messages.php A tests/phpunit/includes/QueryPageTest.php 3 files changed, 166 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticMediaWiki refs/changes/73/71573/1 diff --git a/includes/SMW_QueryPage.php b/includes/SMW_QueryPage.php index dbc8d09..81ca50c 100644 --- a/includes/SMW_QueryPage.php +++ b/includes/SMW_QueryPage.php @@ -41,6 +41,23 @@ } /** +* @see QueryPage::linkParameters +* +* @since 1.9 +* +* @return array +*/ + public function linkParameters() { + $parameters = array(); + + if ( $this-getRequest()-getCheck( 'property' ) ) { + $parameters['property'] = $this-getRequest()-getVal( 'property' ); + } + + return $parameters; + } + + /** * Returns a MessageFormatter object * * @since 1.9 @@ -55,6 +72,23 @@ } /** +* Generates a search form +* +* @since 1.9 +* +* @param string $property +* +* @return string +*/ + public function getSearchForm( $property = '' ) { + return Xml::tags( 'form', array( 'method' = 'get', 'action' = htmlspecialchars( $GLOBALS['wgScript'] ) ), + Html::hidden( 'title', $this-getContext()-getTitle()-getPrefixedText() ) . + Xml::fieldset( $this-msg( 'properties' )-text(), + Xml::inputLabel( $this-msg( 'smw-sp-property-searchform' )-text(), 'property', 'property', 20, $property ) . ' ' . + Xml::submitButton( $this-msg( 'allpagessubmit' )-text() ) ) ); + } + + /** * This is the actual workhorse. It does everything needed to make a * real, honest-to-gosh query page. * Alas, we need to overwrite the whole beast since we do not assume @@ -62,15 +96,21 @@ * * @param $offset database query offset * @param $limit database query limit +* @param $property database string query */ - function doQuery( $offset = false, $limit = false ) { - $out = $this-getOutput(); - $sk = $this-getSkin(); + function doQuery( $offset = false, $limit = false, $property = false ) { + $out = $this-getOutput(); + $sk = $this-getSkin(); $options = new SMWRequestOptions(); $options-limit = $limit; $options-offset = $offset; $options-sort = true; + + if ( $property ) { + $options-addStringCondition( str_replace( ' ', '_', $property ), SMWStringCondition::STRCOND_MID ); + } + $res = $this-getResults( $options ); $num = count( $res ); diff --git a/languages/SMW_Messages.php b/languages/SMW_Messages.php index 8f6821b..043d667 100644 --- a/languages/SMW_Messages.php +++ b/languages/SMW_Messages.php @@ -189,6 +189,8 @@ 'smw_propertyhardlyused' = 'This property is hardly used within the wiki!', 'smw-property-name-invalid' = 'Property $1 can not be used (invalid property name).', + 'smw-sp-property-searchform' = 'Display properties that contain:', + // Messages for Concepts Special 'concepts' = 'Concepts', 'smw-sp-concept-docu' = 'A [https://www.semantic-mediawiki.org/wiki/Help:Concepts concept] can be viewed as dynamic category, i.e. as a collection of pages that are not created manually, but that are computed by Semantic MediaWiki from a description of a given query.', @@ -1016,6 +1018,7 @@ * $1 - Name of the invoked predefined property', 'smw-pa-property-predefined_ask' = 'Describes a predefined property.', 'smw-pa-property-predefined_asksi' = 'Describes a predefined property.', + 'smw-sp-property-searchform' = 'Introductory text for the property search form', ); /** Afrikaans (Afrikaans) diff --git a/tests/phpunit/includes/QueryPageTest.php b/tests/phpunit/includes/QueryPageTest.php new file mode 100644 index 000..55347df --- /dev/null +++ b/tests/phpunit/includes/QueryPageTest.php @@ -0,0 +1,120 @@ +?php + +namespace SMW\Test; + +use RequestContext; +use FauxRequest; + +/** + * Tests for the QueryPage class + * + * This program
[MediaWiki-commits] [Gerrit] SMWQueryPage::getSearchForm() add search form - change (mediawiki...SemanticMediaWiki)
jenkins-bot has submitted this change and it was merged. Change subject: SMWQueryPage::getSearchForm() add search form .. SMWQueryPage::getSearchForm() add search form * Add search form similar to that found in Special:Categories used in [1] * Add QueryPageTest [1] https://gerrit.wikimedia.org/r/#/c/70041/ Change-Id: Ic008776070bae9e4d2c16223545ae4256546308f --- M includes/SMW_QueryPage.php M languages/SMW_Messages.php A tests/phpunit/includes/QueryPageTest.php 3 files changed, 166 insertions(+), 3 deletions(-) Approvals: Mwjames: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/SMW_QueryPage.php b/includes/SMW_QueryPage.php index dbc8d09..81ca50c 100644 --- a/includes/SMW_QueryPage.php +++ b/includes/SMW_QueryPage.php @@ -41,6 +41,23 @@ } /** +* @see QueryPage::linkParameters +* +* @since 1.9 +* +* @return array +*/ + public function linkParameters() { + $parameters = array(); + + if ( $this-getRequest()-getCheck( 'property' ) ) { + $parameters['property'] = $this-getRequest()-getVal( 'property' ); + } + + return $parameters; + } + + /** * Returns a MessageFormatter object * * @since 1.9 @@ -55,6 +72,23 @@ } /** +* Generates a search form +* +* @since 1.9 +* +* @param string $property +* +* @return string +*/ + public function getSearchForm( $property = '' ) { + return Xml::tags( 'form', array( 'method' = 'get', 'action' = htmlspecialchars( $GLOBALS['wgScript'] ) ), + Html::hidden( 'title', $this-getContext()-getTitle()-getPrefixedText() ) . + Xml::fieldset( $this-msg( 'properties' )-text(), + Xml::inputLabel( $this-msg( 'smw-sp-property-searchform' )-text(), 'property', 'property', 20, $property ) . ' ' . + Xml::submitButton( $this-msg( 'allpagessubmit' )-text() ) ) ); + } + + /** * This is the actual workhorse. It does everything needed to make a * real, honest-to-gosh query page. * Alas, we need to overwrite the whole beast since we do not assume @@ -62,15 +96,21 @@ * * @param $offset database query offset * @param $limit database query limit +* @param $property database string query */ - function doQuery( $offset = false, $limit = false ) { - $out = $this-getOutput(); - $sk = $this-getSkin(); + function doQuery( $offset = false, $limit = false, $property = false ) { + $out = $this-getOutput(); + $sk = $this-getSkin(); $options = new SMWRequestOptions(); $options-limit = $limit; $options-offset = $offset; $options-sort = true; + + if ( $property ) { + $options-addStringCondition( str_replace( ' ', '_', $property ), SMWStringCondition::STRCOND_MID ); + } + $res = $this-getResults( $options ); $num = count( $res ); diff --git a/languages/SMW_Messages.php b/languages/SMW_Messages.php index 8f6821b..043d667 100644 --- a/languages/SMW_Messages.php +++ b/languages/SMW_Messages.php @@ -189,6 +189,8 @@ 'smw_propertyhardlyused' = 'This property is hardly used within the wiki!', 'smw-property-name-invalid' = 'Property $1 can not be used (invalid property name).', + 'smw-sp-property-searchform' = 'Display properties that contain:', + // Messages for Concepts Special 'concepts' = 'Concepts', 'smw-sp-concept-docu' = 'A [https://www.semantic-mediawiki.org/wiki/Help:Concepts concept] can be viewed as dynamic category, i.e. as a collection of pages that are not created manually, but that are computed by Semantic MediaWiki from a description of a given query.', @@ -1016,6 +1018,7 @@ * $1 - Name of the invoked predefined property', 'smw-pa-property-predefined_ask' = 'Describes a predefined property.', 'smw-pa-property-predefined_asksi' = 'Describes a predefined property.', + 'smw-sp-property-searchform' = 'Introductory text for the property search form', ); /** Afrikaans (Afrikaans) diff --git a/tests/phpunit/includes/QueryPageTest.php b/tests/phpunit/includes/QueryPageTest.php new file mode 100644 index 000..55347df --- /dev/null +++ b/tests/phpunit/includes/QueryPageTest.php @@ -0,0 +1,120 @@ +?php + +namespace SMW\Test; + +use RequestContext; +use FauxRequest; + +/** + * Tests for the QueryPage class + * + * This program is free software; you can redistribute it and/or modify + * it
[MediaWiki-commits] [Gerrit] let systemuser l10nupdate have bash as shell so it can run l... - change (operations/puppet)
Tim Starling has submitted this change and it was merged. Change subject: let systemuser l10nupdate have bash as shell so it can run l10nupdate scripts via dsh on new mw* hosts. .. let systemuser l10nupdate have bash as shell so it can run l10nupdate scripts via dsh on new mw* hosts. apergos sudo -u l10nupdate ... mutante if i'd give it a bash, it works anomie apergos, mutante: Yeah, it used to work, until relatively recently. anomie mutante, apergos: So, since the /bin/false shell is the problem, can we get an appropriate shell set? Or is there some other way for sync-l10nupdate-1 to work? Bug: 50433 Change-Id: I55cbb6177fd30bf21bfa1ebc37f88a9eeca8c98c --- M modules/mediawiki/manifests/users/l10nupdate.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Tim Starling: Verified; Looks good to me, approved diff --git a/modules/mediawiki/manifests/users/l10nupdate.pp b/modules/mediawiki/manifests/users/l10nupdate.pp index 0861885..f724369 100644 --- a/modules/mediawiki/manifests/users/l10nupdate.pp +++ b/modules/mediawiki/manifests/users/l10nupdate.pp @@ -5,7 +5,7 @@ require groups::l10nupdate - systemuser { 'l10nupdate': name = 'l10nupdate', home = '/home/l10nupdate', default_group = 10002 } + systemuser { 'l10nupdate': name = 'l10nupdate', home = '/home/l10nupdate', default_group = 10002, shell = '/bin/bash' } file { /home/l10nupdate/.ssh: -- To view, visit https://gerrit.wikimedia.org/r/71525 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I55cbb6177fd30bf21bfa1ebc37f88a9eeca8c98c Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn dz...@wikimedia.org Gerrit-Reviewer: Anomie bjor...@wikimedia.org Gerrit-Reviewer: ArielGlenn ar...@wikimedia.org Gerrit-Reviewer: Catrope roan.katt...@gmail.com Gerrit-Reviewer: Tim Starling tstarl...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] \SMW\Store\Collector add test - change (mediawiki...SemanticMediaWiki)
Mwjames has uploaded a new change for review. https://gerrit.wikimedia.org/r/71574 Change subject: \SMW\Store\Collector add test .. \SMW\Store\Collector add test Change-Id: Ic73f05c5771e1eed19583f3eae8a440ffcaaefc6 --- M includes/ArrayAccessor.php M includes/Setup.php M includes/storage/Collector.php A tests/phpunit/includes/storage/CollectorTest.php M tests/phpunit/includes/storage/StoreTest.php 5 files changed, 152 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticMediaWiki refs/changes/74/71574/1 diff --git a/includes/ArrayAccessor.php b/includes/ArrayAccessor.php index 69e5802..a354d62 100644 --- a/includes/ArrayAccessor.php +++ b/includes/ArrayAccessor.php @@ -68,12 +68,25 @@ } +interface Arrayable { + + /** +* Returns an object as array +* +* @since 1.9 +* +* @return array +*/ + public function toArray(); + +} + /** * This class enables access to an arbitrary array * * @ingroup Accessor */ -class ArrayAccessor extends ArrayObject implements Accessor { +class ArrayAccessor extends ArrayObject implements Accessor, Arrayable { /** * Returns if a specified key is set or not diff --git a/includes/Setup.php b/includes/Setup.php index 66c873b..d562df5 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -152,6 +152,7 @@ $wgAutoloadClasses['SMW\Profiler'] = $incDir . 'Profiler.php'; $wgAutoloadClasses['SMW\Accessor'] = $incDir . 'ArrayAccessor.php'; + $wgAutoloadClasses['SMW\Arrayable'] = $incDir . 'ArrayAccessor.php'; $wgAutoloadClasses['SMW\ArrayAccessor'] = $incDir . 'ArrayAccessor.php'; $wgAutoloadClasses['SMW\CacheHandler'] = $incDir . '/handlers/CacheHandler.php'; diff --git a/includes/storage/Collector.php b/includes/storage/Collector.php index f8eb439..0401c36 100644 --- a/includes/storage/Collector.php +++ b/includes/storage/Collector.php @@ -6,6 +6,7 @@ use SMW\DIProperty; use SMW\Settings; +use SMWRequestOptions; use InvalidArgumentException; use MWTimestamp; @@ -93,7 +94,7 @@ * * @return Collector */ - public function setRequestOptions( $requestOptions ) { + public function setRequestOptions( SMWRequestOptions $requestOptions ) { $this-requestOptions = $requestOptions; return $this; } diff --git a/tests/phpunit/includes/storage/CollectorTest.php b/tests/phpunit/includes/storage/CollectorTest.php new file mode 100644 index 000..9700d96 --- /dev/null +++ b/tests/phpunit/includes/storage/CollectorTest.php @@ -0,0 +1,132 @@ +?php + +namespace SMW\Test; + +use SMW\ArrayAccessor; + +/** + * Tests for the Collector class + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/gpl.html + * + * @since 1.9 + * + * @file + * + * @license GNU GPL v2+ + * @author mwjames + */ + +/** + * @covers \SMW\Store\Collector + * + * @ingroup Test + * + * @group SMW + * @group SMWExtension + */ +class CollectorTest extends SemanticMediaWikiTestCase { + + /** +* Returns the name of the class to be tested +* +* @return string|false +*/ + public function getClass() { + return '\SMW\Store\Collector'; + } + + /** +* Helper method that returns a Collector object +* +* @since 1.9 +* +* @param $result +* +* @return Collector +*/ + private function getInstance( $doCollect = array(), $cacheAccessor = array() ) { + + $collector = $this-getMockBuilder( $this-getClass() ) + -setMethods( array( 'cacheAccessor', 'doCollect' ) ) + -getMock(); + + $collector-expects( $this-any() ) + -method( 'doCollect' ) + -will( $this-returnValue( $doCollect ) ); + + $collector-expects( $this-any() ) + -method( 'cacheAccessor' ) + -will( $this-returnValue( new ArrayAccessor( $cacheAccessor ) ) ); + + return
[MediaWiki-commits] [Gerrit] \SMW\Store\Collector add test - change (mediawiki...SemanticMediaWiki)
jenkins-bot has submitted this change and it was merged. Change subject: \SMW\Store\Collector add test .. \SMW\Store\Collector add test Change-Id: Ic73f05c5771e1eed19583f3eae8a440ffcaaefc6 --- M includes/ArrayAccessor.php M includes/Setup.php M includes/storage/Collector.php A tests/phpunit/includes/storage/CollectorTest.php M tests/phpunit/includes/storage/StoreTest.php 5 files changed, 152 insertions(+), 4 deletions(-) Approvals: Mwjames: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/ArrayAccessor.php b/includes/ArrayAccessor.php index 69e5802..a354d62 100644 --- a/includes/ArrayAccessor.php +++ b/includes/ArrayAccessor.php @@ -68,12 +68,25 @@ } +interface Arrayable { + + /** +* Returns an object as array +* +* @since 1.9 +* +* @return array +*/ + public function toArray(); + +} + /** * This class enables access to an arbitrary array * * @ingroup Accessor */ -class ArrayAccessor extends ArrayObject implements Accessor { +class ArrayAccessor extends ArrayObject implements Accessor, Arrayable { /** * Returns if a specified key is set or not diff --git a/includes/Setup.php b/includes/Setup.php index 66c873b..d562df5 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -152,6 +152,7 @@ $wgAutoloadClasses['SMW\Profiler'] = $incDir . 'Profiler.php'; $wgAutoloadClasses['SMW\Accessor'] = $incDir . 'ArrayAccessor.php'; + $wgAutoloadClasses['SMW\Arrayable'] = $incDir . 'ArrayAccessor.php'; $wgAutoloadClasses['SMW\ArrayAccessor'] = $incDir . 'ArrayAccessor.php'; $wgAutoloadClasses['SMW\CacheHandler'] = $incDir . '/handlers/CacheHandler.php'; diff --git a/includes/storage/Collector.php b/includes/storage/Collector.php index f8eb439..0401c36 100644 --- a/includes/storage/Collector.php +++ b/includes/storage/Collector.php @@ -6,6 +6,7 @@ use SMW\DIProperty; use SMW\Settings; +use SMWRequestOptions; use InvalidArgumentException; use MWTimestamp; @@ -93,7 +94,7 @@ * * @return Collector */ - public function setRequestOptions( $requestOptions ) { + public function setRequestOptions( SMWRequestOptions $requestOptions ) { $this-requestOptions = $requestOptions; return $this; } diff --git a/tests/phpunit/includes/storage/CollectorTest.php b/tests/phpunit/includes/storage/CollectorTest.php new file mode 100644 index 000..9700d96 --- /dev/null +++ b/tests/phpunit/includes/storage/CollectorTest.php @@ -0,0 +1,132 @@ +?php + +namespace SMW\Test; + +use SMW\ArrayAccessor; + +/** + * Tests for the Collector class + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/gpl.html + * + * @since 1.9 + * + * @file + * + * @license GNU GPL v2+ + * @author mwjames + */ + +/** + * @covers \SMW\Store\Collector + * + * @ingroup Test + * + * @group SMW + * @group SMWExtension + */ +class CollectorTest extends SemanticMediaWikiTestCase { + + /** +* Returns the name of the class to be tested +* +* @return string|false +*/ + public function getClass() { + return '\SMW\Store\Collector'; + } + + /** +* Helper method that returns a Collector object +* +* @since 1.9 +* +* @param $result +* +* @return Collector +*/ + private function getInstance( $doCollect = array(), $cacheAccessor = array() ) { + + $collector = $this-getMockBuilder( $this-getClass() ) + -setMethods( array( 'cacheAccessor', 'doCollect' ) ) + -getMock(); + + $collector-expects( $this-any() ) + -method( 'doCollect' ) + -will( $this-returnValue( $doCollect ) ); + + $collector-expects( $this-any() ) + -method( 'cacheAccessor' ) + -will( $this-returnValue( new ArrayAccessor( $cacheAccessor ) ) ); + + return $collector; + } + + /** +* @test
[MediaWiki-commits] [Gerrit] postEdit module needs to run before openTask - change (mediawiki...GettingStarted)
Spage has uploaded a new change for review. https://gerrit.wikimedia.org/r/71575 Change subject: postEdit module needs to run before openTask .. postEdit module needs to run before openTask The openTask module didn't depend on postEdit as taskToolbar does; I think that's why sometimes it logs page-impression instead of page-save-success. Bug: 50204 Change-Id: I55b6a70d9318fef104e383e7aba6931bbfbf840b --- M GettingStarted.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GettingStarted refs/changes/75/71575/1 diff --git a/GettingStarted.php b/GettingStarted.php index 8f5bef6..bf6d4e1 100644 --- a/GettingStarted.php +++ b/GettingStarted.php @@ -163,6 +163,7 @@ $wgResourceModules[ 'ext.gettingstarted.openTask' ] = array( 'scripts' = 'ext.gettingstarted.openTask.js', 'dependencies' = array( + 'mediawiki.action.view.postEdit', 'mediawiki.util', 'ext.gettingstarted.logging', ), -- To view, visit https://gerrit.wikimedia.org/r/71575 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I55b6a70d9318fef104e383e7aba6931bbfbf840b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GettingStarted Gerrit-Branch: master Gerrit-Owner: Spage sp...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add while loops (version 0.5.0) - change (mediawiki...Foxway)
jenkins-bot has submitted this change and it was merged. Change subject: Add while loops (version 0.5.0) .. Add while loops (version 0.5.0) * Add Parser Function Foxway ( {{#foxway: echo | 'hello' }} ) * Add variable $wgFoxway_max_execution_time * Add variable $wgFoxway_max_execution_time_for_scope * Add Hook 'ParserLimitReport' * Add Array function key_exists (Alias of array_key_exists) * Fix not enabled by default function strncasecmp() * Fix boolean AND OR operators Change-Id: I426f3b2048205a920fd5e11596b09b4cc640f240 --- M Foxway.body.php M Foxway.i18n.php M Foxway.php M Settings.php M includes/Debug.php M includes/Interpreter.php M includes/Runtime.php M includes/RuntimeDebug.php M includes/functions/FArray.php M resources/ext.foxway.debug.css A resources/ext.foxway.debugloops.js M tests/phpunit/includes/InterpreterTest.php 12 files changed, 559 insertions(+), 66 deletions(-) Approvals: Pastakhov: Looks good to me, approved jenkins-bot: Verified diff --git a/Foxway.body.php b/Foxway.body.php index f707185..5bb13a9 100644 --- a/Foxway.body.php +++ b/Foxway.body.php @@ -9,16 +9,62 @@ */ class Foxway { + static $DebugLoops = false; + static $time = false; + static $startTime = false; + static $frames=array(); + /** +* +* @param Parser $parser +* @param PPFrame $frame +* @param array $args +*/ + public static function renderFunction( $parser, $frame, $args ) { + self::$startTime = microtime(true); + + $is_banned = self::isBanned($frame); + if( $is_banned ) { + return $is_banned; + } + + $command = array_shift($args); + if( count($args) 0 ) { + foreach ($args as $value) { + $value = $frame-expand( $value ); + } + $command = echo $command ( . implode(',', $args) . ');'; + } + //MWDebug::log($command); + + $result = Foxway\Interpreter::run( + $command, + array($frame-getTitle()-getPrefixedText()), + self::getScope($frame) + ); + + foreach ($result as $value) { + if( $value instanceof Foxway\iRawOutput ) { + $value = '(object)'; + } + } + $return = implode($result); + + self::$time += microtime(true) - self::$startTime; + return \UtfNormal::cleanUp($return); + } + public static function render($input, array $args, Parser $parser, PPFrame $frame) { - global $wgNamespacesWithFoxway; - if( $wgNamespacesWithFoxway !== true empty($wgNamespacesWithFoxway[$frame-getTitle()-getNamespace()]) ) { - return Html::element( 'span', array('class'='error'), wfMessage('foxway-disabled-for-namespace', $frame-getTitle()-getNsText())-escaped() ); + self::$startTime = microtime(true); + + $is_banned = self::isBanned($frame); + if( $is_banned ) { + return $is_banned; } $is_debug = isset($args['debug']); - $return = ''; + $return = false; $result = Foxway\Interpreter::run( $input, @@ -27,18 +73,32 @@ $is_debug ); - foreach ($result as $value) { - if( $value instanceof Foxway\iRawOutput ) { - $value = (string)$value; - } - } - if( $is_debug ) { $parser-getOutput()-addModules('ext.Foxway.Debug'); + if( self::$DebugLoops ) { + $parser-getOutput()-addModules('ext.Foxway.DebugLoops'); + } $return .= self::insertNoWiki( $parser, array_shift($result) ) . \n; } - return $return . self::insertGeneral( $parser, $parser-recursiveTagParse(implode($result),$frame) ); + if( count($result) 0 ) { + //$return .= Sanitizer::removeHTMLtags(implode($result)); + $return .= self::insertGeneral( $parser, $parser-recursiveTagParse(implode($result),$frame) ); + } + + self::$time += microtime(true) - self::$startTime; + return \UtfNormal::cleanUp($return); + } + + public static function isBanned(PPFrame $frame) { + global $wgNamespacesWithFoxway, $wgFoxway_max_execution_time; + if(
[MediaWiki-commits] [Gerrit] moved most SpecialPage from app to setup - change (mediawiki...WikiLexicalData)
Hiong3-eng5 has uploaded a new change for review. https://gerrit.wikimedia.org/r/71576 Change subject: moved most SpecialPage from app to setup .. moved most SpecialPage from app to setup also changed two wg to wld and built some special page credits Change-Id: I9e26aea619db73096f50066ac49c08f2c9abeea3 --- M App.php M OmegaWiki/Wikidata.php M includes/setup/OWSpecials.php 3 files changed, 108 insertions(+), 55 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiLexicalData refs/changes/76/71576/1 diff --git a/App.php b/App.php index 3708fe4..3cebf7e 100644 --- a/App.php +++ b/App.php @@ -73,15 +73,7 @@ $wgAutoloadClasses['NeedsTranslationTo'] = $dir . 'OmegaWiki/NeedsTranslationTo.php'; $wgAutoloadClasses['Search'] = $dir . 'OmegaWiki/Search.php'; -$wgAutoloadClasses['SpecialSuggest'] = $dir . 'OmegaWiki/SpecialSuggest.php'; -$wgAutoloadClasses['SpecialSelect'] = $dir . 'OmegaWiki/SpecialSelect.php'; -// $wgAutoloadClasses['SpecialTransaction'] = $dir . 'OmegaWiki/SpecialTransaction.php'; -$wgAutoloadClasses['SpecialNeedsTranslation'] = $dir . 'OmegaWiki/SpecialNeedsTranslation.php'; -$wgAutoloadClasses['SpecialImportLangNames'] = $dir . 'OmegaWiki/SpecialImportLangNames.php'; -$wgAutoloadClasses['SpecialAddCollection'] = $dir . 'OmegaWiki/SpecialAddCollection.php'; -$wgAutoloadClasses['SpecialConceptMapping'] = $dir . 'OmegaWiki/SpecialConceptMapping.php'; -$wgAutoloadClasses['SpecialCopy'] = $dir . 'OmegaWiki/SpecialCopy.php'; - +// Special Pages require_once( $wgWldSetupScriptPath . OWSpecials.php ); # FIXME: These should be modified to make Wikidata more reusable. @@ -103,7 +95,7 @@ $wgGroupPermissions['bureaucrat']['addcollection'] = true; $wgGroupPermissions['bureaucrat']['editClassAttributes'] = true; -// Wikidata Configuration. +// WikiLexicalData Configuration. # Array of namespace ids and the handler classes they use. $wdHandlerClasses = array(); @@ -138,23 +130,13 @@ $wdCopyAltDefinitions = false; $wdCopyDryRunOnly = false; -# FIXME: Should be renamed to prefix with wd rather than wg. -$wgShowClassicPageTitles = false; -$wgExpressionPageTitlePrefix = 'Multiple meanings'; +$wldShowClassicPageTitles = false; +$wldExpressionPageTitlePrefix = 'Multiple meanings'; // NOTE: unused # The site prefix allows us to have multiple sets of customized # messages (for different, typically site-specific UIs) # in a single database. if ( !isset( $wdSiteContext ) ) $wdSiteContext = uw; - -$wgSpecialPages['Suggest'] = 'SpecialSuggest'; -$wgSpecialPages['Select'] = 'SpecialSelect'; -// $wgSpecialPages['Transaction'] = 'SpecialTransaction'; -$wgSpecialPages['NeedsTranslation'] = 'SpecialNeedsTranslation'; -$wgSpecialPages['ImportLangNames'] = 'SpecialImportLangNames'; -$wgSpecialPages['AddCollection'] = 'SpecialAddCollection'; -$wgSpecialPages['ConceptMapping'] = 'SpecialConceptMapping'; -$wgSpecialPages['Copy'] = 'SpecialCopy'; # ## Hooks diff --git a/OmegaWiki/Wikidata.php b/OmegaWiki/Wikidata.php index dc974c9..9e8892f 100644 --- a/OmegaWiki/Wikidata.php +++ b/OmegaWiki/Wikidata.php @@ -13,7 +13,7 @@ protected $transaction; protected $queryTransactionInformation; protected $showCommunityContribution; - + // The following member variables control some application specific preferences protected $showClassicPageTitles = true;// Show classic page titles instead of prettier page titles @@ -24,12 +24,12 @@ protected $showDataSetPanel = false; public function __construct( $title ) { - global $wgShowClassicPageTitles, $wgPropertyToColumnFilters; + global $wldShowClassicPageTitles, $wgPropertyToColumnFilters; $this-title = $title; - if ( isset( $wgShowClassicPageTitles ) ) { - $this-showClassicPageTitles = $wgShowClassicPageTitles; + if ( isset( $wldShowClassicPageTitles ) ) { + $this-showClassicPageTitles = $wldShowClassicPageTitles; } if ( isset( $wgPropertyToColumnFilters ) ) { $this-propertyToColumnFilters = $wgPropertyToColumnFilters; @@ -41,9 +41,8 @@ } protected function outputViewHeader() { - global - $wgOut; - + global $wgOut; + if ( $this-showDataSetPanel ) { $wgOut-addHTML( $this-getDataSetPanel() ); } @@ -63,19 +62,19 @@ $wgOut-setPageTitle( $myTitle ); $this-queryTransactionInformation = new QueryLatestTransactionInformation(); - + $viewInformation = new ViewInformation(); $viewInformation-showRecordLifeSpan = false; $viewInformation-queryTransactionInformation =
[MediaWiki-commits] [Gerrit] Remove Arial fontfamily style for buttons - change (mediawiki...UniversalLanguageSelector)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/71577 Change subject: Remove Arial fontfamily style for buttons .. Remove Arial fontfamily style for buttons This came from Agora button styles. Explicit font style for buttons prevent them to inherit font family style from parents. Change-Id: I81833273ea7f7f865d04d56d2156df0852373110 --- M resources/css/ext.uls.css 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/77/71577/1 diff --git a/resources/css/ext.uls.css b/resources/css/ext.uls.css index cfe1848..ad73afc 100644 --- a/resources/css/ext.uls.css +++ b/resources/css/ext.uls.css @@ -115,7 +115,8 @@ button.button { display: inline-block; padding: 0.4065em 1.2195em 0.4065em; - font: bold 0.813em Arial, sans-serif; + font-size: 0.813em; + font-weight: bold; line-height: 1; color: #252525; text-align: center; -- To view, visit https://gerrit.wikimedia.org/r/71577 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I81833273ea7f7f865d04d56d2156df0852373110 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] fixed partial search test - change (mediawiki...MobileFrontend)
Mgrover has uploaded a new change for review. https://gerrit.wikimedia.org/r/71578 Change subject: fixed partial search test .. fixed partial search test Change-Id: I016243d05521002c0a30c222505c3288018cd153 --- M tests/acceptance/features/support/pages/home_page.rb 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/78/71578/1 diff --git a/tests/acceptance/features/support/pages/home_page.rb b/tests/acceptance/features/support/pages/home_page.rb index f75808d..5f1a91b 100644 --- a/tests/acceptance/features/support/pages/home_page.rb +++ b/tests/acceptance/features/support/pages/home_page.rb @@ -10,7 +10,7 @@ a(:mainmenu_button, id: 'mw-mf-main-menu-button') a(:login_button, href: /Special:UserLogin/) a(:login, text: 'Login') - ul(:search_results, class: 'suggestions-results') + li(:search_results, title: 'San Francisco') a(:search_result) do |page| page.search_results_element.a end -- To view, visit https://gerrit.wikimedia.org/r/71578 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I016243d05521002c0a30c222505c3288018cd153 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Mgrover mgro...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] makes NamespaceEdits namespace parameter a custom wtf Field ... - change (analytics/wikimetrics)
Erosen has uploaded a new change for review. https://gerrit.wikimedia.org/r/71579 Change subject: makes NamespaceEdits namespace parameter a custom wtf Field subclass, and adds testing code to deal with instantiating wtforms outside of the request context. current commit still fails tests which use a custom field type with celery, as app context is n .. makes NamespaceEdits namespace parameter a custom wtf Field subclass, and adds testing code to deal with instantiating wtforms outside of the request context. current commit still fails tests which use a custom field type with celery, as app context is not accessible in celery tasks Change-Id: I854cb1c69d0e28d63793e762753d272368fd3153 --- M tests/fixtures.py M tests/test_metrics/test_namespace_edits.py M wikimetrics/configurables.py M wikimetrics/metrics/namespace_edits.py M wikimetrics/models/metric_job.py 5 files changed, 64 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/wikimetrics refs/changes/79/71579/1 diff --git a/tests/fixtures.py b/tests/fixtures.py index e328a84..682a927 100644 --- a/tests/fixtures.py +++ b/tests/fixtures.py @@ -156,7 +156,12 @@ class QueueTest(unittest.TestCase): -pass + +def setUp(self): +pass + +def tearDown(self): +pass class QueueDatabaseTest(QueueTest, DatabaseTest): diff --git a/tests/test_metrics/test_namespace_edits.py b/tests/test_metrics/test_namespace_edits.py index 3e2f6c1..77beb31 100644 --- a/tests/test_metrics/test_namespace_edits.py +++ b/tests/test_metrics/test_namespace_edits.py @@ -1,14 +1,22 @@ from nose.tools import assert_true from tests.fixtures import DatabaseTest, QueueDatabaseTest +from wikimetrics import app from wikimetrics.metrics import NamespaceEdits from wikimetrics.models import Cohort, MetricJob class NamespaceEditsDatabaseTest(DatabaseTest): + def setUp(self): super(NamespaceEditsDatabaseTest, self).setUp() +self.ctx = app.test_request_context() +self.ctx.push() +def tearDown(self): +self.ctx.pop() +super(NamespaceEditsDatabaseTest, self).tearDown() + def test_finds_edits(self): cohort = self.session.query(Cohort).filter_by(name='test').one() @@ -29,8 +37,17 @@ assert_true(results[3] == 0, 'Andrew had not 0 edits') -class NamesapceEditsFullTest(QueueDatabaseTest): +class NamespaceEditsFullTest(QueueDatabaseTest): +def setUp(self): +super(NamespaceEditsFullTest, self).setUp() +self.ctx = app.test_request_context() +#self.ctx.push() + +def tearDown(self): +#self.ctx.pop() +super(NamespaceEditsFullTest, self).tearDown() + def test_namespace_edits(self): cohort = self.session.query(Cohort).filter_by(name='test').one() @@ -46,7 +63,7 @@ cohort = self.session.query(Cohort).filter_by(name='test').one() namespaces = [3] -metric = NamespaceEdits(namespaces) +metric = NamespaceEdits(namespaces=namespaces) job = MetricJob(metric, list(cohort), 'enwiki') results = job.run.delay(job).get() @@ -57,7 +74,7 @@ cohort = self.session.query(Cohort).filter_by(name='test').one() namespaces = [] -metric = NamespaceEdits(namespaces) +metric = NamespaceEdits(namespaces=namespaces) job = MetricJob(metric, list(cohort), 'enwiki') results = job.run.delay(job).get() diff --git a/wikimetrics/configurables.py b/wikimetrics/configurables.py index 9b57bb3..da54c31 100644 --- a/wikimetrics/configurables.py +++ b/wikimetrics/configurables.py @@ -66,9 +66,19 @@ from celery import Celery # create and configure celery app + global queue queue = Celery('wikimetrics', include=['wikimetrics']) config_object = create_object_from_config_file(args.celery_config) queue.config_from_object(config_object) if args.override_config: queue.config_from_object(args.override_config) + +# makes Flask app context available to celery tasks +TaskBase = queue.Task +class ContextTask(TaskBase): +abstract = True +def __call__(self, *args, **kwargs): +with app.app_context(): +return TaskBase.__call__(self, *args, **kwargs) +queue.Task = ContextTask diff --git a/wikimetrics/metrics/namespace_edits.py b/wikimetrics/metrics/namespace_edits.py index 60b9ecf..f5b9a45 100644 --- a/wikimetrics/metrics/namespace_edits.py +++ b/wikimetrics/metrics/namespace_edits.py @@ -9,6 +9,29 @@ 'NamespaceEdits', ] +class CommaSeparatedIntegerListField(wtf.Field): + + +print 'parsing CommaSeparatedIntegerListField.__iter__()' +def __iter__(self): +return iter(self.data) + +widget = wtf.TextInput() + +def