get('config')) { $sql = 'SELECT * FROM ' . CONFIG_TABLE . ' WHERE is_dynamic = 1'; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { $config[$row['config_name']] = $row['config_value']; } } else { $config = array(); $sql = 'SELECT * FROM ' . CONFIG_TABLE; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { $config[$row['config_name']] = $row['config_value']; } $db->sql_freeresult($result); $cache->put('config', $config); } if (!($acl_options = $cache->get('acl_options'))) { $acl_options = array(); $sql = "SELECT auth_value, is_global, is_local FROM " . ACL_OPTIONS_TABLE . " ORDER BY auth_option_id"; $result = $db->sql_query($sql); $global = $local = 0; while ($row = $db->sql_fetchrow($result)) { if (!empty($row['is_global'])) { $acl_options['global'][$row['auth_value']] = $global++; } if (!empty($row['is_local'])) { $acl_options['local'][$row['auth_value']] = $local++; } } $db->sql_freeresult($result); $cache->put('acl_options', $acl_options); $auth->acl_clear_prefetch(); } /* if (time() - $config['cache_interval'] >= $config['cache_last_gc']) { $cache->tidy($config['cache_gc']); } */ // Show 'Board is disabled' message if ($config['board_disable'] && !defined('IN_ADMIN') && !defined('IN_LOGIN')) { $message = (!empty($config['board_disable_msg'])) ? $config['board_disable_msg'] : 'BOARD_DISABLE'; trigger_error($message); } // addslashes to vars if magic_quotes_gpc is off function slash_input_data(&$data) { if (is_array($data)) { foreach ($data as $k => $v) { $data[$k] = (is_array($v)) ? slash_input_data($v) : addslashes($v); } } return $data; } ?>