1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 03:15:56 +00:00

move label stuff to Labels class

fix some unresolved functions
This commit is contained in:
Andrew Dolgov
2017-05-04 15:57:40 +03:00
parent c2f0f24e4c
commit 7c9b5a3fe4
13 changed files with 57 additions and 57 deletions

View File

@@ -292,9 +292,9 @@ class Opml extends Handler_Protected {
$fg_color = $this->dbh->escape_string($attrs->getNamedItem('label-fg-color')->nodeValue);
$bg_color = $this->dbh->escape_string($attrs->getNamedItem('label-bg-color')->nodeValue);
if (!label_find_id($label_name, $_SESSION['uid'])) {
if (!Labels::find_id($label_name, $_SESSION['uid'])) {
$this->opml_notice(T_sprintf("Adding label %s", htmlspecialchars($label_name)));
label_create($label_name, $fg_color, $bg_color, $owner_uid);
Labels::create($label_name, $fg_color, $bg_color, $owner_uid);
} else {
$this->opml_notice(T_sprintf("Duplicate label: %s", htmlspecialchars($label_name)));
}