From 26c1fa07c912547f7d55c19f34aad0912e5f3f29 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Thu, 18 Apr 2024 09:55:42 +0000 Subject: Reduce some global state and add some docs --- boot.php | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'boot.php') diff --git a/boot.php b/boot.php index dcdcdda01..862079276 100644 --- a/boot.php +++ b/boot.php @@ -602,8 +602,19 @@ define('DBTYPE_MYSQL', 0); define('DBTYPE_POSTGRES', 1); -function sys_boot() { - +/** + * Boot the app. + * + * Detects if the system is installed, and if it is, reads the basic configuration + * in `.htconfig`, conects to the database, and loads the system configuration stored + * in the db. + * + * As a side effect it also sets the App::$install flag to true if the system is _not_ + * installed yet. + * + * @return True if the system is installed, false otherwise. + */ +function sys_boot(): bool { // our central App object @@ -686,6 +697,8 @@ function sys_boot() { */ call_hooks('init_1'); } + + return !App::$install; } @@ -766,7 +779,6 @@ class App { public static $langsave; public static $rtl = false; public static $plugins_admin; - public static $module_loaded = false; public static $query_string; public static $page; public static $profile; -- cgit v1.2.3