diff options
author | Simon Rettberg | 2017-12-20 14:33:07 +0100 |
---|---|---|
committer | Simon Rettberg | 2017-12-20 14:33:07 +0100 |
commit | a42e408b1cfa2e1e3b14e1d19a8c320d2e97bff3 (patch) | |
tree | 2f786157918f6b93ecd972fbd8e4a71b2ca73d92 /modules-available/sysconfig | |
parent | [systemstatus] Only query dnbd3-server if enabled (diff) | |
download | slx-admin-a42e408b1cfa2e1e3b14e1d19a8c320d2e97bff3.tar.gz slx-admin-a42e408b1cfa2e1e3b14e1d19a8c320d2e97bff3.tar.xz slx-admin-a42e408b1cfa2e1e3b14e1d19a8c320d2e97bff3.zip |
[sysconfig] Error checks + messages when rebuilding module
Diffstat (limited to 'modules-available/sysconfig')
-rw-r--r-- | modules-available/sysconfig/inc/configmodule.inc.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/modules-available/sysconfig/inc/configmodule.inc.php b/modules-available/sysconfig/inc/configmodule.inc.php index cfe79802..2cee37a9 100644 --- a/modules-available/sysconfig/inc/configmodule.inc.php +++ b/modules-available/sysconfig/inc/configmodule.inc.php @@ -412,6 +412,9 @@ abstract class ConfigModule $this->markFailed(); return false; } + } elseif (!file_exists($tmpTgz)) { + EventLog::warning('ConfigModule::markUpdated for tmpTgz="' . $this->moduleTitle . '" called which doesn\'t exist. Doing nothing.'); + return true; } else { $task = Taskmanager::submit('MoveFile', array( 'source' => $tmpTgz, @@ -419,10 +422,11 @@ abstract class ConfigModule )); $task = Taskmanager::waitComplete($task, 5000); if (Taskmanager::isFailed($task) || !Taskmanager::isFinished($task)) { - if (!API && !AJAX) + if (!API && !AJAX) { Taskmanager::addErrorMessage($task); - else - EventLog::failure('Could not move ' . $tmpTgz . ' to ' . $this->moduleArchive . ' while generating "' . $this->moduleTitle . '"'); + } else { + EventLog::failure('Could not move ' . $tmpTgz . ' to ' . $this->moduleArchive . ' while generating "' . $this->moduleTitle . '"', print_r($task, true)); + } $this->markFailed(); return false; } |