aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/Controllers/statsController.php1
-rw-r--r--app/Controllers/subscriptionController.php1
-rw-r--r--app/Models/View.php1
-rw-r--r--app/Models/ViewStats.php1
-rw-r--r--app/Services/ImportService.php2
-rw-r--r--app/views/helpers/category/update.phtml2
6 files changed, 2 insertions, 6 deletions
diff --git a/app/Controllers/statsController.php b/app/Controllers/statsController.php
index 6be9040e9..4ecd7fa2b 100644
--- a/app/Controllers/statsController.php
+++ b/app/Controllers/statsController.php
@@ -34,7 +34,6 @@ class FreshRSS_stats_Controller extends FreshRSS_ActionController {
$catDAO = FreshRSS_Factory::createCategoryDao();
$catDAO->checkDefault();
$this->view->categories = $catDAO->listSortedCategories(false) ?: [];
- $this->view->default_category = $catDAO->getDefault();
FreshRSS_View::prependTitle(_t('admin.stats.title') . ' ยท ');
}
diff --git a/app/Controllers/subscriptionController.php b/app/Controllers/subscriptionController.php
index 65e36d819..8d1fc0b68 100644
--- a/app/Controllers/subscriptionController.php
+++ b/app/Controllers/subscriptionController.php
@@ -18,7 +18,6 @@ class FreshRSS_subscription_Controller extends FreshRSS_ActionController {
$catDAO = FreshRSS_Factory::createCategoryDao();
$catDAO->checkDefault();
$this->view->categories = $catDAO->listSortedCategories(false, true) ?: [];
- $this->view->default_category = $catDAO->getDefault();
$signalError = false;
foreach ($this->view->categories as $cat) {
diff --git a/app/Models/View.php b/app/Models/View.php
index 17772a2ec..8346b3ce8 100644
--- a/app/Models/View.php
+++ b/app/Models/View.php
@@ -32,7 +32,6 @@ class FreshRSS_View extends Minz_View {
public bool $excludeMutedFeeds;
// Substriptions
- public ?FreshRSS_Category $default_category;
public bool $displaySlider = false;
public bool $load_ok;
public bool $onlyFeedsWithError;
diff --git a/app/Models/ViewStats.php b/app/Models/ViewStats.php
index 25c749cd2..d7bb08c5f 100644
--- a/app/Models/ViewStats.php
+++ b/app/Models/ViewStats.php
@@ -3,7 +3,6 @@ declare(strict_types=1);
final class FreshRSS_ViewStats extends FreshRSS_View {
- public ?FreshRSS_Category $default_category;
/** @var array<FreshRSS_Category> */
public array $categories;
public ?FreshRSS_Feed $feed;
diff --git a/app/Services/ImportService.php b/app/Services/ImportService.php
index e210d0fd7..ec414a203 100644
--- a/app/Services/ImportService.php
+++ b/app/Services/ImportService.php
@@ -50,7 +50,7 @@ class FreshRSS_Import_Service {
$this->catDAO->checkDefault();
$default_category = $this->catDAO->getDefault();
- if (!$default_category) {
+ if ($default_category === null) {
self::log('Cannot get the default category');
$this->lastStatus = false;
return;
diff --git a/app/views/helpers/category/update.phtml b/app/views/helpers/category/update.phtml
index 7f8fecbf8..4e3b7ae9e 100644
--- a/app/views/helpers/category/update.phtml
+++ b/app/views/helpers/category/update.phtml
@@ -195,7 +195,7 @@
<?php if (!$this->category->isDefault()): ?>
<p class="alert alert-warn">
- <?= _t('sub.feed.moved_category_deleted', $this->default_category->name()) ?>
+ <?= _t('sub.feed.moved_category_deleted', _t('gen.short.default_category')) ?>
</p>
<?php endif;?>
<div class="form-group form-actions">