mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 17:02:34 +01:00
Debug v23
This commit is contained in:
@@ -26,10 +26,6 @@
|
||||
|
||||
// Load Dolibarr environment
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
@@ -37,6 +33,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("users", "admin", "other"));
|
||||
@@ -48,7 +47,6 @@ if (!$user->admin) {
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
@@ -31,10 +31,6 @@
|
||||
|
||||
// Load Dolibarr environment
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
@@ -42,11 +38,15 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('admin', 'members', 'users'));
|
||||
|
||||
$extrafields = new ExtraFields($db);
|
||||
$extrafields = new ExtraFields($db); // may be used by some inc.php files
|
||||
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
@@ -199,8 +199,10 @@ print '</td></tr>';
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
|
||||
print '<br>';
|
||||
|
||||
|
||||
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
|
||||
|
||||
// Defini tableau def des modeles
|
||||
|
||||
@@ -6637,7 +6637,9 @@ function info_admin($text, $infoonimgalt = 0, $nodiv = 0, $admin = '1', $morecss
|
||||
if ($picto == 'warning') {
|
||||
$fa = 'exclamation-triangle';
|
||||
}
|
||||
$result = ($nodiv ? '' : '<div class="wordbreak ' . $class . ($morecss ? ' ' . $morecss : '') . ($textfordropdown ? ' hidden' : '') . '">') . '<span class="fa fa-' . $fa . '" title="' . dol_escape_htmltag((string) $admin ? $langs->trans('InfoAdmin') : $langs->trans('Note')) . '"></span> ';
|
||||
$result = ($nodiv ? '' : '<div class="wordbreak ' . $class . ($morecss ? ' ' . $morecss : '') . ($textfordropdown ? ' hidden' : '') . '">');
|
||||
$result .= img_picto((string) $admin ? $langs->trans('InfoAdmin') : $langs->trans('Note'), $fa);
|
||||
$result .= ' ';
|
||||
$result .= dol_escape_htmltag($text, 1, 0, 'div,span,b,br,a');
|
||||
$result .= ($nodiv ? '' : '</div>');
|
||||
|
||||
|
||||
@@ -2748,3 +2748,5 @@ StatusOfModule=Status of module %s
|
||||
DisabledByOptionADD_UNSPLASH_LOGIN_BACKGROUND=Disabled by option ADD_UNSPLASH_LOGIN_BACKGROUND
|
||||
GlobalParameters=Global parameters
|
||||
SpecificParameters=Specific parameters
|
||||
YouAreUsingTheAdvancedPermissionsMode=You are using the advanced permission mode. Granularity of permissions is higher. Go to Home - Setup - Security to go back to the simple mode.
|
||||
YouAreUsingTheSimplePermissionsMode=You are using the simple permission mode. Go to Home - Setup - Security to switch to advanced mode if you need for granularity on permissions.
|
||||
|
||||
@@ -30,12 +30,6 @@
|
||||
|
||||
// Load Dolibarr environment
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/user/class/usergroup.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
@@ -44,6 +38,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT.'/user/class/usergroup.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
|
||||
// Define if user can read permissions
|
||||
$permissiontoadd = ($user->admin || $user->hasRight("user", "user", "write"));
|
||||
@@ -98,6 +97,7 @@ if (isModEnabled('multicompany') && $conf->entity > 1 && getDolGlobalString('MUL
|
||||
/**
|
||||
* Actions
|
||||
*/
|
||||
|
||||
$error = 0;
|
||||
$parameters = array('id' => $id, 'userid' => $userid, 'caneditperms' => $permissiontoedit);
|
||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
@@ -339,6 +339,7 @@ if ($action == 'create') {
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
print '<div class="fichehalfleft">';
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
print '<table class="border centpercent tableforfield">';
|
||||
|
||||
@@ -33,18 +33,19 @@ if (!defined('CSRFCHECK_WITH_TOKEN')) {
|
||||
|
||||
// Load Dolibarr environment
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/user/class/usergroup.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Societe $mysoc
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT.'/user/class/usergroup.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
|
||||
// Load translation files required by page
|
||||
$langs->loadLangs(array('users', 'admin'));
|
||||
@@ -143,6 +144,7 @@ if (empty($reshook)) {
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
$formother = new FormOther($db);
|
||||
|
||||
$title = $object->name." - ".$langs->trans('Permissions');
|
||||
$help_url = '';
|
||||
@@ -226,6 +228,7 @@ if ($object->id > 0) {
|
||||
dol_banner_tab($object, 'id', $linkback, $user->hasRight("user", "user", "read") || $user->admin);
|
||||
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
print '<div class="fichehalfleft">';
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
@@ -250,16 +253,23 @@ if ($object->id > 0) {
|
||||
}
|
||||
|
||||
unset($object->fields['nom']); // Name already displayed in banner
|
||||
unset($object->fields['color']);
|
||||
|
||||
// Common attributes
|
||||
$keyforbreak = '';
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php';
|
||||
|
||||
print '<tr><td>'.$langs->trans("ColorGroup").'</td>';
|
||||
print '<td>';
|
||||
print $formother->showColor($object->color, '');
|
||||
print '</td></tr>';
|
||||
|
||||
// Other attributes
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '</div>';
|
||||
print '</div>';
|
||||
|
||||
print '<div class="clearboth"></div>';
|
||||
@@ -268,7 +278,18 @@ if ($object->id > 0) {
|
||||
|
||||
|
||||
if ($user->admin) {
|
||||
print info_admin($langs->trans("WarningOnlyPermissionOfActivatedModules")." ".$langs->trans("YouCanEnableModulesFrom"));
|
||||
$s = $langs->trans("WarningOnlyPermissionOfActivatedModules")." ".$langs->trans("YouCanEnableModulesFrom");
|
||||
if (getDolGlobalString('MAIN_USE_ADVANCED_PERMS')) {
|
||||
$s .= '<br>';
|
||||
$s .= img_picto($langs->trans('InfoAdmin'), 'info-circle').' ';
|
||||
$s .= $langs->trans("YouAreUsingTheAdvancedPermissionsMode");
|
||||
} else {
|
||||
$s .= '<br>';
|
||||
$s .= img_picto($langs->trans('InfoAdmin'), 'info-circle').' ';
|
||||
$s .= $langs->trans("YouAreUsingTheSimplePermissionsMode");
|
||||
}
|
||||
print info_admin($s);
|
||||
|
||||
print '<br>';
|
||||
}
|
||||
|
||||
|
||||
@@ -34,10 +34,6 @@ if (!defined('CSRFCHECK_WITH_TOKEN')) {
|
||||
|
||||
// Load Dolibarr environment
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
@@ -45,6 +41,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
|
||||
// Load translation files required by page
|
||||
$langs->loadLangs(array('users', 'admin'));
|
||||
@@ -333,13 +332,24 @@ print '</span>';
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
|
||||
print '<br>';
|
||||
|
||||
|
||||
if ($user->admin) {
|
||||
print info_admin($langs->trans("WarningOnlyPermissionOfActivatedModules")." ".$langs->trans("YouCanEnableModulesFrom"));
|
||||
$s = $langs->trans("WarningOnlyPermissionOfActivatedModules")." ".$langs->trans("YouCanEnableModulesFrom");
|
||||
if (getDolGlobalString('MAIN_USE_ADVANCED_PERMS')) {
|
||||
$s .= '<br>';
|
||||
$s .= img_picto($langs->trans('InfoAdmin'), 'info-circle').' ';
|
||||
$s .= $langs->trans("YouAreUsingTheAdvancedPermissionsMode");
|
||||
} else {
|
||||
$s .= '<br>';
|
||||
$s .= img_picto($langs->trans('InfoAdmin'), 'info-circle').' ';
|
||||
$s .= $langs->trans("YouAreUsingTheSimplePermissionsMode");
|
||||
}
|
||||
print info_admin($s);
|
||||
}
|
||||
// If edited user is an extern user, we show warning for external users
|
||||
if (!empty($object->socid)) {
|
||||
|
||||
Reference in New Issue
Block a user