Commit 678e4014 authored by okhin's avatar okhin 🚴

Linting

parent fb136c4c
...@@ -100,7 +100,8 @@ class Admin extends Controller ...@@ -100,7 +100,8 @@ class Admin extends Controller
$f3->set('block_content', 'backend/dons.html'); $f3->set('block_content', 'backend/dons.html');
} }
public function validate($f3, $args) { public function validate($f3, $args)
{
$id = ''; $id = '';
$error = ''; $error = '';
$db = $f3->get('DB'); $db = $f3->get('DB');
...@@ -132,7 +133,8 @@ class Admin extends Controller ...@@ -132,7 +133,8 @@ class Admin extends Controller
} }
if ($error != '') { if ($error != '') {
} else { } else {
$db->query("UPDATE dons $db->query(
"UPDATE dons
SET status = $status SET status = $status
WHERE id = ".\Utils::asl($id) WHERE id = ".\Utils::asl($id)
); );
...@@ -145,7 +147,8 @@ class Admin extends Controller ...@@ -145,7 +147,8 @@ class Admin extends Controller
} }
public function invalidate($f3, $args) { public function invalidate($f3, $args)
{
$id = ''; $id = '';
$error = ''; $error = '';
$db = $f3->get('DB'); $db = $f3->get('DB');
...@@ -180,7 +183,8 @@ class Admin extends Controller ...@@ -180,7 +183,8 @@ class Admin extends Controller
} }
if ($error != '') { if ($error != '') {
} else { } else {
$db->query("UPDATE dons $db->query(
"UPDATE dons
SET status = $status SET status = $status
WHERE id = ".\Utils::asl($id) WHERE id = ".\Utils::asl($id)
); );
...@@ -703,7 +707,8 @@ class Admin extends Controller ...@@ -703,7 +707,8 @@ class Admin extends Controller
$f3->set('block_content', 'backend/contrepartie.html'); $f3->set('block_content', 'backend/contrepartie.html');
} }
public function adresse($f3, $args) { public function adresse($f3, $args)
{
$id = ''; $id = '';
$form_name = ''; $form_name = '';
$user_id = ''; $user_id = '';
...@@ -720,7 +725,8 @@ class Admin extends Controller ...@@ -720,7 +725,8 @@ class Admin extends Controller
WHERE user_id = $user_id"); WHERE user_id = $user_id");
$db->query("UPDATE contreparties SET adresse_id = NULL $db->query("UPDATE contreparties SET adresse_id = NULL
WHERE user_id = $user_id"); WHERE user_id = $user_id");
$db->query("DELETE FROM adresses $db->query(
"DELETE FROM adresses
WHERE id = $id" WHERE id = $id"
); );
} else { } else {
...@@ -733,7 +739,8 @@ class Admin extends Controller ...@@ -733,7 +739,8 @@ class Admin extends Controller
$codepostal = \Utils::asl($f3->get('POST.codepostal')); $codepostal = \Utils::asl($f3->get('POST.codepostal'));
$ville = \Utils::asl($f3->get('POST.ville')); $ville = \Utils::asl($f3->get('POST.ville'));
$pays = \Utils::asl($f3->get('POST.pays')); $pays = \Utils::asl($f3->get('POST.pays'));
$db->query("UPDATE adresses SET $db->query(
"UPDATE adresses SET
nom = '".$nom."', nom = '".$nom."',
adresse = '".$adresse."', adresse = '".$adresse."',
adresse2 = '".$adresse2."', adresse2 = '".$adresse2."',
......
...@@ -25,8 +25,10 @@ class CounterpartHandler ...@@ -25,8 +25,10 @@ class CounterpartHandler
public function handleCounterpartDeleteCommand(CounterpartDeleteCommand $command) public function handleCounterpartDeleteCommand(CounterpartDeleteCommand $command)
{ {
$counterpartId = $command->getCounterpartId(); $counterpartId = $command->getCounterpartId();
$this->connection->executeUpdate("DELETE FROM counterparts WHERE id = :id", $this->connection->executeUpdate(
['id' => $counterpartId()]); "DELETE FROM counterparts WHERE id = :id",
['id' => $counterpartId()]
);
} }
/** /**
......
Markdown is supported
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