summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2015-09-16 10:37:41 +0200
committerSimon Rettberg2015-09-16 10:37:41 +0200
commit66300453b0945c2bf17e3eb3f40ff9e1fdb61d2b (patch)
tree425b894bf3611a1f357630b1e219930f20afd9eb
parentUpdate translations (diff)
downloadslx-admin-66300453b0945c2bf17e3eb3f40ff9e1fdb61d2b.tar.gz
slx-admin-66300453b0945c2bf17e3eb3f40ff9e1fdb61d2b.tar.xz
slx-admin-66300453b0945c2bf17e3eb3f40ff9e1fdb61d2b.zip
[backup/restore] Add options to select what to restore
-rw-r--r--modules/backup.inc.php4
-rw-r--r--templates/backup/_page.html8
-rw-r--r--templates/backup/restore.html4
3 files changed, 13 insertions, 3 deletions
diff --git a/modules/backup.inc.php b/modules/backup.inc.php
index 02b02b0e..8cc0502f 100644
--- a/modules/backup.inc.php
+++ b/modules/backup.inc.php
@@ -102,7 +102,9 @@ class Page_Backup extends Page
'mode' => 'restore',
'backupFile' => $tempfile,
'parentTask' => $parent,
- 'failOnParentFail' => false
+ 'failOnParentFail' => false,
+ 'restoreOpenslx' => Request::post('restore_openslx', 'off') === 'on',
+ 'restoreDozmod' => Request::post('restore_dozmod', 'off') === 'on',
));
if (isset($task['id'])) {
$this->templateData['restoreid'] = $task['id'];
diff --git a/templates/backup/_page.html b/templates/backup/_page.html
index 252ce18f..0c4429e2 100644
--- a/templates/backup/_page.html
+++ b/templates/backup/_page.html
@@ -23,6 +23,14 @@
<span class="input-group-addon">{{lang_file}}</span>
<input class="form-control" type="file" name="backupfile">
</div>
+ <div>
+ <label><input type="checkbox" name="restore_openslx" checked="checked"> {{lang_restoreSystemConfig}}</label>
+ <p><i>{{lang_systemExplanation}}</i></p>
+ </div>
+ <div>
+ <label><input type="checkbox" name="restore_dozmod" checked="checked"> {{lang_restoreDozmodConfig}}</label>
+ <p><i>{{lang_dozmodExplanation}}</i></p>
+ </div>
<button class="btn btn-primary" type="submit">{{lang_restore}}</button>
</div>
</div>
diff --git a/templates/backup/restore.html b/templates/backup/restore.html
index e613bdf4..c5d9ba13 100644
--- a/templates/backup/restore.html
+++ b/templates/backup/restore.html
@@ -51,12 +51,12 @@
$.ajax({url: "index.php?do=Main", timeout: 3000}).success(function(data, textStatus, jqXHR) {
if (textStatus !== "success" && textStatus !== "notmodified")
return;
- if (data.indexOf('Connecting to the local database failed') > -1)
+ if (data.indexOf('Status: DB running') === -1)
return;
clearTimeout(slxTimeoutId);
setTimeout(function() {
window.location.replace("index.php?do=Main&message[]=success%7Crestore-done");
- }, 2000);
+ }, 2500);
});
}
</script>