mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-10-20 10:14:33 -04:00
More robust assignment of categories to feeds (#5986)
Several minor cases, none of which should really be necessary Might help: https://github.com/FreshRSS/FreshRSS/issues/5981 https://github.com/FreshRSS/FreshRSS/issues/5982
This commit is contained in:
1 parent
e968964538
commit
d65f77c081
6 files changed
+11
-7
No files matched your search
@@ -64,7 +64,6 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {
|
||||
if ($cat === null) {
|
||||
$catDAO->checkDefault();
|
||||
}
|
||||
$cat_id = $cat === null ? FreshRSS_CategoryDAO::DEFAULTCATEGORYID : $cat->id();
|
||||
|
||||
$feed = new FreshRSS_Feed($url); //Throws FreshRSS_BadUrl_Exception
|
||||
$title = trim($title);
|
||||
@@ -74,7 +73,11 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {
|
||||
$feed->_kind($kind);
|
||||
$feed->_attributes($attributes);
|
||||
$feed->_httpAuth($http_auth);
|
||||
$feed->_categoryId($cat_id);
|
||||
if ($cat === null) {
|
||||
$feed->_categoryId(FreshRSS_CategoryDAO::DEFAULTCATEGORYID);
|
||||
} else {
|
||||
$feed->_category($cat);
|
||||
}
|
||||
switch ($kind) {
|
||||
case FreshRSS_Feed::KIND_RSS:
|
||||
case FreshRSS_Feed::KIND_RSS_FORCED:
|
||||
|
||||
Reference in new issue
Block a user