* [bug#51352,done,1h] change locate link of story-view in or.
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user