[MediaWiki-commits] [Gerrit] Cherry-pick 1415f6d6 e0656091d b9dcb7aea5 - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: Cherry-pick 1415f6d6 e0656091d b9dcb7aea5 .. Cherry-pick 1415f6d6 e0656091d b9dcb7aea5 https://mingle.corp.wikimedia.org/projects/internationalization/cards/3854 Change-Id: I396c84f6119b3df3d58046664092be6ce336c204 --- M Resources.php M api/ApiQueryMessageGroups.php M resources/js/ext.translate.base.js M resources/js/ext.translate.groupselector.js M resources/js/ext.translate.special.searchtranslations.js M resources/js/ext.translate.special.translate.js M resources/js/ext.translate.workflowselector.js M specials/SpecialSearchTranslations.php M utils/TranslateMetadata.php 9 files changed, 231 insertions(+), 215 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/Resources.php b/Resources.php index 7366092..c13ff66 100644 --- a/Resources.php +++ b/Resources.php @@ -315,6 +315,7 @@ 'ext.uls.mediawiki', 'ext.uls.geoclient', 'ext.translate.groupselector', + 'mediawiki.Uri', ), 'messages' => array( 'translate-documentation-language', diff --git a/api/ApiQueryMessageGroups.php b/api/ApiQueryMessageGroups.php index e95171d..8003cad 100644 --- a/api/ApiQueryMessageGroups.php +++ b/api/ApiQueryMessageGroups.php @@ -27,9 +27,16 @@ $groups = array(); if ( $params['format'] === 'flat' ) { - $groups = MessageGroups::getAllGroups(); - foreach ( MessageGroups::getDynamicGroups() as $id => $unused ) { - $groups[$id] = MessageGroups::getGroup( $id ); + if ( $params['root'] !== '' ) { + $group = MessageGroups::getGroup( $params['root'] ); + if ( $group ) { + $groups[$params['root']] = $group; + } + } else { + $groups = MessageGroups::getAllGroups(); + foreach ( MessageGroups::getDynamicGroups() as $id => $unused ) { + $groups[$id] = MessageGroups::getGroup( $id ); + } } // Not sorted by default, so do it now @@ -104,10 +111,13 @@ $subgroups = $mixed; } + wfProfileIn( __METHOD__ . '-' . get_class( $g ) ); + $a = array(); $groupId = $g->getId(); + wfProfileIn( __METHOD__ . '-basic' ); if ( isset( $props['id'] ) ) { $a['id'] = $groupId; } @@ -127,18 +137,24 @@ if ( isset( $props['namespace'] ) ) { $a['namespace'] = $g->getNamespace(); } + wfProfileOut( __METHOD__ . '-basic' ); + wfProfileIn( __METHOD__ . '-exists' ); if ( isset( $props['exists'] ) ) { $a['exists'] = $g->exists(); } + wfProfileOut( __METHOD__ . '-exists' ); + wfProfileIn( __METHOD__ . '-icon' ); if ( isset( $props['icon'] ) ) { $formats = TranslateUtils::getIcon( $g, $params['iconsize'] ); if ( $formats ) { $a['icon'] = $formats; } } + wfProfileOut( __METHOD__ . '-icon' ); + wfProfileIn( __METHOD__ . '-priority' ); if ( isset( $props['priority'] ) ) { $priority = MessageGroups::getPriority( $g ); $a['priority'] = $priority ? : 'default'; @@ -152,15 +168,20 @@ if ( isset( $props['priorityforce'] ) ) { $a['priorityforce'] = ( TranslateMetadata::get( $groupId, 'priorityforce' ) === 'on' ); } + wfProfileOut( __METHOD__ . '-priority' ); + wfProfileIn( __METHOD__ . '-workflowstates' ); if ( isset( $props['workflowstates'] ) ) { $a['workflowstates'] = $this->getWorkflowStates( $g ); } + wfProfileOut( __METHOD__ . '-workflowstates' ); wfRunHooks( 'TranslateProcessAPIMessageGroupsProperties', array( &$a, $props, $params, $g ) ); + + wfProfileOut( __METHOD__ . '-' . get_class( $g ) ); // Depth only applies to tree format if ( $depth >= $params['depth'] && $params['format'] === 'tree' ) { @@ -262,7 +283,8 @@ TEXT; $root = <<' ) .addClass( 'row fa
[MediaWiki-commits] [Gerrit] Cherry-pick 1415f6d6 e0656091d b9dcb7aea5 - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: Cherry-pick 1415f6d6 e0656091d b9dcb7aea5 .. Cherry-pick 1415f6d6 e0656091d b9dcb7aea5 https://mingle.corp.wikimedia.org/projects/internationalization/cards/3854 Conflicts: api/ApiQueryMessageGroups.php Change-Id: I8417e0bae370c04d2f63bdc0702905116f5e95d7 --- M Resources.php M api/ApiQueryMessageGroups.php M resources/js/ext.translate.base.js M resources/js/ext.translate.groupselector.js M resources/js/ext.translate.special.searchtranslations.js M resources/js/ext.translate.special.translate.js M resources/js/ext.translate.workflowselector.js M specials/SpecialSearchTranslations.php M utils/TranslateMetadata.php 9 files changed, 235 insertions(+), 219 deletions(-) Approvals: Nikerabbit: Looks good to me, approved Siebrand: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/Resources.php b/Resources.php index 7366092..c13ff66 100644 --- a/Resources.php +++ b/Resources.php @@ -315,6 +315,7 @@ 'ext.uls.mediawiki', 'ext.uls.geoclient', 'ext.translate.groupselector', + 'mediawiki.Uri', ), 'messages' => array( 'translate-documentation-language', diff --git a/api/ApiQueryMessageGroups.php b/api/ApiQueryMessageGroups.php index 4e5720b..33c1ed5 100644 --- a/api/ApiQueryMessageGroups.php +++ b/api/ApiQueryMessageGroups.php @@ -27,14 +27,21 @@ $groups = array(); if ( $params['format'] === 'flat' ) { - $groups = MessageGroups::getAllGroups(); - foreach ( MessageGroups::getDynamicGroups() as $id => $unused ) { - // Do not list the sandbox group. The code that knows it - // exists can access it directly. - if ( $id === '!sandbox' ) { - continue; + if ( $params['root'] !== '' ) { + $group = MessageGroups::getGroup( $params['root'] ); + if ( $group ) { + $groups[$params['root']] = $group; } - $groups[$id] = MessageGroups::getGroup( $id ); + } else { + $groups = MessageGroups::getAllGroups(); + foreach ( MessageGroups::getDynamicGroups() as $id => $unused ) { + // Do not list the sandbox group. The code that knows it + // exists can access it directly. + if ( $id === '!sandbox' ) { + continue; + } + $groups[$id] = MessageGroups::getGroup( $id ); + } } // Not sorted by default, so do it now @@ -105,10 +112,13 @@ $subgroups = $mixed; } + wfProfileIn( __METHOD__ . '-' . get_class( $g ) ); + $a = array(); $groupId = $g->getId(); + wfProfileIn( __METHOD__ . '-basic' ); if ( isset( $props['id'] ) ) { $a['id'] = $groupId; } @@ -128,18 +138,24 @@ if ( isset( $props['namespace'] ) ) { $a['namespace'] = $g->getNamespace(); } + wfProfileOut( __METHOD__ . '-basic' ); + wfProfileIn( __METHOD__ . '-exists' ); if ( isset( $props['exists'] ) ) { $a['exists'] = $g->exists(); } + wfProfileOut( __METHOD__ . '-exists' ); + wfProfileIn( __METHOD__ . '-icon' ); if ( isset( $props['icon'] ) ) { $formats = TranslateUtils::getIcon( $g, $params['iconsize'] ); if ( $formats ) { $a['icon'] = $formats; } } + wfProfileOut( __METHOD__ . '-icon' ); + wfProfileIn( __METHOD__ . '-priority' ); if ( isset( $props['priority'] ) ) { $priority = MessageGroups::getPriority( $g ); $a['priority'] = $priority ? : 'default'; @@ -153,15 +169,20 @@ if ( isset( $props['priorityforce'] ) ) { $a['priorityforce'] = ( TranslateMetadata::get( $groupId, 'priorityforce' ) === 'on' ); } + wfProfileOut( __METHOD__ . '-priority' ); + wfProfileIn( __METHOD__ . '-workflowstates'
[MediaWiki-commits] [Gerrit] Cherry-pick 1415f6d6 e0656091d b9dcb7aea5 - change (mediawiki...Translate)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/98764 Change subject: Cherry-pick 1415f6d6 e0656091d b9dcb7aea5 .. Cherry-pick 1415f6d6 e0656091d b9dcb7aea5 https://mingle.corp.wikimedia.org/projects/internationalization/cards/3854 Change-Id: I396c84f6119b3df3d58046664092be6ce336c204 --- M Resources.php M api/ApiQueryMessageGroups.php M resources/js/ext.translate.base.js M resources/js/ext.translate.groupselector.js M resources/js/ext.translate.special.searchtranslations.js M resources/js/ext.translate.special.translate.js M resources/js/ext.translate.workflowselector.js M specials/SpecialSearchTranslations.php M utils/TranslateMetadata.php 9 files changed, 231 insertions(+), 215 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/64/98764/1 diff --git a/Resources.php b/Resources.php index 7366092..c13ff66 100644 --- a/Resources.php +++ b/Resources.php @@ -315,6 +315,7 @@ 'ext.uls.mediawiki', 'ext.uls.geoclient', 'ext.translate.groupselector', + 'mediawiki.Uri', ), 'messages' => array( 'translate-documentation-language', diff --git a/api/ApiQueryMessageGroups.php b/api/ApiQueryMessageGroups.php index e95171d..8003cad 100644 --- a/api/ApiQueryMessageGroups.php +++ b/api/ApiQueryMessageGroups.php @@ -27,9 +27,16 @@ $groups = array(); if ( $params['format'] === 'flat' ) { - $groups = MessageGroups::getAllGroups(); - foreach ( MessageGroups::getDynamicGroups() as $id => $unused ) { - $groups[$id] = MessageGroups::getGroup( $id ); + if ( $params['root'] !== '' ) { + $group = MessageGroups::getGroup( $params['root'] ); + if ( $group ) { + $groups[$params['root']] = $group; + } + } else { + $groups = MessageGroups::getAllGroups(); + foreach ( MessageGroups::getDynamicGroups() as $id => $unused ) { + $groups[$id] = MessageGroups::getGroup( $id ); + } } // Not sorted by default, so do it now @@ -104,10 +111,13 @@ $subgroups = $mixed; } + wfProfileIn( __METHOD__ . '-' . get_class( $g ) ); + $a = array(); $groupId = $g->getId(); + wfProfileIn( __METHOD__ . '-basic' ); if ( isset( $props['id'] ) ) { $a['id'] = $groupId; } @@ -127,18 +137,24 @@ if ( isset( $props['namespace'] ) ) { $a['namespace'] = $g->getNamespace(); } + wfProfileOut( __METHOD__ . '-basic' ); + wfProfileIn( __METHOD__ . '-exists' ); if ( isset( $props['exists'] ) ) { $a['exists'] = $g->exists(); } + wfProfileOut( __METHOD__ . '-exists' ); + wfProfileIn( __METHOD__ . '-icon' ); if ( isset( $props['icon'] ) ) { $formats = TranslateUtils::getIcon( $g, $params['iconsize'] ); if ( $formats ) { $a['icon'] = $formats; } } + wfProfileOut( __METHOD__ . '-icon' ); + wfProfileIn( __METHOD__ . '-priority' ); if ( isset( $props['priority'] ) ) { $priority = MessageGroups::getPriority( $g ); $a['priority'] = $priority ? : 'default'; @@ -152,15 +168,20 @@ if ( isset( $props['priorityforce'] ) ) { $a['priorityforce'] = ( TranslateMetadata::get( $groupId, 'priorityforce' ) === 'on' ); } + wfProfileOut( __METHOD__ . '-priority' ); + wfProfileIn( __METHOD__ . '-workflowstates' ); if ( isset( $props['workflowstates'] ) ) { $a['workflowstates'] = $this->getWorkflowStates( $g ); } + wfProfileOut( __METHOD__ . '-workflowstates' ); wfRunHooks( 'TranslateProcessAPIMessageGroupsProperties', array( &$a, $props, $params, $g ) ); + + wfProfileOut( __METHOD__ . '-' . get_class( $g ) ); // Depth only applies to tree format if ( $depth >= $params['depth'] && $params['format'] === 'tree' ) { @@ -262,7 +283,8 @@ TEXT; $root = <
[MediaWiki-commits] [Gerrit] i18n: Update SVG - change (mediawiki...VectorBeta)
Amire80 has submitted this change and it was merged. Change subject: i18n: Update SVG .. i18n: Update SVG Changing "أ" to "و" as it is more common between all arab script derivatives Change-Id: If264228ba71ff85664653105775a97bf35dc02b4 --- M typography-beta-arab.svg 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Calak: Looks good to me, but someone else must approve Amire80: Verified; Looks good to me, approved Jdlrobson: Looks good to me, but someone else must approve diff --git a/typography-beta-arab.svg b/typography-beta-arab.svg index 3739c88..fe3dcd5 100644 --- a/typography-beta-arab.svg +++ b/typography-beta-arab.svg @@ -170,7 +170,7 @@ sodipodi:role="line" id="tspan3815" x="184.53609" - y="81.835052">أ + y="81.835052">و أ - \ No newline at end of file + y="117.19588">و + -- To view, visit https://gerrit.wikimedia.org/r/98153 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If264228ba71ff85664653105775a97bf35dc02b4 Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/extensions/VectorBeta Gerrit-Branch: master Gerrit-Owner: Ebrahim Gerrit-Reviewer: Amire80 Gerrit-Reviewer: Calak Gerrit-Reviewer: Huji Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Ladsgroup Gerrit-Reviewer: Siebrand Gerrit-Reviewer: Trevor Parscal ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Cherry-pick 1415f6d6 e06560 b9dcb7aea5 - change (mediawiki...Translate)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/98763 Change subject: Cherry-pick 1415f6d6 e06560 b9dcb7aea5 .. Cherry-pick 1415f6d6 e06560 b9dcb7aea5 https://mingle.corp.wikimedia.org/projects/internationalization/cards/3854 Conflicts: api/ApiQueryMessageGroups.php Change-Id: I8417e0bae370c04d2f63bdc0702905116f5e95d7 --- M Resources.php M api/ApiQueryMessageGroups.php M resources/js/ext.translate.base.js M resources/js/ext.translate.groupselector.js M resources/js/ext.translate.special.searchtranslations.js M resources/js/ext.translate.special.translate.js M resources/js/ext.translate.workflowselector.js M specials/SpecialSearchTranslations.php M utils/TranslateMetadata.php 9 files changed, 235 insertions(+), 219 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/63/98763/1 diff --git a/Resources.php b/Resources.php index 7366092..c13ff66 100644 --- a/Resources.php +++ b/Resources.php @@ -315,6 +315,7 @@ 'ext.uls.mediawiki', 'ext.uls.geoclient', 'ext.translate.groupselector', + 'mediawiki.Uri', ), 'messages' => array( 'translate-documentation-language', diff --git a/api/ApiQueryMessageGroups.php b/api/ApiQueryMessageGroups.php index 4e5720b..33c1ed5 100644 --- a/api/ApiQueryMessageGroups.php +++ b/api/ApiQueryMessageGroups.php @@ -27,14 +27,21 @@ $groups = array(); if ( $params['format'] === 'flat' ) { - $groups = MessageGroups::getAllGroups(); - foreach ( MessageGroups::getDynamicGroups() as $id => $unused ) { - // Do not list the sandbox group. The code that knows it - // exists can access it directly. - if ( $id === '!sandbox' ) { - continue; + if ( $params['root'] !== '' ) { + $group = MessageGroups::getGroup( $params['root'] ); + if ( $group ) { + $groups[$params['root']] = $group; } - $groups[$id] = MessageGroups::getGroup( $id ); + } else { + $groups = MessageGroups::getAllGroups(); + foreach ( MessageGroups::getDynamicGroups() as $id => $unused ) { + // Do not list the sandbox group. The code that knows it + // exists can access it directly. + if ( $id === '!sandbox' ) { + continue; + } + $groups[$id] = MessageGroups::getGroup( $id ); + } } // Not sorted by default, so do it now @@ -105,10 +112,13 @@ $subgroups = $mixed; } + wfProfileIn( __METHOD__ . '-' . get_class( $g ) ); + $a = array(); $groupId = $g->getId(); + wfProfileIn( __METHOD__ . '-basic' ); if ( isset( $props['id'] ) ) { $a['id'] = $groupId; } @@ -128,18 +138,24 @@ if ( isset( $props['namespace'] ) ) { $a['namespace'] = $g->getNamespace(); } + wfProfileOut( __METHOD__ . '-basic' ); + wfProfileIn( __METHOD__ . '-exists' ); if ( isset( $props['exists'] ) ) { $a['exists'] = $g->exists(); } + wfProfileOut( __METHOD__ . '-exists' ); + wfProfileIn( __METHOD__ . '-icon' ); if ( isset( $props['icon'] ) ) { $formats = TranslateUtils::getIcon( $g, $params['iconsize'] ); if ( $formats ) { $a['icon'] = $formats; } } + wfProfileOut( __METHOD__ . '-icon' ); + wfProfileIn( __METHOD__ . '-priority' ); if ( isset( $props['priority'] ) ) { $priority = MessageGroups::getPriority( $g ); $a['priority'] = $priority ? : 'default'; @@ -153,15 +169,20 @@ if ( isset( $props['priorityforce'] ) ) { $a['priorityforce'] = ( TranslateMetadata::get( $groupId, 'priorityforce' ) === 'on' ); } + wfProfileOut( __METHOD__ . '-priority' ); + wfProfileIn( __METHOD__ . '-workflowstates' );
[MediaWiki-commits] [Gerrit] Kill stray nginx configs for thumbs & old mobile - change (operations/puppet)
Faidon Liambotis has submitted this change and it was merged. Change subject: Kill stray nginx configs for thumbs & old mobile .. Kill stray nginx configs for thumbs & old mobile The Ruby mobile gateway is lng dead, as is the nginx/fcgi thumb handler that was once set up in ms6. Kill those nginx configs, plus the fcgi-spawn upstart script for thumb-handler. Change-Id: Id6f7a52460de205fd3b9edc6427b420b92979bdf --- D files/nginx/mobile.site.conf D modules/generic/files/upstart/fcgi-thumb-handler.conf D templates/nginx/sites/thumbs.erb 3 files changed, 0 insertions(+), 202 deletions(-) Approvals: Faidon Liambotis: Looks good to me, approved jenkins-bot: Verified diff --git a/files/nginx/mobile.site.conf b/files/nginx/mobile.site.conf deleted file mode 100644 index f3cc8d2..000 --- a/files/nginx/mobile.site.conf +++ /dev/null @@ -1,132 +0,0 @@ -# -### THIS FILE IS MANAGED BY PUPPET -### puppet:///files/nginx/mobile.site.conf -# - -# Mobile site NGINX configuration file - -# this is where you define your mongrel clusters. -# you need one of these blocks for each cluster -# and each one needs its own name to refer to it later. -upstream mobilecluster { -server 0.0.0.0:1982; -server 0.0.0.0:1983; -server 0.0.0.0:1984; -server 0.0.0.0:1985; -server 0.0.0.0:1986; -server 0.0.0.0:1987; -server 0.0.0.0:1988; -server 0.0.0.0:1989; -server 0.0.0.0:1990; -server 0.0.0.0:1991; -server 0.0.0.0:1992; -server 0.0.0.0:1993; -server 0.0.0.0:1994; -server 0.0.0.0:1995; -server 0.0.0.0:1996; -server 0.0.0.0:1997; -server 0.0.0.0:1998; -server 0.0.0.0:1999; -server 0.0.0.0:2000; -server 0.0.0.0:2001; -server 0.0.0.0:2002; -server 0.0.0.0:2003; -server 0.0.0.0:2004; -server 0.0.0.0:2005; -server 0.0.0.0:2006; -} - -upstream statscluster { - server 127.0.0.1:3000; - server 127.0.0.1:3001; -} - - -# MAIN MOBILE -server { - # port to listen on. Can also be set to an IP:PORT - listen 80; - - # Set the max size for file uploads to 50Mb - client_max_body_size 1M; - - - # sets the domain[s] that this vhost server requests for - server_name m.wikipedia.org *.m.wikipedia.org; - - # doc root - root /srv/mobile/current/public; - - location / { -# needed to forward user's IP address to rails -proxy_set_header X-Real-IP $remote_addr; - -# needed for HTTPS -proxy_set_header Host $http_host; -proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; -proxy_redirect off; -proxy_max_temp_file_size 0; -proxy_connect_timeout 10; - -# this rewrites all the requests to the maintenance.html -# page if it exists in the doc root. This is for capistrano's -# disable web task -if (-f $document_root/system/maintenance.html) { - rewrite ^(.*)$ /system/maintenance.html last; - break; -} - -# If the file exists as a static file serve it directly without -# running all the other rewite tests on it -if (-f $request_filename) { - break; -} - -if (!-f $request_filename) { - proxy_pass http://mobilecluster; - break; -} - } - - error_page 500 502 503 504 404 /500.html; - location = /500.html { -root /srv/mobile/current/public; - } -} - -# STATS -server { - # port to listen on. Can also be set to an IP:PORT - listen 80; - - # Set the max size for file uploads to 50Mb - client_max_body_size 51; - - # sets the domain[s] that this vhost server requests for - server_name stats.m.wikipedia.org; - - # doc root - root /srv/mobile/current/stats/public; - - location / { -# needed to forward user's IP address to rails -proxy_set_header X-Real-IP $remote_addr; - -# needed for HTTPS -proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; -proxy_set_header Host $http_host; -proxy_redirect off; -proxy_max_temp_file_size 0; - -# If the file exists as a static file serve it directly without -# running all the other rewite tests on it -if (-f $request_filename) { - break; -} - -if (!-f $request_filename) { - proxy_pass http://statscluster; - break; -} - } -} diff --git a/modules/generic/files/upstart/fcgi-thumb-handler.conf b/modules/generic/files/upstart/fcgi-thumb-handler.conf deleted file mode 100644 index 8887558..000 --- a/modules/generic/files/upstart/fcgi-thumb-handler.conf +++ /dev/null @@ -1,15 +0,0 @@ -# This file will be managed by Puppet! -# -# fcgi-thumb-handler - -description"Thumbnail generation FastCGI handler" - -start on filesystem -stop on runlevel S - -respawn -respawn limit 10 5 - -umask 022 - -exec /usr/bin/spawn-fcgi -n -u 127.0.0.1 -p 9000 -u www-data -C 60 -- /usr/bin/php5-
[MediaWiki-commits] [Gerrit] protoproxy: set proxy_read_timeout to 180s - change (operations/puppet)
Faidon Liambotis has submitted this change and it was merged. Change subject: protoproxy: set proxy_read_timeout to 180s .. protoproxy: set proxy_read_timeout to 180s As a follow up to Ic14902d399712a1eb0d2d98ce5f505e6740ef68b, also set protoproxy's proxy_read_timeout to be in sync with Varnish's first_byte_timeout and PHP's max_execution_time. Change-Id: I605ab157a3723da5663bb8fa978f16a42d67d4f1 --- M modules/protoproxy/templates/localssl.erb M modules/protoproxy/templates/proxy.erb 2 files changed, 8 insertions(+), 0 deletions(-) Approvals: Faidon Liambotis: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/protoproxy/templates/localssl.erb b/modules/protoproxy/templates/localssl.erb index 59ff3e1..7c57034 100644 --- a/modules/protoproxy/templates/localssl.erb +++ b/modules/protoproxy/templates/localssl.erb @@ -18,6 +18,10 @@ location / { proxy_pass http://<%= scope.lookupvar('::ipaddress') %>:<%= @upstream_port %>; + # this should be in sync with Varnish's first_byte_timeout + # and PHP's max_execution_time + proxy_read_timeout 180s; + proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; diff --git a/modules/protoproxy/templates/proxy.erb b/modules/protoproxy/templates/proxy.erb index 6412628..9319433 100644 --- a/modules/protoproxy/templates/proxy.erb +++ b/modules/protoproxy/templates/proxy.erb @@ -64,6 +64,10 @@ error_page 502 503 504 = @fallback; <% end -%> + # this should be in sync with Varnish's first_byte_timeout + # and PHP's max_execution_time + proxy_read_timeout 180s; + proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; -- To view, visit https://gerrit.wikimedia.org/r/98761 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I605ab157a3723da5663bb8fa978f16a42d67d4f1 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon Liambotis Gerrit-Reviewer: Faidon Liambotis Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Kill stray nginx configs for thumbs & old mobile - change (operations/puppet)
Faidon Liambotis has uploaded a new change for review. https://gerrit.wikimedia.org/r/98762 Change subject: Kill stray nginx configs for thumbs & old mobile .. Kill stray nginx configs for thumbs & old mobile The Ruby mobile gateway is lng dead, as is the nginx/fcgi thumb handler that was once set up in ms6. Kill those nginx configs, plus the fcgi-spawn upstart script for thumb-handler. Change-Id: Id6f7a52460de205fd3b9edc6427b420b92979bdf --- D files/nginx/mobile.site.conf D modules/generic/files/upstart/fcgi-thumb-handler.conf D templates/nginx/sites/thumbs.erb 3 files changed, 0 insertions(+), 202 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/62/98762/1 diff --git a/files/nginx/mobile.site.conf b/files/nginx/mobile.site.conf deleted file mode 100644 index f3cc8d2..000 --- a/files/nginx/mobile.site.conf +++ /dev/null @@ -1,132 +0,0 @@ -# -### THIS FILE IS MANAGED BY PUPPET -### puppet:///files/nginx/mobile.site.conf -# - -# Mobile site NGINX configuration file - -# this is where you define your mongrel clusters. -# you need one of these blocks for each cluster -# and each one needs its own name to refer to it later. -upstream mobilecluster { -server 0.0.0.0:1982; -server 0.0.0.0:1983; -server 0.0.0.0:1984; -server 0.0.0.0:1985; -server 0.0.0.0:1986; -server 0.0.0.0:1987; -server 0.0.0.0:1988; -server 0.0.0.0:1989; -server 0.0.0.0:1990; -server 0.0.0.0:1991; -server 0.0.0.0:1992; -server 0.0.0.0:1993; -server 0.0.0.0:1994; -server 0.0.0.0:1995; -server 0.0.0.0:1996; -server 0.0.0.0:1997; -server 0.0.0.0:1998; -server 0.0.0.0:1999; -server 0.0.0.0:2000; -server 0.0.0.0:2001; -server 0.0.0.0:2002; -server 0.0.0.0:2003; -server 0.0.0.0:2004; -server 0.0.0.0:2005; -server 0.0.0.0:2006; -} - -upstream statscluster { - server 127.0.0.1:3000; - server 127.0.0.1:3001; -} - - -# MAIN MOBILE -server { - # port to listen on. Can also be set to an IP:PORT - listen 80; - - # Set the max size for file uploads to 50Mb - client_max_body_size 1M; - - - # sets the domain[s] that this vhost server requests for - server_name m.wikipedia.org *.m.wikipedia.org; - - # doc root - root /srv/mobile/current/public; - - location / { -# needed to forward user's IP address to rails -proxy_set_header X-Real-IP $remote_addr; - -# needed for HTTPS -proxy_set_header Host $http_host; -proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; -proxy_redirect off; -proxy_max_temp_file_size 0; -proxy_connect_timeout 10; - -# this rewrites all the requests to the maintenance.html -# page if it exists in the doc root. This is for capistrano's -# disable web task -if (-f $document_root/system/maintenance.html) { - rewrite ^(.*)$ /system/maintenance.html last; - break; -} - -# If the file exists as a static file serve it directly without -# running all the other rewite tests on it -if (-f $request_filename) { - break; -} - -if (!-f $request_filename) { - proxy_pass http://mobilecluster; - break; -} - } - - error_page 500 502 503 504 404 /500.html; - location = /500.html { -root /srv/mobile/current/public; - } -} - -# STATS -server { - # port to listen on. Can also be set to an IP:PORT - listen 80; - - # Set the max size for file uploads to 50Mb - client_max_body_size 51; - - # sets the domain[s] that this vhost server requests for - server_name stats.m.wikipedia.org; - - # doc root - root /srv/mobile/current/stats/public; - - location / { -# needed to forward user's IP address to rails -proxy_set_header X-Real-IP $remote_addr; - -# needed for HTTPS -proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; -proxy_set_header Host $http_host; -proxy_redirect off; -proxy_max_temp_file_size 0; - -# If the file exists as a static file serve it directly without -# running all the other rewite tests on it -if (-f $request_filename) { - break; -} - -if (!-f $request_filename) { - proxy_pass http://statscluster; - break; -} - } -} diff --git a/modules/generic/files/upstart/fcgi-thumb-handler.conf b/modules/generic/files/upstart/fcgi-thumb-handler.conf deleted file mode 100644 index 8887558..000 --- a/modules/generic/files/upstart/fcgi-thumb-handler.conf +++ /dev/null @@ -1,15 +0,0 @@ -# This file will be managed by Puppet! -# -# fcgi-thumb-handler - -description"Thumbnail generation FastCGI handler" - -start on filesystem -stop on runlevel S - -respawn -respawn limit 10 5 - -umask 022 - -exec /usr/bin/spawn-fcgi -n -u 127.0.0.1 -p 9000
[MediaWiki-commits] [Gerrit] protoproxy: set proxy_read_timeout to 180s - change (operations/puppet)
Faidon Liambotis has uploaded a new change for review. https://gerrit.wikimedia.org/r/98761 Change subject: protoproxy: set proxy_read_timeout to 180s .. protoproxy: set proxy_read_timeout to 180s As a follow up to Ic14902d399712a1eb0d2d98ce5f505e6740ef68b, also set protoproxy's proxy_read_timeout to be in sync with Varnish's first_byte_timeout and PHP's max_execution_time. Change-Id: I605ab157a3723da5663bb8fa978f16a42d67d4f1 --- M modules/protoproxy/templates/localssl.erb M modules/protoproxy/templates/proxy.erb 2 files changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/61/98761/1 diff --git a/modules/protoproxy/templates/localssl.erb b/modules/protoproxy/templates/localssl.erb index 59ff3e1..7c57034 100644 --- a/modules/protoproxy/templates/localssl.erb +++ b/modules/protoproxy/templates/localssl.erb @@ -18,6 +18,10 @@ location / { proxy_pass http://<%= scope.lookupvar('::ipaddress') %>:<%= @upstream_port %>; + # this should be in sync with Varnish's first_byte_timeout + # and PHP's max_execution_time + proxy_read_timeout 180s; + proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; diff --git a/modules/protoproxy/templates/proxy.erb b/modules/protoproxy/templates/proxy.erb index 6412628..9319433 100644 --- a/modules/protoproxy/templates/proxy.erb +++ b/modules/protoproxy/templates/proxy.erb @@ -64,6 +64,10 @@ error_page 502 503 504 = @fallback; <% end -%> + # this should be in sync with Varnish's first_byte_timeout + # and PHP's max_execution_time + proxy_read_timeout 180s; + proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; -- To view, visit https://gerrit.wikimedia.org/r/98761 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I605ab157a3723da5663bb8fa978f16a42d67d4f1 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon Liambotis ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix backups - change (translatewiki)
jenkins-bot has submitted this change and it was merged. Change subject: Fix backups .. Fix backups Switch from sftp to rsync over ssh Change-Id: I221ca4019b35fc4c97b2ddc411dcb3fc3294972f --- M puppet/modules/backup/files/backup.sh M puppet/modules/backup/files/duplicity.conf A puppet/modules/backup/files/ssh-config M puppet/modules/backup/manifests/init.pp 4 files changed, 15 insertions(+), 12 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/puppet/modules/backup/files/backup.sh b/puppet/modules/backup/files/backup.sh index 7c6d2d6..f0bb78b 100644 --- a/puppet/modules/backup/files/backup.sh +++ b/puppet/modules/backup/files/backup.sh @@ -20,8 +20,6 @@ duplicity clean --force $DUPEXEC $RPATH/$i echo done -# if local, fix permissions -if [ -z $HOST ]; then chown -R $NAME.$NAME $LPATH; fi echo -n " Finished backup on $HOSTNAME "; date echo echo diff --git a/puppet/modules/backup/files/duplicity.conf b/puppet/modules/backup/files/duplicity.conf index d7c6b74..bc58565 100644 --- a/puppet/modules/backup/files/duplicity.conf +++ b/puppet/modules/backup/files/duplicity.conf @@ -4,10 +4,8 @@ LPATH=/work/users/nike/backups/twn # remote settings -HOST=lakka.kapsi.fi -NAME=nike -RPATH=scp://$NAME@$HOST/$LPATH -SSHID=/root/.ssh/backup_id_rsa +HOST=backup +RPATH=rsync://$HOST/$LPATH # complete with root gpg signature and encryption key SIGNKEY=D4D02B43 @@ -18,14 +16,9 @@ BACKDIRS='etc var/log var/lib/awstats home www root' # duplicity options (backup.sh also accepts command line arguments) -DUPOPTS="--ssh-options -oIdentityFile=$SSHID" DUPOPTS="$DUPOPTS --full-if-older-than 1M" export GNUPGHOME=/root/.gnupg export HOME=/root -if [ -z $HOST ]; then - MKDIR="mkdir -p" -else - MKDIR="ssh -i $SSHID $NAME@$HOST mkdir -p" -fi +MKDIR="ssh $HOST mkdir -p" diff --git a/puppet/modules/backup/files/ssh-config b/puppet/modules/backup/files/ssh-config new file mode 100644 index 000..1281e76 --- /dev/null +++ b/puppet/modules/backup/files/ssh-config @@ -0,0 +1,5 @@ +# file managed by puppet +Host backup +User nike +HostName lakka.kapsi.fi +IdentityFile /root/.ssh/backup_id_rsa diff --git a/puppet/modules/backup/manifests/init.pp b/puppet/modules/backup/manifests/init.pp index ab58a55..b2bd1d7 100644 --- a/puppet/modules/backup/manifests/init.pp +++ b/puppet/modules/backup/manifests/init.pp @@ -8,8 +8,11 @@ # $databases:: What databases to dump and backup. # class backup ($databases) { + apt::ppa { 'ppa:duplicity-team/ppa': } + package { 'duplicity': ensure => present, +require => Apt::Ppa['ppa:duplicity-team/ppa'], } file { "/etc/cron.d/backup": @@ -18,6 +21,10 @@ content => template("backup/backup.erb"), } + file { "/root/.ssh/config": +source => 'puppet:///modules/backup/ssh-config', + } + file { "/root/backup.sh": source => 'puppet:///modules/backup/backup.sh', mode => '0744', -- To view, visit https://gerrit.wikimedia.org/r/98274 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I221ca4019b35fc4c97b2ddc411dcb3fc3294972f Gerrit-PatchSet: 2 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit Gerrit-Reviewer: Nikerabbit Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Set file mode explicitly - change (translatewiki)
jenkins-bot has submitted this change and it was merged. Change subject: Set file mode explicitly .. Set file mode explicitly Change-Id: I6e45db9c85a16bb3e1a2d2fd99f0a652a0455736 --- M puppet/site.pp 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/puppet/site.pp b/puppet/site.pp index e5bb998..168ab14 100644 --- a/puppet/site.pp +++ b/puppet/site.pp @@ -1,6 +1,7 @@ File { owner => 'root', group => 'root', + mode => '0644', } node default { -- To view, visit https://gerrit.wikimedia.org/r/98273 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6e45db9c85a16bb3e1a2d2fd99f0a652a0455736 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit Gerrit-Reviewer: Nikerabbit Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added wfProfileOut for early returns in ResourceLoaderModule... - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Added wfProfileOut for early returns in ResourceLoaderModule::getDefinitionMtime .. Added wfProfileOut for early returns in ResourceLoaderModule::getDefinitionMtime I added the profiling calls in PS13 of I00cf086c9 but forgot to add wfProfileOuts for the early returns. Change-Id: Ibcd22daba8da0e087376553bca271796e0d207e5 --- M includes/resourceloader/ResourceLoaderModule.php 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/resourceloader/ResourceLoaderModule.php b/includes/resourceloader/ResourceLoaderModule.php index 26092af..db84dcf 100644 --- a/includes/resourceloader/ResourceLoaderModule.php +++ b/includes/resourceloader/ResourceLoaderModule.php @@ -448,6 +448,7 @@ wfProfileIn( __METHOD__ ); $summary = $this->getDefinitionSummary( $context ); if ( $summary === null ) { + wfProfileOut( __METHOD__ ); return 0; } @@ -469,6 +470,7 @@ $data = $cache->get( $key ); if ( is_int( $data ) && $data > 0 ) { // We've seen this hash before, re-use the timestamp of when we first saw it. + wfProfileOut( __METHOD__ ); return $data; } -- To view, visit https://gerrit.wikimedia.org/r/98760 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibcd22daba8da0e087376553bca271796e0d207e5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Ori.livneh Gerrit-Reviewer: Legoktm Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added wfProfileOut for early returns in ResourceLoaderModule... - change (mediawiki/core)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/98760 Change subject: Added wfProfileOut for early returns in ResourceLoaderModule::getDefinitionMtime .. Added wfProfileOut for early returns in ResourceLoaderModule::getDefinitionMtime I added the profiling calls in PS13 of I00cf086c9 but forgot to add wfProfileOuts for the early returns. Change-Id: Ibcd22daba8da0e087376553bca271796e0d207e5 --- M includes/resourceloader/ResourceLoaderModule.php 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/60/98760/1 diff --git a/includes/resourceloader/ResourceLoaderModule.php b/includes/resourceloader/ResourceLoaderModule.php index 26092af..db84dcf 100644 --- a/includes/resourceloader/ResourceLoaderModule.php +++ b/includes/resourceloader/ResourceLoaderModule.php @@ -448,6 +448,7 @@ wfProfileIn( __METHOD__ ); $summary = $this->getDefinitionSummary( $context ); if ( $summary === null ) { + wfProfileOut( __METHOD__ ); return 0; } @@ -469,6 +470,7 @@ $data = $cache->get( $key ); if ( is_int( $data ) && $data > 0 ) { // We've seen this hash before, re-use the timestamp of when we first saw it. + wfProfileOut( __METHOD__ ); return $data; } -- To view, visit https://gerrit.wikimedia.org/r/98760 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibcd22daba8da0e087376553bca271796e0d207e5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Ori.livneh ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] resourceloader: Add definition hashing to improve cache inva... - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: resourceloader: Add definition hashing to improve cache invalidation .. resourceloader: Add definition hashing to improve cache invalidation Currently we invalidate module caches based on timestamps from various places (including message blob, file mtimes and more). This meant that when a module changes such that the maximum detectable timestamp is still the same, the cache would not invalidate. Module classes can now implement a method to build a summary. In most cases this should be (a normalised version of) the definition array originally given to ResourceLoader::register (such as $wgResourceModules items). The most common scenarios this addresses: * File lists (scripts, styles) being re-ordered. * Files being removed when more recently changed files remain part of the module (e.g. removing an older file). * Files or messages being added to a module while other more recently changed things are already part of the module. E.g. you create a message and use it in a js file, but forget to add the message to the module. Then later you add the msg key. This last update would be ignored, because the mtime of the message is no newer than the total which already included the (same) mtime of the js file added in the previous update. * Change the concatenation order of pages in a Gadget definition. Bug: 37812 Change-Id: I00cf086c981a84235623bf58fb83c9c23aa2d619 --- M RELEASE-NOTES-1.23 M includes/resourceloader/ResourceLoaderFileModule.php M includes/resourceloader/ResourceLoaderModule.php M includes/resourceloader/ResourceLoaderWikiModule.php A tests/phpunit/includes/ResourceLoaderModuleTest.php 5 files changed, 226 insertions(+), 6 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/RELEASE-NOTES-1.23 b/RELEASE-NOTES-1.23 index 2d89dd2..d4c413e 100644 --- a/RELEASE-NOTES-1.23 +++ b/RELEASE-NOTES-1.23 @@ -53,6 +53,8 @@ * Classes TitleListDependency and TitleDependency have been removed, as they have been found unused in core and extensions for a long time. * (bug 57098) SpecialPasswordReset now obeys returnto parameter +* (bug 37812) ResourceLoader will notice when a module's definition changes and + recompile it accordingly. === API changes in 1.23 === * (bug 54884) action=parse&prop=categories now indicates hidden and missing diff --git a/includes/resourceloader/ResourceLoaderFileModule.php b/includes/resourceloader/ResourceLoaderFileModule.php index 8a48478..43330da 100644 --- a/includes/resourceloader/ResourceLoaderFileModule.php +++ b/includes/resourceloader/ResourceLoaderFileModule.php @@ -241,7 +241,11 @@ case 'dependencies': case 'messages': case 'targets': - $this->{$member} = (array)$option; + // Normalise + $option = array_values( array_unique( (array)$option ) ); + sort( $option ); + + $this->{$member} = $option; break; // Single strings case 'group': @@ -457,14 +461,49 @@ wfProfileIn( __METHOD__ . '-filemtime' ); $filesMtime = max( array_map( array( __CLASS__, 'safeFilemtime' ), $files ) ); wfProfileOut( __METHOD__ . '-filemtime' ); + $this->modifiedTime[$context->getHash()] = max( $filesMtime, - $this->getMsgBlobMtime( $context->getLanguage() ) ); + $this->getMsgBlobMtime( $context->getLanguage() ), + $this->getDefinitionMtime( $context ) + ); wfProfileOut( __METHOD__ ); return $this->modifiedTime[$context->getHash()]; } + /** +* Get the definition summary for this module. +* +* @return Array +*/ + public function getDefinitionSummary( ResourceLoaderContext $context ) { + $summary = array( + 'class' => get_class( $this ), + ); + foreach ( array( + 'scripts', + 'debugScripts', + 'loaderScripts', + 'styles', + 'languageScripts', + 'skinScripts', + 'skinStyles', + 'dependencies', + 'messages', + 'targets', + 'group', + 'position', + 'localBasePath', + 'remoteBasePath', +
[MediaWiki-commits] [Gerrit] Add relatively paranoid input sanitisation to BasicDbStorage. - change (mediawiki...Flow)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/98759 Change subject: Add relatively paranoid input sanitisation to BasicDbStorage. .. Add relatively paranoid input sanitisation to BasicDbStorage. In particular, you cannot use any SQL conditions for BasicDbStorage::find. But I grepped through the code and this does not ever seem to be used. Change-Id: Id2ee63d876d6641b0590b7b37c9ef7f24dd497e7 --- M includes/Data/ObjectManager.php 1 file changed, 48 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/59/98759/1 diff --git a/includes/Data/ObjectManager.php b/includes/Data/ObjectManager.php index 2dc8b88..f1ba038 100644 --- a/includes/Data/ObjectManager.php +++ b/includes/Data/ObjectManager.php @@ -620,6 +620,12 @@ // Does not support auto-increment id yet public function insert( array $row ) { + // Only allow the row to include key/value pairs. + // No raw SQL. + if ( $this->hasRawSQL( $row ) ) { + throw new \MWException( "Raw SQL found in row" ); + } + // insert returns boolean true/false $res = $this->dbFactory->getDB( DB_MASTER )->insert( $this->table, @@ -643,6 +649,13 @@ if ( !$updates ) { return true; // nothing to change, success } + + // Only allow the row to include key/value pairs. + // No raw SQL. + if ( $this->hasRawSQL( $updates ) || $this->hasRawSQL( $pk ) ) { + throw new \MWException( "Raw SQL found in input" ); + } + $dbw = $this->dbFactory->getDB( DB_MASTER ); // update returns boolean true/false as $res $res = $dbw->update( $this->table, $updates, UUID::convertUUIDs( $pk ), __METHOD__ . " ({$this->table})" ); @@ -660,6 +673,13 @@ $missing = array_diff( $this->primaryKey, array_keys( $row ) ); throw new PersistenceException( 'Row has null primary key: ' . implode( $missing ) ); } + + // Only allow the row to include key/value pairs. + // No raw SQL. + if ( $this->hasRawSQL( $pk ) ) { + throw new \MWException( "Raw SQL found in PK" ); + } + $dbw = $this->dbFactory->getDB( DB_MASTER ); $res = $dbw->delete( $this->table, UUID::convertUUIDs( $pk ), __METHOD__ . " ({$this->table})" ); return $res && $dbw->affectedRows(); @@ -677,6 +697,12 @@ $value = $value->getHex(); } wfDebug( " -- $key = $value\n" ); + } + + // Only allow the row to include key/value pairs. + // No raw SQL. + if ( $this->hasRawSQL( $attributes ) ) { + throw new \MWException( "Raw SQL found in select condition" ); } $res = $this->dbFactory->getDB( DB_MASTER )->select( @@ -725,6 +751,28 @@ public function getPrimaryKeyColumns() { return $this->primaryKey; } + + /** +* Internal security function which checks a row object +* (for inclusion as a condition or a row for insert/update) +* for any numeric keys (= raw SQL), or field names with +* potentially unsafe characters. +* @param array $row The row to check. +* @return boolean True if raw SQL is found +*/ + protected function hasRawSQL( array $row ) { + foreach( $row as $key => $value ) { + if ( is_numeric( $key ) ) { + return true; + } + + if ( ! preg_match( '/^[A-Za-z\._]+$/', $key ) ) { + return true; + } + } + + return false; + } } /** -- To view, visit https://gerrit.wikimedia.org/r/98759 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id2ee63d876d6641b0590b7b37c9ef7f24dd497e7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] repool es1004 after upgrade - change (operations/mediawiki-config)
Springle has submitted this change and it was merged. Change subject: repool es1004 after upgrade .. repool es1004 after upgrade Change-Id: I80d65b41a11e7bcb588ffa620428bf3a3c741286 --- M wmf-config/db-eqiad.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Springle: Looks good to me, approved diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index 01e8655..9fbe4dd 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -19,7 +19,7 @@ '10.64.0.25' => 1, # es1001 '10.64.16.40' => 1, # es1002 '10.64.16.41' => 1, # es1003 - //'10.64.16.42' => 1, # es1004 + '10.64.16.42' => 1, # es1004 ); $wgLBFactoryConf = array( -- To view, visit https://gerrit.wikimedia.org/r/98758 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I80d65b41a11e7bcb588ffa620428bf3a3c741286 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Springle Gerrit-Reviewer: Springle Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] repool es1004 after upgrade - change (operations/mediawiki-config)
Springle has uploaded a new change for review. https://gerrit.wikimedia.org/r/98758 Change subject: repool es1004 after upgrade .. repool es1004 after upgrade Change-Id: I80d65b41a11e7bcb588ffa620428bf3a3c741286 --- M wmf-config/db-eqiad.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/58/98758/1 diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index 01e8655..9fbe4dd 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -19,7 +19,7 @@ '10.64.0.25' => 1, # es1001 '10.64.16.40' => 1, # es1002 '10.64.16.41' => 1, # es1003 - //'10.64.16.42' => 1, # es1004 + '10.64.16.42' => 1, # es1004 ); $wgLBFactoryConf = array( -- To view, visit https://gerrit.wikimedia.org/r/98758 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I80d65b41a11e7bcb588ffa620428bf3a3c741286 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Springle ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Collapse topic - change (mediawiki...Flow)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/98757 Change subject: Collapse topic .. Collapse topic Adds a toggle to switch between full, collapsed, and a new one-line view of topics. Only supports javascript currently. Mingle: 432 Change-Id: I1fd2cc1bf1fe50f81417ce5516334f5cb6e83562 --- M Flow.i18n.php M Resources.php A modules/base/images/toggle_collapsed_normal.svg A modules/base/images/toggle_collapsed_selected.svg A modules/base/images/toggle_complete_normal.svg A modules/base/images/toggle_complete_selected.svg A modules/base/images/toggle_one_line_normal.svg A modules/base/images/toggle_one_line_selected.svg A modules/discussion/styles/collapse.less M modules/discussion/ui.js M templates/topic.html.php M templates/topiclist.html.php 12 files changed, 211 insertions(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/57/98757/1 diff --git a/Flow.i18n.php b/Flow.i18n.php index f2480e5..9925e29 100644 --- a/Flow.i18n.php +++ b/Flow.i18n.php @@ -135,6 +135,7 @@ 'flow-history-pages-post' => 'Appears on [$1 $2]', 'flow-topic-participants' => '{{PLURAL:$1|$3 started this topic|{{GENDER:$3|$3}}, {{GENDER:$4|$4}}, {{GENDER:$5|$5}} and $2 {{PLURAL:$2|other|others}}|0=No participation yet|2={{GENDER:$3|$3}} and {{GENDER:$4|$4}}|3={{GENDER:$3|$3}}, {{GENDER:$4|$4}} and {{GENDER:$5|$5', 'flow-topic-comments' => '{{PLURAL:$1|Comment ($1)|Comments ($1)|0=Be the first to comment!}}', + 'flow-topic-meta-minimal' => '{{PLURAL:$1|0=Awaiting comments|$1 {{PLURAL:$1|comment|comments}} by $2 {{PLURAL:$2|user|users', 'flow-comment-restored' => 'Restored comment', 'flow-comment-deleted' => 'Deleted comment', @@ -604,6 +605,11 @@ Parameters: * $1 - The number of comments on this topic, can be used for PLURAL', + 'flow-topic-meta-minimal' => 'Message to display the amount of users and comments in a topic in the collapsed topic views. + +Parameters: +* $1 - The number of comments in this topic, can be used for PLURAL +* $2 - The number of users participating in this topic, can be used for PLURAL', 'flow-comment-restored' => 'Used as revision comment when the post has been restored. See also: diff --git a/Resources.php b/Resources.php index 6651fb9..cc75b8d 100644 --- a/Resources.php +++ b/Resources.php @@ -50,6 +50,7 @@ 'styles' => array( 'discussion/styles/topic.less', 'discussion/styles/post.less', + 'discussion/styles/collapse.less', ), 'scripts' => array( 'discussion/ui.js', diff --git a/modules/base/images/toggle_collapsed_normal.svg b/modules/base/images/toggle_collapsed_normal.svg new file mode 100644 index 000..089986e --- /dev/null +++ b/modules/base/images/toggle_collapsed_normal.svg @@ -0,0 +1,11 @@ + + +http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";> +http://www.w3.org/2000/svg"; xmlns:xlink="http://www.w3.org/1999/xlink"; x="0px" y="0px" +width="80px" height="80px" viewBox="0 0 80 80" enable-background="new 0 0 80 80" xml:space="preserve"> + + + + + + diff --git a/modules/base/images/toggle_collapsed_selected.svg b/modules/base/images/toggle_collapsed_selected.svg new file mode 100644 index 000..ff6acb6 --- /dev/null +++ b/modules/base/images/toggle_collapsed_selected.svg @@ -0,0 +1,11 @@ + + +http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";> +http://www.w3.org/2000/svg"; xmlns:xlink="http://www.w3.org/1999/xlink"; x="0px" y="0px" +width="80px" height="80px" viewBox="0 0 80 80" enable-background="new 0 0 80 80" xml:space="preserve"> + + + + + + diff --git a/modules/base/images/toggle_complete_normal.svg b/modules/base/images/toggle_complete_normal.svg new file mode 100644 index 000..fbadab1 --- /dev/null +++ b/modules/base/images/toggle_complete_normal.svg @@ -0,0 +1,12 @@ + + +http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";> +http://www.w3.org/2000/svg"; xmlns:xlink="http://www.w3.org/1999/xlink"; x="0px" y="0px" +width="80px" height="80px" viewBox="0 0 80 80" enable-background="new 0 0 80 80" xml:space="preserve"> + + + + + + + diff --git a/modules/base/images/toggle_complete_selected.svg b/modules/base/images/toggle_complete_selected.svg new file mode 100644 index 000..f35c63b --- /dev/null +++ b/modules/base/images/toggle_complete_selected.svg @@ -0,0 +1,12 @@ + + +http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";> +http://www.w3.org/2000/svg"; xmlns:xlink="http://www.w3.org/1999/xlink"; x="0px" y="0px" +width="80px" height="80px" viewBox="0 0 80 80" enable-background="new 0 0 80 80" xml:space="preserve"> + + + + + + + diff --git a/modules/base/images/togg
[MediaWiki-commits] [Gerrit] switch es1004 to mariadb - change (operations/puppet)
Springle has submitted this change and it was merged. Change subject: switch es1004 to mariadb .. switch es1004 to mariadb Change-Id: I039fe3a09d2ee39567296d4c1983000afc5ff256 --- M manifests/site.pp 1 file changed, 5 insertions(+), 1 deletion(-) Approvals: Springle: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/site.pp b/manifests/site.pp index 1b48dca..7e3e787 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -932,7 +932,11 @@ # es1 equad node /es100[1-4]\.eqiad\.wmnet/ { -include role::coredb::es1 +if $::hostname =~ /^es1004/ { +class { role::coredb::es1 : mariadb => true } +} else { +include role::coredb::es1 +} } node /es[1-4]\.pmtpa\.wmnet/ { -- To view, visit https://gerrit.wikimedia.org/r/98756 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I039fe3a09d2ee39567296d4c1983000afc5ff256 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Springle Gerrit-Reviewer: Springle Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] switch es1004 to mariadb - change (operations/puppet)
Springle has uploaded a new change for review. https://gerrit.wikimedia.org/r/98756 Change subject: switch es1004 to mariadb .. switch es1004 to mariadb Change-Id: I039fe3a09d2ee39567296d4c1983000afc5ff256 --- M manifests/site.pp 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/56/98756/1 diff --git a/manifests/site.pp b/manifests/site.pp index dca30c2..5ee228a 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -932,7 +932,11 @@ # es1 equad node /es100[1-4]\.eqiad\.wmnet/ { -include role::coredb::es1 +if $::hostname =~ /^es1004/ { +class { role::coredb::es1 : mariadb => true } +} else { +include role::coredb::es1 +} } node /es[1-4]\.pmtpa\.wmnet/ { -- To view, visit https://gerrit.wikimedia.org/r/98756 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I039fe3a09d2ee39567296d4c1983000afc5ff256 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Springle ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added handling for simple arrays (holding just a group of va... - change (mediawiki...ExternalData)
Yaron Koren has submitted this change and it was merged. Change subject: Added handling for simple arrays (holding just a group of values) in JSON .. Added handling for simple arrays (holding just a group of values) in JSON Change-Id: Icb32c21e70f2ccce969c7a7ea1556760e8d75e48 --- M ED_Utils.php 1 file changed, 22 insertions(+), 1 deletion(-) Approvals: Yaron Koren: Verified; Looks good to me, approved diff --git a/ED_Utils.php b/ED_Utils.php index c7656bb..6bdbeec 100644 --- a/ED_Utils.php +++ b/ED_Utils.php @@ -686,12 +686,33 @@ } /** +* Helper function that determines whether an array holds a simple +* list of scalar values, with no keys (i.e., not an associative +* array). +*/ + static function holdsSimpleList( $arr ) { + $expectedKey = 0; + foreach( $arr as $key => $val ) { + if ( is_array( $val ) || $key != $expectedKey++ ) { + return false; + } + } + return true; + } + + /** * Recursive JSON-parsing function for use by getJSONData(). */ static function parseTree( $tree, &$retrieved_values ) { foreach ( $tree as $key => $val ) { // TODO - this logic could probably be a little nicer. - if ( is_array( $val ) && count( $val ) > 1 ) { + if ( is_array( $val ) && self::holdsSimpleList( $val ) ) { + // If it just holds a simple list, turn the + // array into a comma-separated list, then + // pass it back in in order to do the final // processing. + $val = array( $key => implode( ', ', $val ) ); + self::parseTree( $val, $retrieved_values ); + } elseif ( is_array( $val ) && count( $val ) > 1 ) { self::parseTree( $val, $retrieved_values ); } elseif ( is_array( $val ) && count( $val ) == 1 && is_array( current( $val ) ) ) { self::parseTree( current( $val ), $retrieved_values ); -- To view, visit https://gerrit.wikimedia.org/r/98755 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icb32c21e70f2ccce969c7a7ea1556760e8d75e48 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ExternalData Gerrit-Branch: master Gerrit-Owner: Yaron Koren Gerrit-Reviewer: Yaron Koren ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added handling for simple arrays (holding just a group of va... - change (mediawiki...ExternalData)
Yaron Koren has uploaded a new change for review. https://gerrit.wikimedia.org/r/98755 Change subject: Added handling for simple arrays (holding just a group of values) in JSON .. Added handling for simple arrays (holding just a group of values) in JSON Change-Id: Icb32c21e70f2ccce969c7a7ea1556760e8d75e48 --- M ED_Utils.php 1 file changed, 22 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ExternalData refs/changes/55/98755/1 diff --git a/ED_Utils.php b/ED_Utils.php index c7656bb..6bdbeec 100644 --- a/ED_Utils.php +++ b/ED_Utils.php @@ -686,12 +686,33 @@ } /** +* Helper function that determines whether an array holds a simple +* list of scalar values, with no keys (i.e., not an associative +* array). +*/ + static function holdsSimpleList( $arr ) { + $expectedKey = 0; + foreach( $arr as $key => $val ) { + if ( is_array( $val ) || $key != $expectedKey++ ) { + return false; + } + } + return true; + } + + /** * Recursive JSON-parsing function for use by getJSONData(). */ static function parseTree( $tree, &$retrieved_values ) { foreach ( $tree as $key => $val ) { // TODO - this logic could probably be a little nicer. - if ( is_array( $val ) && count( $val ) > 1 ) { + if ( is_array( $val ) && self::holdsSimpleList( $val ) ) { + // If it just holds a simple list, turn the + // array into a comma-separated list, then + // pass it back in in order to do the final // processing. + $val = array( $key => implode( ', ', $val ) ); + self::parseTree( $val, $retrieved_values ); + } elseif ( is_array( $val ) && count( $val ) > 1 ) { self::parseTree( $val, $retrieved_values ); } elseif ( is_array( $val ) && count( $val ) == 1 && is_array( current( $val ) ) ) { self::parseTree( current( $val ), $retrieved_values ); -- To view, visit https://gerrit.wikimedia.org/r/98755 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icb32c21e70f2ccce969c7a7ea1556760e8d75e48 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ExternalData Gerrit-Branch: master Gerrit-Owner: Yaron Koren ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] ExternalStoreDB: update for PHP 5 - change (mediawiki/core)
Tim Starling has uploaded a new change for review. https://gerrit.wikimedia.org/r/98754 Change subject: ExternalStoreDB: update for PHP 5 .. ExternalStoreDB: update for PHP 5 Support for PHP 4 was dropped in 2006, so the ampersands are no longer needed. I guess this code doesn't get looked at very often. Change-Id: I344043d17061014d4370d8f68b3bc86b8c4f9453 --- M includes/externalstore/ExternalStoreDB.php 1 file changed, 11 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/54/98754/1 diff --git a/includes/externalstore/ExternalStoreDB.php b/includes/externalstore/ExternalStoreDB.php index 8c2147a..b7e5469 100644 --- a/includes/externalstore/ExternalStoreDB.php +++ b/includes/externalstore/ExternalStoreDB.php @@ -37,7 +37,7 @@ */ public function fetchFromURL( $url ) { list( $cluster, $id, $itemID ) = $this->parseURL( $url ); - $ret =& $this->fetchBlob( $cluster, $id, $itemID ); + $ret = $this->fetchBlob( $cluster, $id, $itemID ); if ( $itemID !== false && $ret !== false ) { return $ret->getItem( $itemID ); @@ -109,7 +109,7 @@ * @param string $cluster cluster name * @return LoadBalancer object */ - function &getLoadBalancer( $cluster ) { + function getLoadBalancer( $cluster ) { $wiki = isset( $this->params['wiki'] ) ? $this->params['wiki'] : false; return wfGetLBFactory()->getExternalLB( $cluster, $wiki ); @@ -121,11 +121,11 @@ * @param string $cluster cluster name * @return DatabaseBase object */ - function &getSlave( $cluster ) { + function getSlave( $cluster ) { global $wgDefaultExternalStore; $wiki = isset( $this->params['wiki'] ) ? $this->params['wiki'] : false; - $lb =& $this->getLoadBalancer( $cluster ); + $lb = $this->getLoadBalancer( $cluster ); if ( !in_array( "DB://" . $cluster, (array)$wgDefaultExternalStore ) ) { wfDebug( "read only external store" ); @@ -143,9 +143,9 @@ * @param string $cluster cluster name * @return DatabaseBase object */ - function &getMaster( $cluster ) { + function getMaster( $cluster ) { $wiki = isset( $this->params['wiki'] ) ? $this->params['wiki'] : false; - $lb =& $this->getLoadBalancer( $cluster ); + $lb = $this->getLoadBalancer( $cluster ); return $lb->getConnection( DB_MASTER, array(), $wiki ); } @@ -156,7 +156,7 @@ * @param $db DatabaseBase * @return String: table name ('blobs' by default) */ - function getTable( &$db ) { + function getTable( $db ) { $table = $db->getLBInfo( 'blobs table' ); if ( is_null( $table ) ) { $table = 'blobs'; @@ -175,7 +175,7 @@ * @return mixed * @private */ - function &fetchBlob( $cluster, $id, $itemID ) { + function fetchBlob( $cluster, $id, $itemID ) { /** * One-step cache variable to hold base blobs; operations that * pull multiple revisions may often pull multiple times from @@ -195,14 +195,14 @@ wfDebugLog( 'ExternalStoreDB-cache', "ExternalStoreDB::fetchBlob cache miss on $cacheID\n" ); - $dbr =& $this->getSlave( $cluster ); + $dbr = $this->getSlave( $cluster ); $ret = $dbr->selectField( $this->getTable( $dbr ), 'blob_text', array( 'blob_id' => $id ), __METHOD__ ); if ( $ret === false ) { wfDebugLog( 'ExternalStoreDB', "ExternalStoreDB::fetchBlob master fallback on $cacheID\n" ); // Try the master - $dbw =& $this->getMaster( $cluster ); + $dbw = $this->getMaster( $cluster ); $ret = $dbw->selectField( $this->getTable( $dbw ), 'blob_text', array( 'blob_id' => $id ), __METHOD__ ); if ( $ret === false ) { @@ -215,7 +215,7 @@ $ret = unserialize( $ret ); } - $externalBlobCache = array( $cacheID => &$ret ); + $externalBlobCache = array( $cacheID => $ret ); return $ret; } -- To view, visit https://gerrit.wikimedia.org/r/98754 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I344043d17061014d4370d8f68b3bc86b8c4f9453 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Tim Starling _
[MediaWiki-commits] [Gerrit] Restore Signupstart and Signupend messages for account creation - change (mediawiki/core)
MarkAHershberger has submitted this change and it was merged. Change subject: Restore Signupstart and Signupend messages for account creation .. Restore Signupstart and Signupend messages for account creation This was removed during the redesign of the login process in I50f25583, but I found that 5-10% of non-wmf wiki sites used this message to display notices, previously. We should keep this around or at the very least provide advance notice for people. Bug: 56455 Change-Id: I79423c1a05f0359c902d1940c3ffcd5e509dcf97 (cherry picked from commit 8cfedc494ab6dcdfd0c0ac8202b1685b2ab9581f) --- M includes/templates/Usercreate.php 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: Bartosz Dziewoński: Looks good to me, but someone else must approve MarkAHershberger: Looks good to me, approved diff --git a/includes/templates/Usercreate.php b/includes/templates/Usercreate.php index 4750af9..fcd492c 100644 --- a/includes/templates/Usercreate.php +++ b/includes/templates/Usercreate.php @@ -46,6 +46,9 @@ html( 'languages' ); ?> + isDisabled() ) { ?> + msgWiki( 'signupstart' ); ?> @@ -262,6 +265,9 @@ haveData( 'uselang' ) ) { ?> haveData( 'token' ) ) { ?> + isDisabled() ) { ?> + html( 'signupend' ); ?> + msg( 'createacct-benefit-heading' ); ?> -- To view, visit https://gerrit.wikimedia.org/r/97192 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I79423c1a05f0359c902d1940c3ffcd5e509dcf97 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_22 Gerrit-Owner: MarkAHershberger Gerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: MarkAHershberger 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 all versions of IE, as IE11 is now out - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Blacklist all versions of IE, as IE11 is now out .. Blacklist all versions of IE, as IE11 is now out … and is completely broken still. Change-Id: Ib8ddd40892688bd919ccc9d690e7bd3f2de6645e --- M VisualEditor.php 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/VisualEditor.php b/VisualEditor.php index c20246c..24b2055 100644 --- a/VisualEditor.php +++ b/VisualEditor.php @@ -875,7 +875,8 @@ // IE9 and IE10 generally work but fail in ajax handling when making POST // requests to the VisualEditor/Parsoid API which is causing silent failures // when trying to save a page (bug 49187) - 'msie' => array( array( '<=', 10 ) ), + // Also, IE11 doesn't work either right now + 'msie' => null, // Android 2.x and below "support" CE but don't trigger keyboard input 'android' => array( array( '<', 3 ) ), // Firefox issues in versions 12 and below (bug 50780) -- To view, visit https://gerrit.wikimedia.org/r/98753 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib8ddd40892688bd919ccc9d690e7bd3f2de6645e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Jforrester Gerrit-Reviewer: Catrope Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Blacklist all versions of IE, as IE11 is now out - change (mediawiki...VisualEditor)
Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/98753 Change subject: Blacklist all versions of IE, as IE11 is now out .. Blacklist all versions of IE, as IE11 is now out … and is completely broken still. Change-Id: Ib8ddd40892688bd919ccc9d690e7bd3f2de6645e --- M VisualEditor.php 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/53/98753/1 diff --git a/VisualEditor.php b/VisualEditor.php index c20246c..24b2055 100644 --- a/VisualEditor.php +++ b/VisualEditor.php @@ -875,7 +875,8 @@ // IE9 and IE10 generally work but fail in ajax handling when making POST // requests to the VisualEditor/Parsoid API which is causing silent failures // when trying to save a page (bug 49187) - 'msie' => array( array( '<=', 10 ) ), + // Also, IE11 doesn't work either right now + 'msie' => null, // Android 2.x and below "support" CE but don't trigger keyboard input 'android' => array( array( '<', 3 ) ), // Firefox issues in versions 12 and below (bug 50780) -- To view, visit https://gerrit.wikimedia.org/r/98753 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib8ddd40892688bd919ccc9d690e7bd3f2de6645e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Jforrester ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use a global resizing flag on the surface to hide phantoms - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Use a global resizing flag on the surface to hide phantoms .. Use a global resizing flag on the surface to hide phantoms Otherwise you get rendering issues when you resizing adjacent resizable nodes and you drag over the other node. Change-Id: Ie70833fa6ae38879b70a19e8d7ecec13a1d54e92 --- M modules/ve/ce/ve.ce.ProtectedNode.js M modules/ve/ce/ve.ce.ResizableNode.js M modules/ve/ce/ve.ce.Surface.js 3 files changed, 4 insertions(+), 1 deletion(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve/ce/ve.ce.ProtectedNode.js b/modules/ve/ce/ve.ce.ProtectedNode.js index b32d07c..407ec37 100644 --- a/modules/ve/ce/ve.ce.ProtectedNode.js +++ b/modules/ve/ce/ve.ce.ProtectedNode.js @@ -163,7 +163,7 @@ * @method */ ve.ce.ProtectedNode.prototype.onProtectedMouseEnter = function () { - if ( !this.root.getSurface().dragging && !this.resizing ) { + if ( !this.root.getSurface().dragging && !this.root.getSurface().resizing ) { this.createPhantoms(); } }; diff --git a/modules/ve/ce/ve.ce.ResizableNode.js b/modules/ve/ce/ve.ce.ResizableNode.js index 94cba3b..58bab9b 100644 --- a/modules/ve/ce/ve.ce.ResizableNode.js +++ b/modules/ve/ce/ve.ce.ResizableNode.js @@ -246,6 +246,7 @@ // Bind resize events this.resizing = true; + this.root.getSurface().resizing = true; this.updateSizeLabel( this.resizeInfo ); this.$( this.getElementDocument() ).on( { 'mousemove.ve-ce-resizableNode': ve.bind( this.onDocumentMouseMove, this ), @@ -409,6 +410,7 @@ this.$resizeHandles.removeClass( 've-ce-resizableNode-handles-resizing' ); this.$( this.getElementDocument() ).off( '.ve-ce-resizableNode' ); this.resizing = false; + this.root.getSurface().resizing = false; this.updateSizeLabel(); // Apply changes to the model diff --git a/modules/ve/ce/ve.ce.Surface.js b/modules/ve/ce/ve.ce.Surface.js index 125b7d9..4daa7ab 100644 --- a/modules/ve/ce/ve.ce.Surface.js +++ b/modules/ve/ce/ve.ce.Surface.js @@ -45,6 +45,7 @@ this.dragging = false; this.relocating = false; this.selecting = false; + this.resizing = false; this.contentBranchNodeChanged = false; this.$phantoms = this.$( '' ); this.$highlights = this.$( '' ); -- To view, visit https://gerrit.wikimedia.org/r/94884 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie70833fa6ae38879b70a19e8d7ecec13a1d54e92 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders Gerrit-Reviewer: Catrope Gerrit-Reviewer: Esanders Gerrit-Reviewer: Krinkle Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Pressing enter in a list with no nearby content creates a pa... - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Pressing enter in a list with no nearby content creates a paragraph .. Pressing enter in a list with no nearby content creates a paragraph Currently we assume getNearestContentOffset will give us something sane however it can return -1 when there is no nearby content and so an exception is thrown. In this case we have to create an empty paragraph to place the cursor in. Change-Id: Ic6c19da881e47ff6be45cdaa4b71bfcc1c654796 --- M modules/ve/ce/ve.ce.Surface.js M modules/ve/test/ce/ve.ce.Surface.test.js 2 files changed, 26 insertions(+), 5 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve/ce/ve.ce.Surface.js b/modules/ve/ce/ve.ce.Surface.js index 7f7a57c..4d49053 100644 --- a/modules/ve/ce/ve.ce.Surface.js +++ b/modules/ve/ce/ve.ce.Surface.js @@ -1658,13 +1658,20 @@ // Now we can move the cursor forward if ( advanceCursor ) { - this.model.setSelection( - new ve.Range( documentModel.data.getRelativeContentOffset( selection.from, 1 ) ) - ); + cursor = documentModel.data.getRelativeContentOffset( selection.from, 1 ); } else { - this.model.setSelection( - new ve.Range( documentModel.data.getNearestContentOffset( selection.from ) ) + cursor = documentModel.data.getNearestContentOffset( selection.from ); + } + if ( cursor === -1 ) { + // Cursor couldn't be placed in a nearby content node, so create an empty paragraph + this.model.change( + ve.dm.Transaction.newFromInsertion( + documentModel, selection.from, emptyParagraph + ) ); + this.model.setSelection( new ve.Range( selection.from + 1 ) ); + } else { + this.model.setSelection( new ve.Range( cursor ) ); } // Reset and resume polling this.surfaceObserver.clear(); diff --git a/modules/ve/test/ce/ve.ce.Surface.test.js b/modules/ve/test/ce/ve.ce.Surface.test.js index ed765a1..7468978 100644 --- a/modules/ve/test/ce/ve.ce.Surface.test.js +++ b/modules/ve/test/ce/ve.ce.Surface.test.js @@ -312,6 +312,20 @@ }, 'expectedRange': new ve.Range( 1 ), 'msg': 'Enter in an empty list at start of document destroys it and moves to next paragraph' + }, + { + 'html': emptyList, + 'range': new ve.Range( 3 ), + 'operations': ['enter'], + 'expectedData': function ( data ) { + data.splice( + 0, 6, + { 'type': 'paragraph' }, + { 'type': '/paragraph' } + ); + }, + 'expectedRange': new ve.Range( 1 ), + 'msg': 'Enter in an empty list with no adjacent content destroys it and creates a paragraph' } ]; -- To view, visit https://gerrit.wikimedia.org/r/98532 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic6c19da881e47ff6be45cdaa4b71bfcc1c654796 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders Gerrit-Reviewer: Catrope Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] ve.ce.Surface.handleEnter tests - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: ve.ce.Surface.handleEnter tests .. ve.ce.Surface.handleEnter tests Change-Id: Ic30cd4e116029be85822f73dcb84938e641bc4b9 --- M modules/ve/test/ce/ve.ce.Surface.test.js M modules/ve/test/ve.test.utils.js 2 files changed, 186 insertions(+), 7 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve/test/ce/ve.ce.Surface.test.js b/modules/ve/test/ce/ve.ce.Surface.test.js index 4eeb46d..ed765a1 100644 --- a/modules/ve/test/ce/ve.ce.Surface.test.js +++ b/modules/ve/test/ce/ve.ce.Surface.test.js @@ -16,7 +16,9 @@ 'backspace': [ 'handleDelete', {}, true ], 'delete': [ 'handleDelete', {}, false ], 'modifiedBackspace': [ 'handleDelete', { 'ctrlKey': true }, true ], - 'modifiedDelete': [ 'handleDelete', { 'ctrlKey': true }, false ] + 'modifiedDelete': [ 'handleDelete', { 'ctrlKey': true }, false ], + 'enter': [ 'handleEnter', {}, true ], + 'modifiedEnter': [ 'handleEnter', { 'shiftKey': true }, false ] }, surface = ve.test.utils.createSurfaceFromHtml( html || ve.dm.example.html ), view = surface.getView(), @@ -132,6 +134,184 @@ }, 'expectedRange': new ve.Range( 39 ), 'msg': 'Focusable node deleted if selected first' + } + ]; + + QUnit.expect( cases.length * 2 ); + + for ( i = 0; i < cases.length; i++ ) { + ve.test.utils.runSurfaceHandleSpecialKeyTest( + assert, cases[i].html, cases[i].range, cases[i].operations, + cases[i].expectedData, cases[i].expectedRange, cases[i].msg + ); + } +} ); + +QUnit.test( 'handleEnter', function ( assert ) { + var i, + emptyList = '', + cases = [ + { + 'range': new ve.Range( 57 ), + 'operations': ['enter'], + 'expectedData': function ( data ) { + data.splice( + 57, 0, + { 'type': '/paragraph' }, + { 'type': 'paragraph' } + ); + }, + 'expectedRange': new ve.Range( 59 ), + 'msg': 'End of paragraph split by enter' + }, + { + 'range': new ve.Range( 57 ), + 'operations': ['modifiedEnter'], + 'expectedData': function ( data ) { + data.splice( + 57, 0, + { 'type': '/paragraph' }, + { 'type': 'paragraph' } + ); + }, + 'expectedRange': new ve.Range( 59 ), + 'msg': 'End of paragraph split by modified enter' + }, + { + 'range': new ve.Range( 56 ), + 'operations': ['enter'], + 'expectedData': function ( data ) { + data.splice( + 56, 0, + { 'type': '/paragraph' }, + { 'type': 'paragraph' } + ); + }, + 'expectedRange': new ve.Range( 58 ), + 'msg': 'Start of paragraph split by enter' + }, + { + 'range': new ve.Range( 3 ), + 'operations': ['enter'], + 'expectedData': function ( data ) { + data.splice( + 3, 0, + { 'type': '/heading' }, + { 'type': 'heading', 'attributes': { 'level': 1 } } + ); + }, + 'expectedRange': new ve.Range( 5 ), + 'msg'
[MediaWiki-commits] [Gerrit] Genericise runSurfaceHandleDeleteTest to work with other 'ha... - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Genericise runSurfaceHandleDeleteTest to work with other 'handle' methods .. Genericise runSurfaceHandleDeleteTest to work with other 'handle' methods We will want to reuse this test runner for handleEnter and handleInsertion. Change-Id: I7489bf2d20fa17b1c164ff20e0cfcd9b9d5102d2 --- M modules/ve-mw/test/ce/ve.ce.Surface.test.js M modules/ve/test/ce/ve.ce.Surface.test.js 2 files changed, 12 insertions(+), 12 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/test/ce/ve.ce.Surface.test.js b/modules/ve-mw/test/ce/ve.ce.Surface.test.js index 1eb190c..58dd4e8 100644 --- a/modules/ve-mw/test/ce/ve.ce.Surface.test.js +++ b/modules/ve-mw/test/ce/ve.ce.Surface.test.js @@ -52,7 +52,7 @@ QUnit.expect( cases.length * 2 ); for ( i = 0; i < cases.length; i++ ) { - ve.test.utils.runSurfaceHandleDeleteTest( + ve.test.utils.runSurfaceHandleSpecialKeyTest( assert, cases[i].html, cases[i].range, cases[i].operations, cases[i].expectedData, cases[i].expectedRange, cases[i].msg ); diff --git a/modules/ve/test/ce/ve.ce.Surface.test.js b/modules/ve/test/ce/ve.ce.Surface.test.js index 39259da..4eeb46d 100644 --- a/modules/ve/test/ce/ve.ce.Surface.test.js +++ b/modules/ve/test/ce/ve.ce.Surface.test.js @@ -9,14 +9,14 @@ /* Tests */ -ve.test.utils.runSurfaceHandleDeleteTest = function ( assert, html, range, operations, expectedData, expectedRange, msg ) { - var i, args, +ve.test.utils.runSurfaceHandleSpecialKeyTest = function ( assert, html, range, operations, expectedData, expectedRange, msg ) { + var i, method, args, selection, - deleteArgs = { - 'backspace': [ {}, true ], - 'delete': [ {}, false ], - 'modifiedBackspace': [ { 'ctrlKey': true }, true ], - 'modifiedDelete': [ { 'ctrlKey': true }, false ] + actions = { + 'backspace': [ 'handleDelete', {}, true ], + 'delete': [ 'handleDelete', {}, false ], + 'modifiedBackspace': [ 'handleDelete', { 'ctrlKey': true }, true ], + 'modifiedDelete': [ 'handleDelete', { 'ctrlKey': true }, false ] }, surface = ve.test.utils.createSurfaceFromHtml( html || ve.dm.example.html ), view = surface.getView(), @@ -33,8 +33,9 @@ model.setSelection( range ); for ( i = 0; i < operations.length; i++ ) { - args = deleteArgs[operations[i]]; - view.handleDelete( args[0], args[1] ); + method = actions[operations[i]][0]; + args = actions[operations[i]].slice( 1 ); + view[method].apply( view, args ); } expectedData( data ); @@ -137,7 +138,7 @@ QUnit.expect( cases.length * 2 ); for ( i = 0; i < cases.length; i++ ) { - ve.test.utils.runSurfaceHandleDeleteTest( + ve.test.utils.runSurfaceHandleSpecialKeyTest( assert, cases[i].html, cases[i].range, cases[i].operations, cases[i].expectedData, cases[i].expectedRange, cases[i].msg ); @@ -604,7 +605,6 @@ // TODO: ve.ce.Surface#handleUpOrDownArrowKey // TODO: ve.ce.Surface#handleInsertion // TODO: ve.ce.Surface#handleEnter -// TODO: ve.ce.Surface#handleDelete // TODO: ve.ce.Surface#showSelection // TODO: ve.ce.Surface#replacePhantoms // TODO: ve.ce.Surface#replaceHighlight -- To view, visit https://gerrit.wikimedia.org/r/98528 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7489bf2d20fa17b1c164ff20e0cfcd9b9d5102d2 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders Gerrit-Reviewer: Catrope Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] csslint: Add .csslintignore file and update gruntfile - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: csslint: Add .csslintignore file and update gruntfile .. csslint: Add .csslintignore file and update gruntfile Add .csslintignore file for the csslint run by Jenkins. Also updating our Gruntfile for local usage to include demos, which Jenkins is going to include as well (as it uses an ignore blacklist instead of whitelist). Change-Id: I9114cfc54e82f090f0fcf62155ef7c1a9261548d --- A .csslintignore M Gruntfile.js 2 files changed, 7 insertions(+), 1 deletion(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/.csslintignore b/.csslintignore new file mode 100644 index 000..9a27708 --- /dev/null +++ b/.csslintignore @@ -0,0 +1,6 @@ +docs/** +modules/jquery.uls/** +modules/jsdifflib/** +modules/oojs-ui/** +modules/qunit/** +node_modules/** diff --git a/Gruntfile.js b/Gruntfile.js index 429a5f1..812da8f 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -25,7 +25,7 @@ options: { csslintrc: '.csslintrc' }, - all: 'modules/{syntaxhighlight,ve,ve-mw}/**/*.css', + all: ['demos/**/*.css', 'modules/{syntaxhighlight,ve,ve-mw}/**/*.css'], }, qunit: { ve: 'modules/ve/test/index-phantomjs-tmp.html' -- To view, visit https://gerrit.wikimedia.org/r/98721 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9114cfc54e82f090f0fcf62155ef7c1a9261548d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Krinkle Gerrit-Reviewer: Catrope Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] csslint: Add .csslintignore file - change (oojs/ui)
jenkins-bot has submitted this change and it was merged. Change subject: csslint: Add .csslintignore file .. csslint: Add .csslintignore file Note that the minimatch glob csslint uses doesn't support "dir" or "dir/", it needs "dir/**" to recursively exclude a directory: - "file" - "unsupported/" - "dir-contents/*" - "dir-contents-and-recurse/**" We're excluding dist/ because there's certain warnings that only trigger in csslint when there are lots of rules (such as the warning about "too many usage of floats") which are being triggered otherewise. Change-Id: I7d34f07f1d8352261ad97291e215b68da363faba --- A .csslintignore 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/.csslintignore b/.csslintignore new file mode 100644 index 000..950ca9d --- /dev/null +++ b/.csslintignore @@ -0,0 +1,3 @@ +dist/** +lib/** +node_modules/** -- To view, visit https://gerrit.wikimedia.org/r/98720 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7d34f07f1d8352261ad97291e215b68da363faba Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: Krinkle Gerrit-Reviewer: Catrope Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Clear cache key when deactivating target - change (mediawiki...VisualEditor)
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/98752 Change subject: Clear cache key when deactivating target .. Clear cache key when deactivating target And other state too, while we're at it. Bug: 57905 Change-Id: Ifd2744c841f302764cf57c13f4a760cbe80fa2e0 --- M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js M modules/ve-mw/init/ve.init.mw.Target.js 2 files changed, 26 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/52/98752/1 diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js index 4af11f6..781738f 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js @@ -215,6 +215,9 @@ this.loading.abort(); } + this.clearState(); + this.docToSave = null; + this.deactivating = false; mw.hook( 've.deactivationComplete' ).fire(); } diff --git a/modules/ve-mw/init/ve.init.mw.Target.js b/modules/ve-mw/init/ve.init.mw.Target.js index 543a756..2d16187 100644 --- a/modules/ve-mw/init/ve.init.mw.Target.js +++ b/modules/ve-mw/init/ve.init.mw.Target.js @@ -60,20 +60,7 @@ this.pluginCallbacks = []; this.modulesReady = $.Deferred(); this.preparedCacheKeyPromise = null; - this.loading = false; - this.saving = false; - this.diffing = false; - this.serializing = false; - this.submitting = false; - this.baseTimeStamp = null; - this.startTimeStamp = null; - this.doc = null; - this.editNotices = null; - this.$checkboxes = null; - this.remoteNotices = []; - this.localNoticeMessages = []; - this.sanityCheckFinished = false; - this.sanityCheckVerified = false; + this.clearState(); this.isMobileDevice = ( 'ontouchstart' in window || ( window.DocumentTouch && document instanceof window.DocumentTouch ) @@ -745,6 +732,28 @@ }; /** + * Clear the state of this target, preparing it to be reactivated later. + */ +ve.init.mw.Target.prototype.clearState = function () { + this.clearPreparedCacheKey(); + this.loading = false; + this.saving = false; + this.diffing = false; + this.serializing = false; + this.submitting = false; + this.baseTimeStamp = null; + this.startTimeStamp = null; + this.doc = null; + this.originalHtml = null; + this.editNotices = null; + this.$checkboxes = null; + this.remoteNotices = []; + this.localNoticeMessages = []; + this.sanityCheckFinished = false; + this.sanityCheckVerified = false; +}; + +/** * Serialize the current document and store the result in the serialization cache on the server. * * This function returns a promise that is resolved once serialization is complete, with the -- To view, visit https://gerrit.wikimedia.org/r/98752 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifd2744c841f302764cf57c13f4a760cbe80fa2e0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Catrope ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add hook handler for GlobalCssJs - change (mediawiki...CentralAuth)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/98751 Change subject: Add hook handler for GlobalCssJs .. Add hook handler for GlobalCssJs Just checks that the account is attached on both the global and current site. Bug: 57889 Change-Id: Ia321f0af4867bae9029111e7d29d378bcc4b9bb0 --- M CentralAuth.php M CentralAuthHooks.php 2 files changed, 16 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth refs/changes/51/98751/1 diff --git a/CentralAuth.php b/CentralAuth.php index 0026379..b7b62d9 100644 --- a/CentralAuth.php +++ b/CentralAuth.php @@ -299,6 +299,9 @@ $wgHooks['OAuthGetCentralIdFromUserName'][] = 'CentralAuthHooks::onOAuthGetCentralIdFromUserName'; $wgHooks['OAuthGetUserNamesFromCentralIds'][] = 'CentralAuthHooks::onOAuthGetUserNamesFromCentralIds'; +// For GlobalCssJs +$wgHooks['LoadGlobalCssJs'][] = 'CentralAuthHooks::onLoadGlobalCssJs'; + $wgAvailableRights[] = 'centralauth-merge'; $wgAvailableRights[] = 'centralauth-unmerge'; $wgAvailableRights[] = 'centralauth-lock'; diff --git a/CentralAuthHooks.php b/CentralAuthHooks.php index dc7bd1e..a7c3b00 100644 --- a/CentralAuthHooks.php +++ b/CentralAuthHooks.php @@ -1534,4 +1534,17 @@ $id = $centralUser->getId(); return true; } + + /** +* @param User $user +* @param string $global "global wiki" +* @param string $local wiki user is currently visiting +* @return bool +* @see https://www.mediawiki.org/wiki/Extension:GlobalCssJs/LoadGlobalCssJs +*/ + public static function onLoadGlobalCssJs( User $user, $global, $local ) { + $caUser = CentralAuthUser::getInstance( $user ); + + return $caUser->attachedOn( $global ) && $caUser->attachedOn( $local ); + } } -- To view, visit https://gerrit.wikimedia.org/r/98751 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia321f0af4867bae9029111e7d29d378bcc4b9bb0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralAuth Gerrit-Branch: master Gerrit-Owner: Legoktm Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix a fatal error on topic history - change (mediawiki...Flow)
Bsitu has uploaded a new change for review. https://gerrit.wikimedia.org/r/98750 Change subject: Fix a fatal error on topic history .. Fix a fatal error on topic history Cause: We put board history ( header change + topic title change ) inside header block, when rendering topic title change, we are passing post revision to the header block getUrlQuery() function, which expects a header revision. Maybe we should fix it in a way that board history gets encapsulated in a block that it belongs to, this will invole some refactoring on the code so it takes some additional block component without requiring a physical id, eg: block=board-history, Current fix: Move getUrlQuery() to Url Generator, generate workflowid for post records coming from board history Change-Id: I6061af54ebef24ee6e708ab6d247ecec1f868728 --- M includes/Block/Header.php M includes/Block/Topic.php M includes/UrlGenerator.php M includes/View/History/HistoryRenderer.php M templates/compare-revisions.html.php 5 files changed, 49 insertions(+), 43 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/50/98750/1 diff --git a/includes/Block/Header.php b/includes/Block/Header.php index ee5b88c..f841a58 100644 --- a/includes/Block/Header.php +++ b/includes/Block/Header.php @@ -168,15 +168,4 @@ return 'header'; } - /** -* Builds query info to use with urlGenerator, to link to a specific -* Header. -* -* @param Header $revision -* @param bool[optional] $specificRevision Link to this specific revision? -* @return array -*/ - public function getUrlQuery( Header $revision, $specificRevision = false ) { - return array(); - } } diff --git a/includes/Block/Topic.php b/includes/Block/Topic.php index 6a7a9c0..c5cbb68 100644 --- a/includes/Block/Topic.php +++ b/includes/Block/Topic.php @@ -895,28 +895,6 @@ return 'topic'; } - /** -* Builds query info to use with urlGenerator, to link to a specific -* PostRevision. -* -* @param PostRevision $revision -* @param bool[optional] $specificRevision Link to this specific revision? -* @return array -*/ - public function getUrlQuery( PostRevision $revision, $specificRevision = false ) { - $data = array(); - - if ( !$revision->isTopicTitle() ) { - $data[$this->getName() . '[postId]'] = $revision->getPostId()->getHex(); - } - - if ( $specificRevision ) { - $data[$this->getName() . '[revId]'] = $revision->getRevisionId()->getHex(); - } - - return $data; - } - protected function setNotification( $notificationType, array $extraVars ) { $this->notification = array( 'type' => $notificationType, diff --git a/includes/UrlGenerator.php b/includes/UrlGenerator.php index 8062111..9576f38 100644 --- a/includes/UrlGenerator.php +++ b/includes/UrlGenerator.php @@ -68,6 +68,29 @@ } /** +* Generate a block viewing url based on a revision +* +* @param Workflow|UUID $workflow The Workflow to link to +* @param AbstractRevision $revision The revision to build the block +* @param boolean $specificRevision whether to show specific revision +*/ + public function generateBlockUrl( $workflow, $revision, $specificRevision = false ) { + $data = array(); + switch ( $revision->getRevisionType() ) { + case 'post': + if ( !$revision->isTopicTitle() ) { + $data['topic[postId]'] = $revision->getPostId()->getHex(); + } + + if ( $specificRevision ) { + $data['topic[revId]'] = $revision->getRevisionId()->getHex(); + } + break; + } + return $this->generateUrl( $workflow, 'view', $data ); + } + + /** * Returns the title/query string to link to a given Workflow * * @todo We should probably have more descriptive names than @@ -84,7 +107,7 @@ // Only way to know what title the workflow points at $workflow = $this->storage->get( $workflowId ); if ( !$workflow ) { - throw \MWException( 'Invalid workflow: ' . $workflowId ); + throw new \MWException( 'Invalid workflow: ' . $workflowId ); } } diff --git a/includes/View/History/HistoryRenderer.php b/inclu
[MediaWiki-commits] [Gerrit] depool es1004 for upgrade - change (operations/mediawiki-config)
Springle has submitted this change and it was merged. Change subject: depool es1004 for upgrade .. depool es1004 for upgrade Change-Id: Iae65e65d05b1f010183d8a3617f2fd77297d4010 --- M wmf-config/db-eqiad.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Springle: Looks good to me, approved diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index 9fbe4dd..01e8655 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -19,7 +19,7 @@ '10.64.0.25' => 1, # es1001 '10.64.16.40' => 1, # es1002 '10.64.16.41' => 1, # es1003 - '10.64.16.42' => 1, # es1004 + //'10.64.16.42' => 1, # es1004 ); $wgLBFactoryConf = array( -- To view, visit https://gerrit.wikimedia.org/r/98749 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iae65e65d05b1f010183d8a3617f2fd77297d4010 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Springle Gerrit-Reviewer: Springle Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] depool es1004 for upgrade - change (operations/mediawiki-config)
Springle has uploaded a new change for review. https://gerrit.wikimedia.org/r/98749 Change subject: depool es1004 for upgrade .. depool es1004 for upgrade Change-Id: Iae65e65d05b1f010183d8a3617f2fd77297d4010 --- M wmf-config/db-eqiad.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/49/98749/1 diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index 9fbe4dd..01e8655 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -19,7 +19,7 @@ '10.64.0.25' => 1, # es1001 '10.64.16.40' => 1, # es1002 '10.64.16.41' => 1, # es1003 - '10.64.16.42' => 1, # es1004 + //'10.64.16.42' => 1, # es1004 ); $wgLBFactoryConf = array( -- To view, visit https://gerrit.wikimedia.org/r/98749 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iae65e65d05b1f010183d8a3617f2fd77297d4010 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Springle ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Console - change (mediawiki...WikiLexicalData)
Hiong3-eng5 has uploaded a new change for review. https://gerrit.wikimedia.org/r/98748 Change subject: Console .. Console split remove duplicates routines. Change-Id: I83bd0215f32f40cfc1b4c151e3e84cd58906fe73 --- M Console/removeDuplicateExpression.php A Console/removeDuplicateSyntrans.php 2 files changed, 455 insertions(+), 422 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiLexicalData refs/changes/48/98748/1 diff --git a/Console/removeDuplicateExpression.php b/Console/removeDuplicateExpression.php index 00de5f2..b560b62 100644 --- a/Console/removeDuplicateExpression.php +++ b/Console/removeDuplicateExpression.php @@ -26,7 +26,6 @@ global $wdCurrentContext; $this->test = false; - // $this->test = true; if ( $this->hasOption( 'test' ) ) { $this->test = true; } @@ -73,12 +72,13 @@ $this->output( "There are a total of {$totalSids} corrected\n"); $this->removeDuplicateSyntrans(); $this->duplicateFound = 1; + $runRemoveDuplicateSyntrans = "\n\nKindly run:\n\nphp removeDuplicateSyntrans.php\n\n to check for duplicate Synonyms/Translations"; } if ( !$haveDuplicates ) { $this->output( "Congratulations! No duplicates found\n" ); if ( $this->duplicateFound ) { - $this->removeDuplicateSyntrans(); + $this->output( $runRemoveDuplicateSyntrans ); } return true; } @@ -86,95 +86,10 @@ if ( !$syntransHaveDuplicates ) { $this->output( "Congratulations! No syntrans have the duplicate expressions\n" ); if ( $this->duplicateFound ) { - $this->removeDuplicateSyntrans(); + $this->output( $runRemoveDuplicateSyntrans ); } } - } - - function removeDuplicateSyntrans( $dc = null ) { - $this->output( "\nStarting remove duplicate syntrans function...\n" ); - // check if there are duplicates greater than two - $this->output( "Finding duplicates\n" ); - $duplicates = $this->getDuplicateSyntrans(); - - $haveDuplicates = 0; - $syntransHaveDuplicates = 0; - $sid = array(); - if ( $duplicates ) { - $haveDuplicates = 1; - foreach ( $duplicates as $rows ) { - $syntrans = $this->getDuplicateSyntransSyntransToUpdate( $rows['expression_id'], $rows['defined_meaning_id'] ); - - if ( $syntrans ) { - $syntransHaveDuplicates = 1; - $this->output( "processing: original is {$syntrans[0]}; duplicate is {$syntrans[1]}\n"); - - $sid[] = $syntrans[0]; - // correct the duplication - $this->correctSyntransDuplication( $syntrans ); - if ( !$this->test ) { - if ( is_null( $dc ) ) { - $dc = wdGetDataSetContext(); - } - - $dbr = wfGetDB( DB_SLAVE ); - - $queryResult = $dbr->delete( - "{$dc}_syntrans", - array( - 'remove_transaction_id' => null, - 'syntrans_sid' => $syntrans[1] - ), - __METHOD__ - ); - } - - } - - } - - if ( $duplicates ) { - $totalSids = count( $duplicates ); - $this->output( "There are a total of {$totalSids} corrected\n"); - } - - if ( $this->textAttribute ) { - $totalSids = count( $this->textAttribute ); - $this->output( "There are a total of {$totalSids} text attributes corrected\n"); - } -
[MediaWiki-commits] [Gerrit] Update and remove unnecessary messages - change (mediawiki...UploadWizard)
jenkins-bot has submitted this change and it was merged. Change subject: Update and remove unnecessary messages .. Update and remove unnecessary messages Remove default "Thanks for using our new upload tool!" message as well as the translation link, as the tool is neither new or in dire need of translation. A custom welcome message can now be added with headerMessage in the config if one desires. Also, update i18n for mwe-upwiz-thanks-explain to be more general. Bug: 36149 Change-Id: I5fa30bf6b9690511e1dcaaa66d944f412672aa7b --- M UploadWizard.config.php M UploadWizard.i18n.php M UploadWizardHooks.php M resources/mw.UploadWizard.js 4 files changed, 1 insertion(+), 14 deletions(-) Approvals: MarkTraceur: Looks good to me, approved jenkins-bot: Verified diff --git a/UploadWizard.config.php b/UploadWizard.config.php index b7940f5..d593e21 100644 --- a/UploadWizard.config.php +++ b/UploadWizard.config.php @@ -573,9 +573,6 @@ // Bugzilla page for UploadWizard bugs 'bugList' => 'https://bugzilla.wikimedia.org/buglist.cgi?query_format=advanced&component=UploadWizard&resolution=---&product=MediaWiki+extensions', - // TranslateWiki page for help with translations - 'translateHelp' => '//translatewiki.net/w/i.php?title=Special:Translate&group=ext-uploadwizard', - // Title of page for alternative uploading form, e.g.: // 'altUploadForm' => 'Special:Upload', // diff --git a/UploadWizard.i18n.php b/UploadWizard.i18n.php index cb93c7d..0611a56 100644 --- a/UploadWizard.i18n.php +++ b/UploadWizard.i18n.php @@ -158,7 +158,7 @@ 'mwe-upwiz-other' => 'Other information', 'mwe-upwiz-source' => 'Source', 'mwe-upwiz-thanks-intro' => 'Thanks for uploading!', - 'mwe-upwiz-thanks-explain' => 'You can now use {{PLURAL:$1|this file|these files}} on sites like Wikipedia, or link to {{PLURAL:$1|it|them}} on the web.', + 'mwe-upwiz-thanks-explain' => 'You can now use {{PLURAL:$1|this file|these files}} on wikis, or link to {{PLURAL:$1|it|them}} on the web.', 'mwe-upwiz-thanks-wikitext' => 'To use the file in a wiki, copy this text into a page:', 'mwe-upwiz-thanks-url' => 'To link to it in HTML, copy this URL:', 'mwe-upwiz-upload-error-bad-filename-extension' => 'This wiki does not accept filenames that end in the extension ".$1".', @@ -330,9 +330,7 @@ 'mwe-upwiz-unparseable-filename' => 'Could not understand the file name "$1".', 'mwe-upwiz-image-preview' => 'File preview', - 'mwe-upwiz-subhead-message' => 'Thanks for using our new upload tool!', 'mwe-upwiz-subhead-bugs' => '[$1 Known issues]', - 'mwe-upwiz-subhead-translate' => '[$1 Help with translations]', 'mwe-upwiz-subhead-alt-upload' => '[$1 Back to the old form]', /* Feedback interface */ diff --git a/UploadWizardHooks.php b/UploadWizardHooks.php index 9bda599..41d5129 100644 --- a/UploadWizardHooks.php +++ b/UploadWizardHooks.php @@ -397,9 +397,7 @@ 'mwe-upwiz-thumbnail-failed', 'mwe-upwiz-unparseable-filename', 'mwe-upwiz-image-preview', - 'mwe-upwiz-subhead-message', 'mwe-upwiz-subhead-bugs', - 'mwe-upwiz-subhead-translate', 'mwe-upwiz-subhead-alt-upload', 'mwe-upwiz-feedback-prompt', 'mwe-upwiz-feedback-note', diff --git a/resources/mw.UploadWizard.js b/resources/mw.UploadWizard.js index cf68bb5..2270f2e 100644 --- a/resources/mw.UploadWizard.js +++ b/resources/mw.UploadWizard.js @@ -64,8 +64,6 @@ // remove first spinner $( '#mwe-first-spinner' ).remove(); - // construct the message for the subheader - $( '#contentSub' ).append( $( '' ).msg( 'mwe-upwiz-subhead-message' ) ); // feedback request if ( typeof mw.UploadWizard.config.feedbackPage === 'string' && mw.UploadWizard.config.feedbackPage.length > 0 ) { feedback = new mw.Feedback( { @@ -82,10 +80,6 @@ } ); $( '#contentSub' ).append( feedbackLink ); - } - - if ( typeof mw.UploadWizard.config.translateHelp === 'string' && mw.UploadWizard.config.translateHelp.length > 0 ) { - $( '#contentSub' ).append( $( '' ).msg( 'mwe-upwiz-subhead-translate', $( '' ).attr( { href: mw.UploadWizard.config.translateHelp, target: '_blank' } ) ) ); } configAltUploadForm = mw.UploadWizard.config.altUploadForm; -- To view, visit https://gerrit.wikimedia.org/r/98148 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
[MediaWiki-commits] [Gerrit] Move activating/deactivating to ViewPageTarget - change (mediawiki...VisualEditor)
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/98747 Change subject: Move activating/deactivating to ViewPageTarget .. Move activating/deactivating to ViewPageTarget That's where they belong IMO, since ViewPageTarget is the one that has .activate() and .deactivate(), and mw.Target doesn't retain any state (apart from some caching things). Change-Id: Ia6cf5bac9054163d54ab492d691d8ce9d6a3bb90 --- M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js M modules/ve-mw/init/ve.init.mw.Target.js 2 files changed, 9 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/47/98747/1 diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js index 307dc1b..4af11f6 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js @@ -36,6 +36,8 @@ this.onBeforeUnloadHandler = null; this.timings = {}; this.active = false; + this.activating = false; + this.deactivating = false; this.edited = false; // If this is true then #transformPage / #restorePage will not call pushState // This is to avoid adding a new history entry for the url we just got from onpopstate @@ -244,6 +246,7 @@ * @method */ ve.init.mw.ViewPageTarget.prototype.onSurfaceReady = function () { + this.activating = false; this.surface.getModel().getDocument().connect( this, { 'transact': 'recordLastTransactionTime' } ); diff --git a/modules/ve-mw/init/ve.init.mw.Target.js b/modules/ve-mw/init/ve.init.mw.Target.js index fcaaaf6..543a756 100644 --- a/modules/ve-mw/init/ve.init.mw.Target.js +++ b/modules/ve-mw/init/ve.init.mw.Target.js @@ -74,8 +74,6 @@ this.localNoticeMessages = []; this.sanityCheckFinished = false; this.sanityCheckVerified = false; - this.activating = false; - this.deactivating = false; this.isMobileDevice = ( 'ontouchstart' in window || ( window.DocumentTouch && document instanceof window.DocumentTouch ) @@ -322,15 +320,12 @@ // We need to wait until onReady as local notices may require special messages this.onNoticesReady(); this.loading = false; - if ( this.activating ) { - this.edited = false; - this.setUpSurface( this.doc, ve.bind( function() { - this.startSanityCheck(); - this.$document[0].focus(); - this.activating = false; - this.emit( 'surfaceReady' ); - }, this ) ); - } + this.edited = false; + this.setUpSurface( this.doc, ve.bind( function() { + this.startSanityCheck(); + this.$document[0].focus(); + this.emit( 'surfaceReady' ); + }, this ) ); }; /** -- To view, visit https://gerrit.wikimedia.org/r/98747 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia6cf5bac9054163d54ab492d691d8ce9d6a3bb90 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Catrope ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix to allow the RapidError form to work with amazon payments - change (mediawiki...DonationInterface)
Mwalker has submitted this change and it was merged. Change subject: Fix to allow the RapidError form to work with amazon payments .. Fix to allow the RapidError form to work with amazon payments Change-Id: I122ba25da7826d4878f5ee50abdbcde3f06f --- M amazon_gateway/amazon_gateway.body.php M gateway_common/gateway.adapter.php 2 files changed, 22 insertions(+), 1 deletion(-) Approvals: Mwalker: Looks good to me, approved jenkins-bot: Verified diff --git a/amazon_gateway/amazon_gateway.body.php b/amazon_gateway/amazon_gateway.body.php index c82fddd..c87ac32 100644 --- a/amazon_gateway/amazon_gateway.body.php +++ b/amazon_gateway/amazon_gateway.body.php @@ -65,7 +65,12 @@ $this->getOutput()->redirect( $this->adapter->getFailPage() ); } } else { - $this->log( 'Failed to process gateway return. Tokens bad or no status.', LOG_ERR ); + $specialform = $this->getRequest()->getText( 'ffname', null ); + if ( !is_null( $specialform ) && $this->adapter->isValidSpecialForm( $specialform ) ){ + $this->displayForm(); + } else { + $this->log( 'Failed to process gateway return. Tokens bad or no status.', LOG_ERR ); + } } } } diff --git a/gateway_common/gateway.adapter.php b/gateway_common/gateway.adapter.php index 2a43ee4..89c1c5d 100644 --- a/gateway_common/gateway.adapter.php +++ b/gateway_common/gateway.adapter.php @@ -3068,4 +3068,20 @@ return $params; } + /** +* isValidSpecialForm: Tells us if the ffname supplied is a valid +* special form for the current gateway. +* @var string $ffname The form name we want to try +* @return boolean True if this is a valid special form, otherwise false +*/ + public function isValidSpecialForm( $ffname ){ + $defn = GatewayFormChooser::getFormDefinition( $ffname ); + if ( is_array( $defn ) && + DataValidator::value_appears_in( $this->getIdentifier(), $defn['gateway'] ) && + array_key_exists( 'special_type', $defn ) ){ + return true; + } + return false; + } + } -- To view, visit https://gerrit.wikimedia.org/r/98738 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I122ba25da7826d4878f5ee50abdbcde3f06f Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Katie Horn Gerrit-Reviewer: Mwalker Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mw.ViewPageTarget: Remove unused onTokenError handler covere... - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: mw.ViewPageTarget: Remove unused onTokenError handler covered in onSaveError .. mw.ViewPageTarget: Remove unused onTokenError handler covered in onSaveError Change-Id: If2124c68aab0d313f4ddd698014d2a4296bbabb8 --- M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js 1 file changed, 0 insertions(+), 19 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js index f5fda29..68bf0fc 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js @@ -69,7 +69,6 @@ 'save': 'onSave', 'loadError': 'onLoadError', 'surfaceReady': 'onSurfaceReady', - 'tokenError': 'onTokenError', 'saveError': 'onSaveError', 'editConflict': 'onEditConflict', 'showChanges': 'onShowChanges', @@ -224,24 +223,6 @@ ve.init.mw.ViewPageTarget.prototype.onLoadError = function ( response, status ) { // Don't show an error if the load was manually aborted if ( status !== 'abort' && confirm( ve.msg( 'visualeditor-loadwarning', status ) ) ) { - this.load(); - } else { - this.activating = false; - // User interface changes - this.deactivate( true ); - } -}; - -/** - * Handle failed token refresh event. - * - * @method - * @param {Object} response Response object - * @param {string} status Text status message - * @param {Mixed} error Thrown exception or HTTP error string - */ -ve.init.mw.ViewPageTarget.prototype.onTokenError = function ( response, status ) { - if ( confirm( ve.msg( 'visualeditor-loadwarning-token', status ) ) ) { this.load(); } else { this.activating = false; -- To view, visit https://gerrit.wikimedia.org/r/97735 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If2124c68aab0d313f4ddd698014d2a4296bbabb8 Gerrit-PatchSet: 7 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Robmoen Gerrit-Reviewer: Catrope Gerrit-Reviewer: Krinkle Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Create base MobileView config and target refactor - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Create base MobileView config and target refactor .. Create base MobileView config and target refactor Changes include: * Target mobile for ve dependencies * Create mobile view constructor ** Some tools like dialogs are excluded for now * Refactor mw.target to permit code reuse ** Split out pageTarget view functionality from core init methods Change-Id: I786b63ab57518fc6af7761501259ed66592f70e3 --- M VisualEditor.php M VisualEditorDataModule.php A modules/ve-mw/init/targets/ve.init.mw.MobileViewTarget.js M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js M modules/ve-mw/init/ve.init.mw.Target.js 5 files changed, 304 insertions(+), 92 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/VisualEditor.php b/VisualEditor.php index eb902bd..c20246c 100644 --- a/VisualEditor.php +++ b/VisualEditor.php @@ -81,18 +81,21 @@ 'rangy/rangy-position-1.3.js', 'rangy/rangy-export.js', ), + 'targets' => array( 'desktop', 'mobile' ), ), 'jquery.visibleText' => $wgVisualEditorResourceTemplate + array( 'scripts' => array( 'jquery/jquery.visibleText.js', ), + 'targets' => array( 'desktop', 'mobile' ), ), 'oojs' => $wgVisualEditorResourceTemplate + array( 'scripts' => array( 'oojs/oojs.js', ), + 'targets' => array( 'desktop', 'mobile' ), ), 'oojs-ui' => $wgVisualEditorResourceTemplate + array( @@ -114,7 +117,8 @@ ), 'dependencies' => array( 'oojs' - ) + ), + 'targets' => array( 'desktop', 'mobile' ), ), 'unicodejs.wordbreak' => $wgVisualEditorResourceTemplate + array( @@ -126,6 +130,7 @@ 'unicodejs/unicodejs.wordbreakproperties.js', 'unicodejs/unicodejs.wordbreak.js', ), + 'targets' => array( 'desktop', 'mobile' ), ), // Alias for backwards compat, safe to remove after @@ -139,12 +144,14 @@ 'styles' => array( 've-mw/init/styles/ve.init.mw.ViewPageTarget.Icons-raster.css', ), + 'targets' => array( 'desktop', 'mobile' ), ), 'ext.visualEditor.viewPageTarget.icons-vector' => $wgVisualEditorResourceTemplate + array( 'styles' => array( 've-mw/init/styles/ve.init.mw.ViewPageTarget.Icons-vector.css', ), + 'targets' => array( 'desktop', 'mobile' ), ), 'ext.visualEditor.viewPageTarget.init' => $wgVisualEditorResourceTemplate + array( @@ -197,20 +204,9 @@ 'dependencies' => array( 'ext.visualEditor.base', 'ext.visualEditor.mediawiki', - 'jquery.byteLength', - 'jquery.byteLimit', - 'jquery.client', 'jquery.placeholder', - 'jquery.visibleText', - 'mediawiki.api', 'mediawiki.feedback', 'mediawiki.jqueryMsg', - 'mediawiki.notify', - 'mediawiki.Title', - 'mediawiki.Uri', - 'mediawiki.user', - 'user.options', - 'user.tokens', ), 'messages' => array( // MW core messages @@ -228,6 +224,16 @@ 'visualeditor-savedialog-identify-anon', 'visualeditor-savedialog-identify-user', ), + ), + 'ext.visualEditor.mobileViewTarget' => $wgVisualEditorResourceTemplate + array( + 'scripts' => array( + 've-mw/init/targets/ve.init.mw.MobileViewTarget.js', + ), + 'dependencies' => array( + 'ext.visualEditor.base', + 'ext.visualEditor.mediawiki', + ), + 'targets' => array( 'mobile' ), ), 'ext.visualEditor.base' => $wgVisualEditorResourceTemplate + array( @@ -250,6 +256,7 @@ 'unicodejs.wordbreak', 'mediawiki.util', ), + 'targets' => array( 'desktop', 'mobile' ), ), 'ext.visualEditor.mediawiki' => $wgVisualEditorResourceTemplate + array( @@ -260,11 +267,20 @@ 've-mw/init/ve.init.mw.Target.js', ), 'dependencies' => arra
[MediaWiki-commits] [Gerrit] Split apart onSaveError logic for other mw targets - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Split apart onSaveError logic for other mw targets .. Split apart onSaveError logic for other mw targets Change-Id: I8c8b2d4900b511a65cff4c554cf7ef89d6d39ea9 --- M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js M modules/ve-mw/init/ve.init.mw.Target.js 2 files changed, 322 insertions(+), 221 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js index 68bf0fc..307dc1b 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js @@ -67,9 +67,16 @@ // Events this.connect( this, { 'save': 'onSave', + 'saveErrorEmpty': 'onSaveErrorEmpty', + 'saveAsyncBegin': 'onSaveAsyncBegin', + 'saveAsyncComplete': 'onSaveAsyncComplete', + 'saveErrorSpamBlacklist': 'onSaveErrorSpamBlacklist', + 'saveErrorAbuseFilter': 'onSaveErrorAbuseFilter', + 'saveErrorNewUser': 'onSaveErrorNewUser', + 'saveErrorCaptcha': 'onSaveErrorCaptcha', + 'saveErrorUnknown': 'onSaveErrorUnknown', 'loadError': 'onLoadError', 'surfaceReady': 'onSurfaceReady', - 'saveError': 'onSaveError', 'editConflict': 'onEditConflict', 'showChanges': 'onShowChanges', 'showChangesError': 'onShowChangesError', @@ -318,223 +325,147 @@ }; /** - * Handle failed DOM save event. + * Update save dialog when async begins * * @method - * @param {Object} jqXHR - * @param {string} status Text status message - * @param {Object|null} data API response data */ -ve.init.mw.ViewPageTarget.prototype.onSaveError = function ( jqXHR, status, data ) { - var api, editApi, - trackData = { - 'duration': ve.now() - this.timings.saveDialogSave, - 'retries': this.timings.saveRetries - }, - viewPage = this; +ve.init.mw.ViewPageTarget.prototype.onSaveAsyncBegin = function () { + this.saveDialog.saveButton.setDisabled( true ); + this.saveDialog.$loadingIcon.show(); +}; +/** + * Update save dialog when async completes + * + * @method + */ +ve.init.mw.ViewPageTarget.prototype.onSaveAsyncComplete = function () { this.saveDialog.saveButton.setDisabled( false ); this.saveDialog.$loadingIcon.hide(); +}; - this.saveDialog.clearMessage( 'api-save-error' ); +/** + * Update save dialog message on general error + * + * @method + */ +ve.init.mw.ViewPageTarget.prototype.onSaveErrorEmpty = function () { + this.showSaveError( ve.msg( 'visualeditor-saveerror', 'Empty server response' ) ); + this.saveDialog.saveButton.setDisabled( true ); +}; - // Handle empty response - if ( !data ) { - trackData.type = 'empty'; - ve.track( 'performance.user.saveError', trackData ); - this.saveDialog.showMessage( - 'api-save-error', - ve.msg( 'visualeditor-saveerror', 'Empty server response' ), - { - wrap: 'error' - } - ); - this.saveDialog.saveButton.setDisabled( true ); - return; - } - - editApi = data && data.visualeditoredit && data.visualeditoredit.edit; - - // Handle spam blacklist error (either from core or from Extension:SpamBlacklist) - if ( editApi && editApi.spamblacklist ) { - trackData.type = 'spamblacklist'; - ve.track( 'performance.user.saveError', trackData ); - this.saveDialog.showMessage( - 'api-save-error', - // TODO: Use mediawiki.language equivalant of Language.php::listToText once it exists - ve.msg( 'spamprotectiontext' ) + ' ' + ve.msg( 'spamprotectionmatch', editApi.spamblacklist.split( '|' ).join( ', ' ) ), - { - wrap: 'error' - } - ); - this.saveDialog.saveButton.setDisabled( true ); - return; - } - - // Handle warnings/errors from Extension:AbuseFilter - // TODO: Move this to a plugin - if ( editApi && editApi.info && editApi.info.indexOf( 'Hit AbuseFilter:' ) === 0 && editApi.warning ) { - trackData.type = 'abusefilter'; - ve.track( 'performance.user.saveError', trackData ); - this.saveDialog.showMessage( - 'api-save-error', - $.parseHTML( editApi.warning ), -
[MediaWiki-commits] [Gerrit] Add test to verify that in case of a resize event no image r... - change (mediawiki...MultimediaViewer)
Aarcos has uploaded a new change for review. https://gerrit.wikimedia.org/r/98746 Change subject: Add test to verify that in case of a resize event no image replacement takes place when api data is empty/undefined. .. Add test to verify that in case of a resize event no image replacement takes place when api data is empty/undefined. Change-Id: I2a880ce4b2e6c158763b1473f6a9f751922187b0 --- M resources/ext.multimediaViewer/ext.multimediaViewer.js M tests/qunit/ext.multimediaViewer.test.js 2 files changed, 40 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer refs/changes/46/98746/1 diff --git a/resources/ext.multimediaViewer/ext.multimediaViewer.js b/resources/ext.multimediaViewer/ext.multimediaViewer.js index 6a03c04..382c4d3 100755 --- a/resources/ext.multimediaViewer/ext.multimediaViewer.js +++ b/resources/ext.multimediaViewer/ext.multimediaViewer.js @@ -227,14 +227,19 @@ this.loadImage( thisImage, initial ); }; + /** +* Handles resize events in viewer. +* +* @protected +* +* @param {mw.LightboxInterface} ui lightbox that got resized +*/ MMVP.resize = function ( ui ) { - // TODO: Reuse the api member, fix everywhere. - var api = new mw.Api(), - viewer = this, + var viewer = this, density = $.devicePixelRatio(), filename = ui.currentImageFilename; - api.get( { + this.api.get( { action: 'query', format: 'json', titles: filename, @@ -243,6 +248,21 @@ iiurlwidth: Math.floor( density * ui.$imageWrapper.width() ), iiurlheight: Math.floor( density * ui.$imageWrapper.height() ) } ).done( function ( data ) { + viewer.loadResizedImage( ui, data ); + } ); + }; + + /** +* Replaces the resized image in the viewer providing we actually got some data. +* +* @protected +* +* @param {mw.LightboxInterface} ui lightbox that got resized +* @param {Object} data information regarding the new resized image +*/ + MMVP.loadResizedImage = function ( ui, data ) { + // Replace image only if data was returned. + if ( data && data.query && data.query.pages ) { var imageInfo, innerInfo, image = new Image(); @@ -255,11 +275,11 @@ image.onload = function () { ui.replaceImageWith( image ); - viewer.updateControls(); + this.updateControls(); }; image.src = innerInfo.thumburl || innerInfo.url; - } ); + } }; MMVP.updateControls = function () { @@ -494,6 +514,7 @@ username = innerInfo.user; if ( username ) { + // TODO: Reuse the api member, fix everywhere. // Fetch the gender from the uploader's home wiki // TODO this is ugly as hell, let's fix this in core. new mw.Api( { diff --git a/tests/qunit/ext.multimediaViewer.test.js b/tests/qunit/ext.multimediaViewer.test.js index 799531a..2bd6789 100644 --- a/tests/qunit/ext.multimediaViewer.test.js +++ b/tests/qunit/ext.multimediaViewer.test.js @@ -107,4 +107,17 @@ link.trigger( rightClick ); } ); + QUnit.test( 'Do not load the resized image if no data returning from the api', 1, function ( assert ) { + var ui, + data, + viewer = new mw.MultimediaViewer(); + + // Calling loadResizedImage() with empty/undefined data should not fail. + viewer.loadResizedImage( ui, data ); + viewer.loadResizedImage( ui, {} ); + viewer.loadResizedImage( ui, { query: {} } ); + + assert.ok( true, 'Resized image is not replaced since we have not data.' ); + } ); + }( mediaWiki, jQuery ) ); -- To view, visit https://gerrit.wikimedia.org/r/98746 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2a880ce4b2e6c158763b1473f6a9f751922187b0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MultimediaViewer Gerrit-Branch: master Gerrit-Owner: Aarcos ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] WIP: New KeepGoing workflow - change (mediawiki...MobileFrontend)
Kaldari has uploaded a new change for review. https://gerrit.wikimedia.org/r/98745 Change subject: WIP: New KeepGoing workflow .. WIP: New KeepGoing workflow https://wikimedia.mingle.thoughtworks.com/projects/mobile/cards/1448 Change-Id: Idd82e88302f3ecda0da261c48b2a19c555feaa8b --- M MobileFrontend.i18n.php M includes/Resources.php M javascripts/modules/editorNew/EditorOverlay.js R javascripts/modules/keepgoing/KeepGoingOverlay.js M javascripts/modules/keepgoing/keepgoing.js M javascripts/modules/random/random.js D templates/keepgoing/KeepGoingDrawer.html A templates/keepgoing/KeepGoingOverlay.html 8 files changed, 52 insertions(+), 26 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/45/98745/1 diff --git a/MobileFrontend.i18n.php b/MobileFrontend.i18n.php index 2b3096b..5e0f692 100644 --- a/MobileFrontend.i18n.php +++ b/MobileFrontend.i18n.php @@ -23,6 +23,7 @@ 'mobilefrontend-keepgoing-cancel' => 'No, thanks', 'mobilefrontend-keepgoing-suggest' => 'Yes, please', 'mobilefrontend-keepgoing-suggest-again' => 'Try another', + 'mobilefrontend-keepgoing-saved-title' => 'Edit saved!', /** special pages */ 'nearby' => 'Pages near you', @@ -104,8 +105,11 @@ 'mobile-frontend-password-confirm-placeholder' => 'Confirm password', 'mobile-frontend-account-create-email-placeholder' => 'Email address (optional)', 'mobile-frontend-account-create-captcha-placeholder' => 'Enter confirmation code', - // Search + // Overlays 'mobile-frontend-overlay-escape' => 'Go back', + 'mobile-frontend-overlay-close' => 'Close', + 'mobile-frontend-overlay-continue' => 'Continue', + // Search 'mobile-frontend-placeholder' => 'Search {{SITENAME}}', 'mobile-frontend-placeholder-beta' => 'Search {{SITENAME}} (Beta)', 'mobile-frontend-placeholder-alpha' => 'Search {{SITENAME}} (Experimental)', @@ -409,6 +413,7 @@ 'mobilefrontend-keepgoing-suggest-again' => 'Label for a button that allows user to try another page as a response to {{msg-mw|Mobilefrontend-keepgoing-explain}}. {{Identical|Try another}}', + 'mobilefrontend-keepgoing-saved-title' => 'Title of the overlay displayed after the user successfully saves an edit. Should be short.', 'nearby' => '{{doc-special|Nearby}}', 'mobile-frontend-desc' => '{{desc|name=Mobile Frontend|url=https://www.mediawiki.org/wiki/Extension:MobileFrontend}}', 'mobile.css' => '{{optional}} @@ -596,6 +601,10 @@ 'mobile-frontend-account-create-captcha-placeholder' => 'Placeholder for captcha input field', 'mobile-frontend-overlay-escape' => 'Text for the button to the left of search / an overlay that when clicked exits the overlay to the previous screen {{Identical|Go back}}', + 'mobile-frontend-overlay-close' => 'Text for the button in an overlay that, when clicked, dismisses the overlay. +{{Identical|Close}}', + 'mobile-frontend-overlay-continue' => 'Text for the button in an overlay that, when clicked, continues to the next screen or step. +{{Identical|Continue}}', 'mobile-frontend-placeholder' => 'Phrase used to prompt user to use search interface for mobile full screen search', 'mobile-frontend-placeholder-beta' => 'Phrase used to prompt user to use search interface for mobile full screen search with identifier that you are in beta mode', 'mobile-frontend-placeholder-alpha' => 'Phrase used to prompt user to use search interface for mobile full screen search with identifier that you are in experimental mode', diff --git a/includes/Resources.php b/includes/Resources.php index 3c08653..f130517 100644 --- a/includes/Resources.php +++ b/includes/Resources.php @@ -458,21 +458,22 @@ 'dependencies' => array( 'mobile.beta', 'mobile.templates', + 'mobile.overlays.beta', ), 'templates' => array( - 'keepgoing/KeepGoingDrawer', + 'keepgoing/KeepGoingOverlay', ), 'messages' => array( 'mobilefrontend-keepgoing-suggest', 'mobilefrontend-keepgoing-suggest-again', - 'mobilefrontend-keepgoing-cancel', 'mobilefrontend-keepgoing-ask', 'mobilefrontend-keepgoing-ask-first', 'mobilefrontend-keepgoing-explain', + 'mobilefrontend-keepgoing-saved-title', ), 'scripts' => array( 'javascripts/loggingSchemas/mobileWebCta.js', - 'javascripts/modules/keepgoing/KeepGoingDrawer.js', + 'javascripts/modules/keepgoing/KeepGoi
[MediaWiki-commits] [Gerrit] Only allow a single '.' in image filenames. - change (mediawiki...latex_renderer)
jenkins-bot has submitted this change and it was merged. Change subject: Only allow a single '.' in image filenames. .. Only allow a single '.' in image filenames. The graphicx package gets confused about the image type if there are other '.' characters before the one delimiting the filename extension. So rename those files before we give the filenames to LaTeX. Change-Id: I27213421a0a4691134750858f21680273481e826 --- M lib/index.js 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Cscott: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/index.js b/lib/index.js index 2e1ebc7..919bd89 100644 --- a/lib/index.js +++ b/lib/index.js @@ -673,6 +673,10 @@ // rename file if it is not TeX safe. pp = pp.then(function(info) { var safe = info.filename.replace(/[^A-Za-z0-9.:]+/g, '-'); + // only one '.' allowed + safe = safe.split(/(?=[.][^.]+$)/); + safe = safe[0].replace(/[.]/g, '-') + (safe[1] || ''); + // rename the file if necessary return (safe === info.filename) ? safe : renameFile(imagedir, info.filename, safe); }).then(function(newname) { -- To view, visit https://gerrit.wikimedia.org/r/98558 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I27213421a0a4691134750858f21680273481e826 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Collection/OfflineContentGenerator/latex_renderer Gerrit-Branch: master Gerrit-Owner: Cscott Gerrit-Reviewer: Cscott 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 tilde/caret when followed by numeric characters. - change (mediawiki...latex_renderer)
jenkins-bot has submitted this change and it was merged. Change subject: Fix tilde/caret when followed by numeric characters. .. Fix tilde/caret when followed by numeric characters. Change-Id: Ic61d7dd98095de301a9aa40983603b2ddf2640f6 --- M lib/index.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Cscott: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/index.js b/lib/index.js index 686074f..2e1ebc7 100644 --- a/lib/index.js +++ b/lib/index.js @@ -72,7 +72,7 @@ // protect TeX special characters str = str.replace(/[#$&_%{}\\]/g, function(c) { return '\\' + c; }); // twiddle and carat are special - str = str.replace(/~/g, '\\char"007F').replace(/\^/g, '\\char"005E'); + str = str.replace(/~/g, '\\char"007F{}').replace(/\^/g, '\\char"005E{}'); // compress multiple newlines (and use unix-style newlines exclusively) str = str.replace(/\r\n?/g, '\n').replace(/\n\n+/g, '\n'); // trim leading and trailing newlines for consistent output. -- To view, visit https://gerrit.wikimedia.org/r/98557 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic61d7dd98095de301a9aa40983603b2ddf2640f6 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Collection/OfflineContentGenerator/latex_renderer Gerrit-Branch: master Gerrit-Owner: Cscott Gerrit-Reviewer: Cscott 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 \graphicspath to avoid overly-long graphics filenames. - change (mediawiki...latex_renderer)
jenkins-bot has submitted this change and it was merged. Change subject: Use \graphicspath to avoid overly-long graphics filenames. .. Use \graphicspath to avoid overly-long graphics filenames. Change-Id: Iceeb758f38bf71ecf190bb53fe13017ce0290414 --- M lib/index.js 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Cscott: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/index.js b/lib/index.js index 92e024b..686074f 100644 --- a/lib/index.js +++ b/lib/index.js @@ -676,7 +676,7 @@ return (safe === info.filename) ? safe : renameFile(imagedir, info.filename, safe); }).then(function(newname) { - imagemap.set(key, path.join(imagedir, newname)); + imagemap.set(key, newname); }); p = when.join(p, pp); // serialize completion }).then(function() { @@ -740,6 +740,8 @@ head += ' ' + texEscape(metabook.subtitle); } head += '}'; + // image file path + head += '\n\\graphicspath{{' + path.join(builddir, 'bundle', 'images') + '/}}'; // start the doc! head += '\n\\begin{document}\\maketitle'; if (toc) { -- To view, visit https://gerrit.wikimedia.org/r/98555 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iceeb758f38bf71ecf190bb53fe13017ce0290414 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Collection/OfflineContentGenerator/latex_renderer Gerrit-Branch: master Gerrit-Owner: Cscott Gerrit-Reviewer: Cscott Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Keep LaTeX happy even if section has no items. - change (mediawiki...latex_renderer)
jenkins-bot has submitted this change and it was merged. Change subject: Keep LaTeX happy even if section has no items. .. Keep LaTeX happy even if section has no items. Change-Id: I45c82ac5d80ca6dc81685212d28b0b0b900bebf9 --- M lib/index.js 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Cscott: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/index.js b/lib/index.js index 1d66faa..92e024b 100644 --- a/lib/index.js +++ b/lib/index.js @@ -427,6 +427,7 @@ }; Visitor.prototype['visitTYPEOF=mw:Extension/references'] = function(node) { + if (!node.childNodes.length) { return; /* no items */ } this.output.push('\\begin{enumerate}\\small'); for (var i = 0, n = node.childNodes.length; i < n; i++) { var ref = node.childNodes[i]; -- To view, visit https://gerrit.wikimedia.org/r/98554 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I45c82ac5d80ca6dc81685212d28b0b0b900bebf9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Collection/OfflineContentGenerator/latex_renderer Gerrit-Branch: master Gerrit-Owner: Cscott Gerrit-Reviewer: Cscott Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Improve status reporting for article/chapter processing. - change (mediawiki...latex_renderer)
jenkins-bot has submitted this change and it was merged. Change subject: Improve status reporting for article/chapter processing. .. Improve status reporting for article/chapter processing. Change-Id: I5efa576a951201f674fa428665cfacada8bc8a5f --- M lib/index.js 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Cscott: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/index.js b/lib/index.js index be55b26..1d66faa 100644 --- a/lib/index.js +++ b/lib/index.js @@ -758,7 +758,7 @@ var write = {}; write.article = function(item) { console.assert(item.type === 'article'); - status.report(null, item.title); + status.report('Processing article', item.title); var revid = item.revision; var document, base = ''; var key = (item.wiki ? (item.wiki+'|') : '') + revid; @@ -790,7 +790,7 @@ }; write.chapter = function(item) { console.assert(item.type === 'chapter'); - status.report(null, item.title); + status.report('Processing chapter', item.title); if ('columns' in item && columns !== item.columns) { columns = item.columns; output.write(columns === 1 ? '\\onecolumn\n' : '\\twocolumn\n'); -- To view, visit https://gerrit.wikimedia.org/r/98553 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5efa576a951201f674fa428665cfacada8bc8a5f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Collection/OfflineContentGenerator/latex_renderer Gerrit-Branch: master Gerrit-Owner: Cscott Gerrit-Reviewer: Cscott Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Clicking 'comment' in history should take user to the comment - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Clicking 'comment' in history should take user to the comment .. Clicking 'comment' in history should take user to the comment Bug: 57381 Change-Id: I923444a74380efc682990d942739814e22b7ee49 --- M FlowActions.php M includes/UrlGenerator.php 2 files changed, 27 insertions(+), 13 deletions(-) Approvals: EBernhardson: Looks good to me, approved jenkins-bot: Verified diff --git a/FlowActions.php b/FlowActions.php index 384b119..20d8bcc 100644 --- a/FlowActions.php +++ b/FlowActions.php @@ -159,8 +159,7 @@ return $templating->getUserText( $revision, $user ); }, function ( PostRevision $revision, Templating $templating, User $user, Block $block ) { - $data = array( $block->getName() . '[postId]' => $revision->getPostId()->getHex() ); - return $templating->getUrlGenerator()->generateUrl( $block->getWorkflowId(), 'view', $data ); + return $templating->getUrlGenerator()->generateUrl( $block->getWorkflowId(), 'view', array(), 'flow-post-' . $revision->getPostId()->getHex() ); }, ), 'class' => 'flow-history-edit-post', @@ -190,8 +189,11 @@ return $templating->getCreatorText( $revision, $user ); }, function ( PostRevision $revision, Templating $templating, User $user, Block $block ) { - $data = array( $block->getName() . '[postId]' => $revision->getPostId()->getHex() ); - return $templating->getUrlGenerator()->generateUrl( $block->getWorkflowId(), 'view', $data ); + $fragment = ''; + if ( $revision->isAllowed( $user, PostRevision::MODERATED_HIDDEN ) ) { + $fragment = 'flow-post-' . $revision->getPostId()->getHex(); + } + return $templating->getUrlGenerator()->generateUrl( $block->getWorkflowId(), 'view', array(), $fragment ); }, function ( PostRevision $revision, Templating $templating, User $user, Block $block ) { return $revision->getModeratedReason(); @@ -252,8 +254,11 @@ return $templating->getCreatorText( $revision, $user ); }, function ( PostRevision $revision, Templating $templating, User $user, Block $block ) { - $data = array( $block->getName() . '[postId]' => $revision->getPostId()->getHex() ); - return $templating->getUrlGenerator()->generateUrl( $block->getWorkflowId(), 'view', $data ); + $fragment = ''; + if ( $revision->isAllowed( $user, PostRevision::MODERATED_DELETED ) ) { + $fragment = 'flow-post-' . $revision->getPostId()->getHex(); + } + return $templating->getUrlGenerator()->generateUrl( $block->getWorkflowId(), 'view', array(), $fragment ); }, function ( PostRevision $revision, Templating $templating, User $user, Block $block ) { return $revision->getModeratedReason(); @@ -316,8 +321,11 @@ return $templating->getCreatorText( $revision, $user ); }, function ( PostRevision $revision, Templating $templating, User $user, Block $block ) { - $data = array( $block->getName() . '[postId]' => $revision->getPostId()->getHex() ); - return $templating->getUrlGenerator()->generateUrl( $block->getWorkflowId(), 'view', $data ); + $fragment = ''; + if ( $revision->isAllowed( $user, PostRevision::MODERATED_SUPPRESSED ) ) { + $fragment = 'flow-post-' . $revision->getPostId()->getHex(); + } + return $templating->getUrlGenerator()->generateUrl( $block->getWorkflowId(), 'view', array(), $fragment );
[MediaWiki-commits] [Gerrit] Gracefully handle invalid links when handling redlinks - change (mediawiki...Flow)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/98744 Change subject: Gracefully handle invalid links when handling redlinks .. Gracefully handle invalid links when handling redlinks There is no guarantee just because a link was created by parsoid that it will resolve to a valid Title object. If the link doesn't resolve to a valid title then just ignore it. Bug: 57904 Change-Id: I85ce508de311afb4ff811a1b6a8a62a7e4c5b4bf --- M includes/Templating.php 1 file changed, 10 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/44/98744/1 diff --git a/includes/Templating.php b/includes/Templating.php index 2c21acf..c36d69b 100644 --- a/includes/Templating.php +++ b/includes/Templating.php @@ -407,6 +407,11 @@ $parsoid = json_decode( $parsoid, true ); if ( isset( $parsoid['sa']['href'] ) ) { + // Don't process invalid links + $title = Title::newFromText( $parsoid['sa']['href'] ); + if ( $title === null ) { + continue; + } // gather existing link attributes $attributes = array(); foreach ( $linkNode->attributes as $attribute ) { @@ -414,7 +419,6 @@ } // let MW build link HTML based on Parsoid data - $title = Title::newFromText( $parsoid['sa']['href'] ); $linkHTML = Linker::link( $title, $linkNode->nodeValue, $attributes ); // create new DOM from this MW-built link @@ -463,7 +467,6 @@ if ( $post->isTopicTitle() ) { return array( array(), true ); } - $content = $post->getContent( 'html' ); // make sure a post is not checked more than once $revisionId = $post->getRevisionId()->getHex(); @@ -473,6 +476,7 @@ $this->parsoidLinksProcessed[$revisionId] = true; // find links in DOM + $content = $post->getContent( 'html' ); $dom = ParsoidUtils::createDOM( $content ); $xpath = new \DOMXPath( $dom ); $linkNodes = $xpath->query( '//a[@rel="mw:WikiLink"][@data-parsoid]' ); @@ -484,7 +488,10 @@ if ( isset( $parsoid['sa']['href'] ) ) { // real results will be stored in Templating::parsoidLinks $link = $parsoid['sa']['href']; - $this->parsoidLinks[$link] = Title::newFromText( $link ); + $title = Title::newFromText( $link ); + if ( $title !== null ) { + $this->parsoidLinks[$link] = $title; + } } } -- To view, visit https://gerrit.wikimedia.org/r/98744 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I85ce508de311afb4ff811a1b6a8a62a7e4c5b4bf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: EBernhardson ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Story 1401: Language Selector Overlay UI Redesign - change (mediawiki...MobileFrontend)
JGonera has uploaded a new change for review. https://gerrit.wikimedia.org/r/98743 Change subject: Story 1401: Language Selector Overlay UI Redesign .. Story 1401: Language Selector Overlay UI Redesign Also make some overlay styles more uniform, fix a -1px margin hack so that the border of the last element in an overlay list (.page-list) doesn't disappear. Change-Id: Ib700b810c1d1e10fdac1ae43f25c8e043227e02c --- M MobileFrontend.i18n.php M includes/Resources.php M includes/skins/SkinMinerva.php M includes/skins/SkinMobileBeta.php R javascripts/modules/languages/LanguageOverlay.js A javascripts/modules/languagesNew/LanguageOverlay.js A javascripts/modules/languagesNew/languages.js R javascripts/modules/languagesNew/preferred.js M less/common/OverlayNew.less M less/common/pagelist.less M less/variables.less A templates/modules/languagesNew/LanguageOverlay.html A tests/javascripts/modules/languagesNew/test_languages.js 13 files changed, 239 insertions(+), 20 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/43/98743/1 diff --git a/MobileFrontend.i18n.php b/MobileFrontend.i18n.php index 7c3dc5e..026f583 100644 --- a/MobileFrontend.i18n.php +++ b/MobileFrontend.i18n.php @@ -68,7 +68,7 @@ 'mobile-frontend-on' => 'ON', 'mobile-frontend-featured-article' => 'Today\'s featured content', 'mobile-frontend-news-items' => 'In The News', - 'mobile-frontend-language' => 'Language:', + 'mobile-frontend-language-heading' => "'''Languages'''", 'mobile-frontend-language-article-heading' => 'Read in another language', 'mobile-frontend-current-language' => '{{#language:{{CONTENTLANG', 'mobile-frontend-language-header' => 'This page is available in $1 {{PLURAL:$1|language|languages}}', @@ -477,7 +477,7 @@ {{Identical|On}}', 'mobile-frontend-featured-article' => 'The title that will appear before the element with the mf-tfa selector.', 'mobile-frontend-news-items' => 'The title that will appear before the element with the mf-itn selector.', - 'mobile-frontend-language' => '{{Identical|Language}}', + 'mobile-frontend-language-heading' => 'The title for the list of languages for a page.', 'mobile-frontend-language-article-heading' => 'A heading within the page the content of which lists the other languages available for this page: translate the message considering the list to have an undetermined number of items.', 'mobile-frontend-current-language' => '{{optional}}', 'mobile-frontend-language-header' => 'Header at top of language selection overlay describing number of languages that it is possible to read the page in diff --git a/includes/Resources.php b/includes/Resources.php index 3c08653..b8a1738 100644 --- a/includes/Resources.php +++ b/includes/Resources.php @@ -505,7 +505,6 @@ 'javascripts/modules/mf-toggle-dynamic.js', 'javascripts/modules/talk/talk.js', 'javascripts/modules/mediaViewer.js', - 'javascripts/modules/languages/preferred.js', 'javascripts/modules/keepgoing/keepgoing.js', ), 'templates' => array( @@ -619,7 +618,6 @@ 'mobile.stable.styles' => $wgMFMobileResourceBoilerplate + array( 'styles' => array( 'less/common/common-js.less', - 'less/modules/languages.less', 'less/modules/watchstar.less', 'less/modules/tutorials.less', ), @@ -676,8 +674,6 @@ 'templates' => array( 'section', 'wikitext/commons-upload', - // LanguageOverlay.js - 'overlays/languages', 'overlays/cleanup', // search.js and Nearby.js 'articleList', @@ -701,8 +697,6 @@ 'javascripts/common/notification.js', 'javascripts/common/Page.js', 'javascripts/modules/uploads/PhotoUploaderButton.js', - // Language specific code - 'javascripts/common/languages/LanguageOverlay.js', ), 'messages' => array( // mf-navigation.js @@ -712,11 +706,6 @@ // LearnMoreOverlay.js, newbie.js 'cancel', - - // LanguageOverlay.js - 'mobile-frontend-language-header', - 'mobile-frontend-language-site-choose', - 'mobile-frontend-language-footer', // page.js 'mobile-frontend-talk-overlay-header', @@ -773,7 +762,6 @@
[MediaWiki-commits] [Gerrit] sanitizer-escape-id - change (mediawiki...GWToolset)
Dan-nl has uploaded a new change for review. https://gerrit.wikimedia.org/r/98742 Change subject: sanitizer-escape-id .. sanitizer-escape-id chris steipp requested that: * getButtonRowNoMetadata, getFirstRow use Sanitizer::escapeId for html id attr * xml_validator.asp needs to be an external link when the $msg on line line 463 of /includes/Handlers/Xml/XmlDetectHandler.php is passed to GWTException, it is properly converted to an external exception. i’m assuming that this means that class="external free" gets applied to the link and rel="nofollow". i also adjusted the same link that is in /includes/Forms/MetadataDetectForm.php Change-Id: I9e8a8daa92fe59d9bc206028fbbef9b4b06b7ff5 --- M includes/Forms/MetadataDetectForm.php M includes/Handlers/Xml/XmlDetectHandler.php 2 files changed, 11 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GWToolset refs/changes/42/98742/1 diff --git a/includes/Forms/MetadataDetectForm.php b/includes/Forms/MetadataDetectForm.php index 1e2d951..5b4d896 100644 --- a/includes/Forms/MetadataDetectForm.php +++ b/includes/Forms/MetadataDetectForm.php @@ -193,7 +193,9 @@ 'a', array( 'href' => 'http://www.w3schools.com/xml/xml_validator.asp', - 'target' => '_blank' + 'target' => '_blank', + 'class' => 'external free', + 'rel' => 'nofollow' ), 'XML Validator' ) diff --git a/includes/Handlers/Xml/XmlDetectHandler.php b/includes/Handlers/Xml/XmlDetectHandler.php index 8e5c9c3..1950090 100644 --- a/includes/Handlers/Xml/XmlDetectHandler.php +++ b/includes/Handlers/Xml/XmlDetectHandler.php @@ -17,6 +17,7 @@ GWToolset\Models\MediawikiTemplate, Html, MWException, + Sanitizer, SpecialPage, XMLReader; @@ -209,11 +210,11 @@ return sprintf( $template, - Utils::sanitizeString( $parameter_as_id ), + Sanitizer::escapeId( $parameter_as_id ), $this->getFormLabel( $parameter ), $required, Utils::sanitizeString( $parameter ), - Utils::sanitizeString( $parameter_as_id ), + Sanitizer::escapeId( $parameter_as_id ), $this->getMetadataAsOptions( $selected_option ) ); } @@ -240,11 +241,11 @@ return sprintf( $template, - Utils::sanitizeString( $parameter_as_id ), + Sanitizer::escapeId( $parameter_as_id ), $this->getFormLabel( $parameter ), $required, Utils::sanitizeString( $parameter ), - Utils::sanitizeString( $parameter_as_id ), + Sanitizer::escapeId( $parameter_as_id ), $this->getMetadataAsOptions( $selected_option ) ); } @@ -452,9 +453,9 @@ if ( is_string( $xml_source ) && !empty( $xml_source ) ) { $this->readXmlAsFile( $user_options, $xml_source, $callback ); } else { - $msg = wfMessage( 'gwtoolset-developer-issue' )->params( - wfMessage( 'gwtoolset-no-xml-source' )->escaped() - )->parse(); + $msg = wfMessage( 'gwtoolset-developer-issue' ) + ->params( wfMessage( 'gwtoolset-no-xml-source' )->escaped() ) + ->parse(); throw new MWException( $msg ); } -- To view, visit https://gerrit.wikimedia.org/r/98742 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9e8a8daa92fe59d9bc206028fbbef9b4b06b7ff5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GWToolset Gerrit-Branch: master Gerrit-Owner: Dan-nl ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] d7 api: drupal_json_encode - change (wikimedia...crm)
Katie Horn has submitted this change and it was merged. Change subject: d7 api: drupal_json_encode .. d7 api: drupal_json_encode Change-Id: Ie99800dfb1597a1f9d1e71a01db53c55f54400b3 --- M sites/all/modules/queue2civicrm/queue2civicrm.module 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Katie Horn: Verified; Looks good to me, approved diff --git a/sites/all/modules/queue2civicrm/queue2civicrm.module b/sites/all/modules/queue2civicrm/queue2civicrm.module index 2d9e08b..adf2522 100644 --- a/sites/all/modules/queue2civicrm/queue2civicrm.module +++ b/sites/all/modules/queue2civicrm/queue2civicrm.module @@ -343,7 +343,7 @@ */ function queue2civicrm_insertmq_form_submit($form, &$form_state) { $q = queue2civicrm_stomp(); - $result = $q->enqueue( drupal_to_js($form_state['values']), array('persistent' => true), $form_state['values']['queue'] ); + $result = $q->enqueue( drupal_json_encode($form_state['values']), array('persistent' => true), $form_state['values']['queue'] ); $q->disconnect(); if (!$result) { watchdog('queue2civicrm','Send to queue failed for this message: ' . check_plain(print_r($form_state['values'], TRUE)) . ''); -- To view, visit https://gerrit.wikimedia.org/r/98741 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie99800dfb1597a1f9d1e71a01db53c55f54400b3 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Adamw Gerrit-Reviewer: Katie Horn Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] d7 api: drupal_json_encode - change (wikimedia...crm)
Adamw has uploaded a new change for review. https://gerrit.wikimedia.org/r/98741 Change subject: d7 api: drupal_json_encode .. d7 api: drupal_json_encode Change-Id: Ie99800dfb1597a1f9d1e71a01db53c55f54400b3 --- M sites/all/modules/queue2civicrm/queue2civicrm.module 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/41/98741/1 diff --git a/sites/all/modules/queue2civicrm/queue2civicrm.module b/sites/all/modules/queue2civicrm/queue2civicrm.module index 2d9e08b..adf2522 100644 --- a/sites/all/modules/queue2civicrm/queue2civicrm.module +++ b/sites/all/modules/queue2civicrm/queue2civicrm.module @@ -343,7 +343,7 @@ */ function queue2civicrm_insertmq_form_submit($form, &$form_state) { $q = queue2civicrm_stomp(); - $result = $q->enqueue( drupal_to_js($form_state['values']), array('persistent' => true), $form_state['values']['queue'] ); + $result = $q->enqueue( drupal_json_encode($form_state['values']), array('persistent' => true), $form_state['values']['queue'] ); $q->disconnect(); if (!$result) { watchdog('queue2civicrm','Send to queue failed for this message: ' . check_plain(print_r($form_state['values'], TRUE)) . ''); -- To view, visit https://gerrit.wikimedia.org/r/98741 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie99800dfb1597a1f9d1e71a01db53c55f54400b3 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Adamw ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [WIP] Add configuration for Wikimania Scholarships - change (operations/puppet)
BryanDavis has uploaded a new change for review. https://gerrit.wikimedia.org/r/98740 Change subject: [WIP] Add configuration for Wikimania Scholarships .. [WIP] Add configuration for Wikimania Scholarships Configuration for the Wikimania Scholarships application. Change-Id: Ie568f268b1df21bd3bd6681436f6bac444f82132 --- M manifests/role/deployment.pp A modules/wikimania_scholarships/manifests/init.pp A modules/wikimania_scholarships/templates/apache.conf.erb A modules/wikimania_scholarships/templates/env.erb A modules/wikimania_scholarships/templates/logrotate.erb 5 files changed, 140 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/40/98740/1 diff --git a/manifests/role/deployment.pp b/manifests/role/deployment.pp index 88ece2e..d7a543e 100644 --- a/manifests/role/deployment.pp +++ b/manifests/role/deployment.pp @@ -126,6 +126,10 @@ 'service.restart' => ['ocg-collection'] }, } +'scholarships/scholarships' => { +'grain'=> 'scholarships', +'upstream' => 'https://gerrit.wikimedia.org/r/wikimedia/wikimania-scholarships', +}, } } diff --git a/modules/wikimania_scholarships/manifests/init.pp b/modules/wikimania_scholarships/manifests/init.pp new file mode 100644 index 000..141c420 --- /dev/null +++ b/modules/wikimania_scholarships/manifests/init.pp @@ -0,0 +1,83 @@ +# = Class: wikimania_scholarships +# +# This class installs/configures/manages the Wikimania Scholarships +# application. +# +# == Parameters: +# - $hostname: hostname for apache vhost +# - $deploy_dir: directory application is deployed to +# - $logs_dir: directory to write log files to +# - $serveradmin: administrative contact email address +# - $mysql_host: mysql database server +# - $mysql_db: mysql database +# +# == Sample usage: +# +# class { "wikimania_scholarships": } +# +class wikimania_scholarships( + $hostname = 'scholarships.wikimedia.org', + $deploy_dir = '/srv/deployment/scholarships/scholarships', + $logs_dir = '/var/log/scholarships', + $serveradmin = 'r...@wikimedia.org', + $mysql_host = 'localhost', + $mysql_db = 'scholarships' +){ + + system::role { 'wikimania_scholarships': + description => "${hostname}" + } + + include passwords::mysql::wikimania_scholarship, webserver::php5-mysql + + $mysql_user = $passwords::mysql::wikimania_scholarships::user + $mysql_pass = $passwords::mysql::wikimania_scholarships::password + + # Trebuchet deployment + deployment::target { 'scholarships': } + + file { + "/etc/apache2/sites-available/${hostname}": + ensure => present, + mode=> '0444', + owner => 'root', + group => 'root', + notify => Service['apache2'], + content => template('wikimania_scholarships/apache.conf.erb'); + + '/etc/logrotate.d/wikimania_scholarships': + ensure => file, + owner => root, + group => root, + mode=> '0444', + content => template('wikimania_scholarships/logrotate.erb'); + + "${deploy_dir}": + ensure => directory; + + "${deploy_dir}/.env": + ensure => present, + mode=> '0444', + owner => 'root', + group => 'root', + notify => Service['apache2'], + content => template('wikimania_scholarships/env.erb'); + } + + # FIXME: Log2udp for log file? + + # Webserver setup + if ! defined( Class['webserver::php5'] ) { + class { 'webserver::php5': } + } + apache_module { rewrite: name => 'rewrite' } + apache_site { 'wikimania_scholarships': name => "${hostname}" } + apache_confd {'namevirtualhost': install => true, name => 'namevirtualhost'} + + # Dependencies + Class['webserver::php5'] -> + Class['webserver::php5-mysql'] -> + Apache_module['rewrite'] + +} +# vim:sw=4 ts=4 sts=4 noet: diff --git a/modules/wikimania_scholarships/templates/apache.conf.erb b/modules/wikimania_scholarships/templates/apache.conf.erb new file mode 100644 index 000..be1c16a --- /dev/null +++ b/modules/wikimania_scholarships/templates/apache.conf.erb @@ -0,0 +1,30 @@ +# +### THIS FILE IS MANAGED BY PUPPET +### puppet:///modules/wikimania_scholarships/apache.conf +# + + ServerName <%= @hostname %> + ServerAdmin <%= @serveradmin %> + + DocumentRoot <%= @dep
[MediaWiki-commits] [Gerrit] Use proper line-breaking algorithm for URLs (or things which... - change (mediawiki...latex_renderer)
Cscott has uploaded a new change for review. https://gerrit.wikimedia.org/r/98739 Change subject: Use proper line-breaking algorithm for URLs (or things which look like them). .. Use proper line-breaking algorithm for URLs (or things which look like them). Change-Id: Ia781bdea1db04a7ba9a4ea71856630b08eb25cca --- M lib/index.js 1 file changed, 14 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection/OfflineContentGenerator/latex_renderer refs/changes/39/98739/1 diff --git a/lib/index.js b/lib/index.js index 98bd341..1f344a6 100644 --- a/lib/index.js +++ b/lib/index.js @@ -37,7 +37,8 @@ "\\usepackage[usenames]{xcolor}", "\\definecolor{linkcolor}{rgb}{.27,0,0}", "\\definecolor{citecolor}{rgb}{0,0,.27}", - "\\usepackage[colorlinks,breaklinks,allcolors=linkcolor,linkcolor=citecolor]{hyperref}", + "\\usepackage[unicode,colorlinks,breaklinks,allcolors=linkcolor,linkcolor=citecolor]{hyperref}", + "\\urlstyle{same}", // This is a documented workaround for including SVGs with RGB colors and/or // transparency; see: // http://tex.stackexchange.com/questions/29523/inkscape-pdf-includegraphics-xelatex-changed-colors @@ -71,9 +72,20 @@ "\\end{document}" ].join("\n"); +// John Gruber's "Improved Liberal, Accurate Regex Pattern for Matching URLs" +var URL_REGEXP = /\b((?:[a-z][\w\-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\((?:[^\s()<>]+|(?:\([^\s()<>]+\)))*\))+(?:\((?:[^\s()<>]+|(?:\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/i; + // Convert plain text (with HTML whitespace semantics) to an appropriately // escaped string for TeX to process. -var texEscape = function(str) { +var texEscape = function(str, nourls) { + if (!nourls) { + // pull out URLs and flag them specially + return str.split(URL_REGEXP).map(function(s) { + return texEscape(s, "nourls"); + }).map(function(s, i) { + return (s && (i&1)) ? ('\\nolinkurl{' + s + '}') : s; + }).join(''); + } // protect TeX special characters str = str.replace(/[#$&_%{}\\]/g, function(c) { return '\\' + c; }); // twiddle and carat are special -- To view, visit https://gerrit.wikimedia.org/r/98739 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia781bdea1db04a7ba9a4ea71856630b08eb25cca Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Collection/OfflineContentGenerator/latex_renderer Gerrit-Branch: master Gerrit-Owner: Cscott ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix to allow the RapidError form to work with amazon payments - change (mediawiki...DonationInterface)
Katie Horn has uploaded a new change for review. https://gerrit.wikimedia.org/r/98738 Change subject: Fix to allow the RapidError form to work with amazon payments .. Fix to allow the RapidError form to work with amazon payments Change-Id: I122ba25da7826d4878f5ee50abdbcde3f06f --- M amazon_gateway/amazon_gateway.body.php M gateway_common/gateway.adapter.php 2 files changed, 22 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/38/98738/1 diff --git a/amazon_gateway/amazon_gateway.body.php b/amazon_gateway/amazon_gateway.body.php index c82fddd..c87ac32 100644 --- a/amazon_gateway/amazon_gateway.body.php +++ b/amazon_gateway/amazon_gateway.body.php @@ -65,7 +65,12 @@ $this->getOutput()->redirect( $this->adapter->getFailPage() ); } } else { - $this->log( 'Failed to process gateway return. Tokens bad or no status.', LOG_ERR ); + $specialform = $this->getRequest()->getText( 'ffname', null ); + if ( !is_null( $specialform ) && $this->adapter->isValidSpecialForm( $specialform ) ){ + $this->displayForm(); + } else { + $this->log( 'Failed to process gateway return. Tokens bad or no status.', LOG_ERR ); + } } } } diff --git a/gateway_common/gateway.adapter.php b/gateway_common/gateway.adapter.php index 2a43ee4..431034f 100644 --- a/gateway_common/gateway.adapter.php +++ b/gateway_common/gateway.adapter.php @@ -3067,5 +3067,21 @@ } return $params; } + + /** +* isValidSpecialForm: Tells us if the ffname supplied is a valid +* special form for the current gateway. +* @var string $ffname The form name we want to try +* @return boolean True if this is a valid special form, otherwise false +*/ + public function isValidSpecialForm( $ffname ){ + $defn = gatewayFormChooser::getFormDefinition( $ffname ); + if ( is_array( $defn ) && + DataValidator::value_appears_in( $this->getIdentifier(), $defn ) && + array_key_exists( 'special_type', $defn ) ){ + return true; + } + return false; + } } -- To view, visit https://gerrit.wikimedia.org/r/98738 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I122ba25da7826d4878f5ee50abdbcde3f06f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Katie Horn ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add accounts for bd808 and aaron on logstash nodes - change (operations/puppet)
Ori.livneh has submitted this change and it was merged. Change subject: Add accounts for bd808 and aaron on logstash nodes .. Add accounts for bd808 and aaron on logstash nodes Change-Id: Id52f5473079d63cb92fb5f2d78b7e0cd10b8eb4d --- M manifests/site.pp 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/site.pp b/manifests/site.pp index 43bbbf9..1b48dca 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -2748,7 +2748,10 @@ node /^logstash100[1-3]\.eqiad\.wmnet$/ { include standard + include groups::wikidev +include accounts::aaron +include accounts::bd808 sudo_user { ['aaron', 'bd808']: # RT 6366 privileges => ['ALL = NOPASSWD: ALL'], -- To view, visit https://gerrit.wikimedia.org/r/98736 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id52f5473079d63cb92fb5f2d78b7e0cd10b8eb4d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh Gerrit-Reviewer: Ori.livneh Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Limit topic titles to 260 bytes - change (mediawiki...Flow)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/98737 Change subject: Limit topic titles to 260 bytes .. Limit topic titles to 260 bytes Bug: 57453 Change-Id: I38c1a138cebdedb0c5d7ba9adfe123e0e9dbfe2e --- M Flow.i18n.php M includes/Block/Topic.php M includes/Block/TopicList.php M includes/Model/PostRevision.php 4 files changed, 13 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/37/98737/1 diff --git a/Flow.i18n.php b/Flow.i18n.php index f2480e5..fe8fac9 100644 --- a/Flow.i18n.php +++ b/Flow.i18n.php @@ -101,6 +101,7 @@ 'flow-error-invalid-moderation-state' => 'An invalid value was provided for moderationState', 'flow-error-invalid-moderation-reason' => 'Please provide a reason for the moderation', 'flow-error-not-allowed' => 'Insufficient permissions to execute this action', + 'flow-error-title-too-long' => 'Topic titles are restricted to $1 bytes.', 'flow-edit-header-submit' => 'Save header', @@ -443,6 +444,10 @@ Valid values for moderationState are: (none), hidden, deleted, suppressed', 'flow-error-invalid-moderation-reason' => 'Used as error message when no reason is given for the moderation of a post.', 'flow-error-not-allowed' => 'Insufficient permissions to execute this action', + 'flow-error-title-too-long' => 'Used as error message when a user submits a topic title that is too long to save. + +Parameters: +* $1 - The number of bytes allowed', 'flow-edit-header-submit' => 'Used as label for the Submit button.', 'flow-edit-title-submit' => 'Used as label for the Submit button.', 'flow-rev-message-edit-post' => 'Used as a revision comment when a post has been edited. diff --git a/includes/Block/Topic.php b/includes/Block/Topic.php index 6a7a9c0..c1fb9b9 100644 --- a/includes/Block/Topic.php +++ b/includes/Block/Topic.php @@ -111,8 +111,10 @@ protected function validateEditTitle() { if ( $this->workflow->isNew() ) { $this->errors['content'] = wfMessage( 'flow-no-existing-workflow' ); - } elseif ( empty( $this->submitted['content'] ) ) { + } elseif ( !isset( $this->submitted['content'] ) || !is_string( $this->submitted['content'] ) || strlen( $this->submitted['content'] ) === 0 ) { $this->errors['content'] = wfMessage( 'flow-missing-title-content' ); + } elseif ( strlen( $this->submitted['content'] ) > PostRevision::MAX_TOPIC_LENGTH ) { + $this->errors['content'] = wfMessage( 'flow-error-title-too-long', PostRevision::MAX_TOPIC_LENGTH ); } else { $topicTitle = $this->loadTopicTitle(); if ( !$topicTitle ) { diff --git a/includes/Block/TopicList.php b/includes/Block/TopicList.php index 32023cf..885fb5e 100644 --- a/includes/Block/TopicList.php +++ b/includes/Block/TopicList.php @@ -43,8 +43,10 @@ if ( !$this->user->isAllowed( 'edit' ) ) { $this->errors['permissions'] = wfMessage( 'flow-error-not-allowed' ); } - if ( !isset( $this->submitted['topic'] ) ) { + if ( !isset( $this->submitted['topic'] ) || !is_string( $this->submitted['topic'] ) || strlen( $this->submitted['topic'] === 0 ) ) { $this->errors['topic'] = wfMessage( 'flow-error-missing-title' ); + } elseif ( strlen( $this->submitted['topic'] ) > PostRevision::MAX_TOPIC_LENGTH ) { + $this->errors['topic'] = wfMessage( 'flow-error-title-too-long', PostRevision::MAX_TOPIC_LENGTH ); } } diff --git a/includes/Model/PostRevision.php b/includes/Model/PostRevision.php index 104cdfd..697ba8c 100644 --- a/includes/Model/PostRevision.php +++ b/includes/Model/PostRevision.php @@ -6,6 +6,8 @@ use MWTimestamp; class PostRevision extends AbstractRevision { + const MAX_TOPIC_LENGTH = 260; + protected $postId; // denormalized data that must not change between revisions of same post -- To view, visit https://gerrit.wikimedia.org/r/98737 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I38c1a138cebdedb0c5d7ba9adfe123e0e9dbfe2e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: EBernhardson ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add accounts for bd808 and aaron on logstash nodes - change (operations/puppet)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/98736 Change subject: Add accounts for bd808 and aaron on logstash nodes .. Add accounts for bd808 and aaron on logstash nodes Change-Id: Id52f5473079d63cb92fb5f2d78b7e0cd10b8eb4d --- M manifests/site.pp 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/36/98736/1 diff --git a/manifests/site.pp b/manifests/site.pp index 43bbbf9..1b48dca 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -2748,7 +2748,10 @@ node /^logstash100[1-3]\.eqiad\.wmnet$/ { include standard + include groups::wikidev +include accounts::aaron +include accounts::bd808 sudo_user { ['aaron', 'bd808']: # RT 6366 privileges => ['ALL = NOPASSWD: ALL'], -- To view, visit https://gerrit.wikimedia.org/r/98736 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id52f5473079d63cb92fb5f2d78b7e0cd10b8eb4d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Change the reset button text in Special: PasswordReset to 'R... - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Change the reset button text in Special: PasswordReset to 'Reset Password' .. Change the reset button text in Special: PasswordReset to 'Reset Password' This change is due to the fact that in some languages the text of the button overflows. Bug: 56194 Change-Id: I16ef4851921365c5a93503fe2d9cd0a4e15a021b --- M languages/messages/MessagesEn.php 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Swalling: Looks good to me, approved jenkins-bot: Verified diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 5b48e7d..4b63d03 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1200,7 +1200,7 @@ 'passwordtooshort'=> 'Passwords must be at least {{PLURAL:$1|1 character|$1 characters}}.', 'password-name-match' => 'Your password must be different from your username.', 'password-login-forbidden'=> 'The use of this username and password has been forbidden.', -'mailmypassword' => 'Email new password', +'mailmypassword' => 'Reset password', 'passwordremindertitle' => 'New temporary password for {{SITENAME}}', 'passwordremindertext'=> 'Someone (probably you, from IP address $1) requested a new password for {{SITENAME}} ($4). A temporary password for user @@ -1290,8 +1290,8 @@ # Special:PasswordReset 'passwordreset'=> 'Reset password', -'passwordreset-text-one' => 'Complete this form to reset your password.', -'passwordreset-text-many' => '{{PLURAL:$1|Fill one of the fields to reset your password.}}', +'passwordreset-text-one' => 'Complete this form to receive a temporary password via email.', +'passwordreset-text-many' => '{{PLURAL:$1|Fill in one of the fields to receive a temporary password via email.}}', 'passwordreset-legend' => 'Reset password', 'passwordreset-disabled' => 'Password resets have been disabled on this wiki.', 'passwordreset-emaildisabled' => 'Email features have been disabled on this wiki.', -- To view, visit https://gerrit.wikimedia.org/r/98733 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I16ef4851921365c5a93503fe2d9cd0a4e15a021b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: MegaAlex Gerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: Nemo bis Gerrit-Reviewer: Spage Gerrit-Reviewer: Swalling Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] table-create - change (mediawiki...GWToolset)
Dan-nl has uploaded a new change for review. https://gerrit.wikimedia.org/r/98735 Change subject: table-create .. table-create chris steipp pointed out that: * table-create-gwtoolset-mediawiki-templates.sql is missing hooks for update.php it’s no longer needed. Change-Id: I616a4ec5bc90b170c9dd93da53c3ecc87ba1c31d --- D sql/table-create-gwtoolset-mediawiki-templates.sql 1 file changed, 0 insertions(+), 23 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GWToolset refs/changes/35/98735/1 diff --git a/sql/table-create-gwtoolset-mediawiki-templates.sql b/sql/table-create-gwtoolset-mediawiki-templates.sql deleted file mode 100644 index bb2174d..000 --- a/sql/table-create-gwtoolset-mediawiki-templates.sql +++ /dev/null @@ -1,23 +0,0 @@ --- MySQL database schema for the GWToolset extension. --- @license GNU General Public License 3.0 http://www.gnu.org/licenses/gpl.html - -CREATE TABLE IF NOT EXISTS /*_*/gwtoolset_mediawiki_templates ( - `mediawiki_template_name` varchar(255) NOT NULL, - `mediawiki_template_json` blob NOT NULL, - PRIMARY KEY (`mediawiki_template_name`) -) /*$wgDBTableOptions*/; - --- https://commons.wikimedia.org/wiki/Template:Artwork -INSERT INTO /*_*/gwtoolset_mediawiki_templates ( `mediawiki_template_name`, `mediawiki_template_json` ) VALUES ( 'Artwork', '{"artist":"","title":"","description":"","date":"","medium":"","dimensions":"","institution":"","location":"","references":"","object history":"","exhibition history":"","credit line":"","inscriptions":"","notes":"","accession number":"","source":"","permission":"","other_versions":""}' ); - --- https://commons.wikimedia.org/wiki/Template:Book -INSERT INTO /*_*/gwtoolset_mediawiki_templates ( `mediawiki_template_name`, `mediawiki_template_json` ) VALUES ( 'Book', '{"Author":"","Translator":"","Editor":"","Illustrator":"","Title":"","Subtitle":"","Series title":"","Volume":"","Edition":"","Publisher":"","Printer":"","Date":"","City":"","Language":"","Description":"","Source":"","Permission":"","Image":"","Image page":"","Pageoverview":"","Wikisource":"","Homecat":"","Other_versions":"","ISBN":"","LCCN":"","OCLC":""}' ); - --- https://commons.wikimedia.org/wiki/Template:Musical_work -INSERT INTO /*_*/gwtoolset_mediawiki_templates ( `mediawiki_template_name`, `mediawiki_template_json` ) VALUES ( 'Musical work', '{"composer":"","lyrics_writer":"","performer":"","title":"","description":"","composition_date":"","performance_date":"","notes":"","record_ID":"","image":"","references":"","source":"","permission":"","other_versions":""}' ); - --- https://commons.wikimedia.org/wiki/Template:Photograph -INSERT INTO /*_*/gwtoolset_mediawiki_templates ( `mediawiki_template_name`, `mediawiki_template_json` ) VALUES ( 'Photograph', '{"photographer":"","title":"","description":"","depicted people":"","depicted place":"","date":"","medium":"","dimensions":"","institution":"","department":"","references":"","object history":"","exhibition history":"","credit line":"","inscriptions":"","notes":"","accession number":"","source":"","permission":"","other_versions":""}' ); - --- http://commons.wikimedia.org/wiki/Template:Specimen -INSERT INTO /*_*/gwtoolset_mediawiki_templates ( `mediawiki_template_name`, `mediawiki_template_json` ) VALUES ( 'Specimen', '{"taxon":"","authority":"","institution":"","accession number":"","sex":"","discovery place":"","cultivar":"","author":"","source":"","date":"","description":"","period":"","depicted place":"","camera coord":"","dimensions":"","institution":"","location":"","object history":"","exhibition history":"","credit line":"","notes":"","references":"","permission":"","other versions":"","photographer":"","source":""}' ); -- To view, visit https://gerrit.wikimedia.org/r/98735 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I616a4ec5bc90b170c9dd93da53c3ecc87ba1c31d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GWToolset Gerrit-Branch: master Gerrit-Owner: Dan-nl ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rename Special:History to Special:MobileHistory - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Rename Special:History to Special:MobileHistory .. Rename Special:History to Special:MobileHistory Allows core to use Special:History (see I612df6e33c74527c9a3a0af5a6c66cd977dc7344) Also adds the missing alias. Change-Id: I11b6eb72793d2d885e0ce8f70bf780386b30daed --- M MobileFrontend.alias.php M MobileFrontend.php M includes/MobileFrontend.hooks.php R includes/specials/SpecialMobileHistory.php 4 files changed, 4 insertions(+), 3 deletions(-) Approvals: Jdlrobson: Looks good to me, approved jenkins-bot: Verified diff --git a/MobileFrontend.alias.php b/MobileFrontend.alias.php index f412718..b48817e 100644 --- a/MobileFrontend.alias.php +++ b/MobileFrontend.alias.php @@ -17,6 +17,7 @@ 'MobileMenu' => array( 'MobileMenu' ), 'Nearby' => array( 'Nearby' ), 'UserProfile' => array( 'UserProfile' ), + 'MobileHistory' => array( 'MobileHistory' ), ); /** Arabic (العربية) */ diff --git a/MobileFrontend.php b/MobileFrontend.php index 9e92737..36e0142 100644 --- a/MobileFrontend.php +++ b/MobileFrontend.php @@ -64,7 +64,7 @@ 'SpecialUploads' => 'specials/SpecialUploads', 'SpecialUserProfile' => 'specials/SpecialUserProfile', - 'SpecialHistory' => 'specials/SpecialHistory', + 'SpecialMobileHistory' => 'specials/SpecialMobileHistory', 'SpecialMobileUserlogin' => 'specials/SpecialMobileUserlogin', 'SpecialMobileDiff' => 'specials/SpecialMobileDiff', 'SpecialMobileOptions' => 'specials/SpecialMobileOptions', diff --git a/includes/MobileFrontend.hooks.php b/includes/MobileFrontend.hooks.php index 25e58da..1e7d3af 100644 --- a/includes/MobileFrontend.hooks.php +++ b/includes/MobileFrontend.hooks.php @@ -290,7 +290,7 @@ } $list['UserProfile'] = 'SpecialUserProfile'; - $list['History'] = 'SpecialHistory'; + $list['History'] = 'SpecialMobileHistory'; } return true; } diff --git a/includes/specials/SpecialHistory.php b/includes/specials/SpecialMobileHistory.php similarity index 98% rename from includes/specials/SpecialHistory.php rename to includes/specials/SpecialMobileHistory.php index 95358e5..ffcac70 100644 --- a/includes/specials/SpecialHistory.php +++ b/includes/specials/SpecialMobileHistory.php @@ -1,6 +1,6 @@ https://gerrit.wikimedia.org/r/96963 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I11b6eb72793d2d885e0ce8f70bf780386b30daed Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Legoktm Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: MaxSem Gerrit-Reviewer: Siebrand Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add MultimediaViewer to qunitable extension list - change (integration/jenkins-job-builder-config)
jenkins-bot has submitted this change and it was merged. Change subject: Add MultimediaViewer to qunitable extension list .. Add MultimediaViewer to qunitable extension list We have qunit running now, we just need the job to exist... Change-Id: I79c0c0f756d75c779f2a08b04e1c7c5b19c4a721 --- M mediawiki-extensions.yaml 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: MarkTraceur: Looks good to me, approved jenkins-bot: Verified diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml index e67c4c9..4ef0a60 100644 --- a/mediawiki-extensions.yaml +++ b/mediawiki-extensions.yaml @@ -575,6 +575,9 @@ ext-name: MobileFrontend - '{name}-{ext-name}-qunit': name: mwext +ext-name: MultimediaViewer + - '{name}-{ext-name}-qunit': +name: mwext ext-name: VisualEditor - 'mwext-VisualEditor-doc-test': -- To view, visit https://gerrit.wikimedia.org/r/98731 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I79c0c0f756d75c779f2a08b04e1c7c5b19c4a721 Gerrit-PatchSet: 2 Gerrit-Project: integration/jenkins-job-builder-config Gerrit-Branch: master Gerrit-Owner: MarkTraceur Gerrit-Reviewer: MarkTraceur 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 logstash100[1-3] to site.pp & add bd808 & aaron as sudo ... - change (operations/puppet)
Ori.livneh has submitted this change and it was merged. Change subject: Add logstash100[1-3] to site.pp & add bd808 & aaron as sudo per RT 6366 .. Add logstash100[1-3] to site.pp & add bd808 & aaron as sudo per RT 6366 Change-Id: Iceb0d90bb2fa9978f6f8899112ea0a27cdc49dfe --- M manifests/site.pp 1 file changed, 9 insertions(+), 0 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/site.pp b/manifests/site.pp index b07a870..43bbbf9 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -2746,6 +2746,15 @@ class { "lvs::realserver": realserver_ips => [ "10.2.2.30" ] } } +node /^logstash100[1-3]\.eqiad\.wmnet$/ { +include standard +include groups::wikidev + +sudo_user { ['aaron', 'bd808']: # RT 6366 +privileges => ['ALL = NOPASSWD: ALL'], +} +} + node "tin.eqiad.wmnet" { $cluster = "misc" $domain_search = "wikimedia.org pmtpa.wmnet eqiad.wmnet esams.wikimedia.org" -- To view, visit https://gerrit.wikimedia.org/r/98730 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iceb0d90bb2fa9978f6f8899112ea0a27cdc49dfe Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh Gerrit-Reviewer: Ori.livneh Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Change the reset button text in Special: PasswordReset to 'R... - change (mediawiki/core)
MegaAlex has uploaded a new change for review. https://gerrit.wikimedia.org/r/98733 Change subject: Change the reset button text in Special: PasswordReset to 'Reset Password' .. Change the reset button text in Special: PasswordReset to 'Reset Password' This change is due to the fact that in some languages the text of the button overflows. Bug: 56194 Change-Id: I16ef4851921365c5a93503fe2d9cd0a4e15a021b --- M languages/messages/MessagesEn.php 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/33/98733/1 diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 5b48e7d..4b63d03 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1200,7 +1200,7 @@ 'passwordtooshort'=> 'Passwords must be at least {{PLURAL:$1|1 character|$1 characters}}.', 'password-name-match' => 'Your password must be different from your username.', 'password-login-forbidden'=> 'The use of this username and password has been forbidden.', -'mailmypassword' => 'Email new password', +'mailmypassword' => 'Reset password', 'passwordremindertitle' => 'New temporary password for {{SITENAME}}', 'passwordremindertext'=> 'Someone (probably you, from IP address $1) requested a new password for {{SITENAME}} ($4). A temporary password for user @@ -1290,8 +1290,8 @@ # Special:PasswordReset 'passwordreset'=> 'Reset password', -'passwordreset-text-one' => 'Complete this form to reset your password.', -'passwordreset-text-many' => '{{PLURAL:$1|Fill one of the fields to reset your password.}}', +'passwordreset-text-one' => 'Complete this form to receive a temporary password via email.', +'passwordreset-text-many' => '{{PLURAL:$1|Fill in one of the fields to receive a temporary password via email.}}', 'passwordreset-legend' => 'Reset password', 'passwordreset-disabled' => 'Password resets have been disabled on this wiki.', 'passwordreset-emaildisabled' => 'Email features have been disabled on this wiki.', -- To view, visit https://gerrit.wikimedia.org/r/98733 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I16ef4851921365c5a93503fe2d9cd0a4e15a021b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: MegaAlex ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Put things into packages - change (apps...wikipedia)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/98734 Change subject: Put things into packages .. Put things into packages This is Java, and things have to be always in other things. Change-Id: I3603928dd05df9b8f1fd4aa70bcbb00e2e01add1 --- M wikipedia-it/src/main/java/org/wikimedia/wikipedia/test/PageFetchTaskTests.java M wikipedia-it/src/main/java/org/wikimedia/wikipedia/test/PageTitleTests.java M wikipedia-it/src/main/java/org/wikimedia/wikipedia/test/ParcelableTest.java M wikipedia-it/src/main/java/org/wikimedia/wikipedia/test/SectionTests.java M wikipedia/AndroidManifest.xml M wikipedia/res/layout/activity_main.xml M wikipedia/src/main/java/org/wikimedia/wikipedia/LinkHandler.java M wikipedia/src/main/java/org/wikimedia/wikipedia/Site.java M wikipedia/src/main/java/org/wikimedia/wikipedia/events/NewWikiPageNavigationEvent.java M wikipedia/src/main/java/org/wikimedia/wikipedia/history/HistoryEntry.java M wikipedia/src/main/java/org/wikimedia/wikipedia/history/HistoryEntryPersistanceHelper.java R wikipedia/src/main/java/org/wikimedia/wikipedia/pages/Page.java R wikipedia/src/main/java/org/wikimedia/wikipedia/pages/PageActivity.java R wikipedia/src/main/java/org/wikimedia/wikipedia/pages/PageImagesTask.java R wikipedia/src/main/java/org/wikimedia/wikipedia/pages/PageQueryTask.java R wikipedia/src/main/java/org/wikimedia/wikipedia/pages/PageTitle.java R wikipedia/src/main/java/org/wikimedia/wikipedia/pages/PageViewFragment.java R wikipedia/src/main/java/org/wikimedia/wikipedia/search/SearchArticlesFragment.java R wikipedia/src/main/java/org/wikimedia/wikipedia/search/SearchArticlesTask.java R wikipedia/src/main/java/org/wikimedia/wikipedia/sections/Section.java R wikipedia/src/main/java/org/wikimedia/wikipedia/sections/SectionsFetchTask.java R wikipedia/src/main/java/org/wikimedia/wikipedia/util/ParcelableLruCache.java R wikipedia/src/main/java/org/wikimedia/wikipedia/util/Utils.java 23 files changed, 58 insertions(+), 28 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/34/98734/1 diff --git a/wikipedia-it/src/main/java/org/wikimedia/wikipedia/test/PageFetchTaskTests.java b/wikipedia-it/src/main/java/org/wikimedia/wikipedia/test/PageFetchTaskTests.java index d5f8511..50b25a8 100644 --- a/wikipedia-it/src/main/java/org/wikimedia/wikipedia/test/PageFetchTaskTests.java +++ b/wikipedia-it/src/main/java/org/wikimedia/wikipedia/test/PageFetchTaskTests.java @@ -4,6 +4,9 @@ import android.test.ActivityUnitTestCase; import org.mediawiki.api.json.Api; import org.wikimedia.wikipedia.*; +import org.wikimedia.wikipedia.pages.PageTitle; +import org.wikimedia.wikipedia.sections.Section; +import org.wikimedia.wikipedia.sections.SectionsFetchTask; import java.util.List; import java.util.concurrent.CountDownLatch; diff --git a/wikipedia-it/src/main/java/org/wikimedia/wikipedia/test/PageTitleTests.java b/wikipedia-it/src/main/java/org/wikimedia/wikipedia/test/PageTitleTests.java index f367466..b932a07 100644 --- a/wikipedia-it/src/main/java/org/wikimedia/wikipedia/test/PageTitleTests.java +++ b/wikipedia-it/src/main/java/org/wikimedia/wikipedia/test/PageTitleTests.java @@ -1,7 +1,7 @@ package org.wikimedia.wikipedia.test; import junit.framework.TestCase; -import org.wikimedia.wikipedia.PageTitle; +import org.wikimedia.wikipedia.pages.PageTitle; import org.wikimedia.wikipedia.Site; public class PageTitleTests extends TestCase { diff --git a/wikipedia-it/src/main/java/org/wikimedia/wikipedia/test/ParcelableTest.java b/wikipedia-it/src/main/java/org/wikimedia/wikipedia/test/ParcelableTest.java index 75d0688..3fe68e7 100644 --- a/wikipedia-it/src/main/java/org/wikimedia/wikipedia/test/ParcelableTest.java +++ b/wikipedia-it/src/main/java/org/wikimedia/wikipedia/test/ParcelableTest.java @@ -5,9 +5,12 @@ import junit.framework.TestCase; import org.wikimedia.wikipedia.*; import org.wikimedia.wikipedia.history.HistoryEntry; +import org.wikimedia.wikipedia.pages.Page; +import org.wikimedia.wikipedia.pages.PageTitle; +import org.wikimedia.wikipedia.sections.Section; +import org.wikimedia.wikipedia.util.ParcelableLruCache; import java.util.ArrayList; -import java.util.List; public class ParcelableTest extends TestCase { private void parcelAndTestObjects(Parcelable p) throws Exception { diff --git a/wikipedia-it/src/main/java/org/wikimedia/wikipedia/test/SectionTests.java b/wikipedia-it/src/main/java/org/wikimedia/wikipedia/test/SectionTests.java index 18d59af..ca0f0aa 100644 --- a/wikipedia-it/src/main/java/org/wikimedia/wikipedia/test/SectionTests.java +++ b/wikipedia-it/src/main/java/org/wikimedia/wikipedia/test/SectionTests.java @@ -2,7 +2,7 @@ import android.test.AndroidTestCase; import org.junit.Test; -import org.wikimedia.wikipedia.Section; +import org.wikimedia.wikipedia.sections.Section; public class SectionTests extends
[MediaWiki-commits] [Gerrit] Changing banner expiration to 10 months - change (operations/mediawiki-config)
Mwalker has submitted this change and it was merged. Change subject: Changing banner expiration to 10 months .. Changing banner expiration to 10 months Change-Id: I9e2f2492324f4b003c7ae592f6ed10dee8c37cba --- M wmf-config/CommonSettings.php M wmf-config/InitialiseSettings.php 2 files changed, 9 insertions(+), 11 deletions(-) Approvals: Mwalker: Looks good to me, approved diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index 9841dfc..e89e8b6 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -1434,13 +1434,15 @@ // Bug 49905 $wgNoticeUseLanguageConversion = true; -} - -// Set CentralNotice banner hide cookie; Needs to be enabled for all wikis that display banners ~awjr 2011-11-07 -if ( $wmgSetNoticeHideBannersExpiration && $wmgUseCentralNotice ) { - // Expire the cookie on 2012-12-26. If this is in the past - // Special:HideBanners will set it to 2 weeks from today. - $wgNoticeHideBannersExpiration = 135648; + + // *** Hide Cookies *** + // A little bit of historical breadcrumbs: + // In 2012 we expired cookies on 2012-12-26, then everyone had + // a two week expiration until 2013-01-22 whereupon we introduced + // a year long expiration. For the 2013 fundraiser starting + // 2013-12-02 we're now using a 10 month expiration. + $wgNoticeCookieShortExpiry = 1209600; // 2 weeks + $wgNoticeCookieLongExpiry = 2592; // 10 months } // Load our site-specific l10n extensions diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 31b7b5c..cc22d72 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -3955,10 +3955,6 @@ 'metawiki' => true, ), -'wmgSetNoticeHideBannersExpiration' => array( - 'default' => true, -), - // For CentralNotice project pickers 'wmgNoticeProject' => array( 'advisorywiki' => 'wikimedia', -- To view, visit https://gerrit.wikimedia.org/r/98723 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9e2f2492324f4b003c7ae592f6ed10dee8c37cba Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Mwalker Gerrit-Reviewer: Mwalker Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] experimental fix for Bug 57702 - change (mediawiki...Flow)
Cmcmahon has uploaded a new change for review. https://gerrit.wikimedia.org/r/98732 Change subject: experimental fix for Bug 57702 .. experimental fix for Bug 57702 Change-Id: I2c9608083d5c9876e8c04c645c16e9e63e200ff1 --- M tests/browser/features/step_definitions/edit_existing_steps.rb 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/32/98732/1 diff --git a/tests/browser/features/step_definitions/edit_existing_steps.rb b/tests/browser/features/step_definitions/edit_existing_steps.rb index 6d482c5..48c7685 100644 --- a/tests/browser/features/step_definitions/edit_existing_steps.rb +++ b/tests/browser/features/step_definitions/edit_existing_steps.rb @@ -1,5 +1,6 @@ When(/^I click the Edit post pencil icon$/) do on(FlowPage) do |page| +@browser.window.resize_to(800, 800) page.topic_post_element.hover page.edit_post_icon_element.when_present.click end -- To view, visit https://gerrit.wikimedia.org/r/98732 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2c9608083d5c9876e8c04c645c16e9e63e200ff1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Cmcmahon ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix empty-line matching regexp in makeSeparator - change (mediawiki...Parsoid)
jenkins-bot has submitted this change and it was merged. Change subject: Fix empty-line matching regexp in makeSeparator .. Fix empty-line matching regexp in makeSeparator * A fix for Bug 41756 now treats empty lines with comments consistently (doesn't matter whether the empty line has single or multiple comments). * Parsoid's serializer hadn't caught up with this yet. This patch fixes the empty-line-matching regexp to conform with the mw-core change in that bug fix. * No change in parser test results in this patch, but it eliminates some wt2wt and selser failures in my WIP patch for bug 50756. Change-Id: I9c60e8ba7dbbbca47b3237564085dce6647a --- M js/lib/mediawiki.WikitextSerializer.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: GWicke: Looks good to me, approved jenkins-bot: Verified diff --git a/js/lib/mediawiki.WikitextSerializer.js b/js/lib/mediawiki.WikitextSerializer.js index c5f1e37..8d33f19 100644 --- a/js/lib/mediawiki.WikitextSerializer.js +++ b/js/lib/mediawiki.WikitextSerializer.js @@ -3776,7 +3776,7 @@ // Split on comment/ws-only lines, consuming subsequent newlines since // those lines are ignored by the PHP parser // Ignore lines with ws and a single comment in them - splitReString = '(?:\n[ \t]*?' + commentRe + '[ \t]*?(?=\n))+|' + commentRe, + splitReString = '(?:\n(?:[ \t]*?' + commentRe + '[ \t]*?)+(?=\n))+|' + commentRe, splitRe = new RegExp(splitReString), sepMatch = sep.split(splitRe).join('').match(/\n/g), sepNlCount = sepMatch && sepMatch.length || 0, -- To view, visit https://gerrit.wikimedia.org/r/98719 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9c60e8ba7dbbbca47b3237564085dce6647a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: Subramanya Sastry Gerrit-Reviewer: Cscott Gerrit-Reviewer: GWicke 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 Grunt plugin for csslint - change (integration/jenkins)
jenkins-bot has submitted this change and it was merged. Change subject: Install Grunt plugin for csslint .. Install Grunt plugin for csslint Example usage: $ cd /mediawiki/extensions/VisualEditor # Or: $ cd /oojs/ui # Then: $ /integration/jenkins/bin/wmfgrunt --cwd="$PWD" csslint Also: * Sorted dependencies for readabilty. Bug: 57899 Change-Id: Ic556b191f85db672390d4ae2f04af8ea14a10b6d --- M jobs/_shared/gruntfile.js A tools/node_modules/grunt-contrib-csslint/.jshintrc A tools/node_modules/grunt-contrib-csslint/.npmignore A tools/node_modules/grunt-contrib-csslint/.travis.yml A tools/node_modules/grunt-contrib-csslint/AUTHORS A tools/node_modules/grunt-contrib-csslint/CHANGELOG A tools/node_modules/grunt-contrib-csslint/CONTRIBUTING.md A tools/node_modules/grunt-contrib-csslint/Gruntfile.js A tools/node_modules/grunt-contrib-csslint/LICENSE-MIT A tools/node_modules/grunt-contrib-csslint/README.md A tools/node_modules/grunt-contrib-csslint/docs/csslint-examples.md A tools/node_modules/grunt-contrib-csslint/docs/csslint-options.md A tools/node_modules/grunt-contrib-csslint/docs/csslint-overview.md A tools/node_modules/grunt-contrib-csslint/node_modules/.bin/csslint A tools/node_modules/grunt-contrib-csslint/node_modules/csslint/cli.js A tools/node_modules/grunt-contrib-csslint/node_modules/csslint/lib/csslint-node.js A tools/node_modules/grunt-contrib-csslint/node_modules/csslint/package.json A tools/node_modules/grunt-contrib-csslint/package.json A tools/node_modules/grunt-contrib-csslint/tasks/csslint.js A tools/node_modules/grunt-contrib-csslint/test/csslint_test.js A tools/node_modules/grunt-contrib-csslint/test/fixtures/empty.css A tools/node_modules/grunt-contrib-csslint/test/fixtures/invalid.css A tools/node_modules/grunt-contrib-csslint/test/fixtures/valid.css M tools/package.json 24 files changed, 10,395 insertions(+), 3 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified -- To view, visit https://gerrit.wikimedia.org/r/98722 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic556b191f85db672390d4ae2f04af8ea14a10b6d Gerrit-PatchSet: 2 Gerrit-Project: integration/jenkins Gerrit-Branch: master Gerrit-Owner: Krinkle Gerrit-Reviewer: Krinkle Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Specify managehome => false for "/nonexistent" $HOMEs - change (operations/puppet)
Ori.livneh has submitted this change and it was merged. Change subject: Specify managehome => false for "/nonexistent" $HOMEs .. Specify managehome => false for "/nonexistent" $HOMEs Change-Id: I162aa5078150a44b09e62fd59aa3280134d5e852 --- M modules/ipython/manifests/init.pp M modules/mwprof/manifests/init.pp M modules/webperf/manifests/init.pp 3 files changed, 8 insertions(+), 5 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ipython/manifests/init.pp b/modules/ipython/manifests/init.pp index 018c348..8373d85 100644 --- a/modules/ipython/manifests/init.pp +++ b/modules/ipython/manifests/init.pp @@ -49,6 +49,7 @@ gid=> $group, shell => '/bin/false', home => '/nonexistent', +managehome => false, system => true, } diff --git a/modules/mwprof/manifests/init.pp b/modules/mwprof/manifests/init.pp index 6aae70a..498a098 100644 --- a/modules/mwprof/manifests/init.pp +++ b/modules/mwprof/manifests/init.pp @@ -25,6 +25,7 @@ shell => '/bin/false', home => '/nonexistent', system => true, +managehome => false, } file { diff --git a/modules/webperf/manifests/init.pp b/modules/webperf/manifests/init.pp index 399154f..181276c 100644 --- a/modules/webperf/manifests/init.pp +++ b/modules/webperf/manifests/init.pp @@ -13,11 +13,12 @@ } user { 'webperf': -ensure => present, -gid=> 'webperf', -shell => '/bin/false', -home => '/nonexistent', -system => true, +ensure => present, +gid=> 'webperf', +shell => '/bin/false', +home => '/nonexistent', +system => true, +managehome => false, } file { '/srv/webperf': -- To view, visit https://gerrit.wikimedia.org/r/98729 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I162aa5078150a44b09e62fd59aa3280134d5e852 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh Gerrit-Reviewer: Ori.livneh 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 MultimediaViewer to qunitable extension list - change (integration/jenkins-job-builder-config)
MarkTraceur has uploaded a new change for review. https://gerrit.wikimedia.org/r/98731 Change subject: Add MultimediaViewer to qunitable extension list .. Add MultimediaViewer to qunitable extension list We have qunit running now, we just need the job to exist... Change-Id: I79c0c0f756d75c779f2a08b04e1c7c5b19c4a721 --- M mediawiki-extensions.yaml 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins-job-builder-config refs/changes/31/98731/1 diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml index e67c4c9..1b81120 100644 --- a/mediawiki-extensions.yaml +++ b/mediawiki-extensions.yaml @@ -573,6 +573,9 @@ - '{name}-{ext-name}-qunit-mobile': name: mwext ext-name: MobileFrontend + - '{name}-{ext-name}-qunit-mobile': +name: mwext +ext-name: MultimediaViewer - '{name}-{ext-name}-qunit': name: mwext ext-name: VisualEditor -- To view, visit https://gerrit.wikimedia.org/r/98731 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I79c0c0f756d75c779f2a08b04e1c7c5b19c4a721 Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins-job-builder-config Gerrit-Branch: master Gerrit-Owner: MarkTraceur ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Set a global cache time within Flow - change (mediawiki...Flow)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/98728 Change subject: Set a global cache time within Flow .. Set a global cache time within Flow Make everything use the same cache time, initially set to three days. Change-Id: Ie93c069aeee720ac5391f7da89a5cb6a0c09fe6e --- M Flow.php M container.php M includes/Data/ObjectManager.php M includes/Model/UUID.php M includes/Repository/MultiGetList.php M includes/Repository/TreeRepository.php 6 files changed, 101 insertions(+), 25 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/28/98728/1 diff --git a/Flow.php b/Flow.php index cbd724f..6b886ac 100755 --- a/Flow.php +++ b/Flow.php @@ -267,3 +267,13 @@ $wgLogActionsHandlers['suppress/flow-restore-post'] = 'Flow\Log\Formatter'; $wgLogActionsHandlers['delete/flow-restore-topic'] = 'Flow\Log\Formatter'; $wgLogActionsHandlers['suppress/flow-restore-topic'] = 'Flow\Log\Formatter'; + +/** + * The default length of time to cache flow data in memcache. This value can be tuned + * in conjunction with measurements of cache hit/miss ratios to achieve the desired + * tradeoff between memory usage, db queries, and response time. The initial default + * of 3 days means Flow will attempt to keep in memcache all data models requested in + * the last 3 days. + */ +$wgFlowCacheTime = 60 * 60 * 24 * 3; + diff --git a/container.php b/container.php index 40e61cb..65b7add 100644 --- a/container.php +++ b/container.php @@ -23,9 +23,11 @@ // Database Access Layer external from main implementation $c['repository.tree'] = $c->share( function( $c ) { + global $wgFlowCacheTime; return new Flow\Repository\TreeRepository( $c['db.factory'], - $c['memcache'] + $c['memcache'], + $wgFlowCacheTime ); } ); @@ -80,7 +82,8 @@ // transaction. Easiest will be to explicitly start/end the transaction // in the entry point ? $c['memcache.buffered'] = $c->share( function( $c ) { - return new LocalBufferedCache( $c['memcache'] ); + global $wgFlowCacheTime; + return new LocalBufferedCache( $c['memcache'], $wgFlowCacheTime ); } ); // Per wiki workflow definitions (types of workflows) $c['storage.definition'] = $c->share( function( $c ) { diff --git a/includes/Data/ObjectManager.php b/includes/Data/ObjectManager.php index b768b72..048f25d 100644 --- a/includes/Data/ObjectManager.php +++ b/includes/Data/ObjectManager.php @@ -1355,7 +1355,7 @@ return $found; } - public function add( $key, $value, $exptime = 0 ) { + public function add( $key, $value, $exptime = null ) { if ( $this->buffer === null ) { if ( $this->cache->add( $key, $value, $exptime ) ) { $this->internal[$key] = $value; @@ -1382,7 +1382,7 @@ * How to cache merge? Wrap the callback, but it wont know about failure. * * - public function merge( $key, \Closure $callback, $exptime = 0, $attempts = 10 ) { + public function merge( $key, \Closure $callback, $exptime = null, $attempts = 10 ) { } */ @@ -1395,19 +1395,39 @@ protected $cache; protected $buffer; - public function __construct( BagOStuff $cache ) { + /** +* @param BagOStuff $cache The cache implementation to back this buffer with +* @param integer $exptime The default length of time to cache data. 0 for LRU. +*/ + public function __construct( BagOStuff $cache, $exptime ) { $this->cache = $cache; + $this->exptime = $exptime; } + /** +* @param string $key The cache key to fetch +*/ public function get( $key ) { return $this->cache->get( $key ); } + /** +* @param array $keys List of cache key strings to fetch +*/ public function getMulti( array $keys ) { return $this->cache->getMulti( $keys ); } - public function add( $key, $value, $exptime = 0 ) { + /** +* @param string $key +* @param mixed $value +* @param int|null $exptime The number of seconds to cache data for. 0 is +* LRU, null uses the Flow default exptime. +*/ + public function add( $key, $value, $exptime = null ) { + if ( $exptime === null ) { + $exptime = $this->exptime; + } if ( $this->buffer === null ) { $this->cache->add( $key, $value, $exptime ); } else { @@ -1418,7 +1438,16 @@ } } - public function set( $key, $value, $exptime = 0 ) { + /** +* @param string $key +* @param mixed $value +
[MediaWiki-commits] [Gerrit] Specify managehome => false for "/nonexistent" $HOMEs - change (operations/puppet)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/98729 Change subject: Specify managehome => false for "/nonexistent" $HOMEs .. Specify managehome => false for "/nonexistent" $HOMEs Change-Id: I162aa5078150a44b09e62fd59aa3280134d5e852 --- M modules/ipython/manifests/init.pp M modules/mwprof/manifests/init.pp M modules/webperf/manifests/init.pp 3 files changed, 8 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/29/98729/1 diff --git a/modules/ipython/manifests/init.pp b/modules/ipython/manifests/init.pp index 018c348..8373d85 100644 --- a/modules/ipython/manifests/init.pp +++ b/modules/ipython/manifests/init.pp @@ -49,6 +49,7 @@ gid=> $group, shell => '/bin/false', home => '/nonexistent', +managehome => false, system => true, } diff --git a/modules/mwprof/manifests/init.pp b/modules/mwprof/manifests/init.pp index 6aae70a..498a098 100644 --- a/modules/mwprof/manifests/init.pp +++ b/modules/mwprof/manifests/init.pp @@ -25,6 +25,7 @@ shell => '/bin/false', home => '/nonexistent', system => true, +managehome => false, } file { diff --git a/modules/webperf/manifests/init.pp b/modules/webperf/manifests/init.pp index 399154f..181276c 100644 --- a/modules/webperf/manifests/init.pp +++ b/modules/webperf/manifests/init.pp @@ -13,11 +13,12 @@ } user { 'webperf': -ensure => present, -gid=> 'webperf', -shell => '/bin/false', -home => '/nonexistent', -system => true, +ensure => present, +gid=> 'webperf', +shell => '/bin/false', +home => '/nonexistent', +system => true, +managehome => false, } file { '/srv/webperf': -- To view, visit https://gerrit.wikimedia.org/r/98729 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I162aa5078150a44b09e62fd59aa3280134d5e852 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add logstash100[1-3] to site.pp & add bd808 & aaron as sudo ... - change (operations/puppet)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/98730 Change subject: Add logstash100[1-3] to site.pp & add bd808 & aaron as sudo per RT 6366 .. Add logstash100[1-3] to site.pp & add bd808 & aaron as sudo per RT 6366 Change-Id: Iceb0d90bb2fa9978f6f8899112ea0a27cdc49dfe --- M manifests/site.pp 1 file changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/30/98730/1 diff --git a/manifests/site.pp b/manifests/site.pp index b07a870..43bbbf9 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -2746,6 +2746,15 @@ class { "lvs::realserver": realserver_ips => [ "10.2.2.30" ] } } +node /^logstash100[1-3]\.eqiad\.wmnet$/ { +include standard +include groups::wikidev + +sudo_user { ['aaron', 'bd808']: # RT 6366 +privileges => ['ALL = NOPASSWD: ALL'], +} +} + node "tin.eqiad.wmnet" { $cluster = "misc" $domain_search = "wikimedia.org pmtpa.wmnet eqiad.wmnet esams.wikimedia.org" -- To view, visit https://gerrit.wikimedia.org/r/98730 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iceb0d90bb2fa9978f6f8899112ea0a27cdc49dfe Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] QA: prefer double-quoted strings in Ruby code - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: QA: prefer double-quoted strings in Ruby code .. QA: prefer double-quoted strings in Ruby code Bug: 57597 Change-Id: I53986162e8e0dfce5f1671a5fc63f923822f61d8 --- M tests/browser/features/step_definitions/common_steps.rb M tests/browser/features/step_definitions/external_links_steps.rb M tests/browser/features/step_definitions/footer_steps.rb M tests/browser/features/step_definitions/image_resolves_steps.rb M tests/browser/features/step_definitions/language_steps.rb M tests/browser/features/step_definitions/menu_opens_page_steps.rb M tests/browser/features/step_definitions/notification_steps.rb M tests/browser/features/step_definitions/random_ua_steps.rb M tests/browser/features/step_definitions/uploads_steps.rb M tests/browser/features/step_definitions/watchlist_steps.rb M tests/browser/features/support/env.rb M tests/browser/features/support/hooks.rb M tests/browser/features/support/modules/url_module.rb M tests/browser/features/support/pages/article_page.rb M tests/browser/features/support/pages/beta_page.rb M tests/browser/features/support/pages/create_article_page.rb M tests/browser/features/support/pages/edit_page.rb M tests/browser/features/support/pages/home_page.rb M tests/browser/features/support/pages/language_page.rb M tests/browser/features/support/pages/login_page.rb M tests/browser/features/support/pages/notification_page.rb M tests/browser/features/support/pages/random_page.rb M tests/browser/features/support/pages/search_page.rb M tests/browser/features/support/pages/uploads_page.rb 24 files changed, 150 insertions(+), 150 deletions(-) Approvals: Jdlrobson: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/browser/features/step_definitions/common_steps.rb b/tests/browser/features/step_definitions/common_steps.rb index 4393249..c192047 100644 --- a/tests/browser/features/step_definitions/common_steps.rb +++ b/tests/browser/features/step_definitions/common_steps.rb @@ -4,16 +4,16 @@ page.login_button end on(LoginPage) do |page| - page.login_with(ENV['MEDIAWIKI_USER'], ENV['MEDIAWIKI_PASSWORD']) + page.login_with(ENV["MEDIAWIKI_USER"], ENV["MEDIAWIKI_PASSWORD"]) if page.text.include? "There is no user by the name " -puts ENV['MEDIAWIKI_USER'] + ' does not exist... trying to add user' +puts ENV["MEDIAWIKI_USER"] + " does not exist... trying to add user" on(HomePage).create_account_element.when_present.click on(LoginPage) do |page| - page.username_element.element.when_present.set ENV['MEDIAWIKI_USER'] - page.signup_password_element.element.when_present.set ENV['MEDIAWIKI_PASSWORD'] - page.confirm_password_element.element.when_present.set ENV['MEDIAWIKI_PASSWORD'] + page.username_element.element.when_present.set ENV["MEDIAWIKI_USER"] + page.signup_password_element.element.when_present.set ENV["MEDIAWIKI_PASSWORD"] + page.confirm_password_element.element.when_present.set ENV["MEDIAWIKI_PASSWORD"] page.signup_submit_element.element.when_present.click - page.text.should include 'Welcome, ' + ENV['MEDIAWIKI_USER'] + '!' + page.text.should include "Welcome, " + ENV["MEDIAWIKI_USER"] + "!" #Can't get around captcha in order to create a user end end diff --git a/tests/browser/features/step_definitions/external_links_steps.rb b/tests/browser/features/step_definitions/external_links_steps.rb index 4d532a7..48fa246 100644 --- a/tests/browser/features/step_definitions/external_links_steps.rb +++ b/tests/browser/features/step_definitions/external_links_steps.rb @@ -11,5 +11,5 @@ end Then /^I receive White House official website page$/ do - @browser.url.should match Regexp.escape('whitehouse.gov') + @browser.url.should match Regexp.escape("whitehouse.gov") end diff --git a/tests/browser/features/step_definitions/footer_steps.rb b/tests/browser/features/step_definitions/footer_steps.rb index 73c5957..0b75849 100644 --- a/tests/browser/features/step_definitions/footer_steps.rb +++ b/tests/browser/features/step_definitions/footer_steps.rb @@ -3,7 +3,7 @@ end Then(/^I go to the edit history page$/) do - @browser.url.should match Regexp.escape('Main_Page&action=history') + @browser.url.should match Regexp.escape("Main_Page&action=history") end When /^I click on the desktop link$/ do @@ -19,7 +19,7 @@ end Then /^I go to the Content license page$/ do - @browser.url.should match Regexp.escape('creativecommons.org') + @browser.url.should match Regexp.escape("creativecommons.org") end When /^I click on the Terms of Use link$/ do @@ -27,7 +27,7 @@ end Then /^I go to the Terms of Use page$/ do - @browser.url.should match Regexp.escape('Terms_of_use') + @browser.url.should match Regexp.escape("Terms_of_use") end When /^I click on the Privacy link$/ do @@ -35,5 +35,5 @@ end Then(/^I go to the Privacy page$/) do -
[MediaWiki-commits] [Gerrit] Add helper script to pull data from device - change (apps...wikipedia)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/98727 Change subject: Add helper script to pull data from device .. Add helper script to pull data from device Change-Id: Iad10e23c5d090fb63dc9a8ed0957320cb740db87 --- M .gitignore A scripts/pullfiles.bash 2 files changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/27/98727/1 diff --git a/.gitignore b/.gitignore index 953c790..d3b8119 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,8 @@ # OS specific files *~ -.DS_Store \ No newline at end of file +.DS_Store + +# Data pulled out of device with scripts/pullfiles.bash +scripts/apps +scripts/backup.ab diff --git a/scripts/pullfiles.bash b/scripts/pullfiles.bash new file mode 100755 index 000..7481d06 --- /dev/null +++ b/scripts/pullfiles.bash @@ -0,0 +1,3 @@ +#!/bin/bash +# Pulls all files from the device and extracts them under app/ +adb backup -noapk org.wikimedia.wikipedia && dd if=backup.ab bs=1 skip=24 | python -c "import zlib,sys;sys.stdout.write(zlib.decompress(sys.stdin.read()))" | tar -xvf - -- To view, visit https://gerrit.wikimedia.org/r/98727 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iad10e23c5d090fb63dc9a8ed0957320cb740db87 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Yuvipanda ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable qunit tests on MultimediaViewer patches - change (integration/zuul-config)
jenkins-bot has submitted this change and it was merged. Change subject: Enable qunit tests on MultimediaViewer patches .. Enable qunit tests on MultimediaViewer patches Yay testing! Change-Id: Ia20788cb47c49292492c3b9b73c01f563d5397a3 --- M layout.yaml 1 file changed, 6 insertions(+), 1 deletion(-) Approvals: MarkTraceur: Looks good to me, approved jenkins-bot: Verified diff --git a/layout.yaml b/layout.yaml index 36c5799..4c354d4 100644 --- a/layout.yaml +++ b/layout.yaml @@ -1803,12 +1803,17 @@ extname: MultiMaps - name: mediawiki/extensions/MultimediaViewer -check-only: +check: - mwext-MultimediaViewer-lint - mwext-MultimediaViewer-jslint +test: + - mwext-MultimediaViewer-lint + - mwext-MultimediaViewer-jslint + - mwext-MultimediaViewer-qunit gate-and-submit: - mwext-MultimediaViewer-lint - mwext-MultimediaViewer-jslint + - mwext-MultimediaViewer-qunit - name: mediawiki/extensions/MwEmbedSupport template: -- To view, visit https://gerrit.wikimedia.org/r/98726 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia20788cb47c49292492c3b9b73c01f563d5397a3 Gerrit-PatchSet: 1 Gerrit-Project: integration/zuul-config Gerrit-Branch: master Gerrit-Owner: MarkTraceur Gerrit-Reviewer: MarkTraceur 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 veaction=edit work regardless of user preference - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Make veaction=edit work regardless of user preference .. Make veaction=edit work regardless of user preference Move the userPrefEnabled check out of isAvailable and instead check it in-line with isAvailable for setting up the tabs with CSS, but not for the veaction=edit function. Bug: 55900 Change-Id: I23984e377ff3fc797e921546492b8c73a5101235 --- M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js 1 file changed, 7 insertions(+), 14 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js index 847e839..d340019 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js +++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js @@ -356,8 +356,6 @@ init.isAvailable = ( support.visualEditor && - userPrefEnabled && - // Disable on redirect pages until redirects are editable (bug 47328) // Property wgIsRedirect is relatively new in core, many cached pages // don't have it yet. We do a best-effort approach using the url query @@ -391,7 +389,7 @@ // on this page. See above for why it may be false. mw.libs.ve = init; - if ( init.isAvailable ) { + if ( init.isAvailable && userPrefEnabled ) { $( 'html' ).addClass( 've-available' ); } else { $( 'html' ).addClass( 've-not-available' ); @@ -399,22 +397,17 @@ // for e.g. "Edit" > "Edit source" even when VE is not available. } - if ( !userPrefEnabled ) { - // However if ve is not available because of user preferences (as opposed - // to because of the page, namespace, browser etc.) then we do want to - // return early as in that case even transformation of edit source should - // not be done. - return; - } - $( function () { - if ( init.isAvailable && isViewPage ) { - if ( uri.query.veaction === 'edit' ) { + if ( init.isAvailable ) { + if ( isViewPage && uri.query.veaction === 'edit' ) { getTarget().done( function ( target ) { target.activate(); } ); } } - init.setupSkin(); + + if ( userPrefEnabled ) { + init.setupSkin(); + } } ); }() ); -- To view, visit https://gerrit.wikimedia.org/r/97701 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I23984e377ff3fc797e921546492b8c73a5101235 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Jforrester Gerrit-Reviewer: Catrope Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable qunit tests on MultimediaViewer patches - change (integration/zuul-config)
MarkTraceur has uploaded a new change for review. https://gerrit.wikimedia.org/r/98726 Change subject: Enable qunit tests on MultimediaViewer patches .. Enable qunit tests on MultimediaViewer patches Yay testing! Change-Id: Ia20788cb47c49292492c3b9b73c01f563d5397a3 --- M layout.yaml 1 file changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/integration/zuul-config refs/changes/26/98726/1 diff --git a/layout.yaml b/layout.yaml index 36c5799..4c354d4 100644 --- a/layout.yaml +++ b/layout.yaml @@ -1803,12 +1803,17 @@ extname: MultiMaps - name: mediawiki/extensions/MultimediaViewer -check-only: +check: - mwext-MultimediaViewer-lint - mwext-MultimediaViewer-jslint +test: + - mwext-MultimediaViewer-lint + - mwext-MultimediaViewer-jslint + - mwext-MultimediaViewer-qunit gate-and-submit: - mwext-MultimediaViewer-lint - mwext-MultimediaViewer-jslint + - mwext-MultimediaViewer-qunit - name: mediawiki/extensions/MwEmbedSupport template: -- To view, visit https://gerrit.wikimedia.org/r/98726 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia20788cb47c49292492c3b9b73c01f563d5397a3 Gerrit-PatchSet: 1 Gerrit-Project: integration/zuul-config Gerrit-Branch: master Gerrit-Owner: MarkTraceur ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] add new install location for drush to sudoers config - change (operations/puppet)
Jgreen has submitted this change and it was merged. Change subject: add new install location for drush to sudoers config .. add new install location for drush to sudoers config Change-Id: I2231cd1e6659f2793048cdb691f8ee24bbad783d --- M files/sudo/sudoers.drupal_fundraising 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Jgreen: Checked; Looks good to me, approved jenkins-bot: Verified diff --git a/files/sudo/sudoers.drupal_fundraising b/files/sudo/sudoers.drupal_fundraising index 9de31cd..95cf5d7 100644 --- a/files/sudo/sudoers.drupal_fundraising +++ b/files/sudo/sudoers.drupal_fundraising @@ -1,3 +1,4 @@ # This file is managed by Puppet! # group-based sudo policy for drupal/drush %www-data ALL = (www-data) NOPASSWD: /opt/drush/drush +%www-data ALL = (www-data) NOPASSWD: /usr/local/drush/drush.php -- To view, visit https://gerrit.wikimedia.org/r/98724 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2231cd1e6659f2793048cdb691f8ee24bbad783d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Jgreen Gerrit-Reviewer: Jgreen Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mime-type - change (mediawiki...GWToolset)
Dan-nl has uploaded a new change for review. https://gerrit.wikimedia.org/r/98725 Change subject: mime-type .. mime-type chris steipp requested that: * mimeTypeAndExtensionMatch doesn't ensure mime = extension. mimeTypeAndExtensionMatch() should use MimeMagic::isMatchingExtension() * It looks like this is only used for the xml metadata. If so, can you please document that in the code? * Use MimeMagic for mimetype detection in /Php/File.php also adjust lines > 100 characters and removed no longer needed /Php/FileException.php Change-Id: I2a5125b2e48c3d9dbc1fe7e58819804bef011b77 --- M GWToolset.i18n.php M includes/Helpers/FileChecks.php M includes/Php/File.php D includes/Php/FileException.php 4 files changed, 64 insertions(+), 52 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GWToolset refs/changes/25/98725/1 diff --git a/GWToolset.i18n.php b/GWToolset.i18n.php index 42dd59a..8748120 100644 --- a/GWToolset.i18n.php +++ b/GWToolset.i18n.php @@ -79,7 +79,10 @@ 'gwtoolset-improper-upload' => 'File was not uploaded properly.', 'gwtoolset-mime-type-mismatch' => 'The uploaded file’s extension ($1) and mime-type ($2) do not match.', 'gwtoolset-missing-temp-folder' => 'Missing a temporary folder.', + 'gwtoolset-multiple-files' => 'The file submitted contains information on more than one file; only one file can be submitted at a time.', + 'gwtoolset-no-extension' => 'The file submitted does not contain enough information to process the file; most likely there is no file extension.', 'gwtoolset-no-file' => 'No file received.', + 'gwtoolset-no-form-field' => 'The expected form field ($1) does not exist.', 'gwtoolset-over-max-ini' => 'The uploaded file exceeds the upload_max_filesize and/or the post_max_size directive in php.ini.', 'gwtoolset-partial-upload' => 'The uploaded file was only partially uploaded.', 'gwtoolset-php-extension-error' => 'A PHP extension stopped the file upload. PHP does not provide a way to ascertain which extension caused the file upload to stop; examining the list of loaded extensions with phpinfo() may help.', @@ -347,15 +350,18 @@ 'gwtoolset-metadata-mapping-not-found' => 'User error message when no metadata mapping was found in the page. The parameter is the URL to the page.', 'gwtoolset-mime-type-mismatch' => 'User error message that appears when the uploaded file’s extension and mime-type do not match. parameter 1 is the extension and parameter 2 is the mime-type detected.', 'gwtoolset-missing-temp-folder' => 'User error message that appears when the wiki cannot find a temporary folder for file uploads.', + 'gwtoolset-multiple-files' => 'User message that appears when the file submitted contains information on more than one file.', 'gwtoolset-namespace-mismatch' => 'Appears when a page title is given that does not reside in the expected namespace.', 'gwtoolset-no-accepted-types' => 'Hint to the developer that appears when no accepted types are provided.', 'gwtoolset-no-callback' => 'Hint to the developer that appears when no callback is given.', 'gwtoolset-no-comment' => "Hint to the developer that appears when user_options['comment'] is not set.", + 'gwtoolset-no-extension' => 'User message that appears when the file submitted does not contain enough information to process the file; most likely there is no file extension.', 'gwtoolset-no-field-size' => 'Developer message that appears when no field size was specified for the field. Parameter $1 is the name field.', 'gwtoolset-no-file' => 'User error message that appears when no file was received by the upload form. Parameter $1, when provided is a hint to the developer as to where the problem occured in the application.', 'gwtoolset-no-file-backend-name' => 'Message that appears when a web admin does not provide a file backend name.', 'gwtoolset-no-file-backend-container' => 'Message that appears wher no file backend container name was provided.', 'gwtoolset-no-file-url' => 'Hint to the developer that appears when no file_url is provided to parse.', + 'gwtoolset-no-form-field' => 'Developer message that appears when the expected form field does not exist. Parameter $1 is the name of the expected form field.', 'gwtoolset-no-form-handler' => 'Hint to the developer that appears when no form handler was created.', 'gwtoolset-no-mapping' => 'Hint to the developer that appears when no mapping_name is provided.', 'gwtoolset-no-mapping-json' => 'Hint to the developer that appears when no mapping_json is provided.', diff --git a/includes/Helpers/FileChecks.php b/includes/Helpers/FileChecks.php index 0d18f09..9657927 100644 --- a/includes/Helpers/FileChecks.php +++ b/includes/Helpers/FileChe
[MediaWiki-commits] [Gerrit] add new install location for drush to sudoers config - change (operations/puppet)
Jgreen has uploaded a new change for review. https://gerrit.wikimedia.org/r/98724 Change subject: add new install location for drush to sudoers config .. add new install location for drush to sudoers config Change-Id: I2231cd1e6659f2793048cdb691f8ee24bbad783d --- M files/sudo/sudoers.drupal_fundraising 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/24/98724/1 diff --git a/files/sudo/sudoers.drupal_fundraising b/files/sudo/sudoers.drupal_fundraising index 9de31cd..95cf5d7 100644 --- a/files/sudo/sudoers.drupal_fundraising +++ b/files/sudo/sudoers.drupal_fundraising @@ -1,3 +1,4 @@ # This file is managed by Puppet! # group-based sudo policy for drupal/drush %www-data ALL = (www-data) NOPASSWD: /opt/drush/drush +%www-data ALL = (www-data) NOPASSWD: /usr/local/drush/drush.php -- To view, visit https://gerrit.wikimedia.org/r/98724 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2231cd1e6659f2793048cdb691f8ee24bbad783d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Jgreen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] New API for selecting a task; related refactoring and minor fm - change (mediawiki...GettingStarted)
jenkins-bot has submitted this change and it was merged. Change subject: New API for selecting a task; related refactoring and minor fm .. New API for selecting a task; related refactoring and minor fm * New API module GettingStartedGetPages for getting one or more pages for a given task * Used by special page * New ArticleFilter for secondary criterion (other than Redis set) that can allow or veto an article ** Broken out from the special page. * Some renaming for clarity * Small README fix about srand. Bug: 55598 Bug: 55773 Change-Id: Icaf84e75d95bb06d108137221aa13e99003355e1 --- D CategoryRoulette.php M GettingStarted.php A PageFilter.php M README M SpecialGettingStarted.php A api/ApiGettingStartedGetPages.php 6 files changed, 227 insertions(+), 148 deletions(-) Approvals: Kaldari: Looks good to me, approved jenkins-bot: Verified diff --git a/CategoryRoulette.php b/CategoryRoulette.php deleted file mode 100644 index e681c2a..000 --- a/CategoryRoulette.php +++ /dev/null @@ -1,75 +0,0 @@ - - * $category = Category::newFromName( 'All_articles_needing_copy_edit' ); - * $roulette = new CategoryRoulette( $category ); - * $pages = $roulette->getRandomArticles( 3 ); - * - * - */ -class CategoryRoulette { - - const MAX_ATTEMPTS = 100; - - /** @var Category **/ - public $category = null; - - /** -* Constructor. -* @param $category Category. -*/ - public function __construct( $category ) { - $this->category = $category; - } - - /** -* Get a random set of $numWanted unique pages in the -* category. If fewer than $numWanted pages exist in category, -* return as many as are available. It is up to the caller to decide -* how to handle the deficit. -* -* @param $numWanted int Number of unique pages to get. -* @return array Set of $numWanted unique pages (or however many -* were available, if the desired count was not satisfiable). -*/ - public function getRandomArticles( $numWanted ) { - $key = RedisCategorySync::makeCategoryKey( $this->category ); - - $redis = RedisCategorySync::getClient(); - if ( !$redis ) { - wfDebugLog( 'GettingStarted', "Unable to acquire redis connection.\n" ); - return array(); - } - - $articleIDs = array(); - $attempts = 0; - while ( count( $articleIDs ) < $numWanted ) { - $attempts++; - // Sanity check to prevent calling srand too many times - if ( $attempts >= self::MAX_ATTEMPTS ) { - wfDebugLog( 'GettingStarted', 'Returning early after ' . self::MAX_ATTEMPTS . ".\n" ); - return Title::newFromIDs( $articleIDs ); - } - try { - $randomID = $redis->sRandMember( $key ); - if ( !in_array( $randomID, $articleIDs, true ) ) { - $articleIDs[] = $randomID; - } - } catch ( RedisException $e ) { - wfDebugLog( 'GettingStarted', 'Redis exception: ' . $e->getMessage() . ". Returning early.\n" ); - return Title::newFromIDs( $articleIDs ); - } - } - - return Title::newFromIDs( $articleIDs ); - } -} diff --git a/GettingStarted.php b/GettingStarted.php index 2f6718d..7b60561 100644 --- a/GettingStarted.php +++ b/GettingStarted.php @@ -91,17 +91,22 @@ $wgAutoloadClasses += array( 'GettingStarted\SpecialGettingStarted' => __DIR__ . '/SpecialGettingStarted.php', - 'GettingStarted\Hooks' => __DIR__ . '/Hooks.php', - 'GettingStarted\RedisCategorySync' => __DIR__ . '/RedisCategorySync.php', - 'GettingStarted\CategoryRoulette' => __DIR__ . '/CategoryRoulette.php', + 'GettingStarted\Hooks' => __DIR__ . '/Hooks.php', + 'GettingStarted\RedisCategorySync' => __DIR__ . '/RedisCategorySync.php', + 'GettingStarted\PageFilter' => __DIR__ . '/PageFilter.php', + 'GettingStarted\ApiGettingStartedGetPages' => __DIR__ . '/api/ApiGettingStartedGetPages.php', ); $wgExtensionMessagesFiles[ 'GettingStarted' ] = __DIR__ . '/GettingStarted.i18n.php'; $wgExtensionMessagesFiles[ 'GettingStartedAlias' ] = __DIR__ . '/GettingStarted.alias.php'; +// Special pages $wgSpecialPages[ 'GettingStarted' ] = 'GettingStarted\SpecialGettingStarted'; $wgSpecialPageGroups[ 'GettingStarted' ] = 'users'; +// APIs +$wgAPIModules['gettingstartedgetpages'] = 'GettingStarted\ApiGettingStartedGetPages'; + // Modules $gettingStartedModuleInfo = array( diff --g
[MediaWiki-commits] [Gerrit] Changing banner expiration to 10 months - change (operations/mediawiki-config)
Mwalker has uploaded a new change for review. https://gerrit.wikimedia.org/r/98723 Change subject: Changing banner expiration to 10 months .. Changing banner expiration to 10 months Change-Id: I9e2f2492324f4b003c7ae592f6ed10dee8c37cba --- M wmf-config/CommonSettings.php M wmf-config/InitialiseSettings.php 2 files changed, 9 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/23/98723/1 diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index 9841dfc..0d78eba 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -1434,6 +1434,15 @@ // Bug 49905 $wgNoticeUseLanguageConversion = true; + + // *** Hide Cookies *** + // A little bit of historical breadcrumbs: + // In 2012 we expired cookies on 2012-12-26, then everyone had + // a two week expiration until 2013-01-22 whereupon we introduced + // a year long expiration. For the 2013 fundraiser starting + // 2013-12-02 we're now using a 10 month expiration. + $wgNoticeCookieShortExpiry = 1209600; // 2 weeks + $wgNoticeCookieLongExpiry = 2592; // 10 months } // Set CentralNotice banner hide cookie; Needs to be enabled for all wikis that display banners ~awjr 2011-11-07 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 31b7b5c..cc22d72 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -3955,10 +3955,6 @@ 'metawiki' => true, ), -'wmgSetNoticeHideBannersExpiration' => array( - 'default' => true, -), - // For CentralNotice project pickers 'wmgNoticeProject' => array( 'advisorywiki' => 'wikimedia', -- To view, visit https://gerrit.wikimedia.org/r/98723 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9e2f2492324f4b003c7ae592f6ed10dee8c37cba Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Mwalker ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Removing constructor that doesn't do anything. - change (mediawiki...Echo)
jenkins-bot has submitted this change and it was merged. Change subject: Removing constructor that doesn't do anything. .. Removing constructor that doesn't do anything. Change-Id: I8b6c1d3a88e57f970fd1edef1b4df1b8bf9785e4 --- M api/ApiEchoMarkRead.php M api/ApiEchoNotifications.php 2 files changed, 1 insertion(+), 4 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/api/ApiEchoMarkRead.php b/api/ApiEchoMarkRead.php index 6183e05..5a2a387 100644 --- a/api/ApiEchoMarkRead.php +++ b/api/ApiEchoMarkRead.php @@ -2,10 +2,6 @@ class ApiEchoMarkRead extends ApiBase { - public function __construct( $query, $moduleName ) { - parent::__construct( $query, $moduleName ); - } - public function execute() { // To avoid API warning, register the parameter used to bust browser cache $this->getMain()->getVal( '_' ); diff --git a/api/ApiEchoNotifications.php b/api/ApiEchoNotifications.php index 75a741d..3f30f7d 100644 --- a/api/ApiEchoNotifications.php +++ b/api/ApiEchoNotifications.php @@ -1,6 +1,7 @@ https://gerrit.wikimedia.org/r/98717 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8b6c1d3a88e57f970fd1edef1b4df1b8bf9785e4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Kaldari Gerrit-Reviewer: Bsitu Gerrit-Reviewer: EBernhardson Gerrit-Reviewer: Legoktm Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add tests to MultimediaViewer - change (mediawiki...MultimediaViewer)
jenkins-bot has submitted this change and it was merged. Change subject: Add tests to MultimediaViewer .. Add tests to MultimediaViewer These are just smoke tests. I will add more in coming versions of this change. Consolidated various cases in one tests. Added tests to validate for legit clicks. Based on Idfbec829399ff6969cd01be3c13a8ed7a66a1fef Change-Id: I366c7af9a5cf43361d8293183c9da117bc5d4971 --- M MultimediaViewer.php M MultimediaViewerHooks.php M resources/ext.multimediaViewer/ext.multimediaViewer.js A tests/qunit/ext.multimediaViewer.test.js 4 files changed, 204 insertions(+), 22 deletions(-) Approvals: MarkTraceur: Looks good to me, approved jenkins-bot: Verified diff --git a/MultimediaViewer.php b/MultimediaViewer.php index ac743ee..ea9f2df 100644 --- a/MultimediaViewer.php +++ b/MultimediaViewer.php @@ -246,6 +246,7 @@ $wgHooks['BeforePageDisplay'][] = 'MultimediaViewerHooks::getModulesForArticle'; $wgHooks['CategoryPageView'][] = 'MultimediaViewerHooks::getModulesForCategory'; $wgHooks['ResourceLoaderGetConfigVars'][] = 'MultimediaViewerHooks::resourceLoaderGetConfigVars'; +$wgHooks['ResourceLoaderTestModules'][] = 'MultimediaViewerHooks::getTestModules'; $wgExtensionCredits['other'][] = array( 'path' => __FILE__, diff --git a/MultimediaViewerHooks.php b/MultimediaViewerHooks.php index ad862f9..a087d00 100644 --- a/MultimediaViewerHooks.php +++ b/MultimediaViewerHooks.php @@ -107,4 +107,25 @@ ); return true; } + + /** +* Get modules for testing our JavaScript +* @param array $testModules +* @param ResourceLoader resourceLoader +* @return bool +*/ + public static function getTestModules( array &$testModules, ResourceLoader &$resourceLoader ) { + $testModules['qunit']['ext.multimediaViewer.tests'] = array( + 'scripts' => array( + 'tests/qunit/ext.multimediaViewer.test.js', + ), + 'dependencies' => array( + 'ext.multimediaViewer', + ), + 'localBasePath' => __DIR__, + 'remoteExtPath' => 'MultimediaViewer', + ); + + return true; + } } diff --git a/resources/ext.multimediaViewer/ext.multimediaViewer.js b/resources/ext.multimediaViewer/ext.multimediaViewer.js index 9b306e1..215d9be 100755 --- a/resources/ext.multimediaViewer/ext.multimediaViewer.js +++ b/resources/ext.multimediaViewer/ext.multimediaViewer.js @@ -55,14 +55,38 @@ 'site-link-click': 'User clicked on the link to the file description page.' }; + /** +* Class that analyses the page, looks for image content and sets up the hooks +* to manage the viewing experience of such content. +* +* @constructor +*/ function MultimediaViewer() { - var $thumbs = $( '.gallery .image img, a.image img' ), + /** +* MultiLightbox object used to display the pictures in the page. +* @property {mw.MultiLightbox} +* @private +*/ + this.lightbox = null; + + var $thumbs = $( imgsSelector ), urls = [], viewer = this; + /** +* @property {mw.Api} +* @private +*/ this.api = new mw.Api(); + + /** +* imageInfo object. TODO: Describe structure and valid states. +* @property {Object} +* @private +*/ this.imageInfo = {}; + // Traverse DOM, looking for potential thumbnails $thumbs.each( function ( i, thumb ) { var fileLink, thisImage, $thumb = $( thumb ), @@ -88,6 +112,7 @@ $links.data( 'filePageLink', filePageLink ); + // Create a LightboxImage object for each legit image thisImage = new mw.LightboxImage( fileLink ); thisImage.filePageLink = filePageLink; thisImage.filePageTitle = fileTitle; @@ -95,32 +120,23 @@ urls.push( thisImage ); + // Register callback that launches modal image viewer if valid click $links.click( function ( e ) { - // Do not interfere with non-left clicks or if modifier keys are pressed. - if ( e.which !== 1 || e.altKey || e.ctrlKey || e.shiftKey || e.metaKey ) { - return; - } - -
[MediaWiki-commits] [Gerrit] Bug 56691: Handle page names starting with a slash - change (mediawiki...Parsoid)
jenkins-bot has submitted this change and it was merged. Change subject: Bug 56691: Handle page names starting with a slash .. Bug 56691: Handle page names starting with a slash Change-Id: I99a26173ad501243f0a3cbad3d6f09cd83d5a3ab --- M js/lib/mediawiki.Title.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified diff --git a/js/lib/mediawiki.Title.js b/js/lib/mediawiki.Title.js index 68a8587..01a13b9 100644 --- a/js/lib/mediawiki.Title.js +++ b/js/lib/mediawiki.Title.js @@ -54,7 +54,7 @@ } else { return new Title( text, 0, '', env ); } - } else if ( /^(\#|\/|\.\.\/)/.test( text ) ) { + } else if ( env.page.meta && /^(\#|\/|\.\.\/)/.test( text ) ) { // If the link is relative, use the page's namespace. return new Title( text, env.page.meta.ns, '', env ); } else { -- To view, visit https://gerrit.wikimedia.org/r/98718 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I99a26173ad501243f0a3cbad3d6f09cd83d5a3ab Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: GWicke Gerrit-Reviewer: Arlolra Gerrit-Reviewer: Subramanya Sastry 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 Grunt plugin for csslint - change (integration/jenkins)
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/98722 Change subject: Install Grunt plugin for csslint .. Install Grunt plugin for csslint Example usage: $ cd /mediawiki/extensions/VisualEditor # Or: $ cd /oojs/ui # Then: $ /integration/jenkins/bin/wmfgrunt --cwd="$PWD" csslint Also: * Sorted dependencies for readabilty. Change-Id: Ic556b191f85db672390d4ae2f04af8ea14a10b6d --- M jobs/_shared/gruntfile.js A tools/node_modules/grunt-contrib-csslint/.jshintrc A tools/node_modules/grunt-contrib-csslint/.npmignore A tools/node_modules/grunt-contrib-csslint/.travis.yml A tools/node_modules/grunt-contrib-csslint/AUTHORS A tools/node_modules/grunt-contrib-csslint/CHANGELOG A tools/node_modules/grunt-contrib-csslint/CONTRIBUTING.md A tools/node_modules/grunt-contrib-csslint/Gruntfile.js A tools/node_modules/grunt-contrib-csslint/LICENSE-MIT A tools/node_modules/grunt-contrib-csslint/README.md A tools/node_modules/grunt-contrib-csslint/docs/csslint-examples.md A tools/node_modules/grunt-contrib-csslint/docs/csslint-options.md A tools/node_modules/grunt-contrib-csslint/docs/csslint-overview.md A tools/node_modules/grunt-contrib-csslint/node_modules/.bin/csslint A tools/node_modules/grunt-contrib-csslint/node_modules/csslint/cli.js A tools/node_modules/grunt-contrib-csslint/node_modules/csslint/lib/csslint-node.js A tools/node_modules/grunt-contrib-csslint/node_modules/csslint/package.json A tools/node_modules/grunt-contrib-csslint/package.json A tools/node_modules/grunt-contrib-csslint/tasks/csslint.js A tools/node_modules/grunt-contrib-csslint/test/csslint_test.js A tools/node_modules/grunt-contrib-csslint/test/fixtures/empty.css A tools/node_modules/grunt-contrib-csslint/test/fixtures/invalid.css A tools/node_modules/grunt-contrib-csslint/test/fixtures/valid.css M tools/package.json 24 files changed, 10,395 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins refs/changes/22/98722/1 -- To view, visit https://gerrit.wikimedia.org/r/98722 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic556b191f85db672390d4ae2f04af8ea14a10b6d Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins Gerrit-Branch: master Gerrit-Owner: Krinkle ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update civicrm submodule - change (wikimedia...crm)
Adamw has submitted this change and it was merged. Change subject: Update civicrm submodule .. Update civicrm submodule Change-Id: I4db14478817dc1041a95ac06f316ea78121c433d (cherry picked from commit 6e92e675160d2be934a4a6ed368dda915cca8378) --- M civicrm 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Adamw: Verified; Looks good to me, approved diff --git a/civicrm b/civicrm index 918eb4e..9f59789 16 --- a/civicrm +++ b/civicrm -Subproject commit 918eb4e6cd424c129f73205024a5709c66c50fa6 +Subproject commit 9f597896084039f9c40dea2d21b4c69440a9708a -- To view, visit https://gerrit.wikimedia.org/r/98703 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4db14478817dc1041a95ac06f316ea78121c433d Gerrit-PatchSet: 2 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Adamw Gerrit-Reviewer: Adamw Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] csslint: Add .csslintignore file and update gruntfile - change (mediawiki...VisualEditor)
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/98721 Change subject: csslint: Add .csslintignore file and update gruntfile .. csslint: Add .csslintignore file and update gruntfile Add .csslintignore file for the csslint run by Jenkins. Also updating our Gruntfile for local usage to include demos, which Jenkins is going to include as well (as it uses an ignore blacklist instead of whitelist). Change-Id: I9114cfc54e82f090f0fcf62155ef7c1a9261548d --- A .csslintignore M Gruntfile.js 2 files changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/21/98721/1 diff --git a/.csslintignore b/.csslintignore new file mode 100644 index 000..9a27708 --- /dev/null +++ b/.csslintignore @@ -0,0 +1,6 @@ +docs/** +modules/jquery.uls/** +modules/jsdifflib/** +modules/oojs-ui/** +modules/qunit/** +node_modules/** diff --git a/Gruntfile.js b/Gruntfile.js index 429a5f1..812da8f 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -25,7 +25,7 @@ options: { csslintrc: '.csslintrc' }, - all: 'modules/{syntaxhighlight,ve,ve-mw}/**/*.css', + all: ['demos/**/*.css', 'modules/{syntaxhighlight,ve,ve-mw}/**/*.css'], }, qunit: { ve: 'modules/ve/test/index-phantomjs-tmp.html' -- To view, visit https://gerrit.wikimedia.org/r/98721 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9114cfc54e82f090f0fcf62155ef7c1a9261548d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Krinkle ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] csslint: Add .csslintignore file - change (oojs/ui)
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/98720 Change subject: csslint: Add .csslintignore file .. csslint: Add .csslintignore file Note that the minimatch glob csslint uses doesn't support "dir" or "dir/", it needs "dir/**" to recursively exclude a directory: - "file" - "unsupported/" - "dir-contents/*" - "dir-contents-and-recurse/**" We're excluding dist/ because there's certain warnings that only trigger in csslint when there are lots of rules (such as the warning about "too many usage of floats") which are being triggered otherewise. Change-Id: I7d34f07f1d8352261ad97291e215b68da363faba --- A .csslintignore 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/20/98720/1 diff --git a/.csslintignore b/.csslintignore new file mode 100644 index 000..950ca9d --- /dev/null +++ b/.csslintignore @@ -0,0 +1,3 @@ +dist/** +lib/** +node_modules/** -- To view, visit https://gerrit.wikimedia.org/r/98720 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7d34f07f1d8352261ad97291e215b68da363faba Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: Krinkle ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix empty-line matching regexp in makeSeparator - change (mediawiki...Parsoid)
Subramanya Sastry has uploaded a new change for review. https://gerrit.wikimedia.org/r/98719 Change subject: Fix empty-line matching regexp in makeSeparator .. Fix empty-line matching regexp in makeSeparator * A fix for Bug 41756 now treats empty lines with comments consistently (doesn't matter whether the empty line has single or multiple comments). * Parsoid's serializer hadn't caught up with this yet. This patch fixes the empty-line-matching regexp to conform with the mw-core change in that bug fix. * No change in parser test results in this patch, but it eliminates some wt2wt and selser failures in my WIP patch for bug 50756. Change-Id: I9c60e8ba7dbbbca47b3237564085dce6647a --- M js/lib/mediawiki.WikitextSerializer.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/19/98719/1 diff --git a/js/lib/mediawiki.WikitextSerializer.js b/js/lib/mediawiki.WikitextSerializer.js index c5f1e37..8d33f19 100644 --- a/js/lib/mediawiki.WikitextSerializer.js +++ b/js/lib/mediawiki.WikitextSerializer.js @@ -3776,7 +3776,7 @@ // Split on comment/ws-only lines, consuming subsequent newlines since // those lines are ignored by the PHP parser // Ignore lines with ws and a single comment in them - splitReString = '(?:\n[ \t]*?' + commentRe + '[ \t]*?(?=\n))+|' + commentRe, + splitReString = '(?:\n(?:[ \t]*?' + commentRe + '[ \t]*?)+(?=\n))+|' + commentRe, splitRe = new RegExp(splitReString), sepMatch = sep.split(splitRe).join('').match(/\n/g), sepNlCount = sepMatch && sepMatch.length || 0, -- To view, visit https://gerrit.wikimedia.org/r/98719 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9c60e8ba7dbbbca47b3237564085dce6647a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: Subramanya Sastry ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Bug 56691: Handle page names starting with a slash - change (mediawiki...Parsoid)
GWicke has uploaded a new change for review. https://gerrit.wikimedia.org/r/98718 Change subject: Bug 56691: Handle page names starting with a slash .. Bug 56691: Handle page names starting with a slash Change-Id: I99a26173ad501243f0a3cbad3d6f09cd83d5a3ab --- M js/lib/mediawiki.Title.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/18/98718/1 diff --git a/js/lib/mediawiki.Title.js b/js/lib/mediawiki.Title.js index 68a8587..01a13b9 100644 --- a/js/lib/mediawiki.Title.js +++ b/js/lib/mediawiki.Title.js @@ -54,7 +54,7 @@ } else { return new Title( text, 0, '', env ); } - } else if ( /^(\#|\/|\.\.\/)/.test( text ) ) { + } else if ( env.page.meta && /^(\#|\/|\.\.\/)/.test( text ) ) { // If the link is relative, use the page's namespace. return new Title( text, env.page.meta.ns, '', env ); } else { -- To view, visit https://gerrit.wikimedia.org/r/98718 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I99a26173ad501243f0a3cbad3d6f09cd83d5a3ab Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: GWicke ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Removing constructor that doesn't do anything. - change (mediawiki...Echo)
Kaldari has uploaded a new change for review. https://gerrit.wikimedia.org/r/98717 Change subject: Removing constructor that doesn't do anything. .. Removing constructor that doesn't do anything. Change-Id: I8b6c1d3a88e57f970fd1edef1b4df1b8bf9785e4 --- M api/ApiEchoMarkRead.php M api/ApiEchoNotifications.php 2 files changed, 1 insertion(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/17/98717/1 diff --git a/api/ApiEchoMarkRead.php b/api/ApiEchoMarkRead.php index 6183e05..5a2a387 100644 --- a/api/ApiEchoMarkRead.php +++ b/api/ApiEchoMarkRead.php @@ -2,10 +2,6 @@ class ApiEchoMarkRead extends ApiBase { - public function __construct( $query, $moduleName ) { - parent::__construct( $query, $moduleName ); - } - public function execute() { // To avoid API warning, register the parameter used to bust browser cache $this->getMain()->getVal( '_' ); diff --git a/api/ApiEchoNotifications.php b/api/ApiEchoNotifications.php index 75a741d..3f30f7d 100644 --- a/api/ApiEchoNotifications.php +++ b/api/ApiEchoNotifications.php @@ -1,6 +1,7 @@ https://gerrit.wikimedia.org/r/98717 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8b6c1d3a88e57f970fd1edef1b4df1b8bf9785e4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Kaldari ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert "Disable search updates for Cirrus wikis for the time... - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Revert "Disable search updates for Cirrus wikis for the time being" .. Revert "Disable search updates for Cirrus wikis for the time being" This reverts commit a8723d447344c57a4f40b52eae076c683201a11a. Change-Id: I9dc320f91b3e190c47cdd0f88f9b562e04b6e38e --- M wmf-config/CommonSettings.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index 24488ff..9841dfc 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -871,7 +871,7 @@ if ( $wmgUseCirrus || $wmgUseCirrusAsAlternative ) { wfProfileIn( "$fname-CirrusSearch" ); # Cirrus uses SearchUpdate, turn it back on - // $wgDisableSearchUpdate = false; + $wgDisableSearchUpdate = false; include( "$wmfConfigDir/CirrusSearch-common.php" ); wfProfileOut( "$fname-CirrusSearch" ); } -- To view, visit https://gerrit.wikimedia.org/r/98581 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9dc320f91b3e190c47cdd0f88f9b562e04b6e38e Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Chad Gerrit-Reviewer: Chad Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits