FIX Bad position of hook formattachOptions call
This commit is contained in:
parent
5c0e6eacf6
commit
eeda176ed6
@ -185,7 +185,7 @@ class FormFile
|
|||||||
|
|
||||||
if ($linkfiles)
|
if ($linkfiles)
|
||||||
{
|
{
|
||||||
$out .= "\n<!-- Start form attach new link -->\n";
|
$out .= "\n<!-- Start form link new url -->\n";
|
||||||
$langs->load('link');
|
$langs->load('link');
|
||||||
$title = $langs->trans("LinkANewFile");
|
$title = $langs->trans("LinkANewFile");
|
||||||
$out .= load_fiche_titre($title, null, null);
|
$out .= load_fiche_titre($title, null, null);
|
||||||
@ -213,19 +213,18 @@ class FormFile
|
|||||||
$out .= '</div>';
|
$out .= '</div>';
|
||||||
$out .= '<div class="clearboth"></div>';
|
$out .= '<div class="clearboth"></div>';
|
||||||
$out .= '</form><br>';
|
$out .= '</form><br>';
|
||||||
$parameters = array('socid'=>(isset($GLOBALS['socid'])?$GLOBALS['socid']:''),'id'=>(isset($GLOBALS['id'])?$GLOBALS['id']:''), 'url'=>$url, 'perm'=>$perm);
|
|
||||||
$res = $hookmanager->executeHooks('formattachOptions',$parameters,$object);
|
|
||||||
|
|
||||||
$out .= "\n<!-- End form attach new file -->\n";
|
$out .= "\n<!-- End form link new url -->\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$parameters = array('socid'=>(isset($GLOBALS['socid'])?$GLOBALS['socid']:''), 'id'=>(isset($GLOBALS['id'])?$GLOBALS['id']:''), 'url'=>$url, 'perm'=>$perm);
|
||||||
|
$res = $hookmanager->executeHooks('formattachOptions',$parameters,$object);
|
||||||
if (empty($res))
|
if (empty($res))
|
||||||
{
|
{
|
||||||
print '<div class="attacharea attacharea'.$htmlname.'">';
|
print '<div class="attacharea attacharea'.$htmlname.'">';
|
||||||
print $out;
|
print $out;
|
||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user