remove unneeded apihelp-page code in admin/customer_index; set explicit version to api-doc URL; check for acme.sh cronjob and uninstall it, as froxlor manages that itself
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -387,8 +387,6 @@ if ($page == 'overview') {
|
|||||||
}
|
}
|
||||||
} elseif ($page == 'apikeys' && Settings::Get('api.enabled') == 1) {
|
} elseif ($page == 'apikeys' && Settings::Get('api.enabled') == 1) {
|
||||||
require_once __DIR__ . '/api_keys.php';
|
require_once __DIR__ . '/api_keys.php';
|
||||||
} elseif ($page == 'apihelp' && Settings::Get('api.enabled') == 1) {
|
|
||||||
require_once __DIR__ . '/apihelp.php';
|
|
||||||
} elseif ($page == '2fa' && Settings::Get('2fa.enabled') == 1) {
|
} elseif ($page == '2fa' && Settings::Get('2fa.enabled') == 1) {
|
||||||
require_once __DIR__ . '/2fa.php';
|
require_once __DIR__ . '/2fa.php';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -359,8 +359,6 @@ if ($page == 'overview') {
|
|||||||
}
|
}
|
||||||
} elseif ($page == 'apikeys' && Settings::Get('api.enabled') == 1) {
|
} elseif ($page == 'apikeys' && Settings::Get('api.enabled') == 1) {
|
||||||
require_once __DIR__ . '/api_keys.php';
|
require_once __DIR__ . '/api_keys.php';
|
||||||
} elseif ($page == 'apihelp' && Settings::Get('api.enabled') == 1) {
|
|
||||||
require_once __DIR__ . '/apihelp.php';
|
|
||||||
} elseif ($page == '2fa' && Settings::Get('2fa.enabled') == 1) {
|
} elseif ($page == '2fa' && Settings::Get('2fa.enabled') == 1) {
|
||||||
require_once __DIR__ . '/2fa.php';
|
require_once __DIR__ . '/2fa.php';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -378,7 +378,9 @@ class AcmeSh extends \Froxlor\Cron\FroxlorCron
|
|||||||
|
|
||||||
private static function checkUpgrade()
|
private static function checkUpgrade()
|
||||||
{
|
{
|
||||||
$acmesh_result = \Froxlor\FileDir::safe_exec(self::$acmesh . " --upgrade");
|
|
||||||
FroxlorLogger::getInstanceOf()->logAction(FroxlorLogger::CRON_ACTION, LOG_INFO, "Checking for LetsEncrypt client upgrades before renewing certificates:\n" . implode("\n", $acmesh_result));
|
FroxlorLogger::getInstanceOf()->logAction(FroxlorLogger::CRON_ACTION, LOG_INFO, "Checking for LetsEncrypt client upgrades before renewing certificates:\n" . implode("\n", $acmesh_result));
|
||||||
|
\Froxlor\FileDir::safe_exec(self::$acmesh . " --upgrade");
|
||||||
|
// check for activated cron (which is installed automatically) but we don't need it
|
||||||
|
\Froxlor\FileDir::safe_exec(self::$acmesh . " --uninstall-cronjob");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ return array(
|
|||||||
'show_element' => (\Froxlor\Settings::Get('api.enabled') == true)
|
'show_element' => (\Froxlor\Settings::Get('api.enabled') == true)
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'url' => 'customer_index.php?page=apihelp',
|
'url' => 'https://api.froxlor.org/doc/?v='.\Froxlor\Froxlor::getVersion(),
|
||||||
'label' => $lng['menue']['main']['apihelp'],
|
'label' => $lng['menue']['main']['apihelp'],
|
||||||
'show_element' => (\Froxlor\Settings::Get('api.enabled') == true)
|
'show_element' => (\Froxlor\Settings::Get('api.enabled') == true)
|
||||||
),
|
),
|
||||||
@@ -195,7 +195,7 @@ return array(
|
|||||||
'show_element' => (\Froxlor\Settings::Get('api.enabled') == true)
|
'show_element' => (\Froxlor\Settings::Get('api.enabled') == true)
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'url' => 'admin_index.php?page=apihelp',
|
'url' => 'https://api.froxlor.org/doc/?v='.\Froxlor\Froxlor::getVersion(),
|
||||||
'label' => $lng['menue']['main']['apihelp'],
|
'label' => $lng['menue']['main']['apihelp'],
|
||||||
'show_element' => (\Froxlor\Settings::Get('api.enabled') == true)
|
'show_element' => (\Froxlor\Settings::Get('api.enabled') == true)
|
||||||
),
|
),
|
||||||
|
|||||||
2
templates/Sparkle/header.tpl
vendored
2
templates/Sparkle/header.tpl
vendored
@@ -65,7 +65,7 @@
|
|||||||
</if>
|
</if>
|
||||||
<if \Froxlor\Settings::Get('api.enabled') == 1>
|
<if \Froxlor\Settings::Get('api.enabled') == 1>
|
||||||
<li><a href="{$linker->getLink(array('section' => 'index', 'page' => 'apikeys'))}">{$lng['menue']['main']['apikeys']}</a></li>
|
<li><a href="{$linker->getLink(array('section' => 'index', 'page' => 'apikeys'))}">{$lng['menue']['main']['apikeys']}</a></li>
|
||||||
<li><a href="https://api.froxlor.org/doc/" rel="external">{$lng['menue']['main']['apihelp']}</a></li>
|
<li><a href="https://api.froxlor.org/doc/?v={$version}" rel="external">{$lng['menue']['main']['apihelp']}</a></li>
|
||||||
</if>
|
</if>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
Reference in New Issue
Block a user