Merge pull request #22187 from dolibit-ut/patch-557
Update bom_list.php
This commit is contained in:
commit
5e4e3265a3
@ -16,9 +16,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/bom/bom_list.php
|
* \file htdocs/bom/bom_list.php
|
||||||
* \ingroup bom
|
* \ingroup bom
|
||||||
* \brief List page for bom
|
* \brief List page for BillOfMaterials
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Load Dolibarr environment
|
// Load Dolibarr environment
|
||||||
@ -29,8 +29,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/bom/class/bom.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/bom/class/bom.class.php';
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("mrp", "other"));
|
$langs->loadLangs(array('mrp', 'other'));
|
||||||
|
|
||||||
|
// Get Parameters
|
||||||
|
$id = GETPOST('id', 'int');
|
||||||
$action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ...
|
$action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ...
|
||||||
$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists)
|
$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists)
|
||||||
$show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk actions ?
|
$show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk actions ?
|
||||||
@ -38,16 +40,14 @@ $confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation
|
|||||||
$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button
|
$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button
|
||||||
$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list
|
$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list
|
||||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'bomlist'; // To manage different context of search
|
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'bomlist'; // To manage different context of search
|
||||||
$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
|
$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
|
||||||
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
|
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
|
||||||
|
|
||||||
$id = GETPOST('id', 'int');
|
|
||||||
|
|
||||||
// Load variable for pagination
|
// Load variable for pagination
|
||||||
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
|
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
|
||||||
$sortfield = GETPOST('sortfield', 'aZ09comma');
|
$sortfield = GETPOST('sortfield', 'aZ09comma');
|
||||||
$sortorder = GETPOST('sortorder', 'aZ09comma');
|
$sortorder = GETPOST('sortorder', 'aZ09comma');
|
||||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST('page', 'int');
|
||||||
if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) {
|
if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) {
|
||||||
$page = 0;
|
$page = 0;
|
||||||
} // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action
|
} // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user