* Fix bug#37481.
This commit is contained in:
@@ -22,15 +22,19 @@ class backup extends control
|
||||
parent::__construct($moduleName, $methodName);
|
||||
|
||||
$this->backupPath = $this->backup->getBackupPath();
|
||||
if(!is_dir($this->backupPath))
|
||||
|
||||
if($this->app->methodName != 'setting')
|
||||
{
|
||||
if(!mkdir($this->backupPath, 0777, true)) $this->view->error = sprintf($this->lang->backup->error->noWritable, dirname($this->backupPath));
|
||||
if(!is_dir($this->backupPath))
|
||||
{
|
||||
if(!mkdir($this->backupPath, 0777, true)) $this->view->error = sprintf($this->lang->backup->error->noWritable, dirname($this->backupPath));
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!is_writable($this->backupPath)) $this->view->error = sprintf($this->lang->backup->error->noWritable, $this->backupPath);
|
||||
}
|
||||
if(!is_writable($this->app->getTmpRoot())) $this->view->error = sprintf($this->lang->backup->error->noWritable, $this->app->getTmpRoot());
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!is_writable($this->backupPath)) $this->view->error = sprintf($this->lang->backup->error->noWritable, $this->backupPath);
|
||||
}
|
||||
if(!is_writable($this->app->getTmpRoot())) $this->view->error = sprintf($this->lang->backup->error->noWritable, $this->app->getTmpRoot());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -72,6 +76,8 @@ class backup extends control
|
||||
$this->view->title = $this->lang->backup->common;
|
||||
$this->view->position[] = $this->lang->backup->common;
|
||||
$this->view->backups = $backups;
|
||||
if(!is_writable($this->backupPath)) $this->view->backupError = sprintf($this->lang->backup->error->plainNoWritable, $this->backupPath);
|
||||
if(!is_writable($this->app->getTmpRoot())) $this->view->backupError = sprintf($this->lang->backup->error->plainNoWritable, $this->app->getTmpRoot());
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,11 @@ $(function()
|
||||
{
|
||||
$('.backup').click(function()
|
||||
{
|
||||
if(backupError)
|
||||
{
|
||||
alert(backupError);
|
||||
return;
|
||||
}
|
||||
var that = this;
|
||||
$(that).toggleClass('loading');
|
||||
$(that).text(getSpaceLoading);
|
||||
|
||||
@@ -46,11 +46,12 @@ $lang->backup->success->backup = 'Erledigt!';
|
||||
$lang->backup->success->restore = 'Wiederhergestellt!';
|
||||
|
||||
$lang->backup->error = new stdclass();
|
||||
$lang->backup->error->noCreateDir = 'Directory does not exist and cannot be created';
|
||||
$lang->backup->error->noWritable = "<code>%s</code> ist nicht beschreibbar! Bitte prüfen Sie die Berechtigungen, ansonsten kann das Backup nicht erstellt werden.";
|
||||
$lang->backup->error->noDelete = "%s kann nicht gelöscht werden. Bitte passen Sie die Berechtigungen an oder löschen Sie es manuell.";
|
||||
$lang->backup->error->restoreSQL = "Datenbankwiederherstellung fehlgeschlagen. Error: %s.";
|
||||
$lang->backup->error->restoreFile = "Dateiwiederherstellung fehlgeschlagen. Error: %s.";
|
||||
$lang->backup->error->backupFile = "Dateibackup fehlgeschlagen. Error: %s.";
|
||||
$lang->backup->error->backupCode = "Codebackup fehlgeschlagen. Error: %s.";
|
||||
$lang->backup->error->timeout = "Backup timeout.";
|
||||
$lang->backup->error->noCreateDir = 'Directory does not exist and cannot be created';
|
||||
$lang->backup->error->noWritable = "<code>%s</code> ist nicht beschreibbar! Bitte prüfen Sie die Berechtigungen, ansonsten kann das Backup nicht erstellt werden.";
|
||||
$lang->backup->error->plainNoWritable = "%s ist nicht beschreibbar! Bitte prüfen Sie die Berechtigungen, ansonsten kann das Backup nicht erstellt werden.";
|
||||
$lang->backup->error->noDelete = "%s kann nicht gelöscht werden. Bitte passen Sie die Berechtigungen an oder löschen Sie es manuell.";
|
||||
$lang->backup->error->restoreSQL = "Datenbankwiederherstellung fehlgeschlagen. Error: %s.";
|
||||
$lang->backup->error->restoreFile = "Dateiwiederherstellung fehlgeschlagen. Error: %s.";
|
||||
$lang->backup->error->backupFile = "Dateibackup fehlgeschlagen. Error: %s.";
|
||||
$lang->backup->error->backupCode = "Codebackup fehlgeschlagen. Error: %s.";
|
||||
$lang->backup->error->timeout = "Backup timeout.";
|
||||
|
||||
@@ -46,11 +46,12 @@ $lang->backup->success->backup = 'Done!';
|
||||
$lang->backup->success->restore = 'Restored!';
|
||||
|
||||
$lang->backup->error = new stdclass();
|
||||
$lang->backup->error->noCreateDir = 'Directory does not exist and cannot be created';
|
||||
$lang->backup->error->noWritable = "<code>%s</code> is not writable! Please check the privilege, or backup will not be done.";
|
||||
$lang->backup->error->noDelete = "%s cannot be deleted. Please modify the privilege or manually delete it.";
|
||||
$lang->backup->error->restoreSQL = "Failed to restore the database library. Error %s.";
|
||||
$lang->backup->error->restoreFile = "Failed to restore the file. Error %s.";
|
||||
$lang->backup->error->backupFile = "Failed to back up the file. Error %s.";
|
||||
$lang->backup->error->backupCode = "Failed to back up the code. Error %s.";
|
||||
$lang->backup->error->noCreateDir = 'Directory does not exist and cannot be created';
|
||||
$lang->backup->error->noWritable = "<code>%s</code> is not writable! Please check the privilege, or backup will not be done.";
|
||||
$lang->backup->error->plainNoWritable = "%s is not writable! Please check the privilege, or backup will not be done.";
|
||||
$lang->backup->error->noDelete = "%s cannot be deleted. Please modify the privilege or manually delete it.";
|
||||
$lang->backup->error->restoreSQL = "Failed to restore the database library. Error %s.";
|
||||
$lang->backup->error->restoreFile = "Failed to restore the file. Error %s.";
|
||||
$lang->backup->error->backupFile = "Failed to back up the file. Error %s.";
|
||||
$lang->backup->error->backupCode = "Failed to back up the code. Error %s.";
|
||||
$lang->backup->error->timeout = "Backup timeout.";
|
||||
|
||||
@@ -46,11 +46,12 @@ $lang->backup->success->backup = 'Terminé avec succès !';
|
||||
$lang->backup->success->restore = 'Restauré avec succès !';
|
||||
|
||||
$lang->backup->error = new stdclass();
|
||||
$lang->backup->error->noCreateDir = "Le répertoire n'existe pas et ne peut pas être créer. C'est problématique.";
|
||||
$lang->backup->error->noWritable = "<code>%s</code> n'est pas autorisé à l'écriture ! Vérifier les privilèges sinon le backup ne pourra pas se faire.";
|
||||
$lang->backup->error->noDelete = "%s ne peut pas être supprimé. Modifiez les privilèges ou supprimez-le avec vos petites mains.";
|
||||
$lang->backup->error->restoreSQL = "Echec pour restaurer la database library. Error %s.";
|
||||
$lang->backup->error->restoreFile = "Echec pour restaurer le fichier. Erreur %s.";
|
||||
$lang->backup->error->backupFile = "Echec pour sauvegarder le fichier. Erreur %s.";
|
||||
$lang->backup->error->backupCode = "Echec pour sauvegarder le code. Erreur %s.";
|
||||
$lang->backup->error->timeout = "Backup timeout.";
|
||||
$lang->backup->error->noCreateDir = "Le répertoire n'existe pas et ne peut pas être créer. C'est problématique.";
|
||||
$lang->backup->error->noWritable = "<code>%s</code> n'est pas autorisé à l'écriture ! Vérifier les privilèges sinon le backup ne pourra pas se faire.";
|
||||
$lang->backup->error->plainNoWritable = "%s n'est pas autorisé à l'écriture ! Vérifier les privilèges sinon le backup ne pourra pas se faire.";
|
||||
$lang->backup->error->noDelete = "%s ne peut pas être supprimé. Modifiez les privilèges ou supprimez-le avec vos petites mains.";
|
||||
$lang->backup->error->restoreSQL = "Echec pour restaurer la database library. Error %s.";
|
||||
$lang->backup->error->restoreFile = "Echec pour restaurer le fichier. Erreur %s.";
|
||||
$lang->backup->error->backupFile = "Echec pour sauvegarder le fichier. Erreur %s.";
|
||||
$lang->backup->error->backupCode = "Echec pour sauvegarder le code. Erreur %s.";
|
||||
$lang->backup->error->timeout = "Backup timeout.";
|
||||
|
||||
@@ -43,10 +43,11 @@ $lang->backup->success->backup = 'Sao lưu hoàn thành!';
|
||||
$lang->backup->success->restore = 'Khôi phục hoàn thành!';
|
||||
|
||||
$lang->backup->error = new stdclass();
|
||||
$lang->backup->error->noCreateDir = 'Thư mục không tồn tại và không thể tạo';
|
||||
$lang->backup->error->noWritable = "<code>%s</code> không thể ghi! Vui lòng kiểm tra quyền, nếu không sao lưu sẽ không thể hoàn thành.";
|
||||
$lang->backup->error->noDelete = "%s không thể xóa. Vui lòng điều chỉnh quyền hoặc xóa nó thủ công.";
|
||||
$lang->backup->error->restoreSQL = "Lỗi khôi phục thư viện CSDL. Lỗi %s.";
|
||||
$lang->backup->error->restoreFile = "Lỗi khôi phục tập tin. Lỗi %s.";
|
||||
$lang->backup->error->backupFile = "Lỗi sao lưu tập tin. Lỗi %s.";
|
||||
$lang->backup->error->backupCode = "Lỗi sao lưu mã nguồn. Lỗi %s.";
|
||||
$lang->backup->error->noCreateDir = 'Thư mục không tồn tại và không thể tạo';
|
||||
$lang->backup->error->noWritable = "<code>%s</code> không thể ghi! Vui lòng kiểm tra quyền, nếu không sao lưu sẽ không thể hoàn thành.";
|
||||
$lang->backup->error->plainNoWritable = "%s không thể ghi! Vui lòng kiểm tra quyền, nếu không sao lưu sẽ không thể hoàn thành.";
|
||||
$lang->backup->error->noDelete = "%s không thể xóa. Vui lòng điều chỉnh quyền hoặc xóa nó thủ công.";
|
||||
$lang->backup->error->restoreSQL = "Lỗi khôi phục thư viện CSDL. Lỗi %s.";
|
||||
$lang->backup->error->restoreFile = "Lỗi khôi phục tập tin. Lỗi %s.";
|
||||
$lang->backup->error->backupFile = "Lỗi sao lưu tập tin. Lỗi %s.";
|
||||
$lang->backup->error->backupCode = "Lỗi sao lưu mã nguồn. Lỗi %s.";
|
||||
|
||||
@@ -46,11 +46,12 @@ $lang->backup->success->backup = '备份成功!';
|
||||
$lang->backup->success->restore = '还原成功!';
|
||||
|
||||
$lang->backup->error = new stdclass();
|
||||
$lang->backup->error->noCreateDir = '备份目录不存在,也无法创建该目录';
|
||||
$lang->backup->error->noWritable = "<code>%s</code> 不可写!请检查该目录权限,否则无法备份。";
|
||||
$lang->backup->error->noDelete = "文件 %s 无法删除,修改权限或手工删除。";
|
||||
$lang->backup->error->restoreSQL = "数据库还原失败,错误:%s";
|
||||
$lang->backup->error->restoreFile = "附件还原失败,错误:%s";
|
||||
$lang->backup->error->backupFile = "附件备份失败,错误:%s";
|
||||
$lang->backup->error->backupCode = "代码备份失败,错误:%s";
|
||||
$lang->backup->error->timeout = "备份超时";
|
||||
$lang->backup->error->noCreateDir = '备份目录不存在,也无法创建该目录';
|
||||
$lang->backup->error->noWritable = "<code>%s</code> 不可写!请检查该目录权限,否则无法备份。";
|
||||
$lang->backup->error->plainNoWritable = "%s 不可写!请检查该目录权限,否则无法备份。";
|
||||
$lang->backup->error->noDelete = "文件 %s 无法删除,修改权限或手工删除。";
|
||||
$lang->backup->error->restoreSQL = "数据库还原失败,错误:%s";
|
||||
$lang->backup->error->restoreFile = "附件还原失败,错误:%s";
|
||||
$lang->backup->error->backupFile = "附件备份失败,错误:%s";
|
||||
$lang->backup->error->backupCode = "代码备份失败,错误:%s";
|
||||
$lang->backup->error->timeout = "备份超时";
|
||||
|
||||
@@ -136,4 +136,5 @@
|
||||
<?php js::set('restore', $lang->backup->restore);?>
|
||||
<?php js::set('backupTimeout', $lang->backup->error->timeout);?>
|
||||
<?php js::set('alertTips', $lang->backup->insufficientDisk);?>
|
||||
<?php js::set('backupError', empty($backupError) ? '' : $backupError);?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
Reference in New Issue
Block a user