This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new ebcfdff Eliminate variables only used once
ebcfdff is described below
commit ebcfdff1106911c120901e2644ce3e14e2d514c9
Author: Sebb <[email protected]>
AuthorDate: Tue Jul 7 17:05:07 2020 +0100
Eliminate variables only used once
---
www/roster/views/actions/memstat.json.rb | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/www/roster/views/actions/memstat.json.rb
b/www/roster/views/actions/memstat.json.rb
index 8aa6bc1..9d86373 100644
--- a/www/roster/views/actions/memstat.json.rb
+++ b/www/roster/views/actions/memstat.json.rb
@@ -13,11 +13,8 @@ members_txt = ASF::SVN.svnpath!('foundation',
'members.txt').untaint
# construct commit message
message = "Action #{@action} for #{USERID}"
-# only update members if needed
-updmem = @action == 'emeritus' or @action == 'active' or @action == 'deceased'
-
# update members.txt only for secretary actions
-if updmem
+if @action == 'emeritus' or @action == 'active' or @action == 'deceased'
ASF::SVN.multiUpdate_ members_txt, message, env, _ do |text|
# remove user's entry
unless text.sub! entry, '' # e.g. if the workspace was out of date
@@ -64,9 +61,8 @@ if @action == 'rescind_emeritus'
ASF::SVN.svn_('mv', [@emeritusfileurl, emeritus_rescinded_url], _, {env:env,
msg:message})
elsif @action == 'request_emeritus'
# Create mail to secretary requesting emeritus
- EMERITUS_TEMPLATE_URL = ASF::SVN.svnpath!('foundation',
'emeritus-request.txt').untaint
template, err =
- ASF::SVN.svn('cat', EMERITUS_TEMPLATE_URL, {env:env})
+ ASF::SVN.svn('cat', ASF::SVN.svnpath!('foundation',
'emeritus-request.txt').untaint, {env:env})
raise RuntimeError.new("Failed to read emeritus-request.txt: " + err) unless
template
centered_id = "#{USERID}".center(55, '_')
centered_name = "#{USERNAME}".center(55, '_')