diff options
| author | David Siegfried <david.siegfried@uni-vechta.de> | 2025-02-27 19:18:56 +0000 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2025-02-27 19:18:56 +0000 |
| commit | 6a4f2423ce715f8c03334e113ea369ac3ee3b84a (patch) | |
| tree | 7e66c2708bd3f8772f1f6d327268245969c8c90b | |
| parent | e2039929ab5244abc152cbccfc11f4e6747a6929 (diff) | |
prevent warnings in help-tours, fixes #4667
Closes #4667
Merge request studip/studip!3478
| -rw-r--r-- | app/controllers/tour.php | 14 | ||||
| -rw-r--r-- | app/views/tour/admin_conflicts.php | 8 | ||||
| -rw-r--r-- | app/views/tour/admin_details.php | 6 | ||||
| -rw-r--r-- | app/views/tour/admin_overview.php | 4 | ||||
| -rw-r--r-- | app/views/tour/edit_step.php | 8 |
5 files changed, 20 insertions, 20 deletions
diff --git a/app/controllers/tour.php b/app/controllers/tour.php index e507c4b..cf01e10 100644 --- a/app/controllers/tour.php +++ b/app/controllers/tour.php @@ -45,7 +45,7 @@ class TourController extends AuthenticatedController ]; $this->help_admin = $GLOBALS['perm']->have_perm('root') - || $GLOBALS['user']->getAuthenticatedUser()->hasRole('Hilfe-Administrator(in)'); + || $GLOBALS['user']->getAuthenticatedUser()->hasRole('Hilfe-Administrator(in)'); } /** @@ -738,12 +738,12 @@ class TourController extends AuthenticatedController } } $this->redirect('tour/admin_details?tour_name=' . Request::get('tour_name') - . '&tour_language=' . Request::get('tour_language') - . '&tour_description=' . Request::get('tour_description') - . '&tour_type=' . Request::get('tour_type') - . '&tour_access=' . Request::get('tour_access') - . '&tour_startpage=' . Request::get('tour_startpage') - . $roles); + . '&tour_language=' . Request::get('tour_language') + . '&tour_description=' . Request::get('tour_description') + . '&tour_type=' . Request::get('tour_type') + . '&tour_access=' . Request::get('tour_access') + . '&tour_startpage=' . Request::get('tour_startpage') + . $roles); } } $this->redirect('tour/admin_details/' . $this->tour->tour_id); diff --git a/app/views/tour/admin_conflicts.php b/app/views/tour/admin_conflicts.php index 6634dc6..4860287 100644 --- a/app/views/tour/admin_conflicts.php +++ b/app/views/tour/admin_conflicts.php @@ -9,16 +9,16 @@ use Studip\LinkButton; ?> <h1><?= _('Versions-Konflikte der Touren') ?></h1> -<form action="<?= $controller->url_for('tour/admin_conflicts') ?>" id="admin_tour_form" method="post"> +<form action="<?= $controller->link_for('tour/admin_conflicts') ?>" id="admin_tour_form" method="post"> <?= CSRFProtection::tokenTag(); ?> <? if (count($conflicts) > 0) : ?> <? foreach ($conflicts as $conflict) : ?> <table class="default"> <? $keys = array_keys($conflict); ?> <colgroup> - <col width="20%"> - <col width="40%"> - <col width="40%"> + <col style="width: 20%"> + <col style="width: 40%"> + <col style="width: 40%"> </colgroup> <tbody> <tr> diff --git a/app/views/tour/admin_details.php b/app/views/tour/admin_details.php index e0a0a9e..325f9c3 100644 --- a/app/views/tour/admin_details.php +++ b/app/views/tour/admin_details.php @@ -13,12 +13,12 @@ use Studip\Button, Studip\LinkButton; <?= $delete_question ?> -<form class="default" action="<?= $controller->url_for('tour/save/' . $tour->tour_id) ?>" method="post"> +<form class="default" action="<?= $controller->link_for('tour/save/' . $tour->tour_id) ?>" method="post"> <?= CSRFProtection::tokenTag(); ?> <fieldset> <legend><?= _('Grunddaten') ?></legend> - <? if (!count($tour->steps)) : ?> + <? if (empty($tour->steps)) : ?> <label> <span class="required"> <?= _('Sprache der Tour:') ?> @@ -78,7 +78,7 @@ use Studip\Button, Studip\LinkButton; </select> </label> - <? if (!count($tour->steps)) : ?> + <? if (empty($tour->steps)) : ?> <label> <span class="required"><?= _('Startseite der Tour') ?>:</span> <input type="text" size="60" maxlength="255" name="tour_startpage" diff --git a/app/views/tour/admin_overview.php b/app/views/tour/admin_overview.php index ed68968..aabb91c 100644 --- a/app/views/tour/admin_overview.php +++ b/app/views/tour/admin_overview.php @@ -11,7 +11,7 @@ use Studip\Button; ?> <?= $delete_question ?> -<form action="<?= $controller->url_for('tour/admin_overview') ?>" id="admin_tour_form" method="post" class="default"> +<form action="<?= $controller->link_for('tour/admin_overview') ?>" id="admin_tour_form" method="post" class="default"> <input type="hidden" name="tour_filter" value="set"> <input type="hidden" name="tour_filter_term" value="<?= htmlReady($tour_searchterm) ?>"> <?= CSRFProtection::tokenTag(); ?> @@ -47,7 +47,7 @@ use Studip\Button; <th class="actions"><?= _('Aktionen') ?></th> </tr> </thead> - <? if (count($tours)) : ?> + <? if (!empty($tours)) : ?> <tbody> <? foreach ($tours as $tour_id => $tour) : ?> <tr> diff --git a/app/views/tour/edit_step.php b/app/views/tour/edit_step.php index 1995005..15d1bc1 100644 --- a/app/views/tour/edit_step.php +++ b/app/views/tour/edit_step.php @@ -13,7 +13,7 @@ use Studip\Button, Studip\LinkButton; <div id="edit_tour_step" class="edit_tour_step"> <form id="edit_tour_form" class="default" - action="<?= $controller->url_for('tour/edit_step/' . $tour_id . '/' . $step->step . '/save') ?>" + action="<?= $controller->link_for('tour/edit_step/' . $tour_id . '/' . $step->step . '/save') ?>" method="post"> <?= CSRFProtection::tokenTag(); ?> <fieldset> @@ -64,7 +64,7 @@ use Studip\Button, Studip\LinkButton; <? endif ?> </fieldset> - <? if ($step->css_selector) : ?> + <? if (isset($step->css_selector)) : ?> <fieldset> <legend><?= _('Orientierung') ?></legend> <div class="tour_step_orientation"> @@ -180,7 +180,7 @@ use Studip\Button, Studip\LinkButton; <?= Button::createAccept(_('Speichern'), 'confirm', ['data-dialog' => '']) ?> <? else: ?> <?= Button::createAccept(_('Speichern'), 'submit') ?> - <? endif; ?> + <? endif ?> <?= LinkButton::createCancel(_('Abbrechen'), $controller->url_for('tour/admin_overview'), []) ?> </footer> </form> @@ -188,7 +188,7 @@ use Studip\Button, Studip\LinkButton; <script> jQuery(function ($) { - $('input[name=step_css]').change(function () { + $('input[name=step_css]').on('change', function () { if ($('input[name=step_css]').val()) { $('.tour_step_orientation').show(); } else { |
