X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FApp.php;h=9a09bcfce0ba8d425599c7ff735d75daa3c788b0;hb=3564daf24dd66c6eeba2ef86722a7c80b076e3fa;hp=a2bdd03df6c1801f1836f8edb5f9fd68eb883adc;hpb=1c3bed1777ea51fabdf1ce91c1c34b7ed0c4b04c;p=friendica.git diff --git a/src/App.php b/src/App.php index a2bdd03df6..9a09bcfce0 100644 --- a/src/App.php +++ b/src/App.php @@ -4,19 +4,16 @@ */ namespace Friendica; -use Friendica\Core\Cache; +use Detection\MobileDetect; +use Exception; use Friendica\Core\Config; use Friendica\Core\L10n; use Friendica\Core\PConfig; use Friendica\Core\System; -use Friendica\Database\DBM; -use dba; - -use Detection\MobileDetect; - -use Exception; +use Friendica\Database\DBA; require_once 'boot.php'; +require_once 'include/dba.php'; require_once 'include/text.php'; /** @@ -34,15 +31,12 @@ require_once 'include/text.php'; */ class App { - const MODE_NORMAL = 0; - const MODE_INSTALL = 1; - const MODE_MAINTENANCE = 2; - public $module_loaded = false; public $module_class = null; - public $query_string; - public $config; - public $page; + public $query_string = ''; + public $config = []; + public $page = []; + public $pager = []; public $page_offset; public $profile; public $profile_uid; @@ -54,16 +48,14 @@ class App public $content; public $data = []; public $error = false; - public $cmd; + public $cmd = ''; public $argv; public $argc; public $module; - public $mode = App::MODE_NORMAL; - public $pager; public $strings; public $basepath; - public $path; - public $hooks; + public $urlpath; + public $hooks = []; public $timezone; public $interactive = true; public $addons; @@ -88,6 +80,41 @@ class App public $force_max_items = 0; 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