aboutsummaryrefslogtreecommitdiff
path: root/p/api
diff options
context:
space:
mode:
Diffstat (limited to 'p/api')
-rw-r--r--p/api/fever.php2
-rw-r--r--p/api/greader.php12
2 files changed, 7 insertions, 7 deletions
diff --git a/p/api/fever.php b/p/api/fever.php
index b3a2a074c..2ef3e4f9a 100644
--- a/p/api/fever.php
+++ b/p/api/fever.php
@@ -335,7 +335,7 @@ final class FeverAPI
$groups = [];
$categoryDAO = FreshRSS_Factory::createCategoryDao();
- $categories = $categoryDAO->listCategories(false, false) ?: [];
+ $categories = $categoryDAO->listCategories(prePopulateFeeds: false, details: false);
foreach ($categories as $category) {
$groups[] = [
diff --git a/p/api/greader.php b/p/api/greader.php
index bbe533c86..4c9b183e3 100644
--- a/p/api/greader.php
+++ b/p/api/greader.php
@@ -280,7 +280,7 @@ final class GReaderAPI {
// ['id' => 'user/-/state/com.google/broadcast', 'sortid' => '2']
];
$categoryDAO = FreshRSS_Factory::createCategoryDao();
- $categories = $categoryDAO->listCategories(prePopulateFeeds: false, details: false) ?: [];
+ $categories = $categoryDAO->listCategories(prePopulateFeeds: false, details: false);
foreach ($categories as $cat) {
$tags[] = [
'id' => 'user/-/label/' . htmlspecialchars_decode($cat->name(), ENT_QUOTES),
@@ -290,7 +290,7 @@ final class GReaderAPI {
}
$tagDAO = FreshRSS_Factory::createTagDao();
- $labels = $tagDAO->listTags(true) ?: [];
+ $labels = $tagDAO->listTags(precounts: true);
foreach ($labels as $label) {
$tags[] = [
'id' => 'user/-/label/' . htmlspecialchars_decode($label->name(), ENT_QUOTES),
@@ -338,7 +338,7 @@ final class GReaderAPI {
$subscriptions = [];
$categoryDAO = FreshRSS_Factory::createCategoryDao();
- foreach ($categoryDAO->listCategories(true, true) ?: [] as $cat) {
+ foreach ($categoryDAO->listCategories(prePopulateFeeds: true, details: true) as $cat) {
foreach ($cat->feeds() as $feed) {
$subscriptions[] = [
'id' => 'feed/' . $feed->id(),
@@ -493,7 +493,7 @@ final class GReaderAPI {
$feedDAO = FreshRSS_Factory::createFeedDao();
$feedsNewestItemUsec = $feedDAO->listFeedsNewestItemUsec();
$unreadcounts = [];
- foreach ($categoryDAO->listCategories(true, true) ?: [] as $cat) {
+ foreach ($categoryDAO->listCategories(prePopulateFeeds: true, details: true) as $cat) {
$catLastUpdate = 0;
foreach ($cat->feeds() as $feed) {
$lastUpdate = $feedsNewestItemUsec['f_' . $feed->id()] ?? 0;
@@ -519,7 +519,7 @@ final class GReaderAPI {
$tagDAO = FreshRSS_Factory::createTagDao();
$tagsNewestItemUsec = $tagDAO->listTagsNewestItemUsec();
- foreach ($tagDAO->listTags(true) ?: [] as $label) {
+ foreach ($tagDAO->listTags(precounts: true) as $label) {
$lastUpdate = $tagsNewestItemUsec['t_' . $label->id()] ?? 0;
$unreadcounts[] = [
'id' => 'user/-/label/' . htmlspecialchars_decode($label->name(), ENT_QUOTES),
@@ -550,7 +550,7 @@ final class GReaderAPI {
return [];
}
$catDAO = FreshRSS_Factory::createCategoryDao();
- $categories = $catDAO->listCategories(true) ?: [];
+ $categories = $catDAO->listCategories(prePopulateFeeds: true);
$tagDAO = FreshRSS_Factory::createTagDao();
$entryIdsTagNames = $tagDAO->getEntryIdsTagNames($entries);