This commit is contained in:
Harry Bomrah 2014-02-18 11:33:29 +08:00
commit c55d9fef9b
5 changed files with 5 additions and 5 deletions

View File

@ -1,5 +1,5 @@
class Admin::ModuleStoreController < OrbitBackendController
before_filter :check_central_server_connection, :only => [:get_extensions]
before_filter :check_central_server_connection
def index
@extensions = get_extensions

View File

@ -131,6 +131,7 @@ class Admin::SitesController < OrbitBackendController
%x(git stash) unless need_stash
%x(git fetch origin)
pull_result = %x(git pull -r --ff-only 2>&1 origin #{@branch})
%x(git stash pop) unless need_stash
if pull_result.include? "fatal: Not possible to fast-forward, aborting."
result = "failed"
@ -138,7 +139,6 @@ class Admin::SitesController < OrbitBackendController
result = "success"
Bundler.with_clean_env { `cd #{Rails.root} && bundle install && touch tmp/restart.txt` }
end
%x(git stash pop) unless need_stash
render :text => result
end

View File

@ -3,7 +3,7 @@ require 'uri'
require 'fileutils'
require 'zip/zip'
class Admin::TemplateStoreController < OrbitBackendController
before_filter :check_central_server_connection, :only => [:get_templates]
before_filter :check_central_server_connection
before_filter :set_store
def index

View File

@ -483,7 +483,7 @@ class ApplicationController < ActionController::Base
if @site.site_token?
flash[:notice]="Connected to the Store"
else
redirect_to admin_register_site_index_path
redirect_to admin_sites_register_site_path
flash[:notice]="To Access the Store Please Connect It"
end
end

View File

@ -108,7 +108,7 @@ class Site
api_key = STORE_CONFIG[:store_settings]["api_key"]
self.generate_site_token
store = Store.new(self.id.to_s,self.site_token,api_key)
store.post_client(self.id.to_s,self.site_token,self.name)
store.post_client(self.id.to_s,self.site_token,self.title)
end
end