You are here

function spaces_preset_load in Spaces 5.2

Same name and namespace in other branches
  1. 6.3 spaces.module \spaces_preset_load()
  2. 6 spaces_admin.inc \spaces_preset_load()
  3. 6.2 spaces_admin.inc \spaces_preset_load()
  4. 7.3 spaces.module \spaces_preset_load()
  5. 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();
  }
}