fix for fallback if site cant communicate to store and also fixed edit mode

This commit is contained in:
Harry Bomrah 2015-07-20 17:29:29 +08:00
parent f9dd55eea2
commit 9ec5e21500
2 changed files with 5 additions and 2 deletions

View File

@ -160,7 +160,7 @@
<% if params[:editmode] == "on" %>
<a tabindex="-1" href="<%= request.fullpath.split("?").first %>" style="color:red;"><i class="icons-bolt"></i>Edit Mode Off</a>
<% else %>
<a tabindex="-1" href="<%= request.fullpath + "?editmode=on" %>"><i class="icons-bolt"></i>Edit Mode On</a>
<a tabindex="-1" href="<%= request.fullpath + "#{(request.query_parameters.empty? ? "?" : "&")}editmode=on" %>"><i class="icons-bolt"></i>Edit Mode On</a>
<% end %>
</li>
<% end %>

View File

@ -5,7 +5,10 @@ require File.expand_path('../application', __FILE__)
Orbit::Application.initialize!
Orbit::Application.config.secret_key_base = 'acc6ffc5a7d360c9cf2a7bdb4ddf9a897942ec6767413a5c0324a0fa8b86197a96298288a66bd46d8770d8b6edf509aad65716961c2c364ce006b475e6cfd418'
OrbitApp.cleanup_modules
OrbitApp.check_module_permissions
begin
OrbitApp.check_module_permissions
rescue Exception => e
end
if Site.count == 0
site = Site.new