X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=boot.php;h=4ef30eadac888d2752e558ac93107cde9e4bb7a1;hb=9911fcbc976fd7d84b0f79f8c0bc2d157d8bf8cd;hp=ae98e9240997cc03a8b0043c91463b40f4760567;hpb=c4ba035ee314295c5a6a62ed49554f09a50c86f4;p=friendica.git diff --git a/boot.php b/boot.php index ae98e92409..4ef30eadac 100644 --- a/boot.php +++ b/boot.php @@ -36,7 +36,7 @@ define ( 'FRIENDICA_PLATFORM', 'Friendica'); define ( 'FRIENDICA_CODENAME', 'Asparagus'); define ( 'FRIENDICA_VERSION', '3.5-dev' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); -define ( 'DB_UPDATE_VERSION', 1192 ); +define ( 'DB_UPDATE_VERSION', 1194 ); /** * @brief Constant with a HTML line break. @@ -530,6 +530,8 @@ class App { private $cached_profile_image; private $cached_profile_picdate; + private static $a; + /** * @brief App constructor. */ @@ -553,9 +555,7 @@ class App { $this->performance["rendering"] = 0; $this->performance["parser"] = 0; $this->performance["marktime"] = 0; - - $this->performance["file"] = 0; - $this->performance["file"] = 0; + $this->performance["markstart"] = microtime(true); $this->callstack["database"] = array(); $this->callstack["network"] = array(); @@ -712,6 +712,8 @@ class App { } } + self::$a = $this; + } function get_basepath() { @@ -736,6 +738,10 @@ class App { function get_baseurl($ssl = false) { + // Is the function called statically? + if (!is_object($this)) + return(self::$a->get_baseurl($ssl)); + $scheme = $this->scheme; if((x($this->config,'system')) && (x($this->config['system'],'ssl_policy'))) { @@ -912,6 +918,10 @@ class App { } function get_cached_avatar_image($avatar_image){ + return $avatar_image; + + // The following code is deactivated. It doesn't seem to make any sense and it slows down the system. + /* if($this->cached_profile_image[$avatar_image]) return $this->cached_profile_image[$avatar_image]; @@ -931,6 +941,7 @@ class App { } } return $this->cached_profile_image[$avatar_image]; + */ } @@ -1037,9 +1048,6 @@ class App { $function = implode(", ", $function); - //$last = array_pop($trace); - //$function = $last["function"]; - $this->callstack[$value][$function] += (float)$duration; }