Commit f61d5cd1 authored by Okhin's avatar Okhin
Browse files

linting

parent 5acaa592
...@@ -886,7 +886,7 @@ class Admin extends Controller ...@@ -886,7 +886,7 @@ class Admin extends Controller
$id = array_key_exists('id', $args) ? \Utils::asl($args['id']) : ''; $id = array_key_exists('id', $args) ? \Utils::asl($args['id']) : '';
$f3->set('id', $id); $f3->set('id', $id);
if($f3->get('VERB') == 'GET') { if ($f3->get('VERB') == 'GET') {
$merger = $f3->get('container')['user_finder']->findById($id); $merger = $f3->get('container')['user_finder']->findById($id);
$email_merged = \Utils::asl($f3->get('GET.merged')); $email_merged = \Utils::asl($f3->get('GET.merged'));
$user = $f3->get('container')['user_finder']->findById($id); $user = $f3->get('container')['user_finder']->findById($id);
...@@ -905,7 +905,7 @@ class Admin extends Controller ...@@ -905,7 +905,7 @@ class Admin extends Controller
$f3->set('donations', $donations); $f3->set('donations', $donations);
$f3->set('block_content', 'backend/fusion_user.html'); $f3->set('block_content', 'backend/fusion_user.html');
} else if($f3->get('VERB') == 'POST') { } elseif ($f3->get('VERB') == 'POST') {
$merger_id = \Utils::asl($f3->get('POST.merger_id')); $merger_id = \Utils::asl($f3->get('POST.merger_id'));
$merged_id = \Utils::asl($f3->get('POST.merged_id')); $merged_id = \Utils::asl($f3->get('POST.merged_id'));
...@@ -914,12 +914,14 @@ class Admin extends Controller ...@@ -914,12 +914,14 @@ class Admin extends Controller
$merged = $f3->get('container')['user_finder']->findById($merged_id); $merged = $f3->get('container')['user_finder']->findById($merged_id);
// Update total and cumul values // Update total and cumul values
$f3->get('container')['command_handler']->handle(new UserUpdateByAdminCommand($merger_id, $f3->get('container')['command_handler']->handle(new UserUpdateByAdminCommand(
$merger_id,
$merger['pseudo'], $merger['pseudo'],
$merger['email'], $merger['email'],
$merger['commentaire'] + $merged['commentaire'], $merger['commentaire'] + $merged['commentaire'],
(int) $merger['total'] + (int) $merged['total'], (int) $merger['total'] + (int) $merged['total'],
(int) $merger['cumul'] + (int) $merged['cumul'])); (int) $merger['cumul'] + (int) $merged['cumul']
));
$db = $f3->get('DB'); $db = $f3->get('DB');
// Now, let's change all counterparts of merged // Now, let's change all counterparts of merged
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment