Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
b7e9ae5a
Commit
b7e9ae5a
authored
16 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Fix: Support of option mysql strict
parent
f0923d85
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
htdocs/don.class.php
+336
-345
336 additions, 345 deletions
htdocs/don.class.php
mysql/migration/2.4.0-2.5.0.sql
+3
-0
3 additions, 0 deletions
mysql/migration/2.4.0-2.5.0.sql
mysql/tables/llx_don.sql
+2
-2
2 additions, 2 deletions
mysql/tables/llx_don.sql
with
341 additions
and
347 deletions
htdocs/don.class.php
+
336
−
345
View file @
b7e9ae5a
<?php
/* Copyright (C) 2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-200
6
Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-200
8
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
)
{
...
...
This diff is collapsed.
Click to expand it.
mysql/migration/2.4.0-2.5.0.sql
+
3
−
0
View file @
b7e9ae5a
...
...
@@ -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
;
This diff is collapsed.
Click to expand it.
mysql/tables/llx_don.sql
+
2
−
2
View file @
b7e9ae5a
...
...
@@ -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
;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment