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
edf66f1c
Commit
edf66f1c
authored
15 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Fix: Remove forced mime type. What we can force is open dialo but not the mime type.
parent
e1c14b9c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
htdocs/docs/index.php
+6
-6
6 additions, 6 deletions
htdocs/docs/index.php
htdocs/document.php
+1
-0
1 addition, 0 deletions
htdocs/document.php
htdocs/html.formfile.class.php
+2
-2
2 additions, 2 deletions
htdocs/html.formfile.class.php
htdocs/societe/document.php
+1
-1
1 addition, 1 deletion
htdocs/societe/document.php
with
10 additions
and
9 deletions
htdocs/docs/index.php
+
6
−
6
View file @
edf66f1c
...
...
@@ -17,11 +17,11 @@
*/
/**
\file htdocs/docs/index.php
\ingroup document
\brief Page d'accueil module document
\version $Id$
*/
*
\file htdocs/docs/index.php
*
\ingroup document
*
\brief Page d'accueil module document
*
\version $Id$
*/
require
(
"./pre.inc.php"
);
...
...
@@ -57,7 +57,7 @@ if ($resql)
print
'<td>'
;
$loc
=
get_exdir
(
$obj
->
rowid
)
.
$obj
->
rowid
.
".pdf"
;
$file
=
stripslashes
(
$obj
->
name
);
echo
'<a href="'
.
DOL_URL_ROOT
.
'/document.php?modulepart=ged&
type=application/binary
&file='
.
urlencode
(
$loc
)
.
'">'
.
$file
.
'</a></td>'
;
echo
'<a href="'
.
DOL_URL_ROOT
.
'/document.php?modulepart=ged&
attachment=1
&file='
.
urlencode
(
$loc
)
.
'">'
.
$file
.
'</a></td>'
;
print
'<td>'
.
dol_print_date
(
$obj
->
date_generation
,
'dayhour'
)
.
'</td>'
;
print
"</tr>
\n
"
;
...
...
This diff is collapsed.
Click to expand it.
htdocs/document.php
+
1
−
0
View file @
edf66f1c
...
...
@@ -102,6 +102,7 @@ if (eregi('\.tiff$',$original_file)) { $attachment = true; }
// Calendar
if
(
eregi
(
'\.vcs$'
,
$original_file
))
{
$attachment
=
true
;
}
if
(
eregi
(
'\.ics$'
,
$original_file
))
{
$attachment
=
true
;
}
if
(
$_REQUEST
[
"attachment"
])
{
$attachment
=
true
;
}
if
(
!
empty
(
$conf
->
global
->
MAIN_DISABLE_FORCE_SAVEAS
))
$attachment
=
false
;
//print "XX".$attachment;exit;
...
...
This diff is collapsed.
Click to expand it.
htdocs/html.formfile.class.php
+
2
−
2
View file @
edf66f1c
...
...
@@ -414,7 +414,7 @@ class FormFile
* \param object Object on which document is linked to
* \param modulepart Value for modulepart used by download wrapper
* \param param Parameters on sort links
* \param forcedownload
Mime type is f
orce
d
to
'application/binary' to have a download
* \param forcedownload
F
orce to
open dialog box "Save As" when clicking on file
* \param relativepath Relative path of docs (autodefined if not provided)
* \param permtodelete Permission to delete
* \param useinecm Change output for use in ecm module
...
...
@@ -459,7 +459,7 @@ class FormFile
print
"<tr
$bc[$var]
><td>"
;
//print "XX".$file['name']; //$file['name'] must be utf8
print
'<a href="'
.
DOL_URL_ROOT
.
'/document.php?modulepart='
.
$modulepart
;
//
if ($forcedownload) print '&
type=application/binary
';
if
(
$forcedownload
)
print
'&
attachment=1
'
;
print
'&file='
.
urlencode
(
$relativepath
.
$file
[
'name'
])
.
'">'
;
print
img_mime
(
$file
[
'name'
],
$file
[
'name'
]
.
' ('
.
dol_print_size
(
$file
[
'size'
],
0
,
0
)
.
')'
)
.
' '
;
print
dol_trunc
(
$file
[
'name'
],
$maxlength
,
'middle'
);
...
...
This diff is collapsed.
Click to expand it.
htdocs/societe/document.php
+
1
−
1
View file @
edf66f1c
...
...
@@ -237,7 +237,7 @@ if ($socid > 0)
$var
=!
$var
;
print
"<tr
$bc[$var]
><td>"
;
$loc
=
"courrier/"
.
get_exdir
(
$socid
);
echo
'<a href="'
.
DOL_URL_ROOT
.
'/document.php?modulepart=societe&
type=application/binary
&file='
.
urlencode
(
$loc
.
'/'
.
$file
)
.
'">'
.
$file
.
'</a>'
;
echo
'<a href="'
.
DOL_URL_ROOT
.
'/document.php?modulepart=societe&
attachment=1
&file='
.
urlencode
(
$loc
.
'/'
.
$file
)
.
'">'
.
$file
.
'</a>'
;
print
"</td>
\n
"
;
print
'<td align="right">'
.
dol_print_size
(
dol_filesize
(
$courrier_dir
.
"/"
.
$file
))
.
'</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