From 5e8c964f6cc735c49e686022700144307e903dd1 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 27 Sep 2025 15:11:55 +0200 Subject: Stable IDs during SQL import (#7988) * Stable IDs during SQL import Follow-up of https://github.com/FreshRSS/FreshRSS/pull/7949 Make sure that the original category IDs, feed IDs, and label IDs are kept identical during an SQL import. Avoid breaking everything referring to categories, feeds, labels by their IDs such as searches and third-party extensions. * Fix export of default category --- p/api/greader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'p') diff --git a/p/api/greader.php b/p/api/greader.php index 88afb3656..b983bfa90 100644 --- a/p/api/greader.php +++ b/p/api/greader.php @@ -933,7 +933,7 @@ final class GReaderAPI { if ($cat != null) { $feedDAO = FreshRSS_Factory::createFeedDao(); $feedDAO->changeCategory($cat->id(), 0); - if ($cat->id() > 1) { + if ($cat->id() > FreshRSS_CategoryDAO::DEFAULTCATEGORYID) { $categoryDAO->deleteCategory($cat->id()); } exit('OK'); -- cgit v1.2.3