summaryrefslogtreecommitdiff
path: root/lib/util.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/util.php')
-rw-r--r--lib/util.php11
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/util.php b/lib/util.php
index ca9006d64..6341438ca 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -72,8 +72,7 @@ function common_timezone()
}
}
- global $config;
- return $config['site']['timezone'];
+ return common_config('site', 'timezone');
}
function common_language()
@@ -737,9 +736,8 @@ function common_local_url($action, $args=null, $params=null, $fragment=null)
function common_path($relative)
{
- global $config;
- $pathpart = ($config['site']['path']) ? $config['site']['path']."/" : '';
- return "http://".$config['site']['server'].'/'.$pathpart.$relative;
+ $pathpart = (common_config('site', 'path')) ? common_config('site', 'path')."/" : '';
+ return "http://".common_config('site', 'server').'/'.$pathpart.$relative;
}
function common_date_string($dt)
@@ -992,8 +990,7 @@ function common_ensure_syslog()
{
static $initialized = false;
if (!$initialized) {
- global $config;
- openlog($config['syslog']['appname'], 0, LOG_USER);
+ openlog(common_config('syslog', 'appname'), 0, LOG_USER);
$initialized = true;
}
}