summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorTom Needham <needham.thomas@gmail.com>2011-10-04 19:17:23 +0100
committerTom Needham <needham.thomas@gmail.com>2011-10-04 19:17:23 +0100
commit2d9c3d75f3109286f42ae417c423608ce3ee12c4 (patch)
tree05d45c84c93771b7c42907c062b9dc7c324af68d /lib
parent09c1179094af696002e54c8e462755b499341032 (diff)
parent4bcb6f5346271e0a92b4b0450f709474910d571b (diff)
downloadnextcloud-server-2d9c3d75f3109286f42ae417c423608ce3ee12c4.tar.gz
nextcloud-server-2d9c3d75f3109286f42ae417c423608ce3ee12c4.zip
Merge branch 'master' of gitorious.org:owncloud/owncloud into ace-editor
Diffstat (limited to 'lib')
-rw-r--r--lib/helper.php2
-rw-r--r--lib/util.php6
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/helper.php b/lib/helper.php
index b6332b54aea..9c2b5fc33ce 100644
--- a/lib/helper.php
+++ b/lib/helper.php
@@ -61,7 +61,7 @@ class OC_Helper {
}
if($redirect_url)
- return $urlLinkTo.'?redirect_url='.$redirect_url;
+ return $urlLinkTo.'?redirect_url='.urlencode($_SERVER["REQUEST_URI"]);
else
return $urlLinkTo;
diff --git a/lib/util.php b/lib/util.php
index 5d03c56f18e..f8748e868c1 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -321,7 +321,11 @@ class OC_Util {
* Redirect to the user default page
*/
public static function redirectToDefaultPage(){
- header( 'Location: '.OC::$WEBROOT.'/'.OC_Appconfig::getValue('core', 'defaultpage', 'files/index.php'));
+ if(isset($_REQUEST['redirect_url'])) {
+ header( 'Location: '.$_REQUEST['redirect_url']);
+ } else {
+ header( 'Location: '.OC::$WEBROOT.'/'.OC_Appconfig::getValue('core', 'defaultpage', 'files/index.php'));
+ }
exit();
}
}