diff options
author | Duane Hughes <duanejevon@gmail.com> | 2011-09-15 13:19:51 +0000 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2011-09-15 16:24:38 +0300 |
commit | 5f1c80f54bd4a89648be19a5629d12ada7448bf4 (patch) | |
tree | 6f2b6786ec924d17392ac15bc2c39a5fe62f2215 /src/squark-filter.c | |
parent | 22f30b6860b9577b8d3709013e1af9fb621a1895 (diff) | |
download | squark-5f1c80f54bd4a89648be19a5629d12ada7448bf4.tar.bz2 squark-5f1c80f54bd4a89648be19a5629d12ada7448bf4.tar.xz |
filter: use different block page if category is forbidden
fixes #719
Diffstat (limited to 'src/squark-filter.c')
-rw-r--r-- | src/squark-filter.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/squark-filter.c b/src/squark-filter.c index a5d4013..88e8a37 100644 --- a/src/squark-filter.c +++ b/src/squark-filter.c @@ -418,10 +418,12 @@ static void read_input(struct sqdb *db) if (!auth_ok) { send_redirect(BLOB_STR("login.cgi"), id, url, BLOB_STR("auth"), username); } else if (((1ULL << category) & entry.p.block_categories) && + (!entry.p.hard_block_categories) && (now < entry.override_time || - now > entry.override_time + FILTER_OVERRIDE_TIMEOUT || - ((1ULL << category) & entry.p.hard_block_categories))) { + now > entry.override_time + FILTER_OVERRIDE_TIMEOUT)) { send_redirect(BLOB_STR("warning.cgi"), id, url, get_category_name(db, category), username); + } else if ((1ULL << category) & entry.p.hard_block_categories) { + send_redirect(BLOB_STR("blocked.cgi"), id, url, get_category_name(db, category), username); } else send_ok(id, get_category_name(db, category), !!((1ULL << category) & entry.p.block_categories)); |