Browse Source

Fix API remove category (#2412)

Fix https://github.com/FreshRSS/FreshRSS/issues/2411
Alexandre Alapetite 6 years ago
parent
commit
037c385947
1 changed files with 2 additions and 2 deletions
  1. 2 2
      p/api/greader.php

+ 2 - 2
p/api/greader.php

@@ -347,7 +347,7 @@ function subscriptionEdit($streamNames, $titles, $action, $add = '', $remove = '
 		$c_name = htmlspecialchars($c_name, ENT_COMPAT, 'UTF-8');
 		$cat = $categoryDAO->searchByName($c_name);
 		$addCatId = $cat == null ? 0 : $cat->id();
-	} else if ($remove != '' && strpos($remove, 'user/-/label/')) {
+	} elseif ($remove != '' && strpos($remove, 'user/-/label/') === 0) {
 		$addCatId = 1;	//Default category
 	}
 	$feedDAO = FreshRSS_Factory::createFeedDao();
@@ -998,7 +998,7 @@ if ($pathInfos[1] === 'accounts') {
 					 * (more efficient from a backend perspective than multiple requests). */
 					$streamId = $_GET['s'];
 					streamContentsItemsIds($streamId, $start_time, $stop_time, $count, $order, $filter_target, $exclude_target, $continuation);
-				} else if ($pathInfos[6] === 'contents' && isset($_POST['i'])) {	//FeedMe
+				} elseif ($pathInfos[6] === 'contents' && isset($_POST['i'])) {	//FeedMe
 					$e_ids = multiplePosts('i');	//item IDs
 					streamContentsItems($e_ids, $order);
 				}