X-Git-Url: http://git.dj3c1t.com/index.cgi?a=blobdiff_plain;f=app%2Fdata%2Fmodules%2Fsql%2Fsml_data_authors.php;h=5d1288fe9b3a173b0c1fac9ee370d47b3e3587ad;hb=HEAD;hp=72779a8fb164903b2bc1dc878426a72ca444d6c1;hpb=9391cb9ccb3dd2884e7be2f15aa729733288f1e5;p=mw_sourceml diff --git a/app/data/modules/sql/sml_data_authors.php b/app/data/modules/sql/sml_data_authors.php index 72779a8..5d1288f 100644 --- a/app/data/modules/sql/sml_data_authors.php +++ b/app/data/modules/sql/sml_data_authors.php @@ -1,13 +1,12 @@ sgbd(); $env = $this->env(); $groupes = array("list" => array(), "total" => 0); @@ -26,6 +25,7 @@ $sql = "SELECT * FROM(".$SELECT.$FROM.$WHERE.$LIMIT.") res"; $rst = $sgbd->query($sql); while($v_rst = $sgbd->fetch_assoc($rst)){ + if(!isset($v_rst["image"])) $v_rst["image"] = ""; $groupes["list"][$v_rst["id"]] = $v_rst; $groupes["list"][$v_rst["id"]]["image_uri"] = ( $v_rst["image"] ? @@ -42,7 +42,7 @@ return $groupes; } - function groupe($id){ + public function groupe($id){ $sgbd = $this->sgbd(); $env = $this->env(); $groupe = array(); @@ -50,6 +50,7 @@ $sql = "SELECT * from #--sml_authors WHERE id=".$this->eq($id); $rst = $sgbd->query($sql); if($v_rst = $sgbd->fetch_assoc($rst)){ + if(!isset($v_rst["image"])) $v_rst["image"] = ""; $groupe = $v_rst; $groupe["image_uri"] = ( $groupe["image"] ? @@ -59,11 +60,13 @@ } $sgbd->free_result($rst); } - catch(Exception $e) { return false; } + catch(Exception $e){ + return false; + } return $groupe; } - function groupe_exists($nom, $other_than_id = null){ + public function groupe_exists($nom, $other_than_id = null){ $sgbd = $this->sgbd(); $EXISTS = 0; try{ @@ -79,7 +82,7 @@ return $EXISTS; } - function add_groupe($id_user, $nom, $image, $description, $email, $contact_form, $captcha){ + public function add_groupe($id_user, $nom, $image, $description, $email, $contact_form, $captcha){ $sgbd = $this->sgbd(); try{ $sql = @@ -100,7 +103,7 @@ return true; } - function set_groupe($id, $nom, $image, $description, $email, $contact_form, $captcha){ + public function set_groupe($id, $nom, $image, $description, $email, $contact_form, $captcha){ if(($groupe = $this->groupe($id)) === false) return false; $sgbd = $this->sgbd(); try{ @@ -125,7 +128,7 @@ return true; } - function del_groupe($id){ + public function del_groupe($id){ $sgbd = $this->sgbd(); try{ $sql = "SELECT count(*) as n FROM #--sml_sources_authors WHERE id_author=".$this->eq($id); @@ -143,5 +146,3 @@ } } - -?> \ No newline at end of file