Commit e07ad64a authored by Mindiell's avatar Mindiell

Correction de mauvaises indentations dans les sources via php-cs-fixer

parent 20322f6c
......@@ -10,6 +10,7 @@ vendor/
pdf/
phinx.yml
app/env
.php_cs.cache
tests/_output
tests/_support/_generated
......@@ -1162,7 +1162,7 @@ class Admin extends Controller
// On stocke l'email pour comptabiliser les dons
if (array_key_exists($email, $emails)) {
$emails[$email] ++;
//echo $new_effect . ' - ' . $identifier.' : '.$email.' => '.$combien[0].'<br />';
//echo $new_effect . ' - ' . $identifier.' : '.$email.' => '.$combien[0].'<br />';
} else {
$emails[$email] = 1;
}
......
......@@ -3,10 +3,10 @@
class Bank extends Controller
{
/* We want to ignore the sanitizing on this page */
public function sanitizeForms($f3)
{
return;
}
public function sanitizeForms($f3)
{
return;
}
/*
Page de retour de la banque
*/
......@@ -195,21 +195,21 @@ Encore merci pour votre soutien,
Toute l'équipe de La Quadrature du Net
")."\n\n";
// Création de l'url d'administration
$admin_url = "https://support.laquadrature.net/perso";
// Création de l'url d'administration
$admin_url = "https://support.laquadrature.net/perso";
foreach ($f3->get('languages') as $key => $language) {
if ($lang==$language[1]) {
$admin_url = "https://".$language[0].$f3->get('dev').".laquadrature.net/perso";
}
}
// Remplacement des variables par leurs valeurs
$fields = array(
"NAME"=>$user["pseudo"],
"SOMME"=>$don['somme'],
"CUMUL"=>$cumul,
"URL_ADMIN" => $admin_url
);
// Remplacement des variables par leurs valeurs
$fields = array(
"NAME"=>$user["pseudo"],
"SOMME"=>$don['somme'],
"CUMUL"=>$cumul,
"URL_ADMIN" => $admin_url
);
foreach ($fields as $k=>$v) {
$text = str_replace("%%".$k."%%", $v, $text);
}
......
......@@ -40,7 +40,8 @@ class Campaign extends Controller
$total_provisional = 0;
// So now, let's get the amount of confirmed dons, which are all the 1, 4, 101 and 102
// statuses since CAMPAIGN_START_DATE
$result = $db->query("SELECT SUM(somme)
$result = $db->query(
"SELECT SUM(somme)
AS total_confirmed
FROM dons
WHERE status IN (1, 4, 102)
......
......@@ -50,8 +50,12 @@ class Controller
$f3->set('lang_short', $lang_short);
// Initialize DB
$f3->set('DB', new \DB\SQL(SQL_DSN, SQL_USER, SQL_PASSWORD,
array( \PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION)));
$f3->set('DB', new \DB\SQL(
SQL_DSN,
SQL_USER,
SQL_PASSWORD,
array( \PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION)
));
if ($f3->get('VERB') == 'POST') {
$this->sanitizeForms($f3);
......@@ -95,7 +99,7 @@ class Controller
// CSRF checks
//if ($f3->get('POST.csrf') != $f3->get('container')['session']->get('csrf')) {
// $f3->error('400', 'CSRF Validation error');
// $f3->error('400', 'CSRF Validation error');
//}
// First, let's clean all the data
......
......@@ -98,11 +98,22 @@ class Cron extends Controller
$logger->write("decimales: ".$decimales);
// Let's replace the templates with values
file_put_contents(dirname(__FILE__)."/../tmp/pplome.tex",
str_replace("%%DECIMALES%%", $decimales,
str_replace("%%NOM%%", $pdf['nom'],
str_replace("%%MILLIER%%", $pdf['decimale'],
$template))));
file_put_contents(
dirname(__FILE__)."/../tmp/pplome.tex",
str_replace(
"%%DECIMALES%%",
$decimales,
str_replace(
"%%NOM%%",
$pdf['nom'],
str_replace(
"%%MILLIER%%",
$pdf['decimale'],
$template
)
)
)
);
// Let's create the pdf from the template
$logger->write("Building the pdf from the tex template");
......
......@@ -19,9 +19,9 @@ Cette fonction définit un mot de passe de 12 caractères
}
/*
Cette fonction cherche à nettoyer un mauvais encodage en utf-8.
*/
/*
Cette fonction cherche à nettoyer un mauvais encodage en utf-8.
*/
public static function clean_encoding($string)
{
$bad_encoding = array("é","à ","è","ç","ë","ô","î","ù");
......
......@@ -152,7 +152,8 @@ EOF;
"SELECT id FROM adresses WHERE user_id = :user_id AND defaut = TRUE",
[
'user_id' => $userId,
], 0
],
0
);
}
......@@ -171,7 +172,8 @@ EOF;
[
'user_id' => $userId,
'alias' => $alias,
], 0
],
0
);
}
......@@ -188,7 +190,8 @@ EOF;
"SELECT count(1) FROM contreparties, dons WHERE contreparties.adresse_id = :id OR dons.adresse_id = :id",
[
'id' => $addressId,
], 0
],
0
);
return ($count > 0);
}
......
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