FIX return $conf->entity if $object->entity is null
This commit is contained in:
parent
dcf0fbd1c6
commit
86c7bbe33a
@ -82,15 +82,13 @@ if (!function_exists('utf8_decode')) {
|
||||
function getMultidirOutput($object, $module = '')
|
||||
{
|
||||
global $conf;
|
||||
if (!is_object($object)) {
|
||||
if (!is_object($object) && empty($module)) {
|
||||
return null;
|
||||
}
|
||||
if (empty($module) && !empty($object->element)) {
|
||||
if (!empty($object->element)) {
|
||||
$module = $object->element;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
return $conf->$module->multidir_output[$object->entity];
|
||||
return $conf->$module->multidir_output[(!empty($object->entity) ? $object->entity : $conf->entity)];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user