diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2012-08-27 15:46:05 -0400 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2012-08-27 20:37:38 -0400 |
commit | 0a9d1ed3a645efda56ae757f45aa7efb5a35ce4f (patch) | |
tree | a2fbdc55f42a149c8a5e738763ce731e9c55f6dc /lib/helper.php | |
parent | 8374a49cc19cf43489a415388fd782ba1574ee82 (diff) | |
download | nextcloud-server-0a9d1ed3a645efda56ae757f45aa7efb5a35ce4f.tar.gz nextcloud-server-0a9d1ed3a645efda56ae757f45aa7efb5a35ce4f.zip |
Initial previewer for public links
Diffstat (limited to 'lib/helper.php')
-rw-r--r-- | lib/helper.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/helper.php b/lib/helper.php index 8c362747a27..3cf464dfa7b 100644 --- a/lib/helper.php +++ b/lib/helper.php @@ -101,6 +101,17 @@ class OC_Helper { } /** + * @brief Creates an absolute url for public use + * @param $service id + * @returns the url + * + * Returns a absolute url to the given service. + */ + public static function linkToPublic($service, $add_slash = false) { + return self::linkToAbsolute( '', 'public.php') . '?service=' . $service . (($add_slash && $service[strlen($service)-1]!='/')?'/':''); + } + + /** * @brief Creates path to an image * @param $app app * @param $image image name |