[MediaWiki-commits] [Gerrit] Show an edit link for discussion page headers even if the us... - change (mediawiki...LiquidThreads)
jenkins-bot has submitted this change and it was merged. Change subject: Show an edit link for discussion page headers even if the user can't edit it .. Show an edit link for discussion page headers even if the user can't edit it Just label it 'View source' instead Bug: 49618 Change-Id: I99c17acea0be7b0ef650959e5e280ca5e9154b2a --- M pages/TalkpageView.php 1 file changed, 7 insertions(+), 8 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/pages/TalkpageView.php b/pages/TalkpageView.php index 9b2857d..1cbeb9b 100644 --- a/pages/TalkpageView.php +++ b/pages/TalkpageView.php @@ -67,14 +67,13 @@ $article-view(); $actionLinks = array(); - if ( $article-getTitle()-userCan( 'edit' ) ) { - $actionLinks[] = Linker::link( - $article-getTitle(), - wfMessage( 'edit' )-parse() . ↑, - array(), - array( 'action' = 'edit' ) - ); - } + $actionLinks[] = Linker::link( + $article-getTitle(), + wfMessage( $article-getTitle()-userCan( 'edit' ) ? 'edit' : 'viewsource' )-parse() . ↑, + array(), + array( 'action' = 'edit' ) + ); + $actionLinks[] = Linker::link( $this-title, wfMessage( 'history_short' )-parse() . ↑, -- To view, visit https://gerrit.wikimedia.org/r/68860 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I99c17acea0be7b0ef650959e5e280ca5e9154b2a Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/LiquidThreads Gerrit-Branch: master Gerrit-Owner: Alex Monk kren...@gmail.com Gerrit-Reviewer: Helder.wiki helder.w...@gmail.com Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] removing bzapi stuff, deactivated per RT #5582 - change (operations/puppet)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/78489 Change subject: removing bzapi stuff, deactivated per RT #5582 .. removing bzapi stuff, deactivated per RT #5582 Change-Id: I2571d0aebd748cb635f5c86038d668ac5f2545cf --- M files/apache/sites/bugzilla.wikimedia.org 1 file changed, 0 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/89/78489/1 diff --git a/files/apache/sites/bugzilla.wikimedia.org b/files/apache/sites/bugzilla.wikimedia.org index dba8087..19e763d 100644 --- a/files/apache/sites/bugzilla.wikimedia.org +++ b/files/apache/sites/bugzilla.wikimedia.org @@ -98,16 +98,6 @@ Allow from all /Directory - Directory /srv/org/wikimedia/bzapi/ - AddHandler cgi-script .cgi - Options Indexes ExecCGI FollowSymLinks - DirectoryIndex index.cgi - AllowOverride Limit - /Directory - -FastCgiServer /srv/org/wikimedia/bzapi/script/bugzilla_api_fastcgi.pl -processes 3 -idle-timeout 180 -Alias /bzapi /srv/org/wikimedia/bzapi/script/bugzilla_api_fastcgi.pl/ - ErrorLog /var/log/apache2/error.log # Possible values include: debug, info, notice, warn, error, crit, -- To view, visit https://gerrit.wikimedia.org/r/78489 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2571d0aebd748cb635f5c86038d668ac5f2545cf Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn dz...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] removing bzapi stuff, deactivated per RT #5582 - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: removing bzapi stuff, deactivated per RT #5582 .. removing bzapi stuff, deactivated per RT #5582 Change-Id: I2571d0aebd748cb635f5c86038d668ac5f2545cf --- M files/apache/sites/bugzilla.wikimedia.org 1 file changed, 0 insertions(+), 10 deletions(-) Approvals: Aklapper: Looks good to me, but someone else must approve jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/files/apache/sites/bugzilla.wikimedia.org b/files/apache/sites/bugzilla.wikimedia.org index dba8087..19e763d 100644 --- a/files/apache/sites/bugzilla.wikimedia.org +++ b/files/apache/sites/bugzilla.wikimedia.org @@ -98,16 +98,6 @@ Allow from all /Directory - Directory /srv/org/wikimedia/bzapi/ - AddHandler cgi-script .cgi - Options Indexes ExecCGI FollowSymLinks - DirectoryIndex index.cgi - AllowOverride Limit - /Directory - -FastCgiServer /srv/org/wikimedia/bzapi/script/bugzilla_api_fastcgi.pl -processes 3 -idle-timeout 180 -Alias /bzapi /srv/org/wikimedia/bzapi/script/bugzilla_api_fastcgi.pl/ - ErrorLog /var/log/apache2/error.log # Possible values include: debug, info, notice, warn, error, crit, -- To view, visit https://gerrit.wikimedia.org/r/78489 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2571d0aebd748cb635f5c86038d668ac5f2545cf Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn dz...@wikimedia.org Gerrit-Reviewer: Aklapper aklap...@wikimedia.org Gerrit-Reviewer: Dzahn dz...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add a superscript tool - change (mediawiki...VisualEditor)
Steven Zhang has uploaded a new change for review. https://gerrit.wikimedia.org/r/78490 Change subject: Add a superscript tool .. Add a superscript tool Bug: 51611 Change-Id: I74b6418542927eeeb7e80d664a30fcaf07b93a13 --- M VisualEditor.i18n.php M VisualEditor.php M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js M modules/ve/init/ve.init.Target.js A modules/ve/ui/tools/buttons/ve.ui.SuperScriptButtonTool.js 5 files changed, 49 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/90/78490/1 diff --git a/VisualEditor.i18n.php b/VisualEditor.i18n.php index 2571126..4832183 100644 --- a/VisualEditor.i18n.php +++ b/VisualEditor.i18n.php @@ -35,6 +35,7 @@ 'visualeditor-annotationbutton-language-tooltip' = 'Language', 'visualeditor-annotationbutton-strikethrough-tooltip' = 'Strikethrough', 'visualeditor-annotationbutton-underline-tooltip' = 'Underline', + 'visualeditor-annotationbutton-superscript-tooltip' = 'Superscript', 'visualeditor-beta-label' = 'beta', 'visualeditor-beta-warning' = 'VisualEditor is in \'beta\'. You may encounter software issues, and you may not be able to edit parts of the page. Click {{int:visualeditor-ca-editsource}} to switch to wikitext mode – unsaved changes will be lost.', 'visualeditor-beta-appendix' = 'beta', @@ -255,6 +256,9 @@ {{Identical|Strikethrough}}', 'visualeditor-annotationbutton-underline-tooltip' = 'Tooltip text for underline button. {{Identical|Underline}}', + 'visualeditor-annotationbutton-superscript-tooltip' = 'Tooltip text for superscript button. +{{Identical|Superscript}}', + 'visualeditor-beta-label' = 'Text of tool in the toolbar that highlights that VisualEditor is still in beta. {{Identical|Beta}}', 'visualeditor-beta-warning' = Note shown when user clicks on 'beta' label in VisualEditor, warning users that the software may have issues, diff --git a/VisualEditor.php b/VisualEditor.php index 0039227..ad947c1 100644 --- a/VisualEditor.php +++ b/VisualEditor.php @@ -733,6 +733,7 @@ 've/ui/tools/buttons/ve.ui.CodeButtonTool.js', 've/ui/tools/buttons/ve.ui.StrikethroughButtonTool.js', 've/ui/tools/buttons/ve.ui.UnderlineButtonTool.js', + 've/ui/tools/buttons/ve.ui.SuperScriptButtonTool.js', ), 'dependencies' = array( 'ext.visualEditor.core', @@ -746,6 +747,7 @@ 'visualeditor-annotationbutton-language-tooltip', 'visualeditor-annotationbutton-strikethrough-tooltip', 'visualeditor-annotationbutton-underline-tooltip', + 'visualeditor-annotationbuttin-superscript-tooltip', ), ), 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 851c7c9..860d45f 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js @@ -170,7 +170,7 @@ ve.init.mw.ViewPageTarget.static.toolbarTools = [ { 'items': [ 'undo', 'redo' ] }, { 'items': [ 'mwFormat' ] }, - { 'items': [ 'bold', 'italic', 'mwLink', 'language', 'code', 'underline', 'strikethrough', 'clear' ] }, + { 'items': [ 'bold', 'italic', 'mwLink', 'language', 'code', 'underline', 'strikethrough', 'superscript', 'clear' ] }, { 'items': [ 'number', 'bullet', 'outdent', 'indent' ] }, { 'items': [ 'mwMediaInsert', 'mwReference', 'mwReferenceList', 'mwTransclusion', 'mwMath', 'mwHiero' ] } ]; diff --git a/modules/ve/init/ve.init.Target.js b/modules/ve/init/ve.init.Target.js index 2ee15ad..7ba4e19 100644 --- a/modules/ve/init/ve.init.Target.js +++ b/modules/ve/init/ve.init.Target.js @@ -32,7 +32,7 @@ ve.init.Target.static.toolbarTools = [ { 'items': ['undo', 'redo'] }, { 'items': ['format'] }, - { 'items': ['bold', 'italic', 'link', 'code', 'language', 'underline', 'strikethrough', 'clear'] }, + { 'items': ['bold', 'italic', 'link', 'code', 'language', 'underline', 'strikethrough', 'superscript', 'clear'] }, { 'items': ['number', 'bullet', 'outdent', 'indent'] } ]; @@ -45,6 +45,7 @@ 'redo', //'underline', //'strikethrough', + //'superscript', 'indent', 'outdent' ]; diff --git a/modules/ve/ui/tools/buttons/ve.ui.SuperScriptButtonTool.js b/modules/ve/ui/tools/buttons/ve.ui.SuperScriptButtonTool.js new file mode 100644 index 000..530ae86 --- /dev/null +++ b/modules/ve/ui/tools/buttons/ve.ui.SuperScriptButtonTool.js @@ -0,0 +1,40 @@ +/*! + * VisualEditor UserInterface SuperScriptButtonTool class. + * + * @copyright 2011-2013 VisualEditor Team
[MediaWiki-commits] [Gerrit] Show graph of first time edits - change (analytics/limn-mobile-data)
Yuvipanda has submitted this change and it was merged. Change subject: Show graph of first time edits .. Show graph of first time edits The all graph is actually useless as it can be worked out from the main namespace and other graphs THIS is much more interesting Change-Id: I9c9ee5431903bd0350834894ceef6e0b03675b7c --- M dashboards/reportcard.json R datasources/successful-edits-newbie.json R graphs/successful-edits-newbie.json M mobile/config.yaml R mobile/successful-edits-newbie.sql 5 files changed, 9 insertions(+), 8 deletions(-) Approvals: Yuvipanda: Verified; Looks good to me, approved diff --git a/dashboards/reportcard.json b/dashboards/reportcard.json index 9417268..9c390d9 100644 --- a/dashboards/reportcard.json +++ b/dashboards/reportcard.json @@ -7,7 +7,7 @@ name: Edits daily, graph_ids: [ successful-edits-main, -successful-edits, +successful-edits-newbie, successful-edits-other, successful-edits-unique ] diff --git a/datasources/successful-edits.json b/datasources/successful-edits-newbie.json similarity index 83% rename from datasources/successful-edits.json rename to datasources/successful-edits-newbie.json index 51478d0..0a8cd0d 100644 --- a/datasources/successful-edits.json +++ b/datasources/successful-edits-newbie.json @@ -4,10 +4,10 @@ step: 1d, end: 2013/03/19 }, -url: http://stat1001.wikimedia.org/limn-public-data/mobile/datafiles/successful-edits.csv;, +url: http://stat1001.wikimedia.org/limn-public-data/mobile/datafiles/successful-edits-newbie.csv;, format: csv, type: timeseries, -id: successful-edits, +id: successful-edits-newbie, columns: [ { type: date, diff --git a/graphs/successful-edits.json b/graphs/successful-edits-newbie.json similarity index 94% rename from graphs/successful-edits.json rename to graphs/successful-edits-newbie.json index 59c55ec..bae4f2a 100644 --- a/graphs/successful-edits.json +++ b/graphs/successful-edits-newbie.json @@ -1,6 +1,6 @@ { graph_version: 0.6.0, - name: Successful Edits (All), + name: Successful first edits on mobile, root: { scaling: linear, nodeType: canvas, @@ -93,7 +93,7 @@ disabled: false, index: 0, metric: { - source_id: successful-edits, + source_id: successful-edits-newbie, type: int, source_col: 1 }, @@ -111,6 +111,6 @@ } ] }, - id: successful-edits, + id: successful-edits-newbie, desc: } diff --git a/mobile/config.yaml b/mobile/config.yaml index 729c00a..a5a650c 100644 --- a/mobile/config.yaml +++ b/mobile/config.yaml @@ -34,8 +34,8 @@ title: Uploads cancelled by user (per day) error-uploads: title: Uploads failed because of an upload error (per day) -successful-edits: -title: Successful edits (per day) +successful-edits-newbie: +title: Successful edits by first time users (per day) successful-edits-main: title: Successful Main namespace edits (per day) successful-edits-other: diff --git a/mobile/successful-edits.sql b/mobile/successful-edits-newbie.sql similarity index 93% rename from mobile/successful-edits.sql rename to mobile/successful-edits-newbie.sql index 61ef856..488fab4 100644 --- a/mobile/successful-edits.sql +++ b/mobile/successful-edits-newbie.sql @@ -17,6 +17,7 @@ FROM {{ tables.edits_web }} WHERE event_action = 'success' AND +event_userEditCount = 0 AND wiki != 'testwiki' GROUP BY Date ) AS Web ON Month.Date = Web.Date; -- To view, visit https://gerrit.wikimedia.org/r/77278 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9c9ee5431903bd0350834894ceef6e0b03675b7c Gerrit-PatchSet: 2 Gerrit-Project: analytics/limn-mobile-data Gerrit-Branch: master Gerrit-Owner: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: JGonera jgon...@wikimedia.org Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [WIP] Add a hook for extensions to use to add actions - change (mediawiki...AbuseFilter)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/78491 Change subject: [WIP] Add a hook for extensions to use to add actions .. [WIP] Add a hook for extensions to use to add actions Change-Id: I1eac8c8466bed79a1ee0479ecfe2038d3e77f949 --- M AbuseFilter.class.php M AbuseFilter.php M Views/AbuseFilterViewEdit.php 3 files changed, 65 insertions(+), 20 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter refs/changes/91/78491/1 diff --git a/AbuseFilter.class.php b/AbuseFilter.class.php index 488521c..bb5b18a 100644 --- a/AbuseFilter.class.php +++ b/AbuseFilter.class.php @@ -670,10 +670,10 @@ ); // Categorise consequences by filter. - global $wgAbuseFilterRestrictedActions; + $restrictedActions = self::getRestrictedFunctions(); foreach( $res as $row ) { if ( $row-af_throttled -in_array( $row-afa_consequence, $wgAbuseFilterRestrictedActions ) ) +in_array( $row-afa_consequence, $restrictedActions ) ) { # Don't do the action } elseif ( $row-afa_filter != $row-af_id ) { @@ -709,7 +709,7 @@ $messages = array(); - global $wgOut, $wgAbuseFilterDisallowGlobalLocalBlocks, $wgAbuseFilterRestrictedActions; + global $wgOut, $wgAbuseFilterDisallowGlobalLocalBlocks; foreach ( $actionsByFilter as $filter = $actions ) { // Special-case handling for warnings. $parsed_public_comments = $wgOut-parseInline( @@ -736,9 +736,9 @@ continue; } } - + $restrictedActions = self::getRestrictedFunctions(); if ( $wgAbuseFilterDisallowGlobalLocalBlocks $global_filter ) { - foreach ( $wgAbuseFilterRestrictedActions as $blockingAction ) { + foreach ( $restrictedActions as $blockingAction ) { unset( $actions[$blockingAction] ); } } @@ -775,7 +775,7 @@ } // prevent double warnings - if ( count( array_intersect( array_keys( $actions ), $wgAbuseFilterRestrictedActions ) ) 0 + if ( count( array_intersect( array_keys( $actions ), $restrictedActions ) ) 0 !empty( $actions['disallow'] ) ) { unset( $actions['disallow'] ); } @@ -1184,7 +1184,7 @@ $vars, $rule_desc ) { global $wgAbuseFilterCustomActionsHandlers, $wgRequest; - + $availableactions = self::getAvailableActions(); $message = null; switch ( $action ) { @@ -1350,8 +1350,8 @@ AbuseFilter::$tagsToSet[$actionID] = $parameters; break; default: - if( isset( $wgAbuseFilterCustomActionsHandlers[$action] ) ) { - $custom_function = $wgAbuseFilterCustomActionsHandlers[$action]; + if( isset( $availableactions[$action]['callback'] ) ) { + $custom_function = $availableactions[$action]['callback']; if( is_callable( $custom_function ) ) { $msg = call_user_func( $custom_function, $action, $parameters, $title, $vars, $rule_desc ); } @@ -1759,8 +1759,8 @@ } } - global $wgAbuseFilterAvailableActions; - foreach ( $wgAbuseFilterAvailableActions as $action ) { + $availableactions = self::getAvailableActions(); + foreach ( $availableactions as $action = $data ) { if ( !isset( $actions1[$action] ) !isset( $actions2[$action] ) ) { // They're both unset } elseif ( isset( $actions1[$action] ) isset( $actions2[$action] ) ) { @@ -2269,4 +2269,45 @@ return $firstChanges[$filterID]; } + + /** +* Gets a list of actions that are enabled +* Return format is a list of arrays which have the following keys: +* 'type' = Can be 'restricted', 'global', 'default', 'hook' +* 'callback' = If the function is of type hook, this function is called +* +* @return
[MediaWiki-commits] [Gerrit] Remove random debugging statement - change (labs...gerrit-to-redis)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/78492 Change subject: Remove random debugging statement .. Remove random debugging statement Change-Id: I61fc0f10f13caa75993f89bf5ce19cfcc9cc6faf --- M src/github-receiver.py 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/tools/gerrit-to-redis refs/changes/92/78492/1 diff --git a/src/github-receiver.py b/src/github-receiver.py index 2905c8d..2319112 100755 --- a/src/github-receiver.py +++ b/src/github-receiver.py @@ -37,8 +37,6 @@ red = redis.StrictRedis(host=REDIS_HOST, db=REDIS_DB) logging.info('Redis connection to %s succeded', REDIS_HOST) -logging.info('looking for %s', PUBLISH_LUA_PATH) - with open(PUBLISH_LUA_PATH) as f: publish_clients = red.register_script(f.read()) -- To view, visit https://gerrit.wikimedia.org/r/78492 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I61fc0f10f13caa75993f89bf5ce19cfcc9cc6faf Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/gerrit-to-redis Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove random debugging statement - change (labs...gerrit-to-redis)
Yuvipanda has submitted this change and it was merged. Change subject: Remove random debugging statement .. Remove random debugging statement Change-Id: I61fc0f10f13caa75993f89bf5ce19cfcc9cc6faf --- M src/github-receiver.py 1 file changed, 0 insertions(+), 2 deletions(-) Approvals: Yuvipanda: Verified; Looks good to me, approved diff --git a/src/github-receiver.py b/src/github-receiver.py index 2905c8d..2319112 100755 --- a/src/github-receiver.py +++ b/src/github-receiver.py @@ -37,8 +37,6 @@ red = redis.StrictRedis(host=REDIS_HOST, db=REDIS_DB) logging.info('Redis connection to %s succeded', REDIS_HOST) -logging.info('looking for %s', PUBLISH_LUA_PATH) - with open(PUBLISH_LUA_PATH) as f: publish_clients = red.register_script(f.read()) -- To view, visit https://gerrit.wikimedia.org/r/78492 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I61fc0f10f13caa75993f89bf5ce19cfcc9cc6faf Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/gerrit-to-redis Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Open a new MySQL connection for each registration action - change (labs...gerrit-to-redis)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/78493 Change subject: Open a new MySQL connection for each registration action .. Open a new MySQL connection for each registration action Since otherwise it seems that the connection 'dies' after a while. Change-Id: I1e0eefc90d2e818ef5dc22f2a6f4e8e03d05e35a --- M src/registrar.py M src/storage.py 2 files changed, 8 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/tools/gerrit-to-redis refs/changes/93/78493/1 diff --git a/src/registrar.py b/src/registrar.py index 71a1261..bbfa3fa 100755 --- a/src/registrar.py +++ b/src/registrar.py @@ -35,13 +35,13 @@ red = redis.StrictRedis(host=REDIS_HOST, db=REDIS_DB) logging.info('Redis connection to %s succeded', REDIS_HOST) -logging.info('Attempting to connect to MySql on %s', MYSQL_HOST) -db = storage.DB(MYSQL_HOST, MYSQL_DB) -logging.info('MySql connection to %s suceceded', MYSQL_HOST) - class Service(object): def __init__(self, service_name): self.service = SERVICES[service_name] +logging.info('Attempting to connect to MySql on %s', MYSQL_HOST) +self.db = storage.DB(MYSQL_HOST, MYSQL_DB) +logging.info('MySql connection to %s suceceded', MYSQL_HOST) + def _make_key(self, *key_parts): return self.service['redis_prefix'] + _ + '.'.join(key_parts) @@ -50,7 +50,7 @@ key = generate_random_string(32) clients_key = self._make_key(self.service['clients_key']) red.pipeline().sadd(clients_key, key).save().execute() -db.insert(key, msg['service'], msg['description'], msg['createdby']) +self.db.insert(key, msg['service'], msg['description'], msg['createdby']) logging.info('Added key %s' % key) return Created key: %s and started subscription % key diff --git a/src/storage.py b/src/storage.py index a11f862..b265305 100644 --- a/src/storage.py +++ b/src/storage.py @@ -10,3 +10,6 @@ cur = self.conn.cursor() cur.execute(INSERT_SQL, (queue_key, service, description, createdby)) self.conn.commit() + +def __del__(self): +self.conn.close() -- To view, visit https://gerrit.wikimedia.org/r/78493 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1e0eefc90d2e818ef5dc22f2a6f4e8e03d05e35a Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/gerrit-to-redis Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Open a new MySQL connection for each registration action - change (labs...gerrit-to-redis)
Yuvipanda has submitted this change and it was merged. Change subject: Open a new MySQL connection for each registration action .. Open a new MySQL connection for each registration action Since otherwise it seems that the connection 'dies' after a while. Change-Id: I1e0eefc90d2e818ef5dc22f2a6f4e8e03d05e35a --- M src/registrar.py M src/storage.py 2 files changed, 8 insertions(+), 5 deletions(-) Approvals: Yuvipanda: Verified; Looks good to me, approved diff --git a/src/registrar.py b/src/registrar.py index 71a1261..bbfa3fa 100755 --- a/src/registrar.py +++ b/src/registrar.py @@ -35,13 +35,13 @@ red = redis.StrictRedis(host=REDIS_HOST, db=REDIS_DB) logging.info('Redis connection to %s succeded', REDIS_HOST) -logging.info('Attempting to connect to MySql on %s', MYSQL_HOST) -db = storage.DB(MYSQL_HOST, MYSQL_DB) -logging.info('MySql connection to %s suceceded', MYSQL_HOST) - class Service(object): def __init__(self, service_name): self.service = SERVICES[service_name] +logging.info('Attempting to connect to MySql on %s', MYSQL_HOST) +self.db = storage.DB(MYSQL_HOST, MYSQL_DB) +logging.info('MySql connection to %s suceceded', MYSQL_HOST) + def _make_key(self, *key_parts): return self.service['redis_prefix'] + _ + '.'.join(key_parts) @@ -50,7 +50,7 @@ key = generate_random_string(32) clients_key = self._make_key(self.service['clients_key']) red.pipeline().sadd(clients_key, key).save().execute() -db.insert(key, msg['service'], msg['description'], msg['createdby']) +self.db.insert(key, msg['service'], msg['description'], msg['createdby']) logging.info('Added key %s' % key) return Created key: %s and started subscription % key diff --git a/src/storage.py b/src/storage.py index a11f862..b265305 100644 --- a/src/storage.py +++ b/src/storage.py @@ -10,3 +10,6 @@ cur = self.conn.cursor() cur.execute(INSERT_SQL, (queue_key, service, description, createdby)) self.conn.commit() + +def __del__(self): +self.conn.close() -- To view, visit https://gerrit.wikimedia.org/r/78493 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1e0eefc90d2e818ef5dc22f2a6f4e8e03d05e35a Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/gerrit-to-redis Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Do not keep redis connections open all the time either - change (labs...gerrit-to-redis)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/78494 Change subject: Do not keep redis connections open all the time either .. Do not keep redis connections open all the time either Registrar is gonna get called a very small number of times, so no reason to keep a connection open Change-Id: I64e2398027f052978b0df7c50ef8acff3a0ba593 --- M src/registrar.py 1 file changed, 7 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/tools/gerrit-to-redis refs/changes/94/78494/1 diff --git a/src/registrar.py b/src/registrar.py index bbfa3fa..b9f7bc3 100755 --- a/src/registrar.py +++ b/src/registrar.py @@ -31,13 +31,15 @@ logging.basicConfig(format='%(asctime)s %(message)s', filename=os.path.expanduser('~/logs/stream-subscriptions'), level=logging.INFO) -logging.info('Attempting to Redis connection to %s', REDIS_HOST) -red = redis.StrictRedis(host=REDIS_HOST, db=REDIS_DB) -logging.info('Redis connection to %s succeded', REDIS_HOST) class Service(object): def __init__(self, service_name): self.service = SERVICES[service_name] + +logging.info('Attempting to Redis connection to %s', REDIS_HOST) +self.redis = redis.StrictRedis(host=REDIS_HOST, db=REDIS_DB) +logging.info('Redis connection to %s succeded', REDIS_HOST) + logging.info('Attempting to connect to MySql on %s', MYSQL_HOST) self.db = storage.DB(MYSQL_HOST, MYSQL_DB) logging.info('MySql connection to %s suceceded', MYSQL_HOST) @@ -49,14 +51,14 @@ def add_subscription(self, msg): key = generate_random_string(32) clients_key = self._make_key(self.service['clients_key']) -red.pipeline().sadd(clients_key, key).save().execute() self.db.insert(key, msg['service'], msg['description'], msg['createdby']) +self.redis.pipeline().sadd(clients_key, key).save().execute() logging.info('Added key %s' % key) return Created key: %s and started subscription % key def delete_subscription(msg): clients_key = self._make_key(self.service['clients_key']) -red.pipeline().delete(msg['key']).srem(clients_key, msg['key']).save().execute() +self.redis.pipeline().delete(msg['key']).srem(clients_key, msg['key']).save().execute() logging.info('Removed key %s' % msg['key']) return Removed key -- To view, visit https://gerrit.wikimedia.org/r/78494 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I64e2398027f052978b0df7c50ef8acff3a0ba593 Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/gerrit-to-redis Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Do not keep redis connections open all the time either - change (labs...gerrit-to-redis)
Yuvipanda has submitted this change and it was merged. Change subject: Do not keep redis connections open all the time either .. Do not keep redis connections open all the time either Registrar is gonna get called a very small number of times, so no reason to keep a connection open Change-Id: I64e2398027f052978b0df7c50ef8acff3a0ba593 --- M src/registrar.py 1 file changed, 7 insertions(+), 5 deletions(-) Approvals: Yuvipanda: Verified; Looks good to me, approved diff --git a/src/registrar.py b/src/registrar.py index bbfa3fa..b9f7bc3 100755 --- a/src/registrar.py +++ b/src/registrar.py @@ -31,13 +31,15 @@ logging.basicConfig(format='%(asctime)s %(message)s', filename=os.path.expanduser('~/logs/stream-subscriptions'), level=logging.INFO) -logging.info('Attempting to Redis connection to %s', REDIS_HOST) -red = redis.StrictRedis(host=REDIS_HOST, db=REDIS_DB) -logging.info('Redis connection to %s succeded', REDIS_HOST) class Service(object): def __init__(self, service_name): self.service = SERVICES[service_name] + +logging.info('Attempting to Redis connection to %s', REDIS_HOST) +self.redis = redis.StrictRedis(host=REDIS_HOST, db=REDIS_DB) +logging.info('Redis connection to %s succeded', REDIS_HOST) + logging.info('Attempting to connect to MySql on %s', MYSQL_HOST) self.db = storage.DB(MYSQL_HOST, MYSQL_DB) logging.info('MySql connection to %s suceceded', MYSQL_HOST) @@ -49,14 +51,14 @@ def add_subscription(self, msg): key = generate_random_string(32) clients_key = self._make_key(self.service['clients_key']) -red.pipeline().sadd(clients_key, key).save().execute() self.db.insert(key, msg['service'], msg['description'], msg['createdby']) +self.redis.pipeline().sadd(clients_key, key).save().execute() logging.info('Added key %s' % key) return Created key: %s and started subscription % key def delete_subscription(msg): clients_key = self._make_key(self.service['clients_key']) -red.pipeline().delete(msg['key']).srem(clients_key, msg['key']).save().execute() +self.redis.pipeline().delete(msg['key']).srem(clients_key, msg['key']).save().execute() logging.info('Removed key %s' % msg['key']) return Removed key -- To view, visit https://gerrit.wikimedia.org/r/78494 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I64e2398027f052978b0df7c50ef8acff3a0ba593 Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/gerrit-to-redis Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add missing language specification to TravisCI config - change (pywikibot/core)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/78496 Change subject: Add missing language specification to TravisCI config .. Add missing language specification to TravisCI config Change-Id: I68f927082057314344a76dbf73a1edf562b90c10 --- M .travis.yml 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/96/78496/1 diff --git a/.travis.yml b/.travis.yml index dc159af..23cc592 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,5 @@ +language: python + python: - '2.7' -- To view, visit https://gerrit.wikimedia.org/r/78496 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I68f927082057314344a76dbf73a1edf562b90c10 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add subscript tool - change (mediawiki...VisualEditor)
Steven Zhang has uploaded a new change for review. https://gerrit.wikimedia.org/r/78495 Change subject: Add subscript tool .. Add subscript tool Bug: 51612 Change-Id: Ia05e09a411213cbc035ad9dd3d3156d57f8e102c --- M VisualEditor.i18n.php M VisualEditor.php M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js M modules/ve/init/ve.init.Target.js A modules/ve/ui/tools/buttons/ve.ui.SubScriptButtonTool.js 5 files changed, 47 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/95/78495/1 diff --git a/VisualEditor.i18n.php b/VisualEditor.i18n.php index 4832183..3d2c53f 100644 --- a/VisualEditor.i18n.php +++ b/VisualEditor.i18n.php @@ -258,6 +258,8 @@ {{Identical|Underline}}', 'visualeditor-annotationbutton-superscript-tooltip' = 'Tooltip text for superscript button. {{Identical|Superscript}}', + 'visualeditor-annotationbutton-subscript-tooltip' = 'Tooltip text for subscript button. +{{Identical|Subscript}}', 'visualeditor-beta-label' = 'Text of tool in the toolbar that highlights that VisualEditor is still in beta. {{Identical|Beta}}', diff --git a/VisualEditor.php b/VisualEditor.php index ad947c1..2dcb7d4 100644 --- a/VisualEditor.php +++ b/VisualEditor.php @@ -734,6 +734,7 @@ 've/ui/tools/buttons/ve.ui.StrikethroughButtonTool.js', 've/ui/tools/buttons/ve.ui.UnderlineButtonTool.js', 've/ui/tools/buttons/ve.ui.SuperScriptButtonTool.js', + 've/ui/tools/buttons/ve.ui.SubScriptButtonTool.js', ), 'dependencies' = array( 'ext.visualEditor.core', @@ -748,6 +749,7 @@ 'visualeditor-annotationbutton-strikethrough-tooltip', 'visualeditor-annotationbutton-underline-tooltip', 'visualeditor-annotationbuttin-superscript-tooltip', + 'visualeditor-annotationbuttin-subscript-tooltip', ), ), 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 860d45f..729f936 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js @@ -170,7 +170,7 @@ ve.init.mw.ViewPageTarget.static.toolbarTools = [ { 'items': [ 'undo', 'redo' ] }, { 'items': [ 'mwFormat' ] }, - { 'items': [ 'bold', 'italic', 'mwLink', 'language', 'code', 'underline', 'strikethrough', 'superscript', 'clear' ] }, + { 'items': [ 'bold', 'italic', 'mwLink', 'language', 'code', 'underline', 'strikethrough', 'superscript', 'subscript', 'clear' ] }, { 'items': [ 'number', 'bullet', 'outdent', 'indent' ] }, { 'items': [ 'mwMediaInsert', 'mwReference', 'mwReferenceList', 'mwTransclusion', 'mwMath', 'mwHiero' ] } ]; diff --git a/modules/ve/init/ve.init.Target.js b/modules/ve/init/ve.init.Target.js index 7ba4e19..feddcc9 100644 --- a/modules/ve/init/ve.init.Target.js +++ b/modules/ve/init/ve.init.Target.js @@ -32,7 +32,7 @@ ve.init.Target.static.toolbarTools = [ { 'items': ['undo', 'redo'] }, { 'items': ['format'] }, - { 'items': ['bold', 'italic', 'link', 'code', 'language', 'underline', 'strikethrough', 'superscript', 'clear'] }, + { 'items': ['bold', 'italic', 'link', 'code', 'language', 'underline', 'strikethrough', 'superscript', 'subscript', 'clear'] }, { 'items': ['number', 'bullet', 'outdent', 'indent'] } ]; @@ -46,6 +46,7 @@ //'underline', //'strikethrough', //'superscript', + //'subscript', 'indent', 'outdent' ]; diff --git a/modules/ve/ui/tools/buttons/ve.ui.SubScriptButtonTool.js b/modules/ve/ui/tools/buttons/ve.ui.SubScriptButtonTool.js new file mode 100644 index 000..e9d262b --- /dev/null +++ b/modules/ve/ui/tools/buttons/ve.ui.SubScriptButtonTool.js @@ -0,0 +1,40 @@ +/*! + * VisualEditor UserInterface SubScriptButtonTool class. + * + * @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt + * @license The MIT License (MIT); see LICENSE.txt + */ + +/** + * UserInterface code button tool. + * + * @class + * @extends ve.ui.AnnotationButtonTool + * @constructor + * @param {ve.ui.SurfaceToolbar} toolbar + * @param {Object} [config] Config options + */ +ve.ui.SubScriptButtonTool = function VeUiSubScriptuttonTool( toolbar, config ) { + // Parent constructor + ve.ui.AnnotationButtonTool.call( this, toolbar, config ); +}; + +/* Inheritance */ + +ve.inheritClass( ve.ui.SubScriptButtonTool, ve.ui.AnnotationButtonTool ); + +/* Static Properties */ + +ve.ui.SubScriptButtonTool.static.name = 'subscript'; + +ve.ui.SubScriptButtonTool.static.icon = 'subscript'; + +ve.ui.SubScriptButtonTool.static.titleMessage =
[MediaWiki-commits] [Gerrit] Add maintenance script to populate revision diffs in database - change (mediawiki...CodeReview)
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/78497 Change subject: Add maintenance script to populate revision diffs in database .. Add maintenance script to populate revision diffs in database Change-Id: Ia011e9cc04577544892358d1c63025575d8b0470 --- A maintenance/getRevisionDiffs.php 1 file changed, 48 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CodeReview refs/changes/97/78497/1 diff --git a/maintenance/getRevisionDiffs.php b/maintenance/getRevisionDiffs.php new file mode 100644 index 000..1727cbe --- /dev/null +++ b/maintenance/getRevisionDiffs.php @@ -0,0 +1,48 @@ +?php + +$IP = getenv( 'MW_INSTALL_PATH' ); + +if ( $IP === false ) { + $IP = dirname( __FILE__ ) . '/../../..'; +} +require_once( $IP/maintenance/Maintenance.php ); class GetRevisionDiffs extends Maintenance { + public function __construct() { + parent::__construct(); + $this-mDescription = Populates the cr_diff column (where possible) for all rows in a repo; + $this-addArg( 'repo', 'The name of the repo. Cannot be all.' ); + } + public function execute() { + $repoName = $this-getArg( 0 ); + if ( $repoName == all ) { + $this-error( Cannot use the 'all' repo, true ); + } + $repo = CodeRepository::newFromName( $repoName ); + if ( !$repo ) { + $this-error( Repo '{$repoName}' is not a valid Repository, true ); + } + $dbr = wfGetDB( DB_SLAVE ); + $res = $dbr-select( + 'code_rev', + 'cr_id', + array( 'cr_repo_id' = $repo-getId(), 'cr_diff IS null', ), + __METHOD__ + ); + $count = 0; + foreach ( $res as $row ) { + $id = $row-cr_id; + $diff = $repo-getDiff( $row-cr_id , '' ); + if ( is_int( $diff ) ) { + $error = CodeRepository::getDiffErrorMessage( $diff ); + $this-output( $id - $error\n ); + } else { + $this-output( $id\n ); + } + + if ( ++$count % 100 == 0 ) { + wfWaitForSlaves(); + } + } + $this-output( Done!\n ); + } +} +$maintClass = GetRevisionDiffs; require_once( DO_MAINTENANCE ); -- To view, visit https://gerrit.wikimedia.org/r/78497 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia011e9cc04577544892358d1c63025575d8b0470 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CodeReview Gerrit-Branch: master Gerrit-Owner: Reedy re...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Bug fix: '/etc/apache2/site.d' requires Apache - change (mediawiki/vagrant)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/78498 Change subject: Bug fix: '/etc/apache2/site.d' requires Apache .. Bug fix: '/etc/apache2/site.d' requires Apache This patch ensure Apache is installed before trying to create '/etc/apache2' sub-directories, fixing a bug I introduced in I7786f096a. Change-Id: Id4786c5c80721c6c9a75875c4d2fb720d95f0237 --- M puppet/modules/apache/manifests/init.pp 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/98/78498/1 diff --git a/puppet/modules/apache/manifests/init.pp b/puppet/modules/apache/manifests/init.pp index 396a11f..d841507 100644 --- a/puppet/modules/apache/manifests/init.pp +++ b/puppet/modules/apache/manifests/init.pp @@ -24,7 +24,8 @@ } file { '/etc/apache2/site.d': -ensure = directory, +ensure = directory, +require = Package['apache2'], } service { 'apache2': -- To view, visit https://gerrit.wikimedia.org/r/78498 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id4786c5c80721c6c9a75875c4d2fb720d95f0237 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Ori.livneh o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Bug fix: '/etc/apache2/site.d' requires Apache - change (mediawiki/vagrant)
jenkins-bot has submitted this change and it was merged. Change subject: Bug fix: '/etc/apache2/site.d' requires Apache .. Bug fix: '/etc/apache2/site.d' requires Apache This patch ensure Apache is installed before trying to create '/etc/apache2' sub-directories, fixing a bug I introduced in I7786f096a. Change-Id: Id4786c5c80721c6c9a75875c4d2fb720d95f0237 --- M puppet/modules/apache/manifests/init.pp 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/puppet/modules/apache/manifests/init.pp b/puppet/modules/apache/manifests/init.pp index 396a11f..d841507 100644 --- a/puppet/modules/apache/manifests/init.pp +++ b/puppet/modules/apache/manifests/init.pp @@ -24,7 +24,8 @@ } file { '/etc/apache2/site.d': -ensure = directory, +ensure = directory, +require = Package['apache2'], } service { 'apache2': -- To view, visit https://gerrit.wikimedia.org/r/78498 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id4786c5c80721c6c9a75875c4d2fb720d95f0237 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Ori.livneh o...@wikimedia.org Gerrit-Reviewer: Ori.livneh o...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] add RewriteRule for Bugzilla, page.cgi?id=bug-writing.html t... - change (operations/puppet)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/78499 Change subject: add RewriteRule for Bugzilla, page.cgi?id=bug-writing.html to http://www.mediawiki.org/wiki/How_to_report_a_bug (bug 45271) .. add RewriteRule for Bugzilla, page.cgi?id=bug-writing.html to http://www.mediawiki.org/wiki/How_to_report_a_bug (bug 45271) Change-Id: I78ea3f5148829710679bd9da513aa8b3e71bd49e --- M files/apache/sites/bugzilla.wikimedia.org 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/99/78499/1 diff --git a/files/apache/sites/bugzilla.wikimedia.org b/files/apache/sites/bugzilla.wikimedia.org index 19e763d..cd999b3 100644 --- a/files/apache/sites/bugzilla.wikimedia.org +++ b/files/apache/sites/bugzilla.wikimedia.org @@ -110,6 +110,9 @@ RewriteEngine On RewriteRule ^/(\d+)$ https://bugzilla.wikimedia.org/show_bug.cgi?id=$1 [R] +RewriteCond %{QUERY_STRING} ^(id=bug-writing.html)$ +RewriteRule /page\.cgi$ http://www.mediawiki.org/wiki/How_to_report_a_bug? [R=303] + /VirtualHost VirtualHost *:80 -- To view, visit https://gerrit.wikimedia.org/r/78499 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I78ea3f5148829710679bd9da513aa8b3e71bd49e Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn dz...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] add RewriteRule for Bugzilla, page.cgi?id=bug-writing.html t... - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: add RewriteRule for Bugzilla, page.cgi?id=bug-writing.html to http://www.mediawiki.org/wiki/How_to_report_a_bug (bug 45271) .. add RewriteRule for Bugzilla, page.cgi?id=bug-writing.html to http://www.mediawiki.org/wiki/How_to_report_a_bug (bug 45271) Change-Id: I78ea3f5148829710679bd9da513aa8b3e71bd49e --- M files/apache/sites/bugzilla.wikimedia.org 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/files/apache/sites/bugzilla.wikimedia.org b/files/apache/sites/bugzilla.wikimedia.org index 19e763d..be45a6c 100644 --- a/files/apache/sites/bugzilla.wikimedia.org +++ b/files/apache/sites/bugzilla.wikimedia.org @@ -110,6 +110,9 @@ RewriteEngine On RewriteRule ^/(\d+)$ https://bugzilla.wikimedia.org/show_bug.cgi?id=$1 [R] +RewriteCond %{QUERY_STRING} ^(id=bug-writing.html)$ +RewriteRule /page\.cgi$ https://www.mediawiki.org/wiki/How_to_report_a_bug? [R=303] + /VirtualHost VirtualHost *:80 -- To view, visit https://gerrit.wikimedia.org/r/78499 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I78ea3f5148829710679bd9da513aa8b3e71bd49e Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn dz...@wikimedia.org Gerrit-Reviewer: Dzahn dz...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Preferences: Remove dummy labels for Checkboxes - change (mediawiki/core)
TheDJ has uploaded a new change for review. https://gerrit.wikimedia.org/r/78500 Change subject: Preferences: Remove dummy labels for Checkboxes .. Preferences: Remove dummy labels for Checkboxes When used in table layouts, checkboxes would output an empty dummy label in the first cell, which would block the actual label that checkboxes add to their right side. Change-Id: I3793d310742da52555fae2eced322c8bc2b08f6f --- M RELEASE-NOTES-1.22 M includes/HTMLForm.php 2 files changed, 9 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/00/78500/1 diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22 index af467a0..8eda7d3 100644 --- a/RELEASE-NOTES-1.22 +++ b/RELEASE-NOTES-1.22 @@ -253,6 +253,7 @@ adding a new topic on a page * (bug 6200) line breaks in blockquote are handled like they are in div * (bug 41756) Improve treatment of multiple comments on a blank line. +* (bug 52697) Repair labels for checkboxes in preferences. === API changes in 1.22 === * (bug 25553) The JSON output formatter now leaves forward slashes unescaped diff --git a/includes/HTMLForm.php b/includes/HTMLForm.php index e06a934..8b3c0cb 100644 --- a/includes/HTMLForm.php +++ b/includes/HTMLForm.php @@ -1543,8 +1543,12 @@ $html = ''; if ( $displayFormat === 'table' ) { + $htmlLabel = ''; + if ( $hasLabel ) { + $htmlLabel = Html::rawElement( 'label', $for, $labelValue ); + }; $html = Html::rawElement( 'td', array( 'class' = 'mw-label' ) + $cellAttributes, - Html::rawElement( 'label', $for, $labelValue ) + $htmlLabel ); } elseif ( $hasLabel || $this-mShowEmptyLabels ) { if ( $displayFormat === 'div' ) { @@ -1852,6 +1856,9 @@ function getLabel() { return '#160;'; } + protected function needsLabel() { + return false; + } /** * @param $request WebRequest -- To view, visit https://gerrit.wikimedia.org/r/78500 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3793d310742da52555fae2eced322c8bc2b08f6f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: TheDJ hartman.w...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add RewriteRule for Bugzilla, page.cgi?id=fields.html to htt... - change (operations/puppet)
Aklapper has uploaded a new change for review. https://gerrit.wikimedia.org/r/78501 Change subject: Add RewriteRule for Bugzilla, page.cgi?id=fields.html to https://www.mediawiki.org/wiki/Bugzilla/Fields .. Add RewriteRule for Bugzilla, page.cgi?id=fields.html to https://www.mediawiki.org/wiki/Bugzilla/Fields Bug: 42524 Change-Id: I105d8f1dfd4837b4fbaf4f0e2dc3c850870bce06 --- M files/apache/sites/bugzilla.wikimedia.org 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/01/78501/1 diff --git a/files/apache/sites/bugzilla.wikimedia.org b/files/apache/sites/bugzilla.wikimedia.org index be45a6c..5bf88db 100644 --- a/files/apache/sites/bugzilla.wikimedia.org +++ b/files/apache/sites/bugzilla.wikimedia.org @@ -113,6 +113,9 @@ RewriteCond %{QUERY_STRING} ^(id=bug-writing.html)$ RewriteRule /page\.cgi$ https://www.mediawiki.org/wiki/How_to_report_a_bug? [R=303] +RewriteCond %{QUERY_STRING} ^(id=fields.html)$ +RewriteRule /page\.cgi$ https://www.mediawiki.org/wiki/Bugzilla/Fields? [R=303] + /VirtualHost VirtualHost *:80 -- To view, visit https://gerrit.wikimedia.org/r/78501 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I105d8f1dfd4837b4fbaf4f0e2dc3c850870bce06 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Aklapper aklap...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add RewriteRule for Bugzilla, page.cgi?id=fields.html to htt... - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: Add RewriteRule for Bugzilla, page.cgi?id=fields.html to https://www.mediawiki.org/wiki/Bugzilla/Fields .. Add RewriteRule for Bugzilla, page.cgi?id=fields.html to https://www.mediawiki.org/wiki/Bugzilla/Fields Bug: 42524 Change-Id: I105d8f1dfd4837b4fbaf4f0e2dc3c850870bce06 --- M files/apache/sites/bugzilla.wikimedia.org 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/files/apache/sites/bugzilla.wikimedia.org b/files/apache/sites/bugzilla.wikimedia.org index be45a6c..5bf88db 100644 --- a/files/apache/sites/bugzilla.wikimedia.org +++ b/files/apache/sites/bugzilla.wikimedia.org @@ -113,6 +113,9 @@ RewriteCond %{QUERY_STRING} ^(id=bug-writing.html)$ RewriteRule /page\.cgi$ https://www.mediawiki.org/wiki/How_to_report_a_bug? [R=303] +RewriteCond %{QUERY_STRING} ^(id=fields.html)$ +RewriteRule /page\.cgi$ https://www.mediawiki.org/wiki/Bugzilla/Fields? [R=303] + /VirtualHost VirtualHost *:80 -- To view, visit https://gerrit.wikimedia.org/r/78501 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I105d8f1dfd4837b4fbaf4f0e2dc3c850870bce06 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Aklapper aklap...@wikimedia.org Gerrit-Reviewer: Dzahn dz...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Deny reupload permission to users and autoconfirmed on ckbwiki - change (operations/mediawiki-config)
TTO has uploaded a new change for review. https://gerrit.wikimedia.org/r/78502 Change subject: Deny reupload permission to users and autoconfirmed on ckbwiki .. Deny reupload permission to users and autoconfirmed on ckbwiki This is a followup to I7a651f1ff738afe1a42e05c70f17dc61df02dab2. The change in the present changeset was requested in the bug, but not actually carried out in the last changeset. Bug: 51232 Change-Id: I7e21ae20fb967c25411d453d4dbf56ce0c1570c9 --- M wmf-config/InitialiseSettings.php 1 file changed, 8 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/02/78502/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index fa9684e..24b6caa 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -6724,8 +6724,14 @@ '*' = array( 'createpage' = false ), 'autopatrolled' = array( 'autopatrol' = true ), // bug 51328 'rollbacker' = array( 'rollback' = true ), // bug 51312 - 'user' = array( 'upload' = false ), // bug 51232 - 'autoconfirmed' = array( 'upload' = false ), // bug 51232 + 'user' = array( + 'upload' = false, + 'reupload' = false, + ), // bug 51232 + 'autoconfirmed' = array( + 'upload' = false, + 'reupload' = false, + ), // bug 51232 'uploader' = array( 'upload' = true, 'reupload' = true, -- To view, visit https://gerrit.wikimedia.org/r/78502 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7e21ae20fb967c25411d453d4dbf56ce0c1570c9 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: TTO at.li...@live.com.au ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add full-stops to error messages - change (mediawiki...Wikibase)
Shirayuki has uploaded a new change for review. https://gerrit.wikimedia.org/r/78503 Change subject: Add full-stops to error messages .. Add full-stops to error messages Add comments for grep Change-Id: I5c7f5ae9d08f1dd14605058ff7f2eb16d46bb0e1 --- M lib/includes/Validators/ValidatorErrorLocalizer.php M repo/Wikibase.i18n.php M repo/includes/MultiLangConstraintDetector.php M repo/includes/content/EntityContent.php M repo/includes/specials/SpecialEntitiesWithoutLabel.php 5 files changed, 17 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/03/78503/1 diff --git a/lib/includes/Validators/ValidatorErrorLocalizer.php b/lib/includes/Validators/ValidatorErrorLocalizer.php index 9d6a0f4..7989940 100644 --- a/lib/includes/Validators/ValidatorErrorLocalizer.php +++ b/lib/includes/Validators/ValidatorErrorLocalizer.php @@ -37,6 +37,12 @@ class ValidatorErrorLocalizer { public function getErrorMessage( Error $error ) { + // Give grep a chance to find the usages: + // wikibase-validator-bad-type, wikibase-validator-too-long, wikibase-validator-too-short, + // wikibase-validator-malformed-value, wikibase-validator-bad-entity-id, + // wikibase-validator-bad-entity-type, wikibase-validator-no-such-entity, + // wikibase-validator-no-such-property, wikibase-validator-bad-value, + // wikibase-validator-bad-value-type $key = 'wikibase-validator-' . $error-getCode(); $params = $error-getParameters(); diff --git a/repo/Wikibase.i18n.php b/repo/Wikibase.i18n.php index fc8a3ea..9dd9f1f 100644 --- a/repo/Wikibase.i18n.php +++ b/repo/Wikibase.i18n.php @@ -104,9 +104,9 @@ 'wikibase-error-constraint-violation-aliases' = 'There is {{PLURAL:$1|a constraint|constraints}} violation for {{PLURAL:$1|alias|aliases}} $3 for {{PLURAL:$1|language code|language codes}} $2.', 'wikibase-error-sitelink-already-used' = 'Site link [$1 $2] already used by item [[$3]].', - 'wikibase-error-label-not-unique-wikibase-property' = 'Another property ($3) already has label $1 associated with language code $2', - 'wikibase-error-label-not-unique-wikibase-query' = 'Another query ($3) already has label $1 associated with language code $2', - 'wikibase-error-label-not-unique-item' = 'Another item ($3) already has label $1 and description $4 associated with language code $2', + 'wikibase-error-label-not-unique-wikibase-property' = 'Another property ($3) already has label $1 associated with language code $2.', + 'wikibase-error-label-not-unique-wikibase-query' = 'Another query ($3) already has label $1 associated with language code $2.', + 'wikibase-error-label-not-unique-item' = 'Another item ($3) already has label $1 and description $4 associated with language code $2.', 'wikibase-itemlink' = '$1 $2', 'wikibase-itemlink-id-wrapper' = '($1)', @@ -136,7 +136,7 @@ 'wikibase-newproperty-summary' = 'Make sure to check if the property already exists!br /You should create a [[Help:Label|label]] and a [[Help:Description|description]] for all new properties, and in addition a valid property type.', 'wikibase-newproperty-fieldset' = 'Create a new property', 'wikibase-newproperty-datatype' = 'Data type:', - 'wikibase-newproperty-invalid-datatype' = 'Invalid datatype specified', + 'wikibase-newproperty-invalid-datatype' = 'Invalid datatype specified.', 'special-newitem' = 'Create a new item', 'wikibase-newitem-summary' = 'Make sure to [[Special:ItemByTitle|check if the item already exists]]!br /You should create a [[Help:Label|label]] and a [[Help:Description|description]] for all new items.', 'wikibase-newitem-fieldset' = 'Create a new item', diff --git a/repo/includes/MultiLangConstraintDetector.php b/repo/includes/MultiLangConstraintDetector.php index d338615..792a648 100644 --- a/repo/includes/MultiLangConstraintDetector.php +++ b/repo/includes/MultiLangConstraintDetector.php @@ -159,6 +159,8 @@ } ); $langValues = $wgLang-semicolonList( $langValues ); + // Give grep a chance to find the usages: wikibase-error-constraint-violation-label, + // wikibase-error-constraint-violation-description, wikibase-error-constraint-violation-aliases $status-fatal( 'wikibase-error-constraint-violation-' . $section, count($langCodes), diff --git a/repo/includes/content/EntityContent.php b/repo/includes/content/EntityContent.php index da2772e..75f87e8 100644 ---
[MediaWiki-commits] [Gerrit] Implement LanguageConverter for yue (Cantonese) - change (mediawiki/core)
Liangent has uploaded a new change for review. https://gerrit.wikimedia.org/r/78504 Change subject: Implement LanguageConverter for yue (Cantonese) .. Implement LanguageConverter for yue (Cantonese) Change-Id: Iee936baa0a42370a723b34b09a791bf0917dcdf4 --- M languages/Names.php M languages/classes/LanguageYue.php M languages/messages/MessagesYue.php A languages/messages/MessagesYue_hans.php A languages/messages/MessagesYue_hant.php 5 files changed, 3,437 insertions(+), 3,345 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/04/78504/1 -- To view, visit https://gerrit.wikimedia.org/r/78504 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iee936baa0a42370a723b34b09a791bf0917dcdf4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Liangent liang...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Set up Babel categories for eswikivoyage - change (operations/mediawiki-config)
TTO has uploaded a new change for review. https://gerrit.wikimedia.org/r/78505 Change subject: Set up Babel categories for eswikivoyage .. Set up Babel categories for eswikivoyage Per community request. Bug: 52309 Change-Id: I89a199c1e22f95972c4117592c15169ed20cb122 --- M wmf-config/InitialiseSettings.php 1 file changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/05/78505/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index fa9684e..10b99c2 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -11347,6 +11347,15 @@ '5' = false, 'N' = 'Usuario %code%-N', ), + 'eswikivoyage' = array( + '0' = 'Usuario %code%-0', + '1' = 'Usuario %code%-1', + '2' = 'Usuario %code%-2', + '3' = 'Usuario %code%-3', + '4' = 'Usuario %code%-4', + '5' = 'Usuario %code%-5', + 'N' = 'Usuario %code%-N', + ), 'fiwiki' = array( '0' = false, '1' = 'User %code%-1', -- To view, visit https://gerrit.wikimedia.org/r/78505 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I89a199c1e22f95972c4117592c15169ed20cb122 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: TTO at.li...@live.com.au ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Set up babel categories for ruwikinews - change (operations/mediawiki-config)
TTO has uploaded a new change for review. https://gerrit.wikimedia.org/r/78506 Change subject: Set up babel categories for ruwikinews .. Set up babel categories for ruwikinews Bug: 52679 Change-Id: I7953f54a568b58b498cfa1fd3e034b749cb8291c --- M wmf-config/InitialiseSettings.php 1 file changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/06/78506/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index fa9684e..331b2e5 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -11599,6 +11599,15 @@ '5' = 'User %code%-5', 'N' = 'User %code%-N', ), + 'ruwikinews' = array( // Bug 52679 + '0' = 'User %code%-0', + '1' = 'User %code%-1', + '2' = 'User %code%-2', + '3' = 'User %code%-3', + '4' = 'User %code%-4', + '5' = 'User %code%-5', + 'N' = 'User %code%-N', + ), 'specieswiki' = array( '0' = false, '1' = 'User %code%-1', @@ -11797,6 +11806,7 @@ 'plwikisource' = 'User %code%', // Bug 39225 'ptwiki' = 'Usuários %code%', 'ruwiki' = 'User %code%', + 'ruwikinews' = 'User %code%', // Bug 52679 'specieswiki' = 'User %code%', 'svwiki' = 'Användare %code%', 'svwiktionary' = 'Wiktionary:Användare %code%', // Bug 42288 -- To view, visit https://gerrit.wikimedia.org/r/78506 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7953f54a568b58b498cfa1fd3e034b749cb8291c Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: TTO at.li...@live.com.au 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 missing HTTP error pages on bits.wm.o - change (operations/mediawiki-config)
TTO has uploaded a new change for review. https://gerrit.wikimedia.org/r/78507 Change subject: Add missing HTTP error pages on bits.wm.o .. Add missing HTTP error pages on bits.wm.o Currently, hitting a 404 on bits gives an error page containing that annoying message, Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. which, to me, says you need to learn how to maintain a server! We can do better than that. Change-Id: I1c6985f0faf131aa04f4552fd71689004f337924 --- A docroot/bits/404.html A docroot/bits/503.html 2 files changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/07/78507/1 diff --git a/docroot/bits/404.html b/docroot/bits/404.html new file mode 100644 index 000..d853aae --- /dev/null +++ b/docroot/bits/404.html @@ -0,0 +1 @@ +/apache/common/404.html \ No newline at end of file diff --git a/docroot/bits/503.html b/docroot/bits/503.html new file mode 100644 index 000..7557fba --- /dev/null +++ b/docroot/bits/503.html @@ -0,0 +1 @@ +/apache/common/503.html \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/78507 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1c6985f0faf131aa04f4552fd71689004f337924 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: TTO at.li...@live.com.au ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add missing language specification to TravisCI config - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: Add missing language specification to TravisCI config .. Add missing language specification to TravisCI config Change-Id: I68f927082057314344a76dbf73a1edf562b90c10 --- M .travis.yml 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/.travis.yml b/.travis.yml index dc159af..23cc592 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,5 @@ +language: python + python: - '2.7' -- To view, visit https://gerrit.wikimedia.org/r/78496 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I68f927082057314344a76dbf73a1edf562b90c10 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove positional reference from createaccountmail - change (mediawiki/core)
Nemo bis has uploaded a new change for review. https://gerrit.wikimedia.org/r/78509 Change subject: Remove positional reference from createaccountmail .. Remove positional reference from createaccountmail https://www.mediawiki.org/wiki/Localisation#Avoid_references_to_screen_layout_and_positions Change-Id: I1a930fd402b5de020b7ad509e74a0f35638ba7f8 --- M languages/messages/MessagesEn.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/09/78509/1 diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 75e3532..91b1c60 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1147,7 +1147,7 @@ 'createacct-emailoptional'= 'Email address (optional)', 'createacct-email-ph' = 'Enter your email address', 'createacct-another-email-ph' = 'Enter email address', -'createaccountmail' = 'Use a temporary random password and send it to the email address specified below', +'createaccountmail' = 'Use a temporary random password and send it to the specified email address', 'createacct-realname' = 'Real name (optional)', 'createaccountreason' = 'Reason:', 'createacct-reason' = 'Reason', -- To view, visit https://gerrit.wikimedia.org/r/78509 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1a930fd402b5de020b7ad509e74a0f35638ba7f8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Nemo bis federicol...@tiscali.it ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixed adaptlettercase QUnit test - change (mediawiki...DataValues)
Jeroen De Dauw has submitted this change and it was merged. Change subject: Fixed adaptlettercase QUnit test .. Fixed adaptlettercase QUnit test Change-Id: Iecfe7e3e14064c5dea9a3ac070394601ab42c438 --- M ValueView/tests/qunit/jquery.util/jquery.util.adaptlettercase.tests.js 1 file changed, 4 insertions(+), 5 deletions(-) Approvals: Jeroen De Dauw: Looks good to me, approved diff --git a/ValueView/tests/qunit/jquery.util/jquery.util.adaptlettercase.tests.js b/ValueView/tests/qunit/jquery.util/jquery.util.adaptlettercase.tests.js index 932238a..6af0daa 100644 --- a/ValueView/tests/qunit/jquery.util/jquery.util.adaptlettercase.tests.js +++ b/ValueView/tests/qunit/jquery.util/jquery.util.adaptlettercase.tests.js @@ -41,11 +41,10 @@ 'No replacement taking place when not passing letters.' ); - assert.throws( - function() { - $.util.adaptlettercase( 'abc', '123', 'all' ); - }, - 'Error thrown when destination does not match source.' + assert.equal( + $.util.adaptlettercase( 'abc', '123', 'all' ), + 'abc', + 'Not performing any replacement if strings do not match.' ); } ); -- To view, visit https://gerrit.wikimedia.org/r/78250 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iecfe7e3e14064c5dea9a3ac070394601ab42c438 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: master Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Eliminate confusing redundancy in accmailtext - change (mediawiki/core)
Nemo bis has uploaded a new change for review. https://gerrit.wikimedia.org/r/78511 Change subject: Eliminate confusing redundancy in accmailtext .. Eliminate confusing redundancy in accmailtext It's the same password for the same account as mentioned in the line below; let's not add degrees of confusion. Change-Id: I6b434509b673b69ae96ea4581a5194fe4b0780ab --- M languages/messages/MessagesEn.php 1 file changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/11/78511/1 diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 75e3532..e68501f 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1434,9 +1434,7 @@ 'loginreqlink' = 'log in', 'loginreqpagetext' = 'You must $1 to view other pages.', 'accmailtitle' = 'Password sent', -'accmailtext' = A randomly generated password for [[User talk:$1|$1]] has been sent to $2. - -The password for this new account can be changed on the ''[[Special:ChangePassword|change password]]'' page upon logging in., +'accmailtext' = A randomly generated password for [[User talk:$1|$1]] has been sent to $2. It can be changed on the ''[[Special:ChangePassword|change password]]'' page upon logging in., 'newarticle' = '(New)', 'newarticletext' = You have followed a link to a page that does not exist yet. To create the page, start typing in the box below (see the [[{{MediaWiki:Helppage}}|help page]] for more info). -- To view, visit https://gerrit.wikimedia.org/r/78511 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6b434509b673b69ae96ea4581a5194fe4b0780ab Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Nemo bis federicol...@tiscali.it ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] typo fixed: User::getIntOption returns an integer, not a boo... - change (mediawiki/core)
Wikinaut has uploaded a new change for review. https://gerrit.wikimedia.org/r/78510 Change subject: typo fixed: User::getIntOption returns an integer, not a boolean .. typo fixed: User::getIntOption returns an integer, not a boolean Change-Id: Ied47f53ccf567ae8fcd047481d46d28c9960b549 --- M includes/User.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/10/78510/1 diff --git a/includes/User.php b/includes/User.php index 14a22d2..fedc6a9 100644 --- a/includes/User.php +++ b/includes/User.php @@ -2347,7 +2347,7 @@ } /** -* Get the user's current setting for a given option, as a boolean value. +* Get the user's current setting for a given option, as an integer value. * * @param string $oname The option to check * @param int $defaultOverride A default value returned if the option does not exist -- To view, visit https://gerrit.wikimedia.org/r/78510 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ied47f53ccf567ae8fcd047481d46d28c9960b549 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Wikinaut m...@tgries.de Gerrit-Reviewer: Wikinaut m...@tgries.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Just use You in userrights-notallowed - change (mediawiki/core)
Nemo bis has uploaded a new change for review. https://gerrit.wikimedia.org/r/78512 Change subject: Just use You in userrights-notallowed .. Just use You in userrights-notallowed Unnecessary complexity; inconsistent with messages using you just around this one. Change-Id: I18016bfca6f03dd484db749f6a9045c5876b779b --- M languages/messages/MessagesEn.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/12/78512/1 diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 75e3532..fe65059 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -2044,7 +2044,7 @@ 'userrights-no-interwiki'= 'You do not have permission to edit user rights on other wikis.', 'userrights-nodatabase' = 'Database $1 does not exist or is not local.', 'userrights-nologin' = 'You must [[Special:UserLogin|log in]] with an administrator account to assign user rights.', -'userrights-notallowed' = 'Your account does not have permission to add or remove user rights.', +'userrights-notallowed' = 'You do not have permission to add or remove user rights.', 'userrights-changeable-col' = 'Groups you can change', 'userrights-unchangeable-col'= 'Groups you cannot change', 'userrights-irreversible-marker' = '$1*', # only translate this message to other languages if you have to change it -- To view, visit https://gerrit.wikimedia.org/r/78512 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I18016bfca6f03dd484db749f6a9045c5876b779b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Nemo bis federicol...@tiscali.it ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] typo fixed: User::getIntOption returns an integer, not a boo... - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: typo fixed: User::getIntOption returns an integer, not a boolean .. typo fixed: User::getIntOption returns an integer, not a boolean Change-Id: Ied47f53ccf567ae8fcd047481d46d28c9960b549 --- M includes/User.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Wikinaut: Looks good to me, but someone else must approve Matmarex: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/User.php b/includes/User.php index 14a22d2..fedc6a9 100644 --- a/includes/User.php +++ b/includes/User.php @@ -2347,7 +2347,7 @@ } /** -* Get the user's current setting for a given option, as a boolean value. +* Get the user's current setting for a given option, as an integer value. * * @param string $oname The option to check * @param int $defaultOverride A default value returned if the option does not exist -- To view, visit https://gerrit.wikimedia.org/r/78510 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ied47f53ccf567ae8fcd047481d46d28c9960b549 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Wikinaut m...@tgries.de Gerrit-Reviewer: Brian Wolff bawolff...@gmail.com Gerrit-Reviewer: Matmarex matma@gmail.com Gerrit-Reviewer: Parent5446 tylerro...@gmail.com Gerrit-Reviewer: Wikinaut m...@tgries.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Refactor LinkTitlestest - change (mediawiki...Wikibase)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/78521 Change subject: Refactor LinkTitlestest .. Refactor LinkTitlestest Change-Id: Ifee6e2a3095f21f08f95ce0766ecd8b665214387 --- M repo/tests/phpunit/includes/api/LinkTitlesTest.php 1 file changed, 102 insertions(+), 112 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/21/78521/1 diff --git a/repo/tests/phpunit/includes/api/LinkTitlesTest.php b/repo/tests/phpunit/includes/api/LinkTitlesTest.php index 308ac9c..e7aae2c 100644 --- a/repo/tests/phpunit/includes/api/LinkTitlesTest.php +++ b/repo/tests/phpunit/includes/api/LinkTitlesTest.php @@ -4,7 +4,7 @@ use ApiTestCase; /** - * Tests for setting sitelinks throug from-to -pairs. + * Tests for setting sitelinks throug from-to-pairs. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -29,6 +29,7 @@ * * @licence GNU GPL v2+ * @author John Erling Blad jeb...@gmail.com + * @author Adam Shorland * * @group API * @group Wikibase @@ -58,132 +59,121 @@ self::$hasSetup = true; } - public function testLinkTitlesWithNoToken( ) { - if ( !self::$usetoken ) { - $this-markTestSkipped( tokens disabled ); - return; - } - - $req = array( - 'action' = 'wblinktitles', - 'fromsite' = enwiki, - 'fromtitle' = testLinkTitlesWithNoToken, - 'tosite' = enwiki, - 'totitle' = testLinkTitlesWithEvenLessToken, - ); - - $this-setExpectedException( 'UsageException' ); - $this-doApiRequest( $req, null, false, self::$users['wbeditor']-user ); - - } - public static function provideLinkTitles() { return array( - // Oslo should already exist, add nowiki - array( 'Oslo', // handle - array(), // by id - 'nnwiki', // already set - 'Oslo', - 'nowiki', // adding this one - 'Oslo', - ), - // Oslo should already exist, add svwiki - array( 'Oslo', // handle - array(), // by id - 'svwiki', // adding this one - 'Oslo', - 'nnwiki', // already set - 'Oslo', - ), - // Try to add two existing ones, should fail with a 'common-item' - array( 'Oslo', // handle - array(), // by id - 'nnwiki', // already set - 'Oslo', - 'nowiki', // already set - 'Oslo', - 'common-item' - ), - // Try to add an existing one from another item, should fail with a 'no-common-item' - array( 'Oslo', // handle - array(), // by id - 'nnwiki', // already set - 'Oslo', - 'nnwiki', // already set, from another item - 'Berlin', - 'no-common-item' - ), - // Try to add an existing one from another item, should fail with a 'no-common-item' - array( null, // handle - array(), // by id - 'nnwiki', // already set - 'Hammerfest', - 'nnwiki', // already set, from another item - 'Hammerfest', - 'fromsite-eq-tosite' - ), - // Try to add an existing one from another item, should fail with a 'no-common-item' - array( null, // handle - array(), // by id - 'nnwiki', // already set - 'Bergen', - 'nowiki', // already set, from another item - 'Bergen', - null, - true - ), + array( //0 add nowiki as fromsite + 'p' = array( 'tosite' = 'nnwiki', 'totitle' = 'Oslo',
[MediaWiki-commits] [Gerrit] Add setalias test which used to add empty aliases - change (mediawiki...Wikibase)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/78514 Change subject: Add setalias test which used to add empty aliases .. Add setalias test which used to add empty aliases Change-Id: I0ae5f48d823449a4138e0e388771190e29061384 --- M repo/tests/phpunit/includes/api/SetAliasesTest.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/14/78514/1 diff --git a/repo/tests/phpunit/includes/api/SetAliasesTest.php b/repo/tests/phpunit/includes/api/SetAliasesTest.php index f1bfa17..d0925a5 100644 --- a/repo/tests/phpunit/includes/api/SetAliasesTest.php +++ b/repo/tests/phpunit/includes/api/SetAliasesTest.php @@ -95,7 +95,7 @@ 'p' = array( 'language' = 'de', 'set' = 'hiya' ), 'e' = array( 'value' = array( 'en' = array( 'ohi' ), 'de' = array( 'hiya' ) ) ) ), array( //10 - 'p' = array( 'language' = 'de', 'add' = 'opps' ), + 'p' = array( 'language' = 'de', 'add' = '||oppsopps' ), 'e' = array( 'value' = array( 'en' = array( 'ohi' ), 'de' = array( 'hiya', 'opps' ) ) ) ), array( //11 'p' = array( 'language' = 'de', 'remove' = 'opps|hiya' ), -- To view, visit https://gerrit.wikimedia.org/r/78514 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0ae5f48d823449a4138e0e388771190e29061384 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Return normalized file name on warning exists-normalized - change (mediawiki/core)
Rillke has uploaded a new change for review. https://gerrit.wikimedia.org/r/78523 Change subject: Return normalized file name on warning exists-normalized .. Return normalized file name on warning exists-normalized Make API action=upload return normalized file name on warning exists-normalized instead of filename to be uploaded to. This enables humans to see which file the current upload conflicts with. There is no point in returning the filename the upload should go to because the client that makes the request is usually aware of this. Bug: 52699 Change-Id: I898b7f234d43eb1e524952f6de80e401a8c96671 --- M RELEASE-NOTES-1.22 M includes/api/ApiUpload.php 2 files changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/23/78523/1 diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22 index af467a0..93445ca 100644 --- a/RELEASE-NOTES-1.22 +++ b/RELEASE-NOTES-1.22 @@ -304,6 +304,8 @@ version of the title. * (bug 52538) action=edit will now use empty text instead of the contents of section 0 when passed prependtext or appendtext with section=new. +* (bug 52699) action=upload returns normalized file name on warning + exists-normalized instead of filename to be uploaded to. === Languages updated in 1.22=== diff --git a/includes/api/ApiUpload.php b/includes/api/ApiUpload.php index b903a62..cd59563 100644 --- a/includes/api/ApiUpload.php +++ b/includes/api/ApiUpload.php @@ -565,7 +565,8 @@ if ( isset( $warnings['exists'] ) ) { $warning = $warnings['exists']; unset( $warnings['exists'] ); - $warnings[$warning['warning']] = $warning['file']-getName(); + $fileName = isset( $warning['normalizedFile'] ) ? $warning['normalizedFile'] : $warning['file']; + $warnings[$warning['warning']] = $fileName-getName(); } } return $warnings; -- To view, visit https://gerrit.wikimedia.org/r/78523 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I898b7f234d43eb1e524952f6de80e401a8c96671 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Rillke rainerril...@hotmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Just use You in userrights-notallowed - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Just use You in userrights-notallowed .. Just use You in userrights-notallowed Unnecessary complexity; inconsistent with messages using you just around this one. Change-Id: I18016bfca6f03dd484db749f6a9045c5876b779b --- M languages/messages/MessagesEn.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Matmarex: Looks good to me, approved jenkins-bot: Verified diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 75e3532..fe65059 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -2044,7 +2044,7 @@ 'userrights-no-interwiki'= 'You do not have permission to edit user rights on other wikis.', 'userrights-nodatabase' = 'Database $1 does not exist or is not local.', 'userrights-nologin' = 'You must [[Special:UserLogin|log in]] with an administrator account to assign user rights.', -'userrights-notallowed' = 'Your account does not have permission to add or remove user rights.', +'userrights-notallowed' = 'You do not have permission to add or remove user rights.', 'userrights-changeable-col' = 'Groups you can change', 'userrights-unchangeable-col'= 'Groups you cannot change', 'userrights-irreversible-marker' = '$1*', # only translate this message to other languages if you have to change it -- To view, visit https://gerrit.wikimedia.org/r/78512 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I18016bfca6f03dd484db749f6a9045c5876b779b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Nemo bis federicol...@tiscali.it Gerrit-Reviewer: Matmarex matma@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove positional reference from createaccountmail - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Remove positional reference from createaccountmail .. Remove positional reference from createaccountmail https://www.mediawiki.org/wiki/Localisation#Avoid_references_to_screen_layout_and_positions Change-Id: I1a930fd402b5de020b7ad509e74a0f35638ba7f8 --- M languages/messages/MessagesEn.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Matmarex: Looks good to me, approved jenkins-bot: Verified diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 75e3532..91b1c60 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1147,7 +1147,7 @@ 'createacct-emailoptional'= 'Email address (optional)', 'createacct-email-ph' = 'Enter your email address', 'createacct-another-email-ph' = 'Enter email address', -'createaccountmail' = 'Use a temporary random password and send it to the email address specified below', +'createaccountmail' = 'Use a temporary random password and send it to the specified email address', 'createacct-realname' = 'Real name (optional)', 'createaccountreason' = 'Reason:', 'createacct-reason' = 'Reason', -- To view, visit https://gerrit.wikimedia.org/r/78509 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1a930fd402b5de020b7ad509e74a0f35638ba7f8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Nemo bis federicol...@tiscali.it Gerrit-Reviewer: Matmarex matma@gmail.com Gerrit-Reviewer: Parent5446 tylerro...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Clarify info action's search engine status - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Clarify info action's search engine status .. Clarify info action's search engine status We are using the word indexing anyway and I doubt the concept of internal vs. external search engine is any more complex than the concept of robot which also relates to robots.txt. Allowed or disallowed also seems appropriate, as it describes the permission without speaking of actual impossibility, though some describe it as preventing indexing. Examples: http://www.robotstxt.org/meta.html https://en.wikipedia.org/wiki/Noindex https://support.google.com/webmasters/answer/93710?hl=en http://googlewebmastercentral.blogspot.fi/2007/03/using-robots-meta-tag.html https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag http://www.w3.org/TR/html401/appendix/notes.html#h-B.4.1.2 Bug: 43935 Change-Id: I856767f9e4951b165b589a553dd84e35fc55822e --- M languages/messages/MessagesEn.php 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Matmarex: Looks good to me, approved jenkins-bot: Verified diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 75e3532..04a21a9 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -3869,9 +3869,9 @@ 'pageinfo-length' = 'Page length (in bytes)', 'pageinfo-article-id' = 'Page ID', 'pageinfo-language' = 'Page content language', -'pageinfo-robot-policy' = 'Search engine status', -'pageinfo-robot-index'= 'Indexable', -'pageinfo-robot-noindex' = 'Not indexable', +'pageinfo-robot-policy' = 'Indexing by robots', +'pageinfo-robot-index'= 'Allowed', +'pageinfo-robot-noindex' = 'Disallowed', 'pageinfo-views' = 'Number of views', 'pageinfo-watchers' = 'Number of page watchers', 'pageinfo-few-watchers' = 'Fewer than $1 {{PLURAL:$1|watcher|watchers}}', -- To view, visit https://gerrit.wikimedia.org/r/78413 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I856767f9e4951b165b589a553dd84e35fc55822e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Nemo bis federicol...@tiscali.it Gerrit-Reviewer: Matmarex matma@gmail.com Gerrit-Reviewer: Nemo bis federicol...@tiscali.it Gerrit-Reviewer: Parent5446 tylerro...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Limit when we log in for Api Tests - change (mediawiki...Wikibase)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/78520 Change subject: Limit when we log in for Api Tests .. Limit when we log in for Api Tests This cuts 50% of the run time from Api tests for me The last time I tried this change Travis complained Now that the test base has been refactored and Item ids are no longer really important this should work! Change-Id: Ib528385c31524390af458e5c02a000839d7795a2 --- M repo/tests/phpunit/includes/api/WikibaseApiTestCase.php 1 file changed, 8 insertions(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/20/78520/1 diff --git a/repo/tests/phpunit/includes/api/WikibaseApiTestCase.php b/repo/tests/phpunit/includes/api/WikibaseApiTestCase.php index 76bf209..88605a9 100644 --- a/repo/tests/phpunit/includes/api/WikibaseApiTestCase.php +++ b/repo/tests/phpunit/includes/api/WikibaseApiTestCase.php @@ -53,22 +53,11 @@ protected static $loginUser = null; protected static $token = null; - protected $setUpComplete = false; - - protected function isSetUp() { - return $this-setUpComplete; - } - public function setUp() { global $wgUser; parent::setUp(); - static $hasSites = false; - - if ( !$hasSites ) { - \TestSites::insertIntoDb(); - $hasSites = true; - } + static $isSetup = false; self::$usepost = Settings::get( 'apiInDebug' ) ? Settings::get( 'apiDebugWithPost' ) : true; self::$usetoken = Settings::get( 'apiInDebug' ) ? Settings::get( 'apiDebugWithTokens' ) : true; @@ -83,13 +72,17 @@ $wgUser = self::$users['wbeditor']-user; - $this-login(); + if ( !$isSetup ) { + \TestSites::insertIntoDb(); + + $this-login(); + + $isSetup = true; + } //TODO: preserve session and token between calls?! self::$loginSession = false; self::$token = false; - - $this-setUpComplete = true; } /** -- To view, visit https://gerrit.wikimedia.org/r/78520 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib528385c31524390af458e5c02a000839d7795a2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move queryExceptionTest to ApiTestBase - change (mediawiki...Wikibase)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/78522 Change subject: Move queryExceptionTest to ApiTestBase .. Move queryExceptionTest to ApiTestBase This makes sense as all api queries can throw these exceptions and the format of the check is always the same Change-Id: I476bfed19f8aadb48ff8ca2de192bc2d5410a21d --- M repo/tests/phpunit/includes/api/LangAttributeTestCase.php M repo/tests/phpunit/includes/api/LinkTitlesTest.php M repo/tests/phpunit/includes/api/WikibaseApiTestCase.php 3 files changed, 33 insertions(+), 56 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/22/78522/1 diff --git a/repo/tests/phpunit/includes/api/LangAttributeTestCase.php b/repo/tests/phpunit/includes/api/LangAttributeTestCase.php index 1f0e849..b45f8b9 100644 --- a/repo/tests/phpunit/includes/api/LangAttributeTestCase.php +++ b/repo/tests/phpunit/includes/api/LangAttributeTestCase.php @@ -194,34 +194,7 @@ if( !array_key_exists( 'id', $params ) !array_key_exists( 'site', $params ) !array_key_exists( 'title', $params ) ){ $params['id'] = EntityTestHelper::getId( 'Empty' ); } - - // -- catch and check expected exceptions - - try{ - if( $expected['exception']['code'] == 'badtoken' ){ - if ( !self::$usetoken ) { - $this-markTestSkipped( tokens disabled ); - } - $this-doApiRequest( $params ); - } else { - $this-doApiRequestWithToken( $params ); - } - $this-fail( Failed to throw exception, {$expected['exception']['type']} ); - - } catch( \Exception $exception ){ - - /** @var $exception \UsageException */ // trick IDEs into not showing errors - if( array_key_exists( 'type', $expected['exception'] ) ){ - $this-assertInstanceOf( $expected['exception']['type'], $exception ); - } - - if( array_key_exists( 'code', $expected['exception'] ) ){ - $this-assertEquals( $expected['exception']['code'], $exception-getCodeString() ); - } - - if( array_key_exists( 'message', $expected['exception'] ) ){ - $this-assertContains( $expected['exception']['message'], $exception-getMessage() ); - } - } + $this-doTestQueryExceptions( $params, $expected['exception'] ); } } diff --git a/repo/tests/phpunit/includes/api/LinkTitlesTest.php b/repo/tests/phpunit/includes/api/LinkTitlesTest.php index e7aae2c..bd3404e 100644 --- a/repo/tests/phpunit/includes/api/LinkTitlesTest.php +++ b/repo/tests/phpunit/includes/api/LinkTitlesTest.php @@ -147,34 +147,7 @@ public function testLinkTitlesExceptions( $params, $expected ){ // -- set any defaults $params['action'] = 'wblinktitles'; - - // -- catch and check expected exceptions - - try{ - if( $expected['exception']['code'] == 'badtoken' ){ - if ( !self::$usetoken ) { - $this-markTestSkipped( tokens disabled ); - } - $this-doApiRequest( $params ); - } else { - $this-doApiRequestWithToken( $params ); - } - $this-fail( Failed to throw exception, {$expected['exception']['type']} ); - - } catch( \Exception $exception ){ - - /** @var $exception \UsageException */ // trick IDEs into not showing errors - if( array_key_exists( 'type', $expected['exception'] ) ){ - $this-assertInstanceOf( $expected['exception']['type'], $exception ); - } - - if( array_key_exists( 'code', $expected['exception'] ) ){ - $this-assertEquals( $expected['exception']['code'], $exception-getCodeString() ); - } - - if( array_key_exists( 'message', $expected['exception'] ) ){ - $this-assertContains( $expected['exception']['message'], $exception-getMessage() ); - } - } + $this-doTestQueryExceptions( $params, $expected['exception'] ); } } diff --git
[MediaWiki-commits] [Gerrit] Make and use a method for asserting html elements - change (mediawiki...Wikibase)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/78515 Change subject: Make and use a method for asserting html elements .. Make and use a method for asserting html elements This should make creating simple tests for special pages a bit nicer! Change-Id: I297a4431dd9ce42bc80ab12d17f77a51f65cad66 --- M lib/tests/phpunit/specials/SpecialPageTestBase.php M repo/tests/phpunit/includes/specials/SpecialItemByTitleTest.php M repo/tests/phpunit/includes/specials/SpecialItemDisambiguationTest.php M repo/tests/phpunit/includes/specials/SpecialNewItemTest.php M repo/tests/phpunit/includes/specials/SpecialNewPropertyTest.php 5 files changed, 130 insertions(+), 28 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/15/78515/1 diff --git a/lib/tests/phpunit/specials/SpecialPageTestBase.php b/lib/tests/phpunit/specials/SpecialPageTestBase.php index 5ec8067..6e0b310 100644 --- a/lib/tests/phpunit/specials/SpecialPageTestBase.php +++ b/lib/tests/phpunit/specials/SpecialPageTestBase.php @@ -29,6 +29,7 @@ * @licence GNU GPL v2+ * @author Jeroen De Dauw jeroended...@gmail.com * @author Daniel Kinzler + * @author Adam Shorland */ abstract class SpecialPageTestBase extends \MediaWikiTestCase { @@ -53,10 +54,6 @@ parent::tearDown(); } - - //public function testConstructor() { - //$this-assertInstanceOf( 'SpecialPage', new \SpecialItemDisambiguation() ); - //} /** * Returns a new instance of the special page under test. @@ -126,4 +123,19 @@ return array( $text, $response ); } + /** +* Uses regex to assert that the given tag exists in a string +* @param $text string to check +* @param $tag string name of tag +* @param $elements array list of html element and value +*/ + protected function assertHasHtmlTagWithElements( $text, $tag, $elements ){ + $parts = array(); + foreach( $elements as $parm = $value ){ + $parts[] = preg_quote({$parm}=\{$value}\); + } + $this-assertRegExp( '/'.$tag.'([^]*?('.implode( '|', $parts ).')[^]*?){'.count( $parts ).'}/' , + $text, Missing {$tag} tag in text ); + } + } diff --git a/repo/tests/phpunit/includes/specials/SpecialItemByTitleTest.php b/repo/tests/phpunit/includes/specials/SpecialItemByTitleTest.php index c9492b3..e2d2c31 100644 --- a/repo/tests/phpunit/includes/specials/SpecialItemByTitleTest.php +++ b/repo/tests/phpunit/includes/specials/SpecialItemByTitleTest.php @@ -33,6 +33,7 @@ * @licence GNU GPL v2+ * @author Jeroen De Dauw jeroended...@gmail.com * @author Daniel Kinzler + * @author Adam Shorland */ class SpecialItemByTitleTest extends SpecialPageTestBase { @@ -41,14 +42,35 @@ } public function testExecute() { - //TODO: Actually verify that the output is correct. - // Currently this just tests that there is no fatal error. + //TODO: Verify that more of the output is correct. + + $expectedInputs = array( + 'site' = array( + 'id' = 'wb-itembytitle-sitename', + 'name' = 'site' ), + 'pagename' = array( + 'id' = 'pagename', + 'class' = 'wb-input-text', + 'name' = 'page' ), + 'submit' = array( + 'id' = 'wb-itembytitle-submit', + 'class' = 'wb-input-button', + 'type' = 'submit', + 'name' = 'submit' ), + ); list( $output, ) = $this-executeSpecialPage( '' ); - $this-assertTrue( true, 'Calling execute without any subpage value' ); + // -- Make sure the special page loads with expected input fields + foreach( $expectedInputs as $expected ){ + $this-assertHasHtmlTagWithElements( $output, 'input', $expected ); + } - list( $output, ) = $this-executeSpecialPage( 'en/oHai' ); - $this-assertTrue( true, 'Calling execute with a subpage value' ); //TODO: assert output + list( $output, ) = $this-executeSpecialPage( 'SiteText/PageText' ); + // -- Make sure the subpage values have been passed to the correct input fields + $this-assertHasHtmlTagWithElements( $output, 'input', + array_merge( $expectedInputs['site'], array( 'value' = 'SiteText' ) ) ); + $this-assertHasHtmlTagWithElements( $output, 'input', +
[MediaWiki-commits] [Gerrit] Fix undefined offset when loading special page - change (mediawiki...Wikibase)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/78516 Change subject: Fix undefined offset when loading special page .. Fix undefined offset when loading special page This was caught by the tests I have added in the follow up commit Change-Id: I85271ade7711f1138b1f25777e1a7f99855d0e2a --- M repo/includes/specials/SpecialEntitiesWithoutLabel.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/16/78516/1 diff --git a/repo/includes/specials/SpecialEntitiesWithoutLabel.php b/repo/includes/specials/SpecialEntitiesWithoutLabel.php index 19f1205..185a8e9 100644 --- a/repo/includes/specials/SpecialEntitiesWithoutLabel.php +++ b/repo/includes/specials/SpecialEntitiesWithoutLabel.php @@ -67,7 +67,7 @@ $this-type = null; if ( $subPage !== null ) { $parts = explode( '/', $subPage ); - if ( count( $parts = 2 ) ) { + if ( array_key_exists( 1, $parts ) ) { $this-type = $parts[1]; } $this-language = $parts[0]; -- To view, visit https://gerrit.wikimedia.org/r/78516 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I85271ade7711f1138b1f25777e1a7f99855d0e2a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix incorrect class in SpecialSetEntity page - change (mediawiki...Wikibase)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/78518 Change subject: Fix incorrect class in SpecialSetEntity page .. Fix incorrect class in SpecialSetEntity page Change-Id: If87790d313686492794fac825f4be8c1aa7cd9ec --- M repo/includes/specials/SpecialSetEntity.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/18/78518/1 diff --git a/repo/includes/specials/SpecialSetEntity.php b/repo/includes/specials/SpecialSetEntity.php index 45028f0..8481f39 100644 --- a/repo/includes/specials/SpecialSetEntity.php +++ b/repo/includes/specials/SpecialSetEntity.php @@ -160,7 +160,7 @@ $this-value, 'text', array( - 'class' = 'wb-input wb-input-text', + 'class' = 'wb-input', 'id' = 'wb-setentity-value', 'size' = 50 ) -- To view, visit https://gerrit.wikimedia.org/r/78518 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If87790d313686492794fac825f4be8c1aa7cd9ec Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add basic tests for special pages missing them - change (mediawiki...Wikibase)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/78517 Change subject: Add basic tests for special pages missing them .. Add basic tests for special pages missing them Change-Id: Ib0baec4cc05ebb921708f721fd25bc775b693963 --- A repo/tests/phpunit/includes/specials/SpecialEntitiesWithoutLabelTest.php A repo/tests/phpunit/includes/specials/SpecialItemsWithoutSitelinksTest.php A repo/tests/phpunit/includes/specials/SpecialListDatatypesTest.php 3 files changed, 162 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/17/78517/1 diff --git a/repo/tests/phpunit/includes/specials/SpecialEntitiesWithoutLabelTest.php b/repo/tests/phpunit/includes/specials/SpecialEntitiesWithoutLabelTest.php new file mode 100644 index 000..f570b99 --- /dev/null +++ b/repo/tests/phpunit/includes/specials/SpecialEntitiesWithoutLabelTest.php @@ -0,0 +1,54 @@ +?php + +namespace Wikibase\Test; +use SpecialEntitiesWithoutLabel; + +/** + * Tests for the SpecialEntitiesWithoutLabel class. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/gpl.html + * + * @file + * @since 0.4 + * + * @ingroup WikibaseRepoTest + * @ingroup Test + * + * @group Wikibase + * @group SpecialPage + * @group WikibaseSpecialPage + * + * @licence GNU GPL v2+ + * @author Adam Shorland + */ +class SpecialEntitiesWithoutLabelTest extends SpecialPageTestBase { + + protected function newSpecialPage() { + return new SpecialEntitiesWithoutLabel(); + } + + public function testExecute() { + //TODO: Actually verify that the output is correct. + // Currently this just tests that there is no fatal error, + // and that the restriction handling is working and doesn't + // block. That is, the default should let the user execute + // the page. + + list( $output, ) = $this-executeSpecialPage( '' ); + $this-assertTrue( true, 'Calling execute without any subpage value' ); + } + +} \ No newline at end of file diff --git a/repo/tests/phpunit/includes/specials/SpecialItemsWithoutSitelinksTest.php b/repo/tests/phpunit/includes/specials/SpecialItemsWithoutSitelinksTest.php new file mode 100644 index 000..4328069 --- /dev/null +++ b/repo/tests/phpunit/includes/specials/SpecialItemsWithoutSitelinksTest.php @@ -0,0 +1,54 @@ +?php + +namespace Wikibase\Test; +use SpecialItemsWithoutSitelinks; + +/** + * Tests for the SpecialItemsWithoutSitelinks class. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/gpl.html + * + * @file + * @since 0.4 + * + * @ingroup WikibaseRepoTest + * @ingroup Test + * + * @group Wikibase + * @group SpecialPage + * @group WikibaseSpecialPage + * + * @licence GNU GPL v2+ + * @author Adam Shorland + */ +class SpecialItemsWithoutSitelinksTest extends SpecialPageTestBase { + + protected function newSpecialPage() { + return new SpecialItemsWithoutSitelinks(); + } + + public function testExecute() { + //TODO: Actually verify that the output is correct. + // Currently this just tests that there is no fatal error, + // and that the restriction handling is working and doesn't + // block. That is, the default should let the user execute + // the page. + + list( $output, ) = $this-executeSpecialPage( '' ); +
[MediaWiki-commits] [Gerrit] Make logout text simpler and more general - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Make logout text simpler and more general .. Make logout text simpler and more general By removing one sentence that is not true on private wikis. Per Siebrand on previous patch, better simplify the logout interface than make it heavier. Bug: 33439 Change-Id: I1f02d4ba6981b34aa2ff16a0c6632e0b58b23bb4 --- M languages/messages/MessagesEn.php 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Matmarex: Looks good to me, approved jenkins-bot: Verified diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 75e3532..7fb8ba6 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1097,7 +1097,6 @@ # Login and logout pages 'logouttext' = '''You are now logged out.''' -You can continue to use {{SITENAME}} anonymously, or you can span class='plainlinks'[$1 log in again]/span as the same or as a different user. Note that some pages may continue to be displayed as if you were still logged in, until you clear your browser cache., 'welcomeuser' = 'Welcome, $1!', 'welcomecreation-msg' = 'Your account has been created. -- To view, visit https://gerrit.wikimedia.org/r/78376 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1f02d4ba6981b34aa2ff16a0c6632e0b58b23bb4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Nemo bis federicol...@tiscali.it Gerrit-Reviewer: Alex Monk kren...@gmail.com Gerrit-Reviewer: Matmarex matma@gmail.com Gerrit-Reviewer: Parent5446 tylerro...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove profileOuts that dont have a mathing IN - change (mediawiki...Wikibase)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/78513 Change subject: Remove profileOuts that dont have a mathing IN .. Remove profileOuts that dont have a mathing IN Change-Id: Ic183b8107429f96fa141f420b55773d87992ba67 --- M repo/includes/api/EditEntity.php M repo/includes/api/LinkTitles.php 2 files changed, 0 insertions(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/13/78513/1 diff --git a/repo/includes/api/EditEntity.php b/repo/includes/api/EditEntity.php index cc8c9c0..f10cb03 100644 --- a/repo/includes/api/EditEntity.php +++ b/repo/includes/api/EditEntity.php @@ -190,7 +190,6 @@ $labelChangeOps = array(); if ( !is_array( $labels ) ) { - wfProfileOut( __METHOD__ ); $this-dieUsage( List of labels must be an array, 'not-recognized-array' ); } @@ -223,7 +222,6 @@ $descriptionChangeOps = array(); if ( !is_array( $descriptions ) ) { - wfProfileOut( __METHOD__ ); $this-dieUsage( List of descriptions must be an array, 'not-recognized-array' ); } @@ -256,7 +254,6 @@ $aliasesChangeOps = array(); if ( !is_array( $aliases ) ) { - wfProfileOut( __METHOD__ ); $this-dieUsage( List of aliases must be an array, 'not-recognized-array' ); } @@ -296,7 +293,6 @@ } if ( !$status-isOk() ) { - wfProfileOut( __METHOD__ ); $this-dieUsage( Contained status: $1, $status-getWikiText() ); } @@ -315,7 +311,6 @@ $siteLinksChangeOps = array(); if ( !is_array( $siteLinks ) ) { - wfProfileOut( __METHOD__ ); $this-dieUsage( List of sitelinks must be an array, 'not-recognized-array' ); } @@ -328,7 +323,6 @@ if ( $sites-hasSite( $globalSiteId ) ) { $linkSite = $sites-getSite( $globalSiteId ); } else { - wfProfileOut( __METHOD__ ); $this-dieUsage( There is no site for global site id '$globalSiteId', 'no-such-site' ); } @@ -338,7 +332,6 @@ $linkPage = $linkSite-normalizePageName( $this-stringNormalizer-trimWhitespace( $arg['title'] ) ); if ( $linkPage === false ) { - wfProfileOut( __METHOD__ ); $this-dieUsage( 'The external client site did not provide page information' , 'no-external-page' ); } @@ -382,12 +375,10 @@ 'datatype' ); if ( is_null( $data ) ) { - wfProfileOut( __METHOD__ ); $this-dieUsage( 'Invalid json: The supplied JSON structure could not be parsed or recreated as a valid structure' , 'invalid-json' ); } if ( !is_array( $data ) ) { // NOTE: json_decode will decode any JS literal or structure, not just objects! - wfProfileOut( __METHOD__ ); $this-dieUsage( 'Top level structure must be a JSON object', 'not-recognized-array' ); } @@ -403,20 +394,16 @@ // conditional processing if ( isset( $data['pageid'] ) ( is_object( $page ) ? $page-getId() !== $data['pageid'] : true ) ) { - wfProfileOut( __METHOD__ ); $this-dieUsage( 'Illegal field used in call: pageid', 'param-illegal' ); } // not completely convinced that we can use title to get the namespace in this case if ( isset( $data['ns'] ) ( is_object( $title ) ? $title-getNamespace() !== $data['ns'] : true ) ) { - wfProfileOut( __METHOD__ ); $this-dieUsage( 'Illegal field used in call: namespace', 'param-illegal' ); } if ( isset( $data['title'] ) ( is_object( $title ) ? $title-getPrefixedText() !== $data['title'] : true ) ) { - wfProfileOut( __METHOD__ ); $this-dieUsage( 'Illegal field used in call: title', 'param-illegal' ); } if ( isset( $data['lastrevid'] ) ( is_object( $revision ) ? $revision-getId() !== $data['lastrevid'] : true ) ) { - wfProfileOut( __METHOD__ ); $this-dieUsage( 'Illegal field used in call: lastrevid', 'param-illegal' ); }
[MediaWiki-commits] [Gerrit] Make two info action row headers plural-compatible and consi... - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Make two info action row headers plural-compatible and consistent .. Make two info action row headers plural-compatible and consistent Plural support was asked, but as it is a table it makes more sense to just align them to the Number of X style of the other rows. Bug: 48634 Change-Id: I32a760e59a3c86b5baa6096e0a28e8b4681f4a3f --- M languages/messages/MessagesEn.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Matmarex: Looks good to me, approved jenkins-bot: Verified diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 75e3532..98de99c 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -3875,9 +3875,9 @@ 'pageinfo-views' = 'Number of views', 'pageinfo-watchers' = 'Number of page watchers', 'pageinfo-few-watchers' = 'Fewer than $1 {{PLURAL:$1|watcher|watchers}}', -'pageinfo-redirects-name' = 'Redirects to this page', +'pageinfo-redirects-name' = 'Number of redirects to this page', 'pageinfo-redirects-value'= '$1', # only translate this message to other languages if you have to change it -'pageinfo-subpages-name' = 'Subpages of this page', +'pageinfo-subpages-name' = 'Number of subpages of this page', 'pageinfo-subpages-value' = '$1 ($2 {{PLURAL:$2|redirect|redirects}}; $3 {{PLURAL:$3|non-redirect|non-redirects}})', 'pageinfo-firstuser' = 'Page creator', 'pageinfo-firsttime' = 'Date of page creation', -- To view, visit https://gerrit.wikimedia.org/r/78371 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I32a760e59a3c86b5baa6096e0a28e8b4681f4a3f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Nemo bis federicol...@tiscali.it Gerrit-Reviewer: Matmarex matma@gmail.com Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Siebrand siebr...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Clarify userrights-conflict - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Clarify userrights-conflict .. Clarify userrights-conflict Spotted by Nikerabbit: https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Userrights-conflict/fi Change-Id: Iaa519a063dd6b24226db82aed7163903b0b7b02b --- M languages/messages/MessagesEn.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Matmarex: Looks good to me, approved jenkins-bot: Verified diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index b525465..a8a588c 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -2043,7 +2043,7 @@ 'userrights-changeable-col' = 'Groups you can change', 'userrights-unchangeable-col'= 'Groups you cannot change', 'userrights-irreversible-marker' = '$1*', # only translate this message to other languages if you have to change it -'userrights-conflict'= 'User rights conflict! Please apply your changes again.', +'userrights-conflict'= 'Conflict of user rights changes! Please review and confirm your changes.', 'userrights-removed-self'= 'You successfully removed your own rights. As such, you are no longer able to access this page.', # Groups -- To view, visit https://gerrit.wikimedia.org/r/76293 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iaa519a063dd6b24226db82aed7163903b0b7b02b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Nemo bis federicol...@tiscali.it Gerrit-Reviewer: Matmarex matma@gmail.com Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Siebrand siebr...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add basic inputfield tests for Set* Specialpages - change (mediawiki...Wikibase)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/78519 Change subject: Add basic inputfield tests for Set* Specialpages .. Add basic inputfield tests for Set* Specialpages SetAliases,SetDescription,SetLabel,SetSitelink Change-Id: If6fb2bab0bbaac39176dd0a39bf02ee6b76b7dfc --- M repo/tests/phpunit/includes/specials/SpecialSetAliasesTest.php M repo/tests/phpunit/includes/specials/SpecialSetDescriptionTest.php M repo/tests/phpunit/includes/specials/SpecialSetLabelTest.php A repo/tests/phpunit/includes/specials/SpecialSetSitelinkTest.php 4 files changed, 155 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/19/78519/2 diff --git a/repo/tests/phpunit/includes/specials/SpecialSetAliasesTest.php b/repo/tests/phpunit/includes/specials/SpecialSetAliasesTest.php index 2307e95..114d7a4 100644 --- a/repo/tests/phpunit/includes/specials/SpecialSetAliasesTest.php +++ b/repo/tests/phpunit/includes/specials/SpecialSetAliasesTest.php @@ -48,8 +48,32 @@ //TODO: Verify that item creation works via a faux post request + $expectedInputs = array( + 'id' = array( + 'id' = 'wb-setentity-id', + 'class' = 'wb-input', + 'name' = 'id' ), + 'language' = array( + 'id' = 'wb-setentity-language', + 'class' = 'wb-input', + 'name' = 'language' ), + 'value' = array( + 'id' = 'wb-setentity-value', + //@todo the below class does not look correct + 'class' = 'wb-input', + 'name' = 'value' ), + 'submit' = array( + 'id' = 'wb-setaliases-submit', + 'class' = 'wb-button', + 'type' = 'submit', + 'name' = 'wikibase-setaliases-submit' ), + ); + list( $output, ) = $this-executeSpecialPage( '' ); - $this-assertTrue( true, 'Calling execute without any subpage value' ); + + foreach( $expectedInputs as $input ){ + $this-assertHasHtmlTagWithElements( $output, 'input', $input ); + } } } \ No newline at end of file diff --git a/repo/tests/phpunit/includes/specials/SpecialSetDescriptionTest.php b/repo/tests/phpunit/includes/specials/SpecialSetDescriptionTest.php index 7751712..459cb34 100644 --- a/repo/tests/phpunit/includes/specials/SpecialSetDescriptionTest.php +++ b/repo/tests/phpunit/includes/specials/SpecialSetDescriptionTest.php @@ -48,8 +48,32 @@ //TODO: Verify that item creation works via a faux post request + $expectedInputs = array( + 'id' = array( + 'id' = 'wb-setentity-id', + 'class' = 'wb-input', + 'name' = 'id' ), + 'language' = array( + 'id' = 'wb-setentity-language', + 'class' = 'wb-input', + 'name' = 'language' ), + 'value' = array( + 'id' = 'wb-setentity-value', + //@todo the below class does not look correct + 'class' = 'wb-input', + 'name' = 'value' ), + 'submit' = array( + 'id' = 'wb-setdescription-submit', + 'class' = 'wb-button', + 'type' = 'submit', + 'name' = 'wikibase-setdescription-submit' ), + ); + list( $output, ) = $this-executeSpecialPage( '' ); - $this-assertTrue( true, 'Calling execute without any subpage value' ); + + foreach( $expectedInputs as $input ){ + $this-assertHasHtmlTagWithElements( $output, 'input', $input ); + } } } \ No newline at end of file diff --git a/repo/tests/phpunit/includes/specials/SpecialSetLabelTest.php b/repo/tests/phpunit/includes/specials/SpecialSetLabelTest.php index 762e69a..67f344e 100644 --- a/repo/tests/phpunit/includes/specials/SpecialSetLabelTest.php +++ b/repo/tests/phpunit/includes/specials/SpecialSetLabelTest.php @@ -48,8 +48,32 @@ //TODO: Verify that item creation works via a faux post request + $expectedInputs = array( + 'id' = array( + 'id' =
[MediaWiki-commits] [Gerrit] Remove incorrect documentation - change (mediawiki...DataValues)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/78524 Change subject: Remove incorrect documentation .. Remove incorrect documentation Change-Id: I443d5c8661f704200b30e6bc583f5bdd7de98b12 --- M DataValues/includes/DataValue.php 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues refs/changes/24/78524/1 diff --git a/DataValues/includes/DataValue.php b/DataValues/includes/DataValue.php index a9d23d7..b688434 100644 --- a/DataValues/includes/DataValue.php +++ b/DataValues/includes/DataValue.php @@ -17,7 +17,6 @@ /** * Returns the identifier of the datavalues type. -* This should be the same value as the key in $wgDataValues. * * This is not to be confused with the DataType provided by the DataTypes extension. * -- To view, visit https://gerrit.wikimedia.org/r/78524 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I443d5c8661f704200b30e6bc583f5bdd7de98b12 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove incorrect documentation - change (mediawiki...DataValues)
Addshore has submitted this change and it was merged. Change subject: Remove incorrect documentation .. Remove incorrect documentation Change-Id: I443d5c8661f704200b30e6bc583f5bdd7de98b12 --- M DataValues/includes/DataValue.php 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Addshore: Looks good to me, approved diff --git a/DataValues/includes/DataValue.php b/DataValues/includes/DataValue.php index a9d23d7..b688434 100644 --- a/DataValues/includes/DataValue.php +++ b/DataValues/includes/DataValue.php @@ -17,7 +17,6 @@ /** * Returns the identifier of the datavalues type. -* This should be the same value as the key in $wgDataValues. * * This is not to be confused with the DataType provided by the DataTypes extension. * -- To view, visit https://gerrit.wikimedia.org/r/78524 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I443d5c8661f704200b30e6bc583f5bdd7de98b12 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Addshore addshorew...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Change title whitelist to title blacklist - change (pywikibot/core)
Merlijn van Deen has uploaded a new change for review. https://gerrit.wikimedia.org/r/78525 Change subject: Change title whitelist to title blacklist .. Change title whitelist to title blacklist Titles with characters outside the BMP [1] (\u) are now no longer detected as illegal. See this thread: [2] [1] https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_Multilingual_Plane [2] http://thread.gmane.org/gmane.comp.python.pywikipediabot.general/13197/ This list of characters was generated by using the old re and by enumerating characters: import re m = re.compile(u'''[^ %!\$'()*,\\-.\\/0-9:;=?@A-Z^_`a-z~\u0080-\u+]''') for x in range(0,0x80): if m.match(unichr(x)): print %x % x, 0 1 2 3 4 5 6 7 8 9 a b c d e f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 23 3c 3e 5b 5d 7b 7c 7d 7f Change-Id: I02c26be9ad814ce11d9adf2f997d3d1e05764fd1 --- M pywikibot/page.py 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/25/78525/1 diff --git a/pywikibot/page.py b/pywikibot/page.py index e51977c..2c346b5 100644 --- a/pywikibot/page.py +++ b/pywikibot/page.py @@ -2853,8 +2853,8 @@ illegal_titles_pattern = re.compile( -# Matching titles will be held as illegal. -u'''[^ %!\$'()*,\\-.\\/0-9:;=?@A-Z^_`a-z~\u0080-\u+]''' +# Matching titles will be held as illegal. +ur'''[\x00-\x1f\x23\x3c\x3e\x5b\x5d\x7b-\x7f]''' # URL percent encoding sequences interfere with the ability # to round-trip titles -- you can't link to them consistently. u'|%[0-9A-Fa-f]{2}' -- To view, visit https://gerrit.wikimedia.org/r/78525 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I02c26be9ad814ce11d9adf2f997d3d1e05764fd1 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Merlijn van Deen valhall...@arctus.nl ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Minor code cleanup - change (mediawiki...LdapAuthentication)
jenkins-bot has submitted this change and it was merged. Change subject: Minor code cleanup .. Minor code cleanup Change-Id: Id425b316617c38c19f2d10d23d41814a71215a60 --- M LdapAuthentication.php 1 file changed, 17 insertions(+), 20 deletions(-) Approvals: Reedy: Looks good to me, approved jenkins-bot: Verified diff --git a/LdapAuthentication.php b/LdapAuthentication.php index a3c538f..7e5b4c3 100644 --- a/LdapAuthentication.php +++ b/LdapAuthentication.php @@ -237,7 +237,7 @@ * @param $ldapconn * @param $basedn * @param $filter -* @param null $attributes +* @param array|null $attributes * @param null $attrsonly * @param null $sizelimit * @param null $timelimit @@ -256,7 +256,7 @@ * @param $ldapconn * @param $basedn * @param $filter -* @param null $attributes +* @param array|null $attributes * @param null $attrsonly * @param null $sizelimit * @param null $timelimit @@ -275,7 +275,7 @@ * @param $ldapconn * @param $basedn * @param $filter -* @param null $attributes +* @param array|null $attributes * @param null $attrsonly * @param null $sizelimit * @param null $timelimit @@ -331,6 +331,7 @@ * Get configuration defined by admin, or return default value * * @param string $preference +* @param string $domain * @return mixed */ public function getConf( $preference, $domain='' ) { @@ -713,7 +714,7 @@ $this-getGroups( $username ); - if ( !$this-checkGroups( $username ) ) { + if ( !$this-checkGroups() ) { LdapAuthenticationPlugin::ldap_unbind( $this-ldapconn ); $this-markAuthFailed(); return false; @@ -835,6 +836,7 @@ // Blank out the password in the database. We don't want to save // domain credentials for security reasons. + // This doesn't do anything. $password isn't by reference $password = ''; $success = LdapAuthenticationPlugin::ldap_modify( $this-ldapconn, $this-userdn, $values ); @@ -964,11 +966,7 @@ * it will cause MediaWiki to leak LDAP passwords into the local database. */ public function allowSetLocalPassword() { - if ( $this-getConf( 'UseLocal') ) { - return true; - } else { - return false; - } + return $this-getConf( 'UseLocal'); } /** @@ -1236,11 +1234,11 @@ if ( $this-authFailed ) { $this-printDebug( User didn't successfully authenticate, exiting., NONSENSITIVE ); - return null; + return; } if ( 'local' == $this-getDomain() ) { $this-printDebug( User is using a local domain, NONSENSITIVE ); - return null; + return; } // The update user function does everything else we need done. @@ -1363,10 +1361,11 @@ * This function will set $this-LDAPUsername * * @param string $username +* @param bool $bind +* @param string $searchattr * @return string -* @access private */ - function getUserDN( $username, $bind=false, $searchattr='' ) { + private function getUserDN( $username, $bind=false, $searchattr='' ) { $this-printDebug( Entering getUserDN, NONSENSITIVE ); if ( $bind ) { // This is a proxy bind, or an anonymous bind with a search @@ -1500,11 +1499,9 @@ /** * Checks to see whether a user is in a required group. * -* @param string $username * @return bool -* @access private */ - function checkGroups( $username ) { + private function checkGroups() { $this-printDebug( Entering checkGroups, NONSENSITIVE ); $excgroups = $this-getConf( 'ExcludedGroups' ); @@ -1817,8 +1814,9 @@ $this-printDebug( Adding all groups to wgGroupPermissions: , SENSITIVE, $this-allLDAPGroups ); foreach ( $this-allLDAPGroups[short] as $ldapgroup ) { - if ( !array_key_exists( $ldapgroup, $wgGroupPermissions ) ) - $wgGroupPermissions[$ldapgroup] = array(); + if ( !array_key_exists( $ldapgroup, $wgGroupPermissions ) ) { +
[MediaWiki-commits] [Gerrit] Minor code tweaks - change (mediawiki...CodeReview)
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/78530 Change subject: Minor code tweaks .. Minor code tweaks Boolean simplification and braces Change-Id: I2e8a4fe244e030c230a1aeb595ca056160b7f90d --- M backend/CodeRepository.php M backend/CodeRevision.php M backend/Subversion.php M ui/CodeRevisionView.php 4 files changed, 5 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CodeReview refs/changes/30/78530/1 diff --git a/backend/CodeRepository.php b/backend/CodeRepository.php index 122a29c..43607dc 100644 --- a/backend/CodeRepository.php +++ b/backend/CodeRepository.php @@ -454,10 +454,7 @@ */ public function isValidRev( $rev ) { $rev = intval( $rev ); - if ( $rev 0 $rev = $this-getLastStoredRev() ) { - return true; - } - return false; + return ( $rev 0 $rev = $this-getLastStoredRev() ); } /** diff --git a/backend/CodeRevision.php b/backend/CodeRevision.php index a53b746..658c2bb 100644 --- a/backend/CodeRevision.php +++ b/backend/CodeRevision.php @@ -633,10 +633,7 @@ public function isDiffable() { global $wgCodeReviewMaxDiffPaths; $paths = $this-getModifiedPaths(); - if ( !$paths-numRows() || ( $wgCodeReviewMaxDiffPaths 0 $paths-numRows() $wgCodeReviewMaxDiffPaths ) ) { - return false; // things need to get done this year - } - return true; + return $paths-numRows() ( $wgCodeReviewMaxDiffPaths 0 $paths-numRows() $wgCodeReviewMaxDiffPaths ); } /** diff --git a/backend/Subversion.php b/backend/Subversion.php index 6f6c7ad..de5e5f2 100644 --- a/backend/Subversion.php +++ b/backend/Subversion.php @@ -291,10 +291,11 @@ wfEscapeShellArg( $this-mRepoPath . $path ) ); $document = new DOMDocument(); - if ( !@$document-loadXML( wfShellExec( $command ) ) ) + if ( !@$document-loadXML( wfShellExec( $command ) ) ) { // svn list --xml returns invalid XML if the file does not exist // FIXME: report bug upstream return false; + } $entries = $document-getElementsByTagName( 'entry' ); $result = array(); diff --git a/ui/CodeRevisionView.php b/ui/CodeRevisionView.php index dc59aac..51da19b 100644 --- a/ui/CodeRevisionView.php +++ b/ui/CodeRevisionView.php @@ -475,7 +475,7 @@ $cache = ''; } $diff = $this-mRepo-getDiff( $this-mRev-getId(), $cache ); - if ( is_integer($diff) $deferDiffs ) { + if ( is_integer( $diff ) $deferDiffs ) { // We'll try loading it by AJAX... return $this-stubDiffLoader(); } elseif ( strlen( $diff ) $wgCodeReviewMaxDiffSize ) { -- To view, visit https://gerrit.wikimedia.org/r/78530 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2e8a4fe244e030c230a1aeb595ca056160b7f90d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CodeReview Gerrit-Branch: master Gerrit-Owner: Reedy re...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Minor code tweaks - change (mediawiki...CodeReview)
jenkins-bot has submitted this change and it was merged. Change subject: Minor code tweaks .. Minor code tweaks Boolean simplification and braces Change-Id: I2e8a4fe244e030c230a1aeb595ca056160b7f90d --- M backend/CodeRepository.php M backend/CodeRevision.php M backend/Subversion.php M ui/CodeRevisionView.php 4 files changed, 5 insertions(+), 10 deletions(-) Approvals: Reedy: Looks good to me, approved jenkins-bot: Verified diff --git a/backend/CodeRepository.php b/backend/CodeRepository.php index 122a29c..43607dc 100644 --- a/backend/CodeRepository.php +++ b/backend/CodeRepository.php @@ -454,10 +454,7 @@ */ public function isValidRev( $rev ) { $rev = intval( $rev ); - if ( $rev 0 $rev = $this-getLastStoredRev() ) { - return true; - } - return false; + return ( $rev 0 $rev = $this-getLastStoredRev() ); } /** diff --git a/backend/CodeRevision.php b/backend/CodeRevision.php index a53b746..658c2bb 100644 --- a/backend/CodeRevision.php +++ b/backend/CodeRevision.php @@ -633,10 +633,7 @@ public function isDiffable() { global $wgCodeReviewMaxDiffPaths; $paths = $this-getModifiedPaths(); - if ( !$paths-numRows() || ( $wgCodeReviewMaxDiffPaths 0 $paths-numRows() $wgCodeReviewMaxDiffPaths ) ) { - return false; // things need to get done this year - } - return true; + return $paths-numRows() ( $wgCodeReviewMaxDiffPaths 0 $paths-numRows() $wgCodeReviewMaxDiffPaths ); } /** diff --git a/backend/Subversion.php b/backend/Subversion.php index 6f6c7ad..de5e5f2 100644 --- a/backend/Subversion.php +++ b/backend/Subversion.php @@ -291,10 +291,11 @@ wfEscapeShellArg( $this-mRepoPath . $path ) ); $document = new DOMDocument(); - if ( !@$document-loadXML( wfShellExec( $command ) ) ) + if ( !@$document-loadXML( wfShellExec( $command ) ) ) { // svn list --xml returns invalid XML if the file does not exist // FIXME: report bug upstream return false; + } $entries = $document-getElementsByTagName( 'entry' ); $result = array(); diff --git a/ui/CodeRevisionView.php b/ui/CodeRevisionView.php index dc59aac..51da19b 100644 --- a/ui/CodeRevisionView.php +++ b/ui/CodeRevisionView.php @@ -475,7 +475,7 @@ $cache = ''; } $diff = $this-mRepo-getDiff( $this-mRev-getId(), $cache ); - if ( is_integer($diff) $deferDiffs ) { + if ( is_integer( $diff ) $deferDiffs ) { // We'll try loading it by AJAX... return $this-stubDiffLoader(); } elseif ( strlen( $diff ) $wgCodeReviewMaxDiffSize ) { -- To view, visit https://gerrit.wikimedia.org/r/78530 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2e8a4fe244e030c230a1aeb595ca056160b7f90d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CodeReview Gerrit-Branch: master Gerrit-Owner: Reedy re...@wikimedia.org Gerrit-Reviewer: Reedy re...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] cswikisource: Set AbuseFilter notifications - change (operations/mediawiki-config)
Danny B. has uploaded a new change for review. https://gerrit.wikimedia.org/r/78533 Change subject: cswikisource: Set AbuseFilter notifications .. cswikisource: Set AbuseFilter notifications Change-Id: I7238692cd70cc47102fc48cecef9f5d05278f1a3 --- M wmf-config/abusefilter.php 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/33/78533/1 diff --git a/wmf-config/abusefilter.php b/wmf-config/abusefilter.php index 7248e39..bbbacd8 100644 --- a/wmf-config/abusefilter.php +++ b/wmf-config/abusefilter.php @@ -46,11 +46,12 @@ $wgGroupPermissions['autoconfirmed']['abusefilter-log-detail'] = true; $wgAbuseFilterAvailableActions[] = 'block'; $wgAbuseFilterBlockDuration = '2 hours'; - } elseif ( $wgDBname == 'cswiktionary' ) { $wgAbuseFilterNotifications = udp; $wgAbuseFilterNotificationsPrivate = true; - +} elseif ( $wgDBname == 'cswikisource' ) { + $wgAbuseFilterNotifications = udp; + $wgAbuseFilterNotificationsPrivate = true; } elseif ( $wgDBname == 'dewiki' ) { // Removed custom AbuseFilter settings per bug 18223 --Andrew 2009-03-29 // Where on earth did this come from? --Andrew -- To view, visit https://gerrit.wikimedia.org/r/78533 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7238692cd70cc47102fc48cecef9f5d05278f1a3 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Danny B. dann...@email.cz ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rework server side diff code - change (mediawiki...CodeReview)
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/78534 Change subject: Rework server side diff code .. Rework server side diff code Prevents AJAX loading attempts if they are just going to fail anyway, or arne't ever going to have a diff (too many paths || nothing to compare) Add a couple of braces Change-Id: I2dd18b22ad9252cd143d04432e6ccb404afe92a3 --- M backend/CodeRepository.php M ui/CodeRevisionView.php 2 files changed, 31 insertions(+), 18 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CodeReview refs/changes/34/78534/1 diff --git a/backend/CodeRepository.php b/backend/CodeRepository.php index 43607dc..cf03b04 100644 --- a/backend/CodeRepository.php +++ b/backend/CodeRepository.php @@ -564,8 +564,9 @@ * @return string|bool */ public function wikiUserAuthor( $name ) { - if ( isset( self::$authorLinks[$name] ) ) + if ( isset( self::$authorLinks[$name] ) ) { return self::$authorLinks[$name]; + } $dbr = wfGetDB( DB_SLAVE ); $res = $dbr-selectField( diff --git a/ui/CodeRevisionView.php b/ui/CodeRevisionView.php index 51da19b..01f4e41 100644 --- a/ui/CodeRevisionView.php +++ b/ui/CodeRevisionView.php @@ -172,16 +172,18 @@ # Output diff if ( $this-mRev-isDiffable() ) { $diffHtml = $this-formatDiff(); - // @todo FIXME: Hard coded brackets. - $html .= - h2 . wfMessage( 'code-rev-diff' )-escaped() . - ' small[' . Linker::link( - $special, - wfMessage( 'code-rev-purge-link' )-escaped(), - array(), - array( 'action' = 'purge' ) - ) . ']/small/h2' . - div class='mw-codereview-diff' id='mw-codereview-diff' . $diffHtml . /div\n; + if ( $diffHtml !== '' ) { + // @todo FIXME: Hard coded brackets. + $html .= + h2 . wfMessage( 'code-rev-diff' )-escaped() . + ' small[' . Linker::link( + $special, + wfMessage( 'code-rev-purge-link' )-escaped(), + array(), + array( 'action' = 'purge' ) + ) . ']/small/h2' . + div class='mw-codereview-diff' id='mw-codereview-diff' . $diffHtml . /div\n; + } $html .= $this-formatImgDiff(); } @@ -475,15 +477,25 @@ $cache = ''; } $diff = $this-mRepo-getDiff( $this-mRev-getId(), $cache ); - if ( is_integer( $diff ) $deferDiffs ) { - // We'll try loading it by AJAX... - return $this-stubDiffLoader(); - } elseif ( strlen( $diff ) $wgCodeReviewMaxDiffSize ) { + + // If there isn't anything to diff, or if it's too large, don't AJAX load + if ( is_string( $diff ) strlen( $diff ) $wgCodeReviewMaxDiffSize ) { return wfMessage( 'code-rev-diff-too-large' )-escaped(); - } else { - $hilite = new CodeDiffHighlighter(); - return $hilite-render( $diff ); + } elseif ( is_integer( $diff ) +in_array( $diff, + array( CodeRepository::DIFFRESULT_NothingToCompare, CodeRepository::DIFFRESULT_TooManyPaths ) + ) + ) { + // Some other error condition, no diff required + return ''; + } elseif ( $diff === CodeRepository::DIFFRESULT_NotInCache || $deferDiffs ) { + // Api Enabled || Not cached = Load via JS via API + return $this-stubDiffLoader(); } + + // CodeRepository::DIFFRESULT_NoDataReturned still ends up here, and we can't differentiate + $hilite = new CodeDiffHighlighter(); + return $hilite-render( $diff ); } /** -- To view, visit https://gerrit.wikimedia.org/r/78534 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2dd18b22ad9252cd143d04432e6ccb404afe92a3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CodeReview
[MediaWiki-commits] [Gerrit] Bug 44821: OpenID Consumer wiki stalls with blank page - change (mediawiki...OpenID)
Wikinaut has uploaded a new change for review. https://gerrit.wikimedia.org/r/78531 Change subject: Bug 44821: OpenID Consumer wiki stalls with blank page .. Bug 44821: OpenID Consumer wiki stalls with blank page As a consumer wiki, the wiki stalled with a blank page for certain OpenID Provider verification error cases and the consumer wiki failed to show the provider response message. This is fixed by this commit. Change-Id: Ic828dafdc9b2d908f88b1c52fe9c76693886e92f --- M CHANGES M OpenID.i18n.php M OpenID.php M SpecialOpenID.body.php 4 files changed, 23 insertions(+), 34 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OpenID refs/changes/31/78531/1 diff --git a/CHANGES b/CHANGES index 70b463e..583460e 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ CHANGES === +3.41 20130810 bug 44821 OpenID Consumer wiki stalls with blank page for +certain OpenID Provider verification error cases +(consumer fails to show the provider response message) 3.40 20130731 bug 44819 introduction of array of $wgOpenIDProviders and $wgOpenIDForcedProvider 3.33 20130703 bug 50430 fixed null array error for fullname/email in AX array diff --git a/OpenID.i18n.php b/OpenID.i18n.php index 5710b58..fdadca4 100644 --- a/OpenID.i18n.php +++ b/OpenID.i18n.php @@ -45,7 +45,11 @@ 'openidxrds' = 'Yadis file', 'openidconvert' = 'OpenID converter', 'openiderror' = 'Verification error', + 'openid-error-no-auth' = 'An unspecified authentication response/request error occurred during the verification of the OpenID URL $1.', 'openiderrortext' = 'An error occurred during verification of the OpenID URL.', + 'openid-error-server-response' = An error occurred during the verification of the OpenID URL $1. + +The server response was: ''$2'', 'openid-error-request-forgery' = 'An error occurred: an invalid token was found.', 'openid-error-wrong-force-provider-setting' = 'An internal error occured: an incorrect URL value has been found for the forced provider $1.', 'openidconfigerror' = 'OpenID configuration error', diff --git a/OpenID.php b/OpenID.php index fa58055..e07535e 100644 --- a/OpenID.php +++ b/OpenID.php @@ -29,7 +29,7 @@ exit( 1 ); } -define( 'MEDIAWIKI_OPENID_VERSION', '3.40 20130808' ); +define( 'MEDIAWIKI_OPENID_VERSION', '3.41 20130810' ); $path = dirname( __FILE__ ); set_include_path( implode( PATH_SEPARATOR, array( $path ) ) . PATH_SEPARATOR . get_include_path() ); diff --git a/SpecialOpenID.body.php b/SpecialOpenID.body.php index 90b8104..3ab236d 100644 --- a/SpecialOpenID.body.php +++ b/SpecialOpenID.body.php @@ -266,42 +266,24 @@ // Handle failure status return values. if ( !$auth_request ) { - wfDebug( OpenID: no auth_request\n ); - $wgOut-showErrorPage( 'openiderror', 'openiderrortext' ); + wfDebug( OpenID: no auth_request for {$openid_url}\n ); + $wgOut-showErrorPage( + 'openiderror', + 'openid-error-no-auth', + array( $openid_url ) + ); return; } -/* - FIXME - - THIS DOES NOT WORK: THE TWO POST ARGUMENTS ARE NOT CHANGED - I DO NOT KNOW WHAT I MADE WRONG HERE - - WORKAROUND: SEE BELOW BEFORE FORM SUBMISSION - - // ask the Server to show identifier selection form - // https://developers.google.com/accounts/docs/OpenID#Parameters - - $auth_request-message-setArg( - Auth_OpenID_OPENID_NS, - identity, - http://specs.openid.net/auth/2.0/identifier_select; - ); - - $auth_request-message-setArg( - Auth_OpenID_OPENID_NS, - claimed_id, - http://specs.openid.net/auth/2.0/identifier_select; - ); - - $auth_request-message-updateArgs( - Auth_OpenID_OPENID_NS, - array( - identity = http://specs.openid.net/auth/2.0/identifier_select;, - claimed_id = http://specs.openid.net/auth/2.0/identifier_select;, - ) - ); -*/ + if ( Auth_OpenID::isFailure( $auth_request ) ) { + wfDebug( OpenID: auth_request failure for {$openid_url}:\n . print_r( $auth_request, true ) .\n ); + $wgOut-showErrorPage( + 'openiderror', + 'openid-error-server-response', + array
[MediaWiki-commits] [Gerrit] Rework server side diff code - change (mediawiki...CodeReview)
jenkins-bot has submitted this change and it was merged. Change subject: Rework server side diff code .. Rework server side diff code Prevents AJAX loading attempts if they are just going to fail anyway, or arne't ever going to have a diff (too many paths || nothing to compare) Add a couple of braces Change-Id: I2dd18b22ad9252cd143d04432e6ccb404afe92a3 --- M backend/CodeRepository.php M ui/CodeRevisionView.php 2 files changed, 22 insertions(+), 8 deletions(-) Approvals: Reedy: Looks good to me, approved jenkins-bot: Verified diff --git a/backend/CodeRepository.php b/backend/CodeRepository.php index 43607dc..cf03b04 100644 --- a/backend/CodeRepository.php +++ b/backend/CodeRepository.php @@ -564,8 +564,9 @@ * @return string|bool */ public function wikiUserAuthor( $name ) { - if ( isset( self::$authorLinks[$name] ) ) + if ( isset( self::$authorLinks[$name] ) ) { return self::$authorLinks[$name]; + } $dbr = wfGetDB( DB_SLAVE ); $res = $dbr-selectField( diff --git a/ui/CodeRevisionView.php b/ui/CodeRevisionView.php index 51da19b..c979339 100644 --- a/ui/CodeRevisionView.php +++ b/ui/CodeRevisionView.php @@ -173,6 +173,9 @@ if ( $this-mRev-isDiffable() ) { $diffHtml = $this-formatDiff(); // @todo FIXME: Hard coded brackets. + // Even in the cases of DIFFRESULT_TooManyPaths or too large, + // users can purge the diff to regenerate it after the relevant + // variables have been changed $html .= h2 . wfMessage( 'code-rev-diff' )-escaped() . ' small[' . Linker::link( @@ -475,15 +478,25 @@ $cache = ''; } $diff = $this-mRepo-getDiff( $this-mRev-getId(), $cache ); - if ( is_integer( $diff ) $deferDiffs ) { - // We'll try loading it by AJAX... - return $this-stubDiffLoader(); - } elseif ( strlen( $diff ) $wgCodeReviewMaxDiffSize ) { + + // If there isn't anything to diff, or if it's too large, don't AJAX load + if ( is_string( $diff ) strlen( $diff ) $wgCodeReviewMaxDiffSize ) { return wfMessage( 'code-rev-diff-too-large' )-escaped(); - } else { - $hilite = new CodeDiffHighlighter(); - return $hilite-render( $diff ); + } elseif ( is_integer( $diff ) +in_array( $diff, + array( CodeRepository::DIFFRESULT_NothingToCompare, CodeRepository::DIFFRESULT_TooManyPaths ) + ) + ) { + // Some other error condition, no diff required + return ''; + } elseif ( $diff === CodeRepository::DIFFRESULT_NotInCache || $deferDiffs ) { + // Api Enabled || Not cached = Load via JS via API + return $this-stubDiffLoader(); } + + // CodeRepository::DIFFRESULT_NoDataReturned still ends up here, and we can't differentiate + $hilite = new CodeDiffHighlighter(); + return $hilite-render( $diff ); } /** -- To view, visit https://gerrit.wikimedia.org/r/78534 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2dd18b22ad9252cd143d04432e6ccb404afe92a3 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/CodeReview Gerrit-Branch: master Gerrit-Owner: Reedy re...@wikimedia.org Gerrit-Reviewer: Reedy re...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Normalise error messages in JS - change (mediawiki...CodeReview)
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/78536 Change subject: Normalise error messages in JS .. Normalise error messages in JS Change-Id: I6bbbee2b4f6c01d158f147b3097618b3cffe475f --- M modules/ext.codereview.loaddiff.js 1 file changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CodeReview refs/changes/36/78536/1 diff --git a/modules/ext.codereview.loaddiff.js b/modules/ext.codereview.loaddiff.js index bcec999..54a2a28 100644 --- a/modules/ext.codereview.loaddiff.js +++ b/modules/ext.codereview.loaddiff.js @@ -26,7 +26,7 @@ if ( window.location.hostname === 'localhost' ) { alert( 'Your browser blocks XMLHttpRequest to localhost, try using a real hostname for development/testing.' ); } - CodeReview.setDiff( 'Diff load failed!' ); + CodeReview.setDiff( 'Failed to load diff.' ); throw e; } }, @@ -34,7 +34,8 @@ if ( data data.code data.code.rev data.code.rev.diff ) { CodeReview.setDiff( data.code.rev.diff ); } else { - CodeReview.setDiff( 'Diff load failed. :(' ); + // Will occur when MediaWiki actually serves an error back + CodeReview.setDiff( 'Failed to load diff. :(' ); } }, diffTarget : function() { @@ -45,4 +46,4 @@ } }); -})( jQuery ); \ No newline at end of file +})( jQuery ); -- To view, visit https://gerrit.wikimedia.org/r/78536 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6bbbee2b4f6c01d158f147b3097618b3cffe475f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CodeReview Gerrit-Branch: master Gerrit-Owner: Reedy re...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Normalise error messages in JS - change (mediawiki...CodeReview)
jenkins-bot has submitted this change and it was merged. Change subject: Normalise error messages in JS .. Normalise error messages in JS Change-Id: I6bbbee2b4f6c01d158f147b3097618b3cffe475f --- M modules/ext.codereview.loaddiff.js 1 file changed, 4 insertions(+), 3 deletions(-) Approvals: Reedy: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ext.codereview.loaddiff.js b/modules/ext.codereview.loaddiff.js index bcec999..54a2a28 100644 --- a/modules/ext.codereview.loaddiff.js +++ b/modules/ext.codereview.loaddiff.js @@ -26,7 +26,7 @@ if ( window.location.hostname === 'localhost' ) { alert( 'Your browser blocks XMLHttpRequest to localhost, try using a real hostname for development/testing.' ); } - CodeReview.setDiff( 'Diff load failed!' ); + CodeReview.setDiff( 'Failed to load diff.' ); throw e; } }, @@ -34,7 +34,8 @@ if ( data data.code data.code.rev data.code.rev.diff ) { CodeReview.setDiff( data.code.rev.diff ); } else { - CodeReview.setDiff( 'Diff load failed. :(' ); + // Will occur when MediaWiki actually serves an error back + CodeReview.setDiff( 'Failed to load diff. :(' ); } }, diffTarget : function() { @@ -45,4 +46,4 @@ } }); -})( jQuery ); \ No newline at end of file +})( jQuery ); -- To view, visit https://gerrit.wikimedia.org/r/78536 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6bbbee2b4f6c01d158f147b3097618b3cffe475f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CodeReview Gerrit-Branch: master Gerrit-Owner: Reedy re...@wikimedia.org Gerrit-Reviewer: Reedy re...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Minor doc additions - change (mediawiki...CodeReview)
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/78537 Change subject: Minor doc additions .. Minor doc additions Change-Id: I732c56d266c3ac55150290c6421b939387edbc88 --- M backend/CodeRevision.php M maintenance/svnImport.php M ui/CodeRevisionCommitter.php M ui/CodeRevisionView.php M ui/CodeView.php 5 files changed, 27 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CodeReview refs/changes/37/78537/1 diff --git a/backend/CodeRevision.php b/backend/CodeRevision.php index 658c2bb..ceb4b7e 100644 --- a/backend/CodeRevision.php +++ b/backend/CodeRevision.php @@ -704,6 +704,9 @@ $users[0] = $watcher; // We don't have any anons, so using 0 is safe } + /** +* @var $user User +*/ foreach ( $users as $id = $user ) { // No sense in notifying this commenter if ( $wgUser-getId() == $user-getId() ) { diff --git a/maintenance/svnImport.php b/maintenance/svnImport.php index 5496e08..228e05b 100644 --- a/maintenance/svnImport.php +++ b/maintenance/svnImport.php @@ -37,6 +37,9 @@ if ( $repo == all ) { $repoList = CodeRepository::getRepoList(); + /** +* @var $repoInfo CodeRepository +*/ foreach ( $repoList as $repoInfo ) { $this-importRepo( $repoInfo-getName(), null, $cacheSize ); } diff --git a/ui/CodeRevisionCommitter.php b/ui/CodeRevisionCommitter.php index 6eabbae..91ac4bb 100644 --- a/ui/CodeRevisionCommitter.php +++ b/ui/CodeRevisionCommitter.php @@ -65,7 +65,6 @@ * @param Array $removeReferences Array of revision IDs to remove references from * @param string $commentText Comment to add to the revision * @param null|int $parent What the parent comment is (if a subcomment) -* @param int $review (unused) * @param $addReferenced * @param $removeReferenced * @return int Comment ID if added, else 0 diff --git a/ui/CodeRevisionView.php b/ui/CodeRevisionView.php index c979339..bd932e2 100644 --- a/ui/CodeRevisionView.php +++ b/ui/CodeRevisionView.php @@ -243,7 +243,7 @@ if ( $prev ) { $prevTarget = SpecialPage::getTitleFor( 'Code', $repo/$prev ); $links[] = 'lt;#160;' . Linker::link( $prevTarget, $this-mRev-getIdString( $prev ), - array(), array( 'path' = $this-mPath ) ).$wgLang-getDirMark(); + array(), array( 'path' = $this-mPath ) ) . $wgLang-getDirMark(); } $revText = b . $this-mRev-getIdString( $rev ) . /b; @@ -251,7 +251,7 @@ if ( $viewvc ) { $url = htmlspecialchars( $viewvc/?view=revrevision=$rev ); $viewvcTxt = wfMessage( 'code-rev-rev-viewvc' )-escaped(); - $revText .= (a href=\$url\ title=\revision $rev\$viewvcTxt/a).$wgLang-getDirMark(); + $revText .= (a href=\$url\ title=\revision $rev\$viewvcTxt/a) . $wgLang-getDirMark(); } $links[] = $revText; @@ -850,7 +850,7 @@ */ protected function commentStyle( $comment ) { global $wgLang; - $align = $wgLang-AlignStart(); + $align = $wgLang-alignStart(); $depth = $comment-threadDepth(); $margin = ( $depth - 1 ) * 48; return margin-$align: ${margin}px; @@ -942,6 +942,9 @@ protected function getUserSignoffs( $signOffs ) { $ret = array(); global $wgUser; + /** +* @var $s CodeSignoff +*/ foreach( $signOffs as $s ) { if ( $s-userText == $wgUser-getName() !$s-isStruck() ) { $ret[$s-flag] = true; diff --git a/ui/CodeView.php b/ui/CodeView.php index 9adde5d..1e3324e 100644 --- a/ui/CodeView.php +++ b/ui/CodeView.php @@ -19,6 +19,21 @@ */ var $codeCommentLinkerWiki; + /** +* @var string +*/ + var $mPath; + + /** +* @var string +*/ + var $mAuthor; + + /** +* @var string +*/ + var $mStatus; + function __construct( $repo ) { $this-mRepo = ( $repo instanceof CodeRepository ) ? $repo -- To view, visit https://gerrit.wikimedia.org/r/78537 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I732c56d266c3ac55150290c6421b939387edbc88 Gerrit-PatchSet: 1
[MediaWiki-commits] [Gerrit] Minor doc additions - change (mediawiki...CodeReview)
jenkins-bot has submitted this change and it was merged. Change subject: Minor doc additions .. Minor doc additions Change-Id: I732c56d266c3ac55150290c6421b939387edbc88 --- M backend/CodeRevision.php M maintenance/svnImport.php M ui/CodeRevisionCommitter.php M ui/CodeRevisionView.php M ui/CodeView.php 5 files changed, 27 insertions(+), 4 deletions(-) Approvals: Reedy: Looks good to me, approved jenkins-bot: Verified diff --git a/backend/CodeRevision.php b/backend/CodeRevision.php index 658c2bb..ceb4b7e 100644 --- a/backend/CodeRevision.php +++ b/backend/CodeRevision.php @@ -704,6 +704,9 @@ $users[0] = $watcher; // We don't have any anons, so using 0 is safe } + /** +* @var $user User +*/ foreach ( $users as $id = $user ) { // No sense in notifying this commenter if ( $wgUser-getId() == $user-getId() ) { diff --git a/maintenance/svnImport.php b/maintenance/svnImport.php index 5496e08..228e05b 100644 --- a/maintenance/svnImport.php +++ b/maintenance/svnImport.php @@ -37,6 +37,9 @@ if ( $repo == all ) { $repoList = CodeRepository::getRepoList(); + /** +* @var $repoInfo CodeRepository +*/ foreach ( $repoList as $repoInfo ) { $this-importRepo( $repoInfo-getName(), null, $cacheSize ); } diff --git a/ui/CodeRevisionCommitter.php b/ui/CodeRevisionCommitter.php index 6eabbae..91ac4bb 100644 --- a/ui/CodeRevisionCommitter.php +++ b/ui/CodeRevisionCommitter.php @@ -65,7 +65,6 @@ * @param Array $removeReferences Array of revision IDs to remove references from * @param string $commentText Comment to add to the revision * @param null|int $parent What the parent comment is (if a subcomment) -* @param int $review (unused) * @param $addReferenced * @param $removeReferenced * @return int Comment ID if added, else 0 diff --git a/ui/CodeRevisionView.php b/ui/CodeRevisionView.php index c979339..bd932e2 100644 --- a/ui/CodeRevisionView.php +++ b/ui/CodeRevisionView.php @@ -243,7 +243,7 @@ if ( $prev ) { $prevTarget = SpecialPage::getTitleFor( 'Code', $repo/$prev ); $links[] = 'lt;#160;' . Linker::link( $prevTarget, $this-mRev-getIdString( $prev ), - array(), array( 'path' = $this-mPath ) ).$wgLang-getDirMark(); + array(), array( 'path' = $this-mPath ) ) . $wgLang-getDirMark(); } $revText = b . $this-mRev-getIdString( $rev ) . /b; @@ -251,7 +251,7 @@ if ( $viewvc ) { $url = htmlspecialchars( $viewvc/?view=revrevision=$rev ); $viewvcTxt = wfMessage( 'code-rev-rev-viewvc' )-escaped(); - $revText .= (a href=\$url\ title=\revision $rev\$viewvcTxt/a).$wgLang-getDirMark(); + $revText .= (a href=\$url\ title=\revision $rev\$viewvcTxt/a) . $wgLang-getDirMark(); } $links[] = $revText; @@ -850,7 +850,7 @@ */ protected function commentStyle( $comment ) { global $wgLang; - $align = $wgLang-AlignStart(); + $align = $wgLang-alignStart(); $depth = $comment-threadDepth(); $margin = ( $depth - 1 ) * 48; return margin-$align: ${margin}px; @@ -942,6 +942,9 @@ protected function getUserSignoffs( $signOffs ) { $ret = array(); global $wgUser; + /** +* @var $s CodeSignoff +*/ foreach( $signOffs as $s ) { if ( $s-userText == $wgUser-getName() !$s-isStruck() ) { $ret[$s-flag] = true; diff --git a/ui/CodeView.php b/ui/CodeView.php index 9adde5d..1e3324e 100644 --- a/ui/CodeView.php +++ b/ui/CodeView.php @@ -19,6 +19,21 @@ */ var $codeCommentLinkerWiki; + /** +* @var string +*/ + var $mPath; + + /** +* @var string +*/ + var $mAuthor; + + /** +* @var string +*/ + var $mStatus; + function __construct( $repo ) { $this-mRepo = ( $repo instanceof CodeRepository ) ? $repo -- To view, visit https://gerrit.wikimedia.org/r/78537 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I732c56d266c3ac55150290c6421b939387edbc88 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CodeReview Gerrit-Branch: master
[MediaWiki-commits] [Gerrit] Update CodeReview to master - change (mediawiki/core)
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/78538 Change subject: Update CodeReview to master .. Update CodeReview to master Change-Id: I6ac3454fdc21ae65831ebcee26781f32577a35b7 --- M extensions/CodeReview 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/38/78538/1 diff --git a/extensions/CodeReview b/extensions/CodeReview index 3f375e4..1882769 16 --- a/extensions/CodeReview +++ b/extensions/CodeReview -Subproject commit 3f375e4ae894b0ce40db2215b23ab251da15223a +Subproject commit 18827695cb750cca950860c75d7e135f5c04e63d -- To view, visit https://gerrit.wikimedia.org/r/78538 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6ac3454fdc21ae65831ebcee26781f32577a35b7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.22wmf12 Gerrit-Owner: Reedy re...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Changing a bug - change (mediawiki...UpdateMediaWiki)
Miguel2706 has uploaded a new change for review. https://gerrit.wikimedia.org/r/78539 Change subject: Changing a bug .. Changing a bug Change-Id: I72f5e4162fc1fa478dddcdf90d7fae2e5d767e39 --- M updateMediaWiki.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UpdateMediaWiki refs/changes/39/78539/1 diff --git a/updateMediaWiki.php b/updateMediaWiki.php index 859c572..8b1eb50 100644 --- a/updateMediaWiki.php +++ b/updateMediaWiki.php @@ -23,7 +23,7 @@ 'path' = __FILE__, 'name' = 'Update MediaWiki', 'author' ='Miguel Peláez', - 'url' = 'https://www.mediawiki.org/wiki/Extension:Update_MediaWiki', + 'url' = 'https://www.mediawiki.org/wiki/Extension:UpdateMediaWiki', 'description' = 'Allows administrators and authorized users upgrade from a special page MediaWiki', 'version' = 0.1, ); @@ -31,4 +31,4 @@ $wgExtensionMessagesFiles[ 'updatemediawiki' ] = __DIR__ . '/updatemediawiki.i18n.php'; $wgSpecialPages[ 'updatemediawiki' ] = 'Specialupdatemediawiki'; $wgExtensionAliasesFiles['updatemediawiki'] = dirname( __FILE__ ) . '/updatemediawiki.alias.php'; -$wgSpecialPageGroups['updatemediawiki']='wiki'; \ No newline at end of file +$wgSpecialPageGroups['updatemediawiki']='wiki'; -- To view, visit https://gerrit.wikimedia.org/r/78539 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I72f5e4162fc1fa478dddcdf90d7fae2e5d767e39 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UpdateMediaWiki Gerrit-Branch: master Gerrit-Owner: Miguel2706 miguel2...@outlook.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Changing a bug - change (mediawiki...UpdateMediaWiki)
Miguel2706 has submitted this change and it was merged. Change subject: Changing a bug .. Changing a bug Change-Id: I72f5e4162fc1fa478dddcdf90d7fae2e5d767e39 --- M updateMediaWiki.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Miguel2706: Verified; Looks good to me, approved diff --git a/updateMediaWiki.php b/updateMediaWiki.php index 859c572..8b1eb50 100644 --- a/updateMediaWiki.php +++ b/updateMediaWiki.php @@ -23,7 +23,7 @@ 'path' = __FILE__, 'name' = 'Update MediaWiki', 'author' ='Miguel Peláez', - 'url' = 'https://www.mediawiki.org/wiki/Extension:Update_MediaWiki', + 'url' = 'https://www.mediawiki.org/wiki/Extension:UpdateMediaWiki', 'description' = 'Allows administrators and authorized users upgrade from a special page MediaWiki', 'version' = 0.1, ); @@ -31,4 +31,4 @@ $wgExtensionMessagesFiles[ 'updatemediawiki' ] = __DIR__ . '/updatemediawiki.i18n.php'; $wgSpecialPages[ 'updatemediawiki' ] = 'Specialupdatemediawiki'; $wgExtensionAliasesFiles['updatemediawiki'] = dirname( __FILE__ ) . '/updatemediawiki.alias.php'; -$wgSpecialPageGroups['updatemediawiki']='wiki'; \ No newline at end of file +$wgSpecialPageGroups['updatemediawiki']='wiki'; -- To view, visit https://gerrit.wikimedia.org/r/78539 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I72f5e4162fc1fa478dddcdf90d7fae2e5d767e39 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UpdateMediaWiki Gerrit-Branch: master Gerrit-Owner: Miguel2706 miguel2...@outlook.com Gerrit-Reviewer: Miguel2706 miguel2...@outlook.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Bug fix - change (mediawiki...UpdateMediaWiki)
Miguel2706 has uploaded a new change for review. https://gerrit.wikimedia.org/r/78540 Change subject: Bug fix .. Bug fix Change-Id: I1ae283c1625e6a83a4baebec5371443790251525 --- M updateMediaWiki.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UpdateMediaWiki refs/changes/40/78540/1 diff --git a/updateMediaWiki.php b/updateMediaWiki.php index 8b1eb50..11ace9f 100644 --- a/updateMediaWiki.php +++ b/updateMediaWiki.php @@ -1,4 +1,4 @@ -? +? /* ** -- To view, visit https://gerrit.wikimedia.org/r/78540 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1ae283c1625e6a83a4baebec5371443790251525 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UpdateMediaWiki Gerrit-Branch: master Gerrit-Owner: Miguel2706 miguel2...@outlook.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Bug fix - change (mediawiki...UpdateMediaWiki)
Miguel2706 has submitted this change and it was merged. Change subject: Bug fix .. Bug fix Change-Id: I1ae283c1625e6a83a4baebec5371443790251525 --- M updateMediaWiki.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Miguel2706: Verified; Looks good to me, approved diff --git a/updateMediaWiki.php b/updateMediaWiki.php index 8b1eb50..11ace9f 100644 --- a/updateMediaWiki.php +++ b/updateMediaWiki.php @@ -1,4 +1,4 @@ -? +? /* ** -- To view, visit https://gerrit.wikimedia.org/r/78540 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1ae283c1625e6a83a4baebec5371443790251525 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UpdateMediaWiki Gerrit-Branch: master Gerrit-Owner: Miguel2706 miguel2...@outlook.com Gerrit-Reviewer: Miguel2706 miguel2...@outlook.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove debug output from test output - change (pywikibot/core)
Merlijn van Deen has uploaded a new change for review. https://gerrit.wikimedia.org/r/78541 Change subject: Remove debug output from test output .. Remove debug output from test output The URL was printed during test runs, even though this was only for initial testing of the cache. This commit removes the print statement. Change-Id: Iaa0f1fcad337e0a11b4535d87c3af941735bbe74 --- M tests/__init__.py 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/41/78541/1 diff --git a/tests/__init__.py b/tests/__init__.py index 0487fc4..56c7af9 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -26,8 +26,6 @@ def submit(self): cached_available = self._load_cache() -if not cached_available: -print str(self) return super(TestRequest, self).submit() -- To view, visit https://gerrit.wikimedia.org/r/78541 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaa0f1fcad337e0a11b4535d87c3af941735bbe74 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Merlijn van Deen valhall...@arctus.nl ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Disable printing of API parameters which could leak private ... - change (pywikibot/core)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/78542 Change subject: Disable printing of API parameters which could leak private info and were generally not useful .. Disable printing of API parameters which could leak private info and were generally not useful Change-Id: I8a8a8d10799df4f61e4465fe60b6c7efbefbd962 --- M tests/__init__.py 1 file changed, 0 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/42/78542/1 diff --git a/tests/__init__.py b/tests/__init__.py index 0487fc4..e0c4f27 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -24,13 +24,6 @@ def _expired(self, dt): return False -def submit(self): -cached_available = self._load_cache() -if not cached_available: -print str(self) -return super(TestRequest, self).submit() - - def patch_request(): pywikibot.data.api.Request = TestRequest -- To view, visit https://gerrit.wikimedia.org/r/78542 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8a8a8d10799df4f61e4465fe60b6c7efbefbd962 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Disable printing of API parameters which could leak private ... - change (pywikibot/core)
Merlijn van Deen has submitted this change and it was merged. Change subject: Disable printing of API parameters which could leak private info and were generally not useful .. Disable printing of API parameters which could leak private info and were generally not useful Change-Id: I8a8a8d10799df4f61e4465fe60b6c7efbefbd962 --- M tests/__init__.py 1 file changed, 0 insertions(+), 7 deletions(-) Approvals: Merlijn van Deen: Looks good to me, approved diff --git a/tests/__init__.py b/tests/__init__.py index 0487fc4..e0c4f27 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -24,13 +24,6 @@ def _expired(self, dt): return False -def submit(self): -cached_available = self._load_cache() -if not cached_available: -print str(self) -return super(TestRequest, self).submit() - - def patch_request(): pywikibot.data.api.Request = TestRequest -- To view, visit https://gerrit.wikimedia.org/r/78542 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8a8a8d10799df4f61e4465fe60b6c7efbefbd962 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] changing restriction to updatecore - change (mediawiki...UpdateMediaWiki)
Miguel2706 has uploaded a new change for review. https://gerrit.wikimedia.org/r/78543 Change subject: changing restriction to updatecore .. changing restriction to updatecore Change-Id: Id3a5c1141e4564e4fabe831c4edd0da3a350803c --- M specialupdatemediawiki.php 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UpdateMediaWiki refs/changes/43/78543/1 diff --git a/specialupdatemediawiki.php b/specialupdatemediawiki.php index 118481b..d220379 100644 --- a/specialupdatemediawiki.php +++ b/specialupdatemediawiki.php @@ -1,4 +1,4 @@ -? +? /* ** ** This file is part of the Update MediaWiki extension for MediaWiki @@ -11,7 +11,7 @@ class Specialupdatemediawiki extends SpecialPage { function __construct() { -parent::__construct( $name = 'updatemediawiki', $restriction = 'editinterface' ); // restrict to sysops +parent::__construct( $name = 'updatemediawiki', $restriction = 'updatecore' ); } function execute( $par ) { @@ -94,4 +94,4 @@ } -} \ No newline at end of file +} -- To view, visit https://gerrit.wikimedia.org/r/78543 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id3a5c1141e4564e4fabe831c4edd0da3a350803c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UpdateMediaWiki Gerrit-Branch: master Gerrit-Owner: Miguel2706 miguel2...@outlook.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] changing restriction to updatecore - change (mediawiki...UpdateMediaWiki)
Miguel2706 has submitted this change and it was merged. Change subject: changing restriction to updatecore .. changing restriction to updatecore Change-Id: Id3a5c1141e4564e4fabe831c4edd0da3a350803c --- M specialupdatemediawiki.php 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Miguel2706: Verified; Looks good to me, approved diff --git a/specialupdatemediawiki.php b/specialupdatemediawiki.php index 118481b..d220379 100644 --- a/specialupdatemediawiki.php +++ b/specialupdatemediawiki.php @@ -1,4 +1,4 @@ -? +? /* ** ** This file is part of the Update MediaWiki extension for MediaWiki @@ -11,7 +11,7 @@ class Specialupdatemediawiki extends SpecialPage { function __construct() { -parent::__construct( $name = 'updatemediawiki', $restriction = 'editinterface' ); // restrict to sysops +parent::__construct( $name = 'updatemediawiki', $restriction = 'updatecore' ); } function execute( $par ) { @@ -94,4 +94,4 @@ } -} \ No newline at end of file +} -- To view, visit https://gerrit.wikimedia.org/r/78543 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id3a5c1141e4564e4fabe831c4edd0da3a350803c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UpdateMediaWiki Gerrit-Branch: master Gerrit-Owner: Miguel2706 miguel2...@outlook.com Gerrit-Reviewer: Miguel2706 miguel2...@outlook.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] articlefeedback-pitch-thanks should be in singular form if t... - change (mediawiki...ArticleFeedback)
Nemo bis has uploaded a new change for review. https://gerrit.wikimedia.org/r/78544 Change subject: articlefeedback-pitch-thanks should be in singular form if the user submits only one rating .. articlefeedback-pitch-thanks should be in singular form if the user submits only one rating Bug: 29323 Change-Id: Icb2f6c7eaf15a0ae2a10a4164874454a3e9394f9 --- M ArticleFeedback.hooks.php M ArticleFeedback.i18n.php M modules/jquery.articleFeedback/jquery.articleFeedback.js 3 files changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ArticleFeedback refs/changes/44/78544/1 diff --git a/ArticleFeedback.hooks.php b/ArticleFeedback.hooks.php index 43e3351..4ff6cf6 100644 --- a/ArticleFeedback.hooks.php +++ b/ArticleFeedback.hooks.php @@ -32,6 +32,7 @@ 'articlefeedback-privacyurl' ), 'dependencies' = array( + 'mediawiki.jqueryMsg', 'jquery.ui.dialog', 'jquery.ui.button', 'jquery.articleFeedback', diff --git a/ArticleFeedback.i18n.php b/ArticleFeedback.i18n.php index 18bf9ca..b9b5f7b 100644 --- a/ArticleFeedback.i18n.php +++ b/ArticleFeedback.i18n.php @@ -67,7 +67,7 @@ 'articlefeedback-field-wellwritten-tooltip-5' = 'Exceptional clarity', 'articlefeedback-pitch-reject' = 'Maybe later', 'articlefeedback-pitch-or' = 'or', - 'articlefeedback-pitch-thanks' = 'Thanks! Your ratings have been saved.', + 'articlefeedback-pitch-thanks' = 'Thanks! Your {{PLURAL:$1|rating has|ratings have}} been saved.', 'articlefeedback-pitch-join-message' = 'Did you want to create an account?', 'articlefeedback-pitch-join-body' = 'An account will help you track your edits, get involved in discussions, and be a part of the community.', 'articlefeedback-pitch-join-accept' = 'Create an account', @@ -161,6 +161,7 @@ 'articlefeedback-pitch-join-accept' = '{{Identical|Create an account}}', 'articlefeedback-pitch-join-login' = '{{Identical|Log in}}', 'articlefeedback-pitch-edit-body' = '{{notranslate}}', +'articlefeedback-pitch-thanks' = '$1 - number of ratings submitted', 'articlefeedback-privacyurl' = 'This URL can be changed to point to a translated version of the page if it exists.', 'articleFeedback-table-caption-dailyhighs' = Used as caption. Parameters: * $1 - today's date, diff --git a/modules/jquery.articleFeedback/jquery.articleFeedback.js b/modules/jquery.articleFeedback/jquery.articleFeedback.js index 19eea0f..5914283 100644 --- a/modules/jquery.articleFeedback/jquery.articleFeedback.js +++ b/modules/jquery.articleFeedback/jquery.articleFeedback.js @@ -564,7 +564,7 @@ var $pitch = $( $.articleFeedback.tpl.pitch ) .attr( 'rel', key ) .find( '.articleFeedback-title' ) - .text( mw.msg( context.options.pitches[key].title ) ) + .text( mw.msg( context.options.pitches[key].title, rating.countall ) ) .end() .find( '.articleFeedback-message' ) .text( mw.msg( context.options.pitches[key].message ) ) -- To view, visit https://gerrit.wikimedia.org/r/78544 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icb2f6c7eaf15a0ae2a10a4164874454a3e9394f9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ArticleFeedback Gerrit-Branch: master Gerrit-Owner: Nemo bis federicol...@tiscali.it ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] LanguageInputWidget Generalization - change (mediawiki...VisualEditor)
Mooeypoo has uploaded a new change for review. https://gerrit.wikimedia.org/r/78545 Change subject: LanguageInputWidget Generalization .. LanguageInputWidget Generalization This commit prepares the LanguageInputWidget to handle both annotation and node, so it can be used as the GUI for both the LanguageInspector and the LanguageBlockInspector that's coming up. The LanguageInspector was adjusted mildly to accomodate the change in the widget. Change-Id: I17954707c00ffc4c32fbb44a6807a61760ad573c --- M modules/ve/ui/inspectors/ve.ui.LanguageInspector.js M modules/ve/ui/widgets/ve.ui.LanguageInputWidget.js 2 files changed, 96 insertions(+), 44 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/45/78545/1 diff --git a/modules/ve/ui/inspectors/ve.ui.LanguageInspector.js b/modules/ve/ui/inspectors/ve.ui.LanguageInspector.js index 9f9fc1a..67a90a9 100644 --- a/modules/ve/ui/inspectors/ve.ui.LanguageInspector.js +++ b/modules/ve/ui/inspectors/ve.ui.LanguageInspector.js @@ -19,6 +19,7 @@ // Parent constructor ve.ui.AnnotationInspector.call( this, surface, config ); + // Placeholder for the dm properties: this.initLang = ''; this.initDir = ''; }; @@ -54,8 +55,12 @@ // Properties this.targetInput = new ve.ui.LanguageInputWidget( { - '$$': this.frame.$$, '$overlay': this.surface.$localOverlay + '$$': this.frame.$$, + '$overlay': this.surface.$localOverlay } ); + + // Define the LanguageInputWidget as an annotation: + this.targetInput.dataType = annotation; // Initialization this.$form.append( this.targetInput.$ ); @@ -75,10 +80,10 @@ }, this ), 200 ); }; /** - * Handle the inspector being setup. - * Make sure the initial language and direction are set by the parent of the DOM - * element of the selected fragment before the rest of the onSetup method is - * processed by the parent ve.ui.AnnotationInspector + * Handle the inspector being set up. + * Make sure the initial language and direction are set by the parent + * of the DOM element of the selected fragment before the rest of the + * onSetup method is processed by the parent ve.ui.AnnotationInspector */ ve.ui.LanguageInspector.prototype.onSetup = function () { var fragDOM, diff --git a/modules/ve/ui/widgets/ve.ui.LanguageInputWidget.js b/modules/ve/ui/widgets/ve.ui.LanguageInputWidget.js index c76e0bc..30bc1ce 100644 --- a/modules/ve/ui/widgets/ve.ui.LanguageInputWidget.js +++ b/modules/ve/ui/widgets/ve.ui.LanguageInputWidget.js @@ -20,13 +20,16 @@ // Parent constructor ve.ui.Widget.call( this, config ); - // Properties + // Visual Properties this.$langCodeDisp = this.getDisplayElement( config ); // language code this.$langNameDisp = this.getDisplayElement( config ); // human-readable language name this.$dirDisp = this.getDisplayElement( config ); - // Placeholders for annotation value + // Placeholders for datamodels: this.annotation = null; + this.node = null; + + // Placeholders for attribute values this.lang = ''; this.dir = ''; @@ -65,7 +68,17 @@ ulsParams = { onSelect: function( language ) { - langInpObj.setValue( language ); + var newAnnotation = new ve.dm.LanguageAnnotation( { + 'type': 'language', + 'attributes': { + 'lang': language, + 'dir': $.uls.data.getDir( this.lang ) + } + } ); + // Set the new value, annotation or node: + if ( langInpObj.dataType === 'annotation' ) { + langInpObj.setAnnotation( newAnnotation ); + } }, compact: true, // Temporary Quicklist for the Prototype: @@ -89,7 +102,13 @@ ve.inheritClass( ve.ui.LanguageInputWidget, ve.ui.Widget ); +/* Static properties */ + +// This will define whether we are in annotation or node mode: +ve.ui.LanguageInputWidget.static.dataType = ''; + /* Methods */ + /** * Get display element. This replaces the 'getInputElement' * of the InputWidget @@ -103,76 +122,104 @@ }; /** - * Set the value of the language display + * Return the current language attributes * - * Overrides setValue to keep annotations in sync. - * - * @method - * @param {string} value New value */ -ve.ui.LanguageInputWidget.prototype.setValue = function ( value ) { - // Keep annotation in sync with value - if ( value === '' ) { - this.annotation = null; -
[MediaWiki-commits] [Gerrit] Converted (to .md) updated readme file - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: Converted (to .md) updated readme file .. Converted (to .md) updated readme file Added TravisCI build status badge Change-Id: Ie0e3e2cc82ed9ff118801de51a6fdcb5682b38d4 --- R README.md 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Merlijn van Deen: Looks good to me, approved jenkins-bot: Verified diff --git a/README b/README.md similarity index 64% rename from README rename to README.md index 8ae4e49..3592013 100644 --- a/README +++ b/README.md @@ -1,3 +1,7 @@ +# Python Wikipedia Robot Framework + +[![Build Status](https://secure.travis-ci.org/wikimedia/pywikibot-core.png?branch=master)](http://travis-ci.org/wikimedia/pywikibot-core) + This is the rewrite of the Python Wikipedia Robot Framework. It features several improvements, such as full API usage and a pythonic package layout. -- To view, visit https://gerrit.wikimedia.org/r/78487 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie0e3e2cc82ed9ff118801de51a6fdcb5682b38d4 Gerrit-PatchSet: 3 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: DrTrigon dr.tri...@surfeu.ch Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl 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 NewUserMessage extension on ckb.wikipedia - change (operations/mediawiki-config)
Dereckson has uploaded a new change for review. https://gerrit.wikimedia.org/r/78613 Change subject: Enable NewUserMessage extension on ckb.wikipedia .. Enable NewUserMessage extension on ckb.wikipedia Bug: 56278 Change-Id: Icabc2ac00736f435221aecaf0870a5a3b45ee169 --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/13/78613/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index fa9684e..4dc723f 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -9997,6 +9997,7 @@ 'default' = false, 'arwiki' = true, 'arwikisource' = true, + 'ckbwiki' = true, // Bug 52678 'commonswiki' = true, 'enwikinews' = true, 'guwiki' = true, // Bug 40872 -- To view, visit https://gerrit.wikimedia.org/r/78613 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icabc2ac00736f435221aecaf0870a5a3b45ee169 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Dereckson dereck...@espace-win.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mod. increase polling timeouts. - change (analytics/user-metrics)
Rfaulk has uploaded a new change for review. https://gerrit.wikimedia.org/r/78615 Change subject: mod. increase polling timeouts. .. mod. increase polling timeouts. Change-Id: Ia0a30ea4e1964e8cd3e69a6c3279f1b3e75c900d --- M user_metrics/api/engine/request_manager.py M user_metrics/api/engine/response_handler.py 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/user-metrics refs/changes/15/78615/1 diff --git a/user_metrics/api/engine/request_manager.py b/user_metrics/api/engine/request_manager.py index 32039cf..868bdd8 100644 --- a/user_metrics/api/engine/request_manager.py +++ b/user_metrics/api/engine/request_manager.py @@ -109,7 +109,7 @@ MAX_BLOCK_SIZE = 5000 MAX_CONCURRENT_JOBS = 1 QUEUE_WAIT = 5 -RESQUEST_TIMEOUT = 1.0 +RESQUEST_TIMEOUT = 3.0 # Defines the job item type used to temporarily store job progress job_item_type = namedtuple('JobItem', 'id process request queue') diff --git a/user_metrics/api/engine/response_handler.py b/user_metrics/api/engine/response_handler.py index b99cd17..2158283 100644 --- a/user_metrics/api/engine/response_handler.py +++ b/user_metrics/api/engine/response_handler.py @@ -18,7 +18,7 @@ # Timeout in seconds to wait for data on the queue. This should be long # enough to ensure that the full response can be received -RESPONSE_TIMEOUT = 1.0 +RESPONSE_TIMEOUT = 3.0 # API RESPONSE HANDLER -- To view, visit https://gerrit.wikimedia.org/r/78615 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia0a30ea4e1964e8cd3e69a6c3279f1b3e75c900d Gerrit-PatchSet: 1 Gerrit-Project: analytics/user-metrics Gerrit-Branch: master Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] fix. logic around request processing. - change (analytics/user-metrics)
Rfaulk has uploaded a new change for review. https://gerrit.wikimedia.org/r/78614 Change subject: fix. logic around request processing. .. fix. logic around request processing. Change-Id: I1c891b8df0d21d4df91560c6a4d72ad6c4297790 --- M user_metrics/api/engine/request_manager.py 1 file changed, 48 insertions(+), 50 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/user-metrics refs/changes/14/78614/1 diff --git a/user_metrics/api/engine/request_manager.py b/user_metrics/api/engine/request_manager.py index 4770577..32039cf 100644 --- a/user_metrics/api/engine/request_manager.py +++ b/user_metrics/api/engine/request_manager.py @@ -149,7 +149,11 @@ logging.debug(log_name + ' :: POLLING REQUESTS...') logging.debug(log_name + ' :: JOB QUEUE - {0}'.format(str(job_queue))) -if concurrent_jobs = MAX_CONCURRENT_JOBS: +req_item = None + +# Only process if there are fewer than the maximum number of concurrent +# jobs +if concurrent_jobs MAX_CONCURRENT_JOBS: # Pop from request target req_item = umapi_broker_context.pop(REQUEST_BROKER_TARGET) @@ -159,73 +163,67 @@ url_hash = sha1(req_item.encode('utf-8')).hexdigest() umapi_broker_context.add(PROCESS_BROKER_TARGET, url_hash, req_item) -else: -continue -else: -continue -# Continue if there is no request or the job_queue is empty -if not req_item and not concurrent_jobs: -continue - -logging.debug(log_name + ' :: PULLING item from request queue - ' - '\n\t{0}' - .format(req_item)) +logging.debug(log_name + ' :: PULLING item from request queue - ' + '\n\t{0}' + .format(req_item)) # Process complete jobs # - -for job_item in job_queue: +if concurrent_jobs: +for job_item in job_queue: -if not job_item.queue.empty(): +if not job_item.queue.empty(): -logging.info(log_name + ' :: READING RESPONSE - {0}'. -format(job_item.request)) +logging.info(log_name + ' :: READING RESPONSE - {0}'. +format(job_item.request)) -# Pull data off of the queue and add it to response queue -data = '' -while not job_item.queue.empty(): -data += job_item.queue.get(True) +# Pull data off of the queue and add it to response queue +data = '' +while not job_item.queue.empty(): +data += job_item.queue.get(True) -# Remove from process target -url_hash = sha1(job_item.request.encode('utf-8')).hexdigest() -try: -umapi_broker_context.remove(PROCESS_BROKER_TARGET, -url_hash) -except Exception as e: -logging.error(log_name + ' :: Could not process ' - '{0} from {1} -- {2}'. -format(job_item.request, - PROCESS_BROKER_TARGET, - e.message)) +# Remove from process target +url_hash = sha1(job_item.request.encode('utf-8')).hexdigest() +try: +umapi_broker_context.remove(PROCESS_BROKER_TARGET, +url_hash) +except Exception as e: +logging.error(log_name + ' :: Could not process ' + '{0} from {1} -- {2}'. +format(job_item.request, + PROCESS_BROKER_TARGET, + e.message)) -# Add to response target -umapi_broker_context.add(RESPONSE_BROKER_TARGET, url_hash, - pack_response_for_broker( - job_item.request, data)) +# Add to response target +umapi_broker_context.add(RESPONSE_BROKER_TARGET, url_hash, + pack_response_for_broker( + job_item.request, data)) -del job_queue[job_queue.index(job_item)] -concurrent_jobs -= 1 -logging.debug(log_name + ' :: RUN - RESPONSE - Job ID {0}' - '\n\tConcurrent jobs = {1}'
[MediaWiki-commits] [Gerrit] fix. logic around request processing. - change (analytics/user-metrics)
Rfaulk has submitted this change and it was merged. Change subject: fix. logic around request processing. .. fix. logic around request processing. Change-Id: I1c891b8df0d21d4df91560c6a4d72ad6c4297790 --- M user_metrics/api/engine/request_manager.py 1 file changed, 48 insertions(+), 50 deletions(-) Approvals: Rfaulk: Verified; Looks good to me, approved diff --git a/user_metrics/api/engine/request_manager.py b/user_metrics/api/engine/request_manager.py index 4770577..32039cf 100644 --- a/user_metrics/api/engine/request_manager.py +++ b/user_metrics/api/engine/request_manager.py @@ -149,7 +149,11 @@ logging.debug(log_name + ' :: POLLING REQUESTS...') logging.debug(log_name + ' :: JOB QUEUE - {0}'.format(str(job_queue))) -if concurrent_jobs = MAX_CONCURRENT_JOBS: +req_item = None + +# Only process if there are fewer than the maximum number of concurrent +# jobs +if concurrent_jobs MAX_CONCURRENT_JOBS: # Pop from request target req_item = umapi_broker_context.pop(REQUEST_BROKER_TARGET) @@ -159,73 +163,67 @@ url_hash = sha1(req_item.encode('utf-8')).hexdigest() umapi_broker_context.add(PROCESS_BROKER_TARGET, url_hash, req_item) -else: -continue -else: -continue -# Continue if there is no request or the job_queue is empty -if not req_item and not concurrent_jobs: -continue - -logging.debug(log_name + ' :: PULLING item from request queue - ' - '\n\t{0}' - .format(req_item)) +logging.debug(log_name + ' :: PULLING item from request queue - ' + '\n\t{0}' + .format(req_item)) # Process complete jobs # - -for job_item in job_queue: +if concurrent_jobs: +for job_item in job_queue: -if not job_item.queue.empty(): +if not job_item.queue.empty(): -logging.info(log_name + ' :: READING RESPONSE - {0}'. -format(job_item.request)) +logging.info(log_name + ' :: READING RESPONSE - {0}'. +format(job_item.request)) -# Pull data off of the queue and add it to response queue -data = '' -while not job_item.queue.empty(): -data += job_item.queue.get(True) +# Pull data off of the queue and add it to response queue +data = '' +while not job_item.queue.empty(): +data += job_item.queue.get(True) -# Remove from process target -url_hash = sha1(job_item.request.encode('utf-8')).hexdigest() -try: -umapi_broker_context.remove(PROCESS_BROKER_TARGET, -url_hash) -except Exception as e: -logging.error(log_name + ' :: Could not process ' - '{0} from {1} -- {2}'. -format(job_item.request, - PROCESS_BROKER_TARGET, - e.message)) +# Remove from process target +url_hash = sha1(job_item.request.encode('utf-8')).hexdigest() +try: +umapi_broker_context.remove(PROCESS_BROKER_TARGET, +url_hash) +except Exception as e: +logging.error(log_name + ' :: Could not process ' + '{0} from {1} -- {2}'. +format(job_item.request, + PROCESS_BROKER_TARGET, + e.message)) -# Add to response target -umapi_broker_context.add(RESPONSE_BROKER_TARGET, url_hash, - pack_response_for_broker( - job_item.request, data)) +# Add to response target +umapi_broker_context.add(RESPONSE_BROKER_TARGET, url_hash, + pack_response_for_broker( + job_item.request, data)) -del job_queue[job_queue.index(job_item)] -concurrent_jobs -= 1 -logging.debug(log_name + ' :: RUN - RESPONSE - Job ID {0}' - '\n\tConcurrent jobs = {1}' - .format(str(job_item.id),
[MediaWiki-commits] [Gerrit] mod. increase polling timeouts. - change (analytics/user-metrics)
Rfaulk has submitted this change and it was merged. Change subject: mod. increase polling timeouts. .. mod. increase polling timeouts. Change-Id: Ia0a30ea4e1964e8cd3e69a6c3279f1b3e75c900d --- M user_metrics/api/engine/request_manager.py M user_metrics/api/engine/response_handler.py 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Rfaulk: Verified; Looks good to me, approved diff --git a/user_metrics/api/engine/request_manager.py b/user_metrics/api/engine/request_manager.py index 32039cf..868bdd8 100644 --- a/user_metrics/api/engine/request_manager.py +++ b/user_metrics/api/engine/request_manager.py @@ -109,7 +109,7 @@ MAX_BLOCK_SIZE = 5000 MAX_CONCURRENT_JOBS = 1 QUEUE_WAIT = 5 -RESQUEST_TIMEOUT = 1.0 +RESQUEST_TIMEOUT = 3.0 # Defines the job item type used to temporarily store job progress job_item_type = namedtuple('JobItem', 'id process request queue') diff --git a/user_metrics/api/engine/response_handler.py b/user_metrics/api/engine/response_handler.py index b99cd17..2158283 100644 --- a/user_metrics/api/engine/response_handler.py +++ b/user_metrics/api/engine/response_handler.py @@ -18,7 +18,7 @@ # Timeout in seconds to wait for data on the queue. This should be long # enough to ensure that the full response can be received -RESPONSE_TIMEOUT = 1.0 +RESPONSE_TIMEOUT = 3.0 # API RESPONSE HANDLER -- To view, visit https://gerrit.wikimedia.org/r/78615 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia0a30ea4e1964e8cd3e69a6c3279f1b3e75c900d Gerrit-PatchSet: 1 Gerrit-Project: analytics/user-metrics Gerrit-Branch: master Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org Gerrit-Reviewer: Rfaulk rfaulk...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make restoreprefs crystal clear about the meaning of *all* - change (mediawiki/core)
Nemo bis has uploaded a new change for review. https://gerrit.wikimedia.org/r/78616 Change subject: Make restoreprefs crystal clear about the meaning of *all* .. Make restoreprefs crystal clear about the meaning of *all* No objections since 2011 to the simple proposal in comment 0. Visual improvements can be performed at any time; given the current position of the button, a slightly longer text is not a problem. Bug: 33327 Change-Id: Ia94e4989f40088aeace9391bfdf5137a8e3c26e8 --- M languages/messages/MessagesEn.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/16/78616/1 diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 57e2cc3..c9b4669 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1926,7 +1926,7 @@ 'prefs-rendering' = 'Appearance', 'saveprefs' = 'Save', 'resetprefs'= 'Clear unsaved changes', -'restoreprefs' = 'Restore all default settings', +'restoreprefs' = 'Restore all default settings (in all sections)', 'prefs-editing' = 'Editing', 'rows' = 'Rows:', 'columns' = 'Columns:', -- To view, visit https://gerrit.wikimedia.org/r/78616 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia94e4989f40088aeace9391bfdf5137a8e3c26e8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Nemo bis federicol...@tiscali.it ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] centralauth-account-exists-reset should give link to a wiki ... - change (mediawiki...CentralAuth)
Nemo bis has uploaded a new change for review. https://gerrit.wikimedia.org/r/78617 Change subject: centralauth-account-exists-reset should give link to a wiki where the account exists .. centralauth-account-exists-reset should give link to a wiki where the account exists In this patch I just add a link to Special:CentralAuth; the user will then have to click one of the wiki nams and then access Special:PasswordReset there. I have no idea on how to dynamically generate an URL to one such wiki in here. Bug: 37219 Change-Id: I502f227ab573303b3499f92bc731b88c8ec310b7 --- M CentralAuth.i18n.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth refs/changes/17/78617/1 diff --git a/CentralAuth.i18n.php b/CentralAuth.i18n.php index a9d8a9b..eca1c42 100644 --- a/CentralAuth.i18n.php +++ b/CentralAuth.i18n.php @@ -261,7 +261,7 @@ // Other messages 'centralauth-invalid-wiki' = 'No such wiki database: $1', 'centralauth-account-exists' = 'Cannot create account: the requested username is already taken in the unified login system.', - 'centralauth-account-exists-reset' = 'The username $1 is not registered on this wiki, but it does exist in the unified login system.', + 'centralauth-account-exists-reset' = 'The username $1 is not registered on this wiki, but you can reset its password on [[Special:CentralAuth/$1|one of the wiki where it is]].', 'centralauth-login-progress' = 'Logging you in to wikis of {{int:Centralauth-groupname}}:', # This message supports {{GENDER}} 'centralauth-login-no-others'= 'You have been automatically logged into other projects of {{int:Centralauth-groupname}}.', 'centralauth-hidden-blockreason' = 'globally hidden by $1 at $2 with following reason: $3', -- To view, visit https://gerrit.wikimedia.org/r/78617 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I502f227ab573303b3499f92bc731b88c8ec310b7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralAuth Gerrit-Branch: master Gerrit-Owner: Nemo bis federicol...@tiscali.it Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Removed code that went dead after changes in commit 171e1596 - change (mediawiki...Parsoid)
Subramanya Sastry has uploaded a new change for review. https://gerrit.wikimedia.org/r/78618 Change subject: Removed code that went dead after changes in commit 171e1596 .. Removed code that went dead after changes in commit 171e1596 * PreHandler FSM changed in the above commit which killed some of the checks and code there. I should have recognized that and cleaned up back then .. but better late than never. Change-Id: I1fbd820db1a6b1e079d255bd13b4970865128dcf --- M js/lib/ext.core.PreHandler.js 1 file changed, 5 insertions(+), 25 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/18/78618/1 diff --git a/js/lib/ext.core.PreHandler.js b/js/lib/ext.core.PreHandler.js index e158488..72e2296 100644 --- a/js/lib/ext.core.PreHandler.js +++ b/js/lib/ext.core.PreHandler.js @@ -32,10 +32,9 @@ | SOL | --- sol-tr -- | SOL | TOKS tok | | SOL | --- other -- | IGNORE| purge| + --+-+---+--+ - | PRE | --- nl -- | SOL | purge if |TOKS| == 0 | - | | | | gen-pre if |TOKS| 0 (#)| - | PRE | html-blk tag | IGNORE| purge if |TOKS| == 0 | - | | wt-table tag | | gen-pre if |TOKS| 0 (#)| + | PRE | --- nl -- | SOL | purge| + | PRE | html-blk tag | IGNORE| purge| + | | wt-table tag | | | | PRE | --- eof -- | SOL | purge| | PRE | --- sol-tr -- | PRE | SOL-TR-TOKS tok | | PRE | --- other -- | PRE_COLLECT | TOKS = SOL-TR-TOKS + tok | @@ -55,13 +54,6 @@ | IGNORE| --- nl -- | SOL | purge| | IGNORE| --- eof -- | SOL | purge| + --+-+---+--+ - - # In PRE-state, |TOKS| 0 only if we got here from MULTILINE_PRE. In addition, - we are guaranteed that they will not all be whitespace/sol-transparent tokens - since the transition path would have been: - SOL - PRE - PRE_COLLECT - MULTILINE_PRE - PRE - and the transition from PRE - PRE_COLLECT adds a non-ws/non-sol-tr token - to TOKS. ## In these states, check if the whitespace token is a single space or has additional chars (white-space or non-whitespace) -- if yes, slice it off @@ -227,13 +219,7 @@ break; case PreHandler.STATE_PRE: - if (this.tokens.length 0) { - // we got here from a multiline-pre - ret = this.processPre(token); - } else { - // we will never get here from a multiline-pre - ret = this.getResultAndReset(token); - } + ret = this.getResultAndReset(token); this.preTSR = initPreTSR(token); this.state = PreHandler.STATE_SOL; break; @@ -350,13 +336,7 @@ } else if (Util.isTableTag(token) || (token.isHTMLTag() Util.isBlockTag(token.name))) { - if (this.tokens.length 0) { - // we got here from a multiline-pre - ret = this.processPre(token); - } else { - // we can never get here from a multiline-pre - ret = this.getResultAndReset(token); - } + ret = this.getResultAndReset(token); this.moveToIgnoreState(); } else { this.tokens = this.tokens.concat(this.solTransparentTokens); -- To view, visit https://gerrit.wikimedia.org/r/78618 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1fbd820db1a6b1e079d255bd13b4970865128dcf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: Subramanya Sastry ssas...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add maintenance script to populate revision diffs in database - change (mediawiki...CodeReview)
jenkins-bot has submitted this change and it was merged. Change subject: Add maintenance script to populate revision diffs in database .. Add maintenance script to populate revision diffs in database Change-Id: Ia011e9cc04577544892358d1c63025575d8b0470 --- A maintenance/getRevisionDiffs.php 1 file changed, 63 insertions(+), 0 deletions(-) Approvals: Reedy: Looks good to me, approved jenkins-bot: Verified diff --git a/maintenance/getRevisionDiffs.php b/maintenance/getRevisionDiffs.php new file mode 100644 index 000..86b4eab --- /dev/null +++ b/maintenance/getRevisionDiffs.php @@ -0,0 +1,63 @@ +?php + +$IP = getenv( 'MW_INSTALL_PATH' ); +if ( $IP === false ) { + $IP = dirname( __FILE__ ) . '/../../..'; +} +require_once( $IP/maintenance/Maintenance.php ); + +class GetRevisionDiffs extends Maintenance { + public function __construct() { + parent::__construct(); + $this-mDescription = Populates the cr_diff column (where possible) for all rows in a repo; + $this-addArg( 'repo', 'The name of the repo. Cannot be all.' ); + } + + public function execute() { + $repoName = $this-getArg( 0 ); + + if ( $repoName == all ) { + $this-error( Cannot use the 'all' repo, true ); + } + + $repo = CodeRepository::newFromName( $repoName ); + if ( !$repo ) { + $this-error( Repo '{$repoName}' is not a valid Repository, true ); + } + + $dbr = wfGetDB( DB_SLAVE ); + + $res = $dbr-select( + 'code_rev', + 'cr_id', + array( 'cr_repo_id' = $repo-getId(), 'cr_diff IS null', ), + __METHOD__ + ); + + $count = 0; + foreach ( $res as $row ) { + $id = $row-cr_id; + try { + $diff = $repo-getDiff( $row-cr_id , '' ); + } catch ( MWException $mwe ) { + // Suppress errors + $this-output( $id - error {$mwe-getMessage()}\n ); + continue; + } + if ( is_int( $diff ) ) { + $error = CodeRepository::getDiffErrorMessage( $diff ); + $this-output( $id - $error\n ); + } else { + $this-output( $id\n ); + } + + if ( ++$count % 100 == 0 ) { + wfWaitForSlaves(); + } + } + $this-output( Done!\n ); + } +} + +$maintClass = GetRevisionDiffs; +require_once( DO_MAINTENANCE ); -- To view, visit https://gerrit.wikimedia.org/r/78497 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia011e9cc04577544892358d1c63025575d8b0470 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/CodeReview Gerrit-Branch: master Gerrit-Owner: Reedy re...@wikimedia.org Gerrit-Reviewer: Reedy re...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Check against invalid target names after parsing rather than... - change (mediawiki...MassMessage)
jenkins-bot has submitted this change and it was merged. Change subject: Check against invalid target names after parsing rather than when we run the job .. Check against invalid target names after parsing rather than when we run the job Change-Id: I354407fb18289cf18134fb7466259f434330f6a8 --- M MassMessage.body.php M tests/MassMessageTest.php 2 files changed, 31 insertions(+), 4 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/MassMessage.body.php b/MassMessage.body.php index 1dcb8f0..4da919c 100644 --- a/MassMessage.body.php +++ b/MassMessage.body.php @@ -152,6 +152,27 @@ } /** +* Perform various normalization functions on the target data +* @param array $data +* @return array +*/ + public static function normalizeTargets( $data ) { + $targets = array(); + foreach ( $data as $target ) { + // Check invalid titles + $title = Title::newFromText( $target['title'] ); + if ( $title === null ) { + // This checks against the local wiki's invalid list, not foreign wiki + continue; + } + + $targets[] = $target; + } + + return $targets; + } + + /** * Get an array of targets via the #target parser function * @param Title $spamlist * @param IContextSource $context @@ -182,7 +203,7 @@ $data = unserialize( $output-getProperty( 'massmessage-targets' ) ); if ( $data ) { - return $data; + return MassMessage::normalizeTargets( $data ); } else { return array(); // No parser functions on page } diff --git a/tests/MassMessageTest.php b/tests/MassMessageTest.php index ecadda3..065236e 100644 --- a/tests/MassMessageTest.php +++ b/tests/MassMessageTest.php @@ -29,6 +29,7 @@ global $wgDBname; return array( array( '{{#target:User talk:Example}}', array( 'dbname' = $wgDBname, 'title' = 'User talk:Example' ), ), + array( '{{#target:User:}}', array(), ), ); } @@ -41,9 +42,14 @@ public function testGetParserFunctionTargets( $text, $check ) { self::updatePage( $this-page, $text ); $data = MassMessage::getParserFunctionTargets( $this-title, RequestContext::getMain() ); - $data = $data[0]; // We're just testing the first value - foreach ( $check as $key = $value ) { - $this-assertEquals( $data[$key], $value ); + if ( empty( $check ) ) { + // Check that the spamlist is empty + $this-assertTrue( empty( $data ) ); + } else { + $data = $data[0]; // We're just testing the first value + foreach ( $check as $key = $value ) { + $this-assertEquals( $data[$key], $value ); + } } } -- To view, visit https://gerrit.wikimedia.org/r/78012 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I354407fb18289cf18134fb7466259f434330f6a8 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/MassMessage Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: MZMcBride w...@mzmcbride.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update CodeReview to master - change (mediawiki/core)
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/78619 Change subject: Update CodeReview to master .. Update CodeReview to master Change-Id: I93fbcc9217b2cd9645a45d5076b0db2b2330827b --- M extensions/CodeReview 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/19/78619/1 diff --git a/extensions/CodeReview b/extensions/CodeReview index 3f375e4..713704d 16 --- a/extensions/CodeReview +++ b/extensions/CodeReview -Subproject commit 3f375e4ae894b0ce40db2215b23ab251da15223a +Subproject commit 713704da22c9a6b140c07d11b5df75093693763d -- To view, visit https://gerrit.wikimedia.org/r/78619 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I93fbcc9217b2cd9645a45d5076b0db2b2330827b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.22wmf12 Gerrit-Owner: Reedy re...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update CodeReview to master - change (mediawiki/core)
Reedy has submitted this change and it was merged. Change subject: Update CodeReview to master .. Update CodeReview to master Change-Id: I93fbcc9217b2cd9645a45d5076b0db2b2330827b --- M extensions/CodeReview 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Reedy: Verified; Looks good to me, approved diff --git a/extensions/CodeReview b/extensions/CodeReview index 3f375e4..713704d 16 --- a/extensions/CodeReview +++ b/extensions/CodeReview -Subproject commit 3f375e4ae894b0ce40db2215b23ab251da15223a +Subproject commit 713704da22c9a6b140c07d11b5df75093693763d -- To view, visit https://gerrit.wikimedia.org/r/78619 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I93fbcc9217b2cd9645a45d5076b0db2b2330827b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.22wmf12 Gerrit-Owner: Reedy re...@wikimedia.org Gerrit-Reviewer: Reedy re...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use the dbname to detect whether the page is local or not - change (mediawiki...MassMessage)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/78620 Change subject: Use the dbname to detect whether the page is local or not .. Use the dbname to detect whether the page is local or not $isLocal was removed in Ic194f19c047bc920bf9186b6902c42451838b43b Change-Id: I83c112b30a1ad1f6392abebe60143e02ad57aa88 --- M MassMessage.body.php 1 file changed, 12 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MassMessage refs/changes/20/78620/1 diff --git a/MassMessage.body.php b/MassMessage.body.php index c5c22bd..b810cea 100644 --- a/MassMessage.body.php +++ b/MassMessage.body.php @@ -118,17 +118,11 @@ * @return array * @fixme Follow redirects on other sites */ - public static function normalizeSpamList( $pages, $isLocal ) { + public static function normalizeSpamList( $pages ) { + global $wgDBname; $data = array(); foreach ( $pages as $page ) { - if ( $isLocal ) { - $title = Title::newFromText( $page['title'] ); - $title = self::followRedirect( $title ); - if ( $title == null ) { - continue; // Interwiki redirect - } - $page['title'] = $title-getFullText(); - } + if ( !isset( $page['dbname'] ) ) { $dbname = self::getDBName( $page['site'] ); if ( $dbname == null ) { // Not set in $wgConf? @@ -137,6 +131,15 @@ $page['dbname'] = $dbname; } + if ( $page['dbname'] == $wgDBname ) { + $title = Title::newFromText( $page['title'] ); + $title = self::followRedirect( $title ); + if ( $title == null ) { + continue; // Interwiki redirect + } + $page['title'] = $title-getFullText(); + } + // Use an assoc array to clear dupes $data[$page['title'] . $page['dbname']] = $page; } -- To view, visit https://gerrit.wikimedia.org/r/78620 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I83c112b30a1ad1f6392abebe60143e02ad57aa88 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MassMessage Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use the dbname to detect whether the page is local or not - change (mediawiki...MassMessage)
jenkins-bot has submitted this change and it was merged. Change subject: Use the dbname to detect whether the page is local or not .. Use the dbname to detect whether the page is local or not $isLocal was removed in Ic194f19c047bc920bf9186b6902c42451838b43b Change-Id: I83c112b30a1ad1f6392abebe60143e02ad57aa88 --- M MassMessage.body.php 1 file changed, 12 insertions(+), 9 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/MassMessage.body.php b/MassMessage.body.php index c5c22bd..b810cea 100644 --- a/MassMessage.body.php +++ b/MassMessage.body.php @@ -118,17 +118,11 @@ * @return array * @fixme Follow redirects on other sites */ - public static function normalizeSpamList( $pages, $isLocal ) { + public static function normalizeSpamList( $pages ) { + global $wgDBname; $data = array(); foreach ( $pages as $page ) { - if ( $isLocal ) { - $title = Title::newFromText( $page['title'] ); - $title = self::followRedirect( $title ); - if ( $title == null ) { - continue; // Interwiki redirect - } - $page['title'] = $title-getFullText(); - } + if ( !isset( $page['dbname'] ) ) { $dbname = self::getDBName( $page['site'] ); if ( $dbname == null ) { // Not set in $wgConf? @@ -137,6 +131,15 @@ $page['dbname'] = $dbname; } + if ( $page['dbname'] == $wgDBname ) { + $title = Title::newFromText( $page['title'] ); + $title = self::followRedirect( $title ); + if ( $title == null ) { + continue; // Interwiki redirect + } + $page['title'] = $title-getFullText(); + } + // Use an assoc array to clear dupes $data[$page['title'] . $page['dbname']] = $page; } -- To view, visit https://gerrit.wikimedia.org/r/78620 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I83c112b30a1ad1f6392abebe60143e02ad57aa88 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MassMessage Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix documentation - change (mediawiki...MassMessage)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/78621 Change subject: Fix documentation .. Fix documentation Change-Id: If0f0f3cffdcf8b135a35b24fd393241b4193d0dc --- M MassMessage.body.php 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MassMessage refs/changes/21/78621/1 diff --git a/MassMessage.body.php b/MassMessage.body.php index b810cea..75adf4f 100644 --- a/MassMessage.body.php +++ b/MassMessage.body.php @@ -114,7 +114,6 @@ * Normalizes an array of page/site combos * Also removes some dupes * @param array $pages -* @param bool $isLocal * @return array * @fixme Follow redirects on other sites */ -- To view, visit https://gerrit.wikimedia.org/r/78621 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If0f0f3cffdcf8b135a35b24fd393241b4193d0dc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MassMessage Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix documentation - change (mediawiki...MassMessage)
jenkins-bot has submitted this change and it was merged. Change subject: Fix documentation .. Fix documentation Change-Id: If0f0f3cffdcf8b135a35b24fd393241b4193d0dc --- M MassMessage.body.php 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/MassMessage.body.php b/MassMessage.body.php index b810cea..75adf4f 100644 --- a/MassMessage.body.php +++ b/MassMessage.body.php @@ -114,7 +114,6 @@ * Normalizes an array of page/site combos * Also removes some dupes * @param array $pages -* @param bool $isLocal * @return array * @fixme Follow redirects on other sites */ -- To view, visit https://gerrit.wikimedia.org/r/78621 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If0f0f3cffdcf8b135a35b24fd393241b4193d0dc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MassMessage Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Don't use wfMemcKey so the cache is not split across multipl... - change (mediawiki...MassMessage)
jenkins-bot has submitted this change and it was merged. Change subject: Don't use wfMemcKey so the cache is not split across multiple wikis .. Don't use wfMemcKey so the cache is not split across multiple wikis Change-Id: Ifb3398ffbd4dc29e942f14c0d2653756dd584061 --- M MassMessage.body.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Reedy: Looks good to me, approved jenkins-bot: Verified diff --git a/MassMessage.body.php b/MassMessage.body.php index 75adf4f..69800e4 100644 --- a/MassMessage.body.php +++ b/MassMessage.body.php @@ -91,7 +91,7 @@ */ public static function getDBName( $host ) { global $wgConf, $wgMemc; - $key = wfMemcKey( 'massmessage', 'urltodb', $host ); + $key = 'massmessage:urltodb:' . $host; // Don't use wfMemcKey since it splits cache per wiki $data = $wgMemc-get( $key ); if ( $data !== false ) { return $data; -- To view, visit https://gerrit.wikimedia.org/r/78385 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifb3398ffbd4dc29e942f14c0d2653756dd584061 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/MassMessage Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Reedy re...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Set up Babel categories for eswikivoyage - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Set up Babel categories for eswikivoyage .. Set up Babel categories for eswikivoyage Per community request. Bug: 52309 Change-Id: I89a199c1e22f95972c4117592c15169ed20cb122 --- M wmf-config/InitialiseSettings.php 1 file changed, 9 insertions(+), 0 deletions(-) Approvals: Reedy: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index fa9684e..5b18830 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -11347,6 +11347,15 @@ '5' = false, 'N' = 'Usuario %code%-N', ), + 'eswikivoyage' = array( // bug 52309 + '0' = 'Usuario %code%-0', + '1' = 'Usuario %code%-1', + '2' = 'Usuario %code%-2', + '3' = 'Usuario %code%-3', + '4' = 'Usuario %code%-4', + '5' = 'Usuario %code%-5', + 'N' = 'Usuario %code%-N', + ), 'fiwiki' = array( '0' = false, '1' = 'User %code%-1', -- To view, visit https://gerrit.wikimedia.org/r/78505 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I89a199c1e22f95972c4117592c15169ed20cb122 Gerrit-PatchSet: 3 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: TTO at.li...@live.com.au Gerrit-Reviewer: Reedy re...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] cswikisource: Set AbuseFilter notifications - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: cswikisource: Set AbuseFilter notifications .. cswikisource: Set AbuseFilter notifications Change-Id: I7238692cd70cc47102fc48cecef9f5d05278f1a3 --- M wmf-config/abusefilter.php 1 file changed, 3 insertions(+), 2 deletions(-) Approvals: Reedy: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/abusefilter.php b/wmf-config/abusefilter.php index 7248e39..bbbacd8 100644 --- a/wmf-config/abusefilter.php +++ b/wmf-config/abusefilter.php @@ -46,11 +46,12 @@ $wgGroupPermissions['autoconfirmed']['abusefilter-log-detail'] = true; $wgAbuseFilterAvailableActions[] = 'block'; $wgAbuseFilterBlockDuration = '2 hours'; - } elseif ( $wgDBname == 'cswiktionary' ) { $wgAbuseFilterNotifications = udp; $wgAbuseFilterNotificationsPrivate = true; - +} elseif ( $wgDBname == 'cswikisource' ) { + $wgAbuseFilterNotifications = udp; + $wgAbuseFilterNotificationsPrivate = true; } elseif ( $wgDBname == 'dewiki' ) { // Removed custom AbuseFilter settings per bug 18223 --Andrew 2009-03-29 // Where on earth did this come from? --Andrew -- To view, visit https://gerrit.wikimedia.org/r/78533 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7238692cd70cc47102fc48cecef9f5d05278f1a3 Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Danny B. dann...@email.cz Gerrit-Reviewer: Reedy re...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove some hard-coded 'wikipedia' from core in I3c156792 - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Remove some hard-coded 'wikipedia' from core in I3c156792 .. Remove some hard-coded 'wikipedia' from core in I3c156792 Change-Id: I031cd8d3f7da5435d518f46df35d15cb935406d3 --- M wmf-config/wgConf.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Reedy: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/wgConf.php b/wmf-config/wgConf.php index dd2e29a..12dafdf 100644 --- a/wmf-config/wgConf.php +++ b/wmf-config/wgConf.php @@ -8,7 +8,7 @@ $wgConf-suffixes = array( // 'wikipedia', - 'wiki', + 'wikipedia' = 'wiki', 'wiktionary', 'wikiquote', 'wikibooks', -- To view, visit https://gerrit.wikimedia.org/r/66339 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I031cd8d3f7da5435d518f46df35d15cb935406d3 Gerrit-PatchSet: 3 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Liangent liang...@gmail.com Gerrit-Reviewer: Demon ch...@wikimedia.org Gerrit-Reviewer: Dereckson dereck...@espace-win.org Gerrit-Reviewer: Reedy re...@wikimedia.org Gerrit-Reviewer: Siebrand siebr...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add moon (Q405) to the list of globes - change (pywikibot/core)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/78622 Change subject: Add moon (Q405) to the list of globes .. Add moon (Q405) to the list of globes Change-Id: I2dd9f87fcb1d748bff94328575f8439dc36035e3 --- M pywikibot/families/wikidata_family.py 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/22/78622/1 diff --git a/pywikibot/families/wikidata_family.py b/pywikibot/families/wikidata_family.py index 320af9d..3ec3ff2 100644 --- a/pywikibot/families/wikidata_family.py +++ b/pywikibot/families/wikidata_family.py @@ -40,4 +40,5 @@ def globes(self, code): Supported globes for Coordinate datatype -return {'earth': 'http://www.wikidata.org/entity/Q2'} +return {'earth': 'http://www.wikidata.org/entity/Q2', +'moon': 'http://www.wikidata.org/entity/Q405'} -- To view, visit https://gerrit.wikimedia.org/r/78622 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2dd9f87fcb1d748bff94328575f8439dc36035e3 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits