aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/access.php2
-rw-r--r--engine/lib/languages.php6
2 files changed, 4 insertions, 4 deletions
diff --git a/engine/lib/access.php b/engine/lib/access.php
index 999d06a6e..d45520c07 100644
--- a/engine/lib/access.php
+++ b/engine/lib/access.php
@@ -61,7 +61,7 @@
$access_array = array();
if ($user_id == 0) $user_id = $_SESSION['id'];
- if ($site_id == 0) $site_id = $CONFIG->site_id;
+ if (($site_id == 0) && (isset($CONFIG->site_id))) $site_id = $CONFIG->site_id;
$user_id = (int) $user_id;
$site_id = (int) $site_id;
diff --git a/engine/lib/languages.php b/engine/lib/languages.php
index f5abaaaa9..94956a3ca 100644
--- a/engine/lib/languages.php
+++ b/engine/lib/languages.php
@@ -58,11 +58,11 @@
global $CONFIG;
- if (empty($language))
+ if ((empty($language)) && (isset($CONFIG->language)))
$language = $CONFIG->language;
- if (isset($CONFIG->translations[$country_code][$message_key])) {
- return $CONFIG->translations[$country][$message_key];
+ if (isset($CONFIG->translations[$language][$message_key])) {
+ return $CONFIG->translations[$language][$message_key];
} else if (isset($CONFIG->translations["en"][$message_key])) {
return $CONFIG->translations["en"][$message_key];
}