diff --git a/ChangeLog b/ChangeLog index 647030db6eb..4525d48049d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,24 @@ English Dolibarr ChangeLog -------------------------------------------------------------- +***** ChangeLog for 14.0.0 compared to 13.0.0 ***** + +For users: +---------- + + +For developers: +--------------- + + + +WARNING: + +Following changes may create regressions for some external modules, but were necessary to make Dolibarr better: +* The ICS value for direct debit or credit transfer is now store on each bank account instead of into the global setup. + + + ***** ChangeLog for 13.0.0 compared to 12.0.0 ***** For users: diff --git a/htdocs/accountancy/admin/index.php b/htdocs/accountancy/admin/index.php index b002fabd0a1..a7bf28d9091 100644 --- a/htdocs/accountancy/admin/index.php +++ b/htdocs/accountancy/admin/index.php @@ -117,6 +117,7 @@ if ($action == 'setlistsortdone') { if (!($res > 0)) { $error++; } + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { @@ -130,6 +131,7 @@ if ($action == 'setmanagezero') { if (!($res > 0)) { $error++; } + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { @@ -143,6 +145,7 @@ if ($action == 'setdisabledirectinput') { if (!($res > 0)) { $error++; } + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { @@ -156,6 +159,7 @@ if ($action == 'setenabledraftexport') { if (!($res > 0)) { $error++; } + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { @@ -169,6 +173,7 @@ if ($action == 'setenablesubsidiarylist') { if (!($res > 0)) { $error++; } + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { @@ -182,6 +187,7 @@ if ($action == 'setdisablebindingonsales') { if (!($res > 0)) { $error++; } + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { @@ -195,6 +201,7 @@ if ($action == 'setdisablebindingonpurchases') { if (!($res > 0)) { $error++; } + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { @@ -208,6 +215,7 @@ if ($action == 'setdisablebindingonexpensereports') { if (!($res > 0)) { $error++; } + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { @@ -215,9 +223,11 @@ if ($action == 'setdisablebindingonexpensereports') { } } + /* * View */ + $form = new Form($db); $title = $langs->trans('ConfigAccountingExpert'); diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index 92e407732e0..065c0b06d08 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -87,7 +87,7 @@ $search_debit = GETPOST('search_debit', 'alpha'); $search_credit = GETPOST('search_credit', 'alpha'); $search_ledger_code = GETPOST('search_ledger_code', 'array'); $search_lettering_code = GETPOST('search_lettering_code', 'alpha'); -$search_not_reconciled = GETPOST('search_reconciled_option', 'alpha'); +$search_not_reconciled = GETPOST('search_not_reconciled', 'alpha'); // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : (empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION) ? $conf->liste_limit : $conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION); @@ -784,7 +784,7 @@ if (!empty($arrayfields['t.lettering_code']['checked'])) { print ''; print ''; - print '
'.$langs->trans("NotReconciled").''; + print '
'.$langs->trans("NotReconciled").''; print ''; } diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php index 21b8c51380d..9e62f9e0b79 100644 --- a/htdocs/accountancy/bookkeeping/listbyaccount.php +++ b/htdocs/accountancy/bookkeeping/listbyaccount.php @@ -74,7 +74,7 @@ $search_ledger_code = GETPOST('search_ledger_code', 'array'); $search_debit = GETPOST('search_debit', 'alpha'); $search_credit = GETPOST('search_credit', 'alpha'); $search_lettering_code = GETPOST('search_lettering_code', 'alpha'); -$search_not_reconciled = GETPOST('search_reconciled_option', 'alpha'); +$search_not_reconciled = GETPOST('search_not_reconciled', 'alpha'); if (GETPOST("button_delmvt_x") || GETPOST("button_delmvt.x") || GETPOST("button_delmvt")) { $action = 'delbookkeepingyear'; @@ -516,7 +516,7 @@ if (!empty($arrayfields['t.lettering_code']['checked'])) { print ''; print ''; - print '
'.$langs->trans("NotReconciled").''; + print '
'.$langs->trans("NotReconciled").''; print ''; } // Date export diff --git a/htdocs/accountancy/bookkeeping/listbysubaccount.php b/htdocs/accountancy/bookkeeping/listbysubaccount.php index b7ef25fd821..01b1a0a1335 100644 --- a/htdocs/accountancy/bookkeeping/listbysubaccount.php +++ b/htdocs/accountancy/bookkeeping/listbysubaccount.php @@ -74,7 +74,7 @@ $search_ledger_code = GETPOST('search_ledger_code', 'array'); $search_debit = GETPOST('search_debit', 'alpha'); $search_credit = GETPOST('search_credit', 'alpha'); $search_lettering_code = GETPOST('search_lettering_code', 'alpha'); -$search_not_reconciled = GETPOST('search_reconciled_option', 'alpha'); +$search_not_reconciled = GETPOST('search_not_reconciled', 'alpha'); if (GETPOST("button_delmvt_x") || GETPOST("button_delmvt.x") || GETPOST("button_delmvt")) { $action = 'delbookkeepingyear'; @@ -544,7 +544,7 @@ if (!empty($arrayfields['t.credit']['checked'])) { if (!empty($arrayfields['t.lettering_code']['checked'])) { print ''; print ''; - print '
'.$langs->trans("NotReconciled").''; + print '
'.$langs->trans("NotReconciled").''; print ''; } // Date export diff --git a/htdocs/admin/mailing.php b/htdocs/admin/mailing.php index afec0ca1920..4ea5db1cecd 100644 --- a/htdocs/admin/mailing.php +++ b/htdocs/admin/mailing.php @@ -36,6 +36,7 @@ $action = GETPOST('action', 'aZ09'); $form = new Form($db); + /* * Actions */ @@ -65,8 +66,7 @@ if ($action == 'setvalue') if (!($res > 0)) $error++; - if (!$error) - { + if (!$error) { $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { diff --git a/htdocs/admin/paymentbybanktransfer.php b/htdocs/admin/paymentbybanktransfer.php index 1214dd671c4..113c4e18510 100644 --- a/htdocs/admin/paymentbybanktransfer.php +++ b/htdocs/admin/paymentbybanktransfer.php @@ -50,8 +50,7 @@ if ($action == "set") $id = GETPOST('PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT', 'int'); $account = new Account($db); - if ($account->fetch($id) > 0) - { + if ($account->fetch($id) > 0) { $res = dolibarr_set_const($db, "PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT", $id, 'chaine', 0, '', $conf->entity); if (!($res > 0)) $error++; /* @@ -70,11 +69,14 @@ if ($action == "set") $res = dolibarr_set_const($db, "PRELEVEMENT_RAISON_SOCIALE", $account->proprio,'chaine',0,'',$conf->entity); if (! $res > 0) $error++; */ - } else $error++; + } else { + $error++; + } /* Moved to account $res = dolibarr_set_const($db, "PAYMENTBYBANKTRANSFER_ICS", GETPOST("PAYMENTBYBANKTRANSFER_ICS"), 'chaine', 0, '', $conf->entity); if (!($res > 0)) $error++; */ + if (GETPOST("PAYMENTBYBANKTRANSFER_USER") > 0) { $res = dolibarr_set_const($db, "PAYMENTBYBANKTRANSFER_USER", GETPOST("PAYMENTBYBANKTRANSFER_USER"), 'chaine', 0, '', $conf->entity); diff --git a/htdocs/admin/prelevement.php b/htdocs/admin/prelevement.php index 00837a222b9..a51fc8b39f4 100644 --- a/htdocs/admin/prelevement.php +++ b/htdocs/admin/prelevement.php @@ -75,7 +75,6 @@ if ($action == "set") } else $error++; /* Moved to account - $res = dolibarr_set_const($db, "PRELEVEMENT_ICS", GETPOST("PRELEVEMENT_ICS"), 'chaine', 0, '', $conf->entity); if (!($res > 0)) $error++; */ diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 8e303ac0f1a..c4ab884b6f7 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -6042,8 +6042,7 @@ abstract class CommonObject $objectid = $this->id; - if ($computed) - { + if ($computed) { if (!preg_match('/^search_/', $keyprefix)) return ''.$langs->trans("AutomaticallyCalculated").''; else return ''; } @@ -6052,26 +6051,20 @@ abstract class CommonObject if (empty($morecss) && !empty($val['css'])) { $morecss = $val['css']; } elseif (empty($morecss)) { - if ($type == 'date') - { + if ($type == 'date') { $morecss = 'minwidth100imp'; - } elseif ($type == 'datetime' || $type == 'link') // link means an foreign key to another primary id - { + } elseif ($type == 'datetime' || $type == 'link') { // link means an foreign key to another primary id $morecss = 'minwidth200imp'; - } elseif (in_array($type, array('int', 'integer', 'price')) || preg_match('/^double(\([0-9],[0-9]\)){0,1}/', $type)) - { + } elseif (in_array($type, array('int', 'integer', 'price')) || preg_match('/^double(\([0-9],[0-9]\)){0,1}/', $type)) { $morecss = 'maxwidth75'; } elseif ($type == 'url') { $morecss = 'minwidth400'; - } elseif ($type == 'boolean') - { + } elseif ($type == 'boolean') { $morecss = ''; } else { - if (round($size) < 12) - { + if (round($size) < 12) { $morecss = 'minwidth100'; - } elseif (round($size) <= 48) - { + } elseif (round($size) <= 48) { $morecss = 'minwidth200'; } else { $morecss = 'minwidth400'; @@ -6468,13 +6461,13 @@ abstract class CommonObject if (!preg_match('/search_/', $keyprefix)) { if (!empty($param_list_array[2])) { // If the entry into $fields is set to add a create button - if ($this->fields[$key]['picto']) { + if (!empty($this->fields[$key]['picto'])) { $morecss .= ' widthcentpercentminusxx'; } else { $morecss .= ' widthcentpercentminusx'; } } else { - if ($this->fields[$key]['picto']) { + if (!empty($this->fields[$key]['picto'])) { $morecss .= ' widthcentpercentminusx'; } } diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index 60debed9f2d..d7cf03c41e0 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -408,7 +408,7 @@ class FormTicket { $formproject = new FormProjets($this->db); print ''; - print $formproject->select_projects(-1, GETPOST('projectid', 'int'), 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 0, 0, 'maxwidth500'); + print img_picto('', 'project').$formproject->select_projects(-1, GETPOST('projectid', 'int'), 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500'); print ''; } diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 7b94a67e500..2cf34ace170 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1879,7 +1879,7 @@ BackgroundTableLineOddColor=Background color for odd table lines BackgroundTableLineEvenColor=Background color for even table lines MinimumNoticePeriod=Minimum notice period (Your leave request must be done before this delay) NbAddedAutomatically=Number of days added to counters of users (automatically) each month -EnterAnyCode=This field contains a reference to identify line. Enter any value of your choice, but without special characters. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. Enter0or1=Enter 0 or 1 UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] ColorFormat=The RGB color is in HEX format, eg: FF0000 @@ -2094,4 +2094,5 @@ ModuleActivatedDoNotUseInProduction=A module designed for the development has be CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module %s is used, show details of subproducts of a kit on PDF. -AskThisIDToYourBank=Contact your bank to get this ID \ No newline at end of file +AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only \ No newline at end of file diff --git a/htdocs/modulebuilder/template/admin/setup.php b/htdocs/modulebuilder/template/admin/setup.php index 058f15baae3..e93b8686d79 100644 --- a/htdocs/modulebuilder/template/admin/setup.php +++ b/htdocs/modulebuilder/template/admin/setup.php @@ -83,10 +83,9 @@ if ($action == 'updateMask') { if ($maskconstorder) { $res = dolibarr_set_const($db, $maskconstorder, $maskorder, 'chaine', 0, '', $conf->entity); - } - - if (!($res > 0)) { - $error++; + if (!($res > 0)) { + $error++; + } } if (!$error) { diff --git a/htdocs/public/stripe/ipn.php b/htdocs/public/stripe/ipn.php index bfb1bc99c5a..0b5f14c9217 100644 --- a/htdocs/public/stripe/ipn.php +++ b/htdocs/public/stripe/ipn.php @@ -361,7 +361,7 @@ if ($event->type == 'payout.created') { } } elseif ($event->type == 'payment_method.detached') { $db->begin(); - $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_rib WHERE ref = '".$db->escape($event->data->object->id)."' and status = ".$servicestatus; + $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_rib WHERE number = '".$db->escape($event->data->object->id)."' and status = ".$servicestatus; $db->query($sql); $db->commit(); } elseif ($event->type == 'charge.succeeded') { diff --git a/htdocs/recruitment/class/recruitmentcandidature.class.php b/htdocs/recruitment/class/recruitmentcandidature.class.php index 3049f83a053..9e99cbc29fb 100644 --- a/htdocs/recruitment/class/recruitmentcandidature.class.php +++ b/htdocs/recruitment/class/recruitmentcandidature.class.php @@ -115,7 +115,7 @@ class RecruitmentCandidature extends CommonObject 'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>-2,), 'lastname' => array('type'=>'varchar(128)', 'label'=>'Lastname', 'enabled'=>'1', 'position'=>20, 'notnull'=>0, 'visible'=>1,), 'firstname' => array('type'=>'varchar(128)', 'label'=>'Firstname', 'enabled'=>'1', 'position'=>21, 'notnull'=>0, 'visible'=>1,), - 'email' => array('type'=>'varchar(255)', 'label'=>'EMail', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1,), + 'email' => array('type'=>'varchar(255)', 'label'=>'EMail', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'picto'=>'email'), 'phone' => array('type'=>'varchar(64)', 'label'=>'Phone', 'enabled'=>'1', 'position'=>31, 'notnull'=>0, 'visible'=>1,), 'date_birth' => array('type'=>'date', 'label'=>'DateOfBirth', 'enabled'=>'1', 'position'=>70, 'visible'=>-1,), 'email_msgid' => array('type'=>'varchar(255)', 'label'=>'EmailMsgID', 'visible'=>-2, 'enabled'=>1, 'position'=>540, 'notnull'=>-1, 'help'=>'EmailMsgIDDesc'), diff --git a/htdocs/recruitment/class/recruitmentjobposition.class.php b/htdocs/recruitment/class/recruitmentjobposition.class.php index c202a523e58..6861717d825 100644 --- a/htdocs/recruitment/class/recruitmentjobposition.class.php +++ b/htdocs/recruitment/class/recruitmentjobposition.class.php @@ -103,13 +103,13 @@ class RecruitmentJobPosition extends CommonObject 'entity' => array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'position'=>5, 'notnull'=>1, 'default'=>'1', 'index'=>1), 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'visible'=>4, 'noteditable'=>'1', 'default'=>'(PROV)', 'index'=>1, 'searchall'=>1, 'showoncombobox'=>'1', 'comment'=>"Reference of object"), 'label' => array('type'=>'varchar(255)', 'label'=>'JobLabel', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'searchall'=>1, 'css'=>'minwidth500', 'csslist'=>'tdoverflowmax300', 'showoncombobox'=>'1', 'autofocusoncreate'=>1), - 'qty' => array('type'=>'integer', 'label'=>'NbOfEmployeesExpected', 'enabled'=>'1', 'position'=>45, 'notnull'=>1, 'visible'=>1, 'default'=>'1', 'isameasure'=>'1', 'css'=>'maxwidth75imp',), - 'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1', 'label'=>'Project', 'enabled'=>'1', 'position'=>52, 'notnull'=>-1, 'visible'=>-1, 'index'=>1,), + 'qty' => array('type'=>'integer', 'label'=>'NbOfEmployeesExpected', 'enabled'=>'1', 'position'=>45, 'notnull'=>1, 'visible'=>1, 'default'=>'1', 'isameasure'=>'1', 'css'=>'maxwidth75imp'), + 'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1', 'label'=>'Project', 'enabled'=>'1', 'position'=>52, 'notnull'=>-1, 'visible'=>-1, 'index'=>1, 'css'=>'maxwidth500', 'picto'=>'project'), 'fk_user_recruiter' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'ResponsibleOfRecruitement', 'enabled'=>'1', 'position'=>54, 'notnull'=>1, 'visible'=>1, 'foreignkey'=>'user.rowid', 'csslist'=>'tdoverflowmax150'), - 'email_recruiter' => array('type'=>'varchar(255)', 'label'=>'EmailRecruiter', 'enabled'=>'1', 'position'=>54, 'notnull'=>0, 'visible'=>-1, 'help'=>'ToUseAGenericEmail'), + 'email_recruiter' => array('type'=>'varchar(255)', 'label'=>'EmailRecruiter', 'enabled'=>'1', 'position'=>54, 'notnull'=>0, 'visible'=>-1, 'help'=>'ToUseAGenericEmail', 'picto'=>'email'), 'fk_user_supervisor' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'FutureManager', 'enabled'=>'1', 'position'=>55, 'notnull'=>0, 'visible'=>-1, 'foreignkey'=>'user.rowid',), 'fk_establishment' => array('type'=>'integer:Establishment:hrm/class/establishment.class.php', 'label'=>'Establishment', 'enabled'=>'$conf->hrm->enabled', 'position'=>56, 'notnull'=>0, 'visible'=>-1, 'foreignkey'=>'establishment.rowid',), - 'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:status=1 AND entity IN (__SHARED_ENTITIES__)', 'label'=>'WorkPlace', 'enabled'=>'1', 'position'=>57, 'notnull'=>-1, 'visible'=>-1, 'index'=>1, 'help'=>"IfJobIsLocatedAtAPartner",), + 'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:status=1 AND entity IN (__SHARED_ENTITIES__)', 'label'=>'WorkPlace', 'enabled'=>'1', 'position'=>57, 'notnull'=>-1, 'visible'=>-1, 'css'=>'maxwidth500', 'index'=>1, 'help'=>"IfJobIsLocatedAtAPartner", 'picto'=>'company'), 'date_planned' => array('type'=>'date', 'label'=>'DateExpected', 'enabled'=>'1', 'position'=>60, 'notnull'=>0, 'visible'=>1,), 'remuneration_suggested' => array('type'=>'varchar(255)', 'label'=>'Remuneration', 'enabled'=>'1', 'position'=>62, 'notnull'=>0, 'visible'=>1,), 'description' => array('type'=>'html', 'label'=>'Description', 'enabled'=>'1', 'position'=>65, 'notnull'=>0, 'visible'=>3,), diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 1f6114d114e..eaa1bf8c2e2 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1313,11 +1313,11 @@ table[summary="list_of_modules"] .fa-cog { .minwidth500imp { min-width: 250px !important; } } -select.widthcentpercentminusx, span.widthcentpercentminusx, input.widthcentpercentminusx { +select.widthcentpercentminusx, span.widthcentpercentminusx:not(.select2-selection), input.widthcentpercentminusx { width: calc(100% - 52px) !important; display: inline-block; } -select.widthcentpercentminusxx, span.widthcentpercentminusxx, input.widthcentpercentminusxx { +select.widthcentpercentminusxx, span.widthcentpercentminusxx:not(.select2-selection), input.widthcentpercentminusxx { width: calc(100% - 70px) !important; display: inline-block; } diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index d4185e7dbc6..6abb2464394 100644 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -637,6 +637,7 @@ if (empty($reshook)) { if (GETPOSTISSET('actionbis') && $action == 'presend') $action = 'presend_addmessage'; } + /* * View */ diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php index b058bae9743..68238b63c29 100644 --- a/htdocs/user/perms.php +++ b/htdocs/user/perms.php @@ -325,8 +325,8 @@ if ($result) // TODO Define familyposition $family = $modules[$obj->module]->family_position; $familyposition = 0; - $sqlupdate = 'UPDATE '.MAIN_DB_PREFIX."rights_def SET module_position = ".$modules[$obj->module]->module_position.","; - $sqlupdate .= " family_position = ".$familyposition; + $sqlupdate = 'UPDATE '.MAIN_DB_PREFIX."rights_def SET module_position = ".((int) $modules[$obj->module]->module_position).","; + $sqlupdate .= " family_position = ".((int) $familyposition); $sqlupdate .= " WHERE module_position = 0 AND module = '".$db->escape($obj->module)."'"; $db->query($sqlupdate); } @@ -438,9 +438,16 @@ if ($result) print ' '; } - // Label - $permlabel = ($conf->global->MAIN_USE_ADVANCED_PERMS && ($langs->trans("PermissionAdvanced".$obj->id) != ("PermissionAdvanced".$obj->id)) ? $langs->trans("PermissionAdvanced".$obj->id) : (($langs->trans("Permission".$obj->id) != ("Permission".$obj->id)) ? $langs->trans("Permission".$obj->id) : $langs->trans($obj->label))); - print ''.$permlabel.''; + // Label of permission + $permlabel = (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ($langs->trans("PermissionAdvanced".$obj->id) != ("PermissionAdvanced".$obj->id)) ? $langs->trans("PermissionAdvanced".$obj->id) : (($langs->trans("Permission".$obj->id) != ("Permission".$obj->id)) ? $langs->trans("Permission".$obj->id) : $langs->trans($obj->label))); + print ''; + print $permlabel; + if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { + if (preg_match('/_advance$/', $obj->perms)) { + print ' ('.$langs->trans("AdvancedModeOnly").')'; + } + } + print ''; // Permission id if ($user->admin) print ''.$obj->id.'';