зеркало из https://github.com/nextcloud/news.git
deleted old code that i forgot to delete
This commit is contained in:
Родитель
1f2391b0cd
Коммит
180b36f9b2
|
@ -122,25 +122,5 @@ class FeedMapper extends Mapper implements IMapper {
|
|||
}
|
||||
|
||||
|
||||
public function getReadOlderThanThreshold($threshold){
|
||||
|
||||
// we want items that are not starred and not unread
|
||||
$status = StatusFlag::STARRED | StatusFlag::UNREAD;
|
||||
$sql = 'SELECT * FROM `*PREFIX*news_items` ' .
|
||||
'WHERE NOT ((`status` & ?) > 0)';
|
||||
|
||||
$params = array($status);
|
||||
return $this->findAllRows($sql, $params, $threshold);
|
||||
}
|
||||
|
||||
|
||||
public function deleteReadOlderThanId($id){
|
||||
$status = StatusFlag::STARRED | StatusFlag::UNREAD;
|
||||
$sql = 'DELETE FROM `*PREFIX*news_items` WHERE `id` < ? ' .
|
||||
'AND NOT ((`status` & ?) > 0)';
|
||||
$params = array($id, $status);
|
||||
$this->execute($sql, $params);
|
||||
}
|
||||
|
||||
|
||||
}
|
Загрузка…
Ссылка в новой задаче