Merge pull request #11554 from madhuracj/cookies
Fix cookies clearing on version change
This commit is contained in:
commit
3003a3545f
@ -31,6 +31,7 @@ phpMyAdmin - ChangeLog
|
||||
- issue #11542 Import parser and backslash
|
||||
- issue #11546 "Visualize GIS data" seems to be broken
|
||||
- issue #11548 Confirm box on "Reset slave" option
|
||||
- issue Fix cookies clearing on version change
|
||||
|
||||
4.5.0.2 (2015-09-25)
|
||||
- issue #11497 Incorrect indexes when exporting
|
||||
|
||||
@ -314,16 +314,17 @@ $GLOBALS['PMA_Config']->enableBc();
|
||||
* when changing something related to PMA cookies, increment the cookie version
|
||||
*/
|
||||
$pma_cookie_version = 4;
|
||||
if (isset($_COOKIE)
|
||||
&& (isset($_COOKIE['pmaCookieVer'])
|
||||
&& $_COOKIE['pmaCookieVer'] < $pma_cookie_version)
|
||||
) {
|
||||
// delete all cookies
|
||||
foreach ($_COOKIE as $cookie_name => $tmp) {
|
||||
$GLOBALS['PMA_Config']->removeCookie($cookie_name);
|
||||
if (isset($_COOKIE)) {
|
||||
if (! isset($_COOKIE['pmaCookieVer'])
|
||||
|| $_COOKIE['pmaCookieVer'] != $pma_cookie_version
|
||||
) {
|
||||
// delete all cookies
|
||||
foreach ($_COOKIE as $cookie_name => $tmp) {
|
||||
$GLOBALS['PMA_Config']->removeCookie($cookie_name);
|
||||
}
|
||||
$_COOKIE = array();
|
||||
$GLOBALS['PMA_Config']->setCookie('pmaCookieVer', $pma_cookie_version);
|
||||
}
|
||||
$_COOKIE = array();
|
||||
$GLOBALS['PMA_Config']->setCookie('pmaCookieVer', $pma_cookie_version);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user