summaryrefslogtreecommitdiffstats
path: root/modules-available/sysconfig/inc/configtgz.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2024-07-18 15:18:28 +0200
committerSimon Rettberg2024-07-18 15:18:28 +0200
commit1ac3124072a9f1b4c2c0a89abe091e62d2dd6f81 (patch)
tree5ff23c4b6b8e40452c0558ef2f54c37f480b3e87 /modules-available/sysconfig/inc/configtgz.inc.php
parent[sysconfig] Redesign dialog after creating/editing config (diff)
downloadslx-admin-1ac3124072a9f1b4c2c0a89abe091e62d2dd6f81.tar.gz
slx-admin-1ac3124072a9f1b4c2c0a89abe091e62d2dd6f81.tar.xz
slx-admin-1ac3124072a9f1b4c2c0a89abe091e62d2dd6f81.zip
[sysconfig] Don't delete config module on edit if taskmanager fails
Diffstat (limited to 'modules-available/sysconfig/inc/configtgz.inc.php')
-rw-r--r--modules-available/sysconfig/inc/configtgz.inc.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules-available/sysconfig/inc/configtgz.inc.php b/modules-available/sysconfig/inc/configtgz.inc.php
index 8ac87908..a54aaef9 100644
--- a/modules-available/sysconfig/inc/configtgz.inc.php
+++ b/modules-available/sysconfig/inc/configtgz.inc.php
@@ -123,10 +123,11 @@ class ConfigTgz
if (!is_array($task) || !isset($task['id']) || Taskmanager::isFailed($task)) {
// Failed...
Taskmanager::addErrorMessage($task);
- if (!$deleteOnError)
+ if (!$deleteOnError) {
$this->markFailed();
- else
+ } else {
$this->delete();
+ }
return false;
}
// Still running, add callback
@@ -324,9 +325,8 @@ class ConfigTgz
public static function get(int $configId): ?ConfigTgz
{
- $ret = Database::queryFirst("SELECT configid, title, filepath FROM configtgz WHERE configid = :configid", array(
- 'configid' => $configId
- ));
+ $ret = Database::queryFirst("SELECT configid, title, filepath FROM configtgz WHERE configid = :configid",
+ ['configid' => $configId]);
if ($ret === false)
return null;
return self::instanceFromRow($ret);