commit
701d4a1f47
@ -9326,7 +9326,7 @@ function natural_search($fields, $value, $mode = 0, $nofirstand = 0)
|
||||
|
||||
$reg = array();
|
||||
preg_match('/([<>=]+)/', $crit, $reg);
|
||||
if ($reg[1]) {
|
||||
if (!empty($reg[1])) {
|
||||
$operator = $reg[1];
|
||||
}
|
||||
if ($newcrit != '') {
|
||||
|
||||
@ -49,6 +49,7 @@ $confirm = GETPOST('confirm', 'alpha');
|
||||
$id = GETPOST('id', 'int');
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
$fuserid = (GETPOST('fuserid', 'int') ?GETPOST('fuserid', 'int') : $user->id);
|
||||
$socid = GETPOST('socid', 'int');
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("other", "holiday", "mails", "trips"));
|
||||
@ -987,6 +988,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') {
|
||||
print dol_get_fiche_head('', '', '', -1);
|
||||
|
||||
$out = '';
|
||||
$nb_holiday = 0;
|
||||
$typeleaves = $object->getTypes(1, 1);
|
||||
foreach ($typeleaves as $key => $val) {
|
||||
$nb_type = $object->getCPforUser($user->id, $val['rowid']);
|
||||
|
||||
@ -35,6 +35,8 @@ $langs->loadlangs(array('users', 'other', 'holiday', 'hrm'));
|
||||
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'defineholidaylist';
|
||||
$massaction = GETPOST('massaction', 'alpha');
|
||||
$optioncss = GETPOST('optioncss', 'alpha');
|
||||
|
||||
$search_name = GETPOST('search_name', 'alpha');
|
||||
$search_supervisor = GETPOST('search_supervisor', 'int');
|
||||
|
||||
@ -36,6 +36,8 @@ $langs->loadLangs(array('holiday', 'hrm'));
|
||||
|
||||
// Security check
|
||||
$socid = 0;
|
||||
$id = GETPOST('id', 'int');
|
||||
|
||||
if ($user->socid > 0) { // Protection if external user
|
||||
//$socid = $user->socid;
|
||||
accessforbidden();
|
||||
@ -63,6 +65,11 @@ if (!$sortorder) {
|
||||
$sortorder = "ASC";
|
||||
}
|
||||
|
||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||
if (empty($page) || $page == -1) {
|
||||
$page = 0;
|
||||
}
|
||||
|
||||
$hookmanager->initHooks(array('leavemovementlist'));
|
||||
|
||||
$arrayfields = array();
|
||||
|
||||
@ -306,6 +306,9 @@ print '</div>';
|
||||
print '<br>';
|
||||
|
||||
$moreforfilter = '';
|
||||
$morefilter = '';
|
||||
$disabled = 0;
|
||||
$include = '';
|
||||
|
||||
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
|
||||
$selectedfields = '';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user