* [task#136457,done,1h] add files for zt_action

This commit is contained in:
liumengyi
2025-01-17 15:29:19 +08:00
committed by 刘刚
parent cb69ffed6a
commit 331ffe9905
3 changed files with 20 additions and 0 deletions
+15
View File
@@ -89,6 +89,21 @@ class actionModel extends model
if(strpos($fromVersion, 'max') !== false && version_compare($fromVersion, 'max4.6', '<')) $hasRecentTable = false;
if(strpos($fromVersion, 'ipd') !== false && version_compare($fromVersion, 'ipd1.0.1', '<')) $hasRecentTable = false;
}
if($actionType == 'commented')
{
$oldAction = new stdclass();
$oldAction->id = $actionID;
$newAction = clone $oldAction;
$this->file->processFileDiffsForObject('comment', $oldAction, $newAction);
if(!empty($newAction->files))
{
$action->files = $newAction->files;
$this->dao->update(TABLE_ACTION)->set('files')->eq($newAction->files)->where('id')->eq($actionID)->exec();
}
$changes = common::createChanges($oldAction, $newAction);
if($changes) $this->logHistory($actionID, $changes);
}
if($hasRecentTable) $this->dao->insert(TABLE_ACTIONRECENT)->data($action)->autoCheck()->exec();
$this->file->updateObjectID($uid, $objectID, $objectType);