Skip to content

Commit

Permalink
Fixed redirect to ssl with query params
Browse files Browse the repository at this point in the history
  • Loading branch information
gaspard committed Sep 22, 2013
1 parent 7f40dbc commit de88e14
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/views/columns/create.rjs
@@ -1,6 +1,6 @@
if @column.errors.empty?
page.insert_html :before, 'add_column', :partial=>'columns/li', :collection=>[@column]
@column = Column.new(:role_id => @column.role_id, :ptype => @column.ptype)
@column = Column.new(:role_id => @column.role_id, :ptype => @column.ptype, :versioned => true)
page.replace_html 'add_column_form', :partial=>'columns/form'
page << "$('column_name').focus();"
else
Expand Down
4 changes: 2 additions & 2 deletions lib/zena/use/authlogic.rb
Expand Up @@ -136,9 +136,9 @@ def force_authentication?
def redirect_to_https
if current_site.ssl_on_auth
if !ssl_request? && !visitor.is_anon? && !local_request?
redirect_to :protocol => "https://"
redirect_to({:protocol => 'https'}.merge(params), :flash => flash)
elsif ssl_request? && visitor.is_anon?
redirect_to :protocol => "http://"
redirect_to({:protocol => 'http'}.merge(params), :flash => flash)
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions lib/zena/use/query_node.rb
Expand Up @@ -328,7 +328,7 @@ def process_like(left, right, is_not = nil)
if klass = Node.get_class(right[1])
"#{field_or_attr('kpath')} #{is_not ? 'NOT ' : ''}LIKE #{quote(klass.kpath + '%')}"
else
raise ::QueryBuilder::QueryException.new("Unknown class #{right.last.inspect}.")
raise ::QueryBuilder::Error.new("Unknown class #{right.last.inspect}.")
end
else
process_op(:like, left, right)
Expand Down Expand Up @@ -583,7 +583,7 @@ def context_relation(relation)
set_main_class(klass)
kpath_filter = ".kpath LIKE #{quote("#{klass.kpath}%")}" unless klass.kpath == 'N'
else
raise ::QueryBuilder::QueryException.new("Unknown class #{klass} in scope '#{class_name}:#{scope}'.")
raise ::QueryBuilder::Error.new("Unknown class #{klass} in scope '#{class_name}:#{scope}'.")
end
else
klass = nil
Expand Down

0 comments on commit de88e14

Please sign in to comment.