mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into 22.0
This commit is contained in:
@@ -301,13 +301,14 @@ class ActionsMyModule extends CommonHookActions
|
||||
* Overload the restrictedArea function : check permission on an object
|
||||
*
|
||||
* @param array<string,mixed> $parameters Hook metadata (context, etc...)
|
||||
* @param CommonObject $object The object to process (an invoice if you are in invoice module, a propale in propale's module, etc...)
|
||||
* @param string $action Current action (if set). Generally create or edit or null
|
||||
* @param HookManager $hookmanager Hook manager propagated to allow calling another hook
|
||||
* @return int Return integer <0 if KO,
|
||||
* =0 if OK but we want to process standard actions too,
|
||||
* >0 if OK and we want to replace standard actions.
|
||||
*/
|
||||
public function restrictedArea($parameters, &$action, $hookmanager)
|
||||
public function restrictedArea($parameters, $object, &$action, $hookmanager)
|
||||
{
|
||||
global $user;
|
||||
|
||||
@@ -380,7 +381,7 @@ class ActionsMyModule extends CommonHookActions
|
||||
|
||||
|
||||
/**
|
||||
* Overload the showLinkToObjectBlock function : add or replace array of object likable
|
||||
* Overload the showLinkToObjectBlock function : add or replace array of object linkable
|
||||
*
|
||||
* @param array<string,mixed> $parameters Hook metadata (context, etc...)
|
||||
* @param CommonObject $object The object to process (an invoice if you are in invoice module, a propale in propale's module, etc...)
|
||||
|
||||
@@ -89,6 +89,21 @@ if (!empty($batchnumber)) {
|
||||
}
|
||||
$cost_price = GETPOST('cost_price', 'alpha');
|
||||
|
||||
|
||||
// Load variable for pagination
|
||||
$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit;
|
||||
$sortfield = GETPOST('sortfield', 'aZ09comma');
|
||||
$sortorder = GETPOST('sortorder', 'aZ09comma');
|
||||
$page = GETPOSTISSET('pageplusone') ? (GETPOSTINT('pageplusone') - 1) : GETPOSTINT('page');
|
||||
if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) {
|
||||
// If $page is not defined, or '' or -1 or if we click on clear filters
|
||||
$page = 0;
|
||||
}
|
||||
$offset = $limit * $page;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
|
||||
|
||||
// Security check
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
|
||||
Reference in New Issue
Block a user