增加离线申请限制
This commit is contained in:
parent
eed79dc33a
commit
867b746458
|
@ -153,9 +153,13 @@ class Order
|
|||
$uid = view::User('id');
|
||||
}
|
||||
|
||||
$sql = "select count(*) as cnt from dataorder where status=1 and uuid in (select uuid from en.mdstatus) and userid=".$uid;
|
||||
$row=$this->db->FetchRow($sql);
|
||||
if ($row['cnt']>=$this->config->download->max) return "Reached the maximum limits of one offline application. Please remove some data.";
|
||||
|
||||
if($id == -1)
|
||||
{
|
||||
$sql = $this->db->quoteInto("update dataorder set status=2 where status=1 and userid=?",$uid);
|
||||
$sql = $this->db->quoteInto("update dataorder set status=2 where status=1 and uuid in (select uuid from en.mdstatus) and userid=?",$uid);
|
||||
if($this->db->exec($sql))
|
||||
{
|
||||
return true;
|
||||
|
@ -166,7 +170,7 @@ class Order
|
|||
|
||||
if($id > 0)
|
||||
{
|
||||
$sql = $this->db->quoteInto("update dataorder set status=2 where status=1 and userid=$uid and id=?",$id);
|
||||
$sql = $this->db->quoteInto("update dataorder set status=2 where status=1 and uuid in (select uuid from en.mdstatus) and userid=$uid and id=?",$id);
|
||||
if($this->db->exec($sql))
|
||||
{
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue