[config] clean cookies on phpMyAdmin upgrade

This commit is contained in:
Sebastian Mendel
2007-03-16 16:48:40 +00:00
parent e190478d01
commit aba1268619

View File

@@ -2807,6 +2807,22 @@ if (get_magic_quotes_gpc()) {
PMA_arrayWalkRecursive($_REQUEST, 'stripslashes', true);
}
/**
* clean cookies on new install or upgrade
* when chaning something with increment the cookie version
*/
$pma_cookie_version = 3;
if (isset($_COOKIE)
&& (! isset($_COOKIE['pmaCookieVer'])
|| $_COOKIE['pmaCookieVer'] < $pma_cookie_version)) {
// delete all cookies
foreach($_COOKIE as $cookie_name => $tmp) {
PMA_removeCookie($cookie_name);
}
$_COOKIE = array();
PMA_setCookie('pmaCookieVer', $pma_cookie_version);
}
/**
* include deprecated grab_globals only if required
*/