FIX missing hook for row ordering
This commit is contained in:
parent
7b21e0b6ff
commit
270ce3d169
@ -48,7 +48,7 @@ if (!defined('NOREQUIRETRAN')) {
|
|||||||
|
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/genericobject.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/genericobject.class.php';
|
||||||
|
$hookmanager->initHooks(array('rowinterface'));
|
||||||
// Security check
|
// Security check
|
||||||
// This is done later into view.
|
// This is done later into view.
|
||||||
|
|
||||||
@ -116,7 +116,11 @@ if (GETPOST('roworder', 'alpha', 3) && GETPOST('table_element_line', 'aZ09', 3)
|
|||||||
$perm = 1;
|
$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) {
|
if (! $perm) {
|
||||||
// We should not be here. If we are not allowed to reorder rows, feature should not be visible on script.
|
// 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.
|
// If we are here, it is a hack attempt, so we report a warning.
|
||||||
|
|||||||
@ -43,7 +43,6 @@ $forcereloadpage = empty($conf->global->MAIN_FORCE_RELOAD_PAGE) ? 0 : 1;
|
|||||||
$tagidfortablednd = (empty($tagidfortablednd) ? 'tablelines' : $tagidfortablednd);
|
$tagidfortablednd = (empty($tagidfortablednd) ? 'tablelines' : $tagidfortablednd);
|
||||||
$filepath = (empty($filepath) ? '' : $filepath);
|
$filepath = (empty($filepath) ? '' : $filepath);
|
||||||
|
|
||||||
|
|
||||||
if (GETPOST('action', 'aZ09') != 'editline' && $nboflines > 1 && $conf->browser->layout != 'phone') { ?>
|
if (GETPOST('action', 'aZ09') != 'editline' && $nboflines > 1 && $conf->browser->layout != 'phone') { ?>
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user