修复不能导入文件列表问题

This commit is contained in:
wlx 2012-11-17 08:54:43 +00:00
parent 10bfd90b2c
commit c6aa2209d1
1 changed files with 3 additions and 4 deletions

View File

@ -35,7 +35,7 @@
//delete dataset & datafile records
$sql="delete from dataset where uuid='$uuid'";
pg_execute($link,$sql);
pg_query($link,$sql);
$sql = "INSERT INTO dataset (uuid,path) VALUES ('$uuid','$homedir') RETURNING id";
$result=pg_query($link,$sql);
@ -55,9 +55,8 @@
$depth=substr_count($filename,"/")+1;
if (substr($filename,-1,1)=='/') $depth--;
//$this->chmodr($path.$v,0444);
$sql = "INSERT INTO datafile (dsid,filename,filesize,isdir,depth) VALUES (?,?,?,?,?)";
$sth = $this->db->prepare($sql);
$rs = $sth->execute(array($dsid,$filename,$filesize,$isdir,$depth));
$sql = "INSERT INTO datafile (dsid,filename,filesize,isdir,depth) VALUES ('$dsid','$filename','$filesize','$isdir','$depth')";
$rs = pg_query($link,$sql);
if(!$rs)
{
$messages[] = "数据文件".$filename.'写入失败';