summaryrefslogtreecommitdiffstats
path: root/lib/helper.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/helper.php')
-rw-r--r--lib/helper.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/helper.php b/lib/helper.php
index 3cdb3e53c22..69856085dbe 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