Use a more standard behaviour: If hook return non zero, it is a "replace
code" hook. Otherwise, it is "insert code" hook.
This commit is contained in:
parent
9496fdd20b
commit
0e1dcb9408
@ -83,9 +83,9 @@ function dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefil
|
||||
'loaddate' => $loaddate,
|
||||
'loadsize' => $loadsize
|
||||
);
|
||||
$ret=$hookmanager->executeHooks('getDirList', $parameters);
|
||||
$reshook=$hookmanager->executeHooks('getDirList', $parameters);
|
||||
|
||||
if (! empty($hookmanager->resArray))
|
||||
if (! empty($reshook)) // If hook return non zero, it is a "replace code" hook. Otherwise, it is "insert code" hook.
|
||||
{
|
||||
return $hookmanager->resArray;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user