Skip to content
Snippets Groups Projects
Commit 0e1dcb94 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Use a more standard behaviour: If hook return non zero, it is a "replace

code" hook. Otherwise, it is "insert code" hook.
parent 9496fdd2
Branches
Tags
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment