summaryrefslogtreecommitdiffstats
path: root/bl/feedbl.php
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-04-04 13:23:03 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2013-04-04 13:23:03 +0200
commit1f2391b0cdf8e7a9f8d922c7c2f71acfc4bc6388 (patch)
tree6d4976b4bc1e0d3b5ecf6c4764ecf5a98bf7559c /bl/feedbl.php
parent3ec631a5c799e35ff5dbe519a3151ad62ad186b8 (diff)
move autopurge to itembl
Diffstat (limited to 'bl/feedbl.php')
-rw-r--r--bl/feedbl.php24
1 files changed, 1 insertions, 23 deletions
diff --git a/bl/feedbl.php b/bl/feedbl.php
index 07cf5df8f..53c430336 100644
--- a/bl/feedbl.php
+++ b/bl/feedbl.php
@@ -39,16 +39,13 @@ class FeedBl extends Bl {
private $feedFetcher;
private $itemMapper;
private $api;
- private $autoPurgeCount;
public function __construct(FeedMapper $feedMapper, Fetcher $feedFetcher,
- ItemMapper $itemMapper, API $api,
- $autoPurgeCount=0){
+ ItemMapper $itemMapper, API $api){
parent::__construct($feedMapper);
$this->feedFetcher = $feedFetcher;
$this->itemMapper = $itemMapper;
$this->api = $api;
- $this->autoPurgeCount = $autoPurgeCount;
}
@@ -158,23 +155,4 @@ class FeedBl extends Bl {
}
- /**
- * This method deletes all unread feeds that are not starred and over the
- * count of $this->autoPurgeCount starting by the oldest. This is to clean
- * up the database so that old entries dont spam your db. As criteria for
- * old, the id is taken
- */
- public function autoPurgeOld(){
- $readAndNotStarred =
- $this->mapper->getReadOlderThanThreshold($this->autoPurgeCount);
-
- // delete entries with a lower id than last item
- if($this->autoPurgeCount > 0
- && isset($readAndNotStarred[$this->autoPurgeCount-1])){
- $this->mapper->deleteReadOlderThanId(
- $readAndNotStarred[$this->autoPurgeCount-1]->getId());
- }
- }
-
-
}