From 9bbf1bda70c66ad3a53cbe5d3c0f4c9696b9396d Mon Sep 17 00:00:00 2001 From: Jan-Hendrik Willms <tleilax+studip@gmail.com> Date: Mon, 25 Sep 2023 12:42:52 +0000 Subject: [PATCH] fixes #3228 Closes #3228 Merge request studip/studip!2190 --- app/views/file/choose_destination.php | 4 ++-- app/views/file/edit.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/file/choose_destination.php b/app/views/file/choose_destination.php index fa5e73d6e4f..7247439062b 100644 --- a/app/views/file/choose_destination.php +++ b/app/views/file/choose_destination.php @@ -30,10 +30,10 @@ $options = array_filter([ <div> <? if (isset($parent_folder) && ($parent_folder->isWritable($GLOBALS['user']->id) || count($parent_folder->getSubfolders()))): ?> <div class="clickable"> - <?= Icon::create('folder-parent', Icon::ROLE_CLICKABLE)->asInput(50, ['formaction' => $controller->action_url('choose_folder/' . $parent_folder->getId()), 'to_plugin' => $options['from_plugin']]) ?> + <?= Icon::create('folder-parent', Icon::ROLE_CLICKABLE)->asInput(50, ['formaction' => $controller->action_url('choose_folder/' . $parent_folder->getId()), 'to_plugin' => $options['from_plugin'] ?? null]) ?> <button class="undecorated" - formaction="<?= $controller->action_link('choose_folder/' . $parent_folder->getId()) ?>" <? if ($options['from_plugin']): ?> name="to_plugin" value="<?= htmlReady($options['from_plugin']) ?>"<? endif; ?>> + formaction="<?= $controller->action_link('choose_folder/' . $parent_folder->getId()) ?>" <? if ($options['from_plugin']): ?> name="to_plugin" value="<?= htmlReady($options['from_plugin'] ?? null) ?>"<? endif; ?>> <?= _('Aktueller Ordner') ?> </button> </div> diff --git a/app/views/file/edit.php b/app/views/file/edit.php index 3e36abb312a..803b312e1ec 100644 --- a/app/views/file/edit.php +++ b/app/views/file/edit.php @@ -3,7 +3,7 @@ <div id="file_management_forms"> <form method="post" data-dialog class="default" - action="<?= $controller->action_link('edit/' . $file_ref->id, ['from_plugin' => $from_plugin]) ?>"> + action="<?= $controller->action_link('edit/' . $file_ref->id, ['from_plugin' => $from_plugin ?? null]) ?>"> <?= CSRFProtection::tokenTag() ?> <fieldset> -- GitLab