summaryrefslogtreecommitdiff
path: root/modules/pref-labels.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2007-03-05 14:45:34 +0100
committerAndrew Dolgov <[email protected]>2007-03-05 14:45:34 +0100
commit5e6f933a322fed7b6818955532bb1b41d1248383 (patch)
tree87939f224449c484738991d49480ebaf758e69bf /modules/pref-labels.php
parent4dccf1ed93948f6e75750c31ba6bb0abf053e52b (diff)
more i18n work, add some report notices
Diffstat (limited to 'modules/pref-labels.php')
-rw-r--r--modules/pref-labels.php28
1 files changed, 18 insertions, 10 deletions
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 <b>%s</b>", 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 <b>%s</b>", htmlspecialchars($description));
+ }
+
+ return;
}
$sort = db_escape_string($_GET["sort"]);