merge with pre-master

pull/16/head
maxime.point2 1 year ago
parent 10ee5b9534
commit c7df3cfa91

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="SqlDialectMappings">
<file url="file://$PROJECT_DIR$/fluxRSS/DAL/ArticleGateway.php" dialect="PostgreSQL" />
</component>
</project>

@ -25,14 +25,6 @@ class FluxGateway
return $this->id;
}
public function addFlux($flux){
try{
$query = 'INSERT INTO Flux VALUES (:flux);';
$this->con->executeQuery($query, array(':flux' => array($flux->getFlux(), PDO::PARAM_STR)));
}catch (\PDOException $e){
throw new \Exception("PDO error");
}
public function removeFlux(Flux $flux){
$query = 'DELETE FROM Flux WHERE flux = :flux;';
$this->con->executeQuery($query, array(':flux' => array($flux->getFlux(), PDO::PARAM_STR)));

@ -91,6 +91,7 @@ class AdminControleur
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['flux'])){
$fluxModel = new FluxModel();
$fluxModel->removeFlux($_POST['flux']);
$this->listArticle();
}
}
Loading…
Cancel
Save