diff --git a/htdocs/core/ajax/row.php b/htdocs/core/ajax/row.php index 8b16cd4699c..7e9adcc570e 100644 --- a/htdocs/core/ajax/row.php +++ b/htdocs/core/ajax/row.php @@ -48,7 +48,7 @@ if (!defined('NOREQUIRETRAN')) { require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/genericobject.class.php'; - +$hookmanager->initHooks(array('rowinterface')); // Security check // This is done later into view. @@ -116,7 +116,11 @@ if (GETPOST('roworder', 'alpha', 3) && GETPOST('table_element_line', 'aZ09', 3) $perm = 1; } } - + $parameters = array('roworder'=> &$roworder, 'table_element_line' => &$table_element_line, 'fk_element' => &$fk_element, 'element_id' => &$element_id, 'perm' => &$perm); + $reshook = $hookmanager->executeHooks('checkRowPerms', $parameters, $this, $action); + if ($reshook > 0) { + $perm = $hookmanager->resArray['perm']; + } if (! $perm) { // We should not be here. If we are not allowed to reorder rows, feature should not be visible on script. // If we are here, it is a hack attempt, so we report a warning. diff --git a/htdocs/core/tpl/ajaxrow.tpl.php b/htdocs/core/tpl/ajaxrow.tpl.php index 61428170f50..0be260194c2 100644 --- a/htdocs/core/tpl/ajaxrow.tpl.php +++ b/htdocs/core/tpl/ajaxrow.tpl.php @@ -43,7 +43,6 @@ $forcereloadpage = empty($conf->global->MAIN_FORCE_RELOAD_PAGE) ? 0 : 1; $tagidfortablednd = (empty($tagidfortablednd) ? 'tablelines' : $tagidfortablednd); $filepath = (empty($filepath) ? '' : $filepath); - if (GETPOST('action', 'aZ09') != 'editline' && $nboflines > 1 && $conf->browser->layout != 'phone') { ?>