Redirect to the feed page after adding a subscription

This commit is contained in:
Frédéric Guillot 2014-10-19 09:52:59 -04:00
parent e732e80dee
commit e1b22f2d35
1 changed files with 3 additions and 3 deletions

View File

@ -234,11 +234,11 @@ Router\action('subscribe', function() {
$values += array('download_content' => 0);
$url = trim($url);
$result = Model\Feed\create($url, $values['download_content']);
$feed_id = Model\Feed\create($url, $values['download_content']);
if ($result) {
if ($feed_id) {
Session\flash(t('Subscription added successfully.'));
Response\redirect('?action=feeds');
Response\redirect('?action=feed-items&feed_id='.$feed_id);
}
else {
Session\flash_error(t('Unable to find a subscription.'));