function votingapi_rebuild_action_cache in Voting API 5
Utility functions that manage the raw voting actions data..
3 calls to votingapi_rebuild_action_cache()
File
- ./
votingapi_actions.module, line 194
Code
function votingapi_rebuild_action_cache() {
// This builds a live cache of all the currently enabled sets,
// first from the database, then from module 'defaults'. Any
// set saved in the DB is assumed to be enabled, and any DB
// set overrides a module set with the same name.
$sets = _votingapi_load_action_sets_from_db();
$module_sets = _votingapi_load_action_sets_from_modules();
foreach ($sets as $name => $set) {
$active_sets[$name] = $set;
}
$status_list = variable_get('votingapi_action_status', array());
foreach ($module_sets as $name => $set) {
if (!in_array($name, array_keys($sets))) {
if ($status_list[$name]) {
$sets[$name] = $set;
}
}
}
cache_set("votingapi_action_sets", 'cache', serialize($sets));
}