From 23ff5f144188ef3a2734e4f38e2ff638bce0dcec Mon Sep 17 00:00:00 2001 From: Muammer Top Date: Tue, 1 Dec 2020 13:04:50 +0300 Subject: [PATCH] mini changes --- .../advs-module/src/Adv/AdvModel.php | 17 +++++--------- ....module.location__add_abv_to_countries.php | 23 ------------------- 2 files changed, 6 insertions(+), 34 deletions(-) delete mode 100644 addons/default/visiosoft/location-module/migrations/2020_10_13_133916_visiosoft.module.location__add_abv_to_countries.php diff --git a/addons/default/visiosoft/advs-module/src/Adv/AdvModel.php b/addons/default/visiosoft/advs-module/src/Adv/AdvModel.php index 4091e363e..6c6abf11c 100644 --- a/addons/default/visiosoft/advs-module/src/Adv/AdvModel.php +++ b/addons/default/visiosoft/advs-module/src/Adv/AdvModel.php @@ -214,17 +214,12 @@ class AdvModel extends AdvsAdvsEntryModel implements AdvInterface } - public function getAdvDetailLinkByModel($object, $type = null) - { - if ($type != null) { - $id = $object->id; - $seo = str_slug($object->slug, '-'); - return \route('adv_detail_seo', [$seo, $id]); - } - $id = $object->getObject()->id; - $seo = str_slug($object->getObject()->name, '-'); - return \route('adv_detail_seo', [$seo, $id]); - } + public function getAdvDetailLinkByModel($object, $type = null) + { + $id = $object->id; + $seo = str_slug($object->slug, '-'); + return \route('adv_detail_seo', [$seo, $id]); + } public function getAdvDetailLinkByAdId($id) { diff --git a/addons/default/visiosoft/location-module/migrations/2020_10_13_133916_visiosoft.module.location__add_abv_to_countries.php b/addons/default/visiosoft/location-module/migrations/2020_10_13_133916_visiosoft.module.location__add_abv_to_countries.php deleted file mode 100644 index c9fae47d4..000000000 --- a/addons/default/visiosoft/location-module/migrations/2020_10_13_133916_visiosoft.module.location__add_abv_to_countries.php +++ /dev/null @@ -1,23 +0,0 @@ - 'countries', - ]; - - protected $fields = [ - 'abv' => 'anomaly.field_type.text', - ]; - - protected $assignments = [ - 'abv', - ]; -}