Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

Commit

Permalink
fix(package): wrong dl_filename when updating a package
Browse files Browse the repository at this point in the history
see implementation of prepareInputForAdd

Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry authored and DIOHz0r committed Sep 6, 2018
1 parent 59244a2 commit 19a18e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inc/package.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ public function prepareInputForUpdate($input) {
$this->createEntityDirectory(dirname($destination));
if (rename($uploadedFile, $destination)) {
$filename = pathinfo($destination, PATHINFO_FILENAME);
$input['dl_filename'] = basename($destination);
$input['dl_filename'] = basename($uploadedFile);
if ($filename != $this->fields['filename']) {
unlink(GLPI_PLUGIN_DOC_DIR . "/" . $this->fields['filename']);
}
Expand Down

0 comments on commit 19a18e0

Please sign in to comment.