summaryrefslogtreecommitdiff
path: root/includes/pages/admin_rooms.php
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2017-08-29 23:06:46 +0200
committerIgor Scheller <igor.scheller@igorshp.de>2017-08-29 23:16:41 +0200
commitd0074cf0069322fe175fb385b91c974fc2771547 (patch)
tree713fcb1f426c8a693938e3c8bbfc685e57f79e69 /includes/pages/admin_rooms.php
parent50da458d8907cc7c05938565faa80b271bbf9b3d (diff)
parent581b81f1b25dc6b6f0a3b34810c293738fd40217 (diff)
Merge remote-tracking branch 'engelsystem/feature-igel-rewrite'
# Conflicts: # includes/controller/angeltypes_controller.php # includes/pages/admin_groups.php # includes/pages/user_settings.php # includes/sys_page.php # src/Exceptions/Handler.php # src/Http/Request.php
Diffstat (limited to 'includes/pages/admin_rooms.php')
-rw-r--r--includes/pages/admin_rooms.php15
1 files changed, 4 insertions, 11 deletions
diff --git a/includes/pages/admin_rooms.php b/includes/pages/admin_rooms.php
index 457114a0..9e153bf1 100644
--- a/includes/pages/admin_rooms.php
+++ b/includes/pages/admin_rooms.php
@@ -22,8 +22,8 @@ function admin_rooms()
foreach ($rooms_source as $room) {
$rooms[] = [
'name' => Room_name_render($room),
- 'from_pentabarf' => $room['FromPentabarf'] == 'Y' ? '&#10003;' : '',
- 'public' => $room['show'] == 'Y' ? '&#10003;' : '',
+ 'from_pentabarf' => glyph_bool($room['FromPentabarf'] == 'Y'),
+ 'public' => glyph_bool($room['show'] == 'Y'),
'actions' => table_buttons([
button(page_link_to('admin_rooms', ['show' => 'edit', 'id' => $room['RID']]), _('edit'), 'btn-xs'),
button(page_link_to('admin_rooms', ['show' => 'delete', 'id' => $room['RID']]), _('delete'), 'btn-xs')
@@ -50,9 +50,6 @@ function admin_rooms()
if (test_request_int('id')) {
$room = Room($request->input('id'), false);
- if ($room === false) {
- engelsystem_error('Unable to load room.');
- }
if ($room == null) {
redirect(page_link_to('admin_rooms'));
}
@@ -150,9 +147,7 @@ function admin_rooms()
);
} else {
$room_id = Room_create($name, $from_pentabarf, $public, $number);
- if ($room_id === false) {
- engelsystem_error('Unable to create room.');
- }
+
engelsystem_log(
'Room created: ' . $name
. ', pentabarf import: '
@@ -214,9 +209,7 @@ function admin_rooms()
]);
} elseif ($request->input('show') == 'delete') {
if ($request->has('ack')) {
- if (!Room_delete($room_id)) {
- engelsystem_error('Unable to delete room.');
- }
+ Room_delete($room_id);
engelsystem_log('Room deleted: ' . $name);
success(sprintf(_('Room %s deleted.'), $name));