示例#1
0
 disabled<?php 
}
?>
>
                <option value=1<?php 
if (\thebuggenie\core\framework\Settings::isCommentTrailClean()) {
    ?>
 selected<?php 
}
?>
><?php 
echo __("Don't post system comments when an issue is updated");
?>
</option>
                <option value=0<?php 
if (!\thebuggenie\core\framework\Settings::isCommentTrailClean()) {
    ?>
 selected<?php 
}
?>
><?php 
echo __('Always post comments when an issue is updated');
?>
</option>
            </select>
            <?php 
echo config_explanation(__('To keep the comment trail clean in issues, you can select not to post system comments when an issue is updated.') . "<br><br>(" . __('The issue log will always be updated regardless of this setting.') . ")");
?>
        </td>
    </tr>
    <tr>
示例#2
0
 /**
  * Adds a system comment
  *
  * @param string $text Comment text
  * @param integer $uid The user ID that posted the comment
  *
  * @return \thebuggenie\core\entities\Comment
  */
 public function addSystemComment($text, $uid)
 {
     $comment = new Comment();
     $comment->setContent($text);
     $comment->setPostedBy($uid);
     $comment->setTargetID($this->getID());
     $comment->setTargetType(Comment::TYPE_ISSUE);
     $comment->setSystemComment();
     if (!\thebuggenie\core\framework\Settings::isCommentTrailClean()) {
         $comment->save();
     }
     return $comment;
 }
示例#3
0
 /**
  * Adds a system comment
  *
  * @param string $text Comment text
  * @param integer $uid The user ID that posted the comment
  *
  * @return Comment
  */
 public function addSystemComment($text, $uid, $module = 'core')
 {
     $comment = new Comment();
     $comment->setContent($text);
     $comment->setPostedBy($uid);
     $comment->setTargetID($this->getID());
     $comment->setTargetType(Comment::TYPE_ISSUE);
     $comment->setSystemComment();
     $comment->setModuleName($module);
     if (!framework\Settings::isCommentTrailClean()) {
         $comment->save();
     }
     return $comment;
 }