From 4ccd2698eff26f0e62f6d75c5c3c33ce213ea959 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rytis=20Slatkevi=C4=8Dius?= Date: Sun, 29 Apr 2007 13:02:35 +0000 Subject: [PATCH] should be parsed as bool, not as string svn path=/trunk/boinc/; revision=12497 --- html/inc/forum.inc | 2 +- html/user/forum_rate.php | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/html/inc/forum.inc b/html/inc/forum.inc index 53d68b13bf..cc0cfc1402 100644 --- a/html/inc/forum.inc +++ b/html/inc/forum.inc @@ -82,7 +82,7 @@ $post_ratings['-1'] = "Not helpful (-1)"; $post_ratings['-2'] = "Off topic (-2)"; $config = get_config(); -$no_forum_rating = parse_element($config,""); +$no_forum_rating = parse_bool($config, "no_forum_rating"); /** * Process a user-supplied title to remove HTML stuff diff --git a/html/user/forum_rate.php b/html/user/forum_rate.php index e3bef44194..231082e608 100644 --- a/html/user/forum_rate.php +++ b/html/user/forum_rate.php @@ -1,4 +1,6 @@ ")) { - page_head("Rating offline"); - echo "This function is turned off by the project"; - page_tail(); - exit(0); +if (parse_bool($config, "no_forum_rating")) { + page_head("Rating offline"); + echo "This function is turned off by the project"; + page_tail(); + exit(0); } db_init();