summaryrefslogtreecommitdiff
path: root/includes/pages
diff options
context:
space:
mode:
Diffstat (limited to 'includes/pages')
-rw-r--r--includes/pages/admin_active.php10
-rw-r--r--includes/pages/admin_arrive.php4
-rw-r--r--includes/pages/admin_questions.php6
-rw-r--r--includes/pages/admin_user.php4
-rw-r--r--includes/pages/guest_login.php12
-rw-r--r--includes/pages/user_myshifts.php2
-rw-r--r--includes/pages/user_news.php2
7 files changed, 21 insertions, 19 deletions
diff --git a/includes/pages/admin_active.php b/includes/pages/admin_active.php
index c2f36693..508f3d81 100644
--- a/includes/pages/admin_active.php
+++ b/includes/pages/admin_active.php
@@ -86,7 +86,7 @@ function admin_active()
foreach ($users as $usr) {
$usr->state->active = true;
$usr->state->save();
- $user_nicks[] = User_Nick_render($usr);
+ $user_nicks[] = User_Nick_render($usr, true);
}
State::whereForceActive(true)->update(['active' => true]);
@@ -108,7 +108,7 @@ function admin_active()
if ($user_source) {
$user_source->state->active = true;
$user_source->state->save();
- engelsystem_log('User ' . User_Nick_render($user_source) . ' is active now.');
+ engelsystem_log('User ' . User_Nick_render($user_source, true) . ' is active now.');
$msg = success(__('Angel has been marked as active.'), true);
} else {
$msg = error(__('Angel not found.'), true);
@@ -119,7 +119,7 @@ function admin_active()
if ($user_source) {
$user_source->state->active = false;
$user_source->state->save();
- engelsystem_log('User ' . User_Nick_render($user_source) . ' is NOT active now.');
+ engelsystem_log('User ' . User_Nick_render($user_source, true) . ' is NOT active now.');
$msg = success(__('Angel has been marked as not active.'), true);
} else {
$msg = error(__('Angel not found.'), true);
@@ -130,7 +130,7 @@ function admin_active()
if ($user_source) {
$user_source->state->got_shirt = true;
$user_source->state->save();
- engelsystem_log('User ' . User_Nick_render($user_source) . ' has tshirt now.');
+ engelsystem_log('User ' . User_Nick_render($user_source, true) . ' has tshirt now.');
$msg = success(__('Angel has got a t-shirt.'), true);
} else {
$msg = error('Angel not found.', true);
@@ -141,7 +141,7 @@ function admin_active()
if ($user_source) {
$user_source->state->got_shirt = false;
$user_source->state->save();
- engelsystem_log('User ' . User_Nick_render($user_source) . ' has NO tshirt.');
+ engelsystem_log('User ' . User_Nick_render($user_source, true) . ' has NO tshirt.');
$msg = success(__('Angel has got no t-shirt.'), true);
} else {
$msg = error(__('Angel not found.'), true);
diff --git a/includes/pages/admin_arrive.php b/includes/pages/admin_arrive.php
index aedb0803..f05b42cf 100644
--- a/includes/pages/admin_arrive.php
+++ b/includes/pages/admin_arrive.php
@@ -37,7 +37,7 @@ function admin_arrive()
$user_source->state->arrival_date = null;
$user_source->state->save();
- engelsystem_log('User set to not arrived: ' . User_Nick_render($user_source));
+ engelsystem_log('User set to not arrived: ' . User_Nick_render($user_source, true));
success(__('Reset done. Angel has not arrived.'));
redirect(user_link($user_source->id));
} else {
@@ -55,7 +55,7 @@ function admin_arrive()
$user_source->state->arrival_date = new Carbon\Carbon();
$user_source->state->save();
- engelsystem_log('User set has arrived: ' . User_Nick_render($user_source));
+ engelsystem_log('User set has arrived: ' . User_Nick_render($user_source, true));
success(__('Angel has been marked as arrived.'));
redirect(user_link($user_source->id));
} else {
diff --git a/includes/pages/admin_questions.php b/includes/pages/admin_questions.php
index 7b6ce2ab..0e41390f 100644
--- a/includes/pages/admin_questions.php
+++ b/includes/pages/admin_questions.php
@@ -130,9 +130,9 @@ function admin_questions()
);
engelsystem_log(
'Question '
- . htmlspecialchars($question['Question'])
+ . $question['Question']
. ' answered: '
- . htmlspecialchars($answer)
+ . $answer
);
redirect(page_link_to('admin_questions'));
} else {
@@ -159,7 +159,7 @@ function admin_questions()
);
if (!empty($question)) {
DB::delete('DELETE FROM `Questions` WHERE `QID`=? LIMIT 1', [$question_id]);
- engelsystem_log('Question deleted: ' . htmlspecialchars($question['Question']));
+ engelsystem_log('Question deleted: ' . $question['Question']);
redirect(page_link_to('admin_questions'));
} else {
return error('No question found.', true);
diff --git a/includes/pages/admin_user.php b/includes/pages/admin_user.php
index e59c5baa..e6f94180 100644
--- a/includes/pages/admin_user.php
+++ b/includes/pages/admin_user.php
@@ -240,7 +240,7 @@ function admin_user()
}
$user_source = User::find($user_id);
engelsystem_log(
- 'Set groups of ' . User_Nick_render($user_source) . ' to: '
+ 'Set groups of ' . User_Nick_render($user_source, true) . ' to: '
. join(', ', $user_groups_info)
);
$html .= success('Benutzergruppen gespeichert.', true);
@@ -293,7 +293,7 @@ function admin_user()
) {
set_password($user_id, $request->postData('new_pw'));
$user_source = User::find($user_id);
- engelsystem_log('Set new password for ' . User_Nick_render($user_source));
+ engelsystem_log('Set new password for ' . User_Nick_render($user_source, true));
$html .= success('Passwort neu gesetzt.', true);
} else {
$html .= error(
diff --git a/includes/pages/guest_login.php b/includes/pages/guest_login.php
index a0aa92a5..b079b9fe 100644
--- a/includes/pages/guest_login.php
+++ b/includes/pages/guest_login.php
@@ -86,10 +86,11 @@ function guest_register()
if ($request->has('nick')) {
$nickValidation = User_validate_Nick($request->input('nick'));
$nick = $nickValidation->getValue();
-
- if(!$nickValidation->isValid()) {
+
+ if (!$nickValidation->isValid()) {
$valid = false;
- $msg .= error(sprintf(__('Please enter a valid nick.') . ' ' . __('Use up to 23 letters, numbers, connecting punctuations or spaces for your nickname.'), $nick), true);
+ $msg .= error(sprintf(__('Please enter a valid nick.') . ' ' . __('Use up to 23 letters, numbers, connecting punctuations or spaces for your nickname.'),
+ $nick), true);
}
if (User::whereName($nick)->count() > 0) {
$valid = false;
@@ -246,7 +247,7 @@ function guest_register()
}
engelsystem_log(
- 'User ' . User_Nick_render($user)
+ 'User ' . User_Nick_render($user, true)
. ' signed up as: ' . join(', ', $user_angel_types_info)
);
success(__('Angel registration successful!'));
@@ -287,7 +288,8 @@ function guest_register()
div('row', [
div('col-sm-4', [
form_text('nick', __('Nick') . ' ' . entry_required(), $nick),
- form_info('', __('Use up to 23 letters, numbers, connecting punctuations or spaces for your nickname.'))
+ form_info('',
+ __('Use up to 23 letters, numbers, connecting punctuations or spaces for your nickname.'))
]),
div('col-sm-8', [
form_email('mail', __('E-Mail') . ' ' . entry_required(), $mail),
diff --git a/includes/pages/user_myshifts.php b/includes/pages/user_myshifts.php
index 11bbc9f4..9ab86f2a 100644
--- a/includes/pages/user_myshifts.php
+++ b/includes/pages/user_myshifts.php
@@ -99,7 +99,7 @@ function user_myshifts()
]);
engelsystem_log(
- 'Updated ' . User_Nick_render($user_source) . '\'s shift ' . $shift['name']
+ 'Updated ' . User_Nick_render($user_source, true) . '\'s shift ' . $shift['name']
. ' from ' . date('Y-m-d H:i', $shift['start'])
. ' to ' . date('Y-m-d H:i', $shift['end'])
. ' with comment ' . $comment
diff --git a/includes/pages/user_news.php b/includes/pages/user_news.php
index 29aff5ca..39ce24a5 100644
--- a/includes/pages/user_news.php
+++ b/includes/pages/user_news.php
@@ -156,7 +156,7 @@ function user_news_comments()
]
);
- engelsystem_log('Created news_comment: ' . htmlspecialchars($text));
+ engelsystem_log('Created news_comment: ' . $text);
$html .= success(__('Entry saved.'), true);
}