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;
require SYSTEM . 'base.php';
if (!IS_CLI) {
require SYSTEM . 'base.php';
$serverUrl = 'http' . (isHttps() ? 's' : '') . '://' . $baseHost;
$siteURL = $serverUrl . $baseDir;
$serverUrl = 'http' . (isHttps() ? 's' : '') . '://' . $baseHost;
$siteURL = $serverUrl . $baseDir;
}
return [
'name' => 'MyAAC',
@ -41,7 +43,7 @@ return [
'name' => 'Website URL',
'type' => 'text',
'desc' => 'Website address of this MyAAC instance',
'default' => $siteURL,
'default' => IS_CLI ? '' : $siteURL,
'is_config' => true,
],
'env' => [