diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-01-26 17:20:32 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-01-26 17:20:32 +0100 |
commit | aa598fc7012fa584df7dc397ae70997f97b7c8ae (patch) | |
tree | bf12393484a4d6cd47b9bbb6e3a873739f9ef75b /lib/private | |
parent | cfb6539b01930c7f7bbea88261a73ad4693f05aa (diff) | |
parent | 3b7ded863b0b8175b10a3140586507ee3d027823 (diff) | |
download | nextcloud-server-aa598fc7012fa584df7dc397ae70997f97b7c8ae.tar.gz nextcloud-server-aa598fc7012fa584df7dc397ae70997f97b7c8ae.zip |
Merge pull request #21664 from owncloud/comments-dav
Comments DAV implementation
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/comments/comment.php | 4 | ||||
-rw-r--r-- | lib/private/comments/manager.php | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/private/comments/comment.php b/lib/private/comments/comment.php index 1e1514a5872..75964603f9f 100644 --- a/lib/private/comments/comment.php +++ b/lib/private/comments/comment.php @@ -284,9 +284,9 @@ class Comment implements IComment { } /** - * returns the timestamp of the most recent child + * returns the DateTime of the most recent child, if set, otherwise null * - * @return int + * @return \DateTime|null * @since 9.0.0 */ public function getLatestChildDateTime() { diff --git a/lib/private/comments/manager.php b/lib/private/comments/manager.php index 64013a9e11f..64977c48895 100644 --- a/lib/private/comments/manager.php +++ b/lib/private/comments/manager.php @@ -58,7 +58,9 @@ class Manager implements ICommentsManager { $data['parent_id'] = strval($data['parent_id']); $data['topmost_parent_id'] = strval($data['topmost_parent_id']); $data['creation_timestamp'] = new \DateTime($data['creation_timestamp']); - $data['latest_child_timestamp'] = new \DateTime($data['latest_child_timestamp']); + if (!is_null($data['latest_child_timestamp'])) { + $data['latest_child_timestamp'] = new \DateTime($data['latest_child_timestamp']); + } $data['children_count'] = intval($data['children_count']); return $data; } |