function spaces_preset_load in Spaces 5.2
Same name and namespace in other branches
- 6.3 spaces.module \spaces_preset_load()
- 6 spaces_admin.inc \spaces_preset_load()
- 6.2 spaces_admin.inc \spaces_preset_load()
- 7.3 spaces.module \spaces_preset_load()
- 7 spaces.module \spaces_preset_load()
Load a spaces preset.
Parameters
$type: The space type for this preset.
$id: The preset identifier string.
File
- ./
spaces_admin.inc, line 367
Code
function spaces_preset_load($type, $id) {
$value = db_result(db_query("SELECT value FROM {spaces_presets} WHERE type = '%s' AND id = '%s'", $type, $id));
if ($value) {
return unserialize($value);
}
else {
drupal_set_message(t('An error occurred while trying to load !preset.'), array(
'!preset' => $id,
));
return array();
}
}