diff --git a/application/default/controllers/HeiheController.php b/application/default/controllers/HeiheController.php index 9c891309..a44da492 100644 --- a/application/default/controllers/HeiheController.php +++ b/application/default/controllers/HeiheController.php @@ -500,7 +500,7 @@ class HeiheController extends DataController $this->db->query($sql,array($changelog,$u_id,$row['uuid'])); // 处理文件权限和数据信息 - $ftp_user = "qherc".$u_id."upload"; + $ftp_user = "heihe".$u_id."upload"; $sql = "SELECT * FROM pureftp WHERE userid=? AND homedir LIKE ?"; $sth = $this->db->prepare($sql); $sth->execute(array($ftp_user,'%'.$uuid.'%')); @@ -519,6 +519,10 @@ class HeiheController extends DataController $sql="delete from dataset where uuid=?"; $sth = $this->db->prepare($sql); $sth->execute(array($uuid)); + //自动添加数据分类为黑河 + $sql="insert into datasource (uuid,sourceid) values(?,1)"; + $sth=$this->db->prepare($sql); + try{$sth->execute(array($uuid));}catch(Exception $e) {} $sql = "INSERT INTO dataset (uuid,path) VALUES (?,?) RETURNING id"; $sth = $this->db->prepare($sql); @@ -532,7 +536,7 @@ class HeiheController extends DataController $this->jsonexit($data); return true; */ - } + } $temp = $sth->fetch(PDO::FETCH_ASSOC); @@ -637,10 +641,10 @@ class HeiheController extends DataController } //ftp 用户名 - $uname = 'qherc'.$userid.'upload'; + $uname = 'heihe'.$u_id.'upload'; //ftp路径 - $homedir = "/home/wlx/qhhdata/upload/".$uuid."/"; + $homedir = "/var/www/westdc.westgis.ac.cn/data/heihe_upload/".$uuid."/"; $sql = "SELECT * FROM pureftp WHERE userid='$uname' ORDER BY pkid DESC"; $sth = $this->db->prepare($sql);