From 0fa665c8f465f2d3b85cb093d05f4d991516ca05 Mon Sep 17 00:00:00 2001 From: icewing Date: Fri, 14 Mar 2008 18:06:34 +0000 Subject: Marcus Povey * Removed error outputs * Fixed languages git-svn-id: https://code.elgg.org/elgg/trunk@232 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/access.php | 2 +- engine/lib/languages.php | 6 +++--- 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]; } -- cgit v1.2.3