]> git.wh0rd.org Git - tt-rss.git/commitdiff
move update_rss_feed transaction lock after $rss validity check
authorAndrew Dolgov <fox@bah.spb.su>
Fri, 25 Nov 2005 16:10:41 +0000 (17:10 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Fri, 25 Nov 2005 16:10:41 +0000 (17:10 +0100)
functions.php

index ba7b9e7949e390e62e8a2353a60025f2729927bd..de164c71d9adb7d967b5a82d8f3466ec261bcb21 100644 (file)
 
                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'");
 
                        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, 
                                        last_updated = NOW() WHERE id = '$feed'");
                }
 
-               db_query($link, "COMMIT");
-
        }
 
        function print_select($id, $default, $values, $attributes = "") {