Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2022-12-22 20:34:22 +01:00
commit 8f02fb2ab8
32 changed files with 101 additions and 66 deletions

View File

@ -242,16 +242,16 @@ if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $
exit;
}
$help_url = 'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros';
llxHeader('', $langs->trans("ListOfSubscriptions"), $help_url);
$i = 0;
$title = $langs->trans("ListOfSubscriptions");
$title = $langs->trans("Subscriptions");
if (!empty($date_select)) {
$title .= ' ('.$langs->trans("Year").' '.$date_select.')';
}
$help_url = 'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros';
llxHeader('', $title, $help_url);
$i = 0;
$param = '';
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
$param .= '&contextpage='.urlencode($contextpage);

View File

@ -50,8 +50,13 @@ llxHeader();
print load_fiche_titre($langs->trans("PerfDolibarr"), '', 'title_setup');
print '<span class="opacitymedium">'.$langs->trans("YouMayFindPerfAdviceHere", 'https://wiki.dolibarr.org/index.php/FAQ_Increase_Performance').'</span> (<a href="'.$_SERVER["PHP_SELF"].'">'.$langs->trans("Reload").'</a>)<br>';
print '<span class="opacitymedium">'.$langs->trans("YouMayFindPerfAdviceHere", 'https://wiki.dolibarr.org/index.php/FAQ_Increase_Performance').'</span>';
print ' &nbsp; &nbsp; ';
print '<a href="'.$_SERVER["PHP_SELF"].'">';
print img_picto($langs->trans("Reload"), 'refresh').' ';
print $langs->trans("Reload");
print '</a>';
print '<br>';
print '<br>';
print '<hr>';

View File

@ -41,7 +41,7 @@ if (GETPOST('action', 'aZ09') == 'donothing') {
exit;
}
$execmethod = empty($conf->global->MAIN_EXEC_USE_POPEN) ? 1 : $conf->global->MAIN_EXEC_USE_POPEN;
$execmethod = getDolGlobalInt('MAIN_EXEC_USE_POPEN', 1);
/*
@ -52,7 +52,13 @@ llxHeader();
print load_fiche_titre($langs->trans("Security"), '', 'title_setup');
print '<span class="opacitymedium">'.$langs->trans("YouMayFindSecurityAdviceHere", 'hhttps://wiki.dolibarr.org/index.php/Security_information').'</span> (<a href="'.$_SERVER["PHP_SELF"].'">'.$langs->trans("Reload").'</a>)<br>';
print '<span class="opacitymedium">'.$langs->trans("YouMayFindSecurityAdviceHere", 'hhttps://wiki.dolibarr.org/index.php/Security_information').'</span>';
print ' &nbsp; &nbsp; ';
print '<a href="'.$_SERVER["PHP_SELF"].'">';
print img_picto($langs->trans("Reload"), 'refresh').' ';
print $langs->trans("Reload");
print '</a>';
print '<br>';
print '<br>';
print load_fiche_titre($langs->trans("PHPSetup"), '', 'folder');

View File

@ -99,7 +99,7 @@ if ($action == 'delete') {
$form = new Form($db);
$title = $langs->trans("ListOfBookmarks");
$title = $langs->trans("Bookmarks");
llxHeader('', $title);

View File

@ -187,7 +187,7 @@ $resql = $db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
$title = $langs->trans("ListOfEMailings");
$title = $langs->trans("EMailings");
if ($filteremail) {
$title .= ' ('.$langs->trans("SentTo", $filteremail).')';
}

View File

@ -4331,16 +4331,6 @@ class OrderLine extends CommonOrderLine
dol_syslog("OrderLine::delete", LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
// Remove extrafields
if (!$error) {
$this->id = $this->rowid;
$result = $this->deleteExtraFields();
if ($result < 0) {
$error++;
dol_syslog(get_class($this)."::delete error -4 ".$this->error, LOG_ERR);
}
}
if (!$error && !$notrigger) {
// Call trigger
$result = $this->call_trigger('LINEORDER_DELETE', $user);
@ -4350,6 +4340,15 @@ class OrderLine extends CommonOrderLine
// End call triggers
}
// Remove extrafields
if (!$error) {
$result = $this->deleteExtraFields();
if ($result < 0) {
$error++;
dol_syslog(get_class($this)."::delete error -4 ".$this->error, LOG_ERR);
}
}
if (!$error) {
$this->db->commit();
return 1;

View File

@ -133,7 +133,7 @@ if ($resql) {
$langs->load('commercial');
print_barre_liste($langs->trans("ListOfCustomers"), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, '', $num);
print_barre_liste($langs->trans("Customers"), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, '', $num);
print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">';

View File

@ -68,7 +68,7 @@ $childids[] = $user->id;
//$help_url='EN:Module_Donations|FR:Module_Dons|ES:M&oacute;dulo_Donaciones';
$help_url = '';
llxHeader('', $langs->trans("ListOfFees"), $help_url);
llxHeader('', $langs->trans("TripsAndExpenses"), $help_url);

View File

@ -131,7 +131,7 @@ $resql = $db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
print_barre_liste($langs->trans("ListOfFees"), $page, $_SERVER["PHP_SELF"], "&socid=$socid", $sortfield, $sortorder, '', $num);
print_barre_liste($langs->trans("TripsAndExpenses"), $page, $_SERVER["PHP_SELF"], "&socid=$socid", $sortfield, $sortorder, '', $num);
$i = 0;
print '<form method="get" action="'.$_SERVER["PHP_SELF"].'">'."\n";

View File

@ -367,7 +367,7 @@ if ($modecompta == 'BOOKKEEPING') {
$cpts = $AccCat->getCptsCat(0, $tmppredefinedgroupwhere);
foreach ($cpts as $j => $cpt) {
$return = $AccCat->getSumDebitCredit($cpt['account_number'], $date_start, $date_end, $cpt['dc']);
$return = $AccCat->getSumDebitCredit($cpt['account_number'], $date_start, $date_end, (empty($cpt['dc']) ? 0 : $cpt['dc']));
if ($return < 0) {
setEventMessages(null, $AccCat->errors, 'errors');
$resultN = 0;

View File

@ -99,7 +99,8 @@ class box_members_by_type extends ModeleBoxes
$MembersResiliated = array();
$SumToValidate = 0;
$SumValidated = 0;
$SumPending = 0;
$SumExpired = 0;
$SumUpToDate = 0;
$SumResiliated = 0;
$SumExcluded = 0;
@ -233,6 +234,7 @@ class box_members_by_type extends ModeleBoxes
'text' => $labelstatus
);
$line++;
foreach ($AdherentType as $key => $adhtype) {
$SumToValidate += isset($MembersToValidate[$key]) ? $MembersToValidate[$key] : 0;
$SumPending += isset($MembersPending[$key]) ? $MembersPending[$key] : 0;

View File

@ -1211,7 +1211,7 @@ class DolGraph
$tmp = str_replace('#', '', $this->datacolor[$i]);
if (strpos($tmp, '-') !== false) {
$foundnegativecolor++;
$color = '#FFFFFF'; // If $val is '-123'
$color = 'rgba(0,0,0,.0)'; // If $val is '-123'
} else {
$color = "#" . $tmp; // If $val is '123' or '#123'
}

View File

@ -265,6 +265,14 @@ class modHRM extends DolibarrModules
$this->rights[$r][4] = 'write_personal_information';
$this->rights[$r][5] = 'write'; // In php code, permission will be checked by test if ($user->rights->hrm->write_personal_information->write)
$r++;
// Evaluation
$this->rights[$r][0] = 4033; // Permission id (must not be already used)
$this->rights[$r][1] = 'Read all evaluations'; // Permission label
$this->rights[$r][3] = 0; // Permission by default for new user (0/1)
$this->rights[$r][4] = 'evaluation';
$this->rights[$r][5] = 'readall'; // In php code, permission will be checked by test if ($user->rights->hrm->evaluation->read)
$r++;
}
/**

View File

@ -257,7 +257,7 @@ if ($projectid > 0 || $projectref) {
}
$help_url = "EN:Module_Projects|FR:Module_Projets|ES:M&oacute;dulo_Proyectos";
$title = $langs->trans("Project") . ' - ' . $langs->trans("ListOfConferencesOrBooths") . ' - ' . $project->ref . ' ' . $project->name;
$title = $langs->trans("Project") . ' - ' . $langs->trans("EventOrganizationConfOrBoothes") . ' - ' . $project->ref . ' ' . $project->name;
if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $project->name) {
$title = $project->ref . ' ' . $project->name . ' - ' . $langs->trans("ListOfConferencesOrBooths");
}
@ -675,7 +675,7 @@ print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
print '<input type="hidden" name="page_y" value="">';
$title = $langs->trans("ListOfConferencesOrBooths");
$title = $langs->trans("EventOrganizationConfOrBoothes");
$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/eventorganization/conferenceorbooth_card.php?action=create'.(!empty($project->id)?'&withproject=1&fk_project='.$project->id:'').(!empty($project->socid)?'&fk_soc='.$project->socid:'').'&backtopage='.urlencode($_SERVER['PHP_SELF']).(!empty($project->id)?'?projectid='.$project->id:''), '', $permissiontoadd);

View File

@ -78,7 +78,7 @@ $childids[] = $user->id;
$help_url = "EN:Module_Expense_Reports|FR:Module_Notes_de_frais";
llxHeader('', $langs->trans("ListOfFees"), $help_url);
llxHeader('', $langs->trans("TripsAndExpenses"), $help_url);
$label = $somme = $nb = array();

View File

@ -254,7 +254,7 @@ $formexpensereport = new FormExpenseReport($db);
$fuser = new User($db);
$title = $langs->trans("ListOfTrips");
$title = $langs->trans("TripsAndExpenses");
llxHeader('', $title);
$max_year = 5;

View File

@ -213,7 +213,7 @@ if (isModEnabled('contrat')) {
$now = dol_now();
$help_url = '';
$title = $langs->trans("ListOfInterventions");
$title = $langs->trans("Interventions");
$morejs = array();
$morecss = array();

View File

@ -118,7 +118,7 @@ class Evaluation extends CommonObject
'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>'1', 'position'=>1000, 'notnull'=>-1, 'visible'=>-2,),
'status' => array('type'=>'smallint', 'label'=>'Status', 'enabled'=>'1', 'position'=>1000, 'notnull'=>1, 'default'=>0, 'visible'=>5, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Draft', '1'=>'Validated', '6' => 'Closed'),),
'date_eval' => array('type'=>'date', 'label'=>'DateEval', 'enabled'=>'1', 'position'=>502, 'notnull'=>1, 'visible'=>1,),
'fk_user' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'User', 'enabled'=>'1', 'position'=>504, 'notnull'=>1, 'visible'=>1,),
'fk_user' => array('type'=>'integer:User:user/class/user.class.php:0', 'label'=>'User', 'enabled'=>'1', 'position'=>504, 'notnull'=>1, 'visible'=>1,),
'fk_job' => array('type'=>'integer:Job:/hrm/class/job.class.php', 'label'=>'JobPosition', 'enabled'=>'1', 'position'=>505, 'notnull'=>1, 'visible'=>1,),
);
public $rowid;
@ -182,7 +182,7 @@ class Evaluation extends CommonObject
*/
public function __construct(DoliDB $db)
{
global $conf, $langs;
global $conf, $langs, $user;
$this->db = $db;
@ -193,6 +193,10 @@ class Evaluation extends CommonObject
$this->fields['entity']['enabled'] = 0;
}
if (empty($user->rights->hrm->evaluation->readall)) {
$this->fields['fk_user']['type'].= ':rowid IN('.$this->db->sanitize(implode(", ", $user->getAllChildIds(1))).')';
}
$this->date_eval = dol_now();
// Unset fields that are disabled

View File

@ -83,7 +83,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be includ
// Permissions
$permissiontoread = $user->rights->hrm->evaluation->read;
$permissiontoadd = $user->rights->hrm->evaluation->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
$permissiontovalidate = $user->rights->hrm->evaluation_advance->validate;
$permissiontovalidate = (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->rights->hrm->evaluation_advance->validate) || (empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $permissiontoadd);
$permissiontoClose = $user->rights->hrm->evaluation->write;
$permissiontodelete = $user->rights->hrm->evaluation->delete/* || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT)*/;
$permissiondellink = $user->rights->hrm->evaluation->write; // Used by the include of actions_dellink.inc.php

View File

@ -133,9 +133,10 @@ $object->fields = dol_sort_array($object->fields, 'position');
$arrayfields = dol_sort_array($arrayfields, 'position');
// Permissions
$permissiontoread = $user->rights->hrm->evaluation->read;
$permissiontoadd = $user->rights->hrm->evaluation->write;
$permissiontodelete = $user->rights->hrm->evaluation->delete;
$permissiontoread = $user->rights->hrm->evaluation->read;
$permissiontoreadall = $user->rights->hrm->evaluation->readall;
$permissiontoadd = $user->rights->hrm->evaluation->write;
$permissiontodelete = $user->rights->hrm->evaluation->delete;
// Security check
if (empty($conf->hrm->enabled)) {
@ -149,7 +150,7 @@ if ($user->socid > 0) accessforbidden();
//$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
//restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft);
//if (empty($conf->hrm->enabled)) accessforbidden();
//if (!$permissiontoread) accessforbidden();
if (!$permissiontoread) accessforbidden();
@ -276,6 +277,11 @@ foreach ($search as $key => $val) {
if ($search_all) {
$sql .= natural_search(array_keys($fieldstosearchall), $search_all);
}
if (empty($permissiontoreadall)) {
$sql.= " AND t.fk_user IN(".$db->sanitize(implode(", ", $user->getAllChildIds(1))).") ";
}
//$sql.= dolSqlDateFilter("t.field", $search_xxxday, $search_xxxmonth, $search_xxxyear);
// Add where from extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php';

View File

@ -974,13 +974,14 @@ Permission3301=Generate new modules
Permission4001=Read skill/job/position
Permission4002=Create/modify skill/job/position
Permission4003=Delete skill/job/position
Permission4020=Read evaluations
Permission4021=Create/modify your evaluation
Permission4022=Validate evaluation
Permission4023=Delete evaluation
Permission4030=See comparison menu
Permission4021=Read evaluations (yours and your subordinates)
Permission4022=Create/modify evaluations
Permission4023=Validate evaluation
Permission4025=Delete evaluation
Permission4028=See comparison menu
Permission4031=Read personal information
Permission4032=Write personal information
Permission4033=Read all evaluations (even those of user not subordinates)
Permission10001=Read website content
Permission10002=Create/modify website content (html and javascript content)
Permission10003=Create/modify website content (dynamic php code). Dangerous, must be reserved to restricted developers.
@ -2231,12 +2232,12 @@ MailToPartnership=Partnership
AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form
YouShouldDisablePHPFunctions=You should disable PHP functions
IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands in custom code, you shoud disable PHP functions
PHPFunctionsRequiredForCLI=For shell purpose (like scheduled job backup or running an anitivurs program), you must keep PHP functions
PHPFunctionsRequiredForCLI=For shell purpose (like scheduled job backup or running an antivirus program), you must keep PHP functions
NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good)
RecommendedValueIs=Recommended: %s
Recommended=Recommended
NotRecommended=Not recommended
ARestrictedPath=Some restricted path
ARestrictedPath=Some restricted path for data files
CheckForModuleUpdate=Check for external modules updates
CheckForModuleUpdateHelp=This action will connect to editors of external modules to check if a new version is available.
ModuleUpdateAvailable=An update is available

View File

@ -54,6 +54,7 @@ EVENTORGANIZATION_FILTERATTENDEES_TYPE = In the form to create/add an attendee,
# Object
#
EventOrganizationConfOrBooth= Conference Or Booth
EventOrganizationConfOrBoothes=Conferences or Boothes
ManageOrganizeEvent = Manage the organization of an event
ConferenceOrBooth = Conference Or Booth
ConferenceOrBoothTab = Conference Or Booth
@ -114,8 +115,8 @@ EvntOrgRegistrationHelpMessage = Here, you can vote for a conference or suggest
EvntOrgRegistrationConfHelpMessage = Here, you can suggest a new conference to animate during the event.
EvntOrgRegistrationBoothHelpMessage = Here, you can apply to have a booth during the event.
ListOfSuggestedConferences = List of suggested conferences
ListOfSuggestedBooths = List of suggested booths
ListOfConferencesOrBooths=List of conferences or booths of event project
ListOfSuggestedBooths=Suggested booths
ListOfConferencesOrBooths=Conferences or booths of event project
SuggestConference = Suggest a new conference
SuggestBooth = Suggest a booth
ViewAndVote = View and vote for suggested events

View File

@ -108,7 +108,7 @@ TripId=Id expense report
TripNDF=Informations expense report
TripSociete=Information company
Trips=Expense reports
TripsAndExpenses=Expenses reports
TripsAndExpenses=Expense reports
TripsAndExpensesStatistics=Expense reports statistics
TypeFees=Types of fees
UploadANewFileNow=Upload a new document now

View File

@ -971,13 +971,14 @@ Permission3301=Générer de nouveaux modules
Permission4001=Lire compétence/emploi/poste
Permission4002=Créer/modifier une compétence/un emploi/un poste
Permission4003=Supprimer compétence/emploi/poste
Permission4020=Lire les évaluations
Permission4021=Créer/modifier votre évaluation
Permission4022=Valider l'évaluation
Permission4023=Supprimer l'évaluation
Permission4030=Voir menu de comparaison
Permission4021=Lire les évaluations (les vôtres et celles de vos subordonnés)
Permission4022=Créer/modifier les évaluations
Permission4023=Valider l'évaluation
Permission4025=Supprimer l'évaluation
Permission4028=Voir menu de comparaison
Permission4031=Lire les informations personnelles
Permission4032=Ecrire les informations personnelles
Permission4033=Lire toutes les évaluations (même celles des utilisateurs non subordonnés)
Permission10001=Lire le contenu du site
Permission10002=Créer/modifier le contenu du site Web (contenu HTML et JavaScript)
Permission10003=Créer/modifier le contenu du site Web (code php dynamique). Dangereux, doit être réservé à un nombre restreint de développeurs.

View File

@ -998,7 +998,7 @@ if (!defined('NOLOGIN')) {
$hookmanager->initHooks(array('main'));
// Code for search criteria persistence.
if (!empty($_GET['save_lastsearch_values'])) { // We must use $_GET here
if (!empty($_GET['save_lastsearch_values']) && !empty($_SERVER["HTTP_REFERER"])) { // We must use $_GET here
$relativepathstring = preg_replace('/\?.*$/', '', $_SERVER["HTTP_REFERER"]);
$relativepathstring = preg_replace('/^https?:\/\/[^\/]*/', '', $relativepathstring); // Get full path except host server
// Clean $relativepathstring

View File

@ -196,7 +196,7 @@ $warehouse = new Entrepot($db);
$now = dol_now();
$help_url = 'EN:Module_Stocks_En|FR:Module_Stock|ES:M&oacute;dulo_Stocks';
$title = $langs->trans("ListOfWarehouses");
$title = $langs->trans("Warehouses");
$totalarray = array();
$totalarray['nbfield'] = 0;

View File

@ -246,7 +246,7 @@ function _createStatusBadgeCss($statusName, $statusVarNamePrefix = '', $commentL
if (in_array((string) $statusName, $TBadgeBorderOnly)) {
$thisBadgeTextColor = '#212529';
$thisBadgeBackgroundColor = "#fff";
$thisBadgeBackgroundColor = "";
}
if (in_array((string) $statusName, array('0', '5', '9'))) {

View File

@ -53,6 +53,7 @@
--productlinestockod: #002200;
--productlinestocktoolow: #884400;
--infoboxmoduleenabledbgcolor : linear-gradient(0.4turn, #fff, #fff, #fff, #e4efe8);
--tablevalidbgcolor: rgb(252, 248, 227);
}
<?php
@ -103,6 +104,7 @@ if (!empty($conf->global->THEME_DARKMODEENABLED)) {
--amountpaymentcomplete:rgb(101,184,77);
--amountremaintopaybackcolor:rbg(245,130,46);
--infoboxmoduleenabledbgcolor : linear-gradient(0.4turn, #000, #000, #000, #274231);
--tablevalidbgcolor: rgb(80, 64, 33);
}
body, button {
@ -3164,7 +3166,7 @@ a.vmenu:link, a.vmenu:visited {
a.vsmenu:link, a.vsmenu:visited, a.vsmenu:hover, a.vsmenu:active, span.vsmenu {
font-family: <?php print $fontlist ?>;
text-align: <?php print $left; ?>;
color: #202020;
color: var(--colortextbackvmenu);
margin: 1px 1px 1px 6px;
}
span.vsmenudisabled, font.vsmenudisabled {
@ -5001,7 +5003,7 @@ table.valid {
padding-right: 4px;
padding-bottom: 4px;
margin: 0px 0px;
background: #fcf8e3;
background: var(--tablevalidbgcolor);
}
.validtitre {

View File

@ -827,9 +827,6 @@ if ($action == 'create' || $action == 'presend') {
// Confirmation abandon
if ($action == 'abandon') {
print $form->formconfirm($url_page_current."?track_id=".$object->track_id, $langs->trans("AbandonTicket"), $langs->trans("ConfirmAbandonTicket"), "confirm_abandon", '', '', 1);
if ($ret == 'html') {
print '<br>';
}
}
// Confirmation delete
if ($action == 'delete') {

View File

@ -236,7 +236,7 @@ class Ticket extends CommonObject
const STATUS_READ = 1;
const STATUS_ASSIGNED = 2;
const STATUS_IN_PROGRESS = 3;
const STATUS_NEED_MORE_INFO = 5;
const STATUS_NEED_MORE_INFO = 5; // waiting requester feedback
const STATUS_WAITING = 7; // on hold
const STATUS_CLOSED = 8; // Closed - Solved
const STATUS_CANCELED = 9; // Closed - Not solved

View File

@ -121,7 +121,7 @@ if (empty($reshook)) {
/*
* View
*/
$title = $langs->trans("ListOfGroups");
$title = $langs->trans("UserGroups");
$help_url="";
llxHeader('', $title, $help_url);
@ -156,7 +156,7 @@ if ($resql) {
$param .= '&amp;optioncss='.$optioncss;
}
$text = $langs->trans("ListOfGroups");
$text = $langs->trans("UserGroups");
$newcardbutton = '';
if ($caneditperms) {

View File

@ -42,6 +42,9 @@ if ($user->socid > 0) {
$optioncss = GETPOST('optioncss', 'alpha');
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'userlist'; // To manage different context of search
$mode = GETPOST("mode", 'alpha');
if (empty($mode)) {
$mode = 'hierarchy';
}
$sortfield = GETPOST('sortfield', 'aZ09comma');
$sortorder = GETPOST('sortorder', 'aZ09comma');