Commit ff599422 authored by Johan Cwiklinski's avatar Johan Cwiklinski

Merge branch '9.4/bugfixes' into 9.5/bugfixes

parents 33c19558 c2a9d74d
......@@ -65,17 +65,17 @@ if (isset($_GET['docid'])) { // docid for document
$send = false;
if (($splitter[0] == "_dumps")
&& Session::haveRight("backup", CREATE)) {
$send = true;
$send = GLPI_DUMP_DIR . '/' . $splitter[1];
}
if ($splitter[0] == "_pictures") {
if (Document::isImage(GLPI_DOC_DIR."/".$_GET['file'])) {
$send = true;
if (Document::isImage(GLPI_PICTURE_DIR . '/' . $splitter[1])) {
$send = GLPI_PICTURE_DIR . '/' . $splitter[1];
}
}
if ($send && file_exists(GLPI_DOC_DIR."/".$_GET["file"])) {
Toolbox::sendFile(GLPI_DOC_DIR."/".$_GET["file"], $splitter[1]);
if ($send && file_exists($send)) {
Toolbox::sendFile($send, $splitter[1]);
} else {
Html::displayErrorAndDie(__('Unauthorized access to this file'), true);
}
......
......@@ -707,7 +707,7 @@ class User extends CommonDBTM {
$extension = Toolbox::strtolower(array_pop($tmp));
@mkdir(GLPI_PICTURE_DIR . "/$sub");
$picture_path = GLPI_PICTURE_DIR . "/$sub/${filename}.$extension";
self::dropPictureFiles($filename.".".$extension);
self::dropPictureFiles("$sub/${filename}.$extension");
if (Document::isImage($fullpath)
&& Document::renameForce($fullpath, $picture_path)) {
......@@ -4965,7 +4965,7 @@ class User extends CommonDBTM {
if (!empty($picture)) {
// unlink main file
if (file_exists(GLPI_PICTURE_DIR."/$picture")) {
@unlink(GLPI_DOC_DIR."/_pictures/$picture");
@unlink(GLPI_PICTURE_DIR."/$picture");
}
// unlink Thunmnail
$tmp = explode(".", $picture);
......
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
No preview for this file type
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment