Merge pull request #32865 from nextcloud/bugfix/remove-unecessary-row

Remove unecessary row and make compatible with db schema
This commit is contained in:
blizzz 2022-07-08 23:11:10 +02:00 committed by GitHub
commit c98e44507d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 9 deletions

View file

@ -351,13 +351,9 @@ 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) {
public function setLatestChildDateTime(?\DateTime $dateTime = null) {
$this->data['latestChildDT'] = $dateTime;
return $this;
}

View file

@ -170,7 +170,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);
}

View file

@ -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