* [bug#51352,done,1h] change locate link of story-view in or.

This commit is contained in:
zhouxin
2024-06-19 10:46:51 +08:00
committed by 宋辰轩
parent 10b601fee3
commit 65660acd2b
+8 -1
View File
@@ -501,7 +501,14 @@ class story extends control
$product = $this->product->getByID((int)$story->product);
if($tab == 'product' and !empty($product->shadow)) return $this->send(array('result' => 'success', 'open' => array('url' => $uri, 'app' => 'project')));
if(!$story) return $this->send(array('result' => 'success', 'load' => array('alert' => $this->lang->notFound, 'locate' => $this->createLink($this->config->vision == 'lite' ? 'project' : 'product', 'index'))));
if(!$story)
{
$locateModule = $this->config->vision == 'lite' ? 'project' : 'product';
$locateMethod = ($this->config->edition == 'ipd' && $this->config->vision == 'or') ? 'browse' : 'index';
return $this->send(array('result' => 'success', 'load' => array('alert' => $this->lang->notFound, 'locate' => $this->createLink($locateModule, $locateMethod))));
}
if(!$this->app->user->admin and strpos(",{$this->app->user->view->products},", ",$story->product,") === false) return $this->send(array('result' => 'success', 'message' => $this->lang->product->accessDenied, 'load' => array('back' => true)));
$this->session->set('productList', $uri . "#app={$tab}", 'product');