summaryrefslogtreecommitdiff
path: root/classes/api.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2017-05-04 15:57:40 +0300
committerAndrew Dolgov <[email protected]>2017-05-04 15:57:40 +0300
commit7c9b5a3fe40a641af1cb6003b03b2352576a0c4b (patch)
treeaee154f7437c945c18074a2a158a65845ef115f2 /classes/api.php
parentc2f0f24e4c4577944b563f3c0af92a8ed89b8e61 (diff)
move label stuff to Labels class
fix some unresolved functions
Diffstat (limited to 'classes/api.php')
-rw-r--r--classes/api.php12
1 files changed, 6 insertions, 6 deletions
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;