function spaces_preset_delete in Spaces 6.3
Same name and namespace in other branches
- 5.2 spaces_admin.inc \spaces_preset_delete()
- 6 spaces_admin.inc \spaces_preset_delete()
- 6.2 spaces_admin.inc \spaces_preset_delete()
- 7.3 spaces.module \spaces_preset_delete()
- 7 spaces.module \spaces_preset_delete()
Deletes an existing preset.
Parameters
$preset: The preset object to be deleted.
Return value
Returns true on success, false on failure.
2 calls to spaces_preset_delete()
- SpacesContextControllerTestCase::test in tests/
spaces.test - Test override inheritance of variable controller.
- SpacesVariableControllerTestCase::test in tests/
spaces.test - Test override inheritance of variable controller.
File
- ./
spaces.module, line 306
Code
function spaces_preset_delete($preset) {
if (isset($preset->name) && $preset->export_type & EXPORT_IN_DATABASE) {
db_query("DELETE FROM {spaces_presets} WHERE name = '%s'", $preset->name);
spaces_preset_load(NULL, NULL, TRUE);
return TRUE;
}
return FALSE;
}