]> git.wh0rd.org - tt-rss.git/blobdiff - classes/pref/labels.php
move label stuff to Labels class
[tt-rss.git] / classes / pref / labels.php
index 458e4f88b0a9b39c28b8b4cfb8f9180d3e0a151d..5720a1f4b8303ebfd5a9fec940303356e0e1f787 100644 (file)
@@ -15,9 +15,9 @@ class Pref_Labels extends Handler_Protected {
 
                $line = $this->dbh->fetch_assoc($result);
 
-               print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"id\" value=\"$label_id\">";
-               print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pref-labels\">";
-               print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"save\">";
+               print_hidden("id", "$label_id");
+               print_hidden("op", "pref-labels");
+               print_hidden("method", "save");
 
                print "<div class=\"dlgSec\">".__("Caption")."</div>";
 
@@ -136,7 +136,7 @@ class Pref_Labels extends Handler_Protected {
                                        AND owner_uid = " . $_SESSION["uid"]);
                        }
 
-                       $caption = $this->dbh->escape_string(label_find_caption($id, $_SESSION["uid"]));
+                       $caption = $this->dbh->escape_string(Labels::find_caption($id, $_SESSION["uid"]));
 
                        /* Remove cached data */
 
@@ -156,7 +156,7 @@ class Pref_Labels extends Handler_Protected {
                                fg_color = '', bg_color = '' WHERE id = '$id'
                                AND owner_uid = " . $_SESSION["uid"]);
 
-                       $caption = $this->dbh->escape_string(label_find_caption($id, $_SESSION["uid"]));
+                       $caption = $this->dbh->escape_string(Labels::find_caption($id, $_SESSION["uid"]));
 
                        /* Remove cached data */
 
@@ -216,7 +216,7 @@ class Pref_Labels extends Handler_Protected {
                $ids = explode(",", $this->dbh->escape_string($_REQUEST["ids"]));
 
                foreach ($ids as $id) {
-                       label_remove($id, $_SESSION["uid"]);
+                       Labels::remove($id, $_SESSION["uid"]);
                }
 
        }
@@ -227,7 +227,7 @@ class Pref_Labels extends Handler_Protected {
 
                if ($caption) {
 
-                       if (label_create($caption)) {
+                       if (Labels::create($caption)) {
                                if (!$output) {
                                        print T_sprintf("Created label <b>%s</b>", htmlspecialchars($caption));
                                }
@@ -311,6 +311,4 @@ class Pref_Labels extends Handler_Protected {
                print "</div>"; #container
 
        }
-}
-
-?>
+}
\ No newline at end of file