summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2005-11-25 17:10:41 +0100
committerAndrew Dolgov <[email protected]>2005-11-25 17:10:41 +0100
commitdd8c76a9a2661c4f3277de96642f2b180250c9a7 (patch)
tree23ff690023333f99f5ddd928c0709195d9aaed35 /functions.php
parent25af8dadb48a99fa4105696da231f377e2b8b38a (diff)
move update_rss_feed transaction lock after $rss validity check
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/functions.php b/functions.php
index ba7b9e794..de164c71d 100644
--- a/functions.php
+++ b/functions.php
@@ -175,12 +175,12 @@
error_reporting (DEFAULT_ERROR_LEVEL);
- db_query($link, "BEGIN");
-
$feed = db_escape_string($feed);
if ($rss) {
+ db_query($link, "BEGIN");
+
$result = db_query($link, "SELECT title,icon_url,site_url,owner_uid
FROM ttrss_feeds WHERE id = '$feed'");
@@ -459,6 +459,8 @@
db_query($link, "UPDATE ttrss_feeds
SET last_updated = NOW(), last_error = '' WHERE id = '$feed'");
+ db_query($link, "COMMIT");
+
} else {
$error_msg = db_escape_string(magpie_error());
db_query($link,
@@ -466,8 +468,6 @@
last_updated = NOW() WHERE id = '$feed'");
}
- db_query($link, "COMMIT");
-
}
function print_select($id, $default, $values, $attributes = "") {