aboutsummaryrefslogtreecommitdiff
path: root/p/api/greader.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2019-06-16 18:59:50 +0200
committerGravatar GitHub <noreply@github.com> 2019-06-16 18:59:50 +0200
commit037c385947aa46e5f9cc125d0a2679ad6d7e7e7d (patch)
tree96176acea392ce8c630042c29daaea64baf2978a /p/api/greader.php
parentf9d0f20dbc09bb25562118bf39dbfc354e92ce36 (diff)
Fix API remove category (#2412)
Fix https://github.com/FreshRSS/FreshRSS/issues/2411
Diffstat (limited to 'p/api/greader.php')
-rw-r--r--p/api/greader.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/p/api/greader.php b/p/api/greader.php
index 66732b799..3d628c855 100644
--- a/p/api/greader.php
+++ b/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);
}