function mediafront_preset_name_exists in MediaFront 6
Same name and namespace in other branches
- 6.2 includes/mediafront.preset.inc \mediafront_preset_name_exists()
- 7.2 includes/mediafront.preset.inc \mediafront_preset_name_exists()
- 7 includes/mediafront.preset.inc \mediafront_preset_name_exists()
Checks to see if another preset is already taken.
1 call to mediafront_preset_name_exists()
- mediafront_validate_preset_name in includes/
mediafront.preset.inc - Verify the syntax of the given prefix name.
File
- includes/
mediafront.preset.inc, line 638
Code
function mediafront_preset_name_exists($preset_name) {
// Get the default presets.
$default_presets = mediafront_preset_get_default_presets();
// See if there is a default preset name.
if ($default_presets && isset($default_presets[$preset_name])) {
return true;
}
else {
return (bool) db_result(db_query("SELECT COUNT(*) FROM {mediafront_preset} WHERE name='%s'", $preset_name));
}
}