]> git.p6c8.net - jirafeau_mojo42.git/commitdiff
[BUGFIX] avoid running admin cli if installation not finished
authorJerome Jutteau <jerome@jutteau.fr>
Sun, 13 Dec 2020 20:57:21 +0000 (21:57 +0100)
committerJerome Jutteau <jerome@jutteau.fr>
Sun, 13 Dec 2020 21:23:15 +0000 (22:23 +0100)
Signed-off-by: Jerome Jutteau <jerome@jutteau.fr>
admin.php

index cfdfe3010dc26a12fab2b644329aa33b585eb7a4..ed55d2f07a57177e7bd0fc6748b0c268e2d8af0f 100644 (file)
--- a/admin.php
+++ b/admin.php
@@ -32,6 +32,9 @@ if (file_exists(JIRAFEAU_ROOT . 'install.php')
 
 /* If called from CLI, no password or graphical interface */
 if (php_sapi_name() == "cli") {
 
 /* If called from CLI, no password or graphical interface */
 if (php_sapi_name() == "cli") {
+    if ($cfg['installation_done'] == false) {
+        die("installation not completed yet\n");
+    }
     if ((count($argv)>1) && $argv[1]=="clean_expired") {
         $total = jirafeau_admin_clean();
         echo "$total expired files deleted.";
     if ((count($argv)>1) && $argv[1]=="clean_expired") {
         $total = jirafeau_admin_clean();
         echo "$total expired files deleted.";

patrick-canterino.de