mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-05-19 05:44:39 -04:00
Reduce undeeded use of elvis operator ?: (#7204)
This commit is contained in:
committed by
GitHub
parent
3280ec617f
commit
5368f38753
@@ -35,7 +35,7 @@ class FreshRSS_stats_Controller extends FreshRSS_ActionController {
|
||||
|
||||
$catDAO = FreshRSS_Factory::createCategoryDao();
|
||||
$catDAO->checkDefault();
|
||||
$this->view->categories = $catDAO->listSortedCategories(false) ?: [];
|
||||
$this->view->categories = $catDAO->listSortedCategories(prePopulateFeeds: false);
|
||||
|
||||
FreshRSS_View::prependTitle(_t('admin.stats.title') . ' · ');
|
||||
}
|
||||
@@ -127,7 +127,7 @@ class FreshRSS_stats_Controller extends FreshRSS_ActionController {
|
||||
FreshRSS_View::appendScript(Minz_Url::display('/scripts/feed.js?' . @filemtime(PUBLIC_PATH . '/scripts/feed.js')));
|
||||
$feed_dao = FreshRSS_Factory::createFeedDao();
|
||||
$statsDAO = FreshRSS_Factory::createStatsDAO();
|
||||
$feeds = $statsDAO->calculateFeedLastDate() ?: [];
|
||||
$feeds = $statsDAO->calculateFeedLastDate();
|
||||
$idleFeeds = [
|
||||
'last_5_year' => [],
|
||||
'last_3_year' => [],
|
||||
@@ -223,7 +223,7 @@ class FreshRSS_stats_Controller extends FreshRSS_ActionController {
|
||||
$id = null;
|
||||
}
|
||||
|
||||
$this->view->categories = $categoryDAO->listCategories(true) ?: [];
|
||||
$this->view->categories = $categoryDAO->listCategories(prePopulateFeeds: true);
|
||||
$this->view->feed = $id === null ? FreshRSS_Feed::default() : ($feedDAO->searchById($id) ?? FreshRSS_Feed::default());
|
||||
$this->view->days = $statsDAO->getDays();
|
||||
$this->view->months = $statsDAO->getMonths();
|
||||
|
||||
Reference in New Issue
Block a user