From 11f083e73b0543bb5fb5f1dfa85ca00bbb374505 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 20 Aug 2007 08:29:39 +0100 Subject: rework feed category edit box --- modules/pref-feeds.php | 87 ++++++++++++-------------------------------------- 1 file changed, 21 insertions(+), 66 deletions(-) (limited to 'modules/pref-feeds.php') diff --git a/modules/pref-feeds.php b/modules/pref-feeds.php index 193a1a4bc..fb791a930 100644 --- a/modules/pref-feeds.php +++ b/modules/pref-feeds.php @@ -519,22 +519,27 @@ if ($subop == "editCats") { - print "
".__('Category editor')."
"; - - print "
"; - $action = $_REQUEST["action"]; if ($action == "save") { - $cat_title = db_escape_string(trim($_GET["title"])); - $cat_id = db_escape_string($_GET["id"]); + $cat_title = db_escape_string(trim($_REQUEST["value"])); + $cat_id = db_escape_string($_GET["cid"]); $result = db_query($link, "UPDATE ttrss_feed_categories SET title = '$cat_title' WHERE id = '$cat_id' AND owner_uid = ".$_SESSION["uid"]); - + + print $_REQUEST["value"]; + + return; + } + print "
".__('Category editor')."
"; + + print "
"; + + if ($action == "add") { if (!WEB_DEMO_MODE) { @@ -625,10 +630,6 @@ print ""; - -/* print " - - "; */ $lnum = 0; @@ -637,54 +638,18 @@ $class = ($lnum % 2) ? "even" : "odd"; $cat_id = $line["id"]; - - $edit_cat_id = $_GET["id"]; - - if ($action == "edit" && $cat_id == $edit_cat_id) { - $class .= "Selected"; - $this_row_id = ""; - } else if ($action == "edit" && $cat_id != $edit_cat_id) { - $class .= "Grayed"; - $this_row_id = ""; - } else { - $this_row_id = "id=\"FCATR-$cat_id\""; - } + $this_row_id = "id=\"FCATR-$cat_id\""; print ""; $edit_title = htmlspecialchars($line["title"]); - if (!$edit_cat_id || $action != "edit") { - - print ""; - - print ""; - - } else if ($cat_id != $edit_cat_id) { - - print ""; - - print ""; - - } else { - - print ""; - - print ""; - - } + print ""; + + print ""; print ""; @@ -707,20 +672,10 @@ print "
"; - if ($action == "edit") { - print " - "; - } else { - - print " - + print " "; - } - + print "
"; print ""; -- cgit v1.2.3
 Title
" . - $edit_title . "$edit_title"; - - print ""; - print ""; - print ""; - print ""; - - print "" . + $edit_title . "