misc performance: remove extraneous session write DB query
This commit is contained in:
parent
bae9f0852f
commit
7b9470b804
|
@ -71,14 +71,9 @@ function ref_session_write($id, $data) {
|
||||||
|
|
||||||
if ($session_exists) {
|
if ($session_exists) {
|
||||||
$r = q("UPDATE `session`
|
$r = q("UPDATE `session`
|
||||||
SET `data` = '%s'
|
SET `data` = '%s', `expire` = '%s'
|
||||||
WHERE `data` != '%s' AND `sid` = '%s'",
|
WHERE `sid` = '%s'",
|
||||||
dbesc($data), dbesc($data), dbesc($id));
|
dbesc($data), dbesc($expire), dbesc($id));
|
||||||
|
|
||||||
$r = q("UPDATE `session`
|
|
||||||
SET `expire` = '%s'
|
|
||||||
WHERE `expire` != '%s' AND `sid` = '%s'",
|
|
||||||
dbesc($expire), dbesc($expire), dbesc($id));
|
|
||||||
} else {
|
} else {
|
||||||
$r = q("INSERT INTO `session`
|
$r = q("INSERT INTO `session`
|
||||||
SET `sid` = '%s', `expire` = '%s', `data` = '%s'",
|
SET `sid` = '%s', `expire` = '%s', `data` = '%s'",
|
||||||
|
|
Loading…
Reference in a new issue