$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>";
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 */
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 */
$ids = explode(",", $this->dbh->escape_string($_REQUEST["ids"]));
foreach ($ids as $id) {
- label_remove($id, $_SESSION["uid"]);
+ Labels::remove($id, $_SESSION["uid"]);
}
}
if ($caption) {
- if (label_create($caption)) {
+ if (Labels::create($caption)) {
if (!$output) {
print T_sprintf("Created label <b>%s</b>", htmlspecialchars($caption));
}
function index() {
- $sort = $this->dbh->escape_string($_REQUEST["sort"]);
-
- if (!$sort || $sort == "undefined") {
- $sort = "caption";
- }
-
- $label_search = $this->dbh->escape_string($_REQUEST["search"]);
-
- if (array_key_exists("search", $_REQUEST)) {
- $_SESSION["prefs_label_search"] = $label_search;
- } else {
- $label_search = $_SESSION["prefs_label_search"];
- }
-
print "<div id=\"pref-label-wrap\" dojoType=\"dijit.layout.BorderContainer\" gutters=\"false\">";
print "<div id=\"pref-label-header\" dojoType=\"dijit.layout.ContentPane\" region=\"top\">";
print "<div id=\"pref-label-toolbar\" dojoType=\"dijit.Toolbar\">";
print "</div>"; #pane
- global $pluginhost;
- $pluginhost->run_hooks($pluginhost::HOOK_PREFS_TAB,
+ PluginHost::getInstance()->run_hooks(PluginHost::HOOK_PREFS_TAB,
"hook_prefs_tab", "prefLabels");
print "</div>"; #container
}
-}
-
-?>
+}
\ No newline at end of file