Skip to content
Snippets Groups Projects
Commit b7e9ae5a authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: Support of option mysql strict

parent f0923d85
No related branches found
No related tags found
No related merge requests found
<?php
/* Copyright (C) 2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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
......@@ -15,24 +15,20 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
* $Source$
*/
/**
\file htdocs/don.class.php
\ingroup don
\brief Fichier de la classe des dons
\version $Revision$
* \file htdocs/don.class.php
* \ingroup don
* \brief Fichier de la classe des dons
* \version $Id$
*/
/**
\class Don
\brief Classe permettant la gestion des dons
* \class Don
* \brief Classe permettant la gestion des dons
*/
class Don
{
var $db;
......@@ -290,18 +286,13 @@ class Don
$this->date = $this->db->idate($this->date);
$sql = "INSERT INTO ".MAIN_DB_PREFIX."don (datec, amount, fk_paiement,prenom, nom, societe,adresse, cp, ville, pays, public,";
if ($this->projetid)
{
$sql .= " fk_don_projet,";
}
$sql .= " note, fk_user_author, datedon, email)";
$sql .= " note, fk_user_author, fk_user_valid, datedon, email)";
$sql .= " VALUES (".$this->db->idate(mktime()).",".price2num($this->amount).", $this->modepaiementid,'$this->prenom','$this->nom','$this->societe','$this->adresse', '$this->cp','$this->ville','$this->pays',$this->public, ";
if ($this->projetid)
{
$sql .= " $this->projetid,";
}
$sql .= " '$this->note', ".$user->id.", '$this->date','$this->email')";
$sql .= " ".($this->projetid > 0?$this->projetid:"null").",";
$sql .= " '".addslashes($this->note)."', ".$user->id.", null, '$this->date','$this->email')";
dolibarr_syslog("Don::create sql=".$sql, LOG_DEBUG);
$result = $this->db->query($sql);
if ($result)
{
......
......@@ -67,3 +67,6 @@ update llx_expedition_methode set code='ENL', libelle='Enlevement' where code='e
update llx_expedition_methode set code='TRANS', libelle='Transporteur' where code='transporteur';
alter table llx_fichinterdet modify date datetime;
alter table llx_don modify fk_don_projet integer NULL;
alter table llx_don modify fk_user_valid integer NULL;
......@@ -37,8 +37,8 @@ create table llx_don
pays varchar(50),
email varchar(255),
public smallint DEFAULT 1 NOT NULL, -- le don est-il public (0,1)
fk_don_projet integer NOT NULL, -- projet auquel est fait le don
fk_don_projet integer NULL, -- projet auquel est fait le don
fk_user_author integer NOT NULL,
fk_user_valid integer NOT NULL,
fk_user_valid integer NULL,
note text
)type=innodb;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment