From 01b2f4ffcd7854c93fd5de4830c9a59a605a0471 Mon Sep 17 00:00:00 2001 From: Mzhelskiy Maxim Date: Mon, 24 Jul 2017 14:23:36 +0700 Subject: [PATCH] fix topic date publish --- application/classes/modules/topic/entity/Topic.entity.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/classes/modules/topic/entity/Topic.entity.class.php b/application/classes/modules/topic/entity/Topic.entity.class.php index 43435d6b..39638d8f 100644 --- a/application/classes/modules/topic/entity/Topic.entity.class.php +++ b/application/classes/modules/topic/entity/Topic.entity.class.php @@ -145,7 +145,7 @@ class ModuleTopic_EntityTopic extends Entity $oTopicType = $this->getTypeObject(); $oUser = $this->getUserCreator(); if ($oTopicType and $oTopicType->isAllowCreateDeferredTopic($oUser)) { - if ((!$this->getId() or !$this->getPublishDraft()) and isset($aValue['date']) and is_string($aValue['date']) and isset($aValue['time']) and is_string($aValue['time'])) { + if ((!$this->getId() or !$this->getPublishDraft() or ($this->getDatePublish() and strtotime($this->getDatePublish()) > time())) and isset($aValue['date']) and is_string($aValue['date']) and isset($aValue['time']) and is_string($aValue['time'])) { $sDateFull = $aValue['date'] . ' ' . $aValue['time']; if ($this->Validate_Validate('date', $sDateFull, array('format' => 'dd.MM.yyyy HH:mm', 'allowEmpty' => true))) { $sDateFull = strtotime($sDateFull); // для охвата всей минуты