Переглянути джерело

Update feedController.php (#7688)

+ Fix for 404 error when trying to refresh the feeds from a view extension. Without this change, this happens:
1. Starting on the extension view: https://freshrss.example.net/i/?c=freshvibes&tab=test&rid=6858299a5c2f0
2. Clicking refresh redirects to https://freshrss.example.net/i/?c=feed&a=actualize with status 302
3. Then to https://freshrss.example.net/i/?get=f_0&rid=685872529cbe9 with status 302
4. Finally, to https://freshrss.example.net/i/?c=error&rid=685872529cbe9 with 404.
Stefan 9 місяців тому
батько
коміт
6bec627f79
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      app/Controllers/feedController.php

+ 1 - 1
app/Controllers/feedController.php

@@ -916,7 +916,7 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {
 			Minz_Request::setGoodNotification(_t('feedback.sub.feed.actualizeds'));
 			// No layout in ajax request.
 			$this->view->_layout(null);
-		} elseif ($feed instanceof FreshRSS_Feed) {
+		} elseif ($feed instanceof FreshRSS_Feed && $id > 0) {
 			// Redirect to the main page with correct notification.
 			Minz_Request::good(_t('feedback.sub.feed.actualized', $feed->name()), [
 				'params' => ['get' => 'f_' . $id]