diff --git a/Vues/modifyListPub.php b/Vues/modifyListPub.php
new file mode 100644
index 0000000..bc1e8e5
--- /dev/null
+++ b/Vues/modifyListPub.php
@@ -0,0 +1,32 @@
+
+
+
+ Ajouter une Liste
+
+
+
+
+
+
+
+
+
+
Modifier Liste
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Vues/modifyTask.php b/Vues/modifyTask.php
index 7b64543..69c7c94 100644
--- a/Vues/modifyTask.php
+++ b/Vues/modifyTask.php
@@ -33,7 +33,7 @@
?>
Complete
-
+
Complete
-
+
getPrivate()){
?>
-
-
diff --git a/config/config.php b/config/config.php
index 955bfc2..25f8641 100644
--- a/config/config.php
+++ b/config/config.php
@@ -24,6 +24,8 @@ $vues['seeList'] = 'Vues/seeList.php';
$vues['signUp'] = 'Vues/signUp.php';
$vues['connexion'] = 'Vues/connexion.php';
$vues['modifyListPriv'] = 'Vues/modifyListPriv.php';
+$vues['modifyListPub'] = 'Vues/modifyListPub.php';
+
?>
\ No newline at end of file
diff --git a/controllers/FrontController.php b/controllers/FrontController.php
index b3d09ac..a0bf717 100644
--- a/controllers/FrontController.php
+++ b/controllers/FrontController.php
@@ -5,7 +5,7 @@ class FrontController {
public function __construct(){
$liste_actions_utilisateur = array('viewPrivateList','addPrivateList', 'accessAddListPrivee', 'deconnection', "accessModifyListPriv", "modifyPrivateList");
- $liste_actions_visiteur = array('accessListInfos', 'goHome','accessSignUp','accessSignIn','signIn','signUp', 'addListVis', 'delList', 'accessAddListVis', 'accessAddTask', 'deleteTask', 'modifierTache', "addTask");
+ $liste_actions_visiteur = array('accessListInfos', 'goHome','accessSignUp','accessSignIn','signIn','signUp', 'addListVis', 'delList', "modifyPublicList", "accessModifyListPub", 'accessAddListVis', 'accessAddTask', 'deleteTask', 'modifierTache', "addTask");
global $rep,$vues,$bd,$dataView,$styles,$assets;
session_start();
diff --git a/controllers/VisitorController.php b/controllers/VisitorController.php
index 5595e20..5d59be6 100644
--- a/controllers/VisitorController.php
+++ b/controllers/VisitorController.php
@@ -48,6 +48,15 @@ class VisitorController {
$dataView[]=$_POST['list'];
require($rep.$vues['modifyTask']);
break;
+ case "accessModifyListPub":
+ $mdlListe= new MdlListe();
+ $liste=$mdlListe->findById($_POST['list']);
+ $dataView=$liste[0];
+ require($rep.$vues['modifyListPub']);
+ break;
+ case "modifyPublicList":
+ $this->ModifyListPub($dVueEreur);
+ break;
case "addListVis":
$this->AddList($dVueEreur);
@@ -252,5 +261,20 @@ class VisitorController {
$this->accessListInfos($dVueEreur);
$dVueEreur= array();
}
+
+ function ModifyListPub($dVueEreur){
+ global $rep,$vues,$dataView;
+ $list=$_POST['list'];
+ $name=$_POST['name'];
+ $model = new MdlListe();
+ $mdlUsr = new MdlUser();
+ $list=$model->findById($list);
+ $model->update($list[0], $name, false);
+ $_REQUEST['action']="accessListInfos";
+ $this->accessListInfos($dVueEreur);
+ $dVueEreur= array();
+
+
+ }
}
?>
\ No newline at end of file
diff --git a/gateway/ListeGateway.php b/gateway/ListeGateway.php
index 3e21044..df85132 100644
--- a/gateway/ListeGateway.php
+++ b/gateway/ListeGateway.php
@@ -31,7 +31,7 @@ class ListeGateway
foreach ($results as $row ) {
$taches=$tacheGateway->getTacheFromIdList($row['id']);
foreach($taches as $tata){
- $tacheGateway->delete($tata);
+ $tacheGateway->delete($tata->getId());
}
}
$query = "DELETE FROM Liste where id=:id";