X-Git-Url: https://git.p6c8.net/jirafeau_project.git/blobdiff_plain/9c3b702ab8f82079ddaa9a12413802de946d8ecc..ea13ecd5272b130c028b76b91b2a05ea65fd565b:/admin.php?ds=sidebyside diff --git a/admin.php b/admin.php index a6bacd3..f8270a2 100644 --- a/admin.php +++ b/admin.php @@ -37,17 +37,18 @@ if (php_sapi_name() == "cli") { if ($cfg['installation_done'] == false) { die("Installation not completed yet.\n"); } - if ((count($argv)>1) && $argv[1]=="clean_expired") { + if ((count($argv) > 1) && $argv[1] == 'clean_expired') { $total = jirafeau_admin_clean(); echo "$total expired files deleted.\n"; - } elseif ((count($argv)>1) && $argv[1]=="clean_async") { + } elseif ((count($argv) > 1) && $argv[1] == 'clean_async') { $total = jirafeau_admin_clean_async(); echo "$total old unfinished transfers deleted.\n"; } else { die("No command found. Should be admin.php .\n"); } -// Second check: Challenge by IP -} elseif (true === jirafeau_challenge_admin_ip($cfg, get_ip_address($cfg))) { +} +/* Second check: Challenge by IP */ +elseif (true === jirafeau_challenge_admin_ip($cfg, get_ip_address($cfg))) { /* Disable admin interface if we have a empty admin password. */ if (empty($cfg['admin_password']) && empty($cfg['admin_http_auth_user'])) { require(JIRAFEAU_ROOT . 'lib/template/header.php');