summaryrefslogtreecommitdiff
path: root/lib/util.php
diff options
context:
space:
mode:
authorEric Helgeson <helfire@Erics-MBP.local>2009-03-09 20:01:35 -0500
committerEric Helgeson <helfire@Erics-MBP.local>2009-03-09 20:01:35 -0500
commitc6cd87c106b763ed5610dae64e5a02ba86609ece (patch)
tree2f93e5b2f7183fee0c6fcebce9de93033f930ae2 /lib/util.php
parent945bbf00dc9ee106359e9387956c72c1290d12fc (diff)
Changed all $config[][] calls to common_config()
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;
}
}