File tree 2 files changed +7
-7
lines changed
2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 65
65
$ send = false ;
66
66
if (($ splitter [0 ] == "_dumps " )
67
67
&& Session::haveRight ("backup " , CREATE )) {
68
- $ send = true ;
68
+ $ send = GLPI_DUMP_DIR . ' / ' . $ splitter [ 1 ] ;
69
69
}
70
70
71
71
if ($ splitter [0 ] == "_pictures " ) {
72
- if (Document::isImage (GLPI_DOC_DIR . " / " . $ _GET [ ' file ' ])) {
73
- $ send = true ;
72
+ if (Document::isImage (GLPI_PICTURE_DIR . ' / ' . $ splitter [ 1 ])) {
73
+ $ send = GLPI_PICTURE_DIR . ' / ' . $ splitter [ 1 ] ;
74
74
}
75
75
}
76
76
77
- if ($ send && file_exists (GLPI_DOC_DIR . " / " . $ _GET [ " file " ] )) {
78
- Toolbox::sendFile (GLPI_DOC_DIR . " / " . $ _GET [ " file " ] , $ splitter [1 ]);
77
+ if ($ send && file_exists ($ send )) {
78
+ Toolbox::sendFile ($ send , $ splitter [1 ]);
79
79
} else {
80
80
Html::displayErrorAndDie (__ ('Unauthorized access to this file ' ), true );
81
81
}
Original file line number Diff line number Diff line change @@ -733,7 +733,7 @@ function prepareInputForUpdate($input) {
733
733
$ extension = Toolbox::strtolower (array_pop ($ tmp ));
734
734
@mkdir (GLPI_PICTURE_DIR . "/ $ sub " );
735
735
$ picture_path = GLPI_PICTURE_DIR . "/ $ sub/ $ {filename}. $ extension " ;
736
- self ::dropPictureFiles ($ filename. " . " . $ extension );
736
+ self ::dropPictureFiles (" $ sub / $ { filename} . $ extension" );
737
737
738
738
if (Document::isImage ($ fullpath )
739
739
&& Document::renameForce ($ fullpath , $ picture_path )) {
@@ -4747,7 +4747,7 @@ static function dropPictureFiles($picture) {
4747
4747
if (!empty ($ picture )) {
4748
4748
// unlink main file
4749
4749
if (file_exists (GLPI_PICTURE_DIR ."/ $ picture " )) {
4750
- @unlink (GLPI_DOC_DIR . " /_pictures /$ picture " );
4750
+ @unlink (GLPI_PICTURE_DIR . " / $ picture " );
4751
4751
}
4752
4752
// unlink Thunmnail
4753
4753
$ tmp = explode (". " , $ picture );
You can’t perform that action at this time.
0 commit comments