// Merge -> revision 8342

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8344 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-09-05 14:56:02 +00:00
parent 371f9a5397
commit 79fd72e461
46 changed files with 1299 additions and 249 deletions
+10 -2
View File
@@ -36,6 +36,9 @@ class BackupCore
/** @var string custom backup directory. */
public $customBackupDir = NULL;
public $psBackupAll = true;
public $psBackupDropTable = true;
/**
* Creates a new backup object
*
@@ -45,6 +48,11 @@ class BackupCore
{
if ($filename)
$this->id = $this->getRealBackupPath($filename);
$psBackupAll = Configuration::get('PS_BACKUP_ALL');
$psBackupDropTable = Configuration::get('PS_BACKUP_DROP_TABLE');
$this->psBackupAll = $psBackupAll !== false ? $psBackupAll : true;
$this->psBackupDropTable = $psBackupDropTable !== false ? $psBackupDropTable : true;
}
/**
@@ -169,7 +177,7 @@ class BackupCore
return false;
}
if (!Configuration::get('PS_BACKUP_ALL'))
if (!$this->psBackupAll)
$ignore_insert_table = array(_DB_PREFIX_.'connections', _DB_PREFIX_.'connections_page', _DB_PREFIX_.'connections_source', _DB_PREFIX_.'guest', _DB_PREFIX_.'statssearch');
else
$ignore_insert_table = array();
@@ -228,7 +236,7 @@ class BackupCore
fwrite($fp, '/* Scheme for table ' . $schema[0]['Table'] . " */\n");
if (Configuration::get('PS_BACKUP_DROP_TABLE'))
if ($this->psBackupDropTable)
fwrite($fp, 'DROP TABLE IF EXISTS `'.$schema[0]['Table'].'`;'."\n");
fwrite($fp, $schema[0]['Create Table'] . ";\n\n");