summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Comments/Manager.php76
-rw-r--r--lib/public/Comments/ICommentsManager.php22
2 files changed, 0 insertions, 98 deletions
diff --git a/lib/private/Comments/Manager.php b/lib/private/Comments/Manager.php
index 3b5eb23844c..078e1eef4d3 100644
--- a/lib/private/Comments/Manager.php
+++ b/lib/private/Comments/Manager.php
@@ -318,82 +318,6 @@ class Manager implements ICommentsManager {
}
/**
- * Get the actor types and ID that commented in the tree specified by the ID
- *
- * @param string $id
- * @return array
- * @since 13.0.0
- *
- * The return array looks like this:
- *
- * [
- * 'user' => [
- * 'alice' => 2,
- * 'bob' => 3
- * ],
- * 'robot' => [
- * 'r2-d2' => 5,
- * 'c-3po' => 17,
- * ]
- * ]
- */
- public function getActorsInTree($id) {
- $tree = $this->getTree($id);
- $actors = [];
- $this->walkTree($tree, $actors, [$this, 'extractActor']);
- return $actors;
- }
-
- /**
- * @param IComment $comment
- * @param array &$actors
- *
- * build an array that looks like:
- *
- * [
- * 'user' => [
- * 'alice' => 2,
- * 'bob' => 3
- * ],
- * 'robot' => [
- * 'r2-d2' => 5,
- * 'c-3po' => 17,
- * ]
- * ]
- *
- */
- protected function extractActor(IComment $comment, &$actors) {
- if(!isset($actors[$comment->getActorType()])) {
- $actors[$comment->getActorType()] = [];
- }
- if(!isset($actors[$comment->getActorType()][$comment->getActorId()])) {
- $actors[$comment->getActorType()][$comment->getActorId()] = 1;
- } else {
- $actors[$comment->getActorType()][$comment->getActorId()] += 1;
- }
- }
-
- /**
- * walks through a comment tree (as returned by getTree() and invokes a callback
- * with the current IComment instance (and optionally custom parameters)
- *
- * @param array $node
- * @param array &$results
- * @param callable $callback
- * @param array|null $parameters
- */
- protected function walkTree($node, array &$results, callable $callback, array $parameters = null) {
- if(isset($node['replies'])) {
- foreach ($node['replies'] as $subNode) {
- $this->walkTree($subNode, $results, $callback, $parameters);
- }
- }
- if(isset($node['comment']) && $node['comment'] instanceof IComment) {
- $callback($node['comment'], $results, $parameters);
- }
- }
-
- /**
* returns comments for a specific object (e.g. a file).
*
* The sort order is always newest to oldest.
diff --git a/lib/public/Comments/ICommentsManager.php b/lib/public/Comments/ICommentsManager.php
index e3ea7888ffd..61633af95cd 100644
--- a/lib/public/Comments/ICommentsManager.php
+++ b/lib/public/Comments/ICommentsManager.php
@@ -138,28 +138,6 @@ interface ICommentsManager {
public function getNumberOfUnreadCommentsForFolder($folderId, IUser $user);
/**
- * Get the actor types and ID that commented in the tree specified by the ID
- *
- * @param string $id
- * @return array
- * @since 13.0.0
- *
- * The return array looks like this:
- *
- * [
- * 'users' => [
- * 'alice',
- * 'bob',
- * ],
- * 'robots' => [
- * 'r2-d2',
- * 'c-3po',
- * ]
- * ]
- */
- public function getActorsInTree($id);
-
- /**
* creates a new comment and returns it. At this point of time, it is not
* saved in the used data storage. Use save() after setting other fields
* of the comment (e.g. message or verb).