* fix a bug.

This commit is contained in:
wangyidong
2014-08-21 01:54:42 +00:00
parent 60595ffa00
commit 5d2a658222
4 changed files with 26 additions and 24 deletions
+2 -2
View File
@@ -250,10 +250,10 @@ class doc extends control
if(!empty($_POST))
{
$docResult = $this->doc->create();
$docID = $docResult['id'];
if(!$docResult or dao::isError()) die(js::error(dao::getError()));
$docID = $docResult['id'];
if($docResult['status'] == 'existed') die(js::locate($this->createLink('doc', 'view', "docID=$docID"), 'parent'));
if(dao::isError()) die(js::error(dao::getError()));
$this->action->create('doc', $docID, 'Created');
if($from == 'product') $link = $this->createLink('product', 'doc', "productID={$this->post->product}");