Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions components/ILIAS/Style/Content/Images/class.ImageFileRepo.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,15 @@ public function getByFilename(int $style_id, string $rid, string $filename): ?Im
}

// delete image
public function deleteImageByFilename(int $style_id, string $filename): void
public function deleteImageByFilename(int $style_id, string $rid, string $filename): void
{
$dir = $this->dir($style_id);
$this->web_files->delete($dir . "/" . $filename);
if ($rid !== "") {
$this->irss->removePathFromContainer($rid, "images/" . $filename);
}
$legacy_path = $this->dir($style_id) . "/" . $filename;
if ($this->web_files->has($legacy_path)) {
$this->web_files->delete($legacy_path);
}
}

public function importFromUploadResult(
Expand Down
3 changes: 2 additions & 1 deletion components/ILIAS/Style/Content/Images/class.ImageManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ public function supportsResize(

public function deleteByFilename(string $filename): void
{
$this->repo->deleteImageByFilename($this->style_id, $filename);
$rid = $this->style_repo->readRid($this->style_id);
$this->repo->deleteImageByFilename($this->style_id, $rid, $filename);
}

public function importFromUploadResult(
Expand Down
Loading