[Phpmyadmin-devel] repeated code in Version check
Mohamed Ashraf
mohamed.ashraf.213 at gmail.com
Mon Jul 29 21:49:22 CEST 2013
I pulled master lately and I found that Michal Čihař has refactored
the code that requests the latest version info. I needed to update a
few things specifically with the renaming of the proxy variable names.
Anyway I noticed a strange piece of code in the function:
if ($save) {
$_SESSION['cache']['version_check'] = array(
'response' => $response,
'timestamp' => time()
);
}
$data = json_decode($response);
if (is_object($data)
&& strlen($data->version)
&& strlen($data->date)
) {
if ($save) {
$_SESSION['cache']['version_check'] = array(
'response' => $response,
'timestamp' => time()
);
}
}
why is the part that saves the response in the cache written twice in
succession. I looked at the commit in question dcd8d12cf6c4a345 and
noticed that the first repetition did not exist in the original code.
I think that the first repetition should be removed but I thought I
should run it by you first
--
Mohamed Ashraf
More information about the Developers
mailing list