aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorMoritz Strohm <strohm@data-quest.de>2022-09-28 14:24:20 +0000
committerMoritz Strohm <strohm@data-quest.de>2022-09-28 14:24:20 +0000
commite75c08bedd60a6674d22ce3e2ec57b5a5f1d85eb (patch)
tree2d9cf000153360bdc9e1841693406f3a3b1d58ae /app
parent1e6f3d59c1989dc0da68d3200090cb4768ab3094 (diff)
fix for BIESt #1118
Merge request studip/studip!676
Diffstat (limited to 'app')
-rw-r--r--app/controllers/admin/autoinsert.php6
-rw-r--r--app/controllers/admin/coursewizardsteps.php2
-rw-r--r--app/controllers/admin/plugin.php1
-rw-r--r--app/controllers/admin/role.php12
-rw-r--r--app/controllers/admin/user.php17
-rw-r--r--app/controllers/course/studygroup.php2
-rw-r--r--app/controllers/event_log.php2
-rw-r--r--app/controllers/help_content.php1
-rw-r--r--app/controllers/institute/members.php2
-rw-r--r--app/controllers/tour.php10
-rw-r--r--app/views/admin/autoinsert/index.php2
-rw-r--r--app/views/admin/autoinsert/manual.php2
-rw-r--r--app/views/admin/cronjobs/schedules/periodic-schedule.php4
-rw-r--r--app/views/admin/plugin/index.php7
-rw-r--r--app/views/admin/specification/_field.php4
-rw-r--r--app/views/admin/specification/edit.php4
-rw-r--r--app/views/admin/user/_results.php4
-rw-r--r--app/views/admin/user/index.php22
-rw-r--r--app/views/admission/ruleadministration/compatibility.php4
-rw-r--r--app/views/global_search/settings.php2
-rw-r--r--app/views/institute/members/_table_body.php24
-rw-r--r--app/views/institute/members/index.php6
22 files changed, 84 insertions, 56 deletions
diff --git a/app/controllers/admin/autoinsert.php b/app/controllers/admin/autoinsert.php
index 6edf3c6..fd3b7e0 100644
--- a/app/controllers/admin/autoinsert.php
+++ b/app/controllers/admin/autoinsert.php
@@ -36,6 +36,10 @@ class Admin_AutoinsertController extends AuthenticatedController
*/
public function index_action()
{
+ $this->sem_search = '';
+ $this->sem_select = '';
+ $this->seminar_search = [];
+
// search seminars
if (Request::submitted('suchen')) {
if (Request::get('sem_search')) {
@@ -142,6 +146,8 @@ class Admin_AutoinsertController extends AuthenticatedController
*/
public function manual_action()
{
+ $this->seminar_search = [];
+
PageLayout::setTitle(_('Manuelles Eintragen von Nutzergruppen in Veranstaltungen'));
if (Request::submitted('submit')) {
$filters = array_filter(Request::getArray('filter'));
diff --git a/app/controllers/admin/coursewizardsteps.php b/app/controllers/admin/coursewizardsteps.php
index 7587006..4e70fa0 100644
--- a/app/controllers/admin/coursewizardsteps.php
+++ b/app/controllers/admin/coursewizardsteps.php
@@ -52,6 +52,7 @@ class Admin_CourseWizardStepsController extends AuthenticatedController
*/
public function edit_action($id='')
{
+ $this->availableClasses = [];
if ($id) {
$title = _('Schritt bearbeiten');
$this->step = CourseWizardStepRegistry::find($id);
@@ -63,7 +64,6 @@ class Admin_CourseWizardStepsController extends AuthenticatedController
$this->step->number = 0;
$this->step->enabled = false;
- $this->availableClasses = [];
foreach (get_declared_classes() as $className) {
if (is_a($className, "CourseWizardStep", true)
&& $className !== "CourseWizardStep") {
diff --git a/app/controllers/admin/plugin.php b/app/controllers/admin/plugin.php
index 044fc50..7a87d8f 100644
--- a/app/controllers/admin/plugin.php
+++ b/app/controllers/admin/plugin.php
@@ -142,6 +142,7 @@ class Admin_PluginController extends AuthenticatedController
$this->plugin_types = $this->plugin_admin->getPluginTypes();
$this->update_info = $this->get_update_info($this->plugins);
$this->migrations = $this->plugin_admin->getMigrationInfo();
+ $this->num_updates = 0;
foreach ($this->update_info as $id => $info) {
if (isset($info['update']) && !$this->plugins[$id]['depends']) {
diff --git a/app/controllers/admin/role.php b/app/controllers/admin/role.php
index 1e99a27..f932b0d 100644
--- a/app/controllers/admin/role.php
+++ b/app/controllers/admin/role.php
@@ -152,18 +152,21 @@ class Admin_RoleController extends AuthenticatedController
return;
}
+ $this->username = Request::get('username');
+ $this->currentuser = null;
+ $this->assignedroles = [];
+ $this->all_userroles = [];
+
// user search was started
if (Request::submitted('search')) {
- $username = Request::get('username');
- if ($username == '') {
+ if ($this->username == '') {
$this->error = _('Es wurde kein Suchwort eingegeben.');
} else {
- $this->users = $this->search_user($username);
+ $this->users = $this->search_user($this->username);
if (count($this->users) === 0) {
$this->error = _('Es wurde keine Person gefunden.');
- $this->username = $username;
}
}
}
@@ -282,6 +285,7 @@ class Admin_RoleController extends AuthenticatedController
$roleid = Request::int('role', $roleid);
$this->roles = RolePersistence::getAllRoles();
+ $this->roleid = '';
if ($roleid) {
$sql = "SELECT DISTINCT Vorname,Nachname,user_id,username,perms
diff --git a/app/controllers/admin/user.php b/app/controllers/admin/user.php
index aaa59a0..cf1c806 100644
--- a/app/controllers/admin/user.php
+++ b/app/controllers/admin/user.php
@@ -69,7 +69,7 @@ class Admin_UserController extends AuthenticatedController
}
//Suchparameter und Ergebnisse vorhanden
- if (isset($_SESSION['admin']['user']) && $_SESSION['admin']['user']['results']) {
+ if (!empty($_SESSION['admin']['user']['results'])) {
$request = $_SESSION['admin']['user'];
}
@@ -81,6 +81,9 @@ class Admin_UserController extends AuthenticatedController
}
}
+ $this->request = [];
+ $this->users = [];
+
//Datafields
$this->datafields = [];
$datafields = DataField::getDataFields("user");
@@ -96,6 +99,7 @@ class Admin_UserController extends AuthenticatedController
});
//wenn suche durchgeführt
+ $search_datafields = [];
if (!empty($request)) {
//suche mit datafields
foreach ($this->datafields as $datafield) {
@@ -113,8 +117,8 @@ class Admin_UserController extends AuthenticatedController
$this->order = $this->order == 'desc' ? 'asc' : 'desc';
}
- $request['vorname'] = $request['vorname'] ?: null;
- $request['nachname'] = $request['nachname'] ?: null;
+ $request['vorname'] = $request['vorname'] ?? null;
+ $request['nachname'] = $request['nachname'] ?? null;
$request['inaktiv'] = $inaktiv;
$request['datafields'] = $search_datafields;
$request['sort'] = $this->sortby;
@@ -207,7 +211,8 @@ class Admin_UserController extends AuthenticatedController
if ($advanced
|| !empty($search_datafields)
|| (!empty($request)
- && ($request['auth_plugins'] || $request['userdomains'] || $request['degree'] || $request['institute'] || $request['studycourse'] || $request['show_only_not_lectures'] || !empty($request['roles']))
+ && (!empty($request['auth_plugins']) || !empty($request['userdomains']) || !empty($request['degree']) ||
+ !empty($request['institute']) || !empty($request['studycourse']) || !empty($request['show_only_not_lectures']) || !empty($request['roles']))
)
) {
$this->advanced = true;
@@ -1621,7 +1626,7 @@ class Admin_UserController extends AuthenticatedController
)->asDialog();
$actions->addLink(
_('Konten zusammenführen'),
- $this->url_for('admin/user/migrate/' . (($this->user && is_array($this->user)) ? $this->user['user_id'] : '')),
+ $this->url_for('admin/user/migrate/' . ((!empty($this->user) && is_array($this->user)) ? $this->user['user_id'] : '')),
Icon::create('community')
);
@@ -1641,7 +1646,7 @@ class Admin_UserController extends AuthenticatedController
);
}
- if (!is_object($this->user)) {
+ if (empty($this->user) || !is_object($this->user)) {
return;
}
diff --git a/app/controllers/course/studygroup.php b/app/controllers/course/studygroup.php
index 58032b8..b327a1a 100644
--- a/app/controllers/course/studygroup.php
+++ b/app/controllers/course/studygroup.php
@@ -21,7 +21,7 @@ class Course_StudygroupController extends AuthenticatedController
) {
// args at position zero is always the studygroup-id
- if ($args[0] && $action == 'details') {
+ if (!empty($args[0]) && $action == 'details') {
if (SeminarCategories::GetBySeminarId($args[0])->studygroup_mode == false) {
throw new Exception(_('Dieses Seminar ist keine Studiengruppe!'));
}
diff --git a/app/controllers/event_log.php b/app/controllers/event_log.php
index 9638b09..f1d19c6 100644
--- a/app/controllers/event_log.php
+++ b/app/controllers/event_log.php
@@ -42,10 +42,10 @@ class EventLogController extends AuthenticatedController
$this->search = trim(Request::get('search'));
$this->log_actions = LogAction::getUsed(true);
$this->types = $this->event_log->get_object_types();
+ $this->type = Request::option('type');
// restrict log events to object scope
if ($this->search) {
- $this->type = Request::option('type');
$objects = $this->event_log->find_objects(
$this->type,
$this->search,
diff --git a/app/controllers/help_content.php b/app/controllers/help_content.php
index a04c168..5e8faf9 100644
--- a/app/controllers/help_content.php
+++ b/app/controllers/help_content.php
@@ -43,6 +43,7 @@ class HelpContentController extends AuthenticatedController
*/
public function admin_overview_action()
{
+ $this->help_content_searchterm = '';
// initialize
PageLayout::setTitle(_('Verwalten von Hilfe-Texten'));
PageLayout::setHelpKeyword('Basis.HelpContentAdmin');
diff --git a/app/controllers/institute/members.php b/app/controllers/institute/members.php
index 29c325a..33d8eab 100644
--- a/app/controllers/institute/members.php
+++ b/app/controllers/institute/members.php
@@ -107,7 +107,7 @@ class Institute_MembersController extends AuthenticatedController
// Show lock rule information
$lockrule = LockRules::getObjectRule($this->institute->id);
- if ($this->admin_view && $lockrule->description
+ if ($this->admin_view && !empty($lockrule->description)
&& LockRules::Check($this->institute->id, 'participants')) {
PageLayout::postInfo(formatLinks($lockrule->description));
}
diff --git a/app/controllers/tour.php b/app/controllers/tour.php
index cda3ea4..54dfeff 100644
--- a/app/controllers/tour.php
+++ b/app/controllers/tour.php
@@ -180,6 +180,10 @@ class TourController extends AuthenticatedController
throw new AccessDeniedException();
}
+ $this->tour_searchterm = '';
+ $this->delete_question = '';
+ $this->filter_text = '';
+
// initialize
PageLayout::setTitle(_('Verwalten von Touren'));
PageLayout::setHelpKeyword('Basis.TourAdmin');
@@ -443,6 +447,9 @@ class TourController extends AuthenticatedController
$this->render_nothing();
return;
}
+
+ $this->force_route = '';
+
// Output as dialog (Ajax-Request) or as Stud.IP page?
PageLayout::setTitle(_('Schritt bearbeiten'));
// save step position
@@ -613,6 +620,9 @@ class TourController extends AuthenticatedController
if (!$this->help_admin) {
throw new AccessDeniedException();
}
+
+ $this->delete_question = '';
+
// initialize
PageLayout::setTitle(_('Verwalten von Touren'));
PageLayout::setHelpKeyword('Basis.TourAdmin');
diff --git a/app/views/admin/autoinsert/index.php b/app/views/admin/autoinsert/index.php
index 7749329..6f863c5 100644
--- a/app/views/admin/autoinsert/index.php
+++ b/app/views/admin/autoinsert/index.php
@@ -12,7 +12,7 @@ use Studip\Button, Studip\LinkButton;
<? endif; ?>
<form class="default" action="<?= $controller->index() ?>" method="post">
<?= CSRFProtection::tokenTag() ?>
- <?= $this->render_partial("admin/autoinsert/_search.php", ['semester_data' => $semester_data]) ?>
+ <?= $this->render_partial('admin/autoinsert/_search.php') ?>
</form>
<? if (is_array($seminar_search) && count($seminar_search) > 0): ?>
diff --git a/app/views/admin/autoinsert/manual.php b/app/views/admin/autoinsert/manual.php
index 612f561..e081a10 100644
--- a/app/views/admin/autoinsert/manual.php
+++ b/app/views/admin/autoinsert/manual.php
@@ -10,7 +10,7 @@
<form class="default" action="<?= $controller->manual() ?>" method="post">
<?= CSRFProtection::tokenTag() ?>
- <?= $this->render_partial("admin/autoinsert/_search.php", compact('semester_data', 'sem_search', 'sem_select')) ?>
+ <?= $this->render_partial('admin/autoinsert/_search.php', compact('sem_search', 'sem_select')) ?>
</form>
diff --git a/app/views/admin/cronjobs/schedules/periodic-schedule.php b/app/views/admin/cronjobs/schedules/periodic-schedule.php
index b482efd..021002a 100644
--- a/app/views/admin/cronjobs/schedules/periodic-schedule.php
+++ b/app/views/admin/cronjobs/schedules/periodic-schedule.php
@@ -9,7 +9,7 @@ $cronify = function ($n) {
return $n;
}
?>
-<? if ($display === 'table-cells'): ?>
+<? if (isset($display) && $display === 'table-cells'): ?>
<td><?= $cronify($minute) ?></td>
<td><?= $cronify($hour) ?></td>
<td><?= $cronify($day) ?></td>
@@ -38,4 +38,4 @@ $cronify = function ($n) {
<?= $cronify($day_of_week) ?>
</li>
</ul>
-<? endif ?> \ No newline at end of file
+<? endif ?>
diff --git a/app/views/admin/plugin/index.php b/app/views/admin/plugin/index.php
index 859083b..26da74f 100644
--- a/app/views/admin/plugin/index.php
+++ b/app/views/admin/plugin/index.php
@@ -65,7 +65,7 @@ use Studip\Button, Studip\LinkButton;
<?= join(', ', $plugin['type']) ?>
</td>
<td <? if (!$plugin['enabled']) echo 'class="quiet"'; ?>>
- <?= htmlReady($update_info[$pluginid]['version']) ?>
+ <?= htmlReady($update_info[$pluginid]['version'] ?? '') ?>
<? if ($plugin['automatic_update_url']): ?>
<?= Icon::create('install', Icon::ROLE_STATUS_RED)->asImg([
'title' => _('Automatische Updates sind eingerichtet'),
@@ -75,8 +75,9 @@ use Studip\Button, Studip\LinkButton;
</td>
<td <? if (!$plugin['enabled']) echo 'class="quiet"'; ?>>
<? if (!$plugin['depends']) : ?>
- <?= htmlReady($migrations[$pluginid]['schema_version']) ?>
- <? if ($migrations[$pluginid]['schema_version'] < $migrations[$pluginid]['migration_top_version']): ?>
+ <?= htmlReady($migrations[$pluginid]['schema_version'] ?? '') ?>
+ <? if (!empty($migrations[$pluginid]['schema_version']) && !empty($migrations[$pluginid]['migration_top_version'])
+ && ($migrations[$pluginid]['schema_version'] < $migrations[$pluginid]['migration_top_version'])): ?>
<a href="<?= $controller->url_for('admin/plugin/migrate/' . $pluginid) ?>"
title="<?= sprintf(_('Update auf Version %d verfügbar'), $migrations[$pluginid]['migration_top_version']) ?>">
<?= Icon::create('plugin', Icon::ROLE_STATUS_RED) ?>
diff --git a/app/views/admin/specification/_field.php b/app/views/admin/specification/_field.php
index 30a01ff..6f089ea 100644
--- a/app/views/admin/specification/_field.php
+++ b/app/views/admin/specification/_field.php
@@ -4,7 +4,7 @@ $order = Request::getArray('order');
?>
<section>
- <? if ($required) : ?>
+ <? if (!empty($required)) : ?>
<span class="required">
<?= htmlReady($name) ?>
</span>
@@ -28,7 +28,7 @@ $order = Request::getArray('order');
<?= _('Aktivieren') ?>
</label>
<label class="col-1">
- <? if ($institution) : ?>
+ <? if (!empty($institution)) : ?>
<?= htmlReady($institution->name)?>
<? endif; ?>
</label>
diff --git a/app/views/admin/specification/edit.php b/app/views/admin/specification/edit.php
index de868a4..e803171 100644
--- a/app/views/admin/specification/edit.php
+++ b/app/views/admin/specification/edit.php
@@ -24,13 +24,13 @@ use Studip\Button, Studip\LinkButton;
<span class="required">
<?= _('Name der Regel:') ?>
</span>
- <input type="text" name="rulename" value="<?= htmlReady(Request::get('rulename', $rule['name'])) ?>"
+ <input type="text" name="rulename" value="<?= htmlReady(Request::get('rulename', $rule ? $rule['name'] : '')) ?>"
required="required">
</label>
<label>
<?= _('Beschreibung') ?>
<textarea cols="60" rows="5"
- name="description"><?= htmlReady(Request::get('description', $rule['description'])) ?></textarea>
+ name="description"><?= htmlReady(Request::get('description', $rule ? $rule['description'] : '')) ?></textarea>
</label>
</fieldset>
<? if (count($entries_semdata) > 0) : ?>
diff --git a/app/views/admin/user/_results.php b/app/views/admin/user/_results.php
index 1406c2a..695e30e 100644
--- a/app/views/admin/user/_results.php
+++ b/app/views/admin/user/_results.php
@@ -96,7 +96,7 @@
<td><?= htmlReady($user->nachname) ?></td>
<td><?= htmlReady($user->email) ?></td>
<td>
- <? if ($user->online->last_lifesign) :
+ <? if (!empty($user->online->last_lifesign)) :
$inactive = time() - $user->online->last_lifesign;
if ($inactive < 3600 * 24) {
$inactive = gmdate('H:i:s', $inactive);
@@ -188,7 +188,7 @@
}
- if (Privacy::isVisible($user_id)) {
+ if (Privacy::isVisible($user->id)) {
$actionMenu->addLink(
$controller->url_for("privacy/landing/{$user->id}"),
_('Anzeige Personendaten'),
diff --git a/app/views/admin/user/index.php b/app/views/admin/user/index.php
index 50a69c4..0eb4540 100644
--- a/app/views/admin/user/index.php
+++ b/app/views/admin/user/index.php
@@ -13,22 +13,22 @@ use Studip\Button, Studip\LinkButton;
<label class="col-3">
<?= _('Benutzername') ?>
- <input name="username" type="text" value="<?= htmlReady($request['username']) ?>">
+ <input name="username" type="text" value="<?= htmlReady($request['username'] ?? '') ?>">
</label>
<label class="col-3">
<?= _('E-Mail') ?>
- <input name="email" type="text" value="<?= htmlReady($request['email']) ?>">
+ <input name="email" type="text" value="<?= htmlReady($request['email'] ?? '') ?>">
</label>
<label class="col-3">
<?= _('Vorname') ?>
- <input name="vorname" type="text" value="<?= htmlReady($request['vorname']) ?>">
+ <input name="vorname" type="text" value="<?= htmlReady($request['vorname'] ?? '') ?>">
</label>
<label class="col-3">
<?= _('Nachname') ?>
- <input name="nachname" type="text" value="<?= htmlReady($request['nachname']) ?>">
+ <input name="nachname" type="text" value="<?= htmlReady($request['nachname'] ?? '') ?>">
</label>
<label class="col-2">
@@ -36,7 +36,7 @@ use Studip\Button, Studip\LinkButton;
<select name="perm">
<? foreach(words('alle user autor tutor dozent admin root') as $one): ?>
- <option value="<?= $one ?>" <?= ($request['perm'] === $one) ? 'selected' : '' ?>>
+ <option value="<?= $one ?>" <?= (!empty($request['perm']) && $request['perm'] === $one) ? 'selected' : '' ?>>
<?= ($one === 'alle') ? _('alle') : $one ?>
</option>
<? endforeach; ?>
@@ -49,20 +49,20 @@ use Studip\Button, Studip\LinkButton;
<div class="hgroup">
<select name="inaktiv" class="size-s">
<? foreach(['<=' => '>=', '=' => '=', '>' => '<', 'nie' =>_('nie')] as $i => $one): ?>
- <option value="<?= htmlready($i) ?>" <?= ($request['inaktiv'][0] === $i) ? 'selected' : '' ?>>
+ <option value="<?= htmlready($i) ?>" <?= (!empty($request['inaktiv'][0]) && $request['inaktiv'][0] === $i) ? 'selected' : '' ?>>
<?= htmlReady($one) ?>
</option>
<? endforeach; ?>
</select>
<input name="inaktiv_tage" type="number" id="inactive"
- value="<?= htmlReady($request['inaktiv'][1]) ?>">
+ value="<?= htmlReady($request['inaktiv'][1] ?? '') ?>">
<?= _('Tage') ?>
</div>
</label>
<label class="col-2" style="padding-top: 1.8em;">
- <input type="checkbox" name="locked" value="1" <?= ($request['locked']) ? 'checked' : '' ?>>
+ <input type="checkbox" name="locked" value="1" <?= !empty($request['locked']) ? 'checked' : '' ?>>
<?= _('nur gesperrt') ?>
</label>
</fieldset>
@@ -123,7 +123,7 @@ use Studip\Button, Studip\LinkButton;
<? endforeach ?>
</select>
</label>
-
+
<label class="col-3">
<?= _('Fachsemester') ?>
<select name="fachsem">
@@ -180,7 +180,7 @@ use Studip\Button, Studip\LinkButton;
<? endforeach ?>
</select>
<? else : ?>
- <input type="text" name="<?= $datafield->id ?>" value="<?= htmlReady($request[$datafield->id]) ?>">
+ <input type="text" name="<?= htmlReady($datafield->id) ?>" value="<?= htmlReady($request[$datafield->id] ?? '') ?>">
<? endif ?>
</label>
<? endforeach; ?>
@@ -199,7 +199,7 @@ use Studip\Button, Studip\LinkButton;
<? endif?>
<label>
<input type="checkbox" name="show_only_not_lectures" value="1"
- <? if ($request['show_only_not_lectures']) echo 'checked'; ?>>
+ <?= (!empty($request['show_only_not_lectures'])) ? 'checked' : '' ?>>
<?= _('Nur Personen anzeigen, die in keiner Veranstaltung Lehrende sind')?>
</label>
</fieldset>
diff --git a/app/views/admission/ruleadministration/compatibility.php b/app/views/admission/ruleadministration/compatibility.php
index 2dc8aa4..d272bd0 100644
--- a/app/views/admission/ruleadministration/compatibility.php
+++ b/app/views/admission/ruleadministration/compatibility.php
@@ -36,7 +36,7 @@
<td>
<input type="checkbox" name="compat[<?= $class ?>][]"
value="<?= $compat_class ?>"<?=
- in_array($compat_class, $matrix[$class] ?: []) ? ' checked' : ''?>>
+ in_array($compat_class, $matrix[$class] ?? []) ? ' checked' : ''?>>
</td>
<?php endforeach ?>
</tr>
@@ -51,5 +51,5 @@
</tr>
</tfoot>
</table>
-
+
</form>
diff --git a/app/views/global_search/settings.php b/app/views/global_search/settings.php
index e4e1e0e..bf1764d 100644
--- a/app/views/global_search/settings.php
+++ b/app/views/global_search/settings.php
@@ -65,7 +65,7 @@
<td>
<input type="checkbox" id="active[<?= htmlReady(get_class($module)) ?>]"
name="modules[<?= htmlReady(get_class($module)) ?>][active]" value="1"
- <?= $config[get_class($module)]['active'] && !$resourcesInactive ? ' checked' : '' ?>
+ <?= !empty($config[get_class($module)]['active']) && !$resourcesInactive ? ' checked' : '' ?>
<?= $resourcesInactive ? ' disabled' : '' ?>>
</td>
<td>
diff --git a/app/views/institute/members/_table_body.php b/app/views/institute/members/_table_body.php
index 432125d..8bce6d2 100644
--- a/app/views/institute/members/_table_body.php
+++ b/app/views/institute/members/_table_body.php
@@ -4,7 +4,7 @@
<th colspan="<?= 1 + count($structure) - ($structure['actions'] ? 1 : 0) ?>">
<?= htmlReady($th_title) ?>
</th>
- <? if ($structure['actions']): ?>
+ <? if (!empty($structure['actions'])): ?>
<th class="actions">
<?= ActionMenu::get()
->setContext($th_title)
@@ -36,7 +36,7 @@
<? foreach ($members as $member):
$default_entries = DataFieldEntry::getDataFieldEntries([$member->user_id, $institute->id]);
- if ($group) {
+ if (!empty($group)) {
$role_entries = DataFieldEntry::getDataFieldEntries([$member->user_id, $group->id]);
}
?>
@@ -57,25 +57,25 @@
</a>
<? endif; ?>
</td>
- <? if ($structure['status']): ?>
+ <? if (!empty($structure['status'])): ?>
<td><?= htmlReady($member->inst_perms) ?></td>
<? endif; ?>
- <? if ($structure['statusgruppe']): ?>
+ <? if (!empty($structure['statusgruppe'])): ?>
<td></td>
<? endif; ?>
- <? if ($structure['raum']): ?>
+ <? if (!empty($structure['raum'])): ?>
<td><?= htmlReady($member->raum) ?></td>
<? endif; ?>
- <? if ($structure['sprechzeiten']): ?>
+ <? if (!empty($structure['sprechzeiten'])): ?>
<td><?= htmlReady($member->sprechzeiten) ?></td>
<? endif; ?>
- <? if ($structure['telefon']): ?>
+ <? if (!empty($structure['telefon'])): ?>
<td><?= htmlReady($member->Telefon) ?></td>
<? endif; ?>
- <? if ($structure['email']): ?>
+ <? if (!empty($structure['email'])): ?>
<td><?= htmlReady(get_visible_email($member->user_id)) ?></td>
<? endif; ?>
- <? if ($structure['homepage']): ?>
+ <? if (!empty($structure['homepage'])): ?>
<td><?= htmlReady($member->user_info->Home) ?></td>
<? endif; ?>
<? foreach (array_filter($datafields_list, function ($e) use ($structure) { return isset($structure[$e->getId()]); }) as $entry): ?>
@@ -87,7 +87,7 @@
<? endif; ?>
</td>
<? endforeach; ?>
- <? if ($structure['actions']): ?>
+ <? if (!empty($structure['actions'])): ?>
<td class="actions">
<?= ActionMenu::get()
->setContext($member->user)
@@ -120,7 +120,7 @@
</td>
<? endif; ?>
</tr>
-<? if ($structure['statusgruppe']): ?>
+<? if (!empty($structure['statusgruppe'])): ?>
<?
$my_groups = $groups->filter(function ($group) use ($member) {
return $group->isMember($member->user_id);
@@ -148,7 +148,7 @@
<? endif; ?>
</td>
<? endforeach; ?>
- <? if ($structure['actions']): ?>
+ <? if (!empty($structure['actions'])): ?>
<td class="actions">
<?= ActionMenu::get()
->conditionAll($admin_view && !LockRules::Check($institute->id, 'participants'))
diff --git a/app/views/institute/members/index.php b/app/views/institute/members/index.php
index 17dc602..25cf0aa 100644
--- a/app/views/institute/members/index.php
+++ b/app/views/institute/members/index.php
@@ -5,15 +5,15 @@
<col width="32">
<? foreach ($structure as $key => $field): ?>
<? if ($key !== 'statusgruppe'): ?>
- <col <? if ($field['width']): ?> width="<?= $field['width'] ?>"<? endif; ?>>
+ <col <? if (!empty($field['width'])): ?> width="<?= htmlReady($field['width']) ?>"<? endif; ?>>
<? endif; ?>
<? endforeach; ?>
</colgroup>
<thead>
<tr>
<? foreach ($structure as $key => $field): ?>
- <th <? if ($key === 'actions') echo 'class="actions"'; ?> <? if ($field['colspan']): ?>colspan="<?= $field['colspan'] ?>"<? endif; ?>>
- <? if ($field['link']): ?>
+ <th <? if ($key === 'actions') echo 'class="actions"'; ?> <? if (!empty($field['colspan'])): ?>colspan="<?= $field['colspan'] ?>"<? endif; ?>>
+ <? if (!empty($field['link'])): ?>
<a href="<?= URLHelper::getLink($field['link']) ?>">
<?= htmlReady($field['name']) ?>
</a>