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
c2642acd
Commit
c2642acd
authored
9 years ago
by
Raphaël Doursenaud
Browse files
Options
Downloads
Patches
Plain Diff
Fix CI build 578 (Syntax error)
empty() only supports variables in PHP < 5.5
parent
34f4e913
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/product/card.php
+8
-6
8 additions, 6 deletions
htdocs/product/card.php
with
8 additions
and
6 deletions
htdocs/product/card.php
+
8
−
6
View file @
c2642acd
...
...
@@ -64,6 +64,8 @@ $action=(GETPOST('action','alpha') ? GETPOST('action','alpha') : 'view');
$cancel
=
GETPOST
(
'cancel'
);
$confirm
=
GETPOST
(
'confirm'
,
'alpha'
);
$socid
=
GETPOST
(
'socid'
,
'int'
);
$duration_value
=
GETPOST
(
'duration_value'
);
$duration_unit
=
GETPOST
(
'duration_unit'
);
if
(
!
empty
(
$user
->
societe_id
))
$socid
=
$user
->
societe_id
;
$object
=
new
Product
(
$db
);
...
...
@@ -184,7 +186,7 @@ if (empty($reshook))
$action
=
"create"
;
$error
++
;
}
if
(
!
empty
(
GETPOST
(
'
duration_value
'
)
)
&&
empty
(
GETPOST
(
'
duration_unit
'
)
))
if
(
!
empty
(
$
duration_value
)
&&
empty
(
$
duration_unit
))
{
setEventMessage
(
$langs
->
trans
(
'ErrorFieldRequired'
,
$langs
->
transnoentities
(
'Unit'
)),
'errors'
);
$action
=
"create"
;
...
...
@@ -242,8 +244,8 @@ if (empty($reshook))
$object
->
note
=
dol_htmlcleanlastbr
(
GETPOST
(
'note'
));
$object
->
customcode
=
GETPOST
(
'customcode'
);
$object
->
country_id
=
GETPOST
(
'country_id'
);
$object
->
duration_value
=
GETPOST
(
'
duration_value
'
)
;
$object
->
duration_unit
=
GETPOST
(
'
duration_unit
'
)
;
$object
->
duration_value
=
$
duration_value
;
$object
->
duration_unit
=
$
duration_unit
;
$object
->
seuil_stock_alerte
=
GETPOST
(
'seuil_stock_alerte'
)
?
GETPOST
(
'seuil_stock_alerte'
)
:
0
;
$object
->
desiredstock
=
GETPOST
(
'desiredstock'
)
?
GETPOST
(
'desiredstock'
)
:
0
;
$object
->
canvas
=
GETPOST
(
'canvas'
);
...
...
@@ -329,8 +331,8 @@ if (empty($reshook))
$object
->
status_batch
=
GETPOST
(
'status_batch'
);
$object
->
seuil_stock_alerte
=
GETPOST
(
'seuil_stock_alerte'
);
$object
->
desiredstock
=
GETPOST
(
'desiredstock'
);
$object
->
duration_value
=
GETPOST
(
'
duration_value
'
)
;
$object
->
duration_unit
=
GETPOST
(
'
duration_unit
'
)
;
$object
->
duration_value
=
$
duration_value
;
$object
->
duration_unit
=
$
duration_unit
;
$object
->
canvas
=
GETPOST
(
'canvas'
);
$object
->
weight
=
GETPOST
(
'weight'
);
$object
->
weight_units
=
GETPOST
(
'weight_units'
);
...
...
@@ -898,7 +900,7 @@ else
// Duration
if
(
$type
==
1
)
{
print
'<tr><td>'
.
$langs
->
trans
(
"Duration"
)
.
'</td><td colspan="3"><input name="duration_value" size="6" maxlength="5" value="'
.
GETPOST
(
'
duration_value
'
)
.
'"> '
;
print
'<tr><td>'
.
$langs
->
trans
(
"Duration"
)
.
'</td><td colspan="3"><input name="duration_value" size="6" maxlength="5" value="'
.
$
duration_value
.
'"> '
;
print
'<input name="duration_unit" type="radio" value="h">'
.
$langs
->
trans
(
"Hour"
)
.
' '
;
print
'<input name="duration_unit" type="radio" value="d">'
.
$langs
->
trans
(
"Day"
)
.
' '
;
print
'<input name="duration_unit" type="radio" value="w">'
.
$langs
->
trans
(
"Week"
)
.
' '
;
...
...
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