Browse Source

处理IO接口重命名失败的情况 (#347)

pull/352/head
小胡 2 weeks ago
committed by GitHub
parent
commit
911f565ffe
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      core/class/io/io_dzz.php
  2. 4
      core/class/table/table_resources.php

1
core/class/io/io_dzz.php

@ -99,6 +99,7 @@ class io_dzz extends io_api {
if (!$arr = C::t('resources')->rename_by_rid($rid, $text)) {
return array('error' => 'Not modified!');
}
if($arr['error']) return array('error' => $arr['error']);
$icoarr['name'] = $text;
return $icoarr;
}

4
core/class/table/table_resources.php

@ -68,7 +68,7 @@ class table_resources extends dzz_table {
}
$fid = $infoarr['pfid'];
if (!perm_check::checkperm_Container($infoarr['pfid'], 'edit2') && !($_G['uid'] == $infoarr['uid'] && perm_check::checkperm_Container($infoarr['pfid'], 'edit1'))) {
return array('error' => true);
return array('error' => lang('no_privilege'));
}
$setarr = array(
'isdelete' => 1,
@ -100,7 +100,7 @@ class table_resources extends dzz_table {
$this->clear_cache($rid);
return array('newname' => $newname);
}
return array('error' => true);
return array('error' => lang('rechristen_error'));
}
//查询文件表基础信息 $notisdelete是否是已删除

Loading…
Cancel
Save