]> git.wh0rd.org Git - tt-rss.git/commitdiff
Labels were cached without taking into account related owner
authorCharlie Root <bvel@free.fr>
Mon, 5 Nov 2012 15:36:47 +0000 (16:36 +0100)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 6 Nov 2012 07:58:22 +0000 (11:58 +0400)
include/functions.php

index 9edd2dd2c099b65791db95c743263c4d879d58b9..33a83b08ad5bb7c179b0c36f6d026379d4fe7179 100644 (file)
                }
 
                if (count($rv) > 0)
-                       label_update_cache($link, $id, $rv);
+                       label_update_cache($link, $owner_uid, $id, $rv);
                else
-                       label_update_cache($link, $id, array("no-labels" => 1));
+                       label_update_cache($link, $owner_uid, $id, array("no-labels" => 1));
 
                return $rv;
        }
                return $rv;
        }
 
-       function label_update_cache($link, $id, $labels = false, $force = false) {
+       function label_update_cache($link, $owner_uid, $id, $labels = false, $force = false) {
 
                if ($force)
                        label_clear_cache($link, $id);
                $labels = db_escape_string(json_encode($labels));
 
                db_query($link, "UPDATE ttrss_user_entries SET
-                       label_cache = '$labels' WHERE ref_id = '$id'");
+                       label_cache = '$labels' WHERE ref_id = '$id' AND  owner_uid = '$owner_uid'");
 
        }