From 5e6f933a322fed7b6818955532bb1b41d1248383 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 5 Mar 2007 14:45:34 +0100 Subject: more i18n work, add some report notices --- modules/pref-labels.php | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) (limited to 'modules/pref-labels.php') diff --git a/modules/pref-labels.php b/modules/pref-labels.php index ccd669fc2..c07d6132f 100644 --- a/modules/pref-labels.php +++ b/modules/pref-labels.php @@ -153,6 +153,11 @@ sql_exp = '$sql_exp', description = '$descr' WHERE id = '$label_id'"); + + if (db_affected_rows($link, $result) != 0) { + print_notice(T_sprintf("Saved label %s", htmlspecialchars($descr))); + } + } if ($subop == "remove") { @@ -169,19 +174,22 @@ } if ($subop == "add") { - - if (!WEB_DEMO_MODE) { - // no escaping is done here on purpose - $sql_exp = trim($_GET["sql_exp"]); - $description = db_escape_string($_GET["description"]); + // no escaping is done here on purpose + $sql_exp = trim($_GET["sql_exp"]); + $description = db_escape_string($_GET["description"]); - if (!$sql_exp || !$description) return; + if (!$sql_exp || !$description) return; - $result = db_query($link, - "INSERT INTO ttrss_labels (sql_exp,description,owner_uid) - VALUES ('$sql_exp', '$description', '".$_SESSION["uid"]."')"); - } + $result = db_query($link, + "INSERT INTO ttrss_labels (sql_exp,description,owner_uid) + VALUES ('$sql_exp', '$description', '".$_SESSION["uid"]."')"); + + if (db_affected_rows($link, $result) != 0) { + print T_sprintf("Created label %s", htmlspecialchars($description)); + } + + return; } $sort = db_escape_string($_GET["sort"]); -- cgit v1.2.3