diff options
| author | 2016-10-05 21:03:13 +0200 | |
|---|---|---|
| committer | 2016-10-05 21:03:13 +0200 | |
| commit | 11687f01f87799092954fd00db68aaf581c75ffd (patch) | |
| tree | 735601471324914a9351a2e88291ca6bd8f8ce13 /app/Models/EntryDAO.php | |
| parent | 76c4a9aec1ae6b11efbeda16e639b47b9a5e793f (diff) | |
| parent | 1df76fb6b5bd3dced52bd3b41eda54a518bd399b (diff) | |
Merge pull request #1280 from Alkarex/multiuser-optimisation
Take better advantage of other users refresh
Diffstat (limited to 'app/Models/EntryDAO.php')
| -rw-r--r-- | app/Models/EntryDAO.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php index 63565e73a..43ac21f9e 100644 --- a/app/Models/EntryDAO.php +++ b/app/Models/EntryDAO.php @@ -707,13 +707,16 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { } } - public function updateLastSeen($id_feed, $guids) { + public function updateLastSeen($id_feed, $guids, $mtime = 0) { if (count($guids) < 1) { return 0; } $sql = 'UPDATE `' . $this->prefix . 'entry` SET `lastSeen`=? WHERE id_feed=? AND guid IN (' . str_repeat('?,', count($guids) - 1). '?)'; $stm = $this->bd->prepare($sql); - $values = array(time(), $id_feed); + if ($mtime <= 0) { + $mtime = time(); + } + $values = array($mtime, $id_feed); $values = array_merge($values, $guids); if ($stm && $stm->execute($values)) { return $stm->rowCount(); |
