diff --git a/module/story/view/affected.html.php b/module/story/view/affected.html.php index 9127a8b87b..a8f580e29b 100644 --- a/module/story/view/affected.html.php +++ b/module/story/view/affected.html.php @@ -1,22 +1,24 @@ twins) ? count(explode( ',', trim($story->twins, ','))) + 1 : 0; -$lang->story->currentBranch = sprintf($this->lang->story->currentBranch, $this->lang->product->branchName[$product->type]); -js::set('relieveURL', inlink('ajaxRelieveTwins')); -js::set('storyID', $story->id); -js::set('relieved', $lang->story->relieved); -js::set('relievedTip', $lang->story->relievedTip); -js::set('cancel', $lang->cancel); -$canViewLinkStory = common::hasPriv('story', 'view'); -$canRelieved = common::hasPriv('story', 'relieved'); -array_unshift($twins, $story); -$twinsClass = isonlybody() ? 'showinonlybody' : 'iframe'; -?> +if(isset($twins)) +{ + $twinsCount = !empty($story->twins) ? count(explode( ',', trim($story->twins, ','))) + 1 : 0; + $lang->story->currentBranch = sprintf($this->lang->story->currentBranch, $this->lang->product->branchName[$product->type]); + js::set('relieveURL', inlink('ajaxRelieveTwins')); + js::set('storyID', $story->id); + js::set('relieved', $lang->story->relieved); + js::set('relievedTip', $lang->story->relievedTip); + js::set('cancel', $lang->cancel); + $canViewLinkStory = common::hasPriv('story', 'view'); + $canRelieved = common::hasPriv('story', 'relieved'); + array_unshift($twins, $story); + $twinsClass = isonlybody() ? 'showinonlybody' : 'iframe'; +}?>