Skip to content
Snippets Groups Projects
Commit e9fede20 authored by Phy's avatar Phy
Browse files

unify send_redirect(wl()) parameters

- always use absolute URL
- use static string instead of array if no concat is required
- use '&' instead of '&'
parent bac90a60
No related branches found
No related tags found
No related merge requests found
......@@ -41,7 +41,7 @@ class Logout extends AbstractUserAction {
// do the logout stuff and redirect to login
auth_logoff();
send_redirect(wl($ID, array('do' => 'login')));
send_redirect(wl($ID, 'do=login', true, '&'));
// should never be reached
throw new ActionException('login');
......
......@@ -55,7 +55,7 @@ class Redirect extends AbstractAliasAction {
* @param array $opts id and fragment for the redirect and the preact
*/
public function redirect($opts) {
$go = wl($opts['id'], '', true);
$go = wl($opts['id'], '', true, '&');
if(isset($opts['fragment'])) $go .= '#' . $opts['fragment'];
//show it
......
......@@ -86,7 +86,7 @@ function getID($param='id',$clean=true){
if (isset($urlParameters['id'])) {
unset($urlParameters['id']);
}
send_redirect(wl($id,$urlParameters,true));
send_redirect(wl($id, $urlParameters, true, '&'));
}
}
......
......@@ -74,7 +74,7 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin {
// save state & force a page reload to get the new settings to take effect
$_SESSION['PLUGIN_CONFIG'] = array('state' => 'updated', 'time' => time());
$this->_close_session();
send_redirect(wl($ID,array('do'=>'admin','page'=>'config'),true,'&'));
send_redirect(wl($ID, 'do=admin&page=config'), true, '&'));
exit();
} elseif(!$this->_error) {
$this->_config->touch_settings(); // just touch to refresh cache
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment