本文整理汇总了PHP中file_bug_attachment_count函数的典型用法代码示例。如果您正苦于以下问题:PHP file_bug_attachment_count函数的具体用法?PHP file_bug_attachment_count怎么用?PHP file_bug_attachment_count使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了file_bug_attachment_count函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: file_bug_has_attachments
function file_bug_has_attachments($p_bug_id)
{
if (file_bug_attachment_count($p_bug_id) > 0) {
return true;
} else {
return false;
}
}
开发者ID:centaurustech,项目名称:BenFund,代码行数:8,代码来源:file_api.php
示例2: print_column_attachment_count
/**
* Print column content for column attachment count
*
* @param BugData $p_bug bug object
* @param int $p_columns_target see COLUMNS_TARGET_* in constant_inc.php
* @return null
* @access public
*/
function print_column_attachment_count($p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE)
{
global $t_icon_path;
# Check for attachments
$t_attachment_count = 0;
if (file_can_view_bug_attachments($p_bug->id, null)) {
$t_attachment_count = file_bug_attachment_count($p_bug->id);
}
echo '<td class="column-attachments">';
if ($t_attachment_count > 0) {
$t_href = string_get_bug_view_url($p_bug->id) . '#attachments';
$t_href_title = sprintf(lang_get('view_attachments_for_issue'), $t_attachment_count, $p_bug->id);
echo "<a href=\"{$t_href}\" title=\"{$t_href_title}\">{$t_attachment_count}</a>";
} else {
echo '   ';
}
echo "</td>\n";
}
开发者ID:N0ctrnl,项目名称:mantisbt,代码行数:26,代码来源:columns_api.php
示例3: print_column_attachment
function print_column_attachment($p_row, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE)
{
global $t_icon_path;
$t_show_attachments = config_get('show_attachment_indicator');
# Check for attachments
$t_attachment_count = 0;
if (ON == $t_show_attachments && file_can_view_bug_attachments($p_row['id'])) {
$t_attachment_count = file_bug_attachment_count($p_row['id']);
}
if (ON == $t_show_attachments) {
echo "\t<td>";
if (0 < $t_attachment_count) {
echo '<a href="' . string_get_bug_view_url($p_row['id']) . '#attachments">';
echo '<img border="0" src="' . $t_icon_path . 'attachment.png' . '"';
echo ' alt="' . lang_get('attachment_alt') . '"';
echo ' title="' . $t_attachment_count . ' ' . lang_get('attachments') . '"';
echo ' />';
echo '</a>';
} else {
echo ' ';
}
echo "</td>\n";
}
}
开发者ID:centaurustech,项目名称:BenFund,代码行数:24,代码来源:columns_api.php
示例4: mark_time
mark_time('begin loop');
# -- Loop over bug rows and create $v_* variables --
for ($i = 0; $i < sizeof($rows); $i++) {
# prefix bug data with v_
extract($rows[$i], EXTR_PREFIX_ALL, 'v');
$t_summary = string_attribute($v_summary);
$t_last_updated = date(config_get('normal_date_format'), $v_last_updated);
# choose color based on status
$status_color = get_status_color($v_status);
# grab the bugnote count
# @@@ thraxisp - not used???
# $bugnote_info = bug_get_bugnote_stats( $v_id );
# Check for attachments
$t_attachment_count = 0;
if (file_can_view_bug_attachments($v_id)) {
$t_attachment_count = file_bug_attachment_count($v_id);
}
# grab the project name
$project_name = project_get_field($v_project_id, 'name');
?>
<tr bgcolor="<?php
echo $status_color;
?>
">
<?php
# -- Bug ID and details link + Pencil shortcut --
?>
<td class="center" valign="top" width ="0" nowrap>
<span class="small">
<?php
开发者ID:jin255ff,项目名称:company_website,代码行数:31,代码来源:my_view_inc.php
示例5: get_attachment_count
/**
* return number of file attachment's linked to current bug
* @return int
*/
public function get_attachment_count()
{
if ($this->attachment_count === null) {
$this->attachment_count = file_bug_attachment_count($this->id);
return $this->attachment_count;
} else {
return $this->attachment_count;
}
}
开发者ID:rahmanjis,项目名称:dipstart-development,代码行数:13,代码来源:bug_api.php
示例6: print_column_attachment_count
/**
*
* @param BugData $p_bug bug obect
* @param int $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php
* @return null
* @access public
*/
function print_column_attachment_count( $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) {
global $t_icon_path;
# Check for attachments
# TODO: factor in the allow_view_own_attachments configuration option
# instead of just using a global check.
$t_attachment_count = 0;
if( file_can_view_bug_attachments( $p_bug->id, null ) ) {
$t_attachment_count = file_bug_attachment_count( $p_bug->id );
}
echo '<td class="center column-attachments">';
if ( $t_attachment_count > 0 ) {
$t_href = string_get_bug_view_url( $p_bug->id ) . '#attachments';
$t_href_title = sprintf( lang_get( 'view_attachments_for_issue' ), $t_attachment_count, $p_bug->id );
if ( config_get( 'show_attachment_indicator' ) ) {
$t_alt_text = $t_attachment_count . lang_get( 'word_separator' ) . lang_get( 'attachments' );
echo "<a href=\"$t_href\" title=\"$t_href_title\"><img src=\"${t_icon_path}attachment.png\" alt=\"$t_alt_text\" title=\"$t_alt_text\" /></a>";
} else {
echo "<a href=\"$t_href\" title=\"$t_href_title\">$t_attachment_count</a>";
}
} else {
echo '   ';
}
echo "</td>\n";
}
开发者ID:rombert,项目名称:mantisbt,代码行数:35,代码来源:columns_api.php
示例7: count
$t_count = count($rows);
if ($t_count == 0) {
echo '<tr><td> </td></tr>';
}
for ($i = 0; $i < $t_count; $i++) {
$t_bug = $rows[$i];
$t_summary = string_display_line_links($t_bug->summary);
$t_last_updated = date(config_get('normal_date_format'), $t_bug->last_updated);
# choose color based on status
$status_label = html_get_status_css_class($t_bug->status, auth_get_current_user_id(), $t_bug->project_id);
# Check for attachments
$t_attachment_count = 0;
# TODO: factor in the allow_view_own_attachments configuration option
# instead of just using a global check.
if (file_can_view_bug_attachments($t_bug->id, null)) {
$t_attachment_count = file_bug_attachment_count($t_bug->id);
}
# grab the project name
$project_name = project_get_field($t_bug->project_id, 'name');
if (VS_PRIVATE == $t_bug->view_state) {
$t_bug_class = 'my-buglist-private';
} else {
$t_bug_class = '';
}
?>
<tr class="my-buglist-bug <?php
echo $t_bug_class;
?>
<?php
echo $status_label;
开发者ID:N0ctrnl,项目名称:mantisbt,代码行数:31,代码来源:my_view_inc.php
示例8: print_column_attachment_count
/**
*
* @param BugData $p_bug bug obect
* @param int $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php
* @return null
* @access public
*/
function print_column_attachment_count($p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE)
{
global $t_icon_path;
# Check for attachments
$t_attachment_count = 0;
if (file_can_view_bug_attachments($p_bug->id)) {
$t_attachment_count = file_bug_attachment_count($p_bug->id);
}
echo '<td class="center column-attachments">';
if ($t_attachment_count > 0) {
$t_href = string_get_bug_view_url($p_bug->id) . '#attachments';
$t_href_title = sprintf(lang_get('view_attachments_for_issue'), $t_attachment_count, $p_bug->id);
if (config_get('show_attachment_indicator')) {
$t_alt_text = $t_attachment_count . lang_get('word_separator') . lang_get('attachments');
echo "<a href=\"{$t_href}\" title=\"{$t_href_title}\"><img src=\"{$t_icon_path}attachment.png\" alt=\"{$t_alt_text}\" title=\"{$t_alt_text}\" /></a>";
} else {
echo "<a href=\"{$t_href}\" title=\"{$t_href_title}\">{$t_attachment_count}</a>";
}
} else {
echo ' ';
}
echo "</td>\n";
}
开发者ID:kaos,项目名称:mantisbt,代码行数:30,代码来源:columns_api.php
示例9: csv_format_attachment_count
/**
* return the attachment count for an issue
* @param BugData $p_bug A BugData object.
* @return string
* @access public
*/
function csv_format_attachment_count(BugData $p_bug)
{
# Check for attachments
$t_attachment_count = 0;
if (file_can_view_bug_attachments($p_bug->id, null)) {
$t_attachment_count = file_bug_attachment_count($p_bug->id);
}
return csv_escape_string($t_attachment_count);
}
开发者ID:spring,项目名称:spring-website,代码行数:15,代码来源:csv_api.php
示例10: excel_format_attachment_count
/**
* Gets the attachment count for an issue
* @param BugData $p_bug A bug object.
* @return string
* @access public
*/
function excel_format_attachment_count(BugData $p_bug)
{
# Check for attachments
$t_attachment_count = 0;
if (file_can_view_bug_attachments($p_bug->id, null)) {
$t_attachment_count = file_bug_attachment_count($p_bug->id);
}
return excel_prepare_number($t_attachment_count);
}
开发者ID:spring,项目名称:spring-website,代码行数:15,代码来源:excel_api.php
示例11: print_bug_attachments
/**
* Prints bug-specific attachments
*
* @param $bug_id
*/
public function print_bug_attachments($bug_id)
{
$specmanagement_print_api = new specmanagement_print_api();
$attachment_count = file_bug_attachment_count($bug_id);
echo '<tr>';
echo '<td />';
echo '<td class="infohead" colspan="2">' . plugin_lang_get('editor_bug_attachments') . ' (' . $attachment_count . ')</td>';
echo '</tr>';
echo '<tr id="attachments">';
echo '<td />';
echo '<td class="bug-attachments" colspan="2">';
$specmanagement_print_api->print_bug_attachments_list($bug_id);
echo '</td>';
echo '</tr>';
}
开发者ID:Cre-ator,项目名称:Whiteboard.SpecificationManagement-Plugin,代码行数:20,代码来源:specmanagement_editor_api.php
注:本文中的file_bug_attachment_count函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论