summaryrefslogtreecommitdiffstats
path: root/lib/helper.php
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-08-30 21:49:28 +0200
committerBart Visscher <bartv@thisnet.nl>2012-08-30 21:49:28 +0200
commitb483f2aab856e3324026588a9702043072fd7ad2 (patch)
tree9a5696d43ae53160bee592e1b6874185cbd98ad4 /lib/helper.php
parentcbaf858dea0f2094805edb6aa223bdd6877fff5b (diff)
parent598815b21e94219eb66684c64802e165a35180ad (diff)
downloadnextcloud-server-b483f2aab856e3324026588a9702043072fd7ad2.tar.gz
nextcloud-server-b483f2aab856e3324026588a9702043072fd7ad2.zip
Merge branch 'master' into routing
Conflicts: apps/contacts/js/contacts.js apps/contacts/lib/search.php apps/files_archive/js/archive.js apps/gallery/lib/tiles.php apps/gallery/templates/index.php lib/ocs.php
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