Esempio n. 1
0
			</form>
		</div>
	</div>
<?php 
}
?>
<div class="faded_out comments_none" id="comments_none" <?php 
if (TBGComment::countComments($target_id, $target_type) != 0) {
    ?>
style="display: none;"<?php 
}
?>
><?php 
echo __('There are no comments');
?>
</div>
<div id="comments_box">
	<?php 
foreach (TBGComment::getComments($target_id, $target_type) as $comment) {
    ?>
		<?php 
    $options = array('comment' => $comment);
    if (isset($issue)) {
        $options['issue'] = $issue;
    }
    include_template('main/comment', $options);
    ?>
	<?php 
}
?>
</div>
        ?>
","<?php 
        echo $issue->getVotes();
        ?>
","<?php 
        echo str_replace('"', '\\"', html_entity_decode($issue->getDescription(), ENT_QUOTES, TBGContext::getI18n()->getCharset()));
        ?>
 ", "<?php 
        echo str_replace('"', '\\"', html_entity_decode($reproductionsteps, ENT_QUOTES, TBGContext::getI18n()->getCharset()));
        ?>
", "

<?php 
        if ($issue->getCommentCount() == 0) {
            echo '-';
        }
        foreach (TBGComment::getComments($issue->getFormattedIssueNo(), '1') as $comment) {
            ?>
		<?php 
            $options = compact('comment', 'comment_count_div');
            if (isset($issue)) {
                echo $comment->getPostedBy() . ' : ' . $comment->getContent() . ' ';
            }
            ?>
	<?php 
        }
        ?>
"
<?php 
    }
}
 /**
  * Populate comments array
  */
 protected function _populateComments()
 {
     if ($this->_comments === null) {
         $this->_comments = TBGComment::getComments($this->getID(), TBGComment::TYPE_ISSUE);
         $this->_num_comments = count($this->_comments);
         $sc = 0;
         foreach ($this->_comments as $comment) {
             if ($comment->isSystemComment()) {
                 $sc++;
             }
         }
         $this->_num_user_comments = $sc;
     }
 }