当前位置: 首页>>代码示例>>PHP>>正文


PHP TBGSettings::isCommentTrailClean方法代码示例

本文整理汇总了PHP中TBGSettings::isCommentTrailClean方法的典型用法代码示例。如果您正苦于以下问题:PHP TBGSettings::isCommentTrailClean方法的具体用法?PHP TBGSettings::isCommentTrailClean怎么用?PHP TBGSettings::isCommentTrailClean使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TBGSettings的用法示例。


在下文中一共展示了TBGSettings::isCommentTrailClean方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: addSystemComment

 /**
  * Adds a system comment
  * 
  * @param string $title Comment title
  * @param string $text Comment text
  * @param integer $uid The user ID that posted the comment
  * 
  * @return TBGComment
  */
 public function addSystemComment($text, $uid)
 {
     $comment = new TBGComment();
     $comment->setTitle('');
     $comment->setContent($text);
     $comment->setPostedBy($uid);
     $comment->setTargetID($this->getID());
     $comment->setTargetType(TBGComment::TYPE_ISSUE);
     $comment->setSystemComment();
     if (!TBGSettings::isCommentTrailClean()) {
         $comment->save();
     }
     return $comment;
 }
开发者ID:oparoz,项目名称:thebuggenie,代码行数:23,代码来源:TBGIssue.class.php

示例2: __

 disabled<?php 
}
?>
>
				<option value=1<?php 
if (TBGSettings::isCommentTrailClean()) {
    ?>
 selected<?php 
}
?>
><?php 
echo __("Don't post system comments when an issue is updated");
?>
</option>
				<option value=0<?php 
if (!TBGSettings::isCommentTrailClean()) {
    ?>
 selected<?php 
}
?>
><?php 
echo __('Always post comments when an issue is updated');
?>
</option>
			</select>
		</td>
	</tr>
	<tr>
		<td class="config_explanation" colspan="2"><?php 
echo __('To keep the comment trail clean in issues, you can select not to post system comments when an issue is updated.');
?>
开发者ID:ronaldbroens,项目名称:thebuggenie,代码行数:31,代码来源:_general.inc.php

示例3: addSystemComment

 /**
  * Adds a system comment
  * 
  * @param string $title Comment title
  * @param string $text Comment text
  * @param integer $uid The user ID that posted the comment
  * 
  * @return TBGComment
  */
 public function addSystemComment($title, $text, $uid)
 {
     $comment = new TBGComment();
     $comment->setTitle($title);
     $comment->setContent($text);
     $comment->setPostedBy($uid);
     $comment->setTargetID($this->getID());
     $comment->setTargetType(TBGComment::TYPE_ISSUE);
     $comment->setSystemComment();
     if (!TBGSettings::isCommentTrailClean()) {
         $comment->save();
     }
     TBGEvent::createNew('core', 'TBGComment::createNew', $this, array('comment' => $comment))->trigger();
     return $comment;
 }
开发者ID:ronaldbroens,项目名称:thebuggenie,代码行数:24,代码来源:TBGIssue.class.php


注:本文中的TBGSettings::isCommentTrailClean方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。