From 979545ee4ece6f2ead1f051c5cf6d36b92606abe Mon Sep 17 00:00:00 2001 From: Anastasia Date: Tue, 8 May 2018 18:16:14 +0300 Subject: [PATCH] - address --- common/models/Settings.php | 8 ++++---- frontend/views/site/contact.php | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) 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