/** * Sanitizes user input en-masse. * * @param mixed $array The array of values or a single value to sanitize, usually a global variable like $_GET or $_POST. * @param boolean $trim Optional. Whether to trim the value or not. Default is true. * @return mixed The sanitized data. */ function bb_global_sanitize($array, $trim = true) { foreach ($array as $k => $v) { if (is_array($v)) { $array[$k] = bb_global_sanitize($v); } else { if (!get_magic_quotes_gpc()) { $array[$k] = addslashes($v); } if ($trim) { $array[$k] = trim($array[$k]); } } } return $array; }
*/ if (!defined('BB_FORCE_SSL_ADMIN')) { define('BB_FORCE_SSL_ADMIN', false); } force_ssl_admin(BB_FORCE_SSL_ADMIN); // Load default filters require_once BB_PATH . BB_INC . 'defaults.bb-filters.php'; // Load default scripts require_once BB_PATH . BB_INC . 'functions.bb-script-loader.php'; /* Check if the globals have been sanitized by NXTClass or not (else there would be extra slashes while deep integration) */ if (!function_exists('nxt_magic_quotes')) { // Sanitise external input $_GET = bb_global_sanitize($_GET); $_POST = bb_global_sanitize($_POST); $_COOKIE = bb_global_sanitize($_COOKIE, false); $_SERVER = bb_global_sanitize($_SERVER); } /** * Define theme and plugin constants */ /** * Full path to the location of the core plugins directory */ define('BB_CORE_PLUGIN_DIR', BB_PATH . 'bb-plugins/'); /** * Full URL of the core plugins directory */ define('BB_CORE_PLUGIN_URL', $bb->uri . 'bb-plugins/'); /** * Full path to the location of the core themes directory */