diff options
| author | 2018-10-28 09:49:10 +0100 | |
|---|---|---|
| committer | 2018-10-28 09:49:10 +0100 | |
| commit | e04804d0f67dd43fd3f072b9a127768ee7b7b56c (patch) | |
| tree | a49023ed25aab7fb1c1aafe749f7d462de0027b2 /app/Controllers/feedController.php | |
| parent | 44bd07e506ade204151c276fdc05994d51efdd7a (diff) | |
| parent | 4234dfe0d72b61fe931d2c76a1d8a335ce65a209 (diff) | |
Merge pull request #2049 from FreshRSS/dev1.12.0
FreshRSS 1.12.0
Diffstat (limited to 'app/Controllers/feedController.php')
| -rwxr-xr-x | app/Controllers/feedController.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index 2f7495884..f2b1b8960 100755 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -43,7 +43,7 @@ class FreshRSS_feed_Controller extends Minz_ActionController { FreshRSS_UserDAO::touch(); @set_time_limit(300); - $catDAO = new FreshRSS_CategoryDAO(); + $catDAO = FreshRSS_Factory::createCategoryDao(); $url = trim($url); @@ -192,7 +192,7 @@ class FreshRSS_feed_Controller extends Minz_ActionController { // GET request: we must ask confirmation to user before adding feed. Minz_View::prependTitle(_t('sub.feed.title_add') . ' ยท '); - $this->catDAO = new FreshRSS_CategoryDAO(); + $this->catDAO = FreshRSS_Factory::createCategoryDao(); $this->view->categories = $this->catDAO->listCategories(false); $this->view->feed = new FreshRSS_Feed($url); try { @@ -481,6 +481,9 @@ class FreshRSS_feed_Controller extends Minz_ActionController { if ($entryDAO->inTransaction()) { $entryDAO->commit(); } + + $databaseDAO = FreshRSS_Factory::createDatabaseDAO(); + $databaseDAO->minorDbMaintenance(); } return array($updated_feeds, reset($feeds), $nb_new_articles); } @@ -511,6 +514,9 @@ class FreshRSS_feed_Controller extends Minz_ActionController { $entryDAO->commitNewEntries(); $feedDAO->updateCachedValues(); $entryDAO->commit(); + + $databaseDAO = FreshRSS_Factory::createDatabaseDAO(); + $databaseDAO->minorDbMaintenance(); } else { list($updated_feeds, $feed, $nb_new_articles) = self::actualizeFeed($id, $url, $force, null, false, $noCommit); } @@ -556,7 +562,7 @@ class FreshRSS_feed_Controller extends Minz_ActionController { } FreshRSS_UserDAO::touch(); - $catDAO = new FreshRSS_CategoryDAO(); + $catDAO = FreshRSS_Factory::createCategoryDao(); if ($cat_id > 0) { $cat = $catDAO->searchById($cat_id); $cat_id = $cat == null ? 0 : $cat->id(); |
