diff --git a/common/models/Settings.php b/common/models/Settings.php index 09ef7d4..b2512c4 100755 --- a/common/models/Settings.php +++ b/common/models/Settings.php @@ -214,9 +214,9 @@ /** * @return \yii\db\ActiveQuery */ -// public function getLanguage() -// { -// return $this->hasOne(SettingsLang::className(), [ 'settings_id' => 'id' ]); -// } + public function getLanguage() + { + return $this->hasDefaultVariationRelation(); + } } \ No newline at end of file diff --git a/frontend/views/site/contact.php b/frontend/views/site/contact.php index 37d119b..21124a6 100755 --- a/frontend/views/site/contact.php +++ b/frontend/views/site/contact.php @@ -58,8 +58,8 @@ JS;

Address

lang->address )) { - echo $settings->lang->address; + if (!empty( $settings->language->address )) { + echo $settings->language->address; } ?>

-- libgit2 0.21.4