summaryrefslogtreecommitdiff
path: root/modules/pref-filters.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2007-03-05 13:50:46 +0100
committerAndrew Dolgov <[email protected]>2007-03-05 13:50:46 +0100
commit4dccf1ed93948f6e75750c31ba6bb0abf053e52b (patch)
treefb071c51f25d2551e67b144405722fba655bf734 /modules/pref-filters.php
parent8497d2b976c320604929efd8055155380ebe3814 (diff)
more i18n work
Diffstat (limited to 'modules/pref-filters.php')
-rw-r--r--modules/pref-filters.php52
1 files changed, 24 insertions, 28 deletions
diff --git a/modules/pref-filters.php b/modules/pref-filters.php
index e3447c1ab..1403464b1 100644
--- a/modules/pref-filters.php
+++ b/modules/pref-filters.php
@@ -148,49 +148,45 @@
enabled = $enabled,
inverse = $inverse,
action_param = '$action_param'
- WHERE id = '$filter_id' AND owner_uid = " . $_SESSION["uid"]);
+ WHERE id = '$filter_id' AND owner_uid = " . $_SESSION["uid"]);
+
}
if ($subop == "remove") {
- if (!WEB_DEMO_MODE) {
-
- $ids = split(",", db_escape_string($_GET["ids"]));
+ $ids = split(",", db_escape_string($_GET["ids"]));
- foreach ($ids as $id) {
- db_query($link, "DELETE FROM ttrss_filters WHERE id = '$id' AND owner_uid = ". $_SESSION["uid"]);
-
- }
+ foreach ($ids as $id) {
+ db_query($link, "DELETE FROM ttrss_filters WHERE id = '$id' AND owner_uid = ". $_SESSION["uid"]);
}
}
if ($subop == "add") {
- if (!WEB_DEMO_MODE) {
+ $regexp = db_escape_string(trim($_GET["reg_exp"]));
+ $filter_type = db_escape_string(trim($_GET["filter_type"]));
+ $feed_id = db_escape_string($_GET["feed_id"]);
+ $action_id = db_escape_string($_GET["action_id"]);
+ $action_param = db_escape_string($_GET["action_param"]);
- $regexp = db_escape_string(trim($_GET["reg_exp"]));
- $filter_type = db_escape_string(trim($_GET["filter_type"]));
- $feed_id = db_escape_string($_GET["feed_id"]);
- $action_id = db_escape_string($_GET["action_id"]);
- $action_param = db_escape_string($_GET["action_param"]);
+ $inverse = checkbox_to_sql_bool(db_escape_string($_GET["inverse"]));
- $inverse = checkbox_to_sql_bool(db_escape_string($_GET["inverse"]));
+ if (!$regexp) return;
- if (!$regexp) return;
+ if (!$feed_id) {
+ $feed_id = 'NULL';
+ } else {
+ $feed_id = sprintf("'%s'", db_escape_string($feed_id));
+ }
- if (!$feed_id) {
- $feed_id = 'NULL';
- } else {
- $feed_id = sprintf("'%s'", db_escape_string($feed_id));
- }
+ $result = db_query($link,
+ "INSERT INTO ttrss_filters (reg_exp,filter_type,owner_uid,feed_id,
+ action_id, action_param, inverse)
+ VALUES
+ ('$regexp', '$filter_type','".$_SESSION["uid"]."',
+ $feed_id, '$action_id', '$action_param', $inverse)");
- $result = db_query($link,
- "INSERT INTO ttrss_filters (reg_exp,filter_type,owner_uid,feed_id,
- action_id, action_param, inverse)
- VALUES
- ('$regexp', '$filter_type','".$_SESSION["uid"]."',
- $feed_id, '$action_id', '$action_param', $inverse)");
- }
+ print_notice(T_sprintf("Created filter <b>%s</b>", htmlspecialchars($regexp)));
}
if ($quiet) return;