修复不能导入文件列表问题
This commit is contained in:
parent
10bfd90b2c
commit
c6aa2209d1
|
@ -35,7 +35,7 @@
|
||||||
|
|
||||||
//delete dataset & datafile records
|
//delete dataset & datafile records
|
||||||
$sql="delete from dataset where uuid='$uuid'";
|
$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";
|
$sql = "INSERT INTO dataset (uuid,path) VALUES ('$uuid','$homedir') RETURNING id";
|
||||||
$result=pg_query($link,$sql);
|
$result=pg_query($link,$sql);
|
||||||
|
@ -55,9 +55,8 @@
|
||||||
$depth=substr_count($filename,"/")+1;
|
$depth=substr_count($filename,"/")+1;
|
||||||
if (substr($filename,-1,1)=='/') $depth--;
|
if (substr($filename,-1,1)=='/') $depth--;
|
||||||
//$this->chmodr($path.$v,0444);
|
//$this->chmodr($path.$v,0444);
|
||||||
$sql = "INSERT INTO datafile (dsid,filename,filesize,isdir,depth) VALUES (?,?,?,?,?)";
|
$sql = "INSERT INTO datafile (dsid,filename,filesize,isdir,depth) VALUES ('$dsid','$filename','$filesize','$isdir','$depth')";
|
||||||
$sth = $this->db->prepare($sql);
|
$rs = pg_query($link,$sql);
|
||||||
$rs = $sth->execute(array($dsid,$filename,$filesize,$isdir,$depth));
|
|
||||||
if(!$rs)
|
if(!$rs)
|
||||||
{
|
{
|
||||||
$messages[] = "数据文件".$filename.'写入失败';
|
$messages[] = "数据文件".$filename.'写入失败';
|
||||||
|
|
Loading…
Reference in New Issue