summaryrefslogtreecommitdiff
path: root/includes/view
diff options
context:
space:
mode:
Diffstat (limited to 'includes/view')
-rw-r--r--includes/view/AngelTypes_view.php4
-rw-r--r--includes/view/User_view.php34
2 files changed, 10 insertions, 28 deletions
diff --git a/includes/view/AngelTypes_view.php b/includes/view/AngelTypes_view.php
index be866c9b..bd258d3a 100644
--- a/includes/view/AngelTypes_view.php
+++ b/includes/view/AngelTypes_view.php
@@ -443,14 +443,12 @@ function AngelTypes_about_view_angeltype($angeltype)
*/
function AngelTypes_about_view($angeltypes, $user_logged_in)
{
- global $faq_url;
-
$content = [
buttons([
!$user_logged_in ? button(page_link_to('register'), register_title()) : '',
!$user_logged_in ? button(page_link_to('login'), login_title()) : '',
$user_logged_in ? button(page_link_to('angeltypes'), angeltypes_title(), 'back') : '',
- button($faq_url, _('FAQ'), 'btn-primary')
+ button(config('faq_url'), _('FAQ'), 'btn-primary')
]),
'<p>' . _('Here is the list of teams and their tasks. If you have questions, read the FAQ.') . '</p>',
'<hr />'
diff --git a/includes/view/User_view.php b/includes/view/User_view.php
index 50c54f5a..932614a7 100644
--- a/includes/view/User_view.php
+++ b/includes/view/User_view.php
@@ -1,25 +1,6 @@
<?php
/**
- * Available T-Shirt sizes
- */
-$tshirt_sizes = [
- '' => _('Please select...'),
- 'S' => 'S',
- 'M' => 'M',
- 'L' => 'L',
- 'XL' => 'XL',
- '2XL' => '2XL',
- '3XL' => '3XL',
- '4XL' => '4XL',
- '5XL' => '5XL',
- 'S-G' => 'S Girl',
- 'M-G' => 'M Girl',
- 'L-G' => 'L Girl',
- 'XL-G' => 'XL Girl'
-];
-
-/**
* Renders user settings page
*
* @param array $user_source The user
@@ -335,7 +316,7 @@ function User_view_shiftentries($needed_angel_type)
*/
function User_view_myshift($shift, $user_source, $its_me)
{
- global $last_unsubscribe, $privileges;
+ global $privileges;
$shift_info = '<a href="' . shift_link($shift) . '">' . $shift['name'] . '</a>';
if ($shift['title']) {
@@ -371,7 +352,10 @@ function User_view_myshift($shift, $user_source, $its_me)
'btn-xs'
);
}
- if (($shift['start'] > time() + $last_unsubscribe * 3600) || in_array('user_shifts_admin', $privileges)) {
+ if (
+ ($shift['start'] > time() + config('last_unsubscribe') * 3600)
+ || in_array('user_shifts_admin', $privileges)
+ ) {
$myshift['actions'][] = button(
page_link_to('user_myshifts') . ((!$its_me) ? '&id=' . $user_source['UID'] : '') . '&cancel=' . $shift['id'],
glyph('trash') . _('sign off'),
@@ -646,12 +630,12 @@ function render_user_departure_date_hint()
*/
function render_user_freeloader_hint()
{
- global $user, $max_freeloadable_shifts;
+ global $user;
if (User_is_freeloader($user)) {
return sprintf(
_('You freeloaded at least %s shifts. Shift signup is locked. Please go to heavens desk to be unlocked again.'),
- $max_freeloadable_shifts
+ config('max_freeloadable_shifts')
);
}
@@ -679,9 +663,9 @@ function render_user_arrived_hint()
*/
function render_user_tshirt_hint()
{
- global $enable_tshirt_size, $user;
+ global $user;
- if ($enable_tshirt_size && $user['Size'] == '') {
+ if (config('enable_tshirt_size') && $user['Size'] == '') {
return _('You need to specify a tshirt size in your settings!');
}