|
|
@@ -315,20 +315,23 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo {
|
|
|
if (isset ($dao['id'])) {
|
|
|
$key = $dao['id'];
|
|
|
}
|
|
|
+ if ($catID === null) {
|
|
|
+ $catID = isset($dao['category']) ? $dao['category'] : 0;
|
|
|
+ }
|
|
|
|
|
|
- $myFeed = new FreshRSS_Feed (isset($dao['url']) ? $dao['url'] : '', false);
|
|
|
- $myFeed->_category ($catID === null ? $dao['category'] : $catID);
|
|
|
- $myFeed->_name ($dao['name']);
|
|
|
- $myFeed->_website ($dao['website'], false);
|
|
|
- $myFeed->_description (isset($dao['description']) ? $dao['description'] : '');
|
|
|
- $myFeed->_lastUpdate (isset($dao['lastUpdate']) ? $dao['lastUpdate'] : 0);
|
|
|
- $myFeed->_priority ($dao['priority']);
|
|
|
- $myFeed->_pathEntries (isset($dao['pathEntries']) ? $dao['pathEntries'] : '');
|
|
|
- $myFeed->_httpAuth (isset($dao['httpAuth']) ? base64_decode ($dao['httpAuth']) : '');
|
|
|
- $myFeed->_error ($dao['error']);
|
|
|
+ $myFeed = new FreshRSS_Feed(isset($dao['url']) ? $dao['url'] : '', false);
|
|
|
+ $myFeed->_category(intval($catID));
|
|
|
+ $myFeed->_name($dao['name']);
|
|
|
+ $myFeed->_website(isset($dao['website']) ? $dao['website'] : '', false);
|
|
|
+ $myFeed->_description(isset($dao['description']) ? $dao['description'] : '');
|
|
|
+ $myFeed->_lastUpdate(isset($dao['lastUpdate']) ? $dao['lastUpdate'] : 0);
|
|
|
+ $myFeed->_priority(isset($dao['priority']) ? $dao['priority'] : 10);
|
|
|
+ $myFeed->_pathEntries(isset($dao['pathEntries']) ? $dao['pathEntries'] : '');
|
|
|
+ $myFeed->_httpAuth(isset($dao['httpAuth']) ? base64_decode ($dao['httpAuth']) : '');
|
|
|
+ $myFeed->_error(isset($dao['error']) ? $dao['error'] : 0);
|
|
|
$myFeed->_keepHistory(isset($dao['keep_history']) ? $dao['keep_history'] : -2);
|
|
|
- $myFeed->_nbNotRead ($dao['cache_nbUnreads']);
|
|
|
- $myFeed->_nbEntries ($dao['cache_nbEntries']);
|
|
|
+ $myFeed->_nbNotRead(isset($dao['cache_nbUnreads']) ? $dao['cache_nbUnreads'] : 0);
|
|
|
+ $myFeed->_nbEntries(isset($dao['cache_nbEntries']) ? $dao['cache_nbEntries'] : 0);
|
|
|
if (isset ($dao['id'])) {
|
|
|
$myFeed->_id ($dao['id']);
|
|
|
}
|