Index: branches/5.3.x/core/units/phrases/phrases_event_handler.php =================================================================== diff -u -N -r15677 -r15698 --- branches/5.3.x/core/units/phrases/phrases_event_handler.php (.../phrases_event_handler.php) (revision 15677) +++ branches/5.3.x/core/units/phrases/phrases_event_handler.php (.../phrases_event_handler.php) (revision 15698) @@ -1,6 +1,6 @@ Application->getUnitOption($this->Prefix, 'IDField') . ' - FROM ' . $this->Application->getUnitOption($this->Prefix, 'TableName') . ' + $config = $this->getUnitConfig(); + + $sql = 'SELECT ' . $config->getIDField() . ' + FROM ' . $config->getTableName() . ' WHERE PhraseKey = ' . $this->Conn->qstr( mb_strtoupper($phrase) ); return $this->Conn->GetOne($sql); @@ -203,7 +205,7 @@ protected function _getPrimaryTranslation($phrase) { $sql = 'SELECT l' . $this->Application->GetDefaultLanguageId() . '_Translation - FROM ' . $this->Application->getUnitOption($this->Prefix, 'TableName') . ' + FROM ' . $this->getUnitConfig()->getTableName() . ' WHERE PhraseKey = ' . $this->Conn->qstr( mb_strtoupper($phrase) ); return $this->Conn->GetOne($sql); @@ -443,9 +445,11 @@ parent::OnAfterConfigRead($event); if ( $this->Application->findModule('Name', 'Custom') ) { - $fields = $this->Application->getUnitOption($event->Prefix, 'Fields'); + $config = $event->getUnitConfig(); + + $fields = $config->getFields(); $fields['Module']['default'] = 'Custom'; - $this->Application->setUnitOption($event->Prefix, 'Fields', $fields); + $config->setFields($fields); } $ml_helper = $this->Application->recallObject('kMultiLanguageHelper'); @@ -454,7 +458,7 @@ $ml_helper->replaceMLCalculatedFields($event); if ( $this->Application->GetVar('regional') ) { - $this->Application->setUnitOption($event->Prefix, 'PopulateMlFields', true); + $event->getUnitConfig()->setPopulateMlFields(true); } } @@ -526,7 +530,7 @@ return; } - $this->Application->setUnitOption('phrases', 'AutoLoad', false); + $this->Application->getUnitConfig('phrases')->setAutoLoad(false); $this->StoreSelectedIDs($event); $this->Application->StoreVar('export_language_ids', $this->Application->GetVar('m_lang'));