diff options
author | Joas Schilling <coding@schilljs.com> | 2018-10-18 12:35:11 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2018-10-18 12:35:11 +0300 |
commit | 5b786ceacb520e9a902f95731120f7ecb75b412e (patch) | |
tree | d6cf526d97901c6099ff53e5c060e946b75c68dd | |
parent | 57fcf4fe40bd42ccbc2923639f4c32ce8f56fbc9 (diff) |
Make the link to circles absolute
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r-- | lib/Activity/ProviderParser.php | 2 | ||||
-rw-r--r-- | lib/Api/v1/Circles.php | 19 |
2 files changed, 18 insertions, 3 deletions
diff --git a/lib/Activity/ProviderParser.php b/lib/Activity/ProviderParser.php index 418ef4b5..b9f59199 100644 --- a/lib/Activity/ProviderParser.php +++ b/lib/Activity/ProviderParser.php @@ -318,7 +318,7 @@ class ProviderParser { 'id' => $circle->getId(), 'name' => $circle->getName(), '_parsed' => $circle->getName(), - 'link' => Circles::generateLink($circle->getUniqueId()) + 'link' => Circles::generateAbsoluteLink($circle->getUniqueId()) ]; } diff --git a/lib/Api/v1/Circles.php b/lib/Api/v1/Circles.php index 64f4c597..48b2bd86 100644 --- a/lib/Api/v1/Circles.php +++ b/lib/Api/v1/Circles.php @@ -458,7 +458,22 @@ class Circles { /** - * Circles::generateLink(); + * Circles::generateAbsoluteLink(); + * + * Returns the absolute link to get access to a local circle. + * + * @param string $circleUniqueId + * + * @return string + */ + public static function generateAbsoluteLink($circleUniqueId) { + return \OC::$server->getURLGenerator() + ->linkToRouteAbsolute('circles.Navigation.navigate') . '#' . $circleUniqueId; + } + + + /** + * Circles::generateRemoteLink(); * * Returns the link to get access to a remote circle. * @@ -529,4 +544,4 @@ class Circles { return $c->query(CirclesService::class) ->getFilesForCircles($circleUniqueIds); } -}
\ No newline at end of file +} |