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
ffe4ae59
Commit
ffe4ae59
authored
8 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Fix php7 compatibility
parent
3882fa0c
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
htdocs/admin/dict.php
+4
-2
4 additions, 2 deletions
htdocs/admin/dict.php
htdocs/admin/websites.php
+6
-4
6 additions, 4 deletions
htdocs/admin/websites.php
with
10 additions
and
6 deletions
htdocs/admin/dict.php
+
4
−
2
View file @
ffe4ae59
...
...
@@ -1687,12 +1687,14 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
print
'<td>'
;
if
(
!
empty
(
$conf
->
accounting
->
enabled
))
{
$accountancy_account
=
(
!
empty
(
$obj
->
$fieldlist
[
$field
])
?
$obj
->
$fieldlist
[
$field
]
:
0
);
$fieldname
=
$fieldlist
[
$field
];
$accountancy_account
=
(
!
empty
(
$obj
->
$fieldname
)
?
$obj
->
$fieldname
:
0
);
print
$formaccountancy
->
select_account
(
$accountancy_account
,
$fieldlist
[
$field
],
1
,
''
,
1
,
1
,
'maxwidth200 maxwidthonsmartphone'
);
}
else
{
print
'<input type="text" size="10" class="flat" value="'
.
(
isset
(
$obj
->
$fieldlist
[
$field
])
?
$obj
->
$fieldlist
[
$field
]
:
''
)
.
'" name="'
.
$fieldlist
[
$field
]
.
'">'
;
$fieldname
=
$fieldlist
[
$field
];
print
'<input type="text" size="10" class="flat" value="'
.
(
isset
(
$obj
->
$fieldname
)
?
$obj
->
$fieldname
:
''
)
.
'" name="'
.
$fieldlist
[
$field
]
.
'">'
;
}
print
'</td>'
;
}
...
...
This diff is collapsed.
Click to expand it.
htdocs/admin/websites.php
+
6
−
4
View file @
ffe4ae59
...
...
@@ -535,7 +535,8 @@ if ($id)
{
$showfield
=
1
;
$align
=
"left"
;
$valuetoshow
=
$obj
->
$fieldlist
[
$field
];
$fieldname
=
$fieldlist
[
$field
];
$valuetoshow
=
$obj
->
$fieldname
;
// Show value for field
if
(
$showfield
)
print
'<td align="'
.
$align
.
'">'
.
$valuetoshow
.
'</td>'
;
...
...
@@ -613,14 +614,15 @@ function fieldListWebsites($fieldlist, $obj='', $tabname='', $context='')
foreach
(
$fieldlist
as
$field
=>
$value
)
{
$fieldname
=
$fieldlist
[
$field
];
if
(
$fieldlist
[
$field
]
==
'lang'
)
{
print
'<td>'
;
print
$formadmin
->
select_language
(
$conf
->
global
->
MAIN_LANG_DEFAULT
,
'lang'
);
print
'</td>'
;
}
elseif
(
$fieldlist
[
$field
]
==
'code'
&&
isset
(
$obj
->
$field
list
[
$field
]
))
{
print
'<td><input type="text" class="flat" value="'
.
(
!
empty
(
$obj
->
$field
list
[
$field
]
)
?
$obj
->
$field
list
[
$field
]
:
''
)
.
'" size="10" name="'
.
$fieldlist
[
$field
]
.
'"></td>'
;
elseif
(
$fieldlist
[
$field
]
==
'code'
&&
isset
(
$obj
->
$field
name
))
{
print
'<td><input type="text" class="flat" value="'
.
(
!
empty
(
$obj
->
$field
name
)
?
$obj
->
$field
name
:
''
)
.
'" size="10" name="'
.
$fieldlist
[
$field
]
.
'"></td>'
;
}
else
{
...
...
@@ -631,7 +633,7 @@ function fieldListWebsites($fieldlist, $obj='', $tabname='', $context='')
if
(
$fieldlist
[
$field
]
==
'libelle'
)
$size
=
'size="32" '
;
if
(
$fieldlist
[
$field
]
==
'tracking'
)
$size
=
'size="92" '
;
if
(
$fieldlist
[
$field
]
==
'sortorder'
)
$size
=
'size="2" '
;
print
'<input type="text" '
.
$size
.
' class="flat" value="'
.
(
isset
(
$obj
->
$field
list
[
$field
]
)
?
$obj
->
$field
list
[
$field
]
:
''
)
.
'" name="'
.
$fieldlist
[
$field
]
.
'">'
;
print
'<input type="text" '
.
$size
.
' class="flat" value="'
.
(
isset
(
$obj
->
$field
name
)
?
$obj
->
$field
name
:
''
)
.
'" name="'
.
$fieldlist
[
$field
]
.
'">'
;
print
'</td>'
;
}
}
...
...
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