diff options
Diffstat (limited to 'app/Controllers/feedController.php')
| -rwxr-xr-x | app/Controllers/feedController.php | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index fe5641642..8621cb535 100755 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -67,6 +67,10 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController { $cat_id = $cat == null ? FreshRSS_CategoryDAO::DEFAULTCATEGORYID : $cat->id(); $feed = new FreshRSS_Feed($url); //Throws FreshRSS_BadUrl_Exception + $title = trim($title); + if ($title != '') { + $feed->_name($title); + } $feed->_kind($kind); $feed->_attributes('', $attributes); $feed->_httpAuth($http_auth); @@ -92,19 +96,7 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController { throw new FreshRSS_FeedNotAdded_Exception($url); } - $values = array( - 'url' => $feed->url(), - 'kind' => $feed->kind(), - 'category' => $feed->category(), - 'name' => $title != '' ? $title : $feed->name(true), - 'website' => $feed->website(), - 'description' => $feed->description(), - 'lastUpdate' => 0, - 'httpAuth' => $feed->httpAuth(), - 'attributes' => $feed->attributes(), - ); - - $id = $feedDAO->addFeed($values); + $id = $feedDAO->addFeedObject($feed); if (!$id) { // There was an error in database… we cannot say what here. throw new FreshRSS_FeedNotAdded_Exception($url); @@ -469,7 +461,8 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController { } if ($pubSubHubbubEnabled && !$simplePiePush) { //We use push, but have discovered an article by pull! - $text = 'An article was discovered by pull although we use PubSubHubbub!: Feed ' . $url . + $text = 'An article was discovered by pull although we use PubSubHubbub!: Feed ' . + SimplePie_Misc::url_remove_credentials($url) . ' GUID ' . $entry->guid(); Minz_Log::warning($text, PSHB_LOG); Minz_Log::warning($text); @@ -528,7 +521,8 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController { } } } elseif ($feed->url() !== $url) { // HTTP 301 Moved Permanently - Minz_Log::notice('Feed ' . $url . ' moved permanently to ' . $feed->url(false)); + Minz_Log::notice('Feed ' . SimplePie_Misc::url_remove_credentials($url) . + ' moved permanently to ' . SimplePie_Misc::url_remove_credentials($feed->url(false))); $feedProperties['url'] = $feed->url(); } @@ -629,6 +623,7 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController { $databaseDAO = FreshRSS_Factory::createDatabaseDAO(); $databaseDAO->minorDbMaintenance(); } else { + FreshRSS_category_Controller::refreshDynamicOpmls(); list($updated_feeds, $feed, $nb_new_articles) = self::actualizeFeed($id, $url, $force, null, $noCommit, $maxFeeds); } |
