aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/feedController.php
diff options
context:
space:
mode:
authorGravatar Seokseong Jeon <songsong@monet.postech.ac.kr> 2017-05-03 22:52:31 +0900
committerGravatar Seokseong Jeon <songsong@monet.postech.ac.kr> 2017-05-03 22:56:56 +0900
commit09787cfd7a68e994f248c0cad0ebe5ae68b7aaf3 (patch)
tree95f1a79792ae7aae859a0bd119f83b8ee6e58bbb /app/Controllers/feedController.php
parentbe0bcfef7e38f27284ec7b377b342ba389515964 (diff)
actualizeFeed return number of new articles as 3rd
Diffstat (limited to 'app/Controllers/feedController.php')
-rwxr-xr-xapp/Controllers/feedController.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php
index f71f26a4e..eec3b92bc 100755
--- a/app/Controllers/feedController.php
+++ b/app/Controllers/feedController.php
@@ -254,6 +254,7 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
$pshbMinAge = time() - (3600 * 24); //TODO: Make a configuration.
$updated_feeds = 0;
+ $nb_new_articles = 0;
$is_read = FreshRSS_Context::$user_conf->mark_when['reception'] ? 1 : 0;
foreach ($feeds as $feed) {
$url = $feed->url(); //For detection of HTTP 301
@@ -372,6 +373,7 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
$entryDAO->beginTransaction();
}
$entryDAO->addEntry($entry->toArray());
+ $nb_new_articles++;
}
}
$entryDAO->updateLastSeen($feed->id(), $oldGuids, $mtime);
@@ -434,7 +436,7 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
break;
}
}
- return array($updated_feeds, reset($feeds));
+ return array($updated_feeds, reset($feeds), $nb_new_articles);
}
/**