From 8a386529a18046a53e68c931053b8eee4f4a2e0b Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 17 Apr 2013 22:09:11 +0400 Subject: [PATCH 1/2] update: only wait when pidlock is enabled --- update.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update.php b/update.php index e13abafca..be7314175 100755 --- a/update.php +++ b/update.php @@ -128,7 +128,7 @@ $lock_handle = make_lockfile($lock_filename); $must_exit = false; - if (isset($options["task"])) { + if (isset($options["task"]) && isset($options["pidlock"])) { $waits = $options["task"] * 5; _debug("Waiting before update ($waits)"); sleep($waits); From a08f94bd0e177c4ffaf9211e0e4c3872a68ac35b Mon Sep 17 00:00:00 2001 From: Matthias Wirtz Date: Wed, 17 Apr 2013 20:24:07 +0200 Subject: [PATCH 2/2] make us of db_affected_rows($result) instead of using db specific functions --- include/functions.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/include/functions.php b/include/functions.php index 66d5896d1..8215127de 100644 --- a/include/functions.php +++ b/include/functions.php @@ -223,8 +223,6 @@ ttrss_entries.date_updated < NOW() - INTERVAL '$purge_interval days'"); } - $rows = pg_affected_rows($result); - } else { /* $result = db_query("DELETE FROM ttrss_user_entries WHERE @@ -239,11 +237,10 @@ feed_id = '$feed_id' AND $query_limit ttrss_entries.date_updated < DATE_SUB(NOW(), INTERVAL $purge_interval DAY)"); - - $rows = mysql_affected_rows(); - } + $rows = db_affected_rows($result); + ccache_update($feed_id, $owner_uid); if ($debug) {