Unified cookie path handling, added / to end of path (bug #1155373).
This commit is contained in:
@@ -44,11 +44,11 @@ if (isset($new_name) && trim($new_name) != '') {
|
||||
} else {
|
||||
$pma_uri_parts = parse_url($cfg['PmaAbsoluteUri']);
|
||||
if (isset($switch_to_new) && $switch_to_new == 'true') {
|
||||
setcookie('pma_switch_to_new', 'true', 0, substr($pma_uri_parts['path'], 0, strrpos($pma_uri_parts['path'], '/')), '', ($pma_uri_parts['scheme'] == 'https'));
|
||||
setcookie('pma_switch_to_new', 'true', 0, $GLOBALS['cookie_path'], '' , $GLOBALS['is_https']);
|
||||
$db = $target_db;
|
||||
$table = $new_name;
|
||||
} else {
|
||||
setcookie('pma_switch_to_new', '', 0, substr($pma_uri_parts['path'], 0, strrpos($pma_uri_parts['path'], '/')), '', ($pma_uri_parts['scheme'] == 'https'));
|
||||
setcookie('pma_switch_to_new', '', 0, $GLOBALS['cookie_path'], '' , $GLOBALS['is_https']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user