* Return id when create object by API.

This commit is contained in:
holan20180123
2021-05-12 16:03:12 +08:00
parent c5dd642138
commit c5ac6e1bbe
5 changed files with 52 additions and 41 deletions
+2
View File
@@ -142,6 +142,7 @@ class doc extends control
$this->action->create('docLib', $libID, 'Created');
if($this->viewType == 'json') $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $libID));
die(js::locate($this->createLink('doc', 'objectLibs', "type=$objectType&objectID=$objectID&libID=$libID"), 'parent.parent'));
}
else
@@ -288,6 +289,7 @@ class doc extends control
if(!empty($files)) $fileAction = $this->lang->addFiles . join(',', $files) . "\n" ;
$this->action->create('doc', $docID, 'Created', $fileAction);
if($this->viewType == 'json') $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $docID));
$objectID = zget($lib, $lib->type, '');
$params = "type={$lib->type}&objectID=$objectID&libID={$lib->id}&docID=" . $docResult['id'];
$link = $this->createLink('doc', 'objectLibs', $params);