diff --git a/htdocs/contact/document.php b/htdocs/contact/document.php index da8ef616a4f..eb66ae21a4f 100644 --- a/htdocs/contact/document.php +++ b/htdocs/contact/document.php @@ -58,9 +58,7 @@ $result = restrictedArea($user, 'contact', $id, 'socpeople&societe', '', '', 'ro $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); $page = GETPOST("page",'int'); -if ($page == -1) { - $page = 0; -} +if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 $offset = $conf->liste_limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; @@ -108,7 +106,7 @@ if ($object->id) } $linkback = ''.$langs->trans("BackToList").''; - + $morehtmlref='
| '.$langs->trans("UserTitle").' | '; print $object->getCivilityLabel(); @@ -160,7 +158,7 @@ if ($object->id) print ''; dol_fiche_end(); - + $modulepart = 'contact'; $permission = $user->rights->societe->contact->creer; $permtoedit = $user->rights->societe->contact->creer; | ||