in['settings'] as $varname => $value) { if (is_array($value)) { if ($varname == 'columnoptions') { $value = serialize($value); } else { $value = implode(',', $value); } } $updates[] = "('" . $input->escape($varname) . "', '" . $input->escape($value) . "')"; } $db->query("REPLACE INTO " . TABLE_PREFIX . "setting (varname, value) VALUES " . implode(',', $updates)); build_settings(); admin_flash_redirect('settings.php', 'All the settings have been updated successfully.'); } // ################################################################### if ($_REQUEST['do'] == 'modify') { $admin = new BSTemplate('settings'); // authmethod $methods = BSFunctions::scan_directory('./includes/auth/'); $admin->vars['authmethods'] = ''; foreach ($methods AS $path) { if (preg_match('#auth_(.*)\.php#', $path, $matches)) { $admin->vars['authmethods'] .= ''; } } $admin->evaluate()->flush(); } // ################################################################### /** * Helper function for the bugdar::$options['columnoptions'] setting * * @return string Setting HTML code */ function ConstructColumnOptionsSetting() { global $bugsys; require_once('./includes/class_sort.php'); $array = (bugdar::$options['columnoptions'] == null ? array('bugid' => 1, 'summary' => 2, 'userid' => 2, 'product' => 3, 'version' => 3, 'component' => 0, 'status' => 4, 'resolution' => 4, 'priority' => 5, 'severity' => 5, 'lastpost' => 6, 'votes' => 0) : bugdar::$options['columnoptions']); $return = ''; foreach (ListSorter::fetch_by_text(false, false) AS $column => $name) { $return .= ''; } $return .= '
' . $name . '
'; return $return; } ?>