- Output disabled message when locale is disabled.

- If $languages is empty and locale is enabled output $na instead of script
  errors.
3-00
Kjartan Mannes 2001-06-04 15:17:10 +00:00
parent 6563382974
commit 2ecc3e4c78
2 changed files with 40 additions and 28 deletions

View File

@ -53,14 +53,18 @@ function locale_edit($id) {
}
function locale_languages($translation) {
global $languages;
global $languages, $na;
if (count($languages)) {
foreach ($languages as $key=>$value) {
$output .= ($translation->$key) ? "$key " : "<STRIKE>$key</STRIKE> ";
}
return $output;
}
return $na;
}
function locale_overview() {
if (variable_get("locale", 0)) {
$result = db_query("SELECT * FROM locales ORDER BY string");
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n";
@ -73,6 +77,8 @@ function locale_overview() {
return $output;
}
return "Locale disabled.";
}
function locale_admin() {
global $id, $edit, $op;

View File

@ -53,14 +53,18 @@ function locale_edit($id) {
}
function locale_languages($translation) {
global $languages;
global $languages, $na;
if (count($languages)) {
foreach ($languages as $key=>$value) {
$output .= ($translation->$key) ? "$key " : "<STRIKE>$key</STRIKE> ";
}
return $output;
}
return $na;
}
function locale_overview() {
if (variable_get("locale", 0)) {
$result = db_query("SELECT * FROM locales ORDER BY string");
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n";
@ -73,6 +77,8 @@ function locale_overview() {
return $output;
}
return "Locale disabled.";
}
function locale_admin() {
global $id, $edit, $op;