修复错误

This commit is contained in:
zyx0814 2024-08-10 13:35:59 +08:00
parent 8d1eba8737
commit 4bad1530d1
2 changed files with 2 additions and 2 deletions

View File

@ -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));
}
}

View File

@ -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;
}
}