From 250935f87e29f196d181a0704bd024bf2ca98ca9 Mon Sep 17 00:00:00 2001 From: Yuriy Bakhtin Date: Tue, 9 May 2023 10:57:36 +0200 Subject: [PATCH] Use new content state service --- docs/CHANGELOG.md | 5 ++++- models/WikiPage.php | 2 +- module.json | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 8280a7f9..8a9d3130 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,6 +1,10 @@ Changelog ========= +1.9.1 (Unreleased) +------------------- +- Enh #263: Use new content state service + 1.9.0 (May 1, 2023) ------------------- - Enh #258: Fix creating of page with same title used for soft deleted page @@ -230,4 +234,3 @@ Changelog 1.1.10 - March 14, 2018 ------------------------ - Enh: Added Page count configuration - diff --git a/models/WikiPage.php b/models/WikiPage.php index 7cc90e46..6f4d99dc 100644 --- a/models/WikiPage.php +++ b/models/WikiPage.php @@ -239,7 +239,7 @@ public function validateTitle($attribute, $params) $page = $query->one(); if ($page instanceof WikiPage) { - if ($page->content->state === Content::STATE_DELETED) { + if ($page->content->getStateService()->isDeleted()) { $this->addError('title', Yii::t('WikiModule.base', 'Page title already in use for a deleted page!')); } else { $this->addError('title', Yii::t('WikiModule.base', 'Page title already in use!')); diff --git a/module.json b/module.json index 9a44ce67..41c82cb8 100644 --- a/module.json +++ b/module.json @@ -3,7 +3,7 @@ "name": "Wiki", "description": "Collect and share information with your very own Wiki.", "keywords": ["wiki"], - "version": "1.9.0", + "version": "1.9.1", "humhub": { "minVersion": "1.14" },