diff --git a/htdocs/user/clicktodial.php b/htdocs/user/clicktodial.php index c94ca7711cb..87d7232de2d 100644 --- a/htdocs/user/clicktodial.php +++ b/htdocs/user/clicktodial.php @@ -76,12 +76,9 @@ if ($_GET["id"]) if ($_GET["action"] != 'perms') { $hselected=$h; } $h++; - if ($user->admin) - { - $head[$h][0] = DOL_URL_ROOT.'/user/fiche.php?action=perms&id='.$fuser->id; - $head[$h][1] = $langs->trans("UserRights"); - $h++; - } + $head[$h][0] = DOL_URL_ROOT.'/user/perms.php?id='.$fuser->id; + $head[$h][1] = $langs->trans("UserRights"); + $h++; if ($conf->bookmark4u->enabled) { @@ -98,7 +95,7 @@ if ($_GET["id"]) $h++; } - dolibarr_fiche_head($head, $hselected, $langs->trans("User")." : ".$fuser->fullname); + dolibarr_fiche_head($head, $hselected, $langs->trans("User").": ".$fuser->fullname); /* * Fiche en mode visu diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php index 9469fab8c1b..c5b6208e8f9 100644 --- a/htdocs/user/fiche.php +++ b/htdocs/user/fiche.php @@ -307,6 +307,13 @@ else $h++; } + if ($conf->clicktodial->enabled) + { + $head[$h][0] = DOL_URL_ROOT.'/user/clicktodial.php?id='.$fuser->id; + $head[$h][1] = $langs->trans("ClickToDial"); + $h++; + } + dolibarr_fiche_head($head, $hselected, $langs->trans("User").": ".$fuser->fullname); diff --git a/htdocs/user/index.php b/htdocs/user/index.php index a0cdc37c6c9..8a209b04982 100644 --- a/htdocs/user/index.php +++ b/htdocs/user/index.php @@ -59,7 +59,7 @@ if ($sortfield) { $sql.=" ORDER BY $sortfield $sortorder"; } $result = $db->query($sql); if ($result) { - $num = $db->num_rows(); + $num = $db->num_rows($result); $i = 0; print "
"; @@ -75,7 +75,7 @@ if ($result) $var=True; while ($i < $num) { - $obj = $db->fetch_object( $i); + $obj = $db->fetch_object($result); $var=!$var; print ""; @@ -95,7 +95,7 @@ if ($result) $i++; } print ""; - $db->free(); + $db->free($result); } else { diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php index b1a164853e6..b81f515f842 100644 --- a/htdocs/user/perms.php +++ b/htdocs/user/perms.php @@ -93,6 +93,13 @@ if ($_GET["id"]) $h++; } + if ($conf->clicktodial->enabled) + { + $head[$h][0] = DOL_URL_ROOT.'/user/clicktodial.php?id='.$fuser->id; + $head[$h][1] = $langs->trans("ClickToDial"); + $h++; + } + dolibarr_fiche_head($head, $hselected, $langs->trans("User").": ".$fuser->fullname); // Lecture des droits utilisateurs