diff --git a/application/default/controllers/DataController.php b/application/default/controllers/DataController.php index 1bae8c02..091edb83 100755 --- a/application/default/controllers/DataController.php +++ b/application/default/controllers/DataController.php @@ -562,7 +562,7 @@ class DataController extends Zend_Controller_Action $this->view->ftptime=date('Y-m-d H:i:s', strtotime('+1 week')); $sql=$this->db->quoteInto("select * from ftpuser where userid=?",$userid); $row=$this->db->fetchRow($sql); - $datacount=$row['datacount']+1; + $datacount=$row['datacount']; foreach ($rows as $row) { $url=$row['linkage']; $p=parse_url($url); diff --git a/application/models/G6ftp.php b/application/models/G6ftp.php index c589a14e..7c646f2b 100644 --- a/application/models/G6ftp.php +++ b/application/models/G6ftp.php @@ -101,7 +101,7 @@ class G6ftp $sql="insert into ftpuser (userid,pwd,ts_created,ts_invalid,datacount) values(?,?,now(),?,1)"; $this->db->query($sql,array($user->id,$user->password,$user->time)); return true; - } elseif (strtotime($u['ts_invalid'])<=time() or $u['datacount']<2) { + } elseif (strtotime($u['ts_invalid'])<=time() or $u['datacount']<1) { //更新用户密码、数据地址和数据计数 //数据地址覆盖原来的信息 $sql=$this->db->quoteInto("update g6ftpusersettings set configvalue=? where configname='Password' and userid=".$userid,strtoupper('MD5:'.md5($user->password))); @@ -123,7 +123,7 @@ class G6ftp $sql=$this->db->quoteInto("update g6ftpusersettings set configvalue=configvalue||'\n'||? where configname='AccessList' and userid=".$userid,$this->getuserpath1($user->path)); $this->db->query($sql); $sql="update ftpuser set ts_invalid=?,datacount=? where userid=?"; - $this->db->query($sql,array($user->time,$user->datacount,$user->id)); + $this->db->query($sql,array($user->time,$user->datacount+1,$user->id)); } else { $sql="select pwd,ts_invalid from ftpuser where userid=?"; $u=$this->db->fetchRow($sql,array($user->id));