diff options
author | Frank Karlitschek <frank@owncloud.org> | 2012-05-01 23:19:39 +0200 |
---|---|---|
committer | Frank Karlitschek <frank@owncloud.org> | 2012-05-01 23:19:39 +0200 |
commit | e48f511606a1ef64aa39099055dd6ae437f45d03 (patch) | |
tree | 6ecbbc9c14cb621845fc12af9412e24d17168397 /lib/public | |
parent | 31e32e3c10ace169e0d841ff6e4b17d11fe64f1b (diff) | |
download | nextcloud-server-e48f511606a1ef64aa39099055dd6ae437f45d03.tar.gz nextcloud-server-e48f511606a1ef64aa39099055dd6ae437f45d03.zip |
port linkto and serverHost
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/util.php | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/lib/public/util.php b/lib/public/util.php index 5cfcbaeeffc..b18f0d2311f 100644 --- a/lib/public/util.php +++ b/lib/public/util.php @@ -122,10 +122,41 @@ class Util { + /** + * @brief Creates an absolute url + * @param $app app + * @param $file file + * @returns the url + * + * Returns a absolute url to the given app and file. + */ + public static function linkToAbsolute( $app, $file ) { + return(\OC_Helper::linkToAbsolute( $app, $file )); + } + /** + * @brief Creates an url + * @param $app app + * @param $file file + * @returns the url + * + * Returns a url to the given app and file. + */ + public static function linkTo( $app, $file ){ + return(\OC_Helper::linkTo( $app, $file )); + } - + /** + * @brief Returns the server host + * @returns the server host + * + * Returns the server host, even if the website uses one or more + * reverse proxies + */ + public static function getServerHost() { + return(\OC_Helper::severHost()); + } |