summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorMichael Foster <savetheinternet@tinyboard.org>2013-08-19 02:03:54 +1000
committerMichael Foster <savetheinternet@tinyboard.org>2013-08-19 02:03:54 +1000
commit5051e0572a1f0618156cd84c1cb93107e2d584a9 (patch)
tree6d964a74140d59e9624ef5950f38a8ba267213cc /inc
parent740b710dd445b8ce988825fb649a3e03704833e5 (diff)
Missing theme conf type "checkbox"
Diffstat (limited to 'inc')
-rw-r--r--inc/mod/pages.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/inc/mod/pages.php b/inc/mod/pages.php
index fe55b513..887be16b 100644
--- a/inc/mod/pages.php
+++ b/inc/mod/pages.php
@@ -2155,7 +2155,10 @@ function mod_theme_configure($theme_name) {
$query = prepare("INSERT INTO ``theme_settings`` VALUES(:theme, :name, :value)");
$query->bindValue(':theme', $theme_name);
$query->bindValue(':name', $conf['name']);
- $query->bindValue(':value', $_POST[$conf['name']]);
+ if ($conf['type'] == 'checkbox')
+ $query->bindValue(':value', isset($_POST[$conf['name']]) ? 1 : 0);
+ else
+ $query->bindValue(':value', $_POST[$conf['name']]);
$query->execute() or error(db_error($query));
}