Skip to content

Commit 52ba7ff

Browse files
committed
Ensure feed attributes are used before load
1 parent 3fd94e7 commit 52ba7ff

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/Controllers/feedController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ public static function addFeed($url, $title = '', $cat_id = 0, $new_cat_name = '
6767
$cat_id = $cat == null ? FreshRSS_CategoryDAO::DEFAULTCATEGORYID : $cat->id();
6868

6969
$feed = new FreshRSS_Feed($url); //Throws FreshRSS_BadUrl_Exception
70+
$feed->_attributes('', $attributes);
7071
$feed->_httpAuth($http_auth);
7172
$feed->load(true); //Throws FreshRSS_Feed_Exception, Minz_FileNotExistException
7273
$feed->_category($cat_id);
@@ -90,7 +91,7 @@ public static function addFeed($url, $title = '', $cat_id = 0, $new_cat_name = '
9091
'description' => $feed->description(),
9192
'lastUpdate' => time(),
9293
'httpAuth' => $feed->httpAuth(),
93-
'attributes' => $attributes,
94+
'attributes' => $feed->attributes(),
9495
);
9596

9697
$id = $feedDAO->addFeed($values);

0 commit comments

Comments
 (0)