Skip to content

Commit

Permalink
* Fixed reload on backup completion.
Browse files Browse the repository at this point in the history
  • Loading branch information
nuxsmin committed Aug 3, 2014
1 parent 668343f commit dc9537c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 5 additions & 1 deletion ajax/ajax_backup.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
}

$doBackup = SP_Common::parseParams('p', 'backup', 0);
$frmOnCloseAction = SP_Common::parseParams('p', 'onCloseAction');
$frmActiveTab = SP_Common::parseParams('p', 'activeTab', 0);

$doActionOnClose = "doAction('$frmOnCloseAction','',$frmActiveTab);";

if ($doBackup) {
if (!SP_Backup::doBackup()) {
Expand All @@ -51,5 +55,5 @@
SP_Log::wrLogInfo($message);
SP_Common::sendEmail($message);

SP_Common::printJSON(_('Proceso de backup finalizado'), 0);
SP_Common::printJSON(_('Proceso de backup finalizado'), 0, $doActionOnClose);
}
4 changes: 3 additions & 1 deletion inc/tpl/backup.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

$action = $data['action'];
$activeTab = $data['activeTab'];
$onCloseAction = $data['onCloseAction'];

SP_ACL::checkUserAccess($action) || SP_Html::showCommonError('unavailable');

Expand All @@ -38,7 +39,7 @@
);
$backupDbFile = array('absolute' => $backupDir . DIRECTORY_SEPARATOR . $siteName . '_db.sql', 'relative' => $backupPath . '/' . $siteName . '_db.sql');

$lastBackupTime = (file_exists($backupFile['absolute'])) ? _('Último backup') . ": " . date("F d Y H:i:s.", filemtime($backupFile['absolute'])) : _('No se encontraron backups');
$lastBackupTime = (file_exists($backupFile['absolute'])) ? _('Último backup') . ": " . date("r", filemtime($backupFile['absolute'])) : _('No se encontraron backups');
?>

<table class="data round">
Expand Down Expand Up @@ -67,6 +68,7 @@
</table>

<form method="post" name="frmBackup" id="frmBackup">
<input type="hidden" name="onCloseAction" value="<?php echo $onCloseAction ?>" />
<input type="hidden" name="activeTab" value="<?php echo $activeTab ?>"/>
<input type="hidden" name="backup" value="1"/>
<input type="hidden" name="isAjax" value="1"/>
Expand Down
2 changes: 1 addition & 1 deletion inc/util.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ public static function checkUpdates()
*/
public static function getVersion($retBuild = false)
{
$build = 12;
$build = 13;
$version = array(1, 1, 2);

if ($retBuild) {
Expand Down

0 comments on commit dc9537c

Please sign in to comment.