redirect url fixed
This commit is contained in:
parent
314e84716b
commit
33f24a42b8
4 changed files with 8 additions and 3 deletions
|
@ -1,5 +1,6 @@
|
|||
<form action="index.php" method="post">
|
||||
<fieldset>
|
||||
<?php if(!empty($_['redirect'])) { echo '<input type="hidden" name="redirect_url" value="'.$_['redirect'].'" />'; } ?>
|
||||
<?php if($_['error']): ?>
|
||||
<a href="./core/lostpassword/"><?php echo $l->t('Lost your password?'); ?></a>
|
||||
<?php endif; ?>
|
||||
|
|
|
@ -90,5 +90,5 @@ else {
|
|||
}
|
||||
}
|
||||
|
||||
OC_Template::printGuestPage('', 'login', array('error' => $error ));
|
||||
OC_Template::printGuestPage('', 'login', array('error' => $error, 'redirect' => isset($_REQUEST['redirect_url'])?$_REQUEST['redirect_url']:'' ));
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue