api, setArticleLabel: allow JSON booleans

This commit is contained in:
Andrew Dolgov 2017-10-15 16:47:44 +03:00
parent d320b55af9
commit 91f49ba17d
1 changed files with 1 additions and 1 deletions

View File

@ -466,7 +466,7 @@ class API extends Handler {
$article_ids = array_filter(explode(",", $this->dbh->escape_string($_REQUEST["article_ids"])), is_numeric); $article_ids = array_filter(explode(",", $this->dbh->escape_string($_REQUEST["article_ids"])), is_numeric);
$label_id = (int) $this->dbh->escape_string($_REQUEST['label_id']); $label_id = (int) $this->dbh->escape_string($_REQUEST['label_id']);
$assign = (bool) ($this->dbh->escape_string($_REQUEST['assign']) == "true"); $assign = sql_bool_to_bool($_REQUEST['assign']);
$label = $this->dbh->escape_string(Labels::find_caption( $label = $this->dbh->escape_string(Labels::find_caption(
Labels::feed_to_label_id($label_id), $_SESSION["uid"])); Labels::feed_to_label_id($label_id), $_SESSION["uid"]));