You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by cl...@apache.org on 2018/01/28 06:50:50 UTC
[whimsy] branch master updated: fix mock parameter handling
This is an automated email from the ASF dual-hosted git repository.
clr 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 eb7fff8 fix mock parameter handling
eb7fff8 is described below
commit eb7fff88e1992ef987dcbe89c52c2a96995821bf
Author: Craig L Russell <cr...@oracle.com>
AuthorDate: Sat Jan 27 22:50:41 2018 -0800
fix mock parameter handling
---
www/project/icla/main.rb | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/www/project/icla/main.rb b/www/project/icla/main.rb
index 219d697..f538987 100755
--- a/www/project/icla/main.rb
+++ b/www/project/icla/main.rb
@@ -56,7 +56,7 @@ helpers do
def getMember(userId)
user = ASF::Person.find(userId)
mockId = params['mock']
- if ASF::Person.find(mockId) != nil
+ if ASF::Person[mockId] != nil
# if mock is set, set member to mock value
return mockId
else
@@ -67,7 +67,7 @@ end
@phase = ''
@progress = ''
-
+@extra = ''
#
# Sinatra routes
#
@@ -75,12 +75,14 @@ end
get '/' do
@token = params['token']
+ @mock = params['mock']
+ @extra = "&mock=" + @mock if @mock
loadProgress(@token) if @token
@phase = @progress['phase'] if @progress
if @phase == 'discuss'
- redirect to("/discuss?token=" + @token)
+ redirect to("/discuss?token=" + @token + @extra)
elsif @phase == 'vote'
- redirect to("/vote?token=" + @token)
+ redirect to("/vote?token=" + @token + @extra)
else
redirect to("/invite")
end
--
To stop receiving notification emails like this one, please contact
clr@apache.org.