From 7c9b5a3fe40a641af1cb6003b03b2352576a0c4b Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 4 May 2017 15:57:40 +0300 Subject: move label stuff to Labels class fix some unresolved functions --- classes/api.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'classes/api.php') diff --git a/classes/api.php b/classes/api.php index cb035c86b..bffa2bf07 100644 --- a/classes/api.php +++ b/classes/api.php @@ -458,14 +458,14 @@ class API extends Handler { $checked = false; foreach ($article_labels as $al) { - if (feed_to_label_id($al[0]) == $line['id']) { + if (Labels::feed_to_label_id($al[0]) == $line['id']) { $checked = true; break; } } array_push($rv, array( - "id" => (int)label_to_feed_id($line['id']), + "id" => (int)Labels::label_to_feed_id($line['id']), "caption" => $line['caption'], "fg_color" => $line['fg_color'], "bg_color" => $line['bg_color'], @@ -481,8 +481,8 @@ class API extends Handler { $label_id = (int) $this->dbh->escape_string($_REQUEST['label_id']); $assign = (bool) ($this->dbh->escape_string($_REQUEST['assign']) == "true"); - $label = $this->dbh->escape_string(label_find_caption( - feed_to_label_id($label_id), $_SESSION["uid"])); + $label = $this->dbh->escape_string(Labels::find_caption( + Labels::feed_to_label_id($label_id), $_SESSION["uid"])); $num_updated = 0; @@ -491,9 +491,9 @@ class API extends Handler { foreach ($article_ids as $id) { if ($assign) - label_add_article($id, $label, $_SESSION["uid"]); + Labels::add_article($id, $label, $_SESSION["uid"]); else - label_remove_article($id, $label, $_SESSION["uid"]); + Labels::remove_article($id, $label, $_SESSION["uid"]); ++$num_updated; -- cgit v1.2.3-54-g00ecf