This commit is contained in:
liugang
2018-04-17 15:56:58 +08:00
5 changed files with 59 additions and 65 deletions
+6 -8
View File
@@ -222,12 +222,9 @@ class product extends control
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
$this->loadModel('action')->create('product', $productID, 'opened');
if(isset($this->config->global->flow) and $this->config->global->flow == 'onlyTest')
{
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink($this->moduleName, 'build', "productID=$productID")));
}
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink($this->moduleName, 'browse', "productID=$productID")));
$locate = $this->createLink($this->moduleName, 'browse', "productID=$productID");
if(isset($this->config->global->flow) and $this->config->global->flow == 'onlyTest') $locate = $this->createLink($this->moduleName, 'build', "productID=$productID");
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locate));
}
$this->product->setMenu($this->products, key($this->products));
@@ -256,7 +253,7 @@ class product extends control
if(!empty($_POST))
{
$changes = $this->product->update($productID);
if(dao::isError()) die(js::error(dao::getError()));
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
if($action == 'undelete')
{
$this->loadModel('action');
@@ -269,7 +266,8 @@ class product extends control
$actionID = $this->loadModel('action')->create('product', $productID, 'edited');
$this->action->logHistory($actionID, $changes);
}
die(js::locate(inlink('view', "product=$productID"), 'parent'));
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('view', "product=$productID")));
}
$this->product->setMenu($this->products, $productID);