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
8389fdc7
Commit
8389fdc7
authored
15 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Sec: Fix creation of temp dir in right place.
parent
2454b102
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
htdocs/includes/dolibarr_changes.txt
+3
-1
3 additions, 1 deletion
htdocs/includes/dolibarr_changes.txt
htdocs/includes/fpdf/fpdf/fpdf.php
+17
-15
17 additions, 15 deletions
htdocs/includes/fpdf/fpdf/fpdf.php
with
20 additions
and
16 deletions
htdocs/includes/dolibarr_changes.txt
+
3
−
1
View file @
8389fdc7
...
...
@@ -6,7 +6,9 @@ in Dolibarr root.
FPDF:
-----
* All changes were added in fpdf.php file and marked with tag DOLCHANGE
* All changes were added in fpdf.php file and marked with tag DOLCHANGE or DOL_CHANGE
Example:
$tmp=tempnam('.','gif') into $tmp=tempnam(DOL_DATA_ROOT,'gif') to avoid creating files in the htdocs directory.
FPDFI and FPDF_TPL:
...
...
This diff is collapsed.
Click to expand it.
htdocs/includes/fpdf/fpdf/fpdf.php
+
17
−
15
View file @
8389fdc7
...
...
@@ -11,9 +11,9 @@
/* Begin DOLCHANGE Added by Regis */
// height of cell repect font height
define
(
"K_CELL_HEIGHT_RATIO"
,
1.25
);
// R
p
ertoire des documents de fckeditor
// R
�pe
rtoire des documents de fckeditor
if
(
!
empty
(
$conf
->
fckeditor
->
dir_output
))
define
(
"K_PATH_CACHE"
,
$conf
->
fckeditor
->
dir_output
);
// url qui sera substituer par le K_PATH_CACHE lorsqu'une image sera int
gre
au pdf
// url qui sera substituer par le K_PATH_CACHE lorsqu'une image sera int
�gr�e au
pdf
if
(
defined
(
'DOL_URL_ROOT'
))
define
(
"K_PATH_URL_CACHE"
,
DOL_URL_ROOT
.
"/document.php?modulepart=editor&file="
);
/* End DOLCHANGE Added by Regis */
...
...
@@ -85,7 +85,7 @@ var $PDFVersion; //PDF version number
var
$prevFontFamily
;
//store previous font family
var
$prevFontStyle
;
//store previous style family
var
$DisplayPreferences
=
''
;
//pr
fre
nces d'affichage
var
$DisplayPreferences
=
''
;
//pr
�f�renc
es d'affichage
// variables pour HTML PARSER
...
...
@@ -1516,10 +1516,12 @@ function _parsegif($file)
if
(
!
$im
)
$this
->
Error
(
'Missing or incorrect image file: '
.
$file
);
imageinterlace
(
$im
,
0
);
$tmp
=
tempnam
(
'.'
,
'gif'
);
// DOL_CHANGE
$tmp
=
tempnam
(
DOL_DATA_ROOT
,
'gif'
);
//$tmp=tempnam('.','gif');
if
(
!
$tmp
)
$this
->
Error
(
'Unable to create a temporary file'
);
if
(
!
imagepng
(
$im
,
$tmp
))
if
(
!
imagepng
(
$im
,
$tmp
))
$this
->
Error
(
'Error while saving to temporary file'
);
imagedestroy
(
$im
);
$info
=
$this
->
_parsepng
(
$tmp
);
...
...
@@ -1852,8 +1854,8 @@ function _putcatalog()
/* Begin DOLCHANGE Added by Regis */
//Pr
fre
nces d'affichage - @author Michel Poulain
//affiche le document en plein
c
ran (escape pour revenir en mode normal)
//Pr
�f�renc
es d'affichage - @author Michel Poulain
//affiche le document en plein
�cr
an (escape pour revenir en mode normal)
if
(
is_int
(
strpos
(
$this
->
DisplayPreferences
,
'FullScreen'
)))
$this
->
_out
(
'/PageMode /FullScreen'
);
if
(
$this
->
DisplayPreferences
)
{
...
...
@@ -1864,16 +1866,16 @@ function _putcatalog()
//masque les barres d'outils
if
(
is_int
(
strpos
(
$this
->
DisplayPreferences
,
'HideToolbar'
)))
$this
->
_out
(
'/HideToolbar true'
);
//masque tous les
lme
nts de la fentr
e
(barres de dfil
e
ment, contrles
d
e navigation, signets...)
//masque tous les
�l�ment
s de la fen�tre
(b
arres de d�filem
ent
, contr�les de
nav
igation, signets...)
if
(
is_int
(
strpos
(
$this
->
DisplayPreferences
,
'HideWindowUI'
)))
$this
->
_out
(
'/HideWindowUI true'
);
//affiche le titre du document au lieu du nom du fichier
if
(
is_int
(
strpos
(
$this
->
DisplayPreferences
,
'DisplayDocTitle'
)))
$this
->
_out
(
'/DisplayDocTitle true'
);
//centre la fen
t
re
//centre la fen
�tr
e
if
(
is_int
(
strpos
(
$this
->
DisplayPreferences
,
'CenterWindow'
)))
$this
->
_out
(
'/CenterWindow true'
);
//ajuste la taille de la fen
t
re (lorsqu'elle n'est pas maximise
)
sur celle de la page
//ajuste la taille de la fen
�tr
e (lorsqu'elle n'est pas maximis�e
) s
ur celle de la page
if
(
is_int
(
strpos
(
$this
->
DisplayPreferences
,
'FitWindow'
)))
$this
->
_out
(
'/FitWindow true'
);
$this
->
_out
(
'>>'
);
...
...
@@ -1970,7 +1972,7 @@ function _enddoc()
}
elseif
(
$this
->
tdbegin
)
{
if
((
strlen
(
trim
(
$element
))
>
0
)
AND
(
$element
!=
" "
))
{
// Cette version ne g
r
e pas UTF8
// Cette version ne g
�re
pas UTF8
//$this->Cell($this->tdwidth, $this->tdheight, $this->unhtmlentities($element), $this->tableborder, '', $this->tdalign, $this->tdbgcolor);
$this
->
Cell
(
$this
->
tdwidth
,
$this
->
tdheight
,
utf8_decode
(
$this
->
unhtmlentities
(
$element
)),
$this
->
tableborder
,
''
,
$this
->
tdalign
,
$this
->
tdbgcolor
);
}
...
...
@@ -1979,7 +1981,7 @@ function _enddoc()
}
}
else
{
// cette version ne g
r
e pas UTF8
// cette version ne g
�re
pas UTF8
//$this->Write($this->lasth, stripslashes($this->unhtmlentities($element)), '', $fill);
$this
->
Write
(
$this
->
lasth
,
stripslashes
(
utf8_decode
(
$this
->
unhtmlentities
(
$element
))),
''
,
$fill
);
}
...
...
@@ -2602,7 +2604,7 @@ function _enddoc()
/**
* Converti les noms des polices FckEditor.
* @string string chaine
convertir
* @string string chaine
� c
onvertir
* @return string chaine convertie.
* @author Regis Houssin
*/
...
...
@@ -2636,8 +2638,8 @@ function _enddoc()
}
/**
* Param
t
rage des prf
ren
ces d'affichage.
* @string preference liste des pr
fre
nces d'affichage (voir la fonction _putcatalog)
* Param
�tr
age des pr�f
�rences
d'affichage.
* @string preference liste des pr
�f�renc
es d'affichage (voir la fonction _putcatalog)
* @ex: $pdf->DisplayPreferences('HideMenubar,HideToolbar,HideWindowUI')
* @author Michel Poulain
*/
...
...
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