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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
327c74d3
Commit
327c74d3
authored
Aug 3, 2008
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Fix: Link was to short
parent
3153f3b7
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/admin/tools/export.php
+6
-1
6 additions, 1 deletion
htdocs/admin/tools/export.php
htdocs/html.formfile.class.php
+5
-4
5 additions, 4 deletions
htdocs/html.formfile.class.php
htdocs/lib/functions.lib.php
+4
-3
4 additions, 3 deletions
htdocs/lib/functions.lib.php
with
15 additions
and
8 deletions
htdocs/admin/tools/export.php
+
6
−
1
View file @
327c74d3
...
...
@@ -50,6 +50,10 @@ if ($file && ! $what)
/*
* View
*/
llxHeader
();
$html
=
new
Form
(
$db
);
...
...
@@ -179,6 +183,7 @@ if ($what == 'mysql')
if
(
$compression
==
'bz'
)
$handle
=
bzopen
(
$outputfile
,
'r'
);
if
(
$hanlde
)
{
print
'eeee'
;
$errormsg
=
fgets
(
$handle
,
10
);
if
(
$compression
==
'none'
)
fclose
(
$handle
);
if
(
$compression
==
'gz'
)
gzclose
(
$handle
);
...
...
@@ -218,7 +223,7 @@ if ($what)
}
}
$result
=
$formfile
->
show_documents
(
'systemtools'
,
''
,
DOL_DATA_ROOT
.
'/admin/temp'
,
$_SERVER
[
'PHP_SELF'
],
0
,
1
);
$result
=
$formfile
->
show_documents
(
'systemtools'
,
''
,
DOL_DATA_ROOT
.
'/admin/temp'
,
$_SERVER
[
'PHP_SELF'
],
0
,
1
,
''
,
array
(),
0
,
0
,
48
);
if
(
$result
==
0
)
{
...
...
...
...
This diff is collapsed.
Click to expand it.
htdocs/html.formfile.class.php
+
5
−
4
View file @
327c74d3
...
...
@@ -119,11 +119,12 @@ class FormFile
* \param modelliste Tableau des modeles possibles
* \param forcenomultilang N'affiche pas option langue meme si MAIN_MULTILANGS dfini
* \param iconPDF N'affiche que l'icone PDF avec le lien (1/0)
* \param maxfilenamelength Max length for filename shown
* \remarks Le fichier de facture dtaille est de la forme
* REFFACTURE-XXXXXX-detail.pdf ou XXXXX est une forme diverse
* \return int <0 si ko, nbre de fichiers affichs si ok
*/
function
show_documents
(
$modulepart
,
$filename
,
$filedir
,
$urlsource
,
$genallowed
,
$delallowed
=
0
,
$modelselected
=
''
,
$modelliste
=
array
(),
$forcenomultilang
=
0
,
$iconPDF
=
0
)
function
show_documents
(
$modulepart
,
$filename
,
$filedir
,
$urlsource
,
$genallowed
,
$delallowed
=
0
,
$modelselected
=
''
,
$modelliste
=
array
(),
$forcenomultilang
=
0
,
$iconPDF
=
0
,
$maxfilenamelength
=
28
)
{
// filedir = conf->...dir_ouput."/".get_exdir(id)
include_once
(
DOL_DOCUMENT_ROOT
.
'/lib/files.lib.php'
);
...
...
@@ -319,7 +320,7 @@ class FormFile
print
'<a href="'
.
DOL_URL_ROOT
.
'/document.php?modulepart='
.
$modulepart
.
'&file='
.
urlencode
(
$relativepath
)
.
'">'
;
if
(
!
$iconPDF
)
{
print
img_mime
(
$file
[
"name"
])
.
' '
.
dolibarr_trunc
(
$file
[
"name"
],
28
);
print
img_mime
(
$file
[
"name"
]
,
$langs
->
trans
(
"File"
)
.
': '
.
$file
[
"name"
]
)
.
' '
.
dolibarr_trunc
(
$file
[
"name"
],
$maxfilenamelength
);
}
else
{
...
...
@@ -334,7 +335,7 @@ class FormFile
if
(
$delallowed
)
{
print
'<td><a href="'
.
DOL_URL_ROOT
.
'/document.php?action=remove_file&modulepart='
.
$modulepart
.
'&file='
.
urlencode
(
$relativepath
)
.
'&urlsource='
.
urlencode
(
$urlsource
)
.
'">'
.
img_delete
()
.
'</a></td>'
;
print
'<td
align="right"
><a href="'
.
DOL_URL_ROOT
.
'/document.php?action=remove_file&modulepart='
.
$modulepart
.
'&file='
.
urlencode
(
$relativepath
)
.
'&urlsource='
.
urlencode
(
$urlsource
)
.
'">'
.
img_delete
()
.
'</a></td>'
;
}
if
(
!
$iconPDF
)
print
'</tr>'
;
...
...
...
...
This diff is collapsed.
Click to expand it.
htdocs/lib/functions.lib.php
+
4
−
3
View file @
327c74d3
...
...
@@ -728,7 +728,7 @@ function dol_phone_link($phone,$option=0)
}
/**
\brief Tr
onque une chaine a une taille donn�e en ajoutant les points de suspension si cela d�passe
\brief Tr
uncate a string to a particular length adding '...' if string larger than length
\param string String to truncate
\param size Max string size. 0 for no limit.
\param trunc Where to trunc: right, left, middle
...
...
@@ -1205,9 +1205,10 @@ function img_allow($allow)
/**
* \brief Show mime picto
* \param file Filename
* \param alt Alternate text
* \return string Return img tag
*/
function
img_mime
(
$file
)
function
img_mime
(
$file
,
$alt
=
''
)
{
$mime
=
'other'
;
if
(
eregi
(
'\.pdf'
,
$file
))
{
$mime
=
'pdf'
;
}
...
...
@@ -1220,7 +1221,7 @@ function img_mime($file)
if
(
eregi
(
'\.(mp3|ogg|au)'
,
$file
))
$mime
=
'audio'
;
if
(
eregi
(
'\.(avi|mvw|divx|xvid)'
,
$file
))
$mime
=
'video'
;
if
(
eregi
(
'\.(zip|rar|gz|tgz|z|cab)'
,
$file
))
$mime
=
'archive'
;
$alt
=
'Mime type: '
.
$mime
;
if
(
empty
(
$alt
))
$alt
=
'Mime type: '
.
$mime
;
$mime
.
=
'.png'
;
return
'<img src="'
.
DOL_URL_ROOT
.
'/theme/common/mime/'
.
$mime
.
'" border="0" alt="'
.
$alt
.
'" title="'
.
$alt
.
'">'
;
...
...
...
...
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