From 66f166399cd893d47423abb9537a01dde6aaff5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20H=C3=A4usler?= Date: Sat, 23 Aug 2014 15:47:06 +0200 Subject: [PATCH] better preselected angeltypes --- includes/pages/guest_login.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/pages/guest_login.php b/includes/pages/guest_login.php index 95db582f..efacaeb9 100644 --- a/includes/pages/guest_login.php +++ b/includes/pages/guest_login.php @@ -34,8 +34,11 @@ function guest_register() { $angel_types_source = sql_select("SELECT * FROM `AngelTypes` ORDER BY `name`"); $angel_types = array(); - foreach ($angel_types_source as $angel_type) + foreach ($angel_types_source as $angel_type) { $angel_types[$angel_type['id']] = $angel_type['name'] . ($angel_type['restricted'] ? " (restricted)" : ""); + if (! $angel_type['restricted']) + $selected_angel_types[] = $angel_type['id']; + } if (isset($_REQUEST['submit'])) { $ok = true;