]> git.mxchange.org Git - friendica.git/commitdiff
misc performance: remove extraneous session write DB query
authorHypolite Petovan <ben.lort@gmail.com>
Sun, 6 Nov 2016 04:52:31 +0000 (00:52 -0400)
committerHypolite Petovan <ben.lort@gmail.com>
Sun, 6 Nov 2016 04:52:31 +0000 (00:52 -0400)
include/session.php

index 763b05f48166babb5d8eaf28976a22de68e8f587..8cce1488b19e960ac999e332597c359ff051f61f 100644 (file)
@@ -71,14 +71,9 @@ function ref_session_write($id, $data) {
 
        if ($session_exists) {
                $r = q("UPDATE `session`
-                               SET `data` = '%s'
-                               WHERE `data` != '%s' AND `sid` = '%s'",
-                               dbesc($data), dbesc($data), dbesc($id));
-
-               $r = q("UPDATE `session`
-                               SET `expire` = '%s'
-                               WHERE `expire` != '%s' AND `sid` = '%s'",
-                               dbesc($expire), dbesc($expire), dbesc($id));
+                               SET `data` = '%s', `expire` = '%s'
+                               WHERE `sid` = '%s'",
+                               dbesc($data), dbesc($expire), dbesc($id));
        } else {
                $r = q("INSERT INTO `session`
                                SET `sid` = '%s', `expire` = '%s', `data` = '%s'",