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:
Michael Kaufmann
2019-10-10 16:42:32 +02:00
parent 9167608794
commit fb54b887f2
5 changed files with 6 additions and 8 deletions

View File

@@ -387,8 +387,6 @@ if ($page == 'overview') {
}
} elseif ($page == 'apikeys' && Settings::Get('api.enabled') == 1) {
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) {
require_once __DIR__ . '/2fa.php';
}

View File

@@ -359,8 +359,6 @@ if ($page == 'overview') {
}
} elseif ($page == 'apikeys' && Settings::Get('api.enabled') == 1) {
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) {
require_once __DIR__ . '/2fa.php';
}

View File

@@ -378,7 +378,9 @@ class AcmeSh extends \Froxlor\Cron\FroxlorCron
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));
\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");
}
}

View File

@@ -44,7 +44,7 @@ return array(
'show_element' => (\Froxlor\Settings::Get('api.enabled') == true)
),
array(
'url' => 'customer_index.php?page=apihelp',
'url' => 'https://api.froxlor.org/doc/?v='.\Froxlor\Froxlor::getVersion(),
'label' => $lng['menue']['main']['apihelp'],
'show_element' => (\Froxlor\Settings::Get('api.enabled') == true)
),
@@ -195,7 +195,7 @@ return array(
'show_element' => (\Froxlor\Settings::Get('api.enabled') == true)
),
array(
'url' => 'admin_index.php?page=apihelp',
'url' => 'https://api.froxlor.org/doc/?v='.\Froxlor\Froxlor::getVersion(),
'label' => $lng['menue']['main']['apihelp'],
'show_element' => (\Froxlor\Settings::Get('api.enabled') == true)
),

View File

@@ -65,7 +65,7 @@
</if>
<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="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>
</ul>
</li>