From 45cdb36d5c96b9beb839881b6eee42aea6c54d79 Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Mon, 13 Jun 2022 13:35:34 -0300 Subject: [PATCH] Remove unecessary row and make compatible with db schema Signed-off-by: Vitor Mattos --- lib/private/Comments/Comment.php | 6 +----- lib/private/Comments/Manager.php | 1 - lib/public/Comments/IComment.php | 4 ++-- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/lib/private/Comments/Comment.php b/lib/private/Comments/Comment.php index 2b338efc75f..b19a901f1b0 100644 --- a/lib/private/Comments/Comment.php +++ b/lib/private/Comments/Comment.php @@ -350,11 +350,7 @@ class Comment implements IComment { } /** - * sets the date of the most recent child - * - * @param \DateTime $dateTime - * @return IComment - * @since 9.0.0 + * @inheritDoc */ public function setLatestChildDateTime(\DateTime $dateTime = null) { $this->data['latestChildDT'] = $dateTime; diff --git a/lib/private/Comments/Manager.php b/lib/private/Comments/Manager.php index b7532222c33..f09689867c8 100644 --- a/lib/private/Comments/Manager.php +++ b/lib/private/Comments/Manager.php @@ -167,7 +167,6 @@ class Manager implements ICommentsManager { if ($comment->getId() === '') { $comment->setChildrenCount(0); - $comment->setLatestChildDateTime(new \DateTime('0000-00-00 00:00:00', new \DateTimeZone('UTC'))); $comment->setLatestChildDateTime(null); } diff --git a/lib/public/Comments/IComment.php b/lib/public/Comments/IComment.php index 8465eaf49f4..279fc6c907e 100644 --- a/lib/public/Comments/IComment.php +++ b/lib/public/Comments/IComment.php @@ -230,11 +230,11 @@ interface IComment { /** * sets the date of the most recent child * - * @param \DateTime $dateTime + * @param \DateTime|null $dateTime * @return IComment * @since 9.0.0 */ - public function setLatestChildDateTime(\DateTime $dateTime); + public function setLatestChildDateTime(\DateTime $dateTime = null); /** * returns the object type the comment is attached to