aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/feedController.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Controllers/feedController.php')
-rwxr-xr-xapp/Controllers/feedController.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php
index eb26d9786..d694c103e 100755
--- a/app/Controllers/feedController.php
+++ b/app/Controllers/feedController.php
@@ -384,12 +384,14 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
$cat_id = Minz_Request::param('c_id');
$feedDAO = FreshRSS_Factory::createFeedDao();
-
$values = array(
'category' => $cat_id,
);
- if (!$feedDAO->updateFeed($feed_id, $values)) {
+ $feed = $feedDAO->searchById($feed_id);
+
+ if (!$feed || ($feed->category() != $cat_id &&
+ !$feedDAO->updateFeed($feed_id, $values))) {
Minz_Error::error(
404,
array('error' => array(_t('error_occurred')))