From a4b93e3cc4622a7348a951554e944a88a7c5993a Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 12 Mar 2001 14:53:13 +0000 Subject: - forgot to commit this last night but this should fix deekayen's small Windows glitch --- account.php | 10 ++++++---- includes/locale.inc | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/account.php b/account.php index a2668074b..ade3e1ea2 100644 --- a/account.php +++ b/account.php @@ -139,10 +139,12 @@ function account_site_edit() { $output .= "
\n"; $output .= "". t("Select what time you currently have and your timezone settings will be set appropriate.") ."

\n"; - $output .= "". t("Language" ) .":
\n"; - foreach ($languages as $key=>$value) $options3 .= " \n"; - $output .= "
\n"; - $output .= "". t("Selecting a different language will change the language the site.") ."

\n"; + if ($languages) { + $output .= "". t("Language" ) .":
\n"; + foreach ($languages as $key=>$value) $options3 .= " \n"; + $output .= "
\n"; + $output .= "". t("Selecting a different language will change the language the site.") ."

\n"; + } $output .= "". t("Maximum number of stories to display") .":
\n"; for ($stories = 10; $stories <= 30; $stories += 5) $options4 .= "\n"; diff --git a/includes/locale.inc b/includes/locale.inc index 873ee8606..4fd927c56 100644 --- a/includes/locale.inc +++ b/includes/locale.inc @@ -2,7 +2,7 @@ function locale_init() { global $languages, $user; - return ($user->id && $user->language) ? $user->language : key($languages); + return ($languages ? (($user->id && $user->language) ? $user->language : key($languages)) : 0); } function t($string) { -- cgit v1.2.3