diff options
author | Felix Favre <gnomus@gnomus.de> | 2014-12-06 19:02:26 +0100 |
---|---|---|
committer | Felix Favre <gnomus@gnomus.de> | 2014-12-06 19:02:26 +0100 |
commit | 2f445eb90c6267a9f1055d1536838d9b3fe12f3b (patch) | |
tree | e954579afcbd6399fc8e17a4b5354f19e046e00f /includes/controller/user_angeltypes_controller.php | |
parent | 3973236f6e4cb76a20fca3b908afd526f293a850 (diff) | |
parent | 10d7fce163ff28da68b036bd4fae95040fd170a9 (diff) |
Merge branch 'master' of github.com:engelsystem/engelsystem
Diffstat (limited to 'includes/controller/user_angeltypes_controller.php')
-rw-r--r-- | includes/controller/user_angeltypes_controller.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/includes/controller/user_angeltypes_controller.php b/includes/controller/user_angeltypes_controller.php index e4c7676f..049d6211 100644 --- a/includes/controller/user_angeltypes_controller.php +++ b/includes/controller/user_angeltypes_controller.php @@ -5,14 +5,18 @@ */ function user_angeltypes_unconfirmed_hint() { global $user; + $unconfirmed_user_angeltypes = User_unconfirmed_AngelTypes($user); if ($unconfirmed_user_angeltypes === false) engelsystem_error("Unable to load user angeltypes."); if (count($unconfirmed_user_angeltypes) == 0) return ''; - if ($_REQUEST['p'] == 'angeltypes' && $_REQUEST['action'] == 'view' && $_REQUEST['angeltype_id'] == $unconfirmed_user_angeltypes[0]['angeltype_id']) - return ''; - return error(sprintf(ngettext("There is %d unconfirmed angeltype.", "There are %d unconfirmed angeltypes.", count($unconfirmed_user_angeltypes)), count($unconfirmed_user_angeltypes)) . " " . sprintf(_("The first wants to join %s."), '<a href="' . page_link_to('angeltypes') . '&action=view&angeltype_id=' . $unconfirmed_user_angeltypes[0]['angeltype_id'] . '">' . $unconfirmed_user_angeltypes[0]['name'] . '</a>')); + + $unconfirmed_links = []; + foreach ($unconfirmed_user_angeltypes as $user_angeltype) + $unconfirmed_links[] = '<a href="' . page_link_to('angeltypes') . '&action=view&angeltype_id=' . $user_angeltype['angeltype_id'] . '">' . $user_angeltype['name'] . '</a>'; + + return error(sprintf(ngettext("There is %d unconfirmed angeltype.", "There are %d unconfirmed angeltypes.", count($unconfirmed_user_angeltypes)), count($unconfirmed_user_angeltypes)) . " " . _('Angel types which need approvals:') . ' ' . join(', ', $unconfirmed_links)); } /** |