|
@@ -49,12 +49,6 @@ if (!empty($canvas)) {
|
|
|
$objcanvas->getCanvas('contact', 'contactcard', $canvas);
|
|
|
}
|
|
|
|
|
|
-// Security check
|
|
|
-if ($user->socid) {
|
|
|
- $socid = $user->socid;
|
|
|
-}
|
|
|
-$result = restrictedArea($user, 'contact', $id, 'socpeople&societe', '', '', 'rowid', 0); // If we create a contact with no company (shared contacts), no check on write permission
|
|
|
-
|
|
|
// Get parameters
|
|
|
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
|
|
$sortfield = GETPOST("sortfield", 'alpha');
|
|
@@ -91,6 +85,15 @@ $modulepart = 'contact';
|
|
|
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
|
|
$hookmanager->initHooks(array('contactdocument'));
|
|
|
|
|
|
+// Security check
|
|
|
+if ($user->socid) {
|
|
|
+ $socid = $user->socid;
|
|
|
+}
|
|
|
+$result = restrictedArea($user, 'contact', $id, 'socpeople&societe', '', '', 'rowid', 0); // If we create a contact with no company (shared contacts), no check on write permission
|
|
|
+
|
|
|
+$permissiontoadd = $user->rights->societe->contact->creer; // Used by the include of actions_dellink.inc.php
|
|
|
+
|
|
|
+
|
|
|
/*
|
|
|
* Actions
|
|
|
*/
|