Starting snapshot thread on first HTTP request (otherwise, --daemon option fails); ticket:48, ticket:198

This commit is contained in:
Alexey Verkhovsky 2005-08-01 05:02:52 +00:00
parent adc6b005d5
commit 6578bed720
2 changed files with 17 additions and 3 deletions

View file

@ -2,7 +2,7 @@
# Likewise will all the methods added be available for all controllers.
class ApplicationController < ActionController::Base
before_filter :set_utf8_http_header, :connect_to_model
before_filter :set_utf8_http_header, :connect_to_model, :check_snapshot_thread
after_filter :remember_location
# For injecting a different wiki model implementation. Intended for use in tests
@ -22,7 +22,7 @@ class ApplicationController < ActionController::Base
def authorized?
@web.nil? ||
@web.password.nil? ||
@web.password.nil? ||
cookies['web_address'] == @web.password ||
password_check(@params['password'])
end
@ -34,6 +34,10 @@ class ApplicationController < ActionController::Base
end
end
def check_snapshot_thread
WikiService.check_snapshot_thread
end
def connect_to_model
@action_name = @params['action'] || 'index'
@web_name = @params['web']