aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Noack <noack@data-quest.de>2024-07-17 19:30:31 +0000
committerDavid Siegfried <david.siegfried@uni-vechta.de>2024-07-17 19:30:31 +0000
commitfde40a591c76846ca291d587bcbaf38d6e4a540b (patch)
tree3ce31a1360699340371b7d05f594698bb6c2f508
parentf84b61239fb1815d3830b7d0d3c64fa5f6fc08e3 (diff)
Resolve "PHP8 Warning bei Export von Ablaufplan"
Closes #4399 Merge request studip/studip!3213
-rw-r--r--app/views/course/dates/export.php21
-rw-r--r--lib/raumzeit/Issue.php6
2 files changed, 15 insertions, 12 deletions
diff --git a/app/views/course/dates/export.php b/app/views/course/dates/export.php
index 7a8b70d..651c407 100644
--- a/app/views/course/dates/export.php
+++ b/app/views/course/dates/export.php
@@ -19,18 +19,21 @@
<?
$all_semester = Semester::findAllVisible(false);
+ $grenze = 0;
foreach ($dates as $date) :
if ( ($grenze == 0) || ($grenze < $date['start']) ) {
foreach ($all_semester as $zwsem) {
- if ( ($zwsem['beginn'] < $date['start']) && ($zwsem['ende'] > $date['start']) ) {
- $grenze = $zwsem['ende'];
- ?>
- <tr>
- <td colspan="5">
- <h3><?= htmlReady($zwsem['name']) ?></h3>
- </td>
- </tr>
- <?
+ if (!empty($zwsem['beginn'])) {
+ if ( ($zwsem['beginn'] < $date['start']) && ($zwsem['ende'] > $date['start']) ) {
+ $grenze = $zwsem['ende'];
+ ?>
+ <tr>
+ <td colspan="5">
+ <h3><?= htmlReady($zwsem['name']) ?></h3>
+ </td>
+ </tr>
+ <?
+ }
}
}
}
diff --git a/lib/raumzeit/Issue.php b/lib/raumzeit/Issue.php
index eeb38b3..96222a5 100644
--- a/lib/raumzeit/Issue.php
+++ b/lib/raumzeit/Issue.php
@@ -62,10 +62,10 @@ class Issue {
function __construct($data = []) {
global $user;
- if ($data['issue_id']) {
+ if (!empty($data['issue_id'])) {
$this->issue_id = $data['issue_id'];
$this->restore();
- } else if ($data['seminar_id']) {
+ } else if (!empty($data['seminar_id'])) {
$this->issue_id = md5(uniqid('Issue'));
$this->seminar_id = $data['seminar_id'];
$this->mkdate = time();
@@ -190,7 +190,7 @@ class Issue {
$this->mkdate = $data['mkdate'];
$this->chdate = $data['chdate'];
$this->priority = $data['priority'];
- $this->file = ($data['range_id'] == '') ? FALSE : TRUE;
+ $this->file = !empty($data['range_id']);
if ($this->file) {
$this->folder_id = $data['folder_id'];
}