diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-02-21 20:05:02 +0100 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-02-21 20:09:24 +0100 |
commit | 987845c31206b3d193e41e65ed6b964efc26f127 (patch) | |
tree | 6d82b565b64d7c8d07bee63abb1089b851310705 /lib/helper.php | |
parent | 21f8d0992f1ae389d8c9acc870927285e9413a96 (diff) | |
download | nextcloud-server-987845c31206b3d193e41e65ed6b964efc26f127.tar.gz nextcloud-server-987845c31206b3d193e41e65ed6b964efc26f127.zip |
Move the redirect_url from linkTo function to the checkLoggedIn function
Diffstat (limited to 'lib/helper.php')
-rw-r--r-- | lib/helper.php | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/lib/helper.php b/lib/helper.php index b1e6d053a19..2f71bdad2dc 100644 --- a/lib/helper.php +++ b/lib/helper.php @@ -29,12 +29,11 @@ class OC_Helper { * @brief Creates an url * @param $app app * @param $file file - * @param $redirect_url redirect_url variable is appended to the URL * @returns the url * * Returns a url to the given app and file. */ - public static function linkTo( $app, $file, $redirect_url=NULL, $absolute=false ){ + public static function linkTo( $app, $file ){ if( $app != '' ){ $app .= '/'; // Check if the app is in the app folder @@ -54,24 +53,19 @@ class OC_Helper { } } - if($redirect_url) - return $urlLinkTo.'?redirect_url='.urlencode($_SERVER["REQUEST_URI"]); - else - return $urlLinkTo; - + return $urlLinkTo; } /** * @brief Creates an absolute url * @param $app app * @param $file file - * @param $redirect_url redirect_url variable is appended to the URL * @returns the url * * Returns a absolute url to the given app and file. */ - public static function linkToAbsolute( $app, $file, $redirect_url=NULL ) { - $urlLinkTo = self::linkTo( $app, $file, $redirect_url ); + public static function linkToAbsolute( $app, $file ) { + $urlLinkTo = self::linkTo( $app, $file ); // Checking if the request was made through HTTPS. The last in line is for IIS $protocol = isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) && ($_SERVER['HTTPS']!='off'); $urlLinkTo = ($protocol?'https':'http') . '://' . $_SERVER['HTTP_HOST'] . $urlLinkTo; |