Skip to content
Snippets Groups Projects
Commit 79529f3e authored by Regis Houssin's avatar Regis Houssin
Browse files

Fix: missing contactid and socid

Fix: missing contact in event if no company
parent d3d15e20
No related branches found
No related tags found
No related merge requests found
<?php <?php
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com> * Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
...@@ -59,7 +59,6 @@ $actioncomm = new ActionComm($db); ...@@ -59,7 +59,6 @@ $actioncomm = new ActionComm($db);
$contact = new Contact($db); $contact = new Contact($db);
/* /*
* Action creation de l'action * Action creation de l'action
*/ */
...@@ -410,8 +409,6 @@ if (GETPOST("action") == 'update') ...@@ -410,8 +409,6 @@ if (GETPOST("action") == 'update')
} }
} }
/* /*
* View * View
*/ */
...@@ -583,7 +580,7 @@ if (GETPOST('action') == 'create') ...@@ -583,7 +580,7 @@ if (GETPOST('action') == 'create')
print '</td></tr>'; print '</td></tr>';
// If company is forced, we propose contacts (may be contact is also forced) // If company is forced, we propose contacts (may be contact is also forced)
if (GETPOST("socid") > 0) if (GETPOST("contactid") > 0 || GETPOST("socid") > 0)
{ {
print '<tr><td nowrap>'.$langs->trans("ActionOnContact").'</td><td>'; print '<tr><td nowrap>'.$langs->trans("ActionOnContact").'</td><td>';
$html->select_contacts(GETPOST("socid"),GETPOST('contactid'),'contactid',1,1); $html->select_contacts(GETPOST("socid"),GETPOST('contactid'),'contactid',1,1);
......
<?php <?php
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2003 Eric Seigne <erics@rycks.com> * Copyright (C) 2003 Eric Seigne <erics@rycks.com>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
* *
* 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
...@@ -346,8 +346,7 @@ if ($result) ...@@ -346,8 +346,7 @@ if ($result)
// Links Add action and Export vcard // Links Add action and Export vcard
print '<td align="right">'; print '<td align="right">';
$link='<a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&amp;backtopage=1&amp;contactid='.$cid.'&amp;socid='.$socid.'">'.img_object($langs->trans("AddAction"),"calendar").'</a>'; print '<a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&amp;backtopage=1&amp;contactid='.$obj->cidp.'&amp;socid='.$obj->socid.'">'.img_object($langs->trans("AddAction"),"calendar").'</a>';
print $link;
print ' &nbsp; '; print ' &nbsp; ';
print '<a href="'.DOL_URL_ROOT.'/contact/vcard.php?id='.$obj->cidp.'">'; print '<a href="'.DOL_URL_ROOT.'/contact/vcard.php?id='.$obj->cidp.'">';
print img_picto($langs->trans("VCard"),'vcard.png').' '; print img_picto($langs->trans("VCard"),'vcard.png').' ';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment