diff options
| author | 2014-03-30 14:28:13 +0200 | |
|---|---|---|
| committer | 2014-03-30 14:28:13 +0200 | |
| commit | 779afe9c4ee00f8099a423e1fceee40197a90cfa (patch) | |
| tree | abfe8682ba0032711e0eba53eb615a248943a1bd /app/Models/FeedDAO.php | |
| parent | 9ea3819402746d8425d4a608f2d5f3c0f5bc29fb (diff) | |
Import of articles is implemented!
- Remove massiveImportAction and addCategories from FeedController
- Fix typo for some methods (camelCase)
- addCategoryObject and addFeedObject return id if corresponding object already
exists in DB
- introduce addEntryObject. Return -1 if Entry already exist (in order to keep
quite good performances)
- Complete importArticles method
Need some more tests + better performance
Diffstat (limited to 'app/Models/FeedDAO.php')
| -rw-r--r-- | app/Models/FeedDAO.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/Models/FeedDAO.php b/app/Models/FeedDAO.php index eac21df7e..b65ff4af0 100644 --- a/app/Models/FeedDAO.php +++ b/app/Models/FeedDAO.php @@ -29,7 +29,8 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo { // should not be aware about feed class // Add feed only if we don't find it in DB - if (!$this->searchByUrl($feed->url())) { + $feed_search = $this->searchByUrl($feed->url()); + if (!$feed_search) { $values = array( 'id' => $feed->id(), 'url' => $feed->url(), @@ -50,7 +51,7 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo { return $id; } - return false; + return $feed_search->id(); } public function updateFeed ($id, $valuesTmp) { |
