bug message succès fixed
This commit is contained in:
parent
432e111c47
commit
d0ac49f024
5 changed files with 33 additions and 7 deletions
|
|
@ -10,7 +10,7 @@
|
|||
/**
|
||||
* Méthode d'affichage des pages
|
||||
*/
|
||||
protected function _display($strView){
|
||||
protected function _display($strView, bool $boolDisplay = true){
|
||||
// Création de l'objet Smarty
|
||||
$objSmarty = new Smarty();
|
||||
// Ajouter le var_dump au modificateur de smarty : vardump est le nom appelé après le |
|
||||
|
|
@ -32,8 +32,18 @@
|
|||
// Message de succès
|
||||
$objSmarty->assign("success_message", $_SESSION['success']??'');
|
||||
unset($_SESSION['success']);
|
||||
|
||||
if (isset($_SESSION['error'])){
|
||||
$objSmarty->assign("arrError", array($_SESSION['error']));
|
||||
unset($_SESSION['error']);
|
||||
}
|
||||
|
||||
if ($boolDisplay){
|
||||
$objSmarty->display("views/".$strView.".tpl");
|
||||
}else{
|
||||
return $objSmarty->fetch("views/".$strView.".tpl");
|
||||
}
|
||||
|
||||
$objSmarty->display("views/".$strView.".tpl");
|
||||
|
||||
|
||||
// inclusion du header
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue