diff --git a/htdocs/admin/perms.php b/htdocs/admin/perms.php
index 527c7bfe113..dbfe1d57784 100644
--- a/htdocs/admin/perms.php
+++ b/htdocs/admin/perms.php
@@ -35,12 +35,12 @@ $langs->loadLangs(array('admin', 'users', 'other'));
$action = GETPOST('action', 'aZ09');
+$entity = $conf->entity;
+
if (!$user->admin) {
accessforbidden();
}
-$entity = $conf->entity;
-
/*
* Actions
@@ -65,6 +65,8 @@ if ($action == 'remove') {
* View
*/
+$form = new Form($db);
+
$wikihelp = 'EN:Setup_Security|FR:Paramétrage_Sécurité|ES:Configuración_Seguridad';
llxHeader('', $langs->trans("DefaultRights"), $wikihelp);
diff --git a/htdocs/admin/security.php b/htdocs/admin/security.php
index e9bf40231d8..de1ef515b1d 100644
--- a/htdocs/admin/security.php
+++ b/htdocs/admin/security.php
@@ -289,31 +289,31 @@ if (getDolGlobalString('USER_PASSWORD_GENERATED') == "Perso") {
print '
';
print '| '.$langs->trans("MinLength")." | ";
- print ' | ';
+ print ' | ';
print '
';
print '';
print '| '.$langs->trans("NbMajMin")." | ";
- print ' | ';
+ print ' | ';
print '
';
print '';
print '| '.$langs->trans("NbNumMin")." | ";
- print ' | ';
+ print ' | ';
print '
';
print '';
print '| '.$langs->trans("NbSpeMin")." | ";
- print ' | ';
+ print ' | ';
print '
';
print '';
print '| '.$langs->trans("NbIteConsecutive")." | ";
- print ' | ';
+ print ' | ';
print '
';
diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php
index e33b672a27f..d0034b2de59 100644
--- a/htdocs/core/lib/admin.lib.php
+++ b/htdocs/core/lib/admin.lib.php
@@ -873,13 +873,15 @@ function security_prepare_head()
dol_print_error($db);
}
- $head[$h][0] = DOL_URL_ROOT."/admin/perms.php";
- $head[$h][1] = $langs->trans("DefaultRights");
- if ($nbPerms > 0) {
- $head[$h][1] .= (!getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER') ? ''.$nbPerms.'' : '');
+ if (getDolGlobalString('MAIN_SECURITY_USE_DEFAULT_PERMISSIONS')) {
+ $head[$h][0] = DOL_URL_ROOT."/admin/perms.php";
+ $head[$h][1] = $langs->trans("DefaultRights");
+ if ($nbPerms > 0) {
+ $head[$h][1] .= (!getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER') ? ''.$nbPerms.'' : '');
+ }
+ $head[$h][2] = 'default';
+ $h++;
}
- $head[$h][2] = 'default';
- $h++;
return $head;
}
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index d6d7f4016a2..7bb6759f3ce 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -5999,8 +5999,6 @@ function print_fiche_titre($title, $mesg = '', $picto = 'generic', $pictoisfullp
*/
function load_fiche_titre($titre, $morehtmlright = '', $picto = 'generic', $pictoisfullpath = 0, $id = '', $morecssontable = '', $morehtmlcenter = '')
{
- global $conf;
-
$return = '';
if ($picto == 'setup') {
diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php
index 0217a82d7f2..3d17bd790f8 100644
--- a/htdocs/core/modules/DolibarrModules.class.php
+++ b/htdocs/core/modules/DolibarrModules.class.php
@@ -181,18 +181,6 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
*/
public $module_parts = array();
- /**
- * @var string Module documents ?
- * @deprecated Seems unused anywhere
- */
- public $docs;
-
- /**
- * @var string ?
- * @deprecated Seems unused anywhere
- */
- public $dbversion = "-";
-
/**
* @var string Error message
*/
@@ -1958,7 +1946,6 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
$objcount = $this->db->fetch_object($resqlselect);
if ($objcount && $objcount->nb == 0) {
$sql = "INSERT INTO ".MAIN_DB_PREFIX."rights_def (";
-
$sql .= "id";
$sql .= ", entity";
$sql .= ", libelle";
@@ -1969,9 +1956,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
$sql .= ", perms";
$sql .= ", subperms";
$sql .= ", enabled";
-
$sql .= ") VALUES (";
-
$sql .= ((int) $r_id);
$sql .= ", ".((int) $entity);
$sql .= ", '".$this->db->escape($r_label)."'";
@@ -1982,7 +1967,6 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
$sql .= ", '".$this->db->escape($r_perms)."'";
$sql .= ", '".$this->db->escape($r_subperms)."'";
$sql .= ", '".$this->db->escape($r_enabled)."'";
-
$sql.= ")";
$resqlinsert = $this->db->query($sql, 1);