Skip to content
Snippets Groups Projects
Commit a8d12a7c authored by Philippe Grand's avatar Philippe Grand
Browse files

to use personal contacts.tpl within personal theme

parent 834a6f9d
No related branches found
No related tags found
No related merge requests found
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
/* Copyright (C) 2005 Patrick Rouillon <patrick@rouillon.net> /* Copyright (C) 2005 Patrick Rouillon <patrick@rouillon.net>
* Copyright (C) 2005-2009 Destailleur Laurent <eldy@users.sourceforge.net> * Copyright (C) 2005-2009 Destailleur Laurent <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2011-2012 Philippe Grand <philippe.grand@atoo-net.com>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -57,7 +58,7 @@ if ($action == 'addcontact' && $user->rights->propale->creer) ...@@ -57,7 +58,7 @@ if ($action == 'addcontact' && $user->rights->propale->creer)
if ($result > 0 && $id > 0) if ($result > 0 && $id > 0)
{ {
$contactid = (GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid')); $contactid = (GETPOST('userid','int') ? GETPOST('userid','int') : GETPOST('contactid','int'));
$result = $object->add_contact($contactid, $_POST["type"], $_POST["source"]); $result = $object->add_contact($contactid, $_POST["type"], $_POST["source"]);
} }
...@@ -204,7 +205,14 @@ if ($id > 0 || ! empty($ref)) ...@@ -204,7 +205,14 @@ if ($id > 0 || ! empty($ref))
print '<br>'; print '<br>';
// Contacts lines // Contacts lines
if (file_exists(DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/tpl/contacts.tpl.php"))
{
include(DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/tpl/contacts.tpl.php");
}
else
{
include(DOL_DOCUMENT_ROOT.'/core/tpl/contacts.tpl.php'); include(DOL_DOCUMENT_ROOT.'/core/tpl/contacts.tpl.php');
}
} }
else else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment