Skip to content

Commit

Permalink
Update modResource.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Pathologic committed Nov 14, 2023
1 parent 5e657c8 commit 894c77d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/modResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -526,8 +526,12 @@ public function save($fire_events = false, $clearCache = false)
if (!empty($this->groupIds)) {
$this->setDocumentGroups($this->id, $this->groupIds);
}

$mode = $this->newDoc ? 'new' : 'upd';
$this->newDoc = false;

$this->invokeEvent('OnDocFormSave', [
'mode' => $this->newDoc ? "new" : "upd",
'mode' => $mode,
'id' => isset($this->id) ? $this->id : '',
'doc' => $this->toArray(),
'docObj' => $this
Expand Down

0 comments on commit 894c77d

Please sign in to comment.