From 8adbe6b2ffed0da44525dbdb5c502a87efb1beb0 Mon Sep 17 00:00:00 2001 From: Gonzalo Merayo Date: Tue, 24 Jun 2003 19:49:23 +0000 Subject: [PATCH] Correccion ArbolDB para que haga listas --- lib/MECON/HTML/Arbol/ArbolDB.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/MECON/HTML/Arbol/ArbolDB.php b/lib/MECON/HTML/Arbol/ArbolDB.php index d83d506..583a0a5 100644 --- a/lib/MECON/HTML/Arbol/ArbolDB.php +++ b/lib/MECON/HTML/Arbol/ArbolDB.php @@ -31,7 +31,7 @@ class HTML_ArbolDB extends HTML_Arbol { $sql = "SELECT $this->nombre, $this->id FROM $this->tabla "; - if(!is_null$this->padre) + if(!is_null($this->padre)) $sql .= "WHERE $this->padre = '$id'"; $result = $this->db->query($sql); if(DB::isError($result)) @@ -41,10 +41,12 @@ class HTML_ArbolDB extends HTML_Arbol { $titulo = $row[0]; $id = $row[1]; + if(is_null($this->padre)) $sub = array(); + else $sub = $this->BuscarHijos($id); $dat[] = array( 'titulo'=> $titulo, 'link' => $this->link.$id, - 'sub' => $this->BuscarHijos($id) + 'sub' => $sub ); } return $dat; -- 2.43.0