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
761ece31
Commit
761ece31
authored
7 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Remove $maxfilenamelength replace with auto overflow.
parent
17bd3939
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
htdocs/core/class/html.formfile.class.php
+11
-13
11 additions, 13 deletions
htdocs/core/class/html.formfile.class.php
htdocs/theme/eldy/style.css.php
+1
-1
1 addition, 1 deletion
htdocs/theme/eldy/style.css.php
htdocs/theme/md/style.css.php
+1
-1
1 addition, 1 deletion
htdocs/theme/md/style.css.php
with
13 additions
and
15 deletions
htdocs/core/class/html.formfile.class.php
+
11
−
13
View file @
761ece31
...
...
@@ -229,7 +229,7 @@ class FormFile
* @param integer $allowgenifempty Show warning if no model activated
* @param integer $forcenomultilang Do not show language option (even if MAIN_MULTILANGS defined)
* @param int $iconPDF Show only PDF icon with link (1/0)
* @param int $
maxfilenamelength Max length for filename shown
* @param int $
notused Not used
* @param integer $noform Do not output html form tags
* @param string $param More param on http links
* @param string $title Title to show on top of form
...
...
@@ -238,10 +238,10 @@ class FormFile
* @return int <0 if KO, number of shown files if OK
* @deprecated Use print xxx->showdocuments() instead.
*/
function
show_documents
(
$modulepart
,
$modulesubdir
,
$filedir
,
$urlsource
,
$genallowed
,
$delallowed
=
0
,
$modelselected
=
''
,
$allowgenifempty
=
1
,
$forcenomultilang
=
0
,
$iconPDF
=
0
,
$
maxfilenamelength
=
28
,
$noform
=
0
,
$param
=
''
,
$title
=
''
,
$buttonlabel
=
''
,
$codelang
=
''
)
function
show_documents
(
$modulepart
,
$modulesubdir
,
$filedir
,
$urlsource
,
$genallowed
,
$delallowed
=
0
,
$modelselected
=
''
,
$allowgenifempty
=
1
,
$forcenomultilang
=
0
,
$iconPDF
=
0
,
$
notused
=
0
,
$noform
=
0
,
$param
=
''
,
$title
=
''
,
$buttonlabel
=
''
,
$codelang
=
''
)
{
$this
->
numoffiles
=
0
;
print
$this
->
showdocuments
(
$modulepart
,
$modulesubdir
,
$filedir
,
$urlsource
,
$genallowed
,
$delallowed
,
$modelselected
,
$allowgenifempty
,
$forcenomultilang
,
$iconPDF
,
$
maxfilenamelength
,
$noform
,
$param
,
$title
,
$buttonlabel
,
$codelang
);
print
$this
->
showdocuments
(
$modulepart
,
$modulesubdir
,
$filedir
,
$urlsource
,
$genallowed
,
$delallowed
,
$modelselected
,
$allowgenifempty
,
$forcenomultilang
,
$iconPDF
,
$
notused
,
$noform
,
$param
,
$title
,
$buttonlabel
,
$codelang
);
return
$this
->
numoffiles
;
}
...
...
@@ -259,7 +259,7 @@ class FormFile
* @param integer $allowgenifempty Allow generation even if list of template ($genallowed) is empty (show however a warning)
* @param integer $forcenomultilang Do not show language option (even if MAIN_MULTILANGS defined)
* @param int $iconPDF Deprecated, see getDocumentsLink
* @param int $
maxfilenamelength Max length for filename shown
* @param int $
notused Not used
* @param integer $noform Do not output html form tags
* @param string $param More param on http links
* @param string $title Title to show on top of form
...
...
@@ -269,7 +269,7 @@ class FormFile
* @param Object $object Object when method is called from an object card.
* @return string Output string with HTML array of documents (might be empty string)
*/
function
showdocuments
(
$modulepart
,
$modulesubdir
,
$filedir
,
$urlsource
,
$genallowed
,
$delallowed
=
0
,
$modelselected
=
''
,
$allowgenifempty
=
1
,
$forcenomultilang
=
0
,
$iconPDF
=
0
,
$
maxfilenamelength
=
28
,
$noform
=
0
,
$param
=
''
,
$title
=
''
,
$buttonlabel
=
''
,
$codelang
=
''
,
$morepicto
=
''
,
$object
=
null
)
function
showdocuments
(
$modulepart
,
$modulesubdir
,
$filedir
,
$urlsource
,
$genallowed
,
$delallowed
=
0
,
$modelselected
=
''
,
$allowgenifempty
=
1
,
$forcenomultilang
=
0
,
$iconPDF
=
0
,
$
notused
=
0
,
$noform
=
0
,
$param
=
''
,
$title
=
''
,
$buttonlabel
=
''
,
$codelang
=
''
,
$morepicto
=
''
,
$object
=
null
)
{
// Deprecation warning
if
(
0
!==
$iconPDF
)
{
...
...
@@ -297,7 +297,6 @@ class FormFile
$hookmanager
->
initHooks
(
array
(
'formfile'
));
$forname
=
'builddoc'
;
$out
=
''
;
$var
=
true
;
$headershown
=
0
;
$showempty
=
0
;
...
...
@@ -691,27 +690,26 @@ class FormFile
{
foreach
(
$file_list
as
$file
)
{
$var
=!
$var
;
// Define relative path for download link (depends on module)
$relativepath
=
$file
[
"name"
];
// Cas general
if
(
$modulesubdir
)
$relativepath
=
$modulesubdir
.
"/"
.
$file
[
"name"
];
// Cas propal, facture...
if
(
$modulepart
==
'export'
)
$relativepath
=
$file
[
"name"
];
// Other case
$out
.
=
"
<tr
"
.
$bc
[
$var
]
.
">"
;
$out
.
=
'
<tr
class="oddeven">'
;
$documenturl
=
DOL_URL_ROOT
.
'/document.php'
;
if
(
isset
(
$conf
->
global
->
DOL_URL_ROOT_DOCUMENT_PHP
))
$documenturl
=
$conf
->
global
->
DOL_URL_ROOT_DOCUMENT_PHP
;
// Show file name with link to download
$out
.
=
'<td class="nowrap">'
;
$out
.
=
'<a data-ajax="false" href="'
.
$documenturl
.
'?modulepart='
.
$modulepart
.
'&file='
.
urlencode
(
$relativepath
)
.
(
$param
?
'&'
.
$param
:
''
)
.
'"'
;
$out
.
=
'<td class="tdoverflowmax300">'
;
$tmp
=
$this
->
showPreview
(
$file
,
$modulepart
,
$relativepath
);
$out
.
=
(
$tmp
?
$tmp
.
' '
:
''
);
$out
.
=
'<a href="'
.
$documenturl
.
'?modulepart='
.
$modulepart
.
'&file='
.
urlencode
(
$relativepath
)
.
(
$param
?
'&'
.
$param
:
''
)
.
'"'
;
$mime
=
dol_mimetype
(
$relativepath
,
''
,
0
);
if
(
preg_match
(
'/text/'
,
$mime
))
$out
.
=
' target="_blank"'
;
$out
.
=
' target="_blank">'
;
$out
.
=
img_mime
(
$file
[
"name"
],
$langs
->
trans
(
"File"
)
.
': '
.
$file
[
"name"
])
.
' '
.
dol_trunc
(
$file
[
"name"
]
,
$maxfilenamelength
)
;
$out
.
=
img_mime
(
$file
[
"name"
],
$langs
->
trans
(
"File"
)
.
': '
.
$file
[
"name"
])
.
' '
.
$file
[
"name"
];
$out
.
=
'</a>'
.
"
\n
"
;
$out
.
=
$this
->
showPreview
(
$file
,
$modulepart
,
$relativepath
);
$out
.
=
'</td>'
;
// Show file size
...
...
This diff is collapsed.
Click to expand it.
htdocs/theme/eldy/style.css.php
+
1
−
1
View file @
761ece31
...
...
@@ -1068,7 +1068,7 @@ div.nopadding {
.pictowarning, .pictopreview {
padding-
<?php
echo
$left
;
?>
: 3px;
}
.pictoedit, .pictowarning,
.pictopreview,
.pictodelete {
.pictoedit, .pictowarning, .pictodelete {
vertical-align: text-bottom;
}
.colorthumb {
...
...
This diff is collapsed.
Click to expand it.
htdocs/theme/md/style.css.php
+
1
−
1
View file @
761ece31
...
...
@@ -1112,7 +1112,7 @@ table.noborder tr.liste_titre td {
.pictowarning, .pictopreview {
padding-
<?php
echo
$left
;
?>
: 3px;
}
.pictoedit, .pictowarning,
.pictopreview,
.pictodelete {
.pictoedit, .pictowarning, .pictodelete {
vertical-align: text-bottom;
}
.colorthumb {
...
...
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