diff --git a/htdocs/user/group/fiche.php b/htdocs/user/group/fiche.php index 97704a3cf404e62107311aad2157b112bc7b8dfd..c98c25f0e0866027938160dbd0fc709d3719b9aa 100644 --- a/htdocs/user/group/fiche.php +++ b/htdocs/user/group/fiche.php @@ -219,8 +219,6 @@ else */ $head = group_prepare_head($group); $title = $langs->trans("Group"); - if (! $group->entity) $title = $langs->trans("GlobalGroup"); - dol_fiche_head($head, 'group', $title); @@ -296,24 +294,24 @@ else // On salectionne les users qui ne sont pas deja dans le groupe $userlistid = array(); $uss = array(); - + $sql = "SELECT ug.fk_user"; $sql.= " FROM ".MAIN_DB_PREFIX."usergroup_user as ug"; $sql.= ", ".MAIN_DB_PREFIX."user as u"; $sql.= " WHERE ug.fk_usergroup = ".$group->id; $sql.= " AND ug.fk_user = u.rowid"; $sql.= " AND u.entity IN (0,".$conf->entity.")"; - + $result = $db->query($sql); if ($result) { $num = $db->num_rows($result); $i = 0; - + while ($i < $num) { $obj = $db->fetch_object($result); - + $userlistid[]=$obj->fk_user; $i++; } @@ -321,9 +319,9 @@ else else { dol_print_error($db); } - + $idList = implode(",",$userlistid); - + if (!empty($idList)) { $sql = "SELECT u.rowid, u.login, u.name, u.firstname, u.admin"; @@ -331,7 +329,7 @@ else $sql.= " WHERE u.entity IN (0,".$conf->entity.")"; $sql.= " AND u.rowid NOT IN (".$idList.")"; $sql.= " ORDER BY u.name"; - + $result = $db->query($sql); if ($result) { @@ -357,7 +355,7 @@ else $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; $sql.= " WHERE u.entity IN (0,".$conf->entity.")"; $sql.= " ORDER BY u.name"; - + $result = $db->query($sql); if ($result) { diff --git a/htdocs/user/group/perms.php b/htdocs/user/group/perms.php index 4b46958c9a457ff689a8bd3d53f74830eb0eb837..3133a48209f1af2f7d14d15e692a63ce44cf17af 100644 --- a/htdocs/user/group/perms.php +++ b/htdocs/user/group/perms.php @@ -74,8 +74,6 @@ if ($_GET["id"]) */ $head = group_prepare_head($fgroup); $title = $langs->trans("Group"); - if (!$fgroup->entity) $title = $langs->trans("GlobalGroup"); - dol_fiche_head($head, 'rights', $title); diff --git a/htdocs/user/info.php b/htdocs/user/info.php index 68d4f4b068c24126d2a33a3d26ee3d97184aed11..df838a214a2c03dd33bc62986a3491b21bff2e82 100644 --- a/htdocs/user/info.php +++ b/htdocs/user/info.php @@ -51,9 +51,7 @@ $fuser->info($_GET["id"]); $head = user_prepare_head($fuser); -$title = $fuser->admin ? $langs->trans("Administrator") : $langs->trans("User"); -$title = !$fuser->entity ? $langs->trans("SuperAdministrator") : $title; - +$title = $langs->trans("User"); dol_fiche_head($head, 'info', $title); diff --git a/htdocs/user/ldap.php b/htdocs/user/ldap.php index af2c24b01948f31ac92fda783c97ba0b8c9735c8..ae73cf993c8319dc2669650b6bbfb22e8f9b6b03 100644 --- a/htdocs/user/ldap.php +++ b/htdocs/user/ldap.php @@ -92,9 +92,7 @@ $form = new Form($db); */ $head = user_prepare_head($fuser); -$title = $fuser->admin ? $langs->trans("Administrator") : $langs->trans("User"); -$title = !$fuser->entity ? $langs->trans("SuperAdministrator") : $title; - +$title = $langs->trans("User"); dol_fiche_head($head, 'ldap', $title); diff --git a/htdocs/user/note.php b/htdocs/user/note.php index 76c6b632cfa11e1afce66bef9ac4c52d7d1c93c6..1ef059e8273ddc1bee24cc53a4a20281f0611c96 100644 --- a/htdocs/user/note.php +++ b/htdocs/user/note.php @@ -55,7 +55,7 @@ if (($fuser->id != $user->id) && (! $user->rights->user->user->lire)) if ($_POST["action"] == 'update' && $user->rights->user->user->creer && ! $_POST["cancel"]) { $db->begin(); - + $res=$fuser->update_note($_POST["note"],$user); if ($res < 0) { @@ -81,16 +81,14 @@ $html = new Form($db); if ($id) { $head = user_prepare_head($fuser); - - $title = $fuser->admin ? $langs->trans("Administrator") : $langs->trans("User"); - $title = !$fuser->entity ? $langs->trans("SuperAdministrator") : $title; + $title = $langs->trans("User"); dol_fiche_head($head, 'note', $title); if ($msg) print '<div class="error">'.$msg.'</div>'; print "<form method=\"post\" action=\"note.php\">"; - + print '<table class="border" width="100%">'; // Reference @@ -147,7 +145,7 @@ if ($id) print "</table>"; print "</form>\n"; - + /* * Actions */ diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php index 7148b50afb729eef06c461483c31760c02087c2c..c86d3e56678dc30582243a06ad6120f20c332e18 100644 --- a/htdocs/user/perms.php +++ b/htdocs/user/perms.php @@ -94,9 +94,7 @@ $fuser->getrights(); */ $head = user_prepare_head($fuser); -$title = $fuser->admin ? $langs->trans("Administrator") : $langs->trans("User"); -$title = !$fuser->entity ? $langs->trans("SuperAdministrator") : $title; - +$title = $langs->trans("User"); dol_fiche_head($head, 'rights', $title); @@ -109,22 +107,22 @@ $listdir=$conf->dol_document_root; foreach($listdir as $dirroot) { $dir=$dirroot."/includes/modules/"; - + $handle=opendir($dir); while (($file = readdir($handle))!==false) { if (is_readable($dir.$file) && substr($file, 0, 3) == 'mod' && substr($file, strlen($file) - 10) == '.class.php') { $modName = substr($file, 0, strlen($file) - 10); - + if ($modName) { include_once($dir.$file); $objMod = new $modName($db); if ($objMod->rights_class) { - + $ret=$objMod->insert_permissions(); - + $modules[$objMod->rights_class]=$objMod; //print "modules[".$objMod->rights_class."]=$objMod;"; } @@ -246,7 +244,7 @@ if ($result) $obj = $db->fetch_object($result); // Si la ligne correspond a un module qui n'existe plus (absent de includes/module), on l'ignore - if (! $modules[$obj->module]) + if (! $modules[$obj->module]) { $i++; continue; @@ -266,7 +264,7 @@ if ($result) // On affiche ligne pour modifier droits print '<tr '. $bc[$var].'>'; print '<td nowrap="nowrap">'.img_object('',$picto).' '.$objMod->getName(); - print '<a name="'.$objMod->getName().'"> </a></td>'; + print '<a name="'.$objMod->getName().'"> </a></td>'; print '<td align="center" nowrap>'; print '<a title='.$langs->trans("All").' alt='.$langs->trans("All").' href="perms.php?id='.$fuser->id.'&action=addrights&module='.$obj->module.'#'.$objMod->getName().'">'.$langs->trans("All")."</a>"; print '/'; @@ -280,7 +278,7 @@ if ($result) print '<tr '. $bc[$var].'>'; print '<td>'.img_object('',$picto).' '.$objMod->getName(); - print '</td>'; + print '</td>'; if ($fuser->admin && $objMod->rights_admin_allowed) { @@ -306,7 +304,7 @@ if ($result) } else if (in_array($obj->id, $permsgroup)) { // Permission own by group - if ($caneditperms) + if ($caneditperms) { print '<td align="center">'; print $form->textwithtooltip($langs->trans("Group"),$langs->trans("PermissionInheritedFromAGroup"));