Commit 7a779b88 authored by Okhin's avatar Okhin
Browse files

Fixing the linting

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