if(!$sgbd->create_data("pages")){
return "imposible de creer la table #--pages";
}
- if(!$sgbd->add_data("action_status", array("action" => "pages/admin", "id_status" => "1"))){
+ if(!$sgbd->add_data("actions_roles", array("action" => "pages/admin", "id_role" => "1"))){
$sgbd->remove_data("pages");
return "impossible d'ajouter un statut pour l'action pages/admin";
}
}
$DELETE_TABLE = false;
try{
- $sgbd->query("INSERT INTO #--action_status(action, id_status) VALUES('pages/admin', 1)");
+ $sgbd->query("INSERT INTO #--actions_roles(action, id_role) VALUES('pages/admin', 1)");
}
catch(Exception $e){
try{
return "imposible de creer la table #--pages";
}
try{
- $sgbd->query("INSERT INTO #--action_status(action, id_status) VALUES('pages/admin', 1)");
+ $sgbd->query("INSERT INTO #--actions_roles(action, id_role) VALUES('pages/admin', 1)");
}
catch(Exception $e){
try{
return "imposible de supprimer la table #--pages";
}
$ids = array();
- if($rst = $sgbd->open_data("action_status")){
+ if($rst = $sgbd->open_data("actions_roles")){
while($v_rst = $sgbd->fetch_data($rst)){
if(isset($v_rst)){
if(isset($v_rst["action"]) && isset($v_rst["id"]) && $v_rst["action"] == "pages/admin"){
}
if($ids !== false){
foreach($ids as $id){
- $sgbd->del_data("action_status", $id);
+ $sgbd->del_data("actions_roles", $id);
}
}
return true;
}
}
try{
- $sgbd->query("DELETE FROM #--action_status WHERE action='pages/admin'");
+ $sgbd->query("DELETE FROM #--actions_roles WHERE action='pages/admin'");
}
catch(Exception $e){
return
"Le plugin a bien été désinstallé"
- ." mais impossible d'enlever les droits pages/admin/* de la table action_status";
+ ." mais impossible d'enlever les droits pages/admin/* de la table actions_roles";
}
return true;
}
}
}
try{
- $sgbd->query("DELETE FROM #--action_status WHERE action='pages/admin'");
+ $sgbd->query("DELETE FROM #--actions_roles WHERE action='pages/admin'");
}
catch(Exception $e){
return
"Le plugin a bien été désinstallé"
- ." mais impossible d'enlever les droits pages/admin/* de la table action_status";
+ ." mais impossible d'enlever les droits pages/admin/* de la table actions_roles";
}
return true;
}