[MediaWiki-commits] [Gerrit] beta: bastion ssh rule needs the class that defines bastion ip - change (operations/puppet)
ArielGlenn has uploaded a new change for review. https://gerrit.wikimedia.org/r/166717 Change subject: beta: bastion ssh rule needs the class that defines bastion ip .. beta: bastion ssh rule needs the class that defines bastion ip Change-Id: I155977965394e7cac40031427be5e5267ba5321d --- M manifests/role/beta.pp 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/17/166717/1 diff --git a/manifests/role/beta.pp b/manifests/role/beta.pp index d44b1d0..f4046fb 100644 --- a/manifests/role/beta.pp +++ b/manifests/role/beta.pp @@ -83,6 +83,7 @@ description = 'Trebuchet testing host' } +include ::beta::config include ::role::deployment::test # Allow ssh inbound from deployment-bastion.eqiad.wmflabs for testing -- To view, visit https://gerrit.wikimedia.org/r/166717 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I155977965394e7cac40031427be5e5267ba5321d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: ArielGlenn ar...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] beta: bastion ssh rule needs the class that defines bastion ip - change (operations/puppet)
ArielGlenn has submitted this change and it was merged. Change subject: beta: bastion ssh rule needs the class that defines bastion ip .. beta: bastion ssh rule needs the class that defines bastion ip Change-Id: I155977965394e7cac40031427be5e5267ba5321d --- M manifests/role/beta.pp 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: ArielGlenn: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/beta.pp b/manifests/role/beta.pp index d44b1d0..f4046fb 100644 --- a/manifests/role/beta.pp +++ b/manifests/role/beta.pp @@ -83,6 +83,7 @@ description = 'Trebuchet testing host' } +include ::beta::config include ::role::deployment::test # Allow ssh inbound from deployment-bastion.eqiad.wmflabs for testing -- To view, visit https://gerrit.wikimedia.org/r/166717 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I155977965394e7cac40031427be5e5267ba5321d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: ArielGlenn ar...@wikimedia.org Gerrit-Reviewer: ArielGlenn ar...@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] Created new standard directory structure - change (phabricator...Sprint)
Christopher Johnson (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/166718 Change subject: Created new standard directory structure .. Created new standard directory structure Change-Id: Ib1c5f6a02e0c23ea002654ac2fb39384ee2e3a70 --- M __phutil_library_map__.php R src/__tests__/BurndownTestDataGenerator.php R src/application/BurndownApplication.php R src/constants/SprintConstants.php R src/controller/BurndownController.php R src/controller/BurndownDataViewController.php R src/controller/BurndownListController.php R src/controller/SprintReportController.php R src/customfield/SprintEndDateField.php R src/customfield/SprintProjectCustomField.php R src/customfield/SprintStartDateField.php R src/customfield/SprintTaskStoryPointsField.php R src/events/BurndownActionMenuEventListener.php R src/exception/BurndownException.php R src/util/BurndownDataDate.php R src/view/BurndownDataView.php R src/view/SprintReportBurndownView.php R src/view/SprintReportOpenTasksView.php R src/view/SprintView.php 19 files changed, 40 insertions(+), 70 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/phabricator/extensions/Sprint refs/changes/18/166718/1 diff --git a/__phutil_library_map__.php b/__phutil_library_map__.php index fe151c1..148ffec 100644 --- a/__phutil_library_map__.php +++ b/__phutil_library_map__.php @@ -9,27 +9,24 @@ phutil_register_library_map(array( '__library_version__' = 2, 'class' = array( -'BurndownActionMenuEventListener' = 'src/BurndownActionMenuEventListener.php', -'BurndownApplication' = 'src/BurndownApplication.php', -'BurndownController' = 'src/BurndownController.php', -'BurndownDataDate' = 'src/BurndownDataDate.php', -'BurndownDataView' = 'src/BurndownDataView.php', -'BurndownDataViewController' = 'src/BurndownDataViewController.php', -'BurndownException' = 'src/BurndownException.php', -'BurndownListController' = 'src/BurndownListController.php', -'BurndownTestDataGenerator' = 'src/BurndownTestDataGenerator.php', -'SprintConstants' = 'src/SprintConstants.php', -'SprintEndDateField' = 'src/SprintEndDateField.php', -'SprintProjectCustomField' = 'src/SprintProjectCustomField.php', -'SprintReportBurndownView' = 'src/SprintReportBurndownView.php', -'SprintReportController' = 'src/SprintReportController.php', -'SprintStartDateField' = 'src/SprintStartDateField.php', - - -'SprintReportOpenTasksView' = 'src/SprintReportOpenTasksView.php', -'SprintStartDateField' = 'src/SprintStartDateField.php', -'SprintTaskStoryPointsField' = 'src/SprintTaskStoryPointsField.php', -'SprintView' = 'src/SprintView.php', +'BurndownActionMenuEventListener' = 'src/events/BurndownActionMenuEventListener.php', +'BurndownApplication' = 'src/application/BurndownApplication.php', +'BurndownController' = 'src/controller/BurndownController.php', +'BurndownDataDate' = 'src/util/BurndownDataDate.php', +'BurndownDataView' = 'src/view/BurndownDataView.php', +'BurndownDataViewController' = 'src/controller/BurndownDataViewController.php', +'BurndownException' = 'src/exception/BurndownException.php', +'BurndownListController' = 'src/controller/BurndownListController.php', +'BurndownTestDataGenerator' = 'src/__tests__/BurndownTestDataGenerator.php', +'SprintConstants' = 'src/constants/SprintConstants.php', +'SprintEndDateField' = 'src/customfield/SprintEndDateField.php', +'SprintProjectCustomField' = 'src/customfield/SprintProjectCustomField.php', +'SprintReportBurndownView' = 'src/view/SprintReportBurndownView.php', +'SprintReportController' = 'src/controller/SprintReportController.php', +'SprintReportOpenTasksView' = 'src/view/SprintReportOpenTasksView.php', +'SprintStartDateField' = 'src/customfield/SprintStartDateField.php', +'SprintTaskStoryPointsField' = 'src/customfield/SprintTaskStoryPointsField.php', +'SprintView' = 'src/view/SprintView.php', ), 'function' = array(), 'xmap' = array( @@ -43,15 +40,11 @@ 'BurndownTestDataGenerator' = 'PhabricatorTestDataGenerator', 'SprintConstants' = 'ManiphestConstants', 'SprintStartDateField' = 'SprintProjectCustomField', -'SprintConstants' = 'ManiphestConstants', -'SprintStartDateField' = 'SprintProjectCustomField', 'SprintEndDateField' = 'SprintProjectCustomField', 'SprintProjectCustomField' = array( 'PhabricatorProjectCustomField', 'PhabricatorStandardCustomFieldInterface', ), -'SprintReportController' = 'BurndownController', -'SprintReportController' = 'ManiphestController', 'SprintReportBurndownView' = 'SprintView', 'SprintReportController' = 'BurndownController', 'SprintReportOpenTasksView' = 'SprintView', diff --git a/src/BurndownTestDataGenerator.php b/src/__tests__/BurndownTestDataGenerator.php similarity index 100% rename from
[MediaWiki-commits] [Gerrit] Created new standard directory structure - change (phabricator...Sprint)
Christopher Johnson (WMDE) has submitted this change and it was merged. Change subject: Created new standard directory structure .. Created new standard directory structure Change-Id: Ib1c5f6a02e0c23ea002654ac2fb39384ee2e3a70 --- M __phutil_library_map__.php R src/__tests__/BurndownTestDataGenerator.php R src/application/BurndownApplication.php R src/constants/SprintConstants.php R src/controller/BurndownController.php R src/controller/BurndownDataViewController.php R src/controller/BurndownListController.php R src/controller/SprintReportController.php R src/customfield/SprintEndDateField.php R src/customfield/SprintProjectCustomField.php R src/customfield/SprintStartDateField.php R src/customfield/SprintTaskStoryPointsField.php R src/events/BurndownActionMenuEventListener.php R src/exception/BurndownException.php R src/util/BurndownDataDate.php R src/view/BurndownDataView.php R src/view/SprintReportBurndownView.php R src/view/SprintReportOpenTasksView.php R src/view/SprintView.php 19 files changed, 40 insertions(+), 70 deletions(-) Approvals: Christopher Johnson (WMDE): Verified; Looks good to me, approved diff --git a/__phutil_library_map__.php b/__phutil_library_map__.php index fe151c1..148ffec 100644 --- a/__phutil_library_map__.php +++ b/__phutil_library_map__.php @@ -9,27 +9,24 @@ phutil_register_library_map(array( '__library_version__' = 2, 'class' = array( -'BurndownActionMenuEventListener' = 'src/BurndownActionMenuEventListener.php', -'BurndownApplication' = 'src/BurndownApplication.php', -'BurndownController' = 'src/BurndownController.php', -'BurndownDataDate' = 'src/BurndownDataDate.php', -'BurndownDataView' = 'src/BurndownDataView.php', -'BurndownDataViewController' = 'src/BurndownDataViewController.php', -'BurndownException' = 'src/BurndownException.php', -'BurndownListController' = 'src/BurndownListController.php', -'BurndownTestDataGenerator' = 'src/BurndownTestDataGenerator.php', -'SprintConstants' = 'src/SprintConstants.php', -'SprintEndDateField' = 'src/SprintEndDateField.php', -'SprintProjectCustomField' = 'src/SprintProjectCustomField.php', -'SprintReportBurndownView' = 'src/SprintReportBurndownView.php', -'SprintReportController' = 'src/SprintReportController.php', -'SprintStartDateField' = 'src/SprintStartDateField.php', - - -'SprintReportOpenTasksView' = 'src/SprintReportOpenTasksView.php', -'SprintStartDateField' = 'src/SprintStartDateField.php', -'SprintTaskStoryPointsField' = 'src/SprintTaskStoryPointsField.php', -'SprintView' = 'src/SprintView.php', +'BurndownActionMenuEventListener' = 'src/events/BurndownActionMenuEventListener.php', +'BurndownApplication' = 'src/application/BurndownApplication.php', +'BurndownController' = 'src/controller/BurndownController.php', +'BurndownDataDate' = 'src/util/BurndownDataDate.php', +'BurndownDataView' = 'src/view/BurndownDataView.php', +'BurndownDataViewController' = 'src/controller/BurndownDataViewController.php', +'BurndownException' = 'src/exception/BurndownException.php', +'BurndownListController' = 'src/controller/BurndownListController.php', +'BurndownTestDataGenerator' = 'src/__tests__/BurndownTestDataGenerator.php', +'SprintConstants' = 'src/constants/SprintConstants.php', +'SprintEndDateField' = 'src/customfield/SprintEndDateField.php', +'SprintProjectCustomField' = 'src/customfield/SprintProjectCustomField.php', +'SprintReportBurndownView' = 'src/view/SprintReportBurndownView.php', +'SprintReportController' = 'src/controller/SprintReportController.php', +'SprintReportOpenTasksView' = 'src/view/SprintReportOpenTasksView.php', +'SprintStartDateField' = 'src/customfield/SprintStartDateField.php', +'SprintTaskStoryPointsField' = 'src/customfield/SprintTaskStoryPointsField.php', +'SprintView' = 'src/view/SprintView.php', ), 'function' = array(), 'xmap' = array( @@ -43,15 +40,11 @@ 'BurndownTestDataGenerator' = 'PhabricatorTestDataGenerator', 'SprintConstants' = 'ManiphestConstants', 'SprintStartDateField' = 'SprintProjectCustomField', -'SprintConstants' = 'ManiphestConstants', -'SprintStartDateField' = 'SprintProjectCustomField', 'SprintEndDateField' = 'SprintProjectCustomField', 'SprintProjectCustomField' = array( 'PhabricatorProjectCustomField', 'PhabricatorStandardCustomFieldInterface', ), -'SprintReportController' = 'BurndownController', -'SprintReportController' = 'ManiphestController', 'SprintReportBurndownView' = 'SprintView', 'SprintReportController' = 'BurndownController', 'SprintReportOpenTasksView' = 'SprintView', diff --git a/src/BurndownTestDataGenerator.php b/src/__tests__/BurndownTestDataGenerator.php similarity index 100% rename from src/BurndownTestDataGenerator.php rename to
[MediaWiki-commits] [Gerrit] rsync: qualify vars - change (operations/puppet)
Giuseppe Lavagetto has submitted this change and it was merged. Change subject: rsync: qualify vars .. rsync: qualify vars Change-Id: I9f1cfcb09d7edb654182e447d767d588358ed616 --- M modules/rsync/templates/header.erb M modules/rsync/templates/module.erb M modules/rsync/templates/rsync.default.erb 3 files changed, 20 insertions(+), 20 deletions(-) Approvals: Giuseppe Lavagetto: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/rsync/templates/header.erb b/modules/rsync/templates/header.erb index 358ae5b..1ce0ba8 100644 --- a/modules/rsync/templates/header.erb +++ b/modules/rsync/templates/header.erb @@ -3,10 +3,10 @@ uid = nobody gid = nogroup -use chroot = %= use_chroot % -% if log_file != 'UNSET' %log file = %= log_file %% end % +use chroot = %= @use_chroot % +% if @log_file != 'UNSET' %log file = %= @log_file %% end % log format = %t %a %m %f %b syslog facility = local3 timeout = 300 -address = %= address % -% if motd_file != 'UNSET' %motd file = %= motd_file %% end % +address = %= @address % +% if @motd_file != 'UNSET' %motd file = %= @motd_file %% end % diff --git a/modules/rsync/templates/module.erb b/modules/rsync/templates/module.erb index 33aacbf..f37a474 100644 --- a/modules/rsync/templates/module.erb +++ b/modules/rsync/templates/module.erb @@ -1,19 +1,19 @@ # This file is being maintained by Puppet. # DO NOT EDIT -[ %= name % ] -path= %= path % -read only = %= read_only % -write only = %= write_only % -list= %= list % -uid = %= uid % -gid = %= gid % -max connections = %= max_connections % -% if Integer(max_connections) 0 %lock file = %= lock_file %% end % -% if comment != :undef %comment = %= comment %% end % -% if secrets_file != :undef %secrets file = %= secrets_file %% end % -% if auth_users != :undef %auth users = %= auth_users.to_a.join(', ')%% end % -% if hosts_allow != :undef %hosts allow = %= hosts_allow.to_a.join(' ')%% end % -% if hosts_deny != :undef %hosts deny = %= hosts_deny.to_a.join(' ')%% end % +[ %= @name % ] +path= %= @path % +read only = %= @read_only % +write only = %= @write_only % +list= %= @list % +uid = %= @uid % +gid = %= @gid % +max connections = %= @max_connections % +% if Integer(@max_connections) 0 %lock file = %= @lock_file %% end % +% if @comment %comment = %= @comment %% end % +% if @secrets_file %secrets file = %= @secrets_file %% end % +% if @auth_users %auth users = %= @auth_users.to_a.join(', ')%% end % +% if @hosts_allow %hosts allow = %= @hosts_allow.to_a.join(' ')%% end % +% if @hosts_deny %hosts deny = %= @hosts_deny.to_a.join(' ')%% end % diff --git a/modules/rsync/templates/rsync.default.erb b/modules/rsync/templates/rsync.default.erb index eb138b2..e120f48 100644 --- a/modules/rsync/templates/rsync.default.erb +++ b/modules/rsync/templates/rsync.default.erb @@ -10,7 +10,7 @@ # Use inetd if you want to start the rsyncd from inetd, # all this does is prevent the init.d script from printing a message # about not starting rsyncd (you still need to modify inetd's config yourself). -RSYNC_ENABLE=%= use_xinetd == true ? 'false' : 'true' % +RSYNC_ENABLE=%= @use_xinetd == true ? 'false' : 'true' % # which file should be used as the configuration file for rsync. # This file is used instead of the default /etc/rsyncd.conf @@ -18,7 +18,7 @@ # using a remote shell. When using a different file for # rsync you might want to symlink /etc/rsyncd.conf to # that file. -RSYNC_CONFIG_FILE=%= rsync_conf % +RSYNC_CONFIG_FILE=%= @rsync_conf % # what extra options to give rsync --daemon? # that excludes the --daemon; that's always done in the init.d script -- To view, visit https://gerrit.wikimedia.org/r/159462 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9f1cfcb09d7edb654182e447d767d588358ed616 Gerrit-PatchSet: 5 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Matanya mata...@foss.co.il Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: ArielGlenn ar...@wikimedia.org Gerrit-Reviewer: Dzahn dz...@wikimedia.org Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org Gerrit-Reviewer: Matanya mata...@foss.co.il Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert Make enhanced recent changes and extended watchlist ... - change (mediawiki/core)
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/166719 Change subject: Revert Make enhanced recent changes and extended watchlist default .. Revert Make enhanced recent changes and extended watchlist default This reverts commit c972d6150d6f9f2b5507e30098a8d6ac9d6c4406. Change-Id: Iff3699f37195dd0ffb2a76c2e863a1fde3e0d83a --- M RELEASE-NOTES-1.25 M includes/DefaultSettings.php 2 files changed, 2 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/19/166719/1 diff --git a/RELEASE-NOTES-1.25 b/RELEASE-NOTES-1.25 index 647138e..862b132 100644 --- a/RELEASE-NOTES-1.25 +++ b/RELEASE-NOTES-1.25 @@ -18,9 +18,6 @@ for 'languageScripts'. * Added a new hook, ContentAlterParserOutput, to allow extensions to modify the parser output for a content object before links update. -* (bug 35785) Enhanced recent changes and extended watchlist are now default. - Documentation: https://meta.wikimedia.org/wiki/Help:Enhanced_recent_changes - and https://www.mediawiki.org/wiki/Manual:$wgDefaultUserOptions. * (bug 67341) SVG images will no longer be base64-encoded when being embedded in CSS. This results in slight size increase before gzip compression (due to percent-encoding), but up to 20% decrease after it. diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 8a8d291..f2453e8 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -4274,7 +4274,7 @@ 'enotifrevealaddr' = 0, 'enotifusertalkpages' = 1, 'enotifwatchlistpages' = 1, - 'extendwatchlist' = 1, + 'extendwatchlist' = 0, 'fancysig' = 0, 'forceeditsummary' = 0, 'gender' = 'unknown', @@ -4300,7 +4300,7 @@ 'thumbsize' = 5, 'underline' = 2, 'uselivepreview' = 0, - 'usenewrc' = 1, + 'usenewrc' = 0, 'watchcreations' = 1, 'watchdefault' = 1, 'watchdeletion' = 0, -- To view, visit https://gerrit.wikimedia.org/r/166719 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iff3699f37195dd0ffb2a76c2e863a1fde3e0d83a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update documentation on how to use jenkins-jobs - change (integration/config)
jenkins-bot has submitted this change and it was merged. Change subject: Update documentation on how to use jenkins-jobs .. Update documentation on how to use jenkins-jobs The location of the files changed from config/ to config/jjb/. Change-Id: I89c29e52d473933d7acf6d41b7d8d87fb2767ceb --- M README.md 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/README.md b/README.md index 06703e2..476f356 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,8 @@ Generate XML files for Jenkins jobs from YAML files: -$ jenkins-jobs test config/ -o output/ +$ jenkins-jobs test config/jjb/ -o output/ Update Jenkins jobs which name starts with browsertests: -$ jenkins-jobs --conf etc/jenkins_jobs.ini update config/ browsertests* +$ jenkins-jobs --conf etc/jenkins_jobs.ini update config/jjb/ browsertests* -- To view, visit https://gerrit.wikimedia.org/r/166548 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I89c29e52d473933d7acf6d41b7d8d87fb2767ceb Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org Gerrit-Reviewer: Cmcmahon cmcma...@wikimedia.org Gerrit-Reviewer: Dduvall dduv...@wikimedia.org Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: Manybubbles never...@wikimedia.org Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.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] Fix doc header for ensure_link - change (operations/puppet)
Filippo Giunchedi has submitted this change and it was merged. Change subject: Fix doc header for ensure_link .. Fix doc header for ensure_link Change-Id: Ia3b13ae010b6fdbbc9f7453a4180cc147f84e52e --- M modules/wmflib/lib/puppet/parser/functions/ensure_link.rb 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Filippo Giunchedi: Verified; Looks good to me, approved diff --git a/modules/wmflib/lib/puppet/parser/functions/ensure_link.rb b/modules/wmflib/lib/puppet/parser/functions/ensure_link.rb index 4700a68..fd21f5a 100644 --- a/modules/wmflib/lib/puppet/parser/functions/ensure_link.rb +++ b/modules/wmflib/lib/puppet/parser/functions/ensure_link.rb @@ -1,4 +1,4 @@ -# == Function: ensure_directory( string|bool $ensure ) +# == Function: ensure_link( string|bool $ensure ) # # Takes a generic 'ensure' parameter value and convert it to an # appropriate value for use with a symlink file declaration. -- To view, visit https://gerrit.wikimedia.org/r/159174 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia3b13ae010b6fdbbc9f7453a4180cc147f84e52e Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BryanDavis bda...@wikimedia.org Gerrit-Reviewer: Dzahn dz...@wikimedia.org Gerrit-Reviewer: Filippo Giunchedi fgiunch...@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] Revert Remove deployment::target - change (operations/puppet)
ArielGlenn has uploaded a new change for review. https://gerrit.wikimedia.org/r/166720 Change subject: Revert Remove deployment::target .. Revert Remove deployment::target This reverts commit 7d05ab065cf9581a4399706ee99b0601067ef8ec. The trebuchet provider sets the wrong deployment_target grain; until that's fixed, using this class is the workaround. Adding new hosts as targets of a repo for certain repos will trigger this bug. Info on the bug: Grains corresponding to repos are defined in role::deployment::config, see $repo_config. Several repos under the same base might use the same grain or they might not; see integration and analytics as two examples. The custom package provider always uses base (i.e. the parent dir) as the grain name, which matches some configs by luck but many it doesn't. Those configs wind up in /etc/salt/deploy_runner.conf on the salt master, explicitly checked by the trebuchet runner. How the custom package provider is going to get at those, I really don't know. Note that testing the custom provider on hosts already targets of a repo would have left the old correct grain in place, so the failure wouldn't have shown up. Change-Id: I18b329fd2f35818167e3db6b3ab77f82d4cf4a94 --- A modules/deployment/manifests/target.pp 1 file changed, 41 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/20/166720/1 diff --git a/modules/deployment/manifests/target.pp b/modules/deployment/manifests/target.pp new file mode 100644 index 000..d828e1d --- /dev/null +++ b/modules/deployment/manifests/target.pp @@ -0,0 +1,41 @@ +define deployment::target($ensure=present) { +# Need packages before deploy.sync_all +# is run. (git, git-fat, etc.) +require deployment::packages + +salt::grain { deployment_target_${name}: +ensure = $ensure, +grain = 'deployment_target', +value = $name, +notify = [ +Exec['deployment_target_sync_all'], +Exec['deployment_target_refresh_pillars'], +Exec['deployment_target_deploy_all'], +]; +} +if ! defined(Exec['deployment_target_sync_all']){ +exec { 'deployment_target_sync_all': +refreshonly = true, +path= ['/usr/bin'], +command = 'salt-call saltutil.sync_all'; +} +} +if ! defined(Exec['deployment_target_refresh_pillars']){ +exec { 'deployment_target_refresh_pillars': +refreshonly = true, +path= ['/usr/bin'], +command = 'salt-call saltutil.refresh_pillar'; +} +} +if ! defined(Exec['deployment_target_deploy_all']){ +exec { 'deployment_target_deploy_all': +refreshonly = true, +path= ['/usr/bin'], +command = 'salt-call deploy.sync_all', +require = [ +Exec['deployment_target_sync_all'], +Exec['deployment_target_refresh_pillars'], +]; +} +} +} -- To view, visit https://gerrit.wikimedia.org/r/166720 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I18b329fd2f35818167e3db6b3ab77f82d4cf4a94 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: ArielGlenn ar...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert Remove deployment::target - change (operations/puppet)
ArielGlenn has submitted this change and it was merged. Change subject: Revert Remove deployment::target .. Revert Remove deployment::target This reverts commit 7d05ab065cf9581a4399706ee99b0601067ef8ec. The trebuchet provider sets the wrong deployment_target grain; until that's fixed, using this class is the workaround. Adding new hosts as targets of a repo for certain repos will trigger this bug. Info on the bug: Grains corresponding to repos are defined in role::deployment::config, see $repo_config. Several repos under the same base might use the same grain or they might not; see integration and analytics as two examples. The custom package provider always uses base (i.e. the parent dir) as the grain name, which matches some configs by luck but many it doesn't. Those configs wind up in /etc/salt/deploy_runner.conf on the salt master, explicitly checked by the trebuchet runner. How the custom package provider is going to get at those, I really don't know. Note that testing the custom provider on hosts already targets of a repo would have left the old correct grain in place, so the failure wouldn't have shown up. Change-Id: I18b329fd2f35818167e3db6b3ab77f82d4cf4a94 --- A modules/deployment/manifests/target.pp 1 file changed, 41 insertions(+), 0 deletions(-) Approvals: ArielGlenn: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/deployment/manifests/target.pp b/modules/deployment/manifests/target.pp new file mode 100644 index 000..d828e1d --- /dev/null +++ b/modules/deployment/manifests/target.pp @@ -0,0 +1,41 @@ +define deployment::target($ensure=present) { +# Need packages before deploy.sync_all +# is run. (git, git-fat, etc.) +require deployment::packages + +salt::grain { deployment_target_${name}: +ensure = $ensure, +grain = 'deployment_target', +value = $name, +notify = [ +Exec['deployment_target_sync_all'], +Exec['deployment_target_refresh_pillars'], +Exec['deployment_target_deploy_all'], +]; +} +if ! defined(Exec['deployment_target_sync_all']){ +exec { 'deployment_target_sync_all': +refreshonly = true, +path= ['/usr/bin'], +command = 'salt-call saltutil.sync_all'; +} +} +if ! defined(Exec['deployment_target_refresh_pillars']){ +exec { 'deployment_target_refresh_pillars': +refreshonly = true, +path= ['/usr/bin'], +command = 'salt-call saltutil.refresh_pillar'; +} +} +if ! defined(Exec['deployment_target_deploy_all']){ +exec { 'deployment_target_deploy_all': +refreshonly = true, +path= ['/usr/bin'], +command = 'salt-call deploy.sync_all', +require = [ +Exec['deployment_target_sync_all'], +Exec['deployment_target_refresh_pillars'], +]; +} +} +} -- To view, visit https://gerrit.wikimedia.org/r/166720 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I18b329fd2f35818167e3db6b3ab77f82d4cf4a94 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: ArielGlenn ar...@wikimedia.org Gerrit-Reviewer: ArielGlenn ar...@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] Implement boardHistory component features - change (mediawiki...Flow)
SG has uploaded a new change for review. https://gerrit.wikimedia.org/r/166728 Change subject: Implement boardHistory component features .. Implement boardHistory component features Mostly involves moving functions from board to be globalized Only thing implemented on boardHistory is moderation actions, which refresh the whole page Change-Id: Iff184366aae6017ef43d86e8fd8eb9c5594c5ec3 --- M includes/View.php M modules/engine/components/board/base/flow-board-api-events.js M modules/engine/components/board/base/flow-board-interactive-events.js M modules/engine/components/board/base/flow-board-misc.js M modules/engine/components/board/base/flow-boardandhistory-base.js M modules/engine/components/board/flow-boardHistory.js M modules/engine/components/common/flow-component-events.js 7 files changed, 182 insertions(+), 189 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/28/166728/1 diff --git a/includes/View.php b/includes/View.php index 2f16458..319fed7 100644 --- a/includes/View.php +++ b/includes/View.php @@ -181,7 +181,14 @@ $renderedBlocks = array(); foreach ( $apiResponse['blocks'] as $block ) { - $flowComponent = 'board'; + $flowComponent = $block['type']; + switch ( $flowComponent ) { + case 'board-history': + $flowComponent = 'boardHistory'; + break; + default: + $flowComponent = 'board'; + } // Don't re-render a block type twice in one page if ( isset( $renderedBlocks[$flowComponent] ) ) { diff --git a/modules/engine/components/board/base/flow-board-api-events.js b/modules/engine/components/board/base/flow-board-api-events.js index 2708eac..fb5e947 100644 --- a/modules/engine/components/board/base/flow-board-api-events.js +++ b/modules/engine/components/board/base/flow-board-api-events.js @@ -196,7 +196,8 @@ FlowBoardComponentApiEventsMixin.UI.events.apiPreHandlers.activateSummarizeTopic = function ( event, info ) { if ( info.$target.find( 'form' ).length ) { // Form already open; cancel the old form - _flowBoardComponentCancelForm( info.$target ); + var flowBoard = mw.flow.getPrototypeMethod( 'board', 'getInstanceByElement' )( $( this ) ); + flowBoard.emitWithReturn( 'cancelForm', info.$target ); return false; } @@ -703,14 +704,15 @@ * @param {jqXHR} jqxhr */ FlowBoardComponentApiEventsMixin.UI.events.apiHandlers.submitReply = function ( info, data, jqxhr ) { - var $form = $( this ).closest( 'form' ); + var $form = $( this ).closest( 'form' ), + flowBoard = mw.flow.getPrototypeMethod( 'board', 'getInstanceByElement' )( $form ); if ( info.status !== 'done' ) { // Error will be displayed by default, nothing else to wrap up return; } - _flowBoardComponentCancelForm( $form ); + flowBoard.emitWithReturn( 'cancelForm', $form ); // Target should be flow-topic _flowBoardComponentRefreshTopic( info.$target, data.flow.reply.result.topic ); @@ -881,6 +883,9 @@ $rendered.find( 'textarea' ).conditionalScrollIntoView().focus(); }; + /** +* Callback from the topic moderation dialog. +*/ FlowBoardComponentApiEventsMixin.UI.events.apiHandlers.moderateTopic = _genModerateHandler( 'moderate-topic', function ( $target, revision, apiResult ) { @@ -900,6 +905,9 @@ } ); + /** +* Callback from the post moderation dialog. +*/ FlowBoardComponentApiEventsMixin.UI.events.apiHandlers.moderatePost = _genModerateHandler( 'moderate-post', function ( $target, revision, apiResult ) { @@ -932,8 +940,10 @@ } var result = data.flow[action].result.topic, - $form = $( this ).closest( 'form' ), - id = result.submitted.postId || result.postId || result.roots[0]; + $this = $( this ), + $form = $this.closest( 'form' ), + id = result.submitted.postId || result.postId || result.roots[0], +
[MediaWiki-commits] [Gerrit] Remove topic group collapser - change (mediawiki...Flow)
SG has uploaded a new change for review. https://gerrit.wikimedia.org/r/166727 Change subject: Remove topic group collapser .. Remove topic group collapser Change-Id: I0ec83cd37115e6771331c2e45ba2e2f802fa9c65 --- M Resources.php M handlebars/Makefile M handlebars/compiled/flow_block_topiclist.handlebars.php D handlebars/compiled/flow_board_collapsers_subcomponent.handlebars.php D handlebars/flow_board_collapsers_subcomponent.handlebars M handlebars/flow_board_navigation.handlebars M modules/new/styles/board/collapser.less 7 files changed, 1 insertion(+), 112 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/27/166727/1 diff --git a/Resources.php b/Resources.php index 1ed844c..8ea48d3 100644 --- a/Resources.php +++ b/Resources.php @@ -39,7 +39,6 @@ flow_block_topicsummary_diff_view.handlebars, flow_block_topicsummary_edit.handlebars, flow_block_topicsummary_single_view.handlebars, - flow_board_collapsers_subcomponent.handlebars, flow_board_navigation.handlebars, flow_component.handlebars, flow_edit_post.handlebars, diff --git a/handlebars/Makefile b/handlebars/Makefile index f92bf1c..5dde464 100644 --- a/handlebars/Makefile +++ b/handlebars/Makefile @@ -31,7 +31,6 @@ compiled/flow_block_header_edit.handlebars.php \ compiled/flow_block_header_single_view.handlebars.php \ compiled/flow_block_header_diff_view.handlebars.php \ - compiled/flow_board_collapsers_subcomponent.handlebars.php \ compiled/flow_block_topiclist.handlebars.php \ compiled/flow_block_topiclist_newtopic.handlebars.php \ compiled/flow_block_topic.handlebars.php \ @@ -90,10 +89,6 @@ compiled/flow_block_topicsummary_diff_view.handlebars.php: \ flow_block_topicsummary_diff_view.handlebars $(COMPILE) flow_block_topicsummary_diff_view - -compiled/flow_board_collapsers_subcomponent.handlebars.php: \ - flow_board_collapsers_subcomponent.handlebars - $(COMPILE) flow_board_collapsers_subcomponent compiled/flow_block_topiclist.handlebars.php: \ flow_block_topiclist.handlebars \ diff --git a/handlebars/compiled/flow_block_topiclist.handlebars.php b/handlebars/compiled/flow_block_topiclist.handlebars.php index 57efb41..bb1beb0 100644 --- a/handlebars/compiled/flow_block_topiclist.handlebars.php +++ b/handlebars/compiled/flow_block_topiclist.handlebars.php @@ -37,13 +37,6 @@ /div '.' div class=flow-board-navigation-inner - '.LCRun3::hbch($cx, 'progressiveEnhancement', Array(Array(),Array()), $in, function($cx, $in) {return ' - a href=#topics/full data-flow-interactive-handler=collapserGroupToggle class=flow-board-collapser-compact flow-board-navigator-right flow-board-navigator-capspan class=wikiglyph wikiglyph-stripe-compact flow-ui-tooltip-target title='.LCRun3::ch($cx, 'l10n', Array(Array('flow-toggle-topics-posts'),Array()), 'encq').'/span/a -a href=#topics/compact data-flow-interactive-handler=collapserGroupToggle class=flow-board-collapser-topics flow-board-navigator-right flow-board-navigator-capspan class=wikiglyph wikiglyph-stripe-toc flow-ui-tooltip-target title='.LCRun3::ch($cx, 'l10n', Array(Array('flow-toggle-small-topics'),Array()), 'encq').'/span/a -a href=#topics/topics data-flow-interactive-handler=collapserGroupToggle class=flow-board-collapser-full flow-board-navigator-right flow-board-navigator-capspan class=wikiglyph wikiglyph-stripe-expanded flow-ui-tooltip-target title='.LCRun3::ch($cx, 'l10n', Array(Array('flow-toggle-topics'),Array()), 'encq').'/span/a - - ';}).' - '.' a href=javascript:void(0); class=flow-board-navigator-active flow-board-navigator-first flow-ui-tooltip-target diff --git a/handlebars/compiled/flow_board_collapsers_subcomponent.handlebars.php b/handlebars/compiled/flow_board_collapsers_subcomponent.handlebars.php deleted file mode 100644 index 7f28d97..000 --- a/handlebars/compiled/flow_board_collapsers_subcomponent.handlebars.php +++ /dev/null @@ -1,25 +0,0 @@ -?php return function ($in, $debugopt = 1) { -$cx = Array( -'flags' = Array( -'jstrue' = false, -'jsobj' = false, -'spvar' = true, -'prop' = false, -'method' = false, -'mustlok' = false, -'debug' = $debugopt, -), -'helpers' = Array('l10n' = 'Flow\TemplateHelper::l10n', -), -'blockhelpers' = Array(), -'hbhelpers' = Array(), -'scopes' = Array($in), -'sp_vars' = Array(), - -); -return 'a
[MediaWiki-commits] [Gerrit] use the old deployment::target class for trebuchet test repo - change (operations/puppet)
ArielGlenn has uploaded a new change for review. https://gerrit.wikimedia.org/r/166729 Change subject: use the old deployment::target class for trebuchet test repo .. use the old deployment::target class for trebuchet test repo until there's a fix for the custom package provider, see https://gerrit.wikimedia.org/r/#/c/166720/ Change-Id: I06101c828aa05abbcc5297328f47151bdba89106 --- M manifests/role/deployment.pp 1 file changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/29/166729/1 diff --git a/manifests/role/deployment.pp b/manifests/role/deployment.pp index 3a94e63..6d545d3 100644 --- a/manifests/role/deployment.pp +++ b/manifests/role/deployment.pp @@ -273,7 +273,8 @@ } class role::deployment::test { -package { 'test/testrepo': -provider = 'trebuchet', -} +deployment::target { 'testrepo': } +#package { 'test/testrepo': +#provider = 'trebuchet', +#} } -- To view, visit https://gerrit.wikimedia.org/r/166729 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I06101c828aa05abbcc5297328f47151bdba89106 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: ArielGlenn ar...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] use the old deployment::target class for trebuchet test repo - change (operations/puppet)
ArielGlenn has submitted this change and it was merged. Change subject: use the old deployment::target class for trebuchet test repo .. use the old deployment::target class for trebuchet test repo until there's a fix for the custom package provider, see https://gerrit.wikimedia.org/r/#/c/166720/ Change-Id: I06101c828aa05abbcc5297328f47151bdba89106 --- M manifests/role/deployment.pp 1 file changed, 4 insertions(+), 3 deletions(-) Approvals: ArielGlenn: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/deployment.pp b/manifests/role/deployment.pp index 3a94e63..6d545d3 100644 --- a/manifests/role/deployment.pp +++ b/manifests/role/deployment.pp @@ -273,7 +273,8 @@ } class role::deployment::test { -package { 'test/testrepo': -provider = 'trebuchet', -} +deployment::target { 'testrepo': } +#package { 'test/testrepo': +#provider = 'trebuchet', +#} } -- To view, visit https://gerrit.wikimedia.org/r/166729 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I06101c828aa05abbcc5297328f47151bdba89106 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: ArielGlenn ar...@wikimedia.org Gerrit-Reviewer: ArielGlenn ar...@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] Fixed prepare message with html footer - change (mediawiki...BlueSpiceFoundation)
Pwirth has uploaded a new change for review. https://gerrit.wikimedia.org/r/166730 Change subject: Fixed prepare message with html footer .. Fixed prepare message with html footer Change-Id: I6c95d3d30aed40aea56bca78f2ad4188b43cef9b --- M includes/Mailer.class.php 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceFoundation refs/changes/30/166730/1 diff --git a/includes/Mailer.class.php b/includes/Mailer.class.php index b29bcaa..3a0a99e 100644 --- a/includes/Mailer.class.php +++ b/includes/Mailer.class.php @@ -108,20 +108,20 @@ $sCombinedSubject = '['.$wgSitename.'] '.$sSubject; //Prepare message - $sFooter = $this-bSendHTML ? wfMessage( 'bs-mail-footer-html', $wgSitename )-plain() : wfMessage( 'bs-mail-footer', $wgSitename )-plain() ; - $sCombinedMsg = $sMsg.$sFooter; - if( $this-bSendHTML ) { //http(s)://link - a href=http(s)://linkhttp(s)://link/a //! already followed by /a //last char ! . - $sCombinedMsg = preg_replace( + $sMsg = preg_replace( #(\s|/)(https?://[^\s]+?)\.?([\s|])#, 'a href=$2$2/a', - $sCombinedMsg + $sMsg ); } + $sFooter = $this-bSendHTML ? wfMessage( 'bs-mail-footer-html', $wgSitename )-plain() : wfMessage( 'bs-mail-footer', $wgSitename )-plain() ; + $sCombinedMsg = $sMsg.$sFooter; + foreach ( $aEmailTo as $aReceiver ) { //Prepare message if ( $aReceiver['greeting'] ) { -- To view, visit https://gerrit.wikimedia.org/r/166730 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6c95d3d30aed40aea56bca78f2ad4188b43cef9b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation Gerrit-Branch: REL1_22 Gerrit-Owner: Pwirth wi...@hallowelt.biz ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixed prepare message with html footer - change (mediawiki...BlueSpiceFoundation)
Pwirth has uploaded a new change for review. https://gerrit.wikimedia.org/r/166731 Change subject: Fixed prepare message with html footer .. Fixed prepare message with html footer Change-Id: I3f3a7ed5c2d6f5279d2ef231acf9cf9279c043e6 --- M includes/Mailer.class.php 1 file changed, 11 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceFoundation refs/changes/31/166731/1 diff --git a/includes/Mailer.class.php b/includes/Mailer.class.php index f6dcc59..a27b883 100644 --- a/includes/Mailer.class.php +++ b/includes/Mailer.class.php @@ -107,23 +107,23 @@ $sCombinedSubject = '['.$wgSitename.'] '.$sSubject; //Prepare message + if ( $this-bSendHTML ) { + //http(s)://link - a href=http(s)://linkhttp(s)://link/a + //! already followed by /a + //last char ! . + $sMsg = preg_replace( + #(\s|/)(https?://[^\s]+?)\.?([\s|])#, + 'a href=$2$2/a', + $sMsg + ); + } + $sFooter = ( $this-bSendHTML ) ? br /br /-br /br / : \n\n-\n\n; $sFooter .= wfMessage( 'bs-email-footer', $wgSitename )-plain() . ( $this-bSendHTML ) ? br /br /- : \n\n-; $sCombinedMsg = $sMsg.$sFooter; - - if ( $this-bSendHTML ) { - //http(s)://link - a href=http(s)://linkhttp(s)://link/a - //! already followed by /a - //last char ! . - $sCombinedMsg = preg_replace( - #(\s|/)(https?://[^\s]+?)\.?([\s|])#, - 'a href=$2$2/a', - $sCombinedMsg - ); - } foreach ( $aEmailTo as $aReceiver ) { //Prepare message -- To view, visit https://gerrit.wikimedia.org/r/166731 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3f3a7ed5c2d6f5279d2ef231acf9cf9279c043e6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation Gerrit-Branch: master Gerrit-Owner: Pwirth wi...@hallowelt.biz ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make list=novainstance available to anons - change (mediawiki...OpenStackManager)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/166732 Change subject: Make list=novainstance available to anons .. Make list=novainstance available to anons Right now, none of this information is available to you unless: - You are logged in - You are a member of the project I talked to Andrew and Coren, and we're all ok with making this info publicly available - nothing private here, and all of it is exposed via SMW anyway. Change-Id: Ia9ed925c1e75fce29baf9a1b81cf2a23b0eb6e0f (cherry picked from commit 0ccc34db8792f08a32860154510d5087f7f3ffb6) --- M api/ApiListNovaInstances.php 1 file changed, 10 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OpenStackManager refs/changes/32/166732/1 diff --git a/api/ApiListNovaInstances.php b/api/ApiListNovaInstances.php index be90e63..b369339 100644 --- a/api/ApiListNovaInstances.php +++ b/api/ApiListNovaInstances.php @@ -15,6 +15,9 @@ } public function run() { + global $wgOpenStackManagerLDAPUsername; + global $wgOpenStackManagerLDAPUserPassword; + $params = $this-extractRequestParams(); $project = OpenStackNovaProject::getProjectByName( $params['project'] ); if ( !$project ) { @@ -22,18 +25,14 @@ $this-dieUsage( 'Invalid project specified.', 'badproject' ); } - if ( !$this-getUser()-isLoggedIn() ) { - $this-dieUsage( 'Must be logged in to use this API', 'notloggedin' ); - } + $user = new OpenStackNovaUser( $wgOpenStackManagerLDAPUsername ); + $userNova = OpenStackNovaController::newFromUser( $user ); + $userNova-authenticate( $wgOpenStackManagerLDAPUsername, $wgOpenStackManagerLDAPUserPassword ); - $user = new OpenStackNovaUser(); - if ( !$user-exists() ) { - $this-dieUsage( 'NovaUser does not exist', 'baduser' ); - } - $controller = OpenStackNovaController::newFromUser( $user ); - $controller-setProject( $project-getName() ); - $controller-setRegion( $params['region'] ); // validated by API - $instances = $controller-getInstances(); + $userNova-setProject( $project-getName() ); + $userNova-setRegion( $params['region'] ); // validated by API + + $instances = $userNova-getInstances(); foreach ( $instances as $instance ) { $info = array( 'name' = $instance-getInstanceName(), -- To view, visit https://gerrit.wikimedia.org/r/166732 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia9ed925c1e75fce29baf9a1b81cf2a23b0eb6e0f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OpenStackManager Gerrit-Branch: wmf/1.25wmf2 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] Fix site setup in wikibase test - change (pywikibot/core)
John Vandenberg has uploaded a new change for review. https://gerrit.wikimedia.org/r/166733 Change subject: Fix site setup in wikibase test .. Fix site setup in wikibase test Also set nosetests to be verbose, so unexpectedly running tests can be easily spotted. Change-Id: I5c8ba42cae5fbd82a842b48489b4046b17297516 --- M tests/wikibase_tests.py M tox.ini 2 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/33/166733/1 diff --git a/tests/wikibase_tests.py b/tests/wikibase_tests.py index fddfe33..f41640e 100644 --- a/tests/wikibase_tests.py +++ b/tests/wikibase_tests.py @@ -570,11 +570,11 @@ family = 'wikipedia' -lang = 'en' +code = 'en' def setUp(self): super(TestWriteNormalizeLang, self).setUp() -self.site = pywikibot.Site('en', 'wikipedia') +self.site = self.get_site() self.lang_out = {'en': 'foo'} def test_normalize_lang(self): diff --git a/tox.ini b/tox.ini index 42d799a..f37d458 100644 --- a/tox.ini +++ b/tox.ini @@ -70,13 +70,13 @@ [testenv:nose] setenv = PYWIKIBOT2_NO_USER_CONFIG=1 -commands = nosetests -a !site,!net tests +commands = nosetests -v -a !site,!net tests deps = nose [testenv:nose34] basepython = python3 setenv = PYWIKIBOT2_NO_USER_CONFIG=1 -commands = nosetests -a !site,!net tests +commands = nosetests -v -a !site,!net tests deps = nose six -- To view, visit https://gerrit.wikimedia.org/r/166733 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5c8ba42cae5fbd82a842b48489b4046b17297516 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: John Vandenberg jay...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix spelling in test docstring - change (pywikibot/core)
John Vandenberg has uploaded a new change for review. https://gerrit.wikimedia.org/r/166734 Change subject: Fix spelling in test docstring .. Fix spelling in test docstring Change-Id: I1c1339b8b8b579b2ae6fe9a4fda1b47a2e9ac736 --- M tests/i18n_tests.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/34/166734/1 diff --git a/tests/i18n_tests.py b/tests/i18n_tests.py index c72870b..39c9ef2 100644 --- a/tests/i18n_tests.py +++ b/tests/i18n_tests.py @@ -217,7 +217,7 @@ u'Bot: Ändere 11 Zeilen von mehreren Seiten.') def testMultipleWrongParameterLength(self): -Test wrong parameter lenght. +Test wrong parameter length. with self.assertRaisesRegex(ValueError, Length of parameter does not match PLURAL occurences): self.assertEqual( i18n.twntranslate('de', 'test-multiple-plurals', (1, 2)) -- To view, visit https://gerrit.wikimedia.org/r/166734 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1c1339b8b8b579b2ae6fe9a4fda1b47a2e9ac736 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: John Vandenberg jay...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix spelling in test docstring - change (pywikibot/core)
XZise has submitted this change and it was merged. Change subject: Fix spelling in test docstring .. Fix spelling in test docstring Change-Id: I1c1339b8b8b579b2ae6fe9a4fda1b47a2e9ac736 --- M tests/i18n_tests.py 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: XZise: Looks good to me, approved diff --git a/tests/i18n_tests.py b/tests/i18n_tests.py index c72870b..39c9ef2 100644 --- a/tests/i18n_tests.py +++ b/tests/i18n_tests.py @@ -217,7 +217,7 @@ u'Bot: Ändere 11 Zeilen von mehreren Seiten.') def testMultipleWrongParameterLength(self): -Test wrong parameter lenght. +Test wrong parameter length. with self.assertRaisesRegex(ValueError, Length of parameter does not match PLURAL occurences): self.assertEqual( i18n.twntranslate('de', 'test-multiple-plurals', (1, 2)) -- To view, visit https://gerrit.wikimedia.org/r/166734 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1c1339b8b8b579b2ae6fe9a4fda1b47a2e9ac736 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: John Vandenberg jay...@gmail.com Gerrit-Reviewer: XZise commodorefabia...@gmx.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] Add query and storage classes - change (phabricator...Sprint)
Christopher Johnson (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/166735 Change subject: Add query and storage classes .. Add query and storage classes Change-Id: I1a6649cd865b7fb424e28dfd8648c80f001adcd4 --- M __phutil_library_map__.php A src/query/SprintQuery.php A src/storage/SprintBuildStats.php A src/storage/SprintTransaction.php M src/view/BurndownDataView.php 5 files changed, 409 insertions(+), 86 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/phabricator/extensions/Sprint refs/changes/35/166735/1 diff --git a/__phutil_library_map__.php b/__phutil_library_map__.php index 148ffec..51baaff 100644 --- a/__phutil_library_map__.php +++ b/__phutil_library_map__.php @@ -18,14 +18,17 @@ 'BurndownException' = 'src/exception/BurndownException.php', 'BurndownListController' = 'src/controller/BurndownListController.php', 'BurndownTestDataGenerator' = 'src/__tests__/BurndownTestDataGenerator.php', +'SprintBuildStats' = 'src/storage/SprintBuildStats.php', 'SprintConstants' = 'src/constants/SprintConstants.php', 'SprintEndDateField' = 'src/customfield/SprintEndDateField.php', 'SprintProjectCustomField' = 'src/customfield/SprintProjectCustomField.php', +'SprintQuery' = 'src/query/SprintQuery.php', 'SprintReportBurndownView' = 'src/view/SprintReportBurndownView.php', 'SprintReportController' = 'src/controller/SprintReportController.php', 'SprintReportOpenTasksView' = 'src/view/SprintReportOpenTasksView.php', 'SprintStartDateField' = 'src/customfield/SprintStartDateField.php', 'SprintTaskStoryPointsField' = 'src/customfield/SprintTaskStoryPointsField.php', +'SprintTransaction' = 'src/storage/SprintTransaction.php', 'SprintView' = 'src/view/SprintView.php', ), 'function' = array(), @@ -52,6 +55,7 @@ 'ManiphestCustomField', 'PhabricatorStandardCustomFieldInterface', ), +'SprintTransaction' = 'PhabricatorApplicationTransaction', 'SprintView' = 'AphrontView', ), )); diff --git a/src/query/SprintQuery.php b/src/query/SprintQuery.php new file mode 100644 index 000..27739eb --- /dev/null +++ b/src/query/SprintQuery.php @@ -0,0 +1,69 @@ +?php + +final class SprintQuery { + + private $viewer; + private $project; + + + public function setProject ($project) { +$this-project = $project; +return $this; + } + + public function setViewer ($viewer) { +$this-viewer = $viewer; +return $this; + } + + public function getAuxFields() { +$field_list = PhabricatorCustomField::getObjectFields($this-project, PhabricatorCustomField::ROLE_EDIT); +$field_list-setViewer($this-viewer); +$field_list-readFieldsFromStorage($this-project); +$aux_fields = $field_list-getFields(); +return $aux_fields; + } + + public function getStartDate($aux_fields) { +$start = idx($aux_fields, 'isdc:sprint:startdate') +-getProxy()-getFieldValue(); +return $start; + } + + public function getEndDate($aux_fields) { +$end = idx($aux_fields, 'isdc:sprint:enddate') +-getProxy()-getFieldValue(); +return $end; + } + + public function getTasks() { +$tasks = id(new ManiphestTaskQuery()) +-setViewer($this-viewer) +-withAnyProjects(array($this-project-getPHID())) +-execute(); +return $tasks; + } + + public function getXactions($tasks) { +$task_phids = mpull($tasks, 'getPHID'); + +$xactions = id(new ManiphestTransactionQuery()) +-setViewer($this-viewer) +-withObjectPHIDs($task_phids) +-execute(); +return $xactions; + } + + public function checkNull($start, $end, $tasks) { +if (!$start OR !$end) { + throw new BurndownException(This project is not set up for Burndowns, + . make sure it has 'Sprint' in the name, and then edit it to add the + . sprint start and end date.); +} + +if (!$tasks) { + throw new BurndownException(This project has no tasks.); +} + } +} + diff --git a/src/storage/SprintBuildStats.php b/src/storage/SprintBuildStats.php new file mode 100644 index 000..3ff32f4 --- /dev/null +++ b/src/storage/SprintBuildStats.php @@ -0,0 +1,316 @@ +?php + +final class SprintBuildStats { + + private $project; + private $viewer; + private $tasks; + private $events; + private $xactions; + private $dates; + + public function buildDateArray($start, $end) { +// Build an array of dates between start and end +$period = new DatePeriod( +id(new DateTime(@ . $start))-setTime(0, 0), +new DateInterval('P1D'), // 1 day interval +id(new DateTime(@ . $end))-modify('+1 day')-setTime(0, 0)); + +$dates = array('before' = new BurndownDataDate('Start of Sprint')); +foreach ($period as $day) { + $dates[$day-format('D M j')] = new BurndownDataDate( + $day-format('D M j')); +} +$dates['after'] = new
[MediaWiki-commits] [Gerrit] trebuchet: derive the grain name from the repo name - change (operations/puppet)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/166736 Change subject: trebuchet: derive the grain name from the repo name .. trebuchet: derive the grain name from the repo name It's a bit silly to have to configure a grain name for each Trebuchet-deployed repository, and then have to look up the repository in the configuration to derive the key. It buys you nothing except the ability to have a single grain associated with multiple repositories, which isn't beneficial anyway: if the repositories are part of some role, then they should be declared together in the role class, rather than have their association declared in a giant hash blob in manifests/role/deployment.pp. Change-Id: I38443f3b582c4658f91f0f8d442a590a27aa5b68 --- M manifests/role/deployment.pp M modules/deployment/files/runners/deploy.py M modules/deployment/manifests/salt_master.pp D modules/deployment/templates/deploy_runner.conf.erb 4 files changed, 3 insertions(+), 65 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/36/166736/1 diff --git a/manifests/role/deployment.pp b/manifests/role/deployment.pp index 3a94e63..c1d4b87 100644 --- a/manifests/role/deployment.pp +++ b/manifests/role/deployment.pp @@ -5,127 +5,100 @@ class role::deployment::config { $repo_config = { 'integration/kss' = { -'grain' = 'contint-production-slaves', 'upstream' = 'https://gerrit.wikimedia.org/r/integration/kss', }, 'integration/mediawiki-tools-codesniffer' = { -'grain' = 'contint-production-slaves', 'upstream' = 'https://gerrit.wikimedia.org/r/mediawiki/tools/codesniffer', }, 'integration/phpunit' = { -'grain' = 'contint-production-slaves', 'upstream' = 'https://gerrit.wikimedia.org/r/integration/phpunit', }, 'integration/phpcs' = { -'grain' = 'contint-production-slaves', 'upstream' = 'https://gerrit.wikimedia.org/r/integration/phpcs', }, 'integration/php-coveralls' = { -'grain' = 'contint-production-slaves', 'upstream' = 'https://gerrit.wikimedia.org/r/integration/php-coveralls', }, 'integration/slave-scripts' = { -'grain' = 'contint-production-slaves', 'upstream' = 'https://gerrit.wikimedia.org/r/integration/jenkins', 'checkout_submodules' = true, }, 'gdash/gdash'= { -'grain'= 'gdash', 'upstream' = 'https://gerrit.wikimedia.org/r/operations/software/gdash', }, 'jobrunner/jobrunner'= { -'grain'= 'jobrunner', 'upstream' = 'https://gerrit.wikimedia.org/r/mediawiki/services/jobrunner', 'service_name' = 'jobrunner', }, 'grafana/grafana'= { -'grain'= 'grafana', 'upstream' = 'https://gerrit.wikimedia.org/r/operations/software/grafana', }, 'parsoid/deploy'= { -'grain' = 'parsoid', 'upstream' = 'https://gerrit.wikimedia.org/r/p/mediawiki/services/parsoid/deploy', 'checkout_submodules' = true, 'service_name' = 'parsoid', }, 'eventlogging/EventLogging' = { -'grain'= 'eventlogging', 'upstream' = 'https://gerrit.wikimedia.org/r/mediawiki/extensions/EventLogging', }, 'ocg/ocg' = { -'grain' = 'ocg', 'upstream' = 'https://gerrit.wikimedia.org/r/mediawiki/services/ocg-collection', 'service_name' = 'ocg', 'checkout_submodules' = true, }, 'mathoid/mathoid' = { -'grain' = 'mathoid', 'upstream' = 'https://gerrit.wikimedia.org/r/mediawiki/services/mathoid', 'service_name' = 'mathoid', 'checkout_submodules' = true, }, 'citoid/deploy' = { -'grain' = 'citoid', 'upstream' = 'https://gerrit.wikimedia.org/r/mediawiki/services/citoid/deploy', 'service_name' = 'citoid', 'checkout_submodules' = true, }, 'rcstream/rcstream' = { -'grain' = 'rcstream', 'upstream' = 'https://gerrit.wikimedia.org/r/mediawiki/services/rcstream', 'service_name' = 'rcstream', }, 'fluoride/fluoride' = { -'grain'= 'eventlogging', 'upstream' = 'https://gerrit.wikimedia.org/r/mediawiki/tools/fluoride', }, 'mwprof/mwprof' = { -'grain'= 'mwprof', 'upstream' = 'https://gerrit.wikimedia.org/r/operations/software/mwprof', }, 'reporter/reporter' = { -'grain'= 'reporter', 'upstream' =
[MediaWiki-commits] [Gerrit] Add query and storage classes - change (phabricator...Sprint)
Christopher Johnson (WMDE) has submitted this change and it was merged. Change subject: Add query and storage classes .. Add query and storage classes Change-Id: I1a6649cd865b7fb424e28dfd8648c80f001adcd4 --- M __phutil_library_map__.php A src/query/SprintQuery.php A src/storage/SprintBuildStats.php A src/storage/SprintTransaction.php M src/view/BurndownDataView.php 5 files changed, 303 insertions(+), 254 deletions(-) Approvals: Christopher Johnson (WMDE): Verified; Looks good to me, approved diff --git a/__phutil_library_map__.php b/__phutil_library_map__.php index 148ffec..51baaff 100644 --- a/__phutil_library_map__.php +++ b/__phutil_library_map__.php @@ -18,14 +18,17 @@ 'BurndownException' = 'src/exception/BurndownException.php', 'BurndownListController' = 'src/controller/BurndownListController.php', 'BurndownTestDataGenerator' = 'src/__tests__/BurndownTestDataGenerator.php', +'SprintBuildStats' = 'src/storage/SprintBuildStats.php', 'SprintConstants' = 'src/constants/SprintConstants.php', 'SprintEndDateField' = 'src/customfield/SprintEndDateField.php', 'SprintProjectCustomField' = 'src/customfield/SprintProjectCustomField.php', +'SprintQuery' = 'src/query/SprintQuery.php', 'SprintReportBurndownView' = 'src/view/SprintReportBurndownView.php', 'SprintReportController' = 'src/controller/SprintReportController.php', 'SprintReportOpenTasksView' = 'src/view/SprintReportOpenTasksView.php', 'SprintStartDateField' = 'src/customfield/SprintStartDateField.php', 'SprintTaskStoryPointsField' = 'src/customfield/SprintTaskStoryPointsField.php', +'SprintTransaction' = 'src/storage/SprintTransaction.php', 'SprintView' = 'src/view/SprintView.php', ), 'function' = array(), @@ -52,6 +55,7 @@ 'ManiphestCustomField', 'PhabricatorStandardCustomFieldInterface', ), +'SprintTransaction' = 'PhabricatorApplicationTransaction', 'SprintView' = 'AphrontView', ), )); diff --git a/src/query/SprintQuery.php b/src/query/SprintQuery.php new file mode 100644 index 000..ba084b9 --- /dev/null +++ b/src/query/SprintQuery.php @@ -0,0 +1,178 @@ +?php + +final class SprintQuery { + + private $viewer; + private $project; + + + public function setProject ($project) { +$this-project = $project; +return $this; + } + + public function setViewer ($viewer) { +$this-viewer = $viewer; +return $this; + } + + public function getAuxFields() { +$field_list = PhabricatorCustomField::getObjectFields($this-project, PhabricatorCustomField::ROLE_EDIT); +$field_list-setViewer($this-viewer); +$field_list-readFieldsFromStorage($this-project); +$aux_fields = $field_list-getFields(); +return $aux_fields; + } + + public function getStartDate($aux_fields) { +$start = idx($aux_fields, 'isdc:sprint:startdate') +-getProxy()-getFieldValue(); +return $start; + } + + public function getEndDate($aux_fields) { +$end = idx($aux_fields, 'isdc:sprint:enddate') +-getProxy()-getFieldValue(); +return $end; + } + + public function getTasks() { +$tasks = id(new ManiphestTaskQuery()) +-setViewer($this-viewer) +-withAnyProjects(array($this-project-getPHID())) +-execute(); +return $tasks; + } + + public function getXactions($tasks) { +$task_phids = mpull($tasks, 'getPHID'); + +$xactions = id(new ManiphestTransactionQuery()) +-setViewer($this-viewer) +-withObjectPHIDs($task_phids) +-execute(); +return $xactions; + } + + public function checkNull($start, $end, $tasks) { +if (!$start OR !$end) { + throw new BurndownException(This project is not set up for Burndowns, + . make sure it has 'Sprint' in the name, and then edit it to add the + . sprint start and end date.); +} + +if (!$tasks) { + throw new BurndownException(This project has no tasks.); +} + } + + public function getEvents($xactions) { +$scope_phids = array($this-project-getPHID()); +$events = $this-extractEvents($xactions, $scope_phids); +return $events; + } + + public function extractEvents($xactions, array $scope_phids) { +assert_instances_of($xactions, 'ManiphestTransaction'); + +$scope_phids = array_fuse($scope_phids); + +$events = array(); +foreach ($xactions as $xaction) { + $old = $xaction-getOldValue(); + $new = $xaction-getNewValue(); + + $event_type = null; + switch ($xaction-getTransactionType()) { +case ManiphestTransaction::TYPE_STATUS: + $old_is_closed = ($old === null) || + ManiphestTaskStatus::isClosedStatus($old); + $new_is_closed = ManiphestTaskStatus::isClosedStatus($new); + + if ($old_is_closed == $new_is_closed) { +// This was just a status change from one open status to another, +// or from one
[MediaWiki-commits] [Gerrit] Fix file permissions - change (mediawiki...PdfHandler)
jenkins-bot has submitted this change and it was merged. Change subject: Fix file permissions .. Fix file permissions Bug: 71943 Change-Id: I53b91fdaf876b11e3b99efd188b6c8e4d823514f --- M tests/browser/Gemfile 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Umherirrender: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/browser/Gemfile b/tests/browser/Gemfile old mode 100755 new mode 100644 -- To view, visit https://gerrit.wikimedia.org/r/166604 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I53b91fdaf876b11e3b99efd188b6c8e4d823514f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PdfHandler Gerrit-Branch: master Gerrit-Owner: Reedy re...@wikimedia.org Gerrit-Reviewer: Umherirrender umherirrender_de...@web.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] Fix file permissions - change (mediawiki...Math)
jenkins-bot has submitted this change and it was merged. Change subject: Fix file permissions .. Fix file permissions Bug: 71941 Change-Id: I7b0eddc0ca679cf233ef29dcdfeca024ecc71d38 --- M tests/browser/Gemfile 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Umherirrender: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/browser/Gemfile b/tests/browser/Gemfile old mode 100755 new mode 100644 -- To view, visit https://gerrit.wikimedia.org/r/166602 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7b0eddc0ca679cf233ef29dcdfeca024ecc71d38 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Math Gerrit-Branch: master Gerrit-Owner: Reedy re...@wikimedia.org Gerrit-Reviewer: TheDJ hartman.w...@gmail.com Gerrit-Reviewer: Umherirrender umherirrender_de...@web.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] Fix permissions on executeable files - change (mediawiki...timeline)
jenkins-bot has submitted this change and it was merged. Change subject: Fix permissions on executeable files .. Fix permissions on executeable files Bug: 71930 Change-Id: I40749447a8b382f09f12ba0133299ae51d7ca813 --- M EasyTimeline.pl M install-ploticus.sh 2 files changed, 0 insertions(+), 0 deletions(-) Approvals: Umherirrender: Looks good to me, approved jenkins-bot: Verified diff --git a/EasyTimeline.pl b/EasyTimeline.pl old mode 100644 new mode 100755 diff --git a/install-ploticus.sh b/install-ploticus.sh old mode 100644 new mode 100755 -- To view, visit https://gerrit.wikimedia.org/r/166596 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I40749447a8b382f09f12ba0133299ae51d7ca813 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/timeline Gerrit-Branch: master Gerrit-Owner: Reedy re...@wikimedia.org Gerrit-Reviewer: Umherirrender umherirrender_de...@web.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] Fix file permissions - change (mediawiki...Interwiki)
jenkins-bot has submitted this change and it was merged. Change subject: Fix file permissions .. Fix file permissions Bug: 71937 Change-Id: I9fb7e981daad73a29928e9d939abe881fe0e7e39 --- M Interwiki.css M Interwiki.php M Interwiki_body.php M i18n/en.json M i18n/qqq.json 5 files changed, 0 insertions(+), 0 deletions(-) Approvals: Umherirrender: Looks good to me, approved jenkins-bot: Verified diff --git a/Interwiki.css b/Interwiki.css old mode 100755 new mode 100644 diff --git a/Interwiki.php b/Interwiki.php old mode 100755 new mode 100644 diff --git a/Interwiki_body.php b/Interwiki_body.php old mode 100755 new mode 100644 diff --git a/i18n/en.json b/i18n/en.json old mode 100755 new mode 100644 diff --git a/i18n/qqq.json b/i18n/qqq.json old mode 100755 new mode 100644 -- To view, visit https://gerrit.wikimedia.org/r/166600 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9fb7e981daad73a29928e9d939abe881fe0e7e39 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Interwiki Gerrit-Branch: master Gerrit-Owner: Reedy re...@wikimedia.org Gerrit-Reviewer: Siebrand siebr...@kitano.nl Gerrit-Reviewer: Umherirrender umherirrender_de...@web.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] Fix file permissions - change (mediawiki...Scribunto)
jenkins-bot has submitted this change and it was merged. Change subject: Fix file permissions .. Fix file permissions Bug: 71931 Change-Id: I3b40ab821cafccc30563baa031212f2a24a167a1 --- M engines/LuaStandalone/lua_ulimit.sh 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Umherirrender: Looks good to me, approved jenkins-bot: Verified diff --git a/engines/LuaStandalone/lua_ulimit.sh b/engines/LuaStandalone/lua_ulimit.sh old mode 100644 new mode 100755 -- To view, visit https://gerrit.wikimedia.org/r/166597 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3b40ab821cafccc30563baa031212f2a24a167a1 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Scribunto Gerrit-Branch: master Gerrit-Owner: Reedy re...@wikimedia.org Gerrit-Reviewer: Anomie bjor...@wikimedia.org Gerrit-Reviewer: Jackmcbarn jackmcb...@gmail.com Gerrit-Reviewer: Umherirrender umherirrender_de...@web.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] RequestContextTest: Distinguish initial test from restored test - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: RequestContextTest: Distinguish initial test from restored test .. RequestContextTest: Distinguish initial test from restored test Follows-up f31a046. In failure it's hard to see whether it's the first or third group of assertions as they were carying the same name. Change-Id: I5891754342400155759e797337f8509d4eca39ec --- M tests/phpunit/includes/RequestContextTest.php 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Umherirrender: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/phpunit/includes/RequestContextTest.php b/tests/phpunit/includes/RequestContextTest.php index cae0e52..a9e5be2 100644 --- a/tests/phpunit/includes/RequestContextTest.php +++ b/tests/phpunit/includes/RequestContextTest.php @@ -88,9 +88,9 @@ unset( $sc ); // restore previous context $info = $context-exportSession(); - $this-assertEquals( $oInfo['ip'], $info['ip'], Correct initial IP address. ); - $this-assertEquals( $oInfo['headers'], $info['headers'], Correct initial headers. ); - $this-assertEquals( $oInfo['sessionId'], $info['sessionId'], Correct initial session ID. ); - $this-assertEquals( $oInfo['userId'], $info['userId'], Correct initial user ID. ); + $this-assertEquals( $oInfo['ip'], $info['ip'], Correct restored IP address. ); + $this-assertEquals( $oInfo['headers'], $info['headers'], Correct restored headers. ); + $this-assertEquals( $oInfo['sessionId'], $info['sessionId'], Correct restored session ID. ); + $this-assertEquals( $oInfo['userId'], $info['userId'], Correct restored user ID. ); } } -- To view, visit https://gerrit.wikimedia.org/r/166712 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5891754342400155759e797337f8509d4eca39ec Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Krinkle krinklem...@gmail.com Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org Gerrit-Reviewer: Chad ch...@wikimedia.org Gerrit-Reviewer: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: Krinkle krinklem...@gmail.com Gerrit-Reviewer: Mattflaschen mflasc...@wikimedia.org Gerrit-Reviewer: Umherirrender umherirrender_de...@web.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] Fix theme on mobile-dist - change (VisualEditor/VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/166737 Change subject: Fix theme on mobile-dist .. Fix theme on mobile-dist Mobile was moved form minerva to MW, but not mobile-dist. Change-Id: I914a66ea57d07185517ca1bf3d578074d146dcb5 --- M build/modules.json M demos/ve/mobile-dist.html 2 files changed, 6 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/37/166737/1 diff --git a/build/modules.json b/build/modules.json index 82fbba9..49ddd85 100644 --- a/build/modules.json +++ b/build/modules.json @@ -46,17 +46,6 @@ oojs-ui ] }, - oojs-ui-minerva: { - scripts: [ - lib/oojs-ui/oojs-ui-minerva.js - ], - styles: [ - lib/oojs-ui/oojs-ui-minerva.svg.css - ], - dependencies: [ - oojs-ui - ] - }, oojs-ui-mediawiki: { scripts: [ lib/oojs-ui/oojs-ui-mediawiki.js @@ -596,7 +585,7 @@ ], dependencies: [ baselibs, - oojs-ui-minerva, + oojs-ui-mediawiki, visualEditor.dist, visualEditor.standalone.demo ] diff --git a/demos/ve/mobile-dist.html b/demos/ve/mobile-dist.html index d90d02e..6269318 100644 --- a/demos/ve/mobile-dist.html +++ b/demos/ve/mobile-dist.html @@ -12,9 +12,9 @@ meta name=viewport content=initial-scale=1.0, user-scalable=no / titleVisualEditor Standalone Demo/title - !-- oojs-ui-minerva -- - link rel=stylesheet href=../../lib/oojs-ui/oojs-ui-minerva.svg.css class=stylesheet-ltr - link rel=stylesheet href=../../lib/oojs-ui/oojs-ui-minerva.svg.rtl.css class=stylesheet-rtl disabled + !-- oojs-ui-mediawiki -- + link rel=stylesheet href=../../lib/oojs-ui/oojs-ui-mediawiki.svg.css class=stylesheet-ltr + link rel=stylesheet href=../../lib/oojs-ui/oojs-ui-mediawiki.svg.rtl.css class=stylesheet-rtl disabled !-- visualEditor.dist -- link rel=stylesheet href=../../dist/visualEditor.css class=stylesheet-ltr @@ -68,8 +68,8 @@ script src=../../lib/jquery.uls/src/jquery.uls.data.js/script script src=../../lib/jquery.uls/src/jquery.uls.data.utils.js/script - !-- oojs-ui-minerva -- - script src=../../lib/oojs-ui/oojs-ui-minerva.js/script + !-- oojs-ui-mediawiki -- + script src=../../lib/oojs-ui/oojs-ui-mediawiki.js/script !-- visualEditor.dist -- script src=../../dist/visualEditor.js/script -- To view, visit https://gerrit.wikimedia.org/r/166737 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I914a66ea57d07185517ca1bf3d578074d146dcb5 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders esand...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove broken parameter 'table' in wgObjectCaches for CACHE_DB - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Remove broken parameter 'table' in wgObjectCaches for CACHE_DB .. Remove broken parameter 'table' in wgObjectCaches for CACHE_DB $wgObjectCaches in DefaultSettings.php had the useless parameter 'table' for CACHE_DB. SqlBagOStuff actually uses 'tableName' parameter, it already defaults to 'objectcache' so there's no need to write it again. Change-Id: I5fe6b7c5f4d46cc8642c42861bc7078b795f5fb1 --- M includes/DefaultSettings.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Umherirrender: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 97ffcad..de29f0d 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -2092,7 +2092,7 @@ */ $wgObjectCaches = array( CACHE_NONE = array( 'class' = 'EmptyBagOStuff' ), - CACHE_DB = array( 'class' = 'SqlBagOStuff', 'table' = 'objectcache' ), + CACHE_DB = array( 'class' = 'SqlBagOStuff' ), CACHE_ANYTHING = array( 'factory' = 'ObjectCache::newAnything' ), CACHE_ACCEL = array( 'factory' = 'ObjectCache::newAccelerator' ), -- To view, visit https://gerrit.wikimedia.org/r/165498 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5fe6b7c5f4d46cc8642c42861bc7078b795f5fb1 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Taueres santoro@gmail.com Gerrit-Reviewer: Tim Starling tstarl...@wikimedia.org Gerrit-Reviewer: Umherirrender umherirrender_de...@web.de Gerrit-Reviewer: btongminh bryan.tongm...@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] Work around tidy by using a meta element instead of an empty... - change (mediawiki...Math)
GWicke has uploaded a new change for review. https://gerrit.wikimedia.org/r/166738 Change subject: Work around tidy by using a meta element instead of an empty span .. Work around tidy by using a meta element instead of an empty span HTML tidy will strip empty spans, so don't use one for the fallback image. We use a meta element instead, as that does not normally render at all doesn't have any default styling coming with it. Change-Id: I5bcbbc9468433e3c8722c09ce813a6f5ac741333 --- M MathMathML.php 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Math refs/changes/38/166738/1 diff --git a/MathMathML.php b/MathMathML.php index d5c2cf0..32e56cc 100644 --- a/MathMathML.php +++ b/MathMathML.php @@ -383,8 +383,9 @@ $this-correctSvgStyle( $this-getSvg(), $style ); if ( $class ) { $attribs['class'] = $class; } if ( $style ) { $attribs['style'] = $style; } - // an alternative for svg might be an object with type=image/svg+xml - return Xml::element( 'span', $this-getAttributes( 'span', $attribs , array( 'aria-hidden' = 'true' ) ) ); + // Don't use an empty span, as that is going to be stripped by HTML tidy + // when enabled (which is true in production). + return Xml::element( 'meta', $this-getAttributes( 'span', $attribs , array( 'aria-hidden' = 'true' ) ) ); } -- To view, visit https://gerrit.wikimedia.org/r/166738 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5bcbbc9468433e3c8722c09ce813a6f5ac741333 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Math Gerrit-Branch: master Gerrit-Owner: GWicke gwi...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixed some issues in preferences - change (mediawiki...BlueSpiceFoundation)
Smuggli has uploaded a new change for review. https://gerrit.wikimedia.org/r/166739 Change subject: Fixed some issues in preferences .. Fixed some issues in preferences * Multiselect and sortable fields did not work * Added styling for sort fields * Added own module for multiselect * Unified some file names * Some small cleanups Change-Id: I52d2cf8a5c44d674e566dd1476ff599a6bf497b8 --- M includes/Config.class.php M includes/Core.class.php M includes/html/htmlformfields/HTMLMultiSelectEx.php M includes/html/htmlformfields/HTMLMultiSelectPlusAdd.php M includes/html/htmlformfields/HTMLMultiSelectSortList.php M resources/Resources.php A resources/bluespice/bluespice.html.formfields.multiselect.js A resources/bluespice/bluespice.html.formfields.sortable.css R resources/bluespice/bluespice.html.formfields.sortable.js D resources/bluespice/bluespice.multiselect.js M resources/bluespice/bluespice.util.js 11 files changed, 74 insertions(+), 55 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceFoundation refs/changes/39/166739/1 diff --git a/includes/Config.class.php b/includes/Config.class.php index fe14a36..d5916d7 100644 --- a/includes/Config.class.php +++ b/includes/Config.class.php @@ -243,9 +243,6 @@ return self::$prSettings[$key]; } $_path = explode ( '::', $path ); - $adapter = null; - $extension = null; - $varname = null; $len = count ( $_path ); if ( $len 2 || $len 3 ) { @@ -253,9 +250,10 @@ return false; } + $extension = null; $adapter = array_shift ( $_path ); $len--; - if ( $len == 2 ) { + if ( $len === 2 ) { $extension = array_shift ( $_path ); } $varname = array_shift ( $_path ); @@ -306,7 +304,7 @@ public static function saveSettings() { $dbw = wfGetDB ( DB_WRITE ); - $dbw-delete('bs_settings', '*'); + $dbw-delete( 'bs_settings', '*' ); $aSettings = array(); diff --git a/includes/Core.class.php b/includes/Core.class.php index 6c19159..1c46950 100644 --- a/includes/Core.class.php +++ b/includes/Core.class.php @@ -114,8 +114,10 @@ global $wgScriptPath; $sPath = $wgScriptPath . /extensions/BlueSpiceFoundation/resources/bluespice/images/; - BsConfig::registerVar( 'MW::FileExtensions', array('doc', 'docx', 'pdf', 'xls'), BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_ARRAY_STRING, 'bs-pref-fileextensions', 'multiselectplusadd' ); - BsConfig::registerVar( 'MW::ImageExtensions', array('png', 'gif', 'jpg', 'jpeg'), BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_ARRAY_STRING, 'bs-pref-imageextensions', 'multiselectplusadd' ); + $aFiles = array( 'doc', 'docx', 'pdf', 'xls', 'xlsx' ); + $aImages = array( 'png', 'gif', 'jpg', 'jpeg' ); + BsConfig::registerVar( 'MW::FileExtensions', $aFiles, BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_ARRAY_STRING, 'bs-pref-fileextensions', 'multiselectplusadd' ); + BsConfig::registerVar( 'MW::ImageExtensions', $aImages, BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_ARRAY_STRING, 'bs-pref-imageextensions', 'multiselectplusadd' ); BsConfig::registerVar( 'MW::LogoPath', $sPath . 'bs-logo.png', BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_STRING, 'bs-pref-logopath' ); BsConfig::registerVar( 'MW::FaviconPath', $sPath . 'favicon.ico', BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_STRING, 'bs-pref-faviconpath' ); BsConfig::registerVar( 'MW::DefaultUserImage', $sPath . 'bs-user-default-image.png', BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_STRING, 'bs-pref-defaultuserimage' ); diff --git a/includes/html/htmlformfields/HTMLMultiSelectEx.php b/includes/html/htmlformfields/HTMLMultiSelectEx.php index 9dd9a45..927e233 100644 --- a/includes/html/htmlformfields/HTMLMultiSelectEx.php +++ b/includes/html/htmlformfields/HTMLMultiSelectEx.php @@ -17,6 +17,8 @@ } function getInputHTML( $value ) { + $this-mParent-getOutput()-addModules( 'ext.bluespice.html.formfields.multiselect' ); + $aOptions = ( isset( $this-mParams['options'] ) ) ? $this-mParams['options'] : array(); $html = $this-formatOptions( $aOptions, $value ); diff --git a/includes/html/htmlformfields/HTMLMultiSelectPlusAdd.php b/includes/html/htmlformfields/HTMLMultiSelectPlusAdd.php index 816e55b..0c6f0ae 100644 --- a/includes/html/htmlformfields/HTMLMultiSelectPlusAdd.php +++ b/includes/html/htmlformfields/HTMLMultiSelectPlusAdd.php @@ -13,8 +13,8 @@ $attrs = array( 'type' = 'button',
[MediaWiki-commits] [Gerrit] Allow @unittest.expectedFailure on all TestCase methods - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: Allow @unittest.expectedFailure on all TestCase methods .. Allow @unittest.expectedFailure on all TestCase methods TestCase allows test methods to be 'multi-site' tests, which will be re-run for each site in the TestCase sites matrix. The metaclass has previously checked that the test method only has 1 or 2 arguments. @unittest.expectedFailure replaces the test method with a decorated version that appears as if it has zero arguments, due to the way decorators work. This change allows test methods with 0 arguments. Change-Id: Ib6d74af168e0bad93df65da2965daffa6b3951e0 --- M tests/aspects.py 1 file changed, 9 insertions(+), 0 deletions(-) Approvals: John Vandenberg: Looks good to me, but someone else must approve XZise: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/aspects.py b/tests/aspects.py index 08db133..7ff221f 100644 --- a/tests/aspects.py +++ b/tests/aspects.py @@ -340,6 +340,8 @@ return super(MetaTestCaseClass, cls).__new__(cls, name, bases, dct) +# The following section is only processed if the test uses sites. + if 'cacheinfo' in dct and dct['cacheinfo']: bases = tuple([CacheInfoMixin] + list(bases)) @@ -355,9 +357,16 @@ for test in tests: test_func = dct[test] +# method decorated with unittest.expectedFailure has no arguments +# so it is assumed to not be a multi-site test method. +if test_func.__code__.co_argcount == 0: +continue + +# a normal test method only accepts 'self' if test_func.__code__.co_argcount == 1: continue +# a multi-site test method only accepts 'self' and the site-key if test_func.__code__.co_argcount != 2: raise Exception( '%s: Test method %s must accept either 1 or 2 arguments; ' -- To view, visit https://gerrit.wikimedia.org/r/166374 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib6d74af168e0bad93df65da2965daffa6b3951e0 Gerrit-PatchSet: 2 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: John Vandenberg jay...@gmail.com Gerrit-Reviewer: John Vandenberg jay...@gmail.com Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl Gerrit-Reviewer: XZise commodorefabia...@gmx.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] @expectedFailureIf(TRAVIS=true) on imageusage test - change (pywikibot/core)
XZise has submitted this change and it was merged. Change subject: @expectedFailureIf(TRAVIS=true) on imageusage test .. @expectedFailureIf(TRAVIS=true) on imageusage test Add new @expectedFailureIf to the imageusage test which has been failing frequently recently, so failure is allowed on TRAVIS, but not on other test hosts. Bug: 71971 Change-Id: I0fa7c8cced3b24c8e8914b7f05290b8be2523575 --- M tests/site_tests.py M tests/utils.py 2 files changed, 17 insertions(+), 0 deletions(-) Approvals: John Vandenberg: Looks good to me, but someone else must approve XZise: Looks good to me, approved Mpaa: Looks good to me, but someone else must approve diff --git a/tests/site_tests.py b/tests/site_tests.py index 248d03d..4e2fb16 100644 --- a/tests/site_tests.py +++ b/tests/site_tests.py @@ -9,6 +9,7 @@ import sys +import os from collections import Iterable from datetime import datetime import re @@ -17,6 +18,8 @@ from pywikibot import config from pywikibot.tools import MediaWikiVersion as LV from pywikibot.data import api + +from tests.utils import expectedFailureIf from tests.aspects import ( unittest, TestCase, DefaultSiteTestCase, @@ -646,6 +649,7 @@ self.assertIsInstance(using, pywikibot.Page) self.assertIn(imagepage, list(using.imagelinks())) +@expectedFailureIf(os.environ.get('TRAVIS', 'false') == 'true') def test_image_usage_in_redirects(self): Test the site.imageusage() method on redirects only. mysite = self.get_site() diff --git a/tests/utils.py b/tests/utils.py index e59f959..ac24c5d 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -18,6 +18,19 @@ PywikibotTestCase = aspects.TestCase +def expectedFailureIf(expect): + +Unit test decorator to expect/allow failure under conditions. + +@param expect: Flag to check if failure is allowed +@type expect: bool + +if expect: +return unittest.expectedFailure +else: +return lambda orig: orig + + class DummySiteinfo(): def __init__(self, cache): -- To view, visit https://gerrit.wikimedia.org/r/166532 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0fa7c8cced3b24c8e8914b7f05290b8be2523575 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: John Vandenberg jay...@gmail.com Gerrit-Reviewer: John Vandenberg jay...@gmail.com Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl Gerrit-Reviewer: Mpaa mpaa.w...@gmail.com Gerrit-Reviewer: XZise commodorefabia...@gmx.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] Fix site setup in wikibase test - change (pywikibot/core)
XZise has submitted this change and it was merged. Change subject: Fix site setup in wikibase test .. Fix site setup in wikibase test Also set nosetests to be verbose. Change-Id: I5c8ba42cae5fbd82a842b48489b4046b17297516 --- M tests/wikibase_tests.py M tox.ini 2 files changed, 4 insertions(+), 4 deletions(-) Approvals: XZise: Looks good to me, approved diff --git a/tests/wikibase_tests.py b/tests/wikibase_tests.py index fddfe33..f41640e 100644 --- a/tests/wikibase_tests.py +++ b/tests/wikibase_tests.py @@ -570,11 +570,11 @@ family = 'wikipedia' -lang = 'en' +code = 'en' def setUp(self): super(TestWriteNormalizeLang, self).setUp() -self.site = pywikibot.Site('en', 'wikipedia') +self.site = self.get_site() self.lang_out = {'en': 'foo'} def test_normalize_lang(self): diff --git a/tox.ini b/tox.ini index 42d799a..f37d458 100644 --- a/tox.ini +++ b/tox.ini @@ -70,13 +70,13 @@ [testenv:nose] setenv = PYWIKIBOT2_NO_USER_CONFIG=1 -commands = nosetests -a !site,!net tests +commands = nosetests -v -a !site,!net tests deps = nose [testenv:nose34] basepython = python3 setenv = PYWIKIBOT2_NO_USER_CONFIG=1 -commands = nosetests -a !site,!net tests +commands = nosetests -v -a !site,!net tests deps = nose six -- To view, visit https://gerrit.wikimedia.org/r/166733 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5c8ba42cae5fbd82a842b48489b4046b17297516 Gerrit-PatchSet: 2 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: John Vandenberg jay...@gmail.com Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl Gerrit-Reviewer: XZise commodorefabia...@gmx.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] Hygiene: Refactor tests / jshintrc to not use globals - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Hygiene: Refactor tests / jshintrc to not use globals .. Hygiene: Refactor tests / jshintrc to not use globals Changes: * Restore lead photo init tests * Restore toggling accessibility tests * Remove languages tests that are no longer run nor relevant (this relates to the old language code when we served languages in html) * Remove fixtures Bug: 71714 Change-Id: I0d7f26ebab3550e184c70dca5886afac1cbaaf50 --- M .jshintrc M includes/MobileFrontend.hooks.php D tests/qunit/fixtures.js D tests/qunit/modules/languages/test_languagesStable.js M tests/qunit/modules/lastEdited/test_time.js D tests/qunit/modules/toggling/test_accessibility.js M tests/qunit/modules/toggling/test_toggle.js M tests/qunit/modules/uploads/test_PhotoApi.js R tests/qunit/modules/uploads/test_init.js M tests/qunit/test_Overlay.js M tests/qunit/test_api.js M tests/qunit/test_application.js M tests/qunit/widgets/test_progress-bar.js 13 files changed, 148 insertions(+), 189 deletions(-) Approvals: Phuedx: Looks good to me, approved jenkins-bot: Verified diff --git a/.jshintrc b/.jshintrc index 9093094..4212d57 100644 --- a/.jshintrc +++ b/.jshintrc @@ -5,13 +5,7 @@ JsDiff: true, Hogan: true, QUnit: true, - mw: true, - mwMobileFrontendConfig: true, - - strictEqual: true, - deepEqual: true, - ok: true, - sinon: true + mw: true }, browser: true, diff --git a/includes/MobileFrontend.hooks.php b/includes/MobileFrontend.hooks.php index 33c325c..0deb897 100644 --- a/includes/MobileFrontend.hooks.php +++ b/includes/MobileFrontend.hooks.php @@ -233,13 +233,6 @@ 'targets' = array( 'mobile' ), ); - // additional frameworks and fixtures we use in tests - $testModules['qunit']['mobile.tests.base'] = $testModuleBoilerplate + array( - 'scripts' = array( - 'tests/qunit/fixtures.js', - ), - ); - // find test files for every RL module foreach ( $wgResourceModules as $key = $module ) { if ( substr( $key, 0, 7 ) === 'mobile.' isset( $module['scripts'] ) ) { @@ -283,7 +276,7 @@ // if test files exist for given module, create a corresponding test module if ( !empty( $testFiles ) ) { $testModules['qunit'][$key.tests] = $testModuleBoilerplate + array( - 'dependencies' = array( 'mobile.tests.base', $key ), + 'dependencies' = array( $key ), 'scripts' = $testFiles, 'templates' = $templates, ); diff --git a/tests/qunit/fixtures.js b/tests/qunit/fixtures.js deleted file mode 100644 index e0bada5..000 --- a/tests/qunit/fixtures.js +++ /dev/null @@ -1,2 +0,0 @@ -// turn sinon into a global -window.sinon = sinon; diff --git a/tests/qunit/modules/languages/test_languagesStable.js b/tests/qunit/modules/languages/test_languagesStable.js deleted file mode 100644 index 328ae4d..000 --- a/tests/qunit/modules/languages/test_languagesStable.js +++ /dev/null @@ -1,38 +0,0 @@ -( function ( M, $ ) { - -var module = M.require( 'modules/languages/languagesStable' ); - -QUnit.module( 'MobileFrontend: languages.js' ); - -QUnit.test( 'no results', function() { - var i, list, - examples = [ - [ - 'ul/ul', - 0 - ], - [ - 'ulli class=interwiki-dea href=//de.m.wikipedia.org/wiki/Unicorn title=Unicorn lang=de hreflang=deDeutsch/a/lili class=interwiki-esa href=//es.m.wikipedia.org/wiki/Unicornio_(desambiguaci%C3%B3n) title=Unicornio (desambiguación) lang=es hreflang=esEspañol/a/lili class=interwiki-faa href=//fa.m.wikipedia.org/wiki/%D8%AA%DA%A9%E2%80%8C%D8%B4%D8%A7%D8%AE_(%D8%A7%D8%A8%D9%87%D8%A7%D9%85%E2%80%8C%D8%B2%D8%AF%D8%A7%DB%8C%DB%8C) title= lang=fa hreflang=faفارسی/a/lili class=interwiki-fra href=//fr.m.wikipedia.org/wiki/Unicorn title=Unicorn lang=fr hreflang=frFrançais/a/lili class=interwiki-koa href=//ko.m.wikipedia.org/wiki/%EC%9C%A0%EB%8B%88%EC%BD%98_(%EB%8F%99%EC%9D%8C%EC%9D%B4%EC%9D%98) title=유니콘 (동음이의) lang=ko hreflang=ko한국어/a/lili class=interwiki-ita href=//it.m.wikipedia.org/wiki/Unicorn title=Unicorn lang=it hreflang=itItaliano/a/lili class=interwiki-hea
[MediaWiki-commits] [Gerrit] Cache instance lists for 1 minute when called via API - change (mediawiki...OpenStackManager)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/166740 Change subject: Cache instance lists for 1 minute when called via API .. Cache instance lists for 1 minute when called via API - No invalidation, but that's ok. Invalidation is hard because not all operations have to go through wikitech. - This is primarily an anti DDoS measure. Change-Id: I1b56ba9688315b5b4ca17ad527db5e8f5e9c2393 --- M api/ApiListNovaInstances.php 1 file changed, 27 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OpenStackManager refs/changes/40/166740/1 diff --git a/api/ApiListNovaInstances.php b/api/ApiListNovaInstances.php index b369339..5350a20 100644 --- a/api/ApiListNovaInstances.php +++ b/api/ApiListNovaInstances.php @@ -17,6 +17,7 @@ public function run() { global $wgOpenStackManagerLDAPUsername; global $wgOpenStackManagerLDAPUserPassword; + global $wgMemc; $params = $this-extractRequestParams(); $project = OpenStackNovaProject::getProjectByName( $params['project'] ); @@ -25,25 +26,35 @@ $this-dieUsage( 'Invalid project specified.', 'badproject' ); } - $user = new OpenStackNovaUser( $wgOpenStackManagerLDAPUsername ); - $userNova = OpenStackNovaController::newFromUser( $user ); - $userNova-authenticate( $wgOpenStackManagerLDAPUsername, $wgOpenStackManagerLDAPUserPassword ); + $key = wfMemcKey( 'openstackmanager', 'apilistnovainstances', $params['region'], $params['project'] ); + $instancesInfo = $wgMemc-get( $key ); + if ( $instancesInfo === false ) { + $user = new OpenStackNovaUser( $wgOpenStackManagerLDAPUsername ); + $userNova = OpenStackNovaController::newFromUser( $user ); + $userNova-authenticate( $wgOpenStackManagerLDAPUsername, $wgOpenStackManagerLDAPUserPassword ); - $userNova-setProject( $project-getName() ); - $userNova-setRegion( $params['region'] ); // validated by API + $userNova-setProject( $project-getName() ); + $userNova-setRegion( $params['region'] ); // validated by API - $instances = $userNova-getInstances(); - foreach ( $instances as $instance ) { - $info = array( - 'name' = $instance-getInstanceName(), - 'state' = $instance-getInstanceState(), - 'ip' = $instance-getInstancePrivateIPs(), - 'id' = $instance-getInstanceId(), - 'floatingip' = $instance-getInstancePublicIPs(), - 'securitygroups' = $instance-getSecurityGroups(), - 'imageid' = $instance-getImageId(), - ); + $instances = $userNova-getInstances(); + $instancesInfo = array(); + foreach ( $instances as $instance ) { + $instancesInfo[ ] = array( + 'name' = $instance-getInstanceName(), + 'state' = $instance-getInstanceState(), + 'ip' = $instance-getInstancePrivateIPs(), + 'id' = $instance-getInstanceId(), + 'floatingip' = $instance-getInstancePublicIPs(), + 'securitygroups' = $instance-getSecurityGroups(), + 'imageid' = $instance-getImageId(), + ); + } + } + // Cache info for 1 minute, not caching for longer since we do not invalidate + $wgMemc-set( $key, $instancesInfo, 1 * 60 ); + + foreach ( $instancesInfo as $info ) { // UGH I hate XML $this-getResult()-setIndexedTagName( $info['securitygroups'], 'group' ); $this-getResult()-setIndexedTagName( $info['ip'], 'ip' ); -- To view, visit https://gerrit.wikimedia.org/r/166740 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1b56ba9688315b5b4ca17ad527db5e8f5e9c2393 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OpenStackManager Gerrit-Branch: wmf/1.25wmf2 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] Fixed some issues in preferences - change (mediawiki...BlueSpiceExtensions)
Smuggli has uploaded a new change for review. https://gerrit.wikimedia.org/r/166741 Change subject: Fixed some issues in preferences .. Fixed some issues in preferences * Message was not shown in sort items Change-Id: I0e51d6c3f87b4f6cd2d570341ddd5eee2bfa0f40 --- M ExtendedSearch/ExtendedSearch.class.php M Preferences/resources/bluespice.preferences.js 2 files changed, 10 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions refs/changes/41/166741/1 diff --git a/ExtendedSearch/ExtendedSearch.class.php b/ExtendedSearch/ExtendedSearch.class.php index ecf28d0..29c3ce7 100644 --- a/ExtendedSearch/ExtendedSearch.class.php +++ b/ExtendedSearch/ExtendedSearch.class.php @@ -206,7 +206,7 @@ * @return boolean Always true to keep hook running */ public function onBSStateBarAddSortBodyVars( $aSortBodyVars ) { - $aSortBodyVars['statebarbodymorelikethis'] = wfMessage( 'bs-articleinfo-statebarbodymorelikethis' )-plain(); + $aSortBodyVars['statebarbodymorelikethis'] = wfMessage( 'bs-extendedsearch-morelikethis' )-plain(); return true; } diff --git a/Preferences/resources/bluespice.preferences.js b/Preferences/resources/bluespice.preferences.js index fbc3eb1..7746488 100644 --- a/Preferences/resources/bluespice.preferences.js +++ b/Preferences/resources/bluespice.preferences.js @@ -1,15 +1,14 @@ -$( document ).ready( function() { +( function ( mw, bs, $, undefined ) { $('.bs-prefs .bs-prefs-head').click( function() { - var oPrefsBody = $(this).parent().find('.bs-prefs-body'); - var sCookieKey = $(this).parent().attr('id')+'-viewstate'; - if( oPrefsBody.is(:visible) == true ) { + var oPrefsBody = $( this ).parent().find( '.bs-prefs-body' ), + sCookieKey = $( this ).parent().attr( 'id' )+'-viewstate'; + if ( oPrefsBody.is( :visible ) == true ) { $(oPrefsBody[0]).slideUp(500); $(oPrefsBody[0]).parent().addClass('bs-prefs-viewstate-collapsed'); $.cookie(sCookieKey, null, { path: '/' }); - } - else { + } else { $(oPrefsBody[0]).slideDown(500); $(oPrefsBody[0]).parent().removeClass('bs-prefs-viewstate-collapsed'); $.cookie(sCookieKey, 'opened', { @@ -18,11 +17,11 @@ }); } }).each( function() { - var oPrefsBody = $(this).parent().find('.bs-prefs-body'); - var sCookieKey = $(this).parent().attr('id')+'-viewstate'; - if( sCookieKey != 'bluespice-viewstate' ($.cookie( sCookieKey ) == null || $.cookie( sCookieKey ) != 'opened')) { + var oPrefsBody = $(this).parent().find('.bs-prefs-body'), + sCookieKey = $(this).parent().attr('id')+'-viewstate'; + if ( sCookieKey != 'bluespice-viewstate' ($.cookie( sCookieKey ) == null || $.cookie( sCookieKey ) != 'opened')) { oPrefsBody.hide(); $(oPrefsBody[0]).parent().addClass('bs-prefs-viewstate-collapsed'); } }); -}); \ No newline at end of file +}( mediaWiki, blueSpice, jQuery ) ); \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/166741 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0e51d6c3f87b4f6cd2d570341ddd5eee2bfa0f40 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions Gerrit-Branch: master Gerrit-Owner: Smuggli mug...@hallowelt.biz ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] pep8-ify handleArgs to be handle_args - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: pep8-ify handleArgs to be handle_args .. pep8-ify handleArgs to be handle_args Rename the method, with args passed as a list instead of as *args, and add do_help parameter as an easy way for the caller to handle -help and also prevent sys.exit() being invoked. Change-Id: I6eb20ca4b6ba8886f2d1fb31afcb2b2f86da40df --- M pywikibot/__init__.py M pywikibot/bot.py 2 files changed, 27 insertions(+), 10 deletions(-) Approvals: John Vandenberg: Looks good to me, but someone else must approve XZise: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py index 0444a33..ad0c475 100644 --- a/pywikibot/__init__.py +++ b/pywikibot/__init__.py @@ -29,8 +29,10 @@ from pywikibot import config2 as config from pywikibot.bot import ( output, warning, error, critical, debug, stdout, exception, -input, input_choice, inputChoice, handleArgs, showHelp, ui, log, +input, input_choice, inputChoice, handle_args, showHelp, ui, log, calledModuleName, Bot, WikidataBot, QuitKeyboardInterrupt, +# the following are flagged as deprecated on usage +handleArgs, ) from pywikibot.exceptions import ( Error, InvalidTitle, BadTitle, NoPage, SectionError, @@ -66,8 +68,8 @@ 'ItemPage', 'PropertyPage', 'Claim', 'TimeStripper', 'html2unicode', 'url2unicode', 'unicode2html', 'stdout', 'output', 'warning', 'error', 'critical', 'debug', - 'exception', 'input_choice', - 'input', 'inputChoice', 'handleArgs', 'showHelp', 'ui', 'log', + 'exception', 'input_choice', 'input', 'inputChoice', + 'handle_args', 'handleArgs', 'showHelp', 'ui', 'log', 'calledModuleName', 'Bot', 'WikidataBot', 'Error', 'InvalidTitle', 'BadTitle', 'NoPage', 'SectionError', 'SiteDefinitionError', 'NoSuchSite', 'UnknownSite', 'UnknownFamily', diff --git a/pywikibot/bot.py b/pywikibot/bot.py index 3321c76..ed90608 100644 --- a/pywikibot/bot.py +++ b/pywikibot/bot.py @@ -585,16 +585,25 @@ return os.path.basename(called) -def handleArgs(*args): -Handle standard command line arguments, return the rest as a list. +def handle_args(args=None, do_help=True): + +Handle standard command line arguments, and return the rest as a list. Takes the command line arguments as Unicode strings, processes all -global parameters such as -lang or -log. Returns a list of all arguments -that are not global. This makes sure that global arguments are applied -first, regardless of the order in which the arguments were given. +global parameters such as -lang or -log, initialises the logging layer, +which emits startup information into log at level 'verbose'. + +This makes sure that global arguments are applied first, +regardless of the order in which the arguments were given. args may be passed as an argument, thereby overriding sys.argv +@param args: Command line arguments +@type args: list of unicode +@param do_help: Handle parameter '-help' to show help and invoke sys.exit +@type do_help: bool +@return: list of arguments not recognised globally +@rtype: list of unicode # get commandline arguments if necessary if not args: @@ -609,9 +618,9 @@ moduleName = terminal-interface nonGlobalArgs = [] username = None -do_help = False +do_help = None if do_help else False for arg in args: -if arg == '-help': +if do_help is not False and arg == '-help': do_help = True elif arg.startswith('-family:'): config.family = arg[len(-family:):] @@ -721,10 +730,16 @@ if do_help: showHelp() sys.exit(0) + pywikibot.debug(uhandleArgs() completed., _logger) return nonGlobalArgs +def handleArgs(*args): +DEPRECATED. Use handle_args(). +return handle_args(args) + + def showHelp(module_name=None): Show help for the Bot. if not module_name: -- To view, visit https://gerrit.wikimedia.org/r/165972 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6eb20ca4b6ba8886f2d1fb31afcb2b2f86da40df Gerrit-PatchSet: 2 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: John Vandenberg jay...@gmail.com Gerrit-Reviewer: John Vandenberg jay...@gmail.com Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl Gerrit-Reviewer: XZise commodorefabia...@gmx.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] Adds list=novaprojects and list=novainstances API - change (mediawiki...OpenStackManager)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/166742 Change subject: Adds list=novaprojects and list=novainstances API .. Adds list=novaprojects and list=novainstances API Squash of the following changes: I4667b02b2ab096677a3f04d131d5d4c24bb27dda I9dedd527bd7a4ca611fb1aa85bf73dd202a679f2 Ia9ed925c1e75fce29baf9a1b81cf2a23b0eb6e0f I1b56ba9688315b5b4ca17ad527db5e8f5e9c2393 Change-Id: I5cba45d61651c0bcfa6360a0110a87827cb31d98 --- M OpenStackManager.php A api/ApiListNovaInstances.php A api/ApiListNovaProjects.php M nova/OpenStackNovaController.php M nova/OpenStackNovaProject.php 5 files changed, 163 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OpenStackManager refs/changes/42/166742/1 diff --git a/OpenStackManager.php b/OpenStackManager.php index 011a4c1..bf503df 100644 --- a/OpenStackManager.php +++ b/OpenStackManager.php @@ -195,6 +195,8 @@ $wgAutoloadClasses['ApiNovaProjects'] = $dir . 'api/ApiNovaProjects.php'; $wgAutoloadClasses['ApiNovaProjectLimits'] = $dir . 'api/ApiNovaProjectLimits.php'; $wgAutoloadClasses['ApiNovaServiceGroups'] = $dir . 'api/ApiNovaServiceGroups.php'; +$wgAutoloadClasses['ApiListNovaProjects'] = $dir . 'api/ApiListNovaProjects.php'; +$wgAutoloadClasses['ApiListNovaInstances'] = $dir . 'api/ApiListNovaInstances.php'; $wgAutoloadClasses['Spyc'] = $dir . 'Spyc.php'; $wgAutoloadClasses['OpenStackManagerNotificationFormatter'] = $dir . 'OpenStackManagerNotificationFormatter.php'; $wgAutoloadClasses['OpenStackManagerEvent'] = $dir . 'OpenStackManagerEvent.php'; @@ -300,6 +302,8 @@ $wgAPIModules['novaprojects'] = 'ApiNovaProjects'; $wgAPIModules['novaservicegroups'] = 'ApiNovaServiceGroups'; $wgAPIModules['novaprojectlimits'] = 'ApiNovaProjectLimits'; +$wgAPIListModules['novaprojects'] = 'ApiListNovaProjects'; +$wgAPIListModules['novainstances'] = 'ApiListNovaInstances'; # Schema changes $wgHooks['LoadExtensionSchemaUpdates'][] = 'efOpenStackSchemaUpdates'; diff --git a/api/ApiListNovaInstances.php b/api/ApiListNovaInstances.php new file mode 100644 index 000..5350a20 --- /dev/null +++ b/api/ApiListNovaInstances.php @@ -0,0 +1,99 @@ +?php + +class ApiListNovaInstances extends ApiQueryGeneratorBase { + + public function __construct( ApiQuery $query, $moduleName ) { + parent::__construct( $query, $moduleName, 'ni' ); + } + + public function execute() { + $this-run(); + } + + public function executeGenerator( $resultPageSet ) { + $this-run(); + } + + public function run() { + global $wgOpenStackManagerLDAPUsername; + global $wgOpenStackManagerLDAPUserPassword; + global $wgMemc; + + $params = $this-extractRequestParams(); + $project = OpenStackNovaProject::getProjectByName( $params['project'] ); + if ( !$project ) { + // This shouldn't be possible since the API should enforce valid names + $this-dieUsage( 'Invalid project specified.', 'badproject' ); + } + + $key = wfMemcKey( 'openstackmanager', 'apilistnovainstances', $params['region'], $params['project'] ); + $instancesInfo = $wgMemc-get( $key ); + if ( $instancesInfo === false ) { + $user = new OpenStackNovaUser( $wgOpenStackManagerLDAPUsername ); + $userNova = OpenStackNovaController::newFromUser( $user ); + $userNova-authenticate( $wgOpenStackManagerLDAPUsername, $wgOpenStackManagerLDAPUserPassword ); + + $userNova-setProject( $project-getName() ); + $userNova-setRegion( $params['region'] ); // validated by API + + $instances = $userNova-getInstances(); + $instancesInfo = array(); + foreach ( $instances as $instance ) { + $instancesInfo[ ] = array( + 'name' = $instance-getInstanceName(), + 'state' = $instance-getInstanceState(), + 'ip' = $instance-getInstancePrivateIPs(), + 'id' = $instance-getInstanceId(), + 'floatingip' = $instance-getInstancePublicIPs(), + 'securitygroups' = $instance-getSecurityGroups(), + 'imageid' = $instance-getImageId(), + ); + } + } + + // Cache info for 1 minute, not caching for longer since we do not invalidate + $wgMemc-set( $key, $instancesInfo, 1 * 60 ); + +
[MediaWiki-commits] [Gerrit] Submodule bump for I5cba45d61651c0bcfa6360a0110a87827cb31d98 - change (mediawiki/core)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/166743 Change subject: Submodule bump for I5cba45d61651c0bcfa6360a0110a87827cb31d98 .. Submodule bump for I5cba45d61651c0bcfa6360a0110a87827cb31d98 Change-Id: I3ef24b3308fa16ca672642b7ba807b084f6643ce --- M extensions/OpenStackManager 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/43/166743/1 diff --git a/extensions/OpenStackManager b/extensions/OpenStackManager index 06fd367..245cf06 16 --- a/extensions/OpenStackManager +++ b/extensions/OpenStackManager -Subproject commit 06fd367451a227cbe82ea7de04174507c8901a62 +Subproject commit 245cf063606764f4c268671a77549e750209fb44 -- To view, visit https://gerrit.wikimedia.org/r/166743 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3ef24b3308fa16ca672642b7ba807b084f6643ce Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.25wmf3 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] Push previous and next buttons on mobile diff to stable - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Push previous and next buttons on mobile diff to stable .. Push previous and next buttons on mobile diff to stable Change-Id: Ia959f7a5bf9e7231250a85e289e3d35466819cfc --- M includes/specials/SpecialMobileDiff.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Phuedx: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/specials/SpecialMobileDiff.php b/includes/specials/SpecialMobileDiff.php index b571b78..3829606 100644 --- a/includes/specials/SpecialMobileDiff.php +++ b/includes/specials/SpecialMobileDiff.php @@ -238,7 +238,7 @@ ); $prev = $this-rev-getPrevious(); $next = $this-rev-getNext(); - if ( $ctx-isBetaGroupMember() ( $prev || $next ) ) { + if ( $prev || $next ) { $history = Html::openElement( 'ul', array( 'class' = 'hlist revision-history-links' ) ); if ( $prev ) { $history .= Html::openElement( 'li' ) . -- To view, visit https://gerrit.wikimedia.org/r/166698 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia959f7a5bf9e7231250a85e289e3d35466819cfc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Bmansurov bmansu...@wikimedia.org Gerrit-Reviewer: Awjrichards aricha...@wikimedia.org Gerrit-Reviewer: JGonera jgon...@wikimedia.org Gerrit-Reviewer: Phuedx g...@samsmith.io Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Submodule bump for deployment, for two changes. - change (mediawiki/core)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/166744 Change subject: Submodule bump for deployment, for two changes. .. Submodule bump for deployment, for two changes. Change are: Ia9ed925c1e75fce29baf9a1b81cf2a23b0eb6e0f I1b56ba9688315b5b4ca17ad527db5e8f5e9c2393 Change-Id: Iaf80da60b2aaa70782117aabf52b5638bdbe5051 --- M extensions/OpenStackManager 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/44/166744/1 diff --git a/extensions/OpenStackManager b/extensions/OpenStackManager index cc46107..cc2bef9 16 --- a/extensions/OpenStackManager +++ b/extensions/OpenStackManager -Subproject commit cc461079671684d5438823ec6d0e04c6d8d61ce7 +Subproject commit cc2bef9130dc38ebab646b1d56e55dee37c6f1bb -- To view, visit https://gerrit.wikimedia.org/r/166744 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaf80da60b2aaa70782117aabf52b5638bdbe5051 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.25wmf2 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] Fix crash in sorting of nearby pages - change (apps...wikipedia)
Dbrant has submitted this change and it was merged. Change subject: Fix crash in sorting of nearby pages .. Fix crash in sorting of nearby pages IllegalArgumentException: Comparison method violates its general contract bug: 72066 Change-Id: Ife50b225797cf0a471ac29a6db1d676316a7a860 --- M wikipedia-it/src/main/java/org/wikipedia/nearby/NearbyUnitTests.java M wikipedia/src/main/java/org/wikipedia/nearby/NearbyActivity.java M wikipedia/src/main/java/org/wikipedia/nearby/NearbyPage.java 3 files changed, 75 insertions(+), 36 deletions(-) Approvals: Dbrant: Looks good to me, approved diff --git a/wikipedia-it/src/main/java/org/wikipedia/nearby/NearbyUnitTests.java b/wikipedia-it/src/main/java/org/wikipedia/nearby/NearbyUnitTests.java index 45f6d57..80db0f5 100644 --- a/wikipedia-it/src/main/java/org/wikipedia/nearby/NearbyUnitTests.java +++ b/wikipedia-it/src/main/java/org/wikipedia/nearby/NearbyUnitTests.java @@ -19,7 +19,8 @@ private static final int FOUR = 4; private static final double SHORT_DISTANCE = 0.001d; private static final double LONGER_DISTANCE = 0.01d; -private static final int A_B_DISTANCE = 111320; +/** dist(origin, point a) */ +private static final int A = 111319; private Location nextLocation; private ListNearbyPage nearbyPages; @@ -37,6 +38,7 @@ } public void testSort() throws Exception { +calcDistances(nearbyPages); Collections.sort(nearbyPages, new NearbyDistanceComparator()); assertEquals(a, nearbyPages.get(0).getTitle()); assertEquals(b, nearbyPages.get(1).getTitle()); @@ -46,6 +48,7 @@ public void testSortWithNullLocations() throws Exception { nearbyPages.add(new NearbyPage(new JSONObject({ \title\: \d\ }))); nearbyPages.add(new NearbyPage(new JSONObject({ \title\: \e\ }))); +calcDistances(nearbyPages); Collections.sort(nearbyPages, new NearbyDistanceComparator()); assertEquals(a, nearbyPages.get(0).getTitle()); assertEquals(b, nearbyPages.get(1).getTitle()); @@ -57,10 +60,16 @@ public void testCompare() throws Exception { NearbyPage nullLocPage = new NearbyPage(new JSONObject({ \title\: \nowhere\ })); + +calcDistances(nearbyPages); +nullLocPage.setDistance(getDistance(nullLocPage.getLocation())); +assertEquals(Integer.MAX_VALUE, nullLocPage.getDistance()); + NearbyDistanceComparator comp = new NearbyDistanceComparator(); -assertEquals(A_B_DISTANCE, comp.compare(nearbyPages.get(0), nearbyPages.get(1))); -assertEquals(-1, comp.compare(nearbyPages.get(0), nullLocPage)); -assertEquals(1, comp.compare(nullLocPage, nearbyPages.get(0))); +assertEquals(A, comp.compare(nearbyPages.get(1), nearbyPages.get(2))); +assertEquals(-1 * A, comp.compare(nearbyPages.get(2), nearbyPages.get(1))); +assertEquals(Integer.MAX_VALUE - A, comp.compare(nullLocPage, nearbyPages.get(2))); +assertEquals((Integer.MIN_VALUE + 1) + A, comp.compare(nearbyPages.get(2), nullLocPage)); // - (max - a) assertEquals(0, comp.compare(nullLocPage, nullLocPage)); } @@ -91,22 +100,30 @@ private class NearbyDistanceComparator implements ComparatorNearbyPage { public int compare(NearbyPage a, NearbyPage b) { -if (a.getLocation() == null) { -if (b.getLocation() == null) { -return 0; -} else { -return 1; -} -} else if (b.getLocation() == null) { -return -1; -} else { -return getDistance(a.getLocation()) - getDistance(b.getLocation()); -} +return a.getDistance() - b.getDistance(); +} +} + +// +// UGLY: copy of production code +// + +/** + * Calculates the distances from the origin to the given pages. + * This method should be called before sorting. + */ +private void calcDistances(ListNearbyPage pages) { +for (NearbyPage page : pages) { +page.setDistance(getDistance(page.getLocation())); } } private int getDistance(Location otherLocation) { -return (int) nextLocation.distanceTo(otherLocation); +if (otherLocation == null) { +return Integer.MAX_VALUE; +} else { +return (int) nextLocation.distanceTo(otherLocation); +} } private static final int ONE_KM = 1000; diff --git a/wikipedia/src/main/java/org/wikipedia/nearby/NearbyActivity.java b/wikipedia/src/main/java/org/wikipedia/nearby/NearbyActivity.java index a4966ca..4a0bbe4 100644 --- a/wikipedia/src/main/java/org/wikipedia/nearby/NearbyActivity.java +++ b/wikipedia/src/main/java/org/wikipedia/nearby/NearbyActivity.java @@ -1,6 +1,5 @@ package org.wikipedia.nearby; -import
[MediaWiki-commits] [Gerrit] Also search files in search as you type - change (mediawiki...BlueSpiceExtensions)
Smuggli has uploaded a new change for review. https://gerrit.wikimedia.org/r/166745 Change subject: Also search files in search as you type .. Also search files in search as you type No files were searched in search as you type even it as enabled Change-Id: Ia0267183657394f17e10e0694a6d2981dae8b2c7 --- M ExtendedSearch/ExtendedSearch.class.php M ExtendedSearch/resources/bluespice.extendedSearch.specialpage.js 2 files changed, 11 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions refs/changes/45/166745/1 diff --git a/ExtendedSearch/ExtendedSearch.class.php b/ExtendedSearch/ExtendedSearch.class.php index ecf28d0..c1ba179 100644 --- a/ExtendedSearch/ExtendedSearch.class.php +++ b/ExtendedSearch/ExtendedSearch.class.php @@ -96,7 +96,7 @@ // max 32 chars with userlevel! 123 456789012345678 90123456789012 '::' counts as one char :-) BsConfig::registerVar( 'MW::ExtendedSearch::DefFuzziness', '0.5', BsConfig::TYPE_STRING, 'bs-extendedsearch-pref-defduzziness' ); BsConfig::registerVar( 'MW::ExtendedSearch::LimitResults', 15, BsConfig::TYPE_INT|BsConfig::LEVEL_USER, 'bs-extendedsearch-pref-limitresultdef', 'int' ); - BsConfig::registerVar( 'MW::ExtendedSearch::SearchFiles', true, BsConfig::TYPE_BOOL|BsConfig::LEVEL_USER, 'bs-extendedsearch-pref-searchfiles', 'toggle' ); + BsConfig::registerVar( 'MW::ExtendedSearch::SearchFiles', true, BsConfig::TYPE_BOOL|BsConfig::LEVEL_USER|BsConfig::RENDER_AS_JAVASCRIPT, 'bs-extendedsearch-pref-searchfiles', 'toggle' ); BsConfig::registerVar( 'MW::ExtendedSearch::JumpToTitle', false, BsConfig::TYPE_BOOL|BsConfig::LEVEL_USER, 'bs-extendedsearch-pref-jumptotitle', 'toggle' ); BsConfig::registerVar( 'MW::ExtendedSearch::ShowCreateSugg', true, BsConfig::TYPE_BOOL|BsConfig::LEVEL_USER, 'bs-extendedsearch-pref-showcreatesugg', 'toggle' ); BsConfig::registerVar( 'MW::ExtendedSearch::ShowFacets', true, BsConfig::TYPE_BOOL|BsConfig::LEVEL_USER, 'bs-extendedsearch-pref-showfacets', 'toggle' ); diff --git a/ExtendedSearch/resources/bluespice.extendedSearch.specialpage.js b/ExtendedSearch/resources/bluespice.extendedSearch.specialpage.js index 764..a1785f8 100644 --- a/ExtendedSearch/resources/bluespice.extendedSearch.specialpage.js +++ b/ExtendedSearch/resources/bluespice.extendedSearch.specialpage.js @@ -348,10 +348,11 @@ * Search as you type results */ searchAsYouType: function() { - var inputField = $( '#bs-extendedsearch-inputfieldtext-specialpage' ); - var url; - var thread; - var keys = new Array( 13, 17, 18, 20, 27, 32, 37, 38, 39, 40, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123 ); + var inputField = $( '#bs-extendedsearch-inputfieldtext-specialpage' ), + url, + thread, + keys = new Array( 13, 17, 18, 20, 27, 32, 37, 38, 39, 40, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123 ); inputField.keydown( function() { clearTimeout( thread ); @@ -360,9 +361,13 @@ inputField.keyup( function( event ) { clearTimeout( thread ); if ( $.inArray( event.which, keys ) 0 ) return false; - if ( inputField.val() == '' ) return false; + if ( inputField.val() === '' ) return false; url = wgServer + wgScriptPath + '?search_scope=textsearch_submit=1q=' + encodeURIComponent( inputField.val() ); + + if ( typeof bsExtendedSearchSearchFiles !== 'undefined' ) { + url += 'search_files=' + ( bsExtendedSearchSearchFiles ) ? 1 : 0; + } thread = setTimeout( function() { ExtendedSearchAjaxManager.ajaxMeANewResultsPlz( url ) }, 300 ); } ); } -- To view, visit https://gerrit.wikimedia.org/r/166745 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia0267183657394f17e10e0694a6d2981dae8b2c7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions Gerrit-Branch: master Gerrit-Owner: Smuggli mug...@hallowelt.biz ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Also search files in search as you type - change (mediawiki...BlueSpiceExtensions)
Smuggli has submitted this change and it was merged. Change subject: Also search files in search as you type .. Also search files in search as you type No files were searched in search as you type even it as enabled Change-Id: Ia0267183657394f17e10e0694a6d2981dae8b2c7 --- M ExtendedSearch/ExtendedSearch.class.php M ExtendedSearch/resources/bluespice.extendedSearch.specialpage.js 2 files changed, 11 insertions(+), 6 deletions(-) Approvals: Smuggli: Verified; Looks good to me, approved diff --git a/ExtendedSearch/ExtendedSearch.class.php b/ExtendedSearch/ExtendedSearch.class.php index ecf28d0..c1ba179 100644 --- a/ExtendedSearch/ExtendedSearch.class.php +++ b/ExtendedSearch/ExtendedSearch.class.php @@ -96,7 +96,7 @@ // max 32 chars with userlevel! 123 456789012345678 90123456789012 '::' counts as one char :-) BsConfig::registerVar( 'MW::ExtendedSearch::DefFuzziness', '0.5', BsConfig::TYPE_STRING, 'bs-extendedsearch-pref-defduzziness' ); BsConfig::registerVar( 'MW::ExtendedSearch::LimitResults', 15, BsConfig::TYPE_INT|BsConfig::LEVEL_USER, 'bs-extendedsearch-pref-limitresultdef', 'int' ); - BsConfig::registerVar( 'MW::ExtendedSearch::SearchFiles', true, BsConfig::TYPE_BOOL|BsConfig::LEVEL_USER, 'bs-extendedsearch-pref-searchfiles', 'toggle' ); + BsConfig::registerVar( 'MW::ExtendedSearch::SearchFiles', true, BsConfig::TYPE_BOOL|BsConfig::LEVEL_USER|BsConfig::RENDER_AS_JAVASCRIPT, 'bs-extendedsearch-pref-searchfiles', 'toggle' ); BsConfig::registerVar( 'MW::ExtendedSearch::JumpToTitle', false, BsConfig::TYPE_BOOL|BsConfig::LEVEL_USER, 'bs-extendedsearch-pref-jumptotitle', 'toggle' ); BsConfig::registerVar( 'MW::ExtendedSearch::ShowCreateSugg', true, BsConfig::TYPE_BOOL|BsConfig::LEVEL_USER, 'bs-extendedsearch-pref-showcreatesugg', 'toggle' ); BsConfig::registerVar( 'MW::ExtendedSearch::ShowFacets', true, BsConfig::TYPE_BOOL|BsConfig::LEVEL_USER, 'bs-extendedsearch-pref-showfacets', 'toggle' ); diff --git a/ExtendedSearch/resources/bluespice.extendedSearch.specialpage.js b/ExtendedSearch/resources/bluespice.extendedSearch.specialpage.js index 764..a1785f8 100644 --- a/ExtendedSearch/resources/bluespice.extendedSearch.specialpage.js +++ b/ExtendedSearch/resources/bluespice.extendedSearch.specialpage.js @@ -348,10 +348,11 @@ * Search as you type results */ searchAsYouType: function() { - var inputField = $( '#bs-extendedsearch-inputfieldtext-specialpage' ); - var url; - var thread; - var keys = new Array( 13, 17, 18, 20, 27, 32, 37, 38, 39, 40, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123 ); + var inputField = $( '#bs-extendedsearch-inputfieldtext-specialpage' ), + url, + thread, + keys = new Array( 13, 17, 18, 20, 27, 32, 37, 38, 39, 40, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123 ); inputField.keydown( function() { clearTimeout( thread ); @@ -360,9 +361,13 @@ inputField.keyup( function( event ) { clearTimeout( thread ); if ( $.inArray( event.which, keys ) 0 ) return false; - if ( inputField.val() == '' ) return false; + if ( inputField.val() === '' ) return false; url = wgServer + wgScriptPath + '?search_scope=textsearch_submit=1q=' + encodeURIComponent( inputField.val() ); + + if ( typeof bsExtendedSearchSearchFiles !== 'undefined' ) { + url += 'search_files=' + ( bsExtendedSearchSearchFiles ) ? 1 : 0; + } thread = setTimeout( function() { ExtendedSearchAjaxManager.ajaxMeANewResultsPlz( url ) }, 300 ); } ); } -- To view, visit https://gerrit.wikimedia.org/r/166745 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia0267183657394f17e10e0694a6d2981dae8b2c7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions Gerrit-Branch: master Gerrit-Owner: Smuggli mug...@hallowelt.biz Gerrit-Reviewer: Smuggli mug...@hallowelt.biz Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [WIP] Question dialog and API tests - change (mediawiki...Teahouse)
Robert Vogel has submitted this change and it was merged. Change subject: [WIP] Question dialog and API tests .. [WIP] Question dialog and API tests * Question dialog improvements * Proof of concept implementation of save functionality TODO: * Improve validation * Move save functionality out of dialog implementation Change-Id: Ia3c4dc5aeed4c30a02e48c9fce79aecef29f2462 --- M Teahouse.php M gadgetize.json M i18n/de.json M i18n/en.json M i18n/qqq.json M resources/mediawiki.teahouse.css M resources/mediawiki.teahouse.dialog.js M resources/mediawiki.teahouse.gadget.development.js M resources/mediawiki.teahouse.js M resources/ui/dialogs/th.ui.QuestionDialog.js 10 files changed, 292 insertions(+), 73 deletions(-) Approvals: Robert Vogel: Verified; Looks good to me, approved diff --git a/Teahouse.php b/Teahouse.php index b55d790..bab9afc 100644 --- a/Teahouse.php +++ b/Teahouse.php @@ -25,7 +25,7 @@ 'author' = array( 'Robert Vogel' ), - //'url' = 'https://www.mediawiki.org/wiki/Extension:Teahouse', + 'url' = 'https://www.mediawiki.org/wiki/Extension:Teahouse', 'description' = '', 'version' = 1.24 ); @@ -35,21 +35,14 @@ $wgResourceModules['ext.teahouse'] = array( 'scripts' = array( 'mediawiki.teahouse.js', + 'mediawiki.teahouse.board.js', + 'mediawiki.teahouse.notifications.js', 'mediawiki.teahouse.dialog.js', //'mediawiki.teahouse.gadget.js', 'mediawiki.teahouse.gadget.development.js' ), 'styles' = array( 'mediawiki.teahouse.css' - ), - 'messages' = array( - 'th-button-text', - 'th-dialog-title', - 'th-dialog-description-top', - 'th-dialog-label-summary', - 'th-dialog-label-text', - 'th-dialog-btn-ok', - 'th-dialog-btn-cancel', ), 'localBasePath' = __DIR__.'/resources', 'remoteExtPath' = 'Teahouse/resources', diff --git a/gadgetize.json b/gadgetize.json index e903531..08b15a9 100644 --- a/gadgetize.json +++ b/gadgetize.json @@ -3,6 +3,8 @@ MediaWiki:Gadget-teahouse/main.js: [ resources/mediawiki.teahouse.js, + resources/mediawiki.teahouse.notifications.js, + resources/mediawiki.teahouse.board.js, resources/mediawiki.teahouse.dialog.js, resources/mediawiki.teahouse.gadget.js ], @@ -15,8 +17,9 @@ resources/mediawiki.teahouse.css ], - Template:Pending_Question: [ assets/Template_Pending_Questions.wiki ], - Template:Answered_Question: [ assets/Template_Answered_Questions.wiki ], + Template:Teahouse/Pending_Question: [ assets/Template_Pending_Questions.wiki ], + Template:Teahouse/Answered_Question: [ assets/Template_Answered_Questions.wiki ], + Template:Teahouse/Question_ListItem: [ assets/Template_Answered_Questions.wiki ], Module:Teahouse_Questions: [ assets/Module_Teahouse_Questions.lua ], Help:Teahouse: [ assets/Help_Teahouse.wiki ] } \ No newline at end of file diff --git a/i18n/de.json b/i18n/de.json index 84d5f47..3c1edf0 100644 --- a/i18n/de.json +++ b/i18n/de.json @@ -7,9 +7,15 @@ th-desc: Entwicklungserweiterung für das 'Teahouse' Gadget, th-button-text: Stelle deine Frage, th-dialog-title: Stelle deine Frage, - th-dialog-description-top: Bitte schreibe eine kurze Frage in das Textfeld. Wenn du weitere Informationen angeben willst, verwende bitte die große Textbox., + th-dialog-description-top: Stelle deine Frage an die Wikipedia Community! Auf $1 kannst du dir die Fragen anderer Benutzer ansehen., th-dialog-label-summary: Deine Frage, - th-dialog-label-text: Genauere Beschreibung der Frage (Du kannst WikiText verwenden), - th-dialog-btn-ok: Frage abschicken, - th-dialog-btn-cancel: Abbrechen + th-dialog-label-text: Genauere Beschreibung (Du kannst WikiText verwenden), + th-dialog-btn-ok: Veröffentlichen, + th-dialog-btn-cancel: Abbrechen, + th-dialog-disclaimer: Veröffentlichung unter den Nutzungsbedingungen der Wikipedia, + th-dialog-anon-ip-hint: Deine IP Adresse wird zusammen mit der Frage veröffentlicht, + th-dialog-msg-title-save: Frage veröffentlicht, + th-dialog-msg-text-save: Deine Frage wurde unter $1 veröffentlicht. Möchtest du die komplette Liste der Fragen sehen?, + th-dialog-msg-btn-yes: Ja, + th-dialog-msg-btn-no: Nein } diff --git a/i18n/en.json b/i18n/en.json index bc5e111..7faee83 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -7,9 +7,15 @@ th-desc: Development extension for \Teahouse\ gadget, th-button-text: Ask your question, th-dialog-title: Ask your question, -
[MediaWiki-commits] [Gerrit] ganglia: use install2001 public name - change (operations/puppet)
Filippo Giunchedi has uploaded a new change for review. https://gerrit.wikimedia.org/r/166746 Change subject: ganglia: use install2001 public name .. ganglia: use install2001 public name Change-Id: Ieb17811184d814b55bf47d898acc6cd60eaf977a --- M manifests/ganglia.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/46/166746/1 diff --git a/manifests/ganglia.pp b/manifests/ganglia.pp index 152c396..058686c 100644 --- a/manifests/ganglia.pp +++ b/manifests/ganglia.pp @@ -326,7 +326,7 @@ 'SSL cluster eqiad' = 'ssl1001.wikimedia.org ssl1002.wikimedia.org', 'Swift eqiad'= 'ms-fe1001.eqiad.wmnet ms-fe1002.eqiad.wmnet', 'Swift esams'= 'hooft.esams.wikimedia.org:11676', -'Swift codfw'= 'install2001.codfw.wmnet:10676', +'Swift codfw'= 'install2001.wikimedia.org:10676', 'Search eqiad' = 'search1001.eqiad.wmnet search1002.eqiad.wmnet', 'Bits caches esams' = 'hooft.esams.wikimedia.org:11670 cp3019.esams.wikimedia.org cp3020.esams.wikimedia.org', 'LVS loadbalancers esams'= 'hooft.esams.wikimedia.org:11651 lvs3001.esams.wmnet lvs3002.esams.wmnet', -- To view, visit https://gerrit.wikimedia.org/r/166746 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ieb17811184d814b55bf47d898acc6cd60eaf977a Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi fgiunch...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] ganglia: use install2001 public name - change (operations/puppet)
Filippo Giunchedi has submitted this change and it was merged. Change subject: ganglia: use install2001 public name .. ganglia: use install2001 public name Change-Id: Ieb17811184d814b55bf47d898acc6cd60eaf977a --- M manifests/ganglia.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Filippo Giunchedi: Verified; Looks good to me, approved diff --git a/manifests/ganglia.pp b/manifests/ganglia.pp index 152c396..058686c 100644 --- a/manifests/ganglia.pp +++ b/manifests/ganglia.pp @@ -326,7 +326,7 @@ 'SSL cluster eqiad' = 'ssl1001.wikimedia.org ssl1002.wikimedia.org', 'Swift eqiad'= 'ms-fe1001.eqiad.wmnet ms-fe1002.eqiad.wmnet', 'Swift esams'= 'hooft.esams.wikimedia.org:11676', -'Swift codfw'= 'install2001.codfw.wmnet:10676', +'Swift codfw'= 'install2001.wikimedia.org:10676', 'Search eqiad' = 'search1001.eqiad.wmnet search1002.eqiad.wmnet', 'Bits caches esams' = 'hooft.esams.wikimedia.org:11670 cp3019.esams.wikimedia.org cp3020.esams.wikimedia.org', 'LVS loadbalancers esams'= 'hooft.esams.wikimedia.org:11651 lvs3001.esams.wmnet lvs3002.esams.wmnet', -- To view, visit https://gerrit.wikimedia.org/r/166746 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ieb17811184d814b55bf47d898acc6cd60eaf977a Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi fgiunch...@wikimedia.org Gerrit-Reviewer: Filippo Giunchedi fgiunch...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Upgrade to WikibaseDataModel 2.0 . - change (mediawiki...Wikibase)
JanZerebecki has uploaded a new change for review. https://gerrit.wikimedia.org/r/166747 Change subject: Upgrade to WikibaseDataModel 2.0 . .. Upgrade to WikibaseDataModel 2.0 . Change-Id: Ief7449f6c7fba0d62d9066a0875ab95a91ff7cc2 --- M composer.json 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/47/166747/1 diff --git a/composer.json b/composer.json index efec9e1..76f3ed2 100644 --- a/composer.json +++ b/composer.json @@ -35,10 +35,10 @@ data-values/javascript: ~0.6.0, data-values/value-view: ~0.7.0, - wikibase/data-model: ~1.0, + wikibase/data-model: ~2.0, wikibase/data-model-javascript: ~0.3.0, - wikibase/data-model-serialization: ~1.1, - wikibase/internal-serialization: ~1.2, + wikibase/data-model-serialization: ~1.2, + wikibase/internal-serialization: ~1.3, wikibase/serialization-javascript: ~1.1.1, diff/diff: ~1.0, -- To view, visit https://gerrit.wikimedia.org/r/166747 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ief7449f6c7fba0d62d9066a0875ab95a91ff7cc2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: JanZerebecki jan.wikime...@zerebecki.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add TimeFormatterParserRoundtripTest - change (mediawiki...Wikibase)
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/166748 Change subject: Add TimeFormatterParserRoundtripTest .. Add TimeFormatterParserRoundtripTest Wanted to add this for a long time now. Starting with some basic tests. Probably more to come. Change-Id: Ic5db99c7863ed66a0540abd6e8a9fbce061939bd --- A lib/tests/phpunit/TimeFormatterParserRoundtripTest.php 1 file changed, 106 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/48/166748/1 diff --git a/lib/tests/phpunit/TimeFormatterParserRoundtripTest.php b/lib/tests/phpunit/TimeFormatterParserRoundtripTest.php new file mode 100644 index 000..cf72e10 --- /dev/null +++ b/lib/tests/phpunit/TimeFormatterParserRoundtripTest.php @@ -0,0 +1,106 @@ +?php + +namespace Wikibase\Lib\Test; + +use DataValues\TimeValue; +use ValueFormatters\FormatterOptions; +use ValueFormatters\TimeFormatter; +use ValueParsers\ParserOptions; +use Wikibase\Lib\MwTimeIsoFormatter; +use Wikibase\Lib\Parsers\TimeParser; + +/** + * @group WikibaseLib + * @group Wikibase + * + * @licence GNU GPL v2+ + * @author Thiemo Mättig + */ +class TimeFormatterParserRoundtripTest extends \MediaWikiTestCase { + + public function isoTimestampProvider() { + return array( + // Going up the precision chain + array( '+001987654321-12-31T00:00:00Z', TimeValue::PRECISION_DAY ), + array( '+001987654321-12-00T00:00:00Z', TimeValue::PRECISION_MONTH ), + array( '+001987654321-00-00T00:00:00Z', TimeValue::PRECISION_YEAR ), + array( '+001987654320-00-00T00:00:00Z', TimeValue::PRECISION_10a ), + array( '+001987654300-00-00T00:00:00Z', TimeValue::PRECISION_100a ), + array( '+001987654000-00-00T00:00:00Z', TimeValue::PRECISION_ka ), + array( '+00198765-00-00T00:00:00Z', TimeValue::PRECISION_10ka ), + array( '+00198760-00-00T00:00:00Z', TimeValue::PRECISION_100ka ), + array( '+00198700-00-00T00:00:00Z', TimeValue::PRECISION_Ma ), + array( '+00198000-00-00T00:00:00Z', TimeValue::PRECISION_10Ma ), + array( '+0019-00-00T00:00:00Z', TimeValue::PRECISION_100Ma ), + array( '+0010-00-00T00:00:00Z', TimeValue::PRECISION_Ga ), + ); + } + + public function timeValueProvider() { + $cases = array(); + + foreach ( $this-isoTimestampProvider() as $case ) { + $cases[] = array( + new TimeValue( $case[0], 0, 0, 0, $case[1], TimeFormatter::CALENDAR_GREGORIAN ) + ); + } + + return $cases; + } + + /** +* @dataProvider timeValueProvider +* @param TimeValue $expected +*/ + public function testFormatterParserRoundtrip( TimeValue $expected ) { + $formatter = new MwTimeIsoFormatter( new FormatterOptions() ); + $parser = new TimeParser(); + + $formatted = $formatter-format( $expected ); + /** @var TimeValue $timeValue */ + $timeValue = $parser-parse( $formatted ); + + // Yes, this is a duplicate test for the sake of readability if it fails + $this-assertSame( $expected-getTime(), $timeValue-getTime() ); + $this-assertTrue( $expected-equals( $timeValue ) ); + } + + public function formattedTimeProvider() { + return array( + // Basic day, month and year formats that currently do not have a message + array( '31 January 1987654321' ), + array( 'January 1987654321' ), + array( '1987654321' ), + + // All the message based formats + array( '1 billion years CE' ), //wikibase-time-precision-Gannum + array( '1 million years CE' ), //wikibase-time-precision-Mannum + array( '1 years CE' ), //wikibase-time-precision-annum + array( '1. millennium' ), //wikibase-time-precision-millennium + array( '1. century' ), //wikibase-time-precision-century + array( '10s' ), //wikibase-time-precision-10annum + array( '1 billion years BCE' ), //wikibase-time-precision-BCE-Gannum + array( '1 million years BCE' ), //wikibase-time-precision-BCE-Mannum + array( '1 years BCE' ), //wikibase-time-precision-BCE-annum + array( '1.
[MediaWiki-commits] [Gerrit] [WIP] Notifications - change (mediawiki...Teahouse)
Robert Vogel has uploaded a new change for review. https://gerrit.wikimedia.org/r/166749 Change subject: [WIP] Notifications .. [WIP] Notifications Change-Id: I525195eac98ff7addd6f47546f40d50daf51d707 --- M resources/mediawiki.teahouse.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Teahouse refs/changes/49/166749/1 diff --git a/resources/mediawiki.teahouse.js b/resources/mediawiki.teahouse.js index 22d8097..739c666 100644 --- a/resources/mediawiki.teahouse.js +++ b/resources/mediawiki.teahouse.js @@ -85,7 +85,7 @@ mw.messages.set( _config.i18n ); _config = $.extend( _config, config ); mw.messages.set( _config.i18n ); - mw.loader.using( 'mediawiki.user', _init ); + mw.loader.using( ['mediawiki.user', 'mediawiki.cookie'], _init ); }, getConfig: function() { -- To view, visit https://gerrit.wikimedia.org/r/166749 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I525195eac98ff7addd6f47546f40d50daf51d707 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Teahouse Gerrit-Branch: master Gerrit-Owner: Robert Vogel vo...@hallowelt.biz ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Avoid running of hooks when running MWTimestampTest - change (mediawiki/core)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/166751 Change subject: Avoid running of hooks when running MWTimestampTest .. Avoid running of hooks when running MWTimestampTest Bug: 55886 Change-Id: I91e1dfeb1cddb158318ac178264e5acaf0a16215 --- M tests/phpunit/includes/MWTimestampTest.php 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/51/166751/1 diff --git a/tests/phpunit/includes/MWTimestampTest.php b/tests/phpunit/includes/MWTimestampTest.php index dcb9856..05c1a66 100644 --- a/tests/phpunit/includes/MWTimestampTest.php +++ b/tests/phpunit/includes/MWTimestampTest.php @@ -8,6 +8,9 @@ protected function setUp() { parent::setUp(); + // Avoid 'GetHumanTimestamp' hook and others + $this-setMwGlobals( 'wgHooks', array() ); + RequestContext::getMain()-setLanguage( Language::factory( 'en' ) ); } -- To view, visit https://gerrit.wikimedia.org/r/166751 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I91e1dfeb1cddb158318ac178264e5acaf0a16215 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender umherirrender_de...@web.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Beta: Define cxserver port - change (operations/puppet)
Alexandros Kosiaris has submitted this change and it was merged. Change subject: Beta: Define cxserver port .. Beta: Define cxserver port Change-Id: Icc9b2555f749f48139340d6ce0508b9e1eb22c12 --- M manifests/role/cxserver.pp 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Hashar: Looks good to me, but someone else must approve Alexandros Kosiaris: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/cxserver.pp b/manifests/role/cxserver.pp index 88fd5be..2771c1d 100644 --- a/manifests/role/cxserver.pp +++ b/manifests/role/cxserver.pp @@ -47,6 +47,9 @@ mode = '0755', } +# Define cxserver port +$cxserver_port = '8080' + # We have to explicitly open the cxserver port (bug 45868) ferm::service { 'cxserver_http': proto = 'tcp', -- To view, visit https://gerrit.wikimedia.org/r/166542 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icc9b2555f749f48139340d6ce0508b9e1eb22c12 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: KartikMistry kartik.mis...@gmail.com Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added initial Debian packaging - change (operations...apertium-en-es)
Alexandros Kosiaris has submitted this change and it was merged. Change subject: Added initial Debian packaging .. Added initial Debian packaging Change-Id: Ifc99fa9050701e21c72541bac4a0a1a5c2d8509b --- A debian/changelog A debian/compat A debian/control A debian/copyright A debian/docs A debian/rules A debian/source/format A debian/watch 8 files changed, 115 insertions(+), 0 deletions(-) Approvals: Alexandros Kosiaris: Verified; Looks good to me, approved diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 000..37947f0 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,30 @@ +apertium-en-es (0.8.0+svn~57502-1) trusty; urgency=low + + [ Tino Didriksen ] + * New upstream release based on SVN snapshot. + + [ Kartik Mistry ] + * debian/control: ++ Added myself to uploaders. ++ Updated Standards-Version to 3.9.6 + * Added debian/watch file. + + -- Kartik Mistry kar...@debian.org Wed, 08 Oct 2014 10:00:15 +0530 + +apertium-en-es (0.6.0-1.1) unstable; urgency=low + + * Non-maintainer upload. + * Rebuild against apertium 3.1 fix build-depends and configure.ac +accordingly. Rebuild ./configure to avoid relying on autoconf at +build-time. Fix FTBFS. Thanks to Thomas Viehmann for the patch. +(Closes: #527792) + * debian/rules: clean up more properly upon clean + + -- Stefano Zacchiroli z...@debian.org Tue, 08 Sep 2009 21:44:37 +0200 + +apertium-en-es (0.6.0-1) unstable; urgency=low + + * Initial release (Closes: #471720) + + -- Francis Tyers fty...@prompsit.com Wed, 19 Mar 2008 19:53:51 + + diff --git a/debian/compat b/debian/compat new file mode 100644 index 000..ec63514 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 000..d437f9a --- /dev/null +++ b/debian/control @@ -0,0 +1,27 @@ +Source: apertium-en-es +Section: science +Priority: optional +Maintainer: Debian Science Team debian-science-maintain...@lists.alioth.debian.org +Uploaders: Tino Didriksen m...@tinodidriksen.com, + Kartik Mistry kar...@debian.org +Build-Depends: apertium (= 3.3), + autotools-dev, + debhelper (= 9.0), + dh-autoreconf, + gawk, + libapertium3-3.3-dev, + locales, + pkg-config (= 0.21) +Standards-Version: 3.9.6 +Homepage: http://apertium.org/ +Vcs-Git: git://anonscm.debian.org/debian-science/packages/apertium-en-es.git +Vcs-Browser: https://anonscm.debian.org/cgit/debian-science/packages/apertium-en-es.git + +Package: apertium-en-es +Architecture: all +Depends: apertium (= 3.3), ${misc:Depends}, ${shlibs:Depends} +Provides: apertium-es-en +Conflicts: apertium-es-en +Description: Apertium translation data for the English-Spanish pair + Data package providing Apertium language resources for translating + between the English and Spanish languages. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 000..8f6f23c --- /dev/null +++ b/debian/copyright @@ -0,0 +1,22 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Source: http://apertium.org/ + +Files: * +Copyright: 2014, Apertium Project Management Committee apertium-...@dlsi.ua.es + See AUTHORS for more copyrights. +License: GPL-3+ + 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 3 of the License, or + (at your option) any later version. + . + This package 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, see http://www.gnu.org/licenses/. + . + On Debian systems, the complete text of the GNU General + Public License version 3 can be found in /usr/share/common-licenses/GPL-3. diff --git a/debian/docs b/debian/docs new file mode 100644 index 000..6f83607 --- /dev/null +++ b/debian/docs @@ -0,0 +1,3 @@ +AUTHORS +NEWS +README diff --git a/debian/rules b/debian/rules new file mode 100755 index 000..11004df --- /dev/null +++ b/debian/rules @@ -0,0 +1,27 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. +# +# Modified to make a template file for a multi-binary package with separated +# build-arch and build-indep targets by Bill Allombert 2001 + +# Uncomment this to turn on
[MediaWiki-commits] [Gerrit] Bug: Cant update old revision rows - change (mediawiki...Flow)
Matthias Mullie has submitted this change and it was merged. Change subject: Bug: Cant update old revision rows .. Bug: Cant update old revision rows The storage class was performing its update query with the alphadecimal id, and as such was only updating the cache and not the actual database. We likely didn't notice this because nothing currently updates historical revisions, but i'm working on a followup patch that adds a database row and needs this update method to work. This patch adds a test case to assert update uses the binary primary key and fixes the broken line of code. Change-Id: I103b9907bbc40e01eb2aabf638bc91567d0dc34a --- M includes/Data/Storage/RevisionStorage.php A tests/phpunit/Data/Storage/RevisionStorageTest.php 2 files changed, 54 insertions(+), 1 deletion(-) Approvals: Matthias Mullie: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Data/Storage/RevisionStorage.php b/includes/Data/Storage/RevisionStorage.php index 404936d..7d5a142 100644 --- a/includes/Data/Storage/RevisionStorage.php +++ b/includes/Data/Storage/RevisionStorage.php @@ -452,7 +452,7 @@ $res = $dbw-update( 'flow_revision', $this-preprocessSqlArray( $rev ), - array( 'rev_id' = $old['rev_id'] ), + $this-preprocessSqlArray( array( 'rev_id' = $old['rev_id'] ) ), __METHOD__ ); if ( !( $res $dbw-affectedRows() ) ) { diff --git a/tests/phpunit/Data/Storage/RevisionStorageTest.php b/tests/phpunit/Data/Storage/RevisionStorageTest.php new file mode 100644 index 000..effae6c --- /dev/null +++ b/tests/phpunit/Data/Storage/RevisionStorageTest.php @@ -0,0 +1,53 @@ +?php + +namespace Flow\Tests\Data\Storage; + +use Flow\Data\Storage\HeaderRevisionStorage; +use Flow\Model\UUID; + +class RevisionStorageTest extends \MediaWikiTestCase { + + public function testUpdateConvertsPrimaryKeyToBinary() { + $dbw = $this-getMockBuilder( 'DatabaseMysql' ) + -disableOriginalConstructor() + -getMock(); + $factory = $this-getMockBuilder( 'Flow\DbFactory' ) + -disableOriginalConstructor() + -getMock(); + $factory-expects( $this-any() ) + -method( 'getDB' ) + -will( $this-returnValue( $dbw ) ); + + $id = UUID::create(); + $dbw-expects( $this-once() ) + -method( 'update' ) + -with( + $this-equalTo( 'flow_revision' ), + $this-equalTo( array( + 'rev_mod_user_id' = 42, + ) ), + $this-equalTo( array( + 'rev_id' = $id-getBinary(), + ) ) + ) + -will( $this-returnValue( true ) ); + $dbw-expects( $this-any() ) + -method( 'affectedRows' ) + -will( $this-returnValue( 1 ) ); + + // Header is bare bones implementation, sufficient for testing + // the parent class. + $storage = new HeaderRevisionStorage( $factory, /* $externalStore = */false ); + $storage-update( + array( + 'rev_id' = $id-getAlphadecimal(), + 'rev_mod_user_id' = 0, + ), + array( + 'rev_id' = $id-getAlphadecimal(), + 'rev_mod_user_id' = 42, + ) + ); + + } +} -- To view, visit https://gerrit.wikimedia.org/r/165681 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I103b9907bbc40e01eb2aabf638bc91567d0dc34a Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: EBernhardson ebernhard...@wikimedia.org Gerrit-Reviewer: Matthias Mullie mmul...@wikimedia.org Gerrit-Reviewer: SG shah...@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] Refactor hook handling in ResourceLoaderTest - change (mediawiki/core)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/166752 Change subject: Refactor hook handling in ResourceLoaderTest .. Refactor hook handling in ResourceLoaderTest No need to set a global $wgHooks, just set it for the current test. Change-Id: Ic3e82608efa617a5a7f7c31365d748222bc6d6da --- M tests/phpunit/includes/resourceloader/ResourceLoaderTest.php 1 file changed, 11 insertions(+), 19 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/52/166752/1 diff --git a/tests/phpunit/includes/resourceloader/ResourceLoaderTest.php b/tests/phpunit/includes/resourceloader/ResourceLoaderTest.php index 7664d5b..78bfdf3 100644 --- a/tests/phpunit/includes/resourceloader/ResourceLoaderTest.php +++ b/tests/phpunit/includes/resourceloader/ResourceLoaderTest.php @@ -2,8 +2,6 @@ class ResourceLoaderTest extends ResourceLoaderTestCase { - protected static $resourceLoaderRegisterModulesHook; - protected function setUp() { parent::setUp(); @@ -30,17 +28,6 @@ ) ); } - /* Hook Methods */ - - /** -* ResourceLoaderRegisterModules hook -*/ - public static function resourceLoaderRegisterModules( $resourceLoader ) { - self::$resourceLoaderRegisterModulesHook = true; - - return true; - } - /* Provider Methods */ public static function provideValidModules() { return array( @@ -56,9 +43,18 @@ * @covers ResourceLoader::__construct */ public function testCreatingNewResourceLoaderCallsRegistrationHook() { - self::$resourceLoaderRegisterModulesHook = false; + $resourceLoaderRegisterModulesHook = false; + + $this-setMwGlobals( 'wgHooks', array( + 'ResourceLoaderRegisterModules' = array( + function ( $resourceLoader ) use ( $resourceLoaderRegisterModulesHook ) { + $resourceLoaderRegisterModulesHook = true; + } + ) + ) ); + $resourceLoader = new ResourceLoader(); - $this-assertTrue( self::$resourceLoaderRegisterModulesHook ); + $this-assertTrue( $resourceLoaderRegisterModulesHook, 'Hook ResourceLoaderRegisterModules called' ); return $resourceLoader; } @@ -242,7 +238,3 @@ } } } - -/* Hooks */ -global $wgHooks; -$wgHooks['ResourceLoaderRegisterModules'][] = 'ResourceLoaderTest::resourceLoaderRegisterModules'; -- To view, visit https://gerrit.wikimedia.org/r/166752 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic3e82608efa617a5a7f7c31365d748222bc6d6da Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender umherirrender_de...@web.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update OOjs UI to v0.1.0-pre (d74a46ca6a) and VisualEditor-M... - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Update OOjs UI to v0.1.0-pre (d74a46ca6a) and VisualEditor-MediaWiki to Ie06056b .. Update OOjs UI to v0.1.0-pre (d74a46ca6a) and VisualEditor-MediaWiki to Ie06056b Change-Id: I3f325f3c514d334179de46d0ea092b48f13b9dfd --- M extensions/VisualEditor M resources/lib/oojs-ui/oojs-ui-apex.css M resources/lib/oojs-ui/oojs-ui-apex.js M resources/lib/oojs-ui/oojs-ui-apex.svg.css M resources/lib/oojs-ui/oojs-ui-mediawiki.css M resources/lib/oojs-ui/oojs-ui-mediawiki.js M resources/lib/oojs-ui/oojs-ui-mediawiki.svg.css M resources/lib/oojs-ui/oojs-ui-minerva.css M resources/lib/oojs-ui/oojs-ui-minerva.js M resources/lib/oojs-ui/oojs-ui-minerva.svg.css M resources/lib/oojs-ui/oojs-ui.js 11 files changed, 41 insertions(+), 33 deletions(-) Approvals: MarkTraceur: Looks good to me, approved jenkins-bot: Verified diff --git a/extensions/VisualEditor b/extensions/VisualEditor index dd6329d..3d2d9ba 16 --- a/extensions/VisualEditor +++ b/extensions/VisualEditor -Subproject commit dd6329d3ebc5ce5f6cc41e446c76cb18eb41d243 +Subproject commit 3d2d9ba4adb753b07a7b5efebcc74c55b9b089c5 diff --git a/resources/lib/oojs-ui/oojs-ui-apex.css b/resources/lib/oojs-ui/oojs-ui-apex.css index a8f1e8e..42e6699 100644 --- a/resources/lib/oojs-ui/oojs-ui-apex.css +++ b/resources/lib/oojs-ui/oojs-ui-apex.css @@ -1,12 +1,12 @@ /*! - * OOjs UI v0.1.0-pre (837b2f733e) + * OOjs UI v0.1.0-pre (d74a46ca6a) * https://www.mediawiki.org/wiki/OOjs_UI * * Copyright 2011–2014 OOjs Team and other contributors. * Released under the MIT license * http://oojs.mit-license.org * - * Date: 2014-10-11T01:05:40Z + * Date: 2014-10-15T00:40:28Z */ /* @noflip */ .oo-ui-rtl { @@ -1599,7 +1599,8 @@ padding: 0; background: none; } -.oo-ui-window-overlay { +.oo-ui-window-overlay, +.oo-ui-window-inner-overlay { position: absolute; top: 0; left: 0; @@ -1635,7 +1636,7 @@ z-index: 1; bottom: 0; } -.oo-ui-dialog-content .oo-ui-window-overlay { +.oo-ui-dialog-content .oo-ui-window-inner-overlay { z-index: 3; } .oo-ui-dialog-content .oo-ui-window-body { diff --git a/resources/lib/oojs-ui/oojs-ui-apex.js b/resources/lib/oojs-ui/oojs-ui-apex.js index 3835239..ba1ef86 100644 --- a/resources/lib/oojs-ui/oojs-ui-apex.js +++ b/resources/lib/oojs-ui/oojs-ui-apex.js @@ -1,12 +1,12 @@ /*! - * OOjs UI v0.1.0-pre (837b2f733e) + * OOjs UI v0.1.0-pre (d74a46ca6a) * https://www.mediawiki.org/wiki/OOjs_UI * * Copyright 2011–2014 OOjs Team and other contributors. * Released under the MIT license * http://oojs.mit-license.org * - * Date: 2014-10-11T01:05:29Z + * Date: 2014-10-15T00:40:17Z */ /* Instantiation */ diff --git a/resources/lib/oojs-ui/oojs-ui-apex.svg.css b/resources/lib/oojs-ui/oojs-ui-apex.svg.css index 8a70e54..06880ff 100644 --- a/resources/lib/oojs-ui/oojs-ui-apex.svg.css +++ b/resources/lib/oojs-ui/oojs-ui-apex.svg.css @@ -1,12 +1,12 @@ /*! - * OOjs UI v0.1.0-pre (837b2f733e) + * OOjs UI v0.1.0-pre (d74a46ca6a) * https://www.mediawiki.org/wiki/OOjs_UI * * Copyright 2011–2014 OOjs Team and other contributors. * Released under the MIT license * http://oojs.mit-license.org * - * Date: 2014-10-11T01:05:40Z + * Date: 2014-10-15T00:40:28Z */ /* @noflip */ .oo-ui-rtl { @@ -1599,7 +1599,8 @@ padding: 0; background: none; } -.oo-ui-window-overlay { +.oo-ui-window-overlay, +.oo-ui-window-inner-overlay { position: absolute; top: 0; left: 0; @@ -1635,7 +1636,7 @@ z-index: 1; bottom: 0; } -.oo-ui-dialog-content .oo-ui-window-overlay { +.oo-ui-dialog-content .oo-ui-window-inner-overlay { z-index: 3; } .oo-ui-dialog-content .oo-ui-window-body { diff --git a/resources/lib/oojs-ui/oojs-ui-mediawiki.css b/resources/lib/oojs-ui/oojs-ui-mediawiki.css index f18c048..7fbd762 100644 --- a/resources/lib/oojs-ui/oojs-ui-mediawiki.css +++ b/resources/lib/oojs-ui/oojs-ui-mediawiki.css @@ -1,12 +1,12 @@ /*! - * OOjs UI v0.1.0-pre (837b2f733e) + * OOjs UI v0.1.0-pre (d74a46ca6a) * https://www.mediawiki.org/wiki/OOjs_UI * * Copyright 2011–2014 OOjs Team and other contributors. * Released under the MIT license * http://oojs.mit-license.org * - * Date: 2014-10-11T01:05:40Z + * Date: 2014-10-15T00:40:28Z */ /* @noflip */ .oo-ui-rtl { @@ -1421,7 +1421,8 @@ padding: 0; background: none; } -.oo-ui-window-overlay { +.oo-ui-window-overlay, +.oo-ui-window-inner-overlay { position: absolute; top: 0; left: 0; @@ -1456,7 +1457,7 @@ z-index: 1; bottom: 0; } -.oo-ui-dialog-content .oo-ui-window-overlay { +.oo-ui-dialog-content .oo-ui-window-inner-overlay { z-index: 3; } .oo-ui-dialog-content .oo-ui-window-body { diff --git a/resources/lib/oojs-ui/oojs-ui-mediawiki.js
[MediaWiki-commits] [Gerrit] Make list=novainstance available to anons - change (mediawiki...OpenStackManager)
jenkins-bot has submitted this change and it was merged. Change subject: Make list=novainstance available to anons .. Make list=novainstance available to anons Right now, none of this information is available to you unless: - You are logged in - You are a member of the project I talked to Andrew and Coren, and we're all ok with making this info publicly available - nothing private here, and all of it is exposed via SMW anyway. Change-Id: Ia9ed925c1e75fce29baf9a1b81cf2a23b0eb6e0f --- M api/ApiListNovaInstances.php 1 file changed, 10 insertions(+), 11 deletions(-) Approvals: MarkTraceur: Looks good to me, approved jenkins-bot: Verified diff --git a/api/ApiListNovaInstances.php b/api/ApiListNovaInstances.php index be90e63..b369339 100644 --- a/api/ApiListNovaInstances.php +++ b/api/ApiListNovaInstances.php @@ -15,6 +15,9 @@ } public function run() { + global $wgOpenStackManagerLDAPUsername; + global $wgOpenStackManagerLDAPUserPassword; + $params = $this-extractRequestParams(); $project = OpenStackNovaProject::getProjectByName( $params['project'] ); if ( !$project ) { @@ -22,18 +25,14 @@ $this-dieUsage( 'Invalid project specified.', 'badproject' ); } - if ( !$this-getUser()-isLoggedIn() ) { - $this-dieUsage( 'Must be logged in to use this API', 'notloggedin' ); - } + $user = new OpenStackNovaUser( $wgOpenStackManagerLDAPUsername ); + $userNova = OpenStackNovaController::newFromUser( $user ); + $userNova-authenticate( $wgOpenStackManagerLDAPUsername, $wgOpenStackManagerLDAPUserPassword ); - $user = new OpenStackNovaUser(); - if ( !$user-exists() ) { - $this-dieUsage( 'NovaUser does not exist', 'baduser' ); - } - $controller = OpenStackNovaController::newFromUser( $user ); - $controller-setProject( $project-getName() ); - $controller-setRegion( $params['region'] ); // validated by API - $instances = $controller-getInstances(); + $userNova-setProject( $project-getName() ); + $userNova-setRegion( $params['region'] ); // validated by API + + $instances = $userNova-getInstances(); foreach ( $instances as $instance ) { $info = array( 'name' = $instance-getInstanceName(), -- To view, visit https://gerrit.wikimedia.org/r/166732 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia9ed925c1e75fce29baf9a1b81cf2a23b0eb6e0f Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/OpenStackManager Gerrit-Branch: wmf/1.25wmf2 Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: MarkTraceur mtrac...@member.fsf.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] Cache instance lists for 1 minute when called via API - change (mediawiki...OpenStackManager)
jenkins-bot has submitted this change and it was merged. Change subject: Cache instance lists for 1 minute when called via API .. Cache instance lists for 1 minute when called via API - No invalidation, but that's ok. Invalidation is hard because not all operations have to go through wikitech. - This is primarily an anti DDoS measure. Change-Id: I1b56ba9688315b5b4ca17ad527db5e8f5e9c2393 --- M api/ApiListNovaInstances.php 1 file changed, 27 insertions(+), 16 deletions(-) Approvals: MarkTraceur: Looks good to me, approved jenkins-bot: Verified diff --git a/api/ApiListNovaInstances.php b/api/ApiListNovaInstances.php index b369339..5350a20 100644 --- a/api/ApiListNovaInstances.php +++ b/api/ApiListNovaInstances.php @@ -17,6 +17,7 @@ public function run() { global $wgOpenStackManagerLDAPUsername; global $wgOpenStackManagerLDAPUserPassword; + global $wgMemc; $params = $this-extractRequestParams(); $project = OpenStackNovaProject::getProjectByName( $params['project'] ); @@ -25,25 +26,35 @@ $this-dieUsage( 'Invalid project specified.', 'badproject' ); } - $user = new OpenStackNovaUser( $wgOpenStackManagerLDAPUsername ); - $userNova = OpenStackNovaController::newFromUser( $user ); - $userNova-authenticate( $wgOpenStackManagerLDAPUsername, $wgOpenStackManagerLDAPUserPassword ); + $key = wfMemcKey( 'openstackmanager', 'apilistnovainstances', $params['region'], $params['project'] ); + $instancesInfo = $wgMemc-get( $key ); + if ( $instancesInfo === false ) { + $user = new OpenStackNovaUser( $wgOpenStackManagerLDAPUsername ); + $userNova = OpenStackNovaController::newFromUser( $user ); + $userNova-authenticate( $wgOpenStackManagerLDAPUsername, $wgOpenStackManagerLDAPUserPassword ); - $userNova-setProject( $project-getName() ); - $userNova-setRegion( $params['region'] ); // validated by API + $userNova-setProject( $project-getName() ); + $userNova-setRegion( $params['region'] ); // validated by API - $instances = $userNova-getInstances(); - foreach ( $instances as $instance ) { - $info = array( - 'name' = $instance-getInstanceName(), - 'state' = $instance-getInstanceState(), - 'ip' = $instance-getInstancePrivateIPs(), - 'id' = $instance-getInstanceId(), - 'floatingip' = $instance-getInstancePublicIPs(), - 'securitygroups' = $instance-getSecurityGroups(), - 'imageid' = $instance-getImageId(), - ); + $instances = $userNova-getInstances(); + $instancesInfo = array(); + foreach ( $instances as $instance ) { + $instancesInfo[ ] = array( + 'name' = $instance-getInstanceName(), + 'state' = $instance-getInstanceState(), + 'ip' = $instance-getInstancePrivateIPs(), + 'id' = $instance-getInstanceId(), + 'floatingip' = $instance-getInstancePublicIPs(), + 'securitygroups' = $instance-getSecurityGroups(), + 'imageid' = $instance-getImageId(), + ); + } + } + // Cache info for 1 minute, not caching for longer since we do not invalidate + $wgMemc-set( $key, $instancesInfo, 1 * 60 ); + + foreach ( $instancesInfo as $info ) { // UGH I hate XML $this-getResult()-setIndexedTagName( $info['securitygroups'], 'group' ); $this-getResult()-setIndexedTagName( $info['ip'], 'ip' ); -- To view, visit https://gerrit.wikimedia.org/r/166740 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1b56ba9688315b5b4ca17ad527db5e8f5e9c2393 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OpenStackManager Gerrit-Branch: wmf/1.25wmf2 Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: MarkTraceur mtrac...@member.fsf.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] Turn other Activities into Fragments - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: Turn other Activities into Fragments .. Turn other Activities into Fragments - Things launched from the Nav menu are now Fragments that replace each other in the PageActivity container, and create a backstack in the FragmentManager. - Made full-text search into a Fragment - Made the PageActivity have a real ActionBar (to be built out in the next patch), into which the actions of the fragments are added. - Made sure that savedInstanceState preserves the order of the fragment backstack. - Login activity to be dealt with in another patch... Change-Id: If9c2c11014745e75f3dbde86a724d555470c8f61 --- M wikipedia/AndroidManifest.xml R wikipedia/res/layout/fragment_history.xml R wikipedia/res/layout/fragment_nearby.xml R wikipedia/res/layout/fragment_saved_pages.xml R wikipedia/res/layout/fragment_search_results.xml M wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java R wikipedia/src/main/java/org/wikipedia/history/HistoryFragment.java R wikipedia/src/main/java/org/wikipedia/nearby/NearbyFragment.java M wikipedia/src/main/java/org/wikipedia/page/PageActivity.java M wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java R wikipedia/src/main/java/org/wikipedia/savedpages/SavedPagesFragment.java R wikipedia/src/main/java/org/wikipedia/search/FullSearchFragment.java M wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java 13 files changed, 284 insertions(+), 249 deletions(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified diff --git a/wikipedia/AndroidManifest.xml b/wikipedia/AndroidManifest.xml index 94b7da9..488eb9f 100644 --- a/wikipedia/AndroidManifest.xml +++ b/wikipedia/AndroidManifest.xml @@ -43,7 +43,6 @@ !-- Don't delete the meta-data field above -- activity android:name=.page.PageActivity - android:theme=@style/NoTitle android:windowSoftInputMode=stateHidden android:configChanges=orientation|keyboardHidden|keyboard|screenSize @@ -59,29 +58,6 @@ data android:host=*.wikipedia.org android:pathPrefix=/wiki/ android:scheme=http / data android:host=*.wikipedia.org android:pathPrefix=/wiki/ android:scheme=https / /intent-filter -/activity -activity -android:name=.history.HistoryActivity -android:label=@string/history_activity_title - android:configChanges=orientation|keyboardHidden|keyboard|screenSize -android:windowSoftInputMode=stateHidden|adjustResize - -/activity - -activity -android:name=.savedpages.SavedPagesActivity -android:label=@string/saved_pages_activity_title - android:configChanges=orientation|keyboardHidden|keyboard|screenSize -android:windowSoftInputMode=stateHidden|adjustResize - -/activity - -activity -android:name=.nearby.NearbyActivity -android:label=@string/nearby_activity_title - android:configChanges=orientation|keyboardHidden|keyboard|screenSize -android:windowSoftInputMode=stateHidden|adjustResize - /activity activity android:name=org.acra.CrashReportDialog diff --git a/wikipedia/res/layout/activity_history.xml b/wikipedia/res/layout/fragment_history.xml similarity index 100% rename from wikipedia/res/layout/activity_history.xml rename to wikipedia/res/layout/fragment_history.xml diff --git a/wikipedia/res/layout/activity_nearby.xml b/wikipedia/res/layout/fragment_nearby.xml similarity index 100% rename from wikipedia/res/layout/activity_nearby.xml rename to wikipedia/res/layout/fragment_nearby.xml diff --git a/wikipedia/res/layout/activity_saved_pages.xml b/wikipedia/res/layout/fragment_saved_pages.xml similarity index 100% rename from wikipedia/res/layout/activity_saved_pages.xml rename to wikipedia/res/layout/fragment_saved_pages.xml diff --git a/wikipedia/res/layout/dialog_search_results.xml b/wikipedia/res/layout/fragment_search_results.xml similarity index 100% rename from wikipedia/res/layout/dialog_search_results.xml rename to wikipedia/res/layout/fragment_search_results.xml diff --git a/wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java b/wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java index b133898..e6dda14 100644 --- a/wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java +++ b/wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java @@ -13,13 +13,13 @@ import android.widget.TextView; import android.widget.Toast; import org.wikipedia.analytics.LoginFunnel; -import org.wikipedia.nearby.NearbyActivity; -import org.wikipedia.savedpages.SavedPagesActivity; +import
[MediaWiki-commits] [Gerrit] Polyfill Set for PhantomJS (for debug only) - change (VisualEditor/VisualEditor)
Divec has uploaded a new change for review. https://gerrit.wikimedia.org/r/166753 Change subject: Polyfill Set for PhantomJS (for debug only) .. Polyfill Set for PhantomJS (for debug only) A slow (O(n^2)) half-implementation that does enough for Filibuster's needs. Change-Id: I832e4abaf37c44867dce627fb5a57965d35e612d --- M src/ve.Filibuster.js 1 file changed, 21 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/53/166753/1 diff --git a/src/ve.Filibuster.js b/src/ve.Filibuster.js index f2f3275..c7236b3 100644 --- a/src/ve.Filibuster.js +++ b/src/ve.Filibuster.js @@ -310,6 +310,27 @@ ); }; +if ( typeof Set === 'undefined' ) { + // No native 'Set'; implement the bits we need with a (slow) array-based algorithm + // This is needed by PhantomJS 1.9.x + /*jshint -W020 */ + Set = function () { + this.contents = []; + }; + Set.prototype.has = function ( x ) { + var i, len; + for ( i = 0, len = this.contents.length; i len; i++ ) { + if ( this.contents[ i ] === x ) { + return true; + } + return false; + } + }; + Set.prototype.add = function ( x ) { + this.contents.push( x ); + }; +} + /** * Get a plain-old-data deep clone of val. * -- To view, visit https://gerrit.wikimedia.org/r/166753 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I832e4abaf37c44867dce627fb5a57965d35e612d Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Divec da...@sheetmusic.org.uk ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Submodule bump for deployment, for two changes. - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Submodule bump for deployment, for two changes. .. Submodule bump for deployment, for two changes. Change are: Ia9ed925c1e75fce29baf9a1b81cf2a23b0eb6e0f I1b56ba9688315b5b4ca17ad527db5e8f5e9c2393 Change-Id: Iaf80da60b2aaa70782117aabf52b5638bdbe5051 --- M extensions/OpenStackManager 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: MarkTraceur: Looks good to me, approved jenkins-bot: Verified diff --git a/extensions/OpenStackManager b/extensions/OpenStackManager index cc46107..cc2bef9 16 --- a/extensions/OpenStackManager +++ b/extensions/OpenStackManager -Subproject commit cc461079671684d5438823ec6d0e04c6d8d61ce7 +Subproject commit cc2bef9130dc38ebab646b1d56e55dee37c6f1bb -- To view, visit https://gerrit.wikimedia.org/r/166744 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iaf80da60b2aaa70782117aabf52b5638bdbe5051 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.25wmf2 Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: MarkTraceur mtrac...@member.fsf.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] Adds list=novaprojects and list=novainstances API - change (mediawiki...OpenStackManager)
jenkins-bot has submitted this change and it was merged. Change subject: Adds list=novaprojects and list=novainstances API .. Adds list=novaprojects and list=novainstances API Squash of the following changes: I4667b02b2ab096677a3f04d131d5d4c24bb27dda I9dedd527bd7a4ca611fb1aa85bf73dd202a679f2 Ia9ed925c1e75fce29baf9a1b81cf2a23b0eb6e0f I1b56ba9688315b5b4ca17ad527db5e8f5e9c2393 Change-Id: I5cba45d61651c0bcfa6360a0110a87827cb31d98 --- M OpenStackManager.php A api/ApiListNovaInstances.php A api/ApiListNovaProjects.php M nova/OpenStackNovaController.php M nova/OpenStackNovaProject.php 5 files changed, 163 insertions(+), 2 deletions(-) Approvals: MarkTraceur: Looks good to me, approved jenkins-bot: Verified diff --git a/OpenStackManager.php b/OpenStackManager.php index 011a4c1..bf503df 100644 --- a/OpenStackManager.php +++ b/OpenStackManager.php @@ -195,6 +195,8 @@ $wgAutoloadClasses['ApiNovaProjects'] = $dir . 'api/ApiNovaProjects.php'; $wgAutoloadClasses['ApiNovaProjectLimits'] = $dir . 'api/ApiNovaProjectLimits.php'; $wgAutoloadClasses['ApiNovaServiceGroups'] = $dir . 'api/ApiNovaServiceGroups.php'; +$wgAutoloadClasses['ApiListNovaProjects'] = $dir . 'api/ApiListNovaProjects.php'; +$wgAutoloadClasses['ApiListNovaInstances'] = $dir . 'api/ApiListNovaInstances.php'; $wgAutoloadClasses['Spyc'] = $dir . 'Spyc.php'; $wgAutoloadClasses['OpenStackManagerNotificationFormatter'] = $dir . 'OpenStackManagerNotificationFormatter.php'; $wgAutoloadClasses['OpenStackManagerEvent'] = $dir . 'OpenStackManagerEvent.php'; @@ -300,6 +302,8 @@ $wgAPIModules['novaprojects'] = 'ApiNovaProjects'; $wgAPIModules['novaservicegroups'] = 'ApiNovaServiceGroups'; $wgAPIModules['novaprojectlimits'] = 'ApiNovaProjectLimits'; +$wgAPIListModules['novaprojects'] = 'ApiListNovaProjects'; +$wgAPIListModules['novainstances'] = 'ApiListNovaInstances'; # Schema changes $wgHooks['LoadExtensionSchemaUpdates'][] = 'efOpenStackSchemaUpdates'; diff --git a/api/ApiListNovaInstances.php b/api/ApiListNovaInstances.php new file mode 100644 index 000..5350a20 --- /dev/null +++ b/api/ApiListNovaInstances.php @@ -0,0 +1,99 @@ +?php + +class ApiListNovaInstances extends ApiQueryGeneratorBase { + + public function __construct( ApiQuery $query, $moduleName ) { + parent::__construct( $query, $moduleName, 'ni' ); + } + + public function execute() { + $this-run(); + } + + public function executeGenerator( $resultPageSet ) { + $this-run(); + } + + public function run() { + global $wgOpenStackManagerLDAPUsername; + global $wgOpenStackManagerLDAPUserPassword; + global $wgMemc; + + $params = $this-extractRequestParams(); + $project = OpenStackNovaProject::getProjectByName( $params['project'] ); + if ( !$project ) { + // This shouldn't be possible since the API should enforce valid names + $this-dieUsage( 'Invalid project specified.', 'badproject' ); + } + + $key = wfMemcKey( 'openstackmanager', 'apilistnovainstances', $params['region'], $params['project'] ); + $instancesInfo = $wgMemc-get( $key ); + if ( $instancesInfo === false ) { + $user = new OpenStackNovaUser( $wgOpenStackManagerLDAPUsername ); + $userNova = OpenStackNovaController::newFromUser( $user ); + $userNova-authenticate( $wgOpenStackManagerLDAPUsername, $wgOpenStackManagerLDAPUserPassword ); + + $userNova-setProject( $project-getName() ); + $userNova-setRegion( $params['region'] ); // validated by API + + $instances = $userNova-getInstances(); + $instancesInfo = array(); + foreach ( $instances as $instance ) { + $instancesInfo[ ] = array( + 'name' = $instance-getInstanceName(), + 'state' = $instance-getInstanceState(), + 'ip' = $instance-getInstancePrivateIPs(), + 'id' = $instance-getInstanceId(), + 'floatingip' = $instance-getInstancePublicIPs(), + 'securitygroups' = $instance-getSecurityGroups(), + 'imageid' = $instance-getImageId(), + ); + } + } + + // Cache info for 1 minute, not caching for longer since we do not invalidate + $wgMemc-set( $key, $instancesInfo, 1 * 60 ); + + foreach ( $instancesInfo as $info ) { + // UGH
[MediaWiki-commits] [Gerrit] Submodule bump for I5cba45d61651c0bcfa6360a0110a87827cb31d98 - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Submodule bump for I5cba45d61651c0bcfa6360a0110a87827cb31d98 .. Submodule bump for I5cba45d61651c0bcfa6360a0110a87827cb31d98 Change-Id: I3ef24b3308fa16ca672642b7ba807b084f6643ce --- M extensions/OpenStackManager 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: MarkTraceur: Looks good to me, approved jenkins-bot: Verified diff --git a/extensions/OpenStackManager b/extensions/OpenStackManager index 06fd367..245cf06 16 --- a/extensions/OpenStackManager +++ b/extensions/OpenStackManager -Subproject commit 06fd367451a227cbe82ea7de04174507c8901a62 +Subproject commit 245cf063606764f4c268671a77549e750209fb44 -- To view, visit https://gerrit.wikimedia.org/r/166743 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3ef24b3308fa16ca672642b7ba807b084f6643ce Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.25wmf3 Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: MarkTraceur mtrac...@member.fsf.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] Fix bypassing hooks in TextContentTest - change (mediawiki/core)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/166754 Change subject: Fix bypassing hooks in TextContentTest .. Fix bypassing hooks in TextContentTest Save the whole global $wgHooks with the default way instead of just a hook in a own variable. Change-Id: Ie796f7a53ee38e0dc07f5b026134bbdcb8c9fd53 --- M tests/phpunit/includes/content/TextContentTest.php 1 file changed, 1 insertion(+), 20 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/54/166754/1 diff --git a/tests/phpunit/includes/content/TextContentTest.php b/tests/phpunit/includes/content/TextContentTest.php index 2f81109..dd61f85 100644 --- a/tests/phpunit/includes/content/TextContentTest.php +++ b/tests/phpunit/includes/content/TextContentTest.php @@ -7,11 +7,8 @@ */ class TextContentTest extends MediaWikiLangTestCase { protected $context; - protected $savedContentGetParserOutput; protected function setUp() { - global $wgHooks; - parent::setUp(); // Anon user @@ -32,24 +29,8 @@ 'wgUseTidy' = false, 'wgAlwaysUseTidy' = false, 'wgCapitalLinks' = true, + 'wgHooks' = array(), // bypass hook ContentGetParserOutput that force custom rendering ) ); - - // bypass hooks that force custom rendering - if ( isset( $wgHooks['ContentGetParserOutput'] ) ) { - $this-savedContentGetParserOutput = $wgHooks['ContentGetParserOutput']; - unset( $wgHooks['ContentGetParserOutput'] ); - } - } - - public function teardown() { - global $wgHooks; - - // restore hooks that force custom rendering - if ( $this-savedContentGetParserOutput !== null ) { - $wgHooks['ContentGetParserOutput'] = $this-savedContentGetParserOutput; - } - - parent::teardown(); } public function newContent( $text ) { -- To view, visit https://gerrit.wikimedia.org/r/166754 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie796f7a53ee38e0dc07f5b026134bbdcb8c9fd53 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender umherirrender_de...@web.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Hygiene: Remove unreachable code - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Hygiene: Remove unreachable code .. Hygiene: Remove unreachable code re-submit Change-Id: Ic251b7529769b7cedaa8cda78f51099f2980fe97 --- M includes/Data/BagOStuff/BufferedBagOStuff.php 1 file changed, 0 insertions(+), 2 deletions(-) Approvals: Matthias Mullie: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Data/BagOStuff/BufferedBagOStuff.php b/includes/Data/BagOStuff/BufferedBagOStuff.php index 91d6fbb..a4ed59d 100644 --- a/includes/Data/BagOStuff/BufferedBagOStuff.php +++ b/includes/Data/BagOStuff/BufferedBagOStuff.php @@ -146,8 +146,6 @@ return array_filter( $values, function( $value ) { return $value !== false; } ); - - return $values; } /** -- To view, visit https://gerrit.wikimedia.org/r/165875 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic251b7529769b7cedaa8cda78f51099f2980fe97 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: EBernhardson ebernhard...@wikimedia.org Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Matthias Mullie mmul...@wikimedia.org Gerrit-Reviewer: SG shah...@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] Categories: Increase API limit on categories retrieved and a... - change (mediawiki...ContentTranslation)
Jsahleen has uploaded a new change for review. https://gerrit.wikimedia.org/r/166755 Change subject: Categories: Increase API limit on categories retrieved and adapted .. Categories: Increase API limit on categories retrieved and adapted * Explicitly sets the API result limit for category retrieval and adaptation to 100 in order to handle more categories (the default if no limit is specified is 10) Bug: 6 Change-Id: I86b5797f813df7fd6cc6688223cb98b7efd851b9 --- M modules/tools/ext.cx.tools.categories.js 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/55/166755/1 diff --git a/modules/tools/ext.cx.tools.categories.js b/modules/tools/ext.cx.tools.categories.js index 649940d..226a5cf 100644 --- a/modules/tools/ext.cx.tools.categories.js +++ b/modules/tools/ext.cx.tools.categories.js @@ -382,6 +382,7 @@ action: 'query', prop: 'categories', clshow: '!hidden', + cllimit: 100, indexpageids: true, titles: title, format: 'json' @@ -447,6 +448,7 @@ titles: categoryTitles.join( '|' ), prop: 'langlinks', lllang: language, + lllimit: 100, redirects: true, format: 'json' }, { -- To view, visit https://gerrit.wikimedia.org/r/166755 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I86b5797f813df7fd6cc6688223cb98b7efd851b9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Jsahleen jsahl...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use mergeMwGlobalArrayValue in LocalisationCacheTest - change (mediawiki/core)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/166756 Change subject: Use mergeMwGlobalArrayValue in LocalisationCacheTest .. Use mergeMwGlobalArrayValue in LocalisationCacheTest Change-Id: I8cfe494d159101306c699169dd224c3bea65c753 --- M tests/phpunit/includes/cache/LocalisationCacheTest.php 1 file changed, 15 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/56/166756/1 diff --git a/tests/phpunit/includes/cache/LocalisationCacheTest.php b/tests/phpunit/includes/cache/LocalisationCacheTest.php index fc06a50..35ff919 100644 --- a/tests/phpunit/includes/cache/LocalisationCacheTest.php +++ b/tests/phpunit/includes/cache/LocalisationCacheTest.php @@ -60,21 +60,23 @@ } public function testRecacheFallbacksWithHooks() { - global $wgHooks; - // Use hook to provide updates for messages. This is what the // LocalisationUpdate extension does. See bug 68781. - $wgHooks['LocalisationCacheRecacheFallback'][] = function ( - LocalisationCache $lc, - $code, - array $cache - ) { - if ( $code === 'ru' ) { - $cache['messages']['present-uk'] = 'ru-override'; - $cache['messages']['present-ru'] = 'ru-override'; - $cache['messages']['present-en'] = 'ru-override'; - } - }; + $this-mergeMwGlobalArrayValue( 'wgHooks', array( + 'LocalisationCacheRecacheFallback' = array( + function ( + LocalisationCache $lc, + $code, + array $cache + ) { + if ( $code === 'ru' ) { + $cache['messages']['present-uk'] = 'ru-override'; + $cache['messages']['present-ru'] = 'ru-override'; + $cache['messages']['present-en'] = 'ru-override'; + } + } + ) + ) ); $lc = new LocalisationCache( array( 'store' = 'detect' ) ); $lc-recache( 'uk' ); -- To view, visit https://gerrit.wikimedia.org/r/166756 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8cfe494d159101306c699169dd224c3bea65c753 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender umherirrender_de...@web.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Hygiene: Mark intentional missing break statements for stati... - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Hygiene: Mark intentional missing break statements for static analysis .. Hygiene: Mark intentional missing break statements for static analysis Change-Id: Ie7ea82f1f4b46090488b70c3f56adda62518f505 --- M includes/Formatter/RevisionFormatter.php 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Matthias Mullie: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Formatter/RevisionFormatter.php b/includes/Formatter/RevisionFormatter.php index b8e7c6e..19962ce 100644 --- a/includes/Formatter/RevisionFormatter.php +++ b/includes/Formatter/RevisionFormatter.php @@ -658,9 +658,11 @@ $links['board-history'] = $this-urlGenerator-boardHistoryLink( $title ); break; + /** @noinspection PhpMissingBreakStatementInspection */ case 'diff-header': $diffCallback = isset( $diffCallback ) ? $diffCallback : array( $this-urlGenerator, 'diffHeaderLink' ); // don't break, diff links are rendered below + /** @noinspection PhpMissingBreakStatementInspection */ case 'diff-post': $diffCallback = isset( $diffCallback ) ? $diffCallback : array( $this-urlGenerator, 'diffPostLink' ); // don't break, diff links are rendered below -- To view, visit https://gerrit.wikimedia.org/r/165877 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie7ea82f1f4b46090488b70c3f56adda62518f505 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: EBernhardson ebernhard...@wikimedia.org Gerrit-Reviewer: Matthias Mullie mmul...@wikimedia.org Gerrit-Reviewer: SG shah...@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] Hygiene: Correct phpdoc comments - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Hygiene: Correct phpdoc comments .. Hygiene: Correct phpdoc comments Change-Id: Ia2dbce37c97e6a0393fd3f28242b838d7f2e05de --- M includes/Parsoid/Fixer/BadImageRemover.php M includes/RevisionActionPermissions.php M includes/WorkflowLoader.php 3 files changed, 5 insertions(+), 4 deletions(-) Approvals: Legoktm: Looks good to me, approved Matthias Mullie: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Parsoid/Fixer/BadImageRemover.php b/includes/Parsoid/Fixer/BadImageRemover.php index 164d04e..2047640 100644 --- a/includes/Parsoid/Fixer/BadImageRemover.php +++ b/includes/Parsoid/Fixer/BadImageRemover.php @@ -29,7 +29,7 @@ protected $isFiltered; /** -* @var callable $callback (string, Title) returning bool. First +* @var callable $isFiltered (string, Title) returning bool. First * argument is the image name to check. Second argument is the page on * which the image occurs. Returns true when the image should be filtered. */ diff --git a/includes/RevisionActionPermissions.php b/includes/RevisionActionPermissions.php index 599751a..43ee314 100644 --- a/includes/RevisionActionPermissions.php +++ b/includes/RevisionActionPermissions.php @@ -180,6 +180,7 @@ * * @param AbstractRevision|null $revision * @param string $action +* @param string $type * @return Closure|string */ public function getPermission( AbstractRevision $revision = null, $action, $type = 'permissions' ) { diff --git a/includes/WorkflowLoader.php b/includes/WorkflowLoader.php index 9844e00..1dba5c5 100644 --- a/includes/WorkflowLoader.php +++ b/includes/WorkflowLoader.php @@ -52,10 +52,10 @@ } /** -* @param $action +* @param string $action * @param array $blocks -* @param $user -* @param WebRequest $request +* @param mixed $user +* @param array $params * @return Block\AbstractBlock[] */ public function handleSubmit( $action, array $blocks, $user, array $params ) { -- To view, visit https://gerrit.wikimedia.org/r/165876 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia2dbce37c97e6a0393fd3f28242b838d7f2e05de Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: EBernhardson ebernhard...@wikimedia.org Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Matthias Mullie mmul...@wikimedia.org Gerrit-Reviewer: SG shah...@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] Hygiene: calling is_callable with wrong syntax - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Hygiene: calling is_callable with wrong syntax .. Hygiene: calling is_callable with wrong syntax Change-Id: I768183b06dbb3c9035e571441451bb9ee6e298a7 --- M includes/api/ApiFlow.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Legoktm: Looks good to me, approved Matthias Mullie: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/ApiFlow.php b/includes/api/ApiFlow.php index 05b78ef..2073c9e 100644 --- a/includes/api/ApiFlow.php +++ b/includes/api/ApiFlow.php @@ -61,7 +61,7 @@ $this-dieUsageMsg( array( 'missingparam', 'token' ) ); } - if ( is_callable( $module, 'validateToken' ) ) { + if ( is_callable( array( $module, 'validateToken' ) ) ) { if ( !$module-validateToken( $params['token'], $params ) ) { $this-dieUsageMsg( 'sessionfailure' ); } -- To view, visit https://gerrit.wikimedia.org/r/165878 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I768183b06dbb3c9035e571441451bb9ee6e298a7 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: EBernhardson ebernhard...@wikimedia.org Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Matthias Mullie mmul...@wikimedia.org Gerrit-Reviewer: SG shah...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added initial Debian packaging - change (operations...apertium-pt-ca)
Alexandros Kosiaris has submitted this change and it was merged. Change subject: Added initial Debian packaging .. Added initial Debian packaging Change-Id: If09d0521e64b3f6bdf450303fe7cfe4100877c01 --- A debian/changelog A debian/compat A debian/control A debian/copyright A debian/docs A debian/rules A debian/source/format A debian/watch 8 files changed, 108 insertions(+), 0 deletions(-) Approvals: Alexandros Kosiaris: Verified; Looks good to me, approved diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 000..05d5ccf --- /dev/null +++ b/debian/changelog @@ -0,0 +1,23 @@ +apertium-pt-ca (0.8.2+svn~57507-1) trusty; urgency=low + + [ Tino Didriksen ] + * New upstream release based on SVN snapshot. + + [ Kartik Mistry ] + * Added debian/watch file. + + -- Kartik Mistry kar...@debian.org Wed, 08 Oct 2014 17:31:11 +0530 + +apertium-pt-ca (0.8.1-1) unstable; urgency=low + + * New upstream release + * Added dependency on apertium-pcre2 + + -- Francis Tyers fty...@prompsit.com Wed, 04 Mar 2009 21:53:12 + + +apertium-pt-ca (0.8.0-1) unstable; urgency=low + + * Initial release (Closes: #486796) + + -- Francis Tyers fty...@prompsit.com Wed, 18 Jun 2008 10:24:41 +0100 + diff --git a/debian/compat b/debian/compat new file mode 100644 index 000..ec63514 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 000..eaea21c --- /dev/null +++ b/debian/control @@ -0,0 +1,27 @@ +Source: apertium-pt-ca +Section: science +Priority: optional +Maintainer: Debian Science Team debian-science-maintain...@lists.alioth.debian.org +Uploaders: Tino Didriksen m...@tinodidriksen.com, + Kartik Mistry kar...@debian.org +Build-Depends: apertium (= 3.3), + autotools-dev, + debhelper (= 9.0), + dh-autoreconf, + gawk, + libapertium3-3.3-dev, + locales, + pkg-config (= 0.21) +Standards-Version: 3.9.6 +Homepage: http://apertium.org/ +Vcs-Git: git://anonscm.debian.org/debian-science/packages/apertium-pt-ca.git +Vcs-Browser: https://anonscm.debian.org/cgit/debian-science/packages/apertium-pt-ca.git + +Package: apertium-pt-ca +Architecture: all +Depends: apertium (= 3.3), ${misc:Depends}, ${shlibs:Depends} +Provides: apertium-ca-pt +Conflicts: apertium-ca-pt +Description: Apertium translation data for the Portuguese-Catalan pair + Data package providing Apertium language resources for translating + between the Portuguese and Catalan languages. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 000..8f6f23c --- /dev/null +++ b/debian/copyright @@ -0,0 +1,22 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Source: http://apertium.org/ + +Files: * +Copyright: 2014, Apertium Project Management Committee apertium-...@dlsi.ua.es + See AUTHORS for more copyrights. +License: GPL-3+ + 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 3 of the License, or + (at your option) any later version. + . + This package 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, see http://www.gnu.org/licenses/. + . + On Debian systems, the complete text of the GNU General + Public License version 3 can be found in /usr/share/common-licenses/GPL-3. diff --git a/debian/docs b/debian/docs new file mode 100644 index 000..6f83607 --- /dev/null +++ b/debian/docs @@ -0,0 +1,3 @@ +AUTHORS +NEWS +README diff --git a/debian/rules b/debian/rules new file mode 100755 index 000..11004df --- /dev/null +++ b/debian/rules @@ -0,0 +1,27 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. +# +# Modified to make a template file for a multi-binary package with separated +# build-arch and build-indep targets by Bill Allombert 2001 + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# This has to be exported to make some magic below work. +export DH_OPTIONS + +%: + dh $@ --with autoreconf + +override_dh_auto_build: + mkdir -p debian/tmp/locale/ + localedef -f UTF-8 -i en_US ./debian/tmp/locale/en_US.UTF-8/ + export LOCPATH=$(CURDIR)/debian/tmp/locale/ \
[MediaWiki-commits] [Gerrit] Add .gitreview file - change (operations...apertium-apy)
Alexandros Kosiaris has submitted this change and it was merged. Change subject: Add .gitreview file .. Add .gitreview file Change-Id: If2d45a28dfd80196c9596b6bf2cf54908851af86 --- A .gitreview 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: Alexandros Kosiaris: Verified; Looks good to me, approved diff --git a/.gitreview b/.gitreview new file mode 100644 index 000..20f0e47 --- /dev/null +++ b/.gitreview @@ -0,0 +1,6 @@ +[gerrit] +host=gerrit.wikimedia.org +port=29418 +project=operations/debs/contenttranslation/apertium-apy.git +defaultbranch=master +defaultrebase=0 -- To view, visit https://gerrit.wikimedia.org/r/166396 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If2d45a28dfd80196c9596b6bf2cf54908851af86 Gerrit-PatchSet: 1 Gerrit-Project: operations/debs/contenttranslation/apertium-apy Gerrit-Branch: master Gerrit-Owner: KartikMistry kartik.mis...@gmail.com Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Clean up after DataModel 2.0 switch - change (mediawiki...Wikibase)
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/166757 Change subject: Clean up after DataModel 2.0 switch .. Clean up after DataModel 2.0 switch Just some minor clean ups. Main change is the missing use clauses. Change-Id: I4bd3823205fffc6bdcb37106369845fd918c9c7f --- M repo/includes/content/EntityContent.php M repo/tests/phpunit/includes/content/EntityHandlerTest.php M repo/tests/phpunit/includes/content/ItemHandlerTest.php M repo/tests/phpunit/includes/content/PropertyHandlerTest.php 4 files changed, 12 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/57/166757/1 diff --git a/repo/includes/content/EntityContent.php b/repo/includes/content/EntityContent.php index 5dd5f0d..bccbc52 100644 --- a/repo/includes/content/EntityContent.php +++ b/repo/includes/content/EntityContent.php @@ -24,6 +24,8 @@ use ValueFormatters\FormatterOptions; use ValueFormatters\ValueFormatter; use Wikibase\DataModel\Entity\BasicEntityIdParser; +use Wikibase\DataModel\Entity\Entity; +use Wikibase\DataModel\Entity\EntityId; use Wikibase\Lib\Serializers\SerializationOptions; use Wikibase\Lib\SnakFormatter; use Wikibase\Lib\Store\EntityInfoBuilderFactory; diff --git a/repo/tests/phpunit/includes/content/EntityHandlerTest.php b/repo/tests/phpunit/includes/content/EntityHandlerTest.php index 804b77d..556be12 100644 --- a/repo/tests/phpunit/includes/content/EntityHandlerTest.php +++ b/repo/tests/phpunit/includes/content/EntityHandlerTest.php @@ -47,7 +47,7 @@ } /** -* @param SettingsArray $settings +* @param SettingsArray|null $settings * * @return WikibaseRepo */ @@ -62,14 +62,14 @@ } /** -* @param SettingsArray $settings +* @param SettingsArray|null $settings * * @return EntityHandler */ protected abstract function getHandler( SettingsArray $settings = null ); /** -* @param Entity $entity +* @param Entity|null $entity * * @return EntityContent */ @@ -94,7 +94,7 @@ } /** -* @param EntityId $id +* @param EntityId|null $id * * @return Entity */ @@ -102,12 +102,10 @@ /** * Returns EntityContents that can be handled by the EntityHandler deriving class. -* @return array +* +* @return array[] */ public function contentProvider() { - /** -* @var EntityContent $content -*/ $content = $this-newEntityContent(); $content-getEntity()-addAliases( 'en', array( 'foo' ) ); $content-getEntity()-setDescription( 'de', 'foobar' ); @@ -126,10 +124,9 @@ */ public function testGetModelName( EntityHandler $entityHandler ) { $this-assertEquals( $this-getModelId(), $entityHandler-getModelID() ); - $this-assertInstanceOf( '\ContentHandler', $entityHandler ); + $this-assertInstanceOf( 'ContentHandler', $entityHandler ); $this-assertInstanceOf( $this-getClassName(), $entityHandler ); } - /** * @dataProvider instanceProvider @@ -406,7 +403,7 @@ } public function testExportTransform_neverRecodeNonLegacyFormat() { - $codec = $this-getMockBuilder( '\Wikibase\Lib\Store\EntityContentDataCodec' ) + $codec = $this-getMockBuilder( 'Wikibase\Lib\Store\EntityContentDataCodec' ) -disableOriginalConstructor() -getMock(); $codec-expects( $this-never() ) diff --git a/repo/tests/phpunit/includes/content/ItemHandlerTest.php b/repo/tests/phpunit/includes/content/ItemHandlerTest.php index 1461d8e..118fc72 100644 --- a/repo/tests/phpunit/includes/content/ItemHandlerTest.php +++ b/repo/tests/phpunit/includes/content/ItemHandlerTest.php @@ -41,7 +41,7 @@ * @return string */ public function getClassName() { - return '\Wikibase\Repo\Content\ItemHandler'; + return 'Wikibase\Repo\Content\ItemHandler'; } /** diff --git a/repo/tests/phpunit/includes/content/PropertyHandlerTest.php b/repo/tests/phpunit/includes/content/PropertyHandlerTest.php index 1baa133..aa80779 100644 --- a/repo/tests/phpunit/includes/content/PropertyHandlerTest.php +++ b/repo/tests/phpunit/includes/content/PropertyHandlerTest.php @@ -37,7 +37,7 @@ * @return string */ public function getClassName() { - return '\Wikibase\Repo\Content\PropertyHandler'; + return 'Wikibase\Repo\Content\PropertyHandler'; } /** -- To view, visit https://gerrit.wikimedia.org/r/166757 To unsubscribe,
[MediaWiki-commits] [Gerrit] Use mergeMwGlobalArrayValue in ApiOptionsTest - change (mediawiki/core)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/166758 Change subject: Use mergeMwGlobalArrayValue in ApiOptionsTest .. Use mergeMwGlobalArrayValue in ApiOptionsTest Change-Id: Ic0a9ceab9e8fad7c408e32ba110a3543ef28b59e --- M tests/phpunit/includes/api/ApiOptionsTest.php 1 file changed, 5 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/58/166758/1 diff --git a/tests/phpunit/includes/api/ApiOptionsTest.php b/tests/phpunit/includes/api/ApiOptionsTest.php index 5f955bb..bd34018 100644 --- a/tests/phpunit/includes/api/ApiOptionsTest.php +++ b/tests/phpunit/includes/api/ApiOptionsTest.php @@ -17,8 +17,6 @@ /** @var DerivativeContext */ private $mContext; - private $mOldGetPreferencesHooks; - private static $Success = array( 'options' = 'success' ); protected function setUp() { @@ -50,21 +48,11 @@ $this-mTested = new ApiOptions( $main, 'options' ); - global $wgHooks; - if ( !isset( $wgHooks['GetPreferences'] ) ) { - $wgHooks['GetPreferences'] = array(); - } - $this-mOldGetPreferencesHooks = $wgHooks['GetPreferences']; - $wgHooks['GetPreferences'][] = array( $this, 'hookGetPreferences' ); - } - - protected function tearDown() { - global $wgHooks; - - $wgHooks['GetPreferences'] = $this-mOldGetPreferencesHooks; - $this-mOldGetPreferencesHooks = false; - - parent::tearDown(); + $this-mergeMwGlobalArrayValue( 'wgHooks', array( + 'GetPreferences' = array( + array( $this, 'hookGetPreferences' ) + ) + ) ); } public function hookGetPreferences( $user, $preferences ) { -- To view, visit https://gerrit.wikimedia.org/r/166758 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic0a9ceab9e8fad7c408e32ba110a3543ef28b59e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender umherirrender_de...@web.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] rubocop and lint for all repos having Ruby code - change (integration/config)
jenkins-bot has submitted this change and it was merged. Change subject: rubocop and lint for all repos having Ruby code .. rubocop and lint for all repos having Ruby code Create rubocop jobs using the bundle job template. Explicitly set each of them as non voting since none of the repositories pass rubocop checks. Also added a mwext-ZeroPortal-ruby1.9.3lint Created jobs: VisualEditor-bundle-rubocop mediawiki-core-bundle-rubocop mediawiki-ruby-api-bundle-rubocop mediawiki-selenium-bundle-rubocop mwext-ArticleFeedbackv5-bundle-rubocop mwext-CirrusSearch-bundle-rubocop mwext-ContentTranslation-bundle-rubocop mwext-Echo-bundle-rubocop mwext-Flow-bundle-rubocop mwext-GettingStarted-bundle-rubocop mwext-Math-bundle-rubocop mwext-MobileFrontend-bundle-rubocop mwext-MultimediaViewer-bundle-rubocop mwext-PageTriage-bundle-rubocop mwext-PdfHandler-bundle-rubocop mwext-Translate-bundle-rubocop mwext-TwnMainPage-bundle-rubocop mwext-UniversalLanguageSelector-bundle-rubocop mwext-UploadWizard-bundle-rubocop mwext-VisualEditor-bundle-rubocop mwext-WikiLove-bundle-rubocop mwext-ZeroBanner-bundle-rubocop mwext-ZeroPortal-bundle-rubocop mwext-ZeroPortal-ruby1.9.3lint Bug: 69245 Change-Id: I061f10cccaf5e91f807b627904ac9bdb54111acc --- M jjb/browsertests.yaml M jjb/mediawiki-extensions.yaml M jjb/mediawiki-misc.yaml M jjb/mediawiki.yaml M zuul/layout.yaml 5 files changed, 142 insertions(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/jjb/browsertests.yaml b/jjb/browsertests.yaml index 8892679..307d2f8 100644 --- a/jjb/browsertests.yaml +++ b/jjb/browsertests.yaml @@ -461,6 +461,10 @@ - '{name}-npm' + - '{name}-bundle-{bundlecommand}': + bundlecommand: + - rubocop + - '{name}-ruby1.9.3lint' - 'VisualEditor-jsduck' diff --git a/jjb/mediawiki-extensions.yaml b/jjb/mediawiki-extensions.yaml index e0ced37..29c1b54 100644 --- a/jjb/mediawiki-extensions.yaml +++ b/jjb/mediawiki-extensions.yaml @@ -1139,6 +1139,9 @@ - project: name: 'mwext-ArticleFeedbackv5' jobs: + - '{name}-bundle-{bundlecommand}': + bundlecommand: + - rubocop - '{name}-ruby1.9.3lint' - project: @@ -1154,6 +1157,9 @@ - project: name: 'mwext-CirrusSearch' jobs: + - '{name}-bundle-{bundlecommand}': + bundlecommand: + - rubocop - '{name}-ruby1.9.3lint' - project: @@ -1189,6 +1195,9 @@ name: 'mwext-ContentTranslation' jobs: - '{name}-phpcs-strict-HEAD' + - '{name}-bundle-{bundlecommand}': + bundlecommand: + - rubocop - '{name}-ruby1.9.3lint' - '{name}-yamllint' @@ -1200,6 +1209,9 @@ - project: name: 'mwext-Echo' jobs: + - '{name}-bundle-{bundlecommand}': + bundlecommand: + - rubocop - '{name}-ruby1.9.3lint' - project: @@ -1214,11 +1226,17 @@ - project: name: 'mwext-Flow' jobs: + - '{name}-bundle-{bundlecommand}': + bundlecommand: + - rubocop - '{name}-ruby1.9.3lint' - project: name: 'mwext-GettingStarted' jobs: + - '{name}-bundle-{bundlecommand}': + bundlecommand: + - rubocop - '{name}-ruby1.9.3lint' - project: @@ -1234,16 +1252,25 @@ - project: name: 'mwext-Math' jobs: + - '{name}-bundle-{bundlecommand}': + bundlecommand: + - rubocop - '{name}-ruby1.9.3lint' - project: name: 'mwext-MobileFrontend' jobs: + - '{name}-bundle-{bundlecommand}': + bundlecommand: + - rubocop - '{name}-ruby1.9.3lint' - project: name: 'mwext-MultimediaViewer' jobs: + - '{name}-bundle-{bundlecommand}': + bundlecommand: + - rubocop - '{name}-ruby1.9.3lint' - project: @@ -1259,11 +1286,17 @@ - project: name: 'mwext-PageTriage' jobs: + - '{name}-bundle-{bundlecommand}': + bundlecommand: + - rubocop - '{name}-ruby1.9.3lint' - project: name: 'mwext-PdfHandler' jobs: + - '{name}-bundle-{bundlecommand}': + bundlecommand: + - rubocop - '{name}-ruby1.9.3lint' - project: @@ -1291,6 +1324,9 @@ jobs: - '{name}-phpcs-strict-HEAD' - '{name}-phpcs-strict' + - '{name}-bundle-{bundlecommand}': + bundlecommand: + - rubocop - '{name}-ruby1.9.3lint' - project: @@ -1302,11 +1338,17 @@ name: 'mwext-TwnMainPage' jobs: - '{name}-phpcs-strict-HEAD' + - '{name}-bundle-{bundlecommand}': + bundlecommand: + - rubocop - '{name}-ruby1.9.3lint' - project: name: 'mwext-UniversalLanguageSelector' jobs: + - '{name}-bundle-{bundlecommand}': + bundlecommand: + - rubocop - '{name}-ruby1.9.3lint' - '{name}-phpcs-strict-HEAD' @@ -1314,11 +1356,17 @@ name:
[MediaWiki-commits] [Gerrit] Hygiene: Remove unused class aliases - change (mediawiki...Flow)
Matthias Mullie has submitted this change and it was merged. Change subject: Hygiene: Remove unused class aliases .. Hygiene: Remove unused class aliases Change-Id: I859a091a4130feb17087394d90d26dd4d23f4a71 --- M includes/Block/Topic.php M includes/Block/TopicSummary.php M includes/Data/BagOStuff/BufferedBagOStuff.php M includes/Data/RecentChanges/RecentChanges.php M includes/Model/AbstractRevision.php M includes/SubmissionHandler.php M includes/WorkflowLoader.php M includes/api/ApiFlow.php M includes/api/ApiFlowBasePost.php 9 files changed, 0 insertions(+), 10 deletions(-) Approvals: Matthias Mullie: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Block/Topic.php b/includes/Block/Topic.php index e1e9e5a..6f7eac9 100644 --- a/includes/Block/Topic.php +++ b/includes/Block/Topic.php @@ -15,7 +15,6 @@ use Flow\Model\PostRevision; use Flow\Model\UUID; use Flow\Model\Workflow; -use Flow\Parsoid\Utils; use Flow\Repository\RootPostLoader; use Flow\RevisionActionPermissions; use Flow\Templating; diff --git a/includes/Block/TopicSummary.php b/includes/Block/TopicSummary.php index 989bcf8..8705886 100644 --- a/includes/Block/TopicSummary.php +++ b/includes/Block/TopicSummary.php @@ -8,7 +8,6 @@ use Flow\Exception\InvalidDataException; use Flow\Exception\InvalidInputException; use Flow\Formatter\FormatterRow; -use Flow\Model\AbstractRevision; use Flow\Model\PostRevision; use Flow\Model\PostSummary; use Flow\Templating; diff --git a/includes/Data/BagOStuff/BufferedBagOStuff.php b/includes/Data/BagOStuff/BufferedBagOStuff.php index a4ed59d..680d023 100644 --- a/includes/Data/BagOStuff/BufferedBagOStuff.php +++ b/includes/Data/BagOStuff/BufferedBagOStuff.php @@ -3,7 +3,6 @@ namespace Flow\Data\BagOStuff; use BagOStuff; -use Flow\Exception\FlowException; use HashBagOStuff; /** diff --git a/includes/Data/RecentChanges/RecentChanges.php b/includes/Data/RecentChanges/RecentChanges.php index 313826b..acb500a 100644 --- a/includes/Data/RecentChanges/RecentChanges.php +++ b/includes/Data/RecentChanges/RecentChanges.php @@ -8,7 +8,6 @@ use Flow\FlowActions; use Flow\Model\AbstractRevision; use Flow\Model\Workflow; -use RecentChange; use Closure; /** diff --git a/includes/Model/AbstractRevision.php b/includes/Model/AbstractRevision.php index 7ffb609..15955fb 100644 --- a/includes/Model/AbstractRevision.php +++ b/includes/Model/AbstractRevision.php @@ -3,9 +3,7 @@ namespace Flow\Model; use Flow\Collection\AbstractCollection; -use Flow\Exception\CrossWikiException; use Flow\Exception\DataModelException; -use Flow\Exception\FlowException; use Flow\Exception\PermissionException; use Flow\Parsoid\Utils; use Title; diff --git a/includes/SubmissionHandler.php b/includes/SubmissionHandler.php index 8dfb656..cb72c99 100644 --- a/includes/SubmissionHandler.php +++ b/includes/SubmissionHandler.php @@ -11,7 +11,6 @@ use Flow\Exception\InvalidActionException; use DeferredUpdates; use SplQueue; -use WebRequest; class SubmissionHandler { diff --git a/includes/WorkflowLoader.php b/includes/WorkflowLoader.php index 1dba5c5..7d09501 100644 --- a/includes/WorkflowLoader.php +++ b/includes/WorkflowLoader.php @@ -4,7 +4,6 @@ use Flow\Block\AbstractBlock; use Flow\Model\Workflow; -use WebRequest; class WorkflowLoader { /** diff --git a/includes/api/ApiFlow.php b/includes/api/ApiFlow.php index 2073c9e..1e30d89 100644 --- a/includes/api/ApiFlow.php +++ b/includes/api/ApiFlow.php @@ -2,7 +2,6 @@ use Flow\Container; use Flow\Model\UUID; -use Flow\Templating; class ApiFlow extends ApiBase { diff --git a/includes/api/ApiFlowBasePost.php b/includes/api/ApiFlowBasePost.php index 941bab7..cc899c1 100644 --- a/includes/api/ApiFlowBasePost.php +++ b/includes/api/ApiFlowBasePost.php @@ -1,7 +1,6 @@ ?php use Flow\Block\AbstractBlock; -use Flow\Container; use Flow\Model\Anchor; abstract class ApiFlowBasePost extends ApiFlowBase { -- To view, visit https://gerrit.wikimedia.org/r/165879 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I859a091a4130feb17087394d90d26dd4d23f4a71 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: EBernhardson ebernhard...@wikimedia.org Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Matthias Mullie mmul...@wikimedia.org Gerrit-Reviewer: SG shah...@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 setting hooks in ApiQueryTest - change (mediawiki/core)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/166759 Change subject: Fix setting hooks in ApiQueryTest .. Fix setting hooks in ApiQueryTest Also fix the comment Change-Id: I4245a5f515980c743965996aecc67b42b616b50c --- M tests/phpunit/includes/api/query/ApiQueryTest.php 1 file changed, 11 insertions(+), 22 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/59/166759/1 diff --git a/tests/phpunit/includes/api/query/ApiQueryTest.php b/tests/phpunit/includes/api/query/ApiQueryTest.php index bba22c7..200027d 100644 --- a/tests/phpunit/includes/api/query/ApiQueryTest.php +++ b/tests/phpunit/includes/api/query/ApiQueryTest.php @@ -7,32 +7,21 @@ * @covers ApiQuery */ class ApiQueryTest extends ApiTestCase { - /** -* @var array Storage for $wgHooks -*/ - protected $hooks; - protected function setUp() { - global $wgHooks; - parent::setUp(); $this-doLogin(); - // Setup en: as interwiki prefix - $this-hooks = $wgHooks; - $wgHooks['InterwikiLoadPrefix'][] = function ( $prefix, $data ) { - if ( $prefix == 'apiquerytestiw' ) { - $data = array( 'iw_url' = 'wikipedia' ); - } - return false; - }; - } - - protected function tearDown() { - global $wgHooks; - $wgHooks = $this-hooks; - - parent::tearDown(); + // Setup apiquerytestiw: as interwiki prefix + $this-setMwGlobals( 'wgHooks', array( + 'InterwikiLoadPrefix' = array( + function ( $prefix, $data ) { + if ( $prefix == 'apiquerytestiw' ) { + $data = array( 'iw_url' = 'wikipedia' ); + } + return false; + } + ) + ) ); } public function testTitlesGetNormalized() { -- To view, visit https://gerrit.wikimedia.org/r/166759 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4245a5f515980c743965996aecc67b42b616b50c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender umherirrender_de...@web.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Hygiene: Remove unused variable - change (mediawiki...Flow)
Matthias Mullie has submitted this change and it was merged. Change subject: Hygiene: Remove unused variable .. Hygiene: Remove unused variable Change-Id: I5f8d1c1050808893695f15793c57be7d4b15e97b --- M includes/api/ApiFlowBaseGet.php 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Matthias Mullie: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/ApiFlowBaseGet.php b/includes/api/ApiFlowBaseGet.php index 9f5c0be..606647a 100644 --- a/includes/api/ApiFlowBaseGet.php +++ b/includes/api/ApiFlowBaseGet.php @@ -9,7 +9,6 @@ $blocks = $loader-createBlocks(); $action = $this-getAction(); $user = $this-getUser(); - $container = $this-getContainer(); $passedParams = $this-getBlockParams(); $output[$action] = array( -- To view, visit https://gerrit.wikimedia.org/r/165880 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5f8d1c1050808893695f15793c57be7d4b15e97b Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: EBernhardson ebernhard...@wikimedia.org Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Matthias Mullie mmul...@wikimedia.org Gerrit-Reviewer: SG shah...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Bug: checking instanceof wrong class name - change (mediawiki...Flow)
Matthias Mullie has submitted this change and it was merged. Change subject: Bug: checking instanceof wrong class name .. Bug: checking instanceof wrong class name Change-Id: I4dce55d2ea23d85b33591d2bff1284d4515e2cfe --- M includes/Data/ObjectLocator.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Matthias Mullie: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Data/ObjectLocator.php b/includes/Data/ObjectLocator.php index dced279..edb13f3 100644 --- a/includes/Data/ObjectLocator.php +++ b/includes/Data/ObjectLocator.php @@ -238,7 +238,7 @@ } } - if ( $queries $this-mapper instanceof Core\CachingObjectMapper ) { + if ( $queries $this-mapper instanceof Mapper\CachingObjectMapper ) { return false; } -- To view, visit https://gerrit.wikimedia.org/r/165881 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4dce55d2ea23d85b33591d2bff1284d4515e2cfe Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: EBernhardson ebernhard...@wikimedia.org Gerrit-Reviewer: Matthias Mullie mmul...@wikimedia.org Gerrit-Reviewer: SG shah...@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] Hygiene: Ensure property is set before accessing - change (mediawiki...Flow)
Matthias Mullie has submitted this change and it was merged. Change subject: Hygiene: Ensure property is set before accessing .. Hygiene: Ensure property is set before accessing Change-Id: I1f885a195139311d695ef20f0cb572a7f6c40bed --- M includes/Notifications/Formatter.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Matthias Mullie: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Notifications/Formatter.php b/includes/Notifications/Formatter.php index c56c49b..5b30a2f 100644 --- a/includes/Notifications/Formatter.php +++ b/includes/Notifications/Formatter.php @@ -179,7 +179,7 @@ // merged, $data should be always an instance of EchoEvent if ( $data instanceof \EchoEvent ) { $extra = $data-getExtra(); - } else { + } elseif ( isset( $data-event_extra ) ) { $extra = $data-event_extra; } if ( isset( $extra['post-id'] ) ) { -- To view, visit https://gerrit.wikimedia.org/r/165882 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1f885a195139311d695ef20f0cb572a7f6c40bed Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: EBernhardson ebernhard...@wikimedia.org Gerrit-Reviewer: Matthias Mullie mmul...@wikimedia.org Gerrit-Reviewer: SG shah...@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] Upgrade to WikibaseDataModel 2.0 and add a missing use clauses - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Upgrade to WikibaseDataModel 2.0 and add a missing use clauses .. Upgrade to WikibaseDataModel 2.0 and add a missing use clauses See https://github.com/wmde/WikibaseDataModel/pull/218 for a few more explanations. Change-Id: I687c61c418d3a0a52b945356c5eb5ce60b3d994f --- M client/includes/ChangeHandler.php M composer.json M lib/includes/EntityFactory.php M lib/includes/ReferencedEntitiesFinder.php M lib/includes/SnakFactory.php M lib/includes/ValuesFinder.php M lib/includes/WikibaseDiffOpFactory.php M lib/includes/changes/EntityChange.php M lib/includes/changes/ItemChange.php M lib/includes/store/EntityRevision.php M lib/includes/store/ItemUsageIndex.php M lib/includes/store/TermCombinationMatchFinder.php M lib/includes/store/TermIndex.php M lib/includes/store/TermPropertyLabelResolver.php M lib/includes/store/sql/TermSqlIndex.php M repo/includes/ClaimHtmlGenerator.php M repo/includes/ClaimSummaryBuilder.php M repo/includes/EditEntity.php M repo/includes/EntityParserOutputGenerator.php M repo/includes/EntityView.php M repo/includes/ItemDisambiguation.php M repo/includes/ItemView.php M repo/includes/LabelDescriptionDuplicateDetector.php M repo/includes/ParserOutputJsConfigBuilder.php M repo/includes/PropertyView.php M repo/includes/SummaryFormatter.php M repo/includes/content/ItemContent.php M repo/includes/content/PropertyContent.php M repo/includes/rdf/RdfBuilder.php M repo/includes/store/sql/PropertyInfoTableBuilder.php M repo/tests/phpunit/includes/content/EntityHandlerTest.php 31 files changed, 68 insertions(+), 6 deletions(-) Approvals: JanZerebecki: Looks good to me, approved jenkins-bot: Verified diff --git a/client/includes/ChangeHandler.php b/client/includes/ChangeHandler.php index 4fc108c..6013b3f 100644 --- a/client/includes/ChangeHandler.php +++ b/client/includes/ChangeHandler.php @@ -7,6 +7,8 @@ use SiteList; use Title; use Wikibase\Client\WikibaseClient; +use Wikibase\DataModel\Entity\Diff\EntityDiff; +use Wikibase\DataModel\Entity\Diff\ItemDiff; use Wikibase\Lib\Changes\EntityChangeFactory; use Wikibase\Lib\Store\EntityRevisionLookup; diff --git a/composer.json b/composer.json index efec9e1..76f3ed2 100644 --- a/composer.json +++ b/composer.json @@ -35,10 +35,10 @@ data-values/javascript: ~0.6.0, data-values/value-view: ~0.7.0, - wikibase/data-model: ~1.0, + wikibase/data-model: ~2.0, wikibase/data-model-javascript: ~0.3.0, - wikibase/data-model-serialization: ~1.1, - wikibase/internal-serialization: ~1.2, + wikibase/data-model-serialization: ~1.2, + wikibase/internal-serialization: ~1.3, wikibase/serialization-javascript: ~1.1.1, diff/diff: ~1.0, diff --git a/lib/includes/EntityFactory.php b/lib/includes/EntityFactory.php index 44b80a8..2b03a75 100644 --- a/lib/includes/EntityFactory.php +++ b/lib/includes/EntityFactory.php @@ -4,6 +4,8 @@ use MWException; use OutOfBoundsException; +use Wikibase\DataModel\Entity\Item; +use Wikibase\DataModel\Entity\Property; /** * Factory for Entity objects. diff --git a/lib/includes/ReferencedEntitiesFinder.php b/lib/includes/ReferencedEntitiesFinder.php index 89f4b7d..87eec2b 100644 --- a/lib/includes/ReferencedEntitiesFinder.php +++ b/lib/includes/ReferencedEntitiesFinder.php @@ -3,6 +3,7 @@ namespace Wikibase; use Wikibase\DataModel\Entity\EntityIdValue; +use Wikibase\DataModel\Snak\PropertyValueSnak; /** * Finds linked entities given a list of entities or a list of claims. diff --git a/lib/includes/SnakFactory.php b/lib/includes/SnakFactory.php index 1f3e8db..d0c56ce 100644 --- a/lib/includes/SnakFactory.php +++ b/lib/includes/SnakFactory.php @@ -5,6 +5,9 @@ use DataValues\DataValue; use InvalidArgumentException; use Wikibase\DataModel\Entity\PropertyId; +use Wikibase\DataModel\Snak\PropertyNoValueSnak; +use Wikibase\DataModel\Snak\PropertySomeValueSnak; +use Wikibase\DataModel\Snak\PropertyValueSnak; /** * Factory for creating new snaks. diff --git a/lib/includes/ValuesFinder.php b/lib/includes/ValuesFinder.php index e0646d5..dec9ff4 100644 --- a/lib/includes/ValuesFinder.php +++ b/lib/includes/ValuesFinder.php @@ -6,6 +6,7 @@ use Wikibase\DataModel\Entity\PropertyDataTypeLookup; use Wikibase\DataModel\Entity\PropertyId; use Wikibase\DataModel\Entity\PropertyNotFoundException; +use Wikibase\DataModel\Snak\PropertyValueSnak; /** * Find all data values for a specified data type in an array of snaks. diff --git a/lib/includes/WikibaseDiffOpFactory.php b/lib/includes/WikibaseDiffOpFactory.php index 6ef9748..ea4fdfb 100644 --- a/lib/includes/WikibaseDiffOpFactory.php +++ b/lib/includes/WikibaseDiffOpFactory.php @@ -3,6 +3,7 @@ namespace Wikibase; use Diff\DiffOpFactory; +use
[MediaWiki-commits] [Gerrit] Clean up after DataModel 2.0 switch - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Clean up after DataModel 2.0 switch .. Clean up after DataModel 2.0 switch Just some minor clean ups. Main change is the missing use clauses. Change-Id: I4bd3823205fffc6bdcb37106369845fd918c9c7f --- M repo/includes/content/EntityContent.php M repo/tests/phpunit/includes/content/EntityHandlerTest.php M repo/tests/phpunit/includes/content/ItemHandlerTest.php M repo/tests/phpunit/includes/content/PropertyHandlerTest.php 4 files changed, 12 insertions(+), 13 deletions(-) Approvals: Jeroen De Dauw: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/includes/content/EntityContent.php b/repo/includes/content/EntityContent.php index 5dd5f0d..bccbc52 100644 --- a/repo/includes/content/EntityContent.php +++ b/repo/includes/content/EntityContent.php @@ -24,6 +24,8 @@ use ValueFormatters\FormatterOptions; use ValueFormatters\ValueFormatter; use Wikibase\DataModel\Entity\BasicEntityIdParser; +use Wikibase\DataModel\Entity\Entity; +use Wikibase\DataModel\Entity\EntityId; use Wikibase\Lib\Serializers\SerializationOptions; use Wikibase\Lib\SnakFormatter; use Wikibase\Lib\Store\EntityInfoBuilderFactory; diff --git a/repo/tests/phpunit/includes/content/EntityHandlerTest.php b/repo/tests/phpunit/includes/content/EntityHandlerTest.php index 804b77d..556be12 100644 --- a/repo/tests/phpunit/includes/content/EntityHandlerTest.php +++ b/repo/tests/phpunit/includes/content/EntityHandlerTest.php @@ -47,7 +47,7 @@ } /** -* @param SettingsArray $settings +* @param SettingsArray|null $settings * * @return WikibaseRepo */ @@ -62,14 +62,14 @@ } /** -* @param SettingsArray $settings +* @param SettingsArray|null $settings * * @return EntityHandler */ protected abstract function getHandler( SettingsArray $settings = null ); /** -* @param Entity $entity +* @param Entity|null $entity * * @return EntityContent */ @@ -94,7 +94,7 @@ } /** -* @param EntityId $id +* @param EntityId|null $id * * @return Entity */ @@ -102,12 +102,10 @@ /** * Returns EntityContents that can be handled by the EntityHandler deriving class. -* @return array +* +* @return array[] */ public function contentProvider() { - /** -* @var EntityContent $content -*/ $content = $this-newEntityContent(); $content-getEntity()-addAliases( 'en', array( 'foo' ) ); $content-getEntity()-setDescription( 'de', 'foobar' ); @@ -126,10 +124,9 @@ */ public function testGetModelName( EntityHandler $entityHandler ) { $this-assertEquals( $this-getModelId(), $entityHandler-getModelID() ); - $this-assertInstanceOf( '\ContentHandler', $entityHandler ); + $this-assertInstanceOf( 'ContentHandler', $entityHandler ); $this-assertInstanceOf( $this-getClassName(), $entityHandler ); } - /** * @dataProvider instanceProvider @@ -406,7 +403,7 @@ } public function testExportTransform_neverRecodeNonLegacyFormat() { - $codec = $this-getMockBuilder( '\Wikibase\Lib\Store\EntityContentDataCodec' ) + $codec = $this-getMockBuilder( 'Wikibase\Lib\Store\EntityContentDataCodec' ) -disableOriginalConstructor() -getMock(); $codec-expects( $this-never() ) diff --git a/repo/tests/phpunit/includes/content/ItemHandlerTest.php b/repo/tests/phpunit/includes/content/ItemHandlerTest.php index 1461d8e..118fc72 100644 --- a/repo/tests/phpunit/includes/content/ItemHandlerTest.php +++ b/repo/tests/phpunit/includes/content/ItemHandlerTest.php @@ -41,7 +41,7 @@ * @return string */ public function getClassName() { - return '\Wikibase\Repo\Content\ItemHandler'; + return 'Wikibase\Repo\Content\ItemHandler'; } /** diff --git a/repo/tests/phpunit/includes/content/PropertyHandlerTest.php b/repo/tests/phpunit/includes/content/PropertyHandlerTest.php index 1baa133..aa80779 100644 --- a/repo/tests/phpunit/includes/content/PropertyHandlerTest.php +++ b/repo/tests/phpunit/includes/content/PropertyHandlerTest.php @@ -37,7 +37,7 @@ * @return string */ public function getClassName() { - return '\Wikibase\Repo\Content\PropertyHandler'; + return 'Wikibase\Repo\Content\PropertyHandler'; } /** -- To view, visit https://gerrit.wikimedia.org/r/166757 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
[MediaWiki-commits] [Gerrit] Work around tidy by using a meta element instead of an empty... - change (mediawiki...Math)
jenkins-bot has submitted this change and it was merged. Change subject: Work around tidy by using a meta element instead of an empty span .. Work around tidy by using a meta element instead of an empty span HTML tidy will strip empty spans, so don't use one for the fallback image. We use a meta element instead, as that does not normally render at all doesn't have any default styling coming with it. Change-Id: I5bcbbc9468433e3c8722c09ce813a6f5ac741333 --- M MathMathML.php 1 file changed, 3 insertions(+), 2 deletions(-) Approvals: Physikerwelt: Looks good to me, approved jenkins-bot: Verified diff --git a/MathMathML.php b/MathMathML.php index d5c2cf0..32e56cc 100644 --- a/MathMathML.php +++ b/MathMathML.php @@ -383,8 +383,9 @@ $this-correctSvgStyle( $this-getSvg(), $style ); if ( $class ) { $attribs['class'] = $class; } if ( $style ) { $attribs['style'] = $style; } - // an alternative for svg might be an object with type=image/svg+xml - return Xml::element( 'span', $this-getAttributes( 'span', $attribs , array( 'aria-hidden' = 'true' ) ) ); + // Don't use an empty span, as that is going to be stripped by HTML tidy + // when enabled (which is true in production). + return Xml::element( 'meta', $this-getAttributes( 'span', $attribs , array( 'aria-hidden' = 'true' ) ) ); } -- To view, visit https://gerrit.wikimedia.org/r/166738 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5bcbbc9468433e3c8722c09ce813a6f5ac741333 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Math Gerrit-Branch: master Gerrit-Owner: GWicke gwi...@wikimedia.org Gerrit-Reviewer: Frédéric Wang fred.w...@free.fr Gerrit-Reviewer: GWicke gwi...@wikimedia.org Gerrit-Reviewer: Physikerwelt w...@physikerwelt.de Gerrit-Reviewer: TheDJ hartman.w...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Hygiene: Update incorrect class annotations - change (mediawiki...Flow)
Matthias Mullie has submitted this change and it was merged. Change subject: Hygiene: Update incorrect class annotations .. Hygiene: Update incorrect class annotations Change-Id: I1ef94a1bdab10b11024d5e974b045dcaecf9f47c --- M includes/Data/Listener/ReferenceRecorder.php M includes/Model/UserTuple.php M includes/api/ApiParsoidUtilsFlow.php 3 files changed, 5 insertions(+), 3 deletions(-) Approvals: Matthias Mullie: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Data/Listener/ReferenceRecorder.php b/includes/Data/Listener/ReferenceRecorder.php index 9bfd077..554f953 100644 --- a/includes/Data/Listener/ReferenceRecorder.php +++ b/includes/Data/Listener/ReferenceRecorder.php @@ -25,7 +25,7 @@ protected $referenceExtractor; /** -* @var MangerGroup +* @var ManagerGroup */ protected $storage; diff --git a/includes/Model/UserTuple.php b/includes/Model/UserTuple.php index 7bdb763..3cd89f7 100644 --- a/includes/Model/UserTuple.php +++ b/includes/Model/UserTuple.php @@ -3,6 +3,7 @@ namespace Flow\Model; use Flow\Exception\CrossWikiException; +use Flow\Exception\FlowException; use User; class UserTuple { diff --git a/includes/api/ApiParsoidUtilsFlow.php b/includes/api/ApiParsoidUtilsFlow.php index 81f6f00..48a970f 100644 --- a/includes/api/ApiParsoidUtilsFlow.php +++ b/includes/api/ApiParsoidUtilsFlow.php @@ -1,7 +1,7 @@ ?php use Flow\Container; -use Flow\Parsoid\Controller; +use Flow\Parsoid\ContentFixer; use Flow\Parsoid\Utils; use Flow\Exception\WikitextException; @@ -16,10 +16,11 @@ } catch ( WikitextException $e ) { $code = $e-getErrorCode(); $this-dieUsage( $this-msg( $code )-inContentLanguage()-useDatabase( false )-plain(), $code ); + return; // helps static analysis know execution does not continue past self::dieUsage } if ( $params['to'] === 'html' ) { - /** @var Controller $contentFixer */ + /** @var ContentFixer $contentFixer */ $contentFixer = Container::get( 'content_fixer' ); $content = $contentFixer-apply( $content, $page-getTitle() ); } -- To view, visit https://gerrit.wikimedia.org/r/165883 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1ef94a1bdab10b11024d5e974b045dcaecf9f47c Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: EBernhardson ebernhard...@wikimedia.org Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Matthias Mullie mmul...@wikimedia.org Gerrit-Reviewer: SG shah...@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] Use mergeMwGlobalArrayValue in AutoLoaderTest::setUp - change (mediawiki/core)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/166760 Change subject: Use mergeMwGlobalArrayValue in AutoLoaderTest::setUp .. Use mergeMwGlobalArrayValue in AutoLoaderTest::setUp Change-Id: Ieb7835855a28d1602ac357b51197cb66d9200209 --- M tests/phpunit/structure/AutoLoaderTest.php 1 file changed, 8 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/60/166760/1 diff --git a/tests/phpunit/structure/AutoLoaderTest.php b/tests/phpunit/structure/AutoLoaderTest.php index 2bdc9c9..9872ead 100644 --- a/tests/phpunit/structure/AutoLoaderTest.php +++ b/tests/phpunit/structure/AutoLoaderTest.php @@ -2,27 +2,22 @@ class AutoLoaderTest extends MediaWikiTestCase { protected function setUp() { - global $wgAutoloadLocalClasses, $wgAutoloadClasses; - parent::setUp(); // Fancy dance to trigger a rebuild of AutoLoader::$autoloadLocalClassesLower - $this-testLocalClasses = array( - 'TestAutoloadedLocalClass' = __DIR__ . '/../data/autoloader/TestAutoloadedLocalClass.php', - 'TestAutoloadedCamlClass' = __DIR__ . '/../data/autoloader/TestAutoloadedCamlClass.php', + $this-mergeMwGlobalArrayValue( 'wgAutoloadLocalClasses',array( + 'TestAutoloadedLocalClass' = + __DIR__ . '/../data/autoloader/TestAutoloadedLocalClass.php', + 'TestAutoloadedCamlClass' = + __DIR__ . '/../data/autoloader/TestAutoloadedCamlClass.php', 'TestAutoloadedSerializedClass' = __DIR__ . '/../data/autoloader/TestAutoloadedSerializedClass.php', - ); - $this-setMwGlobals( - 'wgAutoloadLocalClasses', - $this-testLocalClasses + $wgAutoloadLocalClasses - ); + ) ); AutoLoader::resetAutoloadLocalClassesLower(); - $this-testExtensionClasses = array( + $this-mergeMwGlobalArrayValue( 'wgAutoloadClasses', array( 'TestAutoloadedClass' = __DIR__ . '/../data/autoloader/TestAutoloadedClass.php', - ); - $this-setMwGlobals( 'wgAutoloadClasses', $this-testExtensionClasses + $wgAutoloadClasses ); + ) ); } /** -- To view, visit https://gerrit.wikimedia.org/r/166760 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ieb7835855a28d1602ac357b51197cb66d9200209 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender umherirrender_de...@web.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Integrate DrySite into test metaclass - change (pywikibot/core)
John Vandenberg has uploaded a new change for review. https://gerrit.wikimedia.org/r/166761 Change subject: Integrate DrySite into test metaclass .. Integrate DrySite into test metaclass Change-Id: I64232a8a5b3401b4ee19e97f112a23c28fc6ff92 --- M pywikibot/__init__.py M tests/aspects.py M tests/dry_api_tests.py M tests/dry_site_tests.py M tests/script_tests.py M tests/site_tests.py M tests/textlib_tests.py M tests/utils.py M tests/wikibase_tests.py M tox.ini 10 files changed, 278 insertions(+), 129 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/61/166761/1 diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py index ad0c475..c891bd8 100644 --- a/pywikibot/__init__.py +++ b/pywikibot/__init__.py @@ -546,7 +546,6 @@ # Fallback to config defaults code = code or config.mylang fam = fam or config.family -interface = interface or config.site_interface # config.usernames is initialised with a dict for each family name family_name = str(fam) @@ -556,16 +555,19 @@ sysop = sysop or config.sysopnames[family_name].get(code) \ or config.sysopnames[family_name].get('*') -try: -tmp = __import__('pywikibot.site', fromlist=[interface]) -__Site = getattr(tmp, interface) -except ImportError: -raise ValueError(Invalid interface name '%(interface)s' % locals()) -key = '%s:%s:%s:%s' % (interface, fam, code, user) -if key not in _sites or not isinstance(_sites[key], __Site): -_sites[key] = __Site(code=code, fam=fam, user=user, sysop=sysop) -debug(uInstantiating Site object '%(site)s' -% {'site': _sites[key]}, _logger) +interface = interface or config.site_interface +if not isinstance(interface, type) or not issubclass(interface, pywikibot.site.BaseSite): +try: +tmp = __import__('pywikibot.site', fromlist=[interface]) +interface = getattr(tmp, interface) +except ImportError: +raise ValueError(Invalid interface name '%(interface)s' % locals()) + +key = '%s:%s:%s:%s' % (interface.__name__, fam, code, user) +if key not in _sites or not isinstance(_sites[key], interface): +_sites[key] = interface(code=code, fam=fam, user=user, sysop=sysop) +debug(uInstantiating %s object '%s' + % (interface.__name__, _sites[key]), _logger) return _sites[key] diff --git a/tests/aspects.py b/tests/aspects.py index b7a9b34..1101d10 100644 --- a/tests/aspects.py +++ b/tests/aspects.py @@ -38,6 +38,7 @@ from pywikibot import config, Site from pywikibot.site import BaseSite from pywikibot.family import WikimediaFamily +from pywikibot.data.api import Request as _original_Request import tests from tests import unittest, patch_request, unpatch_request @@ -135,6 +136,39 @@ super(ForceCacheMixin, self).tearDown() unpatch_request() + + +class DisconnectedSiteMixin(TestCaseBase): + +Test cases using a disconnected Site object. + +Do not use this for mock Site objects. + +Never set a class or instance variable called 'site' +As it will prevent tests from executing when invoked as: +$ nosetests -a '!site' -v + + +def setUp(self): +Set up test. +self.old_config_interface = config.site_interface +# TODO: put a dummy subclass into config.site_interface +# as the default, to show a useful error message. +config.site_interface = 'SiteDefinitionError' + +pywikibot.data.api.Request = tests.utils.DryRequest + +if hasattr(self, 'dry_module'): +tests.utils.DryRequest.dry_module = self.dry_module + +super(DisconnectedSiteMixin, self).setUp() + +def tearDown(self): +Tear down test. +super(DisconnectedSiteMixin, self).tearDown() + +config.site_interface = self.old_config_interface +pywikibot.data.api.Request = _original_Request class CacheInfoMixin(object): @@ -317,6 +351,9 @@ } } +if 'dry' in dct and dct['dry'] is True: +dct['net'] = False + if (('sites' not in dct and 'site' not in dct) or ('site' in dct and not dct['site'])): # Prevent use of pywikibot.Site @@ -324,11 +361,11 @@ # If the 'site' attribute is a false value, # remove it so it matches !site in nose. -if 'site' in dct: +if 'site' in dct and not dct['site']: del dct['site'] # If there isn't a site, require declaration of net activity. -if 'net' not in dct: +if 'net' not in dct and 'dry' not in dct: raise Exception( '%s: Test classes without a site configured must set net' % name) @@ -341,6 +378,12 @@
[MediaWiki-commits] [Gerrit] Use /etc/wikimetrics config files for alembic upgrade - change (analytics/wikimetrics)
Mforns has uploaded a new change for review. https://gerrit.wikimedia.org/r/166762 Change subject: Use /etc/wikimetrics config files for alembic upgrade .. Use /etc/wikimetrics config files for alembic upgrade 'alembic upgrade head' was using ./wikimedia/config/ config files for database configuration instead of /etc/wikimetrics/ config files, the ones setup by puppet. ./wikimetrics/run.py provides a way to override local config file paths using environment variables. So the fix hard-sets the env variables to point to /etc/wikimetrics, whenever the puppet config files exist. I know the code doesn't look beautiful, suggestions are welcome! Bug: 64294 Change-Id: I854c57d89c7b80db06ecc98c49a379b4ccc6a247 --- M database_migrations/env.py 1 file changed, 11 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/wikimetrics refs/changes/62/166762/1 diff --git a/database_migrations/env.py b/database_migrations/env.py index eaa1655..1c11dce 100644 --- a/database_migrations/env.py +++ b/database_migrations/env.py @@ -1,9 +1,20 @@ from __future__ import with_statement from copy import deepcopy +from os import environ, path from alembic import context from sqlalchemy import engine_from_config, pool, create_engine from logging.config import fileConfig +# try to link puppet config files to be used by wikimetrics +# this has to be done before importing any module from it +# if file does not exist, default local file will be used +db_config_file = '/etc/wikimetrics/db_config.yaml' +queue_config_file = '/etc/wikimetrics/queue_config.yaml' +if path.isfile(db_config_file): +environ['WIKIMETRICS_DB_CONFIG'] = db_config_file +if path.isfile(queue_config_file): +environ['WIKIMETRICS_QUEUE_CONFIG'] = queue_config_file + from wikimetrics.configurables import db, setup_testing_config # this is the Alembic Config object, which provides -- To view, visit https://gerrit.wikimedia.org/r/166762 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I854c57d89c7b80db06ecc98c49a379b4ccc6a247 Gerrit-PatchSet: 1 Gerrit-Project: analytics/wikimetrics Gerrit-Branch: master Gerrit-Owner: Mforns mfo...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] QA: alphabetize steps properly - change (mediawiki...Flow)
Cmcmahon has uploaded a new change for review. https://gerrit.wikimedia.org/r/166763 Change subject: QA: alphabetize steps properly .. QA: alphabetize steps properly This is an interim step. The next move is to update all the assertions to use modern RSpec syntax. Change-Id: I314db3d81ebcda1a576ef8c9859cecd67667c958 --- M tests/browser/features/step_definitions/lock_unlock_topics_steps.rb 1 file changed, 29 insertions(+), 29 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/63/166763/1 diff --git a/tests/browser/features/step_definitions/lock_unlock_topics_steps.rb b/tests/browser/features/step_definitions/lock_unlock_topics_steps.rb index c6f3da0..fbc482d 100644 --- a/tests/browser/features/step_definitions/lock_unlock_topics_steps.rb +++ b/tests/browser/features/step_definitions/lock_unlock_topics_steps.rb @@ -1,10 +1,3 @@ -Given(/^the top post has been locked$/) do - step 'I click the Topic Actions link' - step 'I click the Lock topic button' - step 'I type This is a bikeshed as the reason' - step 'I submit the lock/unlock topic form' -end - Given(/^I click the Lock topic button$/) do on(FlowPage).topic_lock_button_element.when_present.click end @@ -13,12 +6,11 @@ on(FlowPage).topic_unlock_button_element.when_present.click end -When(/^I type (.*?) as the reason$/) do |reason| - on(FlowPage).topic_lock_form_reason_element.when_present.clear() - # Focus textarea so that any menus that have been clicked lose their focus. In Chrome these might disrupt the test as - # elements may be masked and not clickable. - on(FlowPage).topic_lock_form_reason_element.click - on(FlowPage).topic_lock_form_reason_element.send_keys(reason) +Given(/^the top post has been locked$/) do + step 'I click the Topic Actions link' + step 'I click the Lock topic button' + step 'I type This is a bikeshed as the reason' + step 'I submit the lock/unlock topic form' end When(/^I cancel the lock\/unlock topic form$/) do @@ -32,31 +24,39 @@ end end -Then(/^the top post is a locked discussion$/) do - on(FlowPage).flow_first_topic_moderation_msg_element.when_present.should be_visible -end - -Then(/^the top post is an open discussion$/) do - on(FlowPage).flow_first_topic_moderation_msg_element.when_not_present -end - -Then(/^the reason of the first topic is (.*?)$/) do |text| - on(FlowPage).flow_reason_element.text.should match text -end - -Then(/^I expand the top post$/) do - on(FlowPage).flow_first_topic_heading_element.when_present.click +When(/^I type (.*?) as the reason$/) do |reason| + on(FlowPage).topic_lock_form_reason_element.when_present.clear() + # Focus textarea so that any menus that have been clicked lose their focus. In Chrome these might disrupt the test as + # elements may be masked and not clickable. + on(FlowPage).topic_lock_form_reason_element.click + on(FlowPage).topic_lock_form_reason_element.send_keys(reason) end Then(/^I do not see the lock\/unlock form$/) do on(FlowPage).topic_lock_form_element.when_not_present end -Then(/^the original message for the top post has no reply link$/) do - on(FlowPage).flow_first_topic_original_post_reply_element.should_not exist + +Then(/^I expand the top post$/) do + on(FlowPage).flow_first_topic_heading_element.when_present.click end Then(/the original message for the top post has no edit link$/) do on(FlowPage).flow_first_topic_original_post_edit_element.should_not exist end +Then(/^the original message for the top post has no reply link$/) do + on(FlowPage).flow_first_topic_original_post_reply_element.should_not exist +end + +Then(/^the reason of the first topic is (.*?)$/) do |text| + on(FlowPage).flow_reason_element.text.should match text +end + +Then(/^the top post is a locked discussion$/) do + on(FlowPage).flow_first_topic_moderation_msg_element.when_present.should be_visible +end + +Then(/^the top post is an open discussion$/) do + on(FlowPage).flow_first_topic_moderation_msg_element.when_not_present +end \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/166763 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I314db3d81ebcda1a576ef8c9859cecd67667c958 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Cmcmahon cmcma...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Hygiene: Clean up undefined method static inspection warnings - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Hygiene: Clean up undefined method static inspection warnings .. Hygiene: Clean up undefined method static inspection warnings There were approximatly 113 undefined method warnings, mostly stemming from direct use of the Container object. The original intention was for Container not to be accessed directly and for all these types to be checked in the constructor, but we have fallen off that train atm. This patch adjusts many different uses of the container to put the value being fetched into a variable and annotate that variable with its type. There are still ~60 more undefined method warnings, but this patch is a good start to cleaning them up. Change-Id: I0d75c84d45ff99945f4c2a0a1df7834f0bda83cc --- M includes/Actions/Action.php M includes/Block/Block.php M includes/Block/BoardHistory.php M includes/Block/Header.php M includes/Block/TopicList.php M includes/Block/TopicSummary.php M includes/Content/BoardContent.php M includes/Content/Content.php M includes/Data/Listener/OccupationListener.php M includes/Formatter/AbstractFormatter.php M includes/Formatter/TopicListQuery.php M includes/Parsoid/Extractor/ImageExtractor.php M includes/Parsoid/Utils.php M includes/SpecialFlow.php M includes/TemplateHelper.php M includes/api/ApiFlowBase.php M includes/api/ApiQueryFlow.php 17 files changed, 147 insertions(+), 51 deletions(-) Approvals: Matthias Mullie: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Actions/Action.php b/includes/Actions/Action.php index 9ed52af..faaf96e 100644 --- a/includes/Actions/Action.php +++ b/includes/Actions/Action.php @@ -6,10 +6,13 @@ use Article; use ErrorPageError; use Flow\Container; +use Flow\Data\ManagerGroup; use Flow\Exception\FlowException; use Flow\Exception\InvalidInputException; +use Flow\Model\Workflow; use Flow\Model\UUID; use Flow\View; +use Flow\WorkflowLoaderFactory; use IContextSource; use OutputPage; use Page; @@ -41,7 +44,7 @@ */ public function showForAction( $action, OutputPage $output = null ) { $container = Container::getContainer(); - $occupationController = $container['occupation_controller']; + $occupationController = \FlowHooks::getOccupationController(); if ( $output === null ) { $output = $this-context-getOutput(); @@ -71,8 +74,9 @@ $action = $request-getVal( 'action', 'view' ); try { - $loader = $container['factory.loader.workflow'] - -createWorkflowLoader( $title, UUID::create( $workflowId ) ); + /** @var WorkflowLoaderFactory $factory */ + $factory = $container['factory.loader.workflow']; + $loader = $factory-createWorkflowLoader( $title, UUID::create( $workflowId ) ); if ( $title-getNamespace() === NS_TOPIC $loader-getWorkflow()-getType() !== 'topic' ) { // @todo better error handling @@ -88,7 +92,9 @@ } catch ( InvalidInputException $e ) { if ( $workflowId ) { // Check if it's the wrong title, redirect to correct one + /** @var ManagerGroup $storage */ $storage = $container['storage']; + /** @var Workflow $workflow */ $workflow = $storage-get( 'Workflow', $workflowId ); if ( diff --git a/includes/Block/Block.php b/includes/Block/Block.php index 3bf6a78..a521aba 100644 --- a/includes/Block/Block.php +++ b/includes/Block/Block.php @@ -2,16 +2,16 @@ namespace Flow\Block; +use Flow\Container; +use Flow\Data\ManagerGroup; use Flow\Exception\InvalidInputException; +use Flow\FlowActions; +use Flow\Model\AbstractRevision; use Flow\Model\UUID; use Flow\Model\Workflow; -use Flow\Data\ManagerGroup; use Flow\SpamFilter\Controller as SpamFilterController; use Flow\Templating; -use Flow\Model\AbstractRevision; -use Flow\Container; use User; - interface Block { /** @@ -236,7 +236,9 @@ */ public function getActionName( $action ) { // BC for renamed actions - $alias = Container::get( 'flow_actions' )-getValue( $action ); + /** @var FlowActions $actions */ + $actions = Container::get( 'flow_actions' ); + $alias = $actions-getValue( $action ); if ( is_string( $alias ) ) { // All proper actions return arrays, but aliases return a string $action = $alias; diff --git a/includes/Block/BoardHistory.php b/includes/Block/BoardHistory.php index 7986d11..251f835 100644 ---
[MediaWiki-commits] [Gerrit] Categories: Pad category id number for sorting - change (mediawiki...ContentTranslation)
Jsahleen has uploaded a new change for review. https://gerrit.wikimedia.org/r/166764 Change subject: Categories: Pad category id number for sorting .. Categories: Pad category id number for sorting * Pads the number used for category id so sorting works properly Bug: 6 Change-Id: I5f42305d85bd5c8e4bdf4d5b2c67b215a6c145ff --- M modules/tools/ext.cx.tools.categories.js 1 file changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/64/166764/1 diff --git a/modules/tools/ext.cx.tools.categories.js b/modules/tools/ext.cx.tools.categories.js index 226a5cf..e1f6ec0 100644 --- a/modules/tools/ext.cx.tools.categories.js +++ b/modules/tools/ext.cx.tools.categories.js @@ -399,8 +399,11 @@ data = response.query.pages[ pageId ].categories; if ( data ) { $.each( data, function ( index, value ) { - var key; - key = 'cx-category-' + index; + var id, key; + // pad the index to make the id (for sorting purposes) + id = index + ''; + id = id.length = 3 ? id : new Array( 3 - id.length + 1 ).join( '0' ) + id; + key = 'cx-category-' + id; categories[ key ] = value.title; } ); } -- To view, visit https://gerrit.wikimedia.org/r/166764 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5f42305d85bd5c8e4bdf4d5b2c67b215a6c145ff Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Jsahleen jsahl...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Set a maximum height to auto-expanding text fields - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Set a maximum height to auto-expanding text fields .. Set a maximum height to auto-expanding text fields Limit the height of an auto-expanding text field such that the buttons below the textarea do not scroll off-screen. Bug: 58657 Change-Id: I3fbed3f7764a8331cdfc313dfdaa781340032ab5 --- M modules/editor/editors/ext.flow.editors.none.js 1 file changed, 27 insertions(+), 8 deletions(-) Approvals: SG: Looks good to me, but someone else must approve Matthias Mullie: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/editor/editors/ext.flow.editors.none.js b/modules/editor/editors/ext.flow.editors.none.js index 6bdca84..e40eb96 100644 --- a/modules/editor/editors/ext.flow.editors.none.js +++ b/modules/editor/editors/ext.flow.editors.none.js @@ -49,9 +49,10 @@ * @param {int} [animationTime] Time in milliseconds to animate to new height. */ mw.flow.editors.none.prototype.autoExpand = function( animationTime ) { - var height = $( this ).height(), - padding = $( this ).outerHeight() - $( this ).height(), - scrollHeight; + var scrollHeight, $form, formBottom, windowBottom, maxHeightIncrease, + $this = $( this ), + height = $this.height(), + padding = $this.outerHeight() - $this.height() + 5; // if not specified, default animation time = 50 if ( typeof animationTime !== 'number' ) { @@ -67,16 +68,34 @@ * Since we're looking to also shrink the textarea when content shrinks, * we want to ignore that last case (hence the collapsing) */ - $( this ).height( 0 ); - scrollHeight = this.scrollHeight - padding; - $( this ).height( height ); + $this.height( 0 ); + scrollHeight = this.scrollHeight; + $this.height( height ); /* * Only animate height change if there actually is a change; we don't * want every keystroke firing a 50ms animation. */ - if ( scrollHeight !== $( this ).height() ) { - $( this ).animate( { height: scrollHeight + padding }, animationTime ); + if ( scrollHeight === $this.data( 'flow-prev-scroll-height' ) ) { + // no change + return; + } + $this.data( 'flow-prev-scroll-height', scrollHeight ); + + $form = $this.closest( 'form' ); + formBottom = $form.offset().top + $form.outerHeight( true ); + windowBottom = $( window ).scrollTop() + $( window ).height(); + // additional padding of 20px so the targeted form has breathing room + maxHeightIncrease = windowBottom - formBottom - 20; + + if ( scrollHeight - height - padding = maxHeightIncrease ) { + // If we can't expand ensure overflow-y is set to auto + $this.css( 'overflow-y', 'auto' ); + } else if ( scrollHeight !== $this.height() ) { + $this.css( { + height: scrollHeight, + 'overflow-y': 'hidden' + } ); } }; -- To view, visit https://gerrit.wikimedia.org/r/162363 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3fbed3f7764a8331cdfc313dfdaa781340032ab5 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: EBernhardson ebernhard...@wikimedia.org Gerrit-Reviewer: EBernhardson ebernhard...@wikimedia.org Gerrit-Reviewer: Jackmcbarn jackmcb...@gmail.com Gerrit-Reviewer: Matthias Mullie mmul...@wikimedia.org Gerrit-Reviewer: SG shah...@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] QA: alphabetize steps properly - change (mediawiki...Flow)
Cmcmahon has submitted this change and it was merged. Change subject: QA: alphabetize steps properly .. QA: alphabetize steps properly This is an interim step. The next move is to update all the assertions to use modern RSpec syntax. Change-Id: I314db3d81ebcda1a576ef8c9859cecd67667c958 --- M tests/browser/features/step_definitions/lock_unlock_topics_steps.rb 1 file changed, 29 insertions(+), 29 deletions(-) Approvals: Cmcmahon: Looks good to me, approved diff --git a/tests/browser/features/step_definitions/lock_unlock_topics_steps.rb b/tests/browser/features/step_definitions/lock_unlock_topics_steps.rb index c6f3da0..fbc482d 100644 --- a/tests/browser/features/step_definitions/lock_unlock_topics_steps.rb +++ b/tests/browser/features/step_definitions/lock_unlock_topics_steps.rb @@ -1,10 +1,3 @@ -Given(/^the top post has been locked$/) do - step 'I click the Topic Actions link' - step 'I click the Lock topic button' - step 'I type This is a bikeshed as the reason' - step 'I submit the lock/unlock topic form' -end - Given(/^I click the Lock topic button$/) do on(FlowPage).topic_lock_button_element.when_present.click end @@ -13,12 +6,11 @@ on(FlowPage).topic_unlock_button_element.when_present.click end -When(/^I type (.*?) as the reason$/) do |reason| - on(FlowPage).topic_lock_form_reason_element.when_present.clear() - # Focus textarea so that any menus that have been clicked lose their focus. In Chrome these might disrupt the test as - # elements may be masked and not clickable. - on(FlowPage).topic_lock_form_reason_element.click - on(FlowPage).topic_lock_form_reason_element.send_keys(reason) +Given(/^the top post has been locked$/) do + step 'I click the Topic Actions link' + step 'I click the Lock topic button' + step 'I type This is a bikeshed as the reason' + step 'I submit the lock/unlock topic form' end When(/^I cancel the lock\/unlock topic form$/) do @@ -32,31 +24,39 @@ end end -Then(/^the top post is a locked discussion$/) do - on(FlowPage).flow_first_topic_moderation_msg_element.when_present.should be_visible -end - -Then(/^the top post is an open discussion$/) do - on(FlowPage).flow_first_topic_moderation_msg_element.when_not_present -end - -Then(/^the reason of the first topic is (.*?)$/) do |text| - on(FlowPage).flow_reason_element.text.should match text -end - -Then(/^I expand the top post$/) do - on(FlowPage).flow_first_topic_heading_element.when_present.click +When(/^I type (.*?) as the reason$/) do |reason| + on(FlowPage).topic_lock_form_reason_element.when_present.clear() + # Focus textarea so that any menus that have been clicked lose their focus. In Chrome these might disrupt the test as + # elements may be masked and not clickable. + on(FlowPage).topic_lock_form_reason_element.click + on(FlowPage).topic_lock_form_reason_element.send_keys(reason) end Then(/^I do not see the lock\/unlock form$/) do on(FlowPage).topic_lock_form_element.when_not_present end -Then(/^the original message for the top post has no reply link$/) do - on(FlowPage).flow_first_topic_original_post_reply_element.should_not exist + +Then(/^I expand the top post$/) do + on(FlowPage).flow_first_topic_heading_element.when_present.click end Then(/the original message for the top post has no edit link$/) do on(FlowPage).flow_first_topic_original_post_edit_element.should_not exist end +Then(/^the original message for the top post has no reply link$/) do + on(FlowPage).flow_first_topic_original_post_reply_element.should_not exist +end + +Then(/^the reason of the first topic is (.*?)$/) do |text| + on(FlowPage).flow_reason_element.text.should match text +end + +Then(/^the top post is a locked discussion$/) do + on(FlowPage).flow_first_topic_moderation_msg_element.when_present.should be_visible +end + +Then(/^the top post is an open discussion$/) do + on(FlowPage).flow_first_topic_moderation_msg_element.when_not_present +end \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/166763 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I314db3d81ebcda1a576ef8c9859cecd67667c958 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Cmcmahon cmcma...@wikimedia.org Gerrit-Reviewer: Cmcmahon cmcma...@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 /etc/wikimetrics config files for alembic upgrade - change (analytics/wikimetrics)
Milimetric has submitted this change and it was merged. Change subject: Use /etc/wikimetrics config files for alembic upgrade .. Use /etc/wikimetrics config files for alembic upgrade 'alembic upgrade head' was using ./wikimedia/config/ config files for database configuration instead of /etc/wikimetrics/ config files, the ones setup by puppet. ./wikimetrics/run.py provides a way to override local config file paths using environment variables. So the fix hard-sets the env variables to point to /etc/wikimetrics, whenever the puppet config files exist. I know the code doesn't look beautiful, suggestions are welcome! Bug: 64294 Change-Id: I854c57d89c7b80db06ecc98c49a379b4ccc6a247 --- M database_migrations/env.py 1 file changed, 11 insertions(+), 0 deletions(-) Approvals: Milimetric: Looks good to me, approved jenkins-bot: Verified diff --git a/database_migrations/env.py b/database_migrations/env.py index eaa1655..1c11dce 100644 --- a/database_migrations/env.py +++ b/database_migrations/env.py @@ -1,9 +1,20 @@ from __future__ import with_statement from copy import deepcopy +from os import environ, path from alembic import context from sqlalchemy import engine_from_config, pool, create_engine from logging.config import fileConfig +# try to link puppet config files to be used by wikimetrics +# this has to be done before importing any module from it +# if file does not exist, default local file will be used +db_config_file = '/etc/wikimetrics/db_config.yaml' +queue_config_file = '/etc/wikimetrics/queue_config.yaml' +if path.isfile(db_config_file): +environ['WIKIMETRICS_DB_CONFIG'] = db_config_file +if path.isfile(queue_config_file): +environ['WIKIMETRICS_QUEUE_CONFIG'] = queue_config_file + from wikimetrics.configurables import db, setup_testing_config # this is the Alembic Config object, which provides -- To view, visit https://gerrit.wikimedia.org/r/166762 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I854c57d89c7b80db06ecc98c49a379b4ccc6a247 Gerrit-PatchSet: 1 Gerrit-Project: analytics/wikimetrics Gerrit-Branch: master Gerrit-Owner: Mforns mfo...@wikimedia.org Gerrit-Reviewer: Milimetric dandree...@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] Fix theme on mobile-dist - change (VisualEditor/VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Fix theme on mobile-dist .. Fix theme on mobile-dist Mobile was moved form minerva to MW, but not mobile-dist. Change-Id: I914a66ea57d07185517ca1bf3d578074d146dcb5 --- M build/modules.json M demos/ve/mobile-dist.html 2 files changed, 6 insertions(+), 17 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/build/modules.json b/build/modules.json index 82fbba9..49ddd85 100644 --- a/build/modules.json +++ b/build/modules.json @@ -46,17 +46,6 @@ oojs-ui ] }, - oojs-ui-minerva: { - scripts: [ - lib/oojs-ui/oojs-ui-minerva.js - ], - styles: [ - lib/oojs-ui/oojs-ui-minerva.svg.css - ], - dependencies: [ - oojs-ui - ] - }, oojs-ui-mediawiki: { scripts: [ lib/oojs-ui/oojs-ui-mediawiki.js @@ -596,7 +585,7 @@ ], dependencies: [ baselibs, - oojs-ui-minerva, + oojs-ui-mediawiki, visualEditor.dist, visualEditor.standalone.demo ] diff --git a/demos/ve/mobile-dist.html b/demos/ve/mobile-dist.html index d90d02e..6269318 100644 --- a/demos/ve/mobile-dist.html +++ b/demos/ve/mobile-dist.html @@ -12,9 +12,9 @@ meta name=viewport content=initial-scale=1.0, user-scalable=no / titleVisualEditor Standalone Demo/title - !-- oojs-ui-minerva -- - link rel=stylesheet href=../../lib/oojs-ui/oojs-ui-minerva.svg.css class=stylesheet-ltr - link rel=stylesheet href=../../lib/oojs-ui/oojs-ui-minerva.svg.rtl.css class=stylesheet-rtl disabled + !-- oojs-ui-mediawiki -- + link rel=stylesheet href=../../lib/oojs-ui/oojs-ui-mediawiki.svg.css class=stylesheet-ltr + link rel=stylesheet href=../../lib/oojs-ui/oojs-ui-mediawiki.svg.rtl.css class=stylesheet-rtl disabled !-- visualEditor.dist -- link rel=stylesheet href=../../dist/visualEditor.css class=stylesheet-ltr @@ -68,8 +68,8 @@ script src=../../lib/jquery.uls/src/jquery.uls.data.js/script script src=../../lib/jquery.uls/src/jquery.uls.data.utils.js/script - !-- oojs-ui-minerva -- - script src=../../lib/oojs-ui/oojs-ui-minerva.js/script + !-- oojs-ui-mediawiki -- + script src=../../lib/oojs-ui/oojs-ui-mediawiki.js/script !-- visualEditor.dist -- script src=../../dist/visualEditor.js/script -- To view, visit https://gerrit.wikimedia.org/r/166737 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I914a66ea57d07185517ca1bf3d578074d146dcb5 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders esand...@wikimedia.org Gerrit-Reviewer: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] QA: update RSpec assertions for modern syntax - change (mediawiki...Flow)
Cmcmahon has uploaded a new change for review. https://gerrit.wikimedia.org/r/166767 Change subject: QA: update RSpec assertions for modern syntax .. QA: update RSpec assertions for modern syntax Also add assertions properly to Then steps Change-Id: I12a6b73d9dec7c81187ae8a0ec34bc1fde465ace --- M tests/browser/features/step_definitions/lock_unlock_topics_steps.rb 1 file changed, 16 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/67/166767/1 diff --git a/tests/browser/features/step_definitions/lock_unlock_topics_steps.rb b/tests/browser/features/step_definitions/lock_unlock_topics_steps.rb index fbc482d..bf3d347 100644 --- a/tests/browser/features/step_definitions/lock_unlock_topics_steps.rb +++ b/tests/browser/features/step_definitions/lock_unlock_topics_steps.rb @@ -17,6 +17,10 @@ on(FlowPage).topic_lock_form_cancel_button_element.when_present.click end +When(/^I expand the top post$/) do + on(FlowPage).flow_first_topic_heading_element.when_present.click +end + When(/^I submit the lock\/unlock topic form$/) do on(FlowPage) do |page| page.topic_lock_form_lock_button_element.when_present.click @@ -33,30 +37,31 @@ end Then(/^I do not see the lock\/unlock form$/) do - on(FlowPage).topic_lock_form_element.when_not_present -end - - -Then(/^I expand the top post$/) do - on(FlowPage).flow_first_topic_heading_element.when_present.click + on(FlowPage) do |page| +page.topic_lock_form_element.when_not_present +expect(page.topic_lock_form_element).not_to be_visible + end end Then(/the original message for the top post has no edit link$/) do - on(FlowPage).flow_first_topic_original_post_edit_element.should_not exist + expect(on(FlowPage).flow_first_topic_original_post_edit_element).not_to be_visible end Then(/^the original message for the top post has no reply link$/) do - on(FlowPage).flow_first_topic_original_post_reply_element.should_not exist + expect(on(FlowPage).flow_first_topic_original_post_reply_element).not_to be_visible end Then(/^the reason of the first topic is (.*?)$/) do |text| - on(FlowPage).flow_reason_element.text.should match text + expect(on(FlowPage).flow_reason_element.text).to match text end Then(/^the top post is a locked discussion$/) do - on(FlowPage).flow_first_topic_moderation_msg_element.when_present.should be_visible + expect(on(FlowPage).flow_first_topic_moderation_msg_element.when_present).to be_visible end Then(/^the top post is an open discussion$/) do - on(FlowPage).flow_first_topic_moderation_msg_element.when_not_present + on(FlowPage) do |page| +page.flow_first_topic_moderation_msg_element.when_not_present +expect(page.flow_first_topic_moderation_msg_element).not_to be_visible + end end \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/166767 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I12a6b73d9dec7c81187ae8a0ec34bc1fde465ace Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Cmcmahon cmcma...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Allow tools to specify which selection types they support - change (VisualEditor/VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/166768 Change subject: Allow tools to specify which selection types they support .. Allow tools to specify which selection types they support Change-Id: I3adb071b04461f630d1e2f66f3c141f297a3b91e --- M src/ui/tools/ve.ui.AnnotationTool.js M src/ui/tools/ve.ui.ClearAnnotationTool.js M src/ui/tools/ve.ui.FormatTool.js M src/ui/tools/ve.ui.IndentationTool.js M src/ui/tools/ve.ui.InspectorTool.js M src/ui/tools/ve.ui.ListTool.js M src/ui/ve.ui.Tool.js 7 files changed, 16 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/68/166768/1 diff --git a/src/ui/tools/ve.ui.AnnotationTool.js b/src/ui/tools/ve.ui.AnnotationTool.js index c9b4903..c758abc 100644 --- a/src/ui/tools/ve.ui.AnnotationTool.js +++ b/src/ui/tools/ve.ui.AnnotationTool.js @@ -35,7 +35,7 @@ */ ve.ui.AnnotationTool.static.annotation = { name: '' }; -ve.ui.AnnotationTool.static.requiresRange = true; +ve.ui.AnnotationTool.static.requiresSelection = [ 'linear' ]; ve.ui.AnnotationTool.static.deactivateOnSelect = false; diff --git a/src/ui/tools/ve.ui.ClearAnnotationTool.js b/src/ui/tools/ve.ui.ClearAnnotationTool.js index 494bc64..9ea0a25 100644 --- a/src/ui/tools/ve.ui.ClearAnnotationTool.js +++ b/src/ui/tools/ve.ui.ClearAnnotationTool.js @@ -36,7 +36,7 @@ ve.ui.ClearAnnotationTool.static.title = OO.ui.deferMsg( 'visualeditor-clearbutton-tooltip' ); -ve.ui.ClearAnnotationTool.static.requiresRange = true; +ve.ui.ClearAnnotationTool.static.requiresSelection = [ 'linear' ]; ve.ui.ClearAnnotationTool.static.commandName = 'clear'; diff --git a/src/ui/tools/ve.ui.FormatTool.js b/src/ui/tools/ve.ui.FormatTool.js index 7f6059f..5bbbfc7 100644 --- a/src/ui/tools/ve.ui.FormatTool.js +++ b/src/ui/tools/ve.ui.FormatTool.js @@ -40,7 +40,7 @@ */ ve.ui.FormatTool.static.format = null; -ve.ui.FormatTool.static.requiresRange = true; +ve.ui.FormatTool.static.requiresSelection = [ 'linear' ]; /* Methods */ diff --git a/src/ui/tools/ve.ui.IndentationTool.js b/src/ui/tools/ve.ui.IndentationTool.js index e9e6fe1..d65883e 100644 --- a/src/ui/tools/ve.ui.IndentationTool.js +++ b/src/ui/tools/ve.ui.IndentationTool.js @@ -25,7 +25,7 @@ /* Static Properties */ -ve.ui.IndentationTool.static.requiresRange = true; +ve.ui.IndentationTool.static.requiresSelection = [ 'linear' ]; /* Methods */ diff --git a/src/ui/tools/ve.ui.InspectorTool.js b/src/ui/tools/ve.ui.InspectorTool.js index d3444e9..bd60083 100644 --- a/src/ui/tools/ve.ui.InspectorTool.js +++ b/src/ui/tools/ve.ui.InspectorTool.js @@ -36,7 +36,7 @@ */ ve.ui.InspectorTool.static.modelClasses = []; -ve.ui.InspectorTool.static.requiresRange = true; +ve.ui.InspectorTool.static.requiresSelection = [ 'linear' ]; ve.ui.InspectorTool.static.deactivateOnSelect = false; diff --git a/src/ui/tools/ve.ui.ListTool.js b/src/ui/tools/ve.ui.ListTool.js index d122267..b87aa82 100644 --- a/src/ui/tools/ve.ui.ListTool.js +++ b/src/ui/tools/ve.ui.ListTool.js @@ -38,7 +38,7 @@ */ ve.ui.ListTool.static.style = ''; -ve.ui.ListTool.static.requiresRange = true; +ve.ui.ListTool.static.requiresSelection = [ 'linear' ]; ve.ui.ListTool.static.deactivateOnSelect = false; diff --git a/src/ui/ve.ui.Tool.js b/src/ui/ve.ui.Tool.js index 1d553d2..ed6b4e6 100644 --- a/src/ui/ve.ui.Tool.js +++ b/src/ui/ve.ui.Tool.js @@ -27,10 +27,13 @@ /* Static Properties */ /** - * This tool requires this surface to be focused to work - * @type {boolean} + * Selection types this tool requires. + * + * If the tool doesn't require a specific selection type, use null. + * + * @type {string[]|null} */ -ve.ui.Tool.static.requiresRange = false; +ve.ui.Tool.static.requiresSelection = null; /** * Command to execute when tool is selected. @@ -72,7 +75,10 @@ * @param {Object} direction Context direction with 'inline' 'block' properties */ ve.ui.Tool.prototype.onUpdateState = function ( fragment ) { - this.setDisabled( this.constructor.static.requiresRange fragment.isNull() ); + this.setDisabled( + this.constructor.static.requiresSelection + ve.indexOf( fragment.getSelection().constructor.static.name, this.constructor.static.requiresSelection ) === -1 + ); }; /** -- To view, visit https://gerrit.wikimedia.org/r/166768 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3adb071b04461f630d1e2f66f3c141f297a3b91e Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders esand...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make PrefixSearchTest use MediaWikiLangTestCase - change (mediawiki/core)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/166769 Change subject: Make PrefixSearchTest use MediaWikiLangTestCase .. Make PrefixSearchTest use MediaWikiLangTestCase It uses namespaces which depends on the content language Change-Id: I0a1ef4adea1e1ddff32e37cbbd8cf51a3398905b --- M tests/phpunit/includes/PrefixSearchTest.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/69/166769/1 diff --git a/tests/phpunit/includes/PrefixSearchTest.php b/tests/phpunit/includes/PrefixSearchTest.php index 5390dba..dd243b7 100644 --- a/tests/phpunit/includes/PrefixSearchTest.php +++ b/tests/phpunit/includes/PrefixSearchTest.php @@ -3,7 +3,7 @@ * @group Search * @group Database */ -class PrefixSearchTest extends MediaWikiTestCase { +class PrefixSearchTest extends MediaWikiLangTestCase { protected function setUp() { parent::setUp(); -- To view, visit https://gerrit.wikimedia.org/r/166769 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0a1ef4adea1e1ddff32e37cbbd8cf51a3398905b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender umherirrender_de...@web.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits