diff options
author | Luke Stuart <lukestu@gmail.com> | 2011-09-28 07:08:09 +0000 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2011-09-28 10:25:30 +0300 |
commit | 149184c48a92b7da35691b4c977b810cdcf528dd (patch) | |
tree | d0f340146aa3ffe3b021e4f08f203f6b1a549c75 /src | |
parent | 5f1c80f54bd4a89648be19a5629d12ada7448bf4 (diff) | |
download | squark-149184c48a92b7da35691b4c977b810cdcf528dd.tar.bz2 squark-149184c48a92b7da35691b4c977b810cdcf528dd.tar.xz |
filter: fix previous commit
it was hard-blocking everything incorrectly.
Diffstat (limited to 'src')
-rw-r--r-- | src/squark-filter.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/squark-filter.c b/src/squark-filter.c index 88e8a37..09693c9 100644 --- a/src/squark-filter.c +++ b/src/squark-filter.c @@ -417,13 +417,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.hard_block_categories) { + send_redirect(BLOB_STR("blocked.cgi"), id, url, get_category_name(db, category), 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)) { 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)); |