Skip to content

Commit

Permalink
Fixed date issue with archive check
Browse files Browse the repository at this point in the history
Fixed use of wrong instance variable for drupal site check
  • Loading branch information
Ginja committed Dec 8, 2013
1 parent 2d2f798 commit d803646
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions drupal_db_dump
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Drupal
@dump_path = "#{dump_path}/#{@site_name}"
@dump_folder = "#{@dump_path}/#{DATE}_#{@site_name}"
@archive = archive
@active = File.exists?("#{@site_name}/settings.php") ? true : false
@active = File.exists?("#{@site_path}/settings.php") ? true : false
end

def backup
Expand All @@ -51,7 +51,7 @@ class Drupal
puts message
return
end
cleanup if DAY > 28 && @archive
cleanup if DAY >= 28 && @archive
else
puts "A dump today already exists for #{@site_name}."
end
Expand Down
2 changes: 1 addition & 1 deletion msdw
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class MySQLDump
return
end
# Check if we need to archive
cleanup if DAY > 28 && @archive
cleanup if DAY >= 28 && @archive
end
end

Expand Down

0 comments on commit d803646

Please sign in to comment.