* Fix bug #32962.
This commit is contained in:
+13
-13
@@ -482,19 +482,19 @@ class actionModel extends model
|
||||
if($name) $action->extra = common::hasPriv('testtask', 'view') ? html::a(helper::createLink('testtask', 'view', "taskID=$action->extra"), $name) : $name;
|
||||
}
|
||||
elseif(strpos('feedback,ticket', $action->objectType) === false and $actionName == 'tostory')
|
||||
{
|
||||
$productShadow = $this->dao->select('*')->from(TABLE_PRODUCT)->where('id')->in($action->product)->fetch('shadow');
|
||||
$title = $this->dao->select('title')->from(TABLE_STORY)->where('id')->eq($action->extra)->fetch('title');
|
||||
$defaultExtra = "#$action->extra ". $title;
|
||||
if($productShadow === "1")
|
||||
{
|
||||
$projectID = $this->dao->select('project')->from(TABLE_PROJECTPRODUCT)->where('product')->in($action->product)->fetch('project');
|
||||
if($title) $action->extra = common::hasPriv('projectstory', 'story') && $projectID ? html::a(helper::createLink('projectstory', 'story', "projectID=$projectID"), $defaultExtra) : $defaultExtra;
|
||||
}
|
||||
else
|
||||
{
|
||||
if($title) $action->extra = common::hasPriv('story', 'view') ? html::a(helper::createLink('story', 'view', "storyID=$action->extra"), $defaultExtra) : $defaultExtra;
|
||||
}
|
||||
{
|
||||
$productShadow = $this->dao->select('shadow')->from(TABLE_PRODUCT)->where('id')->in(trim($action->product, ','))->fetch('shadow');
|
||||
$title = $this->dao->select('title')->from(TABLE_STORY)->where('id')->eq($action->extra)->fetch('title');
|
||||
$defaultExtra = "#$action->extra " . $title;
|
||||
if($productShadow)
|
||||
{
|
||||
$projectID = $this->dao->select('project')->from(TABLE_PROJECTSTORY)->where('story')->eq($action->extra)->fetch('project');
|
||||
if($title) $action->extra = (common::hasPriv('projectstory', 'view') and $projectID) ? html::a(helper::createLink('projectstory', 'view', "storyID={$action->extra}&projectID=$projectID"), $defaultExtra) : $defaultExtra;
|
||||
}
|
||||
else
|
||||
{
|
||||
if($title) $action->extra = common::hasPriv('story', 'view') ? html::a(helper::createLink('story', 'view', "storyID=$action->extra"), $defaultExtra) : $defaultExtra;
|
||||
}
|
||||
}
|
||||
elseif($actionName == 'importedcard')
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user