Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2012-10-03 17:48:09 +02:00
commit fa016baa7e

View File

@ -4,6 +4,7 @@
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 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
@ -74,7 +75,7 @@ if (! empty($canvas))
{ {
require_once DOL_DOCUMENT_ROOT.'/core/class/canvas.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/canvas.class.php';
$objcanvas = new Canvas($db, $action); $objcanvas = new Canvas($db, $action);
$objcanvas->getCanvas('adherent', 'card', $canvas); $objcanvas->getCanvas('adherent', 'membercard', $canvas);
} }
$errmsg=''; $errmsgs=array(); $errmsg=''; $errmsgs=array();
@ -140,7 +141,6 @@ if ($action == 'setuserid' && ($user->rights->user->self->creer || $user->rights
} }
} }
} }
else $object->canvas=$canvas;
if ($action == 'setsocid') if ($action == 'setsocid')
{ {
@ -197,7 +197,6 @@ if ($action == 'confirm_create_user' && $confirm == 'yes' && $user->rights->user
$errmsg=$object->error; $errmsg=$object->error;
} }
} }
else $object->canvas=$canvas;
// Create third party from a member // Create third party from a member
if ($action == 'confirm_create_thirdparty' && $confirm == 'yes' && $user->rights->societe->creer) if ($action == 'confirm_create_thirdparty' && $confirm == 'yes' && $user->rights->societe->creer)
@ -220,7 +219,6 @@ if ($action == 'confirm_create_thirdparty' && $confirm == 'yes' && $user->rights
$errmsg=$object->error; $errmsg=$object->error;
} }
} }
else $object->canvas=$canvas;
if ($action == 'confirm_sendinfo' && $confirm == 'yes') if ($action == 'confirm_sendinfo' && $confirm == 'yes')
{ {
@ -398,6 +396,7 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer)
if ($action == 'add' && $user->rights->adherent->creer) if ($action == 'add' && $user->rights->adherent->creer)
{ {
if ($canvas) $object->canvas=$canvas;
$datenaiss=''; $datenaiss='';
if (isset($_POST["naissday"]) && $_POST["naissday"] if (isset($_POST["naissday"]) && $_POST["naissday"]
&& isset($_POST["naissmonth"]) && $_POST["naissmonth"] && isset($_POST["naissmonth"]) && $_POST["naissmonth"]
@ -718,6 +717,7 @@ else
/* Fiche creation */ /* Fiche creation */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
$object->canvas=$canvas;
$object->fk_departement = $_POST["departement_id"]; $object->fk_departement = $_POST["departement_id"];
// We set country_id, country_code and country for the selected country // We set country_id, country_code and country for the selected country