Skip to content

Commit

Permalink
[FIX] file actions target
Browse files Browse the repository at this point in the history
  • Loading branch information
chfsx committed Jan 28, 2025
1 parent 0816f97 commit 02c5006
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions Modules/File/classes/class.ilObjFileListGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,28 +158,16 @@ public function stripTitleOfFileExtension(string $a_title): string
return $this->secure(preg_replace('/\.[^.]*$/', '', $a_title));
}

/**
* Get command target frame
*/
public function getCommandFrame(string $cmd): string
{
$this->updateContext();
$info = $this->file_info->getByObjectId($this->obj_id);

$frame = "";
switch ($cmd) {
case Capabilities::DOWNLOAD->value:
if ($info->shouldDeliverInline()) {
$frame = '_blank';
}
break;
case "":
default:
$frame = ilFrameTargetInfo::_getFrame("RepositoryContent");
break;
if ($cmd === Capabilities::DOWNLOAD->value) {
return $info->shouldDeliverInline() ? '_blank' : '';
}

return $frame;
return '';
}

/**
Expand Down

0 comments on commit 02c5006

Please sign in to comment.