aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2020-01-30 20:39:13 +0100
committerMax Kostikov <max@kostikov.co>2020-01-30 20:39:13 +0100
commitc50a311ff32d7361d0809d87b03be1b4ec25b783 (patch)
tree0e80244862c5aeb103204248c9fd5a982d808c47 /Zotlabs
parentc2b6f0bc28afaaa253308bc0b90c914a08b9547b (diff)
parentb37e5a426abee519f20a9cec557538bde3841ad8 (diff)
downloadvolse-hubzilla-c50a311ff32d7361d0809d87b03be1b4ec25b783.tar.gz
volse-hubzilla-c50a311ff32d7361d0809d87b03be1b4ec25b783.tar.bz2
volse-hubzilla-c50a311ff32d7361d0809d87b03be1b4ec25b783.zip
Merge branch 'dev' into 'dev'
Prevent multiple database requests on name platform check See merge request hubzilla/core!1824
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Lib/System.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/Zotlabs/Lib/System.php b/Zotlabs/Lib/System.php
index 7bf1343bb..3cc46fbda 100644
--- a/Zotlabs/Lib/System.php
+++ b/Zotlabs/Lib/System.php
@@ -5,9 +5,14 @@ namespace Zotlabs\Lib;
class System {
static public function get_platform_name() {
- if(is_array(\App::$config) && is_array(\App::$config['system']) && array_key_exists('platform_name',\App::$config['system']))
- return \App::$config['system']['platform_name'];
- return PLATFORM_NAME;
+ static $platform_name = '';
+ if(empty($platform_name)) {
+ if(is_array(\App::$config) && is_array(\App::$config['system']) && array_key_exists('platform_name',\App::$config['system']))
+ $platform_name = \App::$config['system']['platform_name'];
+ else
+ $platform_name = PLATFORM_NAME;
+ }
+ return $platform_name;
}
static public function get_site_name() {