summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2009-03-06 18:09:55 +0300
committerAndrew Dolgov <[email protected]>2009-03-06 18:09:55 +0300
commitc205bb8d15364f643eaefd9b60ac2f6a459bc38c (patch)
treee2dcc7f617e509472945d1fa216bc01972c27a67 /functions.php
parent2d5718ae58dadbb7bbcdfe0033838eb3c3346d0b (diff)
ccache_update: protect insert with transaction block
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/functions.php b/functions.php
index d5c231b83..d59d5aa12 100644
--- a/functions.php
+++ b/functions.php
@@ -5861,6 +5861,8 @@
$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");
@@ -5876,6 +5878,8 @@
($feed_id, $unread, $owner_uid, NOW())");
}
+ db_query($link, "COMMIT");
+
if ($feed_id > 0 && $prev_unread != $unread) {
if (!$is_cat) {