Index: branches/5.0.x/core/kernel/languages/phrases_cache.php =================================================================== diff -u -r12871 -r12970 --- branches/5.0.x/core/kernel/languages/phrases_cache.php (.../phrases_cache.php) (revision 12871) +++ branches/5.0.x/core/kernel/languages/phrases_cache.php (.../phrases_cache.php) (revision 12970) @@ -1,6 +1,6 @@ Application->isAdmin) { - $id_field = $this->Application->getUnitOption('lang', 'IDField'); - $table_name = $this->Application->getUnitOption('lang', 'TableName'); - $sql = 'SELECT '.$id_field.' - FROM '.$table_name.' - WHERE AdminInterfaceLang = 1'; - $this->LanguageId = $this->Conn->GetOne($sql); + $this->LanguageId = $this->Application->Session->GetField('Language'); } else { $this->LanguageId = $this->Application->GetVar('m_lang'); @@ -256,7 +251,7 @@ function LoadPhraseByLabel($label, $original_label, $allow_editing = true, $use_admin = false) { - if (!$allow_editing && !array_key_exists($label, $this->_missingPhrases) && array_key_exists($label, $this->Phrases)) { + if (!$allow_editing && !$use_admin && !array_key_exists($label, $this->_missingPhrases) && array_key_exists($label, $this->Phrases)) { // label is aready translated, but it's version without on the fly translation code is requested $this->Phrases['NE:' . $label] = $this->Phrases[$label];