diff options
| author | 2013-12-14 16:22:38 +0100 | |
|---|---|---|
| committer | 2013-12-14 16:22:38 +0100 | |
| commit | 4af233e1f736eb2256e5e1696418635165467855 (patch) | |
| tree | b6c74a3d5de652f8374ffddc9b7b7c25455eb14a /app/models/Entry.php | |
| parent | 7e8e222c871b7394c770176a63a55d9a8ab2b84d (diff) | |
Nettoyage des flux plus intelligent
Implémente https://github.com/marienfressinaud/FreshRSS/issues/323
Garde au moins n+10 articles, où n est le nombre d'articles toujours
présent dans le flux RSS.
Diffstat (limited to 'app/models/Entry.php')
| -rwxr-xr-x | app/models/Entry.php | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/app/models/Entry.php b/app/models/Entry.php index 103a90706..328a7da2e 100755 --- a/app/models/Entry.php +++ b/app/models/Entry.php @@ -423,24 +423,6 @@ class EntryDAO extends Model_pdo { } } - public function cleanOldEntries ($date_min) { - $sql = 'DELETE e.* FROM `' . $this->prefix . 'entry` e INNER JOIN `' . $this->prefix . 'feed` f ON e.id_feed = f.id ' - . 'WHERE e.id <= ? AND e.is_favorite = 0 AND f.keep_history = 0'; - $stm = $this->bd->prepare ($sql); - - $values = array ( - $date_min . '000000' - ); - - if ($stm && $stm->execute ($values)) { - return $stm->rowCount(); - } else { - $info = $stm->errorInfo(); - Minz_Log::record ('SQL error : ' . $info[2], Minz_Log::ERROR); - return false; - } - } - public function searchByGuid ($feed_id, $id) { // un guid est unique pour un flux donné $sql = 'SELECT id, guid, title, author, UNCOMPRESS(content_bin) AS content, link, date, is_read, is_favorite, id_feed, tags ' |
