function scald_atom_fallback_load in Scald: Media Management made easy 7
Load a Scald Atom and provide a fallback if that fails.
File
- ./
scald.module, line 461 - The Scald Core, which handles all Scald Registries and dispatch.
Code
function scald_atom_fallback_load($sid) {
if (!is_numeric($sid)) {
return FALSE;
}
$atom = scald_atom_load_multiple(array(
$sid,
));
if (empty($atom)) {
return new ScaldAtom('scald_atom_fallback', 'scald', array(
'sid' => $sid,
));
}
else {
return $atom[$sid];
}
}