Unified cookie path handling, added / to end of path (bug #1155373).

This commit is contained in:
Michal Čihař
2005-03-06 21:10:53 +00:00
parent 39ec69da1c
commit a9aedbe951
8 changed files with 25 additions and 36 deletions

View File

@@ -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']);
}
}
}