Zen Cart Logo
Forums / Bug Reports / [DONE] Default Language Selection in Admin

[DONE] Default Language Selection in Admin

Locked

Views: 2,765

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
09 Jun 2006, 05:46
#1
ericlaska avatar

ericlaska

New Zenner

Join Date:
May 2006
Posts:
2
Plugin Contributions:
0

[DONE] Default Language Selection in Admin

Dear All,

May be a Bug,

When you have more than on language, and you select on to edit.
As soon as you Update it, even without any modification and without selecting the checkbox "Set as default" language, it become automatically your Default language.

It do not happends when you create a new language but only when you edit it.

this with Zen Cart V1.3.0.1

tks and rgds

09 Jun 2006, 06:37
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: [DONE] Default Language Selection in Admin

Hmmm ... yes ... a bug....
here's the fix:

/admin/languages.php
line 189 starts with:php // check if we're changing settings for the default language $result = $db->Execute("select code from " . TABLE_LANGUAGES . " where languages_id = '" . (int)$lID . "'"); $default_lang_change_flag = (DEFAULT_LANGUAGE == $result->fields['code'] && DEFAULT_LANGUAGE == $code) ? false : true; replace that with:```php
// check if the spelling of the name for the default language has just been changed (thus meaning we need to change the spelling of DEFAULT_LANGUAGE to match it)
$result = $db->Execute("select code from " . TABLE_LANGUAGES . " where languages_id = '" . (int)$lID . "'");
$changing_default_lang = (DEFAULT_LANGUAGE == $result->fields['code']) ? true : false;
$default_needs_an_update = (DEFAULT_LANGUAGE == $code) ? false : true;
$default_lang_change_flag = ($default_needs_an_update && $changing_default_lang) ? true : false;

09 Jun 2006, 09:35
#3
ericlaska avatar

ericlaska

New Zenner

Join Date:
May 2006
Posts:
2
Plugin Contributions:
0

Re: [DONE] Default Language Selection in Admin

Thank you DrByte
:thumbsup: