aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2024-04-18 09:55:42 +0000
committerMario <mario@mariovavti.com>2024-04-18 09:55:42 +0000
commit26c1fa07c912547f7d55c19f34aad0912e5f3f29 (patch)
tree16582829afca30831c53644d29dde76799919246 /boot.php
parent7de629a8c325a02a62e43b3ad357feaac844564a (diff)
downloadvolse-hubzilla-26c1fa07c912547f7d55c19f34aad0912e5f3f29.tar.gz
volse-hubzilla-26c1fa07c912547f7d55c19f34aad0912e5f3f29.tar.bz2
volse-hubzilla-26c1fa07c912547f7d55c19f34aad0912e5f3f29.zip
Reduce some global state and add some docs
Diffstat (limited to 'boot.php')
-rw-r--r--boot.php18
1 files changed, 15 insertions, 3 deletions
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;