aboutsummaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2024-05-30 06:57:51 +0000
committerJan-Hendrik Willms <tleilax+studip@gmail.com>2024-05-30 06:57:51 +0000
commitcb11393661f5cdf9a1ddacb8cd9602de70f5b8f9 (patch)
treea1d34239ca3973ebb9f3b0797d3a8841f0fdec48 /app/views
parentb506b133d371742ef23b3a22cc1c6bb20c860d40 (diff)
fixes #4221issue-4232
Closes #4221 Merge request studip/studip!3064
Diffstat (limited to 'app/views')
-rw-r--r--app/views/activityfeed/configuration.php2
-rw-r--r--app/views/admin/autoinsert/manual.php6
-rw-r--r--app/views/admin/cronjobs/schedules/index.php2
-rw-r--r--app/views/admin/user/edit.php4
-rw-r--r--app/views/file/choose_destination.php2
5 files changed, 8 insertions, 8 deletions
diff --git a/app/views/activityfeed/configuration.php b/app/views/activityfeed/configuration.php
index ceb87eb..9161db0 100644
--- a/app/views/activityfeed/configuration.php
+++ b/app/views/activityfeed/configuration.php
@@ -15,7 +15,7 @@
<? foreach ($provider as $prv_id => $prv_name) : ?>
<label>
<input type="checkbox" name="provider[<?= $context ?>][]" value="<?= htmlReady($prv_id) ?>"
- <?= empty($config) || (is_array($config[$context]) && in_array($prv_id, $config[$context])) ? 'checked' : ''?>>
+ <?= empty($config) || (isset($config[$context]) && is_array($config[$context]) && in_array($prv_id, $config[$context])) ? 'checked' : ''?>>
<?= htmlReady($prv_name) ?>
</label>
<? endforeach ?>
diff --git a/app/views/admin/autoinsert/manual.php b/app/views/admin/autoinsert/manual.php
index dd0f834..a4f5f5e 100644
--- a/app/views/admin/autoinsert/manual.php
+++ b/app/views/admin/autoinsert/manual.php
@@ -114,14 +114,14 @@
<? foreach ($values[$type] as $key => $value): ?>
<? if (is_array($value)): ?>
<option value="<?= $key ?>"
- class="nested-item-header" <?= in_array($key, (array)@$filter[$type]) ? 'selected="selected"' : '' ?>><?= htmlReady($value['name']) ?></option>
+ class="nested-item-header" <?= in_array($key, $filter[$type] ?? []) ? 'selected' : '' ?>><?= htmlReady($value['name']) ?></option>
<? foreach ($value['values'] as $k => $v): ?>
<option value="<?= $k ?>"
- class="nested-item" <?= in_array($k, (array)@$filter[$type]) ? 'selected="selected"' : '' ?>><?= htmlReady($v) ?></option>
+ class="nested-item" <?= in_array($k, $filter[$type] ?? []) ? 'selected' : '' ?>><?= htmlReady($v) ?></option>
<? endforeach; ?>
<? else: ?>
<option
- value="<?= $key ?>" <?= in_array($key, (array)@$filter[$type]) ? 'selected="selected"' : '' ?>><?= htmlReady($value) ?></option>
+ value="<?= $key ?>" <?= in_array($key, $filter[$type] ?? []) ? 'selected' : '' ?>><?= htmlReady($value) ?></option>
<? endif ?>
<? endforeach; ?>
</select>
diff --git a/app/views/admin/cronjobs/schedules/index.php b/app/views/admin/cronjobs/schedules/index.php
index f4b0b13..79a65be 100644
--- a/app/views/admin/cronjobs/schedules/index.php
+++ b/app/views/admin/cronjobs/schedules/index.php
@@ -23,7 +23,7 @@ use Studip\Button, Studip\LinkButton;
<select name="filter[task_id]" id="task_id" class="submit-upon-select">
<option value=""><?= _('Alle Cronjobs anzeigen') ?></option>
<? foreach ($tasks as $task): ?>
- <option value="<?= $task->task_id ?>" <? if ($filter['task_id'] === $task->task_id) echo 'selected'; ?>>
+ <option value="<?= $task->task_id ?>" <? if (isset($filter['task_id']) && $filter['task_id'] === $task->task_id) echo 'selected'; ?>>
<?= htmlReady($task->name) ?>
</option>
<? endforeach; ?>
diff --git a/app/views/admin/user/edit.php b/app/views/admin/user/edit.php
index c92efe6..47596a9 100644
--- a/app/views/admin/user/edit.php
+++ b/app/views/admin/user/edit.php
@@ -344,7 +344,7 @@ use Studip\Button, Studip\LinkButton;
<br>
- <? if ($user->online->last_lifesign): ?>
+ <? if (!empty($user->online->last_lifesign)): ?>
<abbr title="<?= strftime('%x %X', $user->online->last_lifesign) ?>">
<?= reltime($user->online->last_lifesign, true, 2) ?>
</abbr>
@@ -434,7 +434,7 @@ use Studip\Button, Studip\LinkButton;
<?= sprintf(
'%s, %s, %s. %s',
htmlReady($usc->studycourse->name),
- htmlReady($usc->degree->name),
+ htmlReady($usc->degree->name ?? _('Unbekannt')),
htmlReady($usc->semester),
_('Fachsemester')
) ?>
diff --git a/app/views/file/choose_destination.php b/app/views/file/choose_destination.php
index 9a39883..c71f072 100644
--- a/app/views/file/choose_destination.php
+++ b/app/views/file/choose_destination.php
@@ -33,7 +33,7 @@ $options = array_filter([
<?= 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'] ?? null) ?>"<? endif; ?>
+ formaction="<?= $controller->action_link('choose_folder/' . $parent_folder->getId()) ?>" <? if (!empty($options['from_plugin'])): ?> name="to_plugin" value="<?= htmlReady($options['from_plugin']) ?>"<? endif; ?>
data-dialog="size=medium">
<?= _('Aktueller Ordner') ?>
</button>