diff --git a/application/modules/faq/config/config.php b/application/modules/faq/config/config.php index 65eacc273..a154cef93 100644 --- a/application/modules/faq/config/config.php +++ b/application/modules/faq/config/config.php @@ -89,20 +89,20 @@ public function getUpdate(string $installedVersion): string // Convert tables to new character set and collate $this->db()->query('ALTER TABLE `[prefix]_faqs` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); $this->db()->query('ALTER TABLE `[prefix]_faqs_cats` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); - // no break + // no break case "1.3.0": case "1.4.0": case "1.5.0": // Add read_access column $this->db()->query('ALTER TABLE `[prefix]_faqs_cats` ADD COLUMN `read_access` VARCHAR(255) NOT NULL DEFAULT \'1,2,3\';'); - // no break + // no break case "1.6.0": case "1.7.0": // Update description foreach ($this->config['languages'] as $key => $value) { $this->db()->query(sprintf("UPDATE `[prefix]_modules_content` SET `description` = '%s' WHERE `key` = 'faq' AND `locale` = '%s';", $value['description'], $key)); } - // no break + // no break case "1.8.0": $this->db()->update('modules')->values(['icon_small' => $this->config['icon_small']])->where(['key' => $this->config['key']])->execute(); @@ -185,6 +185,11 @@ public function getUpdate(string $installedVersion): string $this->db()->query('ALTER TABLE `[prefix]_faqs` ADD INDEX `FK_[prefix]_faqs_[prefix]_faqs_cats` (`cat_id`) USING BTREE;'); $this->db()->query('ALTER TABLE `[prefix]_faqs` ADD CONSTRAINT `FK_[prefix]_faqs_[prefix]_faqs_cats` FOREIGN KEY (`cat_id`) REFERENCES `[prefix]_faqs_cats` (`id`) ON UPDATE NO ACTION ON DELETE CASCADE;'); + // no break + case "1.9.0": + // no break + case "1.9.1": + // no break } return 'Update function executed.'; diff --git a/application/modules/faq/controllers/admin/Cats.php b/application/modules/faq/controllers/admin/Cats.php index 9408ffbd0..e005abca9 100644 --- a/application/modules/faq/controllers/admin/Cats.php +++ b/application/modules/faq/controllers/admin/Cats.php @@ -90,7 +90,7 @@ public function treatAction() ->add($this->getTranslator()->trans('menuCats'), ['action' => 'index']) ->add($this->getTranslator()->trans('edit'), ['action' => 'treat']); - $model = $categoryMapper->getCategoryById($this->getRequest()->getParam('id')); + $model = $categoryMapper->getCategoryById($this->getRequest()->getParam('id'), null); } else { $this->getLayout()->getAdminHmenu() ->add($this->getTranslator()->trans('menuFaqs'), ['action' => 'index']) diff --git a/application/modules/faq/views/admin/index/treat.php b/application/modules/faq/views/admin/index/treat.php index b3ae98d10..ec50899cb 100644 --- a/application/modules/faq/views/admin/index/treat.php +++ b/application/modules/faq/views/admin/index/treat.php @@ -15,7 +15,7 @@