diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-03-04 06:24:33 -0800 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-03-04 06:24:33 -0800 |
commit | f9babf6a7d4215e763a8c1766a2e6592fe274953 (patch) | |
tree | a28e7166d6f49026b9e1587b0cc1985980ad84d6 /lib/util.php | |
parent | 09ebc965d58df9cc087568d99c3f4c5ba41496e2 (diff) |
Check for config file when running
When running the full system, check for a config file, and throw an
error if none is found.
Diffstat (limited to 'lib/util.php')
-rw-r--r-- | lib/util.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/util.php b/lib/util.php index 18e4f310c..f9a787d47 100644 --- a/lib/util.php +++ b/lib/util.php @@ -81,7 +81,7 @@ function common_language() // If there is a user logged in and they've set a language preference // then return that one... - if (common_logged_in()) { + if (_have_config() && common_logged_in()) { $user = common_current_user(); $user_language = $user->language; if ($user_language) @@ -315,6 +315,10 @@ function common_current_user() { global $_cur; + if (!_have_config()) { + return null; + } + if ($_cur === false) { if (isset($_REQUEST[session_name()]) || (isset($_SESSION['userid']) && $_SESSION['userid'])) { |