X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FApp.php;h=7622a1a0ce3aacb5e2795fbdd6b9c1e7b572e78e;hb=3ab837f3c783e14e2c8836e73c898041c47f2fd0;hp=5c1c2bb9c1d7ac8ea4ab235c368d93329a47ef76;hpb=669dafcf22e5c4baf5c2248c967226f915cd4403;p=friendica.git diff --git a/src/App.php b/src/App.php index 5c1c2bb9c1..7622a1a0ce 100644 --- a/src/App.php +++ b/src/App.php @@ -1,18 +1,20 @@ isInstallMode() instead to check for install mode. + */ + const MODE_INSTALL = 0; + + /** + * @deprecated since version 2008.08 Use the precise mode constant to check for a specific capability instead. + */ + const MODE_NORMAL = App::MODE_LOCALCONFIGPRESENT | App::MODE_DBAVAILABLE | App::MODE_DBCONFIGAVAILABLE | App::MODE_MAINTENANCEDISABLED; public $module_loaded = false; - public $query_string; - public $config; - public $page; + public $module_class = null; + public $query_string = ''; + public $config = []; + public $page = []; + public $pager = []; + public $page_offset; public $profile; public $profile_uid; public $user; @@ -41,28 +61,29 @@ class App { public $contacts; public $page_contact; public $content; - public $data = array(); + public $data = []; public $error = false; - public $cmd; + public $cmd = ''; public $argv; public $argc; public $module; - public $pager; + public $mode = App::MODE_INSTALL; public $strings; public $basepath; - public $path; - public $hooks; + public $urlpath; + public $hooks = []; public $timezone; public $interactive = true; - public $plugins; - public $apps = array(); + public $addons; + public $addons_admin = []; + public $apps = []; public $identities; public $is_mobile = false; public $is_tablet = false; public $is_friendica_app; - public $performance = array(); - public $callstack = array(); - public $theme_info = array(); + public $performance = []; + public $callstack = []; + public $theme_info = []; public $backend = true; public $nav_sel; public $category; @@ -73,82 +94,105 @@ class App { public $videowidth = 425; public $videoheight = 350; public $force_max_items = 0; - public $theme_thread_allow = true; public $theme_events_in_profile = true; + public $stylesheets = []; + public $footerScripts = []; + + /** + * Register a stylesheet file path to be included in the tag of every page. + * Inclusion is done in App->initHead(). + * The path can be absolute or relative to the Friendica installation base folder. + * + * @see App->initHead() + * + * @param string $path + */ + public function registerStylesheet($path) + { + $url = str_replace($this->get_basepath() . DIRECTORY_SEPARATOR, '', $path); + + $this->stylesheets[] = trim($url, '/'); + } + + /** + * Register a javascript file path to be included in the