* Remove productplan die

This commit is contained in:
zenggang
2022-07-15 02:51:57 +00:00
parent 27b4774795
commit 410bd4d3aa
+13 -13
View File
@@ -244,11 +244,11 @@ class productplan extends control
public function delete($planID, $confirm = 'no')
{
$plan = $this->productplan->getById($planID);
if($plan->parent < 0) die(js::alert($this->lang->productplan->cannotDeleteParent));
if($plan->parent < 0) return print(js::alert($this->lang->productplan->cannotDeleteParent));
if($confirm == 'no')
{
die(js::confirm($this->lang->productplan->confirmDelete, $this->createLink('productPlan', 'delete', "planID=$planID&confirm=yes")));
return print(js::confirm($this->lang->productplan->confirmDelete, $this->createLink('productPlan', 'delete', "planID=$planID&confirm=yes")));
}
else
{
@@ -274,7 +274,7 @@ class productplan extends control
}
if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess));
die(js::reload('parent'));
return print(js::reload('parent'));
}
}
@@ -390,7 +390,7 @@ class productplan extends control
if(!$plan)
{
if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'fail', 'code' => 404, 'message' => '404 Not found'));
die(js::error($this->lang->notFound) . js::locate($this->createLink('product', 'index')));
return print(js::error($this->lang->notFound) . js::locate($this->createLink('product', 'index')));
}
$this->session->set('storyList', $this->createLink('productplan', 'view', "planID=$planID&type=story"), 'product');
@@ -543,14 +543,14 @@ class productplan extends control
{
if($confirm == 'no')
{
die(js::confirm($this->lang->productplan->confirmActivate, $this->createLink('productplan', 'activate', "planID=$planID&confirm=yes"), 'parent'));
return print(js::confirm($this->lang->productplan->confirmActivate, $this->createLink('productplan', 'activate', "planID=$planID&confirm=yes"), 'parent'));
}
else
{
$this->productplan->updateStatus($planID, 'doing', 'activated');
if(dao::isError()) die(js::error(dao::getError()));
die(js::reload('parent'));
if(dao::isError()) return print(js::error(dao::getError()));
return print(js::reload('parent'));
}
}
@@ -625,7 +625,7 @@ class productplan extends control
{
$this->productplan->linkStory($planID);
if($this->viewType == 'json') return $this->send(array('result' => 'success'));
die(js::locate(inlink('view', "planID=$planID&type=story&orderBy=$orderBy"), 'parent'));
return print(js::locate(inlink('view', "planID=$planID&type=story&orderBy=$orderBy"), 'parent'));
}
$this->session->set('storyList', inlink('view', "planID=$planID&type=story&orderBy=$orderBy&link=true&param=" . helper::safe64Encode("&browseType=$browseType&queryID=$param")), 'product');
@@ -710,7 +710,7 @@ class productplan extends control
{
if($confirm == 'no')
{
die(js::confirm($this->lang->productplan->confirmUnlinkStory, $this->createLink('productplan', 'unlinkstory', "storyID=$storyID&planID=$planID&confirm=yes")));
return print(js::confirm($this->lang->productplan->confirmUnlinkStory, $this->createLink('productplan', 'unlinkstory', "storyID=$storyID&planID=$planID&confirm=yes")));
}
else
{
@@ -732,7 +732,7 @@ class productplan extends control
}
return $this->send($response);
}
die(js::reload('parent'));
return print(js::reload('parent'));
}
}
@@ -771,7 +771,7 @@ class productplan extends control
{
$this->productplan->linkBug($planID);
if($this->viewType == 'json') return $this->send(array('result' => 'success'));
die(js::locate(inlink('view', "planID=$planID&type=bug&orderBy=$orderBy"), 'parent'));
return print(js::locate(inlink('view', "planID=$planID&type=bug&orderBy=$orderBy"), 'parent'));
}
/* Load module and set session. */
@@ -852,7 +852,7 @@ class productplan extends control
{
if($confirm == 'no')
{
die(js::confirm($this->lang->productplan->confirmUnlinkBug, $this->createLink('productplan', 'unlinkbug', "bugID=$bugID&confirm=yes")));
return print(js::confirm($this->lang->productplan->confirmUnlinkBug, $this->createLink('productplan', 'unlinkbug', "bugID=$bugID&confirm=yes")));
}
else
{
@@ -874,7 +874,7 @@ class productplan extends control
}
return $this->send($response);
}
die(js::reload('parent'));
return print(js::reload('parent'));
}
}