]> git.wh0rd.org Git - tt-rss.git/commitdiff
ccache_update: protect insert with transaction block
authorAndrew Dolgov <fox@bah.org.ru>
Fri, 6 Mar 2009 15:09:55 +0000 (18:09 +0300)
committerAndrew Dolgov <fox@bah.org.ru>
Fri, 6 Mar 2009 15:09:55 +0000 (18:09 +0300)
functions.php

index d5c231b83ec7b5d41ca86fec1507602cecc08abf..d59d5aa125d9c68adc2c1e4413354d6e8e75ec4c 100644 (file)
                        $unread = (int) getFeedArticles($link, $feed_id, $is_cat, true, $owner_uid);
                }
 
+               db_query($link, "BEGIN");
+
                $result = db_query($link, "SELECT feed_id FROM $table
                        WHERE owner_uid = '$owner_uid' AND feed_id = '$feed_id' LIMIT 1");
 
                                ($feed_id, $unread, $owner_uid, NOW())");
                }
 
+               db_query($link, "COMMIT");
+
                if ($feed_id > 0 && $prev_unread != $unread) {
 
                        if (!$is_cat) {