Skip to content

Commit

Permalink
Merge commit 'core/segment-actions-fix' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
cykod committed Jul 13, 2010
2 parents 282353c + 4545ad3 commit b184274
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/end_user_action_segment_type.rb
Expand Up @@ -12,7 +12,7 @@ def self.select_options

def self.is(cls, group_field, field, path)
path = path.split('/')
cls.scoped(:conditions => ["#{field[0]} = ? and #{field[1]} = ?", path[0..-2].join('/'), path[-1]])
cls.scoped(:conditions => ["#{field[0]} = ? and #{field[1]} = ?", path[0..-2].join('/').sub(/^\//, ''), path[-1]])
end
end

Expand Down
2 changes: 2 additions & 0 deletions lib/tasks/restore.rake
Expand Up @@ -108,6 +108,7 @@ namespace "cms" do

FileUtils.mkdir_p(storage_dir)
`tar -xzf #{directory + "/storage.tar.gz"} -C #{storage_dir}`
DomainFile.update_all("server_id = #{Server.server_id}", 'file_type != "fld" and private = 0') unless Server.server_id.blank?
end

if(File.exists?(directory + "/private.tar.gz"))
Expand All @@ -116,6 +117,7 @@ namespace "cms" do
FileUtils.rm_rf(private_dir) if(File.directory?(private_dir))
FileUtils.mkdir_p(private_dir)
`tar -xzf #{directory + "/private.tar.gz"} -C #{private_dir}`
DomainFile.update_all("server_id = #{Server.server_id}", 'file_type != "fld" and private = 1') unless Server.server_id.blank?
end

# Clear out the cache for the domain
Expand Down

0 comments on commit b184274

Please sign in to comment.