aboutsummaryrefslogtreecommitdiff
path: root/app/Models/EntryDAO.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2018-11-05 18:10:38 +0100
committerGravatar GitHub <noreply@github.com> 2018-11-05 18:10:38 +0100
commitcf899d8d25c57b05dff89b89e2c7e56808f83c50 (patch)
treed91c139f4f7d12c5b83359a6a3c093e6405b93b1 /app/Models/EntryDAO.php
parente1faf9dfcf74725e0616a56303aeeb80fa9ed82f (diff)
TT-RSS import (#2099)
* TT-RSS import Import of Tiny Tiny RSS favourites https://github.com/FreshRSS/FreshRSS/issues/2018#issuecomment-432710462 * Fallback feed_url * Simpler JSON * TT-RSS import custom labels * Fix syntax
Diffstat (limited to 'app/Models/EntryDAO.php')
-rw-r--r--app/Models/EntryDAO.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php
index a01c2227b..708d01a69 100644
--- a/app/Models/EntryDAO.php
+++ b/app/Models/EntryDAO.php
@@ -671,6 +671,15 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable {
return isset($entries[0]) ? $entries[0] : null;
}
+ public function searchIdByGuid($id_feed, $guid) {
+ $sql = 'SELECT id FROM `' . $this->prefix . 'entry` WHERE id_feed=? AND guid=?';
+ $stm = $this->bd->prepare($sql);
+ $values = array($id_feed, $guid);
+ $stm->execute($values);
+ $res = $stm->fetchAll(PDO::FETCH_COLUMN, 0);
+ return isset($res[0]) ? $res[0] : null;
+ }
+
protected function sqlConcat($s1, $s2) {
return 'CONCAT(' . $s1 . ',' . $s2 . ')'; //MySQL
}