Merge branch 'zenops_46' into 'zenops_46_tanghucheng'

# Conflicts:
#   module/zanode/view/view.html.php
This commit is contained in:
唐胡成
2022-11-29 01:38:30 +00:00
480 changed files with 11124 additions and 3301 deletions
+14 -8
View File
@@ -214,17 +214,25 @@ class zanodemodel extends model
}
/**
* Update Node attribute.
* Update Node.
*
* @param int $id
* @param array $data
* @return void
*/
public function update($id, $data)
public function update($id)
{
$this->dao->update(TABLE_ZAHOST)->data($data)
->where('id')->eq($id)
->exec();
$oldHost = $this->getNodeById($id);
$hostInfo = fixer::input('post')->get();
$hostInfo->editedBy = $this->app->user->account;
$hostInfo->editedDate = helper::now();
$this->dao->update(TABLE_ZAHOST)->data($hostInfo)
->batchCheck($this->config->zanode->edit->requiredFields, 'notempty');
if(dao::isError()) return false;
$this->dao->update(TABLE_ZAHOST)->data($hostInfo)->autoCheck()
->where('id')->eq($id)->exec();
return common::createChanges($oldHost, $hostInfo);
}
/**
@@ -446,8 +454,6 @@ class zanodemodel extends model
$params = "id=$node->id";
$menu .= $this->buildMenu('zanode', 'edit', $params, $node, 'view');
$params = "id=$node->id";
$menu .= $this->buildMenu('zanode', 'delete', $params, $node, 'view', 'trash', 'hiddenwin');
return $menu;