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

@ -1,29 +1,30 @@
<?php <?php
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org> * Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
* 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 *
* it under the terms of the GNU General Public License as published by * This program is free software; you can redistribute it and/or modify
* the Free Software Foundation; either version 2 of the License, or * it under the terms of the GNU General Public License as published by
* (at your option) any later version. * the Free Software Foundation; either version 2 of the License, or
* * (at your option) any later version.
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * This program is distributed in the hope that it will be useful,
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * but WITHOUT ANY WARRANTY; without even the implied warranty of
* GNU General Public License for more details. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* * GNU General Public License for more details.
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. * You should have received a copy of the GNU General Public License
*/ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/** /**
* \file htdocs/adherents/fiche.php * \file htdocs/adherents/fiche.php
* \ingroup member * \ingroup member
* \brief Page of member * \brief Page of member
*/ */
require '../main.inc.php'; require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
@ -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