/** * Get ALL of the custom user profile fields */ function cache_profile_fields(&$cache, &$request) { global $_QUERYPARAMS; $cache['profile_fields'] = array(); $result = $request['dba']->executeQuery("SELECT * FROM " . K4PROFILEFIELDS); while ($result->next()) { $temp = $result->current(); $cache['profile_fields'][$temp['name']] = $temp; $cache['profile_fields'][$temp['name']]['html'] = format_profilefield($temp); } $result->free(); }
$cache['all_forums'] = array(); $result =& $_DBA->executeQuery("SELECT * FROM " . INFO . " WHERE row_type = " . FORUM . " OR row_type = " . CATEGORY . " ORDER BY row_left ASC"); while ($result->next()) { $temp = $result->current(); $cache['all_forums'][$temp['id']] = $temp; } $result->freeResult(); /** * Get ALL of the custom user profile fields */ $cache[PROFILEFIELDS] = array(); $result =& $_DBA->executeQuery("SELECT * FROM " . PROFILEFIELDS); while ($result->next()) { $temp = $result->current(); $cache[PROFILEFIELDS][$temp['name']] = $temp; $cache[PROFILEFIELDS][$temp['name']]['html'] = format_profilefield($temp); /* Add the extra values onto the end of the userinfo query params variable */ $query_params['userinfo'] .= ', ui.' . $temp['name'] . ' AS ' . $temp['name']; } $result->freeResult(); /* Memory saving */ unset($result); /* Get the MAP's */ $cache[MAPS] = get_maps(); /* Create the cache file */ DBCache::createCache($cache, CACHE_FILE); } else { /* Include the cache file */ include_once CACHE_FILE; if (!isset($cache) || !is_array($cache) || empty($cache)) { compile_error('The cache array does not exist or it is empty.', __FILE__, __LINE__);