Skip to content
Snippets Groups Projects
Commit ec318155 authored by David Siegfried's avatar David Siegfried Committed by Jan-Hendrik Willms
Browse files

fixes #2380

Closes #2380

Merge request studip/studip!1572
parent 01b159dc
No related branches found
No related tags found
No related merge requests found
......@@ -57,7 +57,10 @@ class BlubberController extends AuthenticatedController
);
}
if (!Avatar::getAvatar($GLOBALS['user']->id)->is_customized() && !$_SESSION['already_asked_for_avatar']) {
if (
empty($_SESSION['already_asked_for_avatar'])
&& !Avatar::getAvatar($GLOBALS['user']->id)->is_customized()
) {
$_SESSION['already_asked_for_avatar'] = true;
PageLayout::postInfo(sprintf(
_('Wollen Sie ein Avatar-Bild nutzen? %sLaden Sie jetzt ein Bild hoch%s.'),
......
......@@ -52,7 +52,7 @@
<footer data-dialog-button>
<?= Studip\Button::createAccept(_('Speichern'), 'submit') ?>
<? if ($first_entry): ?>
<? if (!empty($first_entry)): ?>
<?= Studip\LinkButton::createCancel(_('Abbrechen'), URLHelper::getLink('seminar_main.php')) ?>
<? else: ?>
<?= Studip\LinkButton::createCancel(_('Abbrechen'), $controller->url_for('course/scm/' . $scm->id)) ?>
......
......@@ -11,7 +11,7 @@ if ($file->isDownloadable($GLOBALS['user']->id)) {
<?= !empty($table_id) ? 'id="' . htmlReady("fileref_{$table_id}_{$file->getId()}") . '"' : '' ?>
role="row"
data-permissions="<?= implode($permissions) ?>">
<? if ($show_bulk_checkboxes) : ?>
<? if (!empty($show_bulk_checkboxes)) : ?>
<td>
<? if ($file->isDownloadable($GLOBALS['user']->id)) : ?>
<input type="checkbox"
......
......@@ -305,7 +305,11 @@ class OpenGraphURL extends SimpleORMap
}
}
}
if ($_SERVER['HTTPS'] === 'on' && count($secure_media) > 0) {
if (
isset($_SERVER['HTTPS'])
&& $_SERVER['HTTPS'] === 'on'
&& count($secure_media) > 0
) {
foreach ($secure_media as $index => $url) {
$files[] = [$url, $media_types[$index]];
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment