Merge pull request #9272 from nextcloud/bugfix/noid/save-a-query-help-saving-the-world
Only query last comment info, when there is one
This commit is contained in:
commit
9b150001ff
|
@ -407,11 +407,11 @@ class Manager implements ICommentsManager {
|
||||||
$query->setMaxResults($limit);
|
$query->setMaxResults($limit);
|
||||||
}
|
}
|
||||||
|
|
||||||
$lastKnownComment = $this->getLastKnownComment(
|
$lastKnownComment = $lastKnownCommentId > 0 ? $this->getLastKnownComment(
|
||||||
$objectType,
|
$objectType,
|
||||||
$objectId,
|
$objectId,
|
||||||
$lastKnownCommentId
|
$lastKnownCommentId
|
||||||
);
|
) : null;
|
||||||
if ($lastKnownComment instanceof IComment) {
|
if ($lastKnownComment instanceof IComment) {
|
||||||
$lastKnownCommentDateTime = $lastKnownComment->getCreationDateTime();
|
$lastKnownCommentDateTime = $lastKnownComment->getCreationDateTime();
|
||||||
if ($sortDirection === 'desc') {
|
if ($sortDirection === 'desc') {
|
||||||
|
|
Loading…
Reference in New Issue