mirror of
https://github.com/zyx0814/dzzoffice.git
synced 2025-01-07 03:16:58 +08:00
修复错误
This commit is contained in:
parent
8d1eba8737
commit
4bad1530d1
@ -470,7 +470,7 @@ class table_organization extends dzz_table
|
||||
self::setPathkeyByOrgid($setarr['orgid']);
|
||||
if($setarr['type']=='0'){
|
||||
//更新disp
|
||||
foreach(DB::fetch_all("select orgid,disp form %t where forgid=%d and type='0' and disp>=%d and orgid!=%d",array($this->_table,$setarr['forgid'],intval($setarr['disp']),$setarr['orgid'] )) as $value){
|
||||
foreach(DB::fetch_all("select orgid,disp from %t where forgid=%d and type='0' and disp>=%d and orgid!=%d",array($this->_table,$setarr['forgid'],intval($setarr['disp']),$setarr['orgid'] )) as $value){
|
||||
parent::update($value['orgid'],array('disp'=>$value['disp']+1));
|
||||
}
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ class table_resources_version extends dzz_table
|
||||
if(empty($rid)) $rid=$vinfo['rid'];
|
||||
$datainfo = C::t('resources')->fetch_info_by_rid($rid);
|
||||
if($datainfo['vid']==$vinfo['vid']){//如果删除的是主版本,判断是否是最后一个版本,最后一个版本不让删除
|
||||
if(!$nvid=DB::result_first("select vid form %t where rid=%s and vid!=%d order by vid DESC",array($this->_table,$rid,$vid))){
|
||||
if(!$nvid=DB::result_first("select vid from %t where rid=%s and vid!=%d order by vid DESC",array($this->_table,$rid,$vid))){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user