From: dj3c1t Date: Mon, 9 Jun 2014 17:22:58 +0000 (+0200) Subject: supp debug dans crud et arrangements init X-Git-Tag: mtweb.1.0.0~3 X-Git-Url: http://git.dj3c1t.com/index.cgi?a=commitdiff_plain;h=4687a79b837722b039f87b5ecce003c67f0001ba;p=mtweb supp debug dans crud et arrangements init --- diff --git a/mw/app/data/modules/sql/mw_data_sql_crud.php b/mw/app/data/modules/sql/mw_data_sql_crud.php index 696e1d9..8daf014 100644 --- a/mw/app/data/modules/sql/mw_data_sql_crud.php +++ b/mw/app/data/modules/sql/mw_data_sql_crud.php @@ -273,7 +273,7 @@ $sql = "DELETE FROM `#--".$table_name."` WHERE `".$index_name."`=".$this->eq($index_value); $sgbd->query($sql); } - catch(Exception $e) { debug($e->getMessage()); return false; } + catch(Exception $e) { return false; } return true; } diff --git a/mw/app/init/0400_config.php b/mw/app/init/0400_config.php index 55d0e81..20a1d6b 100644 --- a/mw/app/init/0400_config.php +++ b/mw/app/init/0400_config.php @@ -1,12 +1,19 @@ bdd_ready() !== true) return; - if(($config = $data->config()) !== false){ - $this->set_config($config); - $start_action_params_config = - $this->config("start_action_params") ? - @unserialize($this->config("start_action_params")) - : array(); - $this->set_config(array("start_action_params" => $start_action_params_config)); + + if(($config = $data->config()) === false){ + $this->erreur("Impossible de lire la configuration en base", true); } - else $this->erreur("Impossible de lire la configuration en base", true); + + $this->set_config($config); + + $this->set_config( + array( + "start_action_params" => ( + $this->config("start_action_params") ? + @unserialize($this->config("start_action_params")) + : array() + ) + ) + ); diff --git a/mw/app/init/0500_users.php b/mw/app/init/0500_users.php index beb2971..8af3db8 100644 --- a/mw/app/init/0500_users.php +++ b/mw/app/init/0500_users.php @@ -1,12 +1,15 @@ bdd_ready() !== true) return; - if($data->load_session() !== false){ - if($data->init_roles() !== false){ - if($data->init_actions_roles() === false){ - $this->erreur("Impossible de charger les statuts des actions", true); - } - } - else $this->erreur("Impossible de charger les statuts des utilisateurs", true); + + if($data->load_session() === false){ + $this->erreur("Impossible de charger la session", true); + } + + if($data->init_roles() === false){ + $this->erreur("Impossible de charger les statuts des utilisateurs", true); + } + + if($data->init_actions_roles() === false){ + $this->erreur("Impossible de charger les statuts des actions", true); } - else $this->erreur("Impossible de charger la session", true); diff --git a/mw/app/init/0600_links.php b/mw/app/init/0600_links.php index f5e3bf2..e4a2b27 100644 --- a/mw/app/init/0600_links.php +++ b/mw/app/init/0600_links.php @@ -1,12 +1,14 @@ bdd_ready() !== true) return; - if($this->init_links()){ - $this->set_link("users/infos", $this->url("users/infos"), "Compte", 10); - $this->set_link("admin/users", $this->url("admin/users"), "Utilisateurs", 20); - $this->set_link("config/config", $this->url("config"), "Configuration générale", 10); - $this->set_link("config/template", $this->url("config/templates"), "Template", 20); - $this->set_link("config/roles", $this->url("config/roles"), "Rôles", 30); - $this->set_link("config/plugins", $this->url("config/plugins"), "Plugins", 40); + + if(!$this->init_links()){ + $this->erreur("impossible de charger les liens", true); } - else $this->erreur("impossible de charger les liens", true); + + $this->set_link("users/infos", $this->url("users/infos"), "Compte", 10); + $this->set_link("admin/users", $this->url("admin/users"), "Utilisateurs", 20); + $this->set_link("config/config", $this->url("config"), "Configuration générale", 10); + $this->set_link("config/template", $this->url("config/templates"), "Template", 20); + $this->set_link("config/roles", $this->url("config/roles"), "Rôles", 30); + $this->set_link("config/plugins", $this->url("config/plugins"), "Plugins", 40);