summaryrefslogtreecommitdiff
path: root/update.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2012-08-31 12:54:37 +0400
committerAndrew Dolgov <[email protected]>2012-08-31 12:54:37 +0400
commit37f78940d8492a657c2ab8a7b1a3a3079abb3b70 (patch)
tree386c316903e4620a994cd8d0bf6f8f814e909ef4 /update.php
parentec630524407882c27a7a8dceee8dc3eaafa0ebb4 (diff)
block type 5 filters (date)
Diffstat (limited to 'update.php')
-rwxr-xr-xupdate.php51
1 files changed, 26 insertions, 25 deletions
diff --git a/update.php b/update.php
index e8ef8bc99..0bc1090e8 100755
--- a/update.php
+++ b/update.php
@@ -254,36 +254,37 @@
while ($line = db_fetch_assoc($result)) {
$owner_uid = $line["owner_uid"];
- $filter = array();
-
- if (sql_bool_to_bool($line["cat_filter"])) {
- $feed_id = "CAT:" . (int)$line["cat_id"];
- } else {
- $feed_id = (int)$line["feed_id"];
- }
-
- $filter["enabled"] = $line["enabled"] ? "on" : "off";
- $filter["rule"] = array(
- json_encode(array(
- "reg_exp" => $line["reg_exp"],
- "feed_id" => $feed_id,
- "filter_type" => $line["filter_type"])));
+ // date filters are removed
+ if ($line["filter_type"] != 5) {
+ $filter = array();
+
+ if (sql_bool_to_bool($line["cat_filter"])) {
+ $feed_id = "CAT:" . (int)$line["cat_id"];
+ } else {
+ $feed_id = (int)$line["feed_id"];
+ }
- $filter["action"] = array(
- json_encode(array(
- "action_id" => $line["action_id"],
- "action_param_label" => $line["action_param"],
- "action_param" => $line["action_param"])));
+ $filter["enabled"] = $line["enabled"] ? "on" : "off";
+ $filter["rule"] = array(
+ json_encode(array(
+ "reg_exp" => $line["reg_exp"],
+ "feed_id" => $feed_id,
+ "filter_type" => $line["filter_type"])));
- // Oh god it's full of hacks
+ $filter["action"] = array(
+ json_encode(array(
+ "action_id" => $line["action_id"],
+ "action_param_label" => $line["action_param"],
+ "action_param" => $line["action_param"])));
-## print_r($filter);
+ // Oh god it's full of hacks
- $_REQUEST = $filter;
- $_SESSION["uid"] = $owner_uid;
+ $_REQUEST = $filter;
+ $_SESSION["uid"] = $owner_uid;
- $filters = new Pref_Filters($link, $_REQUEST);
- $filters->add();
+ $filters = new Pref_Filters($link, $_REQUEST);
+ $filters->add();
+ }
}
}