From: <re...@us...> - 2003-07-19 01:19:47
|
Update of /cvsroot/tikiwiki/tiki/lib/structures In directory sc8-pr-cvs1:/tmp/cvs-serv2628/lib/structures Modified Files: Tag: DB_abstraction structlib.php Log Message: Working with extreme vi and ex commands makes this possible. Index: structlib.php =================================================================== RCS file: /cvsroot/tikiwiki/tiki/lib/structures/structlib.php,v retrieving revision 1.10 retrieving revision 1.10.4.1 diff -u -d -r1.10 -r1.10.4.1 --- structlib.php 5 Jul 2003 17:33:12 -0000 1.10 +++ structlib.php 19 Jul 2003 01:19:44 -0000 1.10.4.1 @@ -108,7 +108,7 @@ $query = "update tiki_structures set pos=pos+1 where pos>$max and parent='$parent_sl'"; $result = $this->query($query); } - $cant = $this->getOne("select count(*) from tiki_structures where page='$name_sl'"); + $cant = $this->getOne("select count(*) from `tiki_structures` where `page`=?",array($name_sl)); if($cant) return false; $max++; $query = "insert into tiki_structures(parent,page,pos) values('$parent_sl','$name_sl',$max)"; @@ -233,7 +233,7 @@ function page_is_in_structure($page) { $page=addslashes($page); - $cant = $this->getOne("select count(*) from tiki_structures where page='$page'"); + $cant = $this->getOne("select count(*) from `tiki_structures` where `page`=?",array($page)); return $cant; } |