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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
f56d60de
Commit
f56d60de
authored
Sep 12, 2010
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
task #10479 : Lors de MAJ d'Action: Unknown column 'BuXU4iBh3e6vA' in 'where clause'
parent
a1df1f53
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/comm/action/fiche.php
+20
-31
20 additions, 31 deletions
htdocs/comm/action/fiche.php
with
20 additions
and
31 deletions
htdocs/comm/action/fiche.php
+
20
−
31
View file @
f56d60de
...
@@ -182,10 +182,10 @@ if ($_POST["action"] == 'add_action')
...
@@ -182,10 +182,10 @@ if ($_POST["action"] == 'add_action')
$actioncomm
->
note
=
trim
(
$_POST
[
"note"
]);
$actioncomm
->
note
=
trim
(
$_POST
[
"note"
]);
if
(
isset
(
$_POST
[
"contactid"
]))
$actioncomm
->
contact
=
$contact
;
if
(
isset
(
$_POST
[
"contactid"
]))
$actioncomm
->
contact
=
$contact
;
if
(
isset
(
$_REQUE
ST
[
"socid"
])
&&
$_REQUEST
[
"socid"
]
>
0
)
if
(
GETPO
ST
(
"socid"
)
>
0
)
{
{
$societe
=
new
Societe
(
$db
);
$societe
=
new
Societe
(
$db
);
$societe
->
fetch
(
$_REQUE
ST
[
"socid"
]
);
$societe
->
fetch
(
GETPO
ST
(
"socid"
)
);
$actioncomm
->
societe
=
$societe
;
$actioncomm
->
societe
=
$societe
;
}
}
...
@@ -245,7 +245,7 @@ if ($_POST["action"] == 'add_action')
...
@@ -245,7 +245,7 @@ if ($_POST["action"] == 'add_action')
{
{
// Si erreur
// Si erreur
$db
->
rollback
();
$db
->
rollback
();
$
_GET
[
"id"
]
=
$idaction
;
$
id
=
$idaction
;
$langs
->
load
(
"errors"
);
$langs
->
load
(
"errors"
);
$error
=
$langs
->
trans
(
$actioncomm
->
error
);
$error
=
$langs
->
trans
(
$actioncomm
->
error
);
}
}
...
@@ -253,22 +253,20 @@ if ($_POST["action"] == 'add_action')
...
@@ -253,22 +253,20 @@ if ($_POST["action"] == 'add_action')
else
else
{
{
$db
->
rollback
();
$db
->
rollback
();
$
_GET
[
"id"
]
=
$idaction
;
$
id
=
$idaction
;
$langs
->
load
(
"errors"
);
$langs
->
load
(
"errors"
);
$error
=
$langs
->
trans
(
$actioncomm
->
error
);
$error
=
$langs
->
trans
(
$actioncomm
->
error
);
}
}
}
}
// print $_REQUEST["from"]."rr";
}
}
/*
/*
* Action suppression de l'action
* Action suppression de l'action
*/
*/
if
(
$_REQUE
ST
[
"action"
]
==
'confirm_delete'
&&
$_REQUE
ST
[
"confirm"
]
==
'yes'
)
if
(
GETPO
ST
(
"action"
)
==
'confirm_delete'
&&
GETPO
ST
(
"confirm"
)
==
'yes'
)
{
{
$actioncomm
=
new
ActionComm
(
$db
);
$actioncomm
=
new
ActionComm
(
$db
);
$actioncomm
->
fetch
(
$
_GET
[
"id"
]
);
$actioncomm
->
fetch
(
$
id
);
if
(
$user
->
rights
->
agenda
->
myactions
->
delete
if
(
$user
->
rights
->
agenda
->
myactions
->
delete
||
$user
->
rights
->
agenda
->
allactions
->
delete
)
||
$user
->
rights
->
agenda
->
allactions
->
delete
)
...
@@ -290,7 +288,7 @@ if ($_REQUEST["action"] == 'confirm_delete' && $_REQUEST["confirm"] == 'yes')
...
@@ -290,7 +288,7 @@ if ($_REQUEST["action"] == 'confirm_delete' && $_REQUEST["confirm"] == 'yes')
/*
/*
* Action mise a jour de l'action
* Action mise a jour de l'action
*/
*/
if
(
$_
POST
[
"action"
]
==
'update'
)
if
(
GET
POST
(
"action"
)
==
'update'
)
{
{
if
(
!
$_POST
[
"cancel"
])
if
(
!
$_POST
[
"cancel"
])
{
{
...
@@ -352,7 +350,7 @@ if ($_POST["action"] == 'update')
...
@@ -352,7 +350,7 @@ if ($_POST["action"] == 'update')
if
(
!
$datep2
&&
$_POST
[
"percentage"
]
==
100
)
if
(
!
$datep2
&&
$_POST
[
"percentage"
]
==
100
)
{
{
$error
=
$langs
->
trans
(
"ErrorFieldRequired"
,
$langs
->
trans
(
"DateEnd"
));
$error
=
$langs
->
trans
(
"ErrorFieldRequired"
,
$langs
->
trans
(
"DateEnd"
));
$_
REQUES
T
[
"action"
]
=
'edit'
;
$_
GE
T
[
"action"
]
=
'edit'
;
}
}
// Users
// Users
...
@@ -390,7 +388,6 @@ if ($_POST["action"] == 'update')
...
@@ -390,7 +388,6 @@ if ($_POST["action"] == 'update')
{
{
$langs
->
load
(
"errors"
);
$langs
->
load
(
"errors"
);
$mesg
=
'<div class="error">'
.
$langs
->
trans
(
$actioncomm
->
error
)
.
'</div>'
;
$mesg
=
'<div class="error">'
.
$langs
->
trans
(
$actioncomm
->
error
)
.
'</div>'
;
$_GET
[
"id"
]
=
$_POST
[
"id"
];
}
}
else
else
{
{
...
@@ -399,10 +396,6 @@ if ($_POST["action"] == 'update')
...
@@ -399,10 +396,6 @@ if ($_POST["action"] == 'update')
header
(
"Location: "
.
$_POST
[
"from"
]);
header
(
"Location: "
.
$_POST
[
"from"
]);
exit
;
exit
;
}
}
else
{
$_GET
[
"id"
]
=
$_REQUEST
[
"id"
];
}
}
}
}
}
...
@@ -418,15 +411,12 @@ llxHeader('',$langs->trans("Agenda"),$help_url);
...
@@ -418,15 +411,12 @@ llxHeader('',$langs->trans("Agenda"),$help_url);
$html
=
new
Form
(
$db
);
$html
=
new
Form
(
$db
);
$htmlactions
=
new
FormActions
(
$db
);
$htmlactions
=
new
FormActions
(
$db
);
/*
* Affichage fiche en mode creation
*/
if
(
GETPOST
(
'action'
)
==
'create'
)
if
(
GETPOST
(
'action'
)
==
'create'
)
{
{
$contact
=
new
Contact
(
$db
);
$contact
=
new
Contact
(
$db
);
if
(
$_REQUE
ST
[
"contactid"
]
)
if
(
GETPO
ST
(
"contactid"
)
)
{
{
$result
=
$contact
->
fetch
(
GETPOST
(
"contactid"
));
$result
=
$contact
->
fetch
(
GETPOST
(
"contactid"
));
if
(
$result
<
0
)
dol_print_error
(
$db
,
$contact
->
error
);
if
(
$result
<
0
)
dol_print_error
(
$db
,
$contact
->
error
);
...
@@ -449,7 +439,7 @@ if (GETPOST('action') == 'create')
...
@@ -449,7 +439,7 @@ if (GETPOST('action') == 'create')
print
'<form name="formaction" action="fiche.php" method="POST">'
;
print
'<form name="formaction" action="fiche.php" method="POST">'
;
print
'<input type="hidden" name="token" value="'
.
$_SESSION
[
'newtoken'
]
.
'">'
;
print
'<input type="hidden" name="token" value="'
.
$_SESSION
[
'newtoken'
]
.
'">'
;
print
'<input type="hidden" name="action" value="add_action">'
;
print
'<input type="hidden" name="action" value="add_action">'
;
if
(
!
empty
(
$_REQUE
ST
[
"backtopage"
]
))
print
'<input type="hidden" name="backtopage" value="'
.
(
$_REQUE
ST
[
"backtopage"
]
!=
1
?
$_REQUE
ST
[
"backtopage"
]
:
$_SERVER
[
"HTTP_REFERER"
])
.
'">'
;
if
(
GETPO
ST
(
"backtopage"
))
print
'<input type="hidden" name="backtopage" value="'
.
(
GETPO
ST
(
"backtopage"
)
!=
1
?
GETPO
ST
(
"backtopage"
)
:
$_SERVER
[
"HTTP_REFERER"
])
.
'">'
;
if
(
$_GET
[
"actioncode"
]
==
'AC_RDV'
)
print_fiche_titre
(
$langs
->
trans
(
"AddActionRendezVous"
));
if
(
$_GET
[
"actioncode"
]
==
'AC_RDV'
)
print_fiche_titre
(
$langs
->
trans
(
"AddActionRendezVous"
));
else
print_fiche_titre
(
$langs
->
trans
(
"AddAnAction"
));
else
print_fiche_titre
(
$langs
->
trans
(
"AddAnAction"
));
...
@@ -523,7 +513,6 @@ if (GETPOST('action') == 'create')
...
@@ -523,7 +513,6 @@ if (GETPOST('action') == 'create')
// Affected by
// Affected by
print
'<tr><td width="30%" nowrap="nowrap">'
.
$langs
->
trans
(
"ActionAffectedTo"
)
.
'</td><td>'
;
print
'<tr><td width="30%" nowrap="nowrap">'
.
$langs
->
trans
(
"ActionAffectedTo"
)
.
'</td><td>'
;
// $html->select_users($_REQUEST["affectedto"]?$_REQUEST["affectedto"]:$actioncomm->usertodo,'affectedto',1);
$html
->
select_users
(
GETPOST
(
"affectedto"
)
?
GETPOST
(
"affectedto"
)
:
(
$actioncomm
->
usertodo
->
id
>
0
?
$actioncomm
->
usertodo
:
$user
),
'affectedto'
,
1
);
$html
->
select_users
(
GETPOST
(
"affectedto"
)
?
GETPOST
(
"affectedto"
)
:
(
$actioncomm
->
usertodo
->
id
>
0
?
$actioncomm
->
usertodo
:
$user
),
'affectedto'
,
1
);
print
'</td></tr>'
;
print
'</td></tr>'
;
...
@@ -598,7 +587,7 @@ if (GETPOST('action') == 'create')
...
@@ -598,7 +587,7 @@ if (GETPOST('action') == 'create')
/*
/*
* Affichage action en mode edition ou visu
* Affichage action en mode edition ou visu
*/
*/
if
(
$
_GET
[
"id"
]
)
if
(
$
id
)
{
{
if
(
$error
)
if
(
$error
)
{
{
...
@@ -610,7 +599,7 @@ if ($_GET["id"])
...
@@ -610,7 +599,7 @@ if ($_GET["id"])
}
}
$act
=
new
ActionComm
(
$db
);
$act
=
new
ActionComm
(
$db
);
$result
=
$act
->
fetch
(
$
_GET
[
"id"
]
);
$result
=
$act
->
fetch
(
$
id
);
if
(
$result
<
0
)
if
(
$result
<
0
)
{
{
dol_print_error
(
$db
,
$act
->
error
);
dol_print_error
(
$db
,
$act
->
error
);
...
@@ -649,7 +638,7 @@ if ($_GET["id"])
...
@@ -649,7 +638,7 @@ if ($_GET["id"])
// Confirmation suppression action
// Confirmation suppression action
if
(
GETPOST
(
"action"
)
==
'delete'
)
if
(
GETPOST
(
"action"
)
==
'delete'
)
{
{
$ret
=
$html
->
form_confirm
(
"fiche.php?id="
.
$
_GET
[
"id"
]
,
$langs
->
trans
(
"DeleteAction"
),
$langs
->
trans
(
"ConfirmDeleteAction"
),
"confirm_delete"
,
''
,
''
,
1
);
$ret
=
$html
->
form_confirm
(
"fiche.php?id="
.
$
id
,
$langs
->
trans
(
"DeleteAction"
),
$langs
->
trans
(
"ConfirmDeleteAction"
),
"confirm_delete"
,
''
,
''
,
1
);
if
(
$ret
==
'html'
)
print
'<br>'
;
if
(
$ret
==
'html'
)
print
'<br>'
;
}
}
...
@@ -659,8 +648,8 @@ if ($_GET["id"])
...
@@ -659,8 +648,8 @@ if ($_GET["id"])
print
'<form name="formaction" action="fiche.php" method="post">'
;
print
'<form name="formaction" action="fiche.php" method="post">'
;
print
'<input type="hidden" name="token" value="'
.
$_SESSION
[
'newtoken'
]
.
'">'
;
print
'<input type="hidden" name="token" value="'
.
$_SESSION
[
'newtoken'
]
.
'">'
;
print
'<input type="hidden" name="action" value="update">'
;
print
'<input type="hidden" name="action" value="update">'
;
print
'<input type="hidden" name="id" value="'
.
GETPOST
(
"id"
)
.
'">'
;
print
'<input type="hidden" name="id" value="'
.
$id
.
'">'
;
if
(
!
empty
(
$_REQUE
ST
[
"backtopage"
]
))
print
'<input type="hidden" name="from" value="'
.
(
$_REQUE
ST
[
"from"
]
?
$_REQUE
ST
[
"from"
]
:
$_SERVER
[
"HTTP_REFERER"
])
.
'">'
;
if
(
GETPO
ST
(
"backtopage"
))
print
'<input type="hidden" name="from" value="'
.
(
GETPO
ST
(
"from"
)
?
GETPO
ST
(
"from"
)
:
$_SERVER
[
"HTTP_REFERER"
])
.
'">'
;
print
'<table class="border" width="100%">'
;
print
'<table class="border" width="100%">'
;
...
@@ -723,20 +712,20 @@ if ($_GET["id"])
...
@@ -723,20 +712,20 @@ if ($_GET["id"])
// Date start
// Date start
print
'<tr><td width="30%" nowrap="nowrap" class="fieldrequired">'
.
$langs
->
trans
(
"DateActionStart"
)
.
'</td><td colspan="3">'
;
print
'<tr><td width="30%" nowrap="nowrap" class="fieldrequired">'
.
$langs
->
trans
(
"DateActionStart"
)
.
'</td><td colspan="3">'
;
if
(
$_REQUE
ST
[
"afaire"
]
==
1
)
$html
->
select_date
(
$act
->
datep
,
'ap'
,
1
,
1
,
0
,
"action"
,
1
,
1
);
if
(
GETPO
ST
(
"afaire"
)
==
1
)
$html
->
select_date
(
$act
->
datep
,
'ap'
,
1
,
1
,
0
,
"action"
,
1
,
1
);
else
if
(
$_REQUE
ST
[
"afaire"
]
==
2
)
$html
->
select_date
(
$act
->
datep
,
'ap'
,
1
,
1
,
1
,
"action"
,
1
,
1
);
else
if
(
GETPO
ST
(
"afaire"
)
==
2
)
$html
->
select_date
(
$act
->
datep
,
'ap'
,
1
,
1
,
1
,
"action"
,
1
,
1
);
else
$html
->
select_date
(
$act
->
datep
,
'ap'
,
1
,
1
,
1
,
"action"
,
1
,
1
);
else
$html
->
select_date
(
$act
->
datep
,
'ap'
,
1
,
1
,
1
,
"action"
,
1
,
1
);
print
'</td></tr>'
;
print
'</td></tr>'
;
// Date end
// Date end
print
'<tr><td>'
.
$langs
->
trans
(
"DateActionEnd"
)
.
'</td><td colspan="3">'
;
print
'<tr><td>'
.
$langs
->
trans
(
"DateActionEnd"
)
.
'</td><td colspan="3">'
;
if
(
$_REQUE
ST
[
"afaire"
]
==
1
)
$html
->
select_date
(
$act
->
datef
,
'p2'
,
1
,
1
,
1
,
"action"
,
1
,
1
);
if
(
GETPO
ST
(
"afaire"
)
==
1
)
$html
->
select_date
(
$act
->
datef
,
'p2'
,
1
,
1
,
1
,
"action"
,
1
,
1
);
else
if
(
$_REQUE
ST
[
"afaire"
]
==
2
)
$html
->
select_date
(
$act
->
datef
,
'p2'
,
1
,
1
,
1
,
"action"
,
1
,
1
);
else
if
(
GETPO
ST
(
"afaire"
)
==
2
)
$html
->
select_date
(
$act
->
datef
,
'p2'
,
1
,
1
,
1
,
"action"
,
1
,
1
);
else
$html
->
select_date
(
$act
->
datef
,
'p2'
,
1
,
1
,
1
,
"action"
,
1
,
1
);
else
$html
->
select_date
(
$act
->
datef
,
'p2'
,
1
,
1
,
1
,
"action"
,
1
,
1
);
print
'</td></tr>'
;
print
'</td></tr>'
;
// Status
// Status
print
'<tr><td nowrap>'
.
$langs
->
trans
(
"Status"
)
.
' / '
.
$langs
->
trans
(
"Percentage"
)
.
'</td><td colspan="3">'
;
print
'<tr><td nowrap>'
.
$langs
->
trans
(
"Status"
)
.
' / '
.
$langs
->
trans
(
"Percentage"
)
.
'</td><td colspan="3">'
;
$percent
=
isset
(
$_REQUE
ST
[
"percentage"
]
)
?
$_REQUE
ST
[
"percentage"
]
:
$act
->
percentage
;
$percent
=
GETPO
ST
(
"percentage"
)
?
GETPO
ST
(
"percentage"
)
:
$act
->
percentage
;
print
$htmlactions
->
form_select_status_action
(
'formaction'
,
$percent
,
1
);
print
$htmlactions
->
form_select_status_action
(
'formaction'
,
$percent
,
1
);
print
'</td></tr>'
;
print
'</td></tr>'
;
...
...
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