Commit 7a779b88 authored by Okhin's avatar Okhin

Fixing the linting

parent cf54547e
Pipeline #2120 canceled with stages
in 2 minutes and 4 seconds
......@@ -25,8 +25,7 @@ class Perso extends Controller
$this->get_contreparties($f3);
$this->get_dons($f3);
$this->get_recurrents($f3);
if ($f3->exists('GET.validate'))
{
if ($f3->exists('GET.validate')) {
$f3->set('modal_counterparts', '1');
$f3->clear('GET.validate');
} else {
......@@ -420,18 +419,18 @@ class Perso extends Controller
$logger->write($command . " " .$args);
// Vérification que le don appartient bien à l'utilisateur connecté
$query="SELECT dons.datec,
dons.somme,
adresses.nom as pseudo,
adresses.adresse,
adresses.adresse2,
adresses.codepostal,
adresses.ville,
adresses.pays
FROM dons
INNER JOIN users ON users.id = dons.user_id
LEFT OUTER JOIN adresses ON adresses.user_id = users.id
WHERE users.id=".$f3->get('SESSION.id')." AND adresses.defaut IS true AND dons.id=".\Utils::asl($id).";";
$query="SELECT dons.datec,
dons.somme,
adresses.nom as pseudo,
adresses.adresse,
adresses.adresse2,
adresses.codepostal,
adresses.ville,
adresses.pays
FROM dons
INNER JOIN users ON users.id = dons.user_id
LEFT OUTER JOIN adresses ON adresses.user_id = users.id
WHERE users.id=".$f3->get('SESSION.id')." AND adresses.defaut IS true AND dons.id=".\Utils::asl($id).";";
$result = $db->query($query);
$logger->write($query);
$don = $result->fetch(\PDO::FETCH_ASSOC);
......@@ -464,22 +463,22 @@ class Perso extends Controller
);
$date = substr($don['datec'], 8, 2)." ".$monthes[substr($don['datec'], 5, 2)]." ".substr($don['datec'], 0, 4);
$content = '<?xml version="1.0" encoding="UTF-8"?>
<xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve">
<fields>
<field name="address">
<value>'.$address.'</value>
</field>
<field name="donor">
<value>'.$name.'</value>
</field>
<field name="content">
<value>Reçu le '.$date.' un don de '.$amount.' euros de la part de '.$name.'.</value>
</field>
<field name="date">
<value>Fait à Paris le '.$date.'</value>
</field>
</fields>
</xfdf>';
<xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve">
<fields>
<field name="address">
<value>'.$address.'</value>
</field>
<field name="donor">
<value>'.$name.'</value>
</field>
<field name="content">
<value>Reçu le '.$date.' un don de '.$amount.' euros de la part de '.$name.'.</value>
</field>
<field name="date">
<value>Fait à Paris le '.$date.'</value>
</field>
</fields>
</xfdf>';
$fp = fopen("../tmp/".$id.".xfdf", "w");
if ($fp) {
fputs($fp, $content);
......@@ -545,12 +544,12 @@ class Perso extends Controller
$result = $client->customerCancel($parameters);
// Let's add a 103 don at 0€ to keep track of them
$f3->query("INSERT INTO dons SET
status = '103',
datec = NOW(),
somme = 0,
user_id = '".$user_id."',
identifier = '".$identifier."',
cumul = 0;");
status = '103',
datec = NOW(),
somme = 0,
user_id = '".$user_id."',
identifier = '".$identifier."',
cumul = 0;");
$f3->reroute('/perso');
}
......
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