function _freelinking_nodetitle_failure in Freelinking 7.3
Same name and namespace in other branches
- 6.3 plugins/freelinking_nodetitle.inc \_freelinking_nodetitle_failure()
Determining the proper failure response per plugin configuration
1 call to _freelinking_nodetitle_failure()
- freelinking_nodetitle_callback in plugins/
freelinking_nodetitle.inc - Replacement callback for nodetitle plugin
File
- plugins/
freelinking_nodetitle.inc, line 161
Code
function _freelinking_nodetitle_failure($target) {
$failover = variable_get('freelinking_nodetitle_failover', _freelinking_nodetitle_default_failover());
switch ($failover) {
case 'create':
return array(
'failover' => 'freelinking_prepopulate',
'target' => $target,
);
case 'showtext':
return array(
'failover' => 'showtext',
'target' => $target,
);
case 'search':
return array(
'failover' => 'search',
'target' => $target,
);
case 'error':
return array(
'failover' => 'error',
'message' => t('node title “%title” does not exist', array(
'%title' => $target['dest'],
)),
);
}
// do nothing
return FALSE;
}