From 83afc0681b75efba8c4e2663cddeef0aa8abedae Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 22 Jul 2006 18:15:23 +0000 Subject: [PATCH] r933: - Adding a setting to control status displays - Updating construct_option_select() --- admin/setting.php | 5 +++++ includes/functions.php | 35 ++++++++++++++++++++++++++++------- includes/settings.php | 6 ++++++ 3 files changed, 39 insertions(+), 7 deletions(-) diff --git a/admin/setting.php b/admin/setting.php index 99961b2..0af6ec4 100755 --- a/admin/setting.php +++ b/admin/setting.php @@ -45,6 +45,11 @@ if ($_POST['do'] == 'update') { foreach ($bugsys->in['setting'] AS $varname => $value) { + if (is_array($value)) + { + $value = implode(',', $value); + } + $db->query("REPLACE INTO " . TABLE_PREFIX . "setting (varname, value) VALUES ('" . $bugsys->escape($varname) . "', '" . $bugsys->escape($value) . "')"); } diff --git a/includes/functions.php b/includes/functions.php index 2593aa5..2207ae9 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -19,23 +19,44 @@ || ################################################################### \*=====================================================================*/ -// ################## Start construct_option_select ################## -// creates a s from an array. You use they keys when +* you need to access a multi-dimensional array of data. +* +* @access public +* +* @param string HTML name of the select +* @param array Array of