mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 14:36:52 +00:00
allow to select the archive to restore from
Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
parent
badd8d02a9
commit
63e0849215
8 changed files with 63 additions and 15 deletions
|
|
@ -83,6 +83,30 @@ class ConfigurationManager
|
|||
return $lastBackupTime;
|
||||
}
|
||||
|
||||
public function GetBackupTimes() : array {
|
||||
if (!file_exists(DataConst::GetBackupArchivesList())) {
|
||||
return $array[] = '';
|
||||
}
|
||||
|
||||
$content = file_get_contents(DataConst::GetBackupArchivesList());
|
||||
if ($content === "") {
|
||||
return $array[] = '';
|
||||
}
|
||||
|
||||
$backupLines = explode("\n", $content);
|
||||
$backupTimes = array();
|
||||
foreach($backupLines as $lines) {
|
||||
$backupTimesTemp = explode(",", $lines);
|
||||
$backupTimes[] = $backupTimesTemp[1];
|
||||
}
|
||||
|
||||
if (!is_array($backupTimes)) {
|
||||
return $array[] = '';
|
||||
}
|
||||
|
||||
return $backupTimes;
|
||||
}
|
||||
|
||||
public function wasStartButtonClicked() : bool {
|
||||
if (isset($this->GetConfig()['wasStartButtonClicked'])) {
|
||||
return true;
|
||||
|
|
@ -152,6 +176,15 @@ class ConfigurationManager
|
|||
return $config['backup-mode'];
|
||||
}
|
||||
|
||||
public function GetSelectedRestoreTime() : string {
|
||||
$config = $this->GetConfig();
|
||||
if(!isset($config['selected-restore-time'])) {
|
||||
$config['selected-restore-time'] = '';
|
||||
}
|
||||
|
||||
return $config['selected-restore-time'];
|
||||
}
|
||||
|
||||
public function GetAIOURL() : string {
|
||||
$config = $this->GetConfig();
|
||||
if(!isset($config['AIO_URL'])) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue