Fix warnings in CLI (part 2)

This commit is contained in:
slawkens 2025-05-29 16:10:46 +02:00
parent 756d94bb3e
commit 770ffcfc52

View File

@ -21,10 +21,12 @@ $defaultTemplate = in_array('kathrine', $templates) ? 'kathrine' : $templates[0]
global $db; global $db;
require SYSTEM . 'base.php'; if (!IS_CLI) {
require SYSTEM . 'base.php';
$serverUrl = 'http' . (isHttps() ? 's' : '') . '://' . $baseHost; $serverUrl = 'http' . (isHttps() ? 's' : '') . '://' . $baseHost;
$siteURL = $serverUrl . $baseDir; $siteURL = $serverUrl . $baseDir;
}
return [ return [
'name' => 'MyAAC', 'name' => 'MyAAC',
@ -41,7 +43,7 @@ return [
'name' => 'Website URL', 'name' => 'Website URL',
'type' => 'text', 'type' => 'text',
'desc' => 'Website address of this MyAAC instance', 'desc' => 'Website address of this MyAAC instance',
'default' => $siteURL, 'default' => IS_CLI ? '' : $siteURL,
'is_config' => true, 'is_config' => true,
], ],
'env' => [ 'env' => [