|
@@ -959,6 +959,7 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {
|
|
|
if ($entryDAO->inTransaction()) {
|
|
if ($entryDAO->inTransaction()) {
|
|
|
$entryDAO->commit();
|
|
$entryDAO->commit();
|
|
|
}
|
|
}
|
|
|
|
|
+ Minz_ExtensionManager::callHook(Minz_HookType::FeedsAfterActualize, $feedsCacheToRefresh, $nbNewArticles);
|
|
|
if (rand(0, 30) === 1) { // Remove old cache once in a while
|
|
if (rand(0, 30) === 1) { // Remove old cache once in a while
|
|
|
cleanCache(CLEANCACHE_HOURS);
|
|
cleanCache(CLEANCACHE_HOURS);
|
|
|
}
|
|
}
|
|
@@ -985,9 +986,11 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {
|
|
|
if ($id === -1 && !$noCommit) { //Special request only to commit & refresh DB cache
|
|
if ($id === -1 && !$noCommit) { //Special request only to commit & refresh DB cache
|
|
|
$nbUpdatedFeeds = 0;
|
|
$nbUpdatedFeeds = 0;
|
|
|
$feed = null;
|
|
$feed = null;
|
|
|
- FreshRSS_feed_Controller::commitNewEntries();
|
|
|
|
|
|
|
+ $nbNewArticles = FreshRSS_feed_Controller::commitNewEntries();
|
|
|
$feedDAO = FreshRSS_Factory::createFeedDao();
|
|
$feedDAO = FreshRSS_Factory::createFeedDao();
|
|
|
$feedDAO->updateCachedValues();
|
|
$feedDAO->updateCachedValues();
|
|
|
|
|
+ // The refreshed feeds are not known here: the web interface refreshed them in earlier requests without commit
|
|
|
|
|
+ Minz_ExtensionManager::callHook(Minz_HookType::FeedsAfterActualize, [], $nbNewArticles);
|
|
|
} else {
|
|
} else {
|
|
|
if (!$noCommit) {
|
|
if (!$noCommit) {
|
|
|
$databaseDAO = FreshRSS_Factory::createDatabaseDAO();
|
|
$databaseDAO = FreshRSS_Factory::createDatabaseDAO();
|
|
@@ -1024,6 +1027,9 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {
|
|
|
if ($entryDAO->inTransaction()) {
|
|
if ($entryDAO->inTransaction()) {
|
|
|
$entryDAO->commit();
|
|
$entryDAO->commit();
|
|
|
}
|
|
}
|
|
|
|
|
+ if (!$noCommit) {
|
|
|
|
|
+ Minz_ExtensionManager::callHook(Minz_HookType::FeedsAfterActualize, $feedsCacheToRefresh, $nbNewArticles);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (Minz_Request::paramBoolean('ajax')) {
|
|
if (Minz_Request::paramBoolean('ajax')) {
|