Commit 9475480e authored by okhin's avatar okhin 🚴

Merge branch 'preprod' into '32-nouveau-front'

# Conflicts:
#   app/view/user/perso.html
parents 3cdff4fa c977a7e8
Pipeline #2092 passed with stages
in 10 seconds
......@@ -45,7 +45,7 @@ job test:
- echo "SQL_DATABASE=${SQL_DATABASE}" >> app/env
- make install
- make server-start
- make test
- make -k test
- make server-stop
- mysql -u $SQL_USER -p$SQL_PASSWORD -e "DROP DATABASE $SQL_DATABASE"
tags:
......
......@@ -71,7 +71,7 @@ server-start: server-stop ## Launch a local server
@echo "\033[32mServer running. (http://127.0.0.1:8000)\033[0m"
server-stop: ## Stop local server if running
@ps -aux | grep "[p]hp -S 127.0.0.1:8000" | grep -v grep | awk '{print $$2}' | xargs -r -n 1 kill
-@ps -aux | grep "[p]hp -S 127.0.0.1:8000" | grep -v grep | awk '{print $$2}' | xargs -r -n 1 kill
@echo "\033[32mServer stopped. (http://127.0.0.1:8000)\033[0m"
cs-fix: ## Fix CS
......
......@@ -408,7 +408,7 @@ class Perso extends Controller
$db = $f3->get('DB');
$id = $params['id'];
$command = "pdftk ";
$args = " ./receipt.pdf fill_form tmp/".$id.".xfdf output tmp/".$id.".pdf flatten dont_ask";
$args = " ../www/receipt.pdf fill_form ../tmp/".$id.".xfdf output ../tmp/".$id.".pdf flatten dont_ask";
$logger->write($command . " " .$args);
// Vérification que le don appartient bien à l'utilisateur connecté
......@@ -472,7 +472,7 @@ class Perso extends Controller
</field>
</fields>
</xfdf>';
$fp = fopen("tmp/".$id.".xfdf", "w");
$fp = fopen("../tmp/".$id.".xfdf", "w");
if ($fp) {
fputs($fp, $content);
fclose($fp);
......@@ -483,12 +483,12 @@ class Perso extends Controller
exec($command.$args, $output);
// Suppression du fichier datas
unlink("tmp/".$id.".xfdf");
unlink("../tmp/".$id.".xfdf");
// Renvoi du fichier pdf au client
$fp = fopen("tmp/".$id.".pdf", "rb");
$fp = fopen("../tmp/".$id.".pdf", "rb");
if ($fp) {
$fsize = filesize("tmp/".$id.".pdf");
$fsize = filesize("../tmp/".$id.".pdf");
header("Content-Type: application/pdf");
header("Content-Disposition: attachment; filename=\"".$id.".pdf\"");
header("Content-Length: $fsize");
......@@ -502,7 +502,7 @@ class Perso extends Controller
}
// Suppression du fichier reçu
unlink("tmp/".$id.".pdf");
unlink("../tmp/".$id.".pdf");
die();
}
......
......@@ -61,7 +61,7 @@
<div id="collapseAdresses" class="panel-collapse collapse" href="#collapseAdresses" aria-expanded="false" aria-controls="collapseAdresses">
<div class="panel-body text-left">
<check if="{{ count(@adresses) > 0 }}">
<h3>{{ _("Modifier une adresse")}}</h3>
<h3>{{ _("Modifier une adresse") }}</h3>
<form>
<div class="form-group">
<label for="">{{ _("Modifier une adresse")}}</label>
......@@ -73,7 +73,7 @@
</div>
</form>
<h3>{{ _("Ajouter une nouvelle adresse.")}}</h3>
<h3>{{ _("Ajouter une nouvelle adresse") }}</h3>
<form method="POST" action="{{ 'adresses' | alias }}" id="create-adress-form">
<input type="hidden" name="csrf" value="{{ @CSRF }}" />
<input type="hidden" name="action" value="ADD" />
......@@ -115,7 +115,7 @@
<input type="checkbox" name="defaut" value="true" >{{ _("Utiliser comme adresse par défaut.") }}
</label>
</div>
<input type="submit" class="btn btn-lg c-boutonslongs" value="{{ _("Créer cette adresse")}}">
<input type="submit" class="btn btn-lg c-boutonslongs" value="{{ _('Créer cette adresse') }}">
</form>
</div>
</div>
......
......@@ -5,6 +5,8 @@ cd /home/don/don
git reset --hard
git pull origin $CI_BUILD_REF_NAME
git checkout $CI_BUILD_REF_NAME
git submodule init
git submodule update
composer install --no-dev
composer update
......
File added
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