result = putway(renumberednodes, *args)
result[4] = renumberednodes.reject { |k, _v| orn.key?(k) }
renumberedways[result[2]] = result[3] if result[0].zero? && result[2] != result[3]
- when "putrelation" then
+ when "putrelation"
result = putrelation(renumberednodes, renumberedways, *args)
- when "deleteway" then
+ when "deleteway"
result = deleteway(*args)
when "putpoi" then
result = putpoi(*args)
renumberednodes[result[2]] = result[3] if result[0].zero? && result[2] != result[3]
- when "startchangeset" then
+ when "startchangeset"
result = startchangeset(*args)
end
def default_assigned_role
case issue_params[:reportable_type]
- when "Note" then "moderator"
- when "User" then case report_params[:category]
- when "vandal" then "moderator"
- else "administrator"
- end
- else "administrator"
+ when "Note"
+ "moderator"
+ when "User"
+ case report_params[:category]
+ when "vandal" then "moderator"
+ else "administrator"
+ end
+ else
+ "administrator"
end
end
end
if user
case user.status
- when "pending" then
+ when "pending"
unconfirmed_login(user)
- when "active", "confirmed" then
+ when "active", "confirmed"
successful_login(user, request.env["omniauth.params"]["referer"])
- when "suspended" then
+ when "suspended"
failed_login t("users.login.account is suspended", :webmaster => "mailto:#{Settings.support_email}").html_safe
else
failed_login t("users.login.auth failure")
# Return eight-byte double-precision float
def self.getdouble(s)
- a = s.read(8).unpack("G") # G big-endian, E little-endian
+ a = s.read(8).unpack("G") # G big-endian, E little-endian
a[0]
end