示例#1
0
    # belongs to a private project (will only happen
    if (VS_PRIVATE == $v_view_state) {
        continue;
    }
    $v_headline = string_rss_links($v_headline);
    $v_body = string_rss_links($v_body);
    $v_date_posted = date('Y-m-d\\TH:i:sO', $v_date_posted);
    $about = $link = config_get('path') . "news_view_page.php?news_id={$v_id}";
    $title = $v_headline;
    $description = $v_body;
    # optional DC value
    $subject = $title;
    # optional DC value
    $date = $v_date_posted;
    # author of item
    $author = string_rss_links(user_get_name($v_poster_id));
    if (access_has_global_level(config_get('show_user_email_threshold'))) {
        $t_author_email = user_get_field($v_poster_id, 'email');
        if (is_blank($t_author_email)) {
            $t_author_email = $author . '@example.com';
        }
    } else {
        $t_author_email = $author . '@example.com';
    }
    $author .= ' <' . $t_author_email . '>';
    # $comments = 'http://www.example.com/sometext.php?somevariable=somevalue&comments=1';	# url to comment page rss 2.0 value
    $comments = '';
    # optional mod_im value for dispaying a different pic for every item
    $image = '';
    $rssfile->addItem($about, $title, $link, $description, $subject, $date, $author, $comments, $image);
}
    if (null === $t_custom_filter) {
        access_denied();
    }
    $t_custom_filter = filter_deserialize($t_custom_filter);
}
$t_issues = filter_get_bug_rows($t_page_number, $t_issues_per_page, $t_page_count, $t_issues_count, $t_custom_filter, $t_project_id, $t_user_id, $t_show_sticky);
$t_issues_count = count($t_issues);
# Loop through results
for ($i = 0; $i < $t_issues_count; $i++) {
    $t_bug = $t_issues[$i];
    $about = $link = $t_path . "view.php?id=" . $t_bug->id;
    $title = bug_format_id($t_bug->id) . ': ' . $t_bug->summary;
    if ($t_bug->view_state == VS_PRIVATE) {
        $title .= ' [' . lang_get('private') . ']';
    }
    $description = string_rss_links($t_bug->description);
    # subject is category.
    $subject = category_full_name($t_bug->category_id, false);
    # optional DC value
    $date = $t_bug->last_updated;
    # author of item
    $author = '';
    if (access_has_global_level(config_get('show_user_email_threshold'))) {
        $t_author_name = user_get_name($t_bug->reporter_id);
        $t_author_email = user_get_field($t_bug->reporter_id, 'email');
        if (!is_blank($t_author_email)) {
            if (!is_blank($t_author_name)) {
                $author = $t_author_name . ' <' . $t_author_email . '>';
            } else {
                $author = $t_author_email;
            }
示例#3
0
    $t_custom_filter = filter_deserialize($t_custom_filter);
}
$t_issues = filter_get_bug_rows($t_page_number, $t_issues_per_page, $t_page_count, $t_issues_count, $t_custom_filter, $t_project_id, $t_user_id, $t_show_sticky);
# Loop through results
for ($i = 0; $i < count($t_issues); $i++) {
    $row = $t_issues[$i];
    $t_bug = bug_get($row['id'], true);
    $about = $link = $t_path . "view.php?id=" . $row['id'];
    $title = string_rss_links(bug_format_id($row['id']) . ': ' . $t_bug->summary);
    $description = string_rss_links($t_bug->description);
    # subject is category.
    $subject = string_rss_links($t_bug->category);
    # optional DC value
    $date = date('Y-m-d\\TH:i:sO', $t_bug->last_updated);
    # author of item
    $author = string_rss_links(user_get_name($t_bug->reporter_id));
    if (access_has_global_level(config_get('show_user_email_threshold'))) {
        $t_author_email = user_get_field($t_bug->reporter_id, 'email');
        if (is_blank($t_author_email)) {
            $t_author_email = $author . '@example.com';
        }
    } else {
        $t_author_email = $author . '@example.com';
    }
    $author .= ' &lt;' . $t_author_email . '&gt;';
    # $comments = 'http://www.example.com/sometext.php?somevariable=somevalue&comments=1';	# url to comment page rss 2.0 value
    $comments = $t_path . 'view.php?id=' . $row['id'] . '#bugnotes';
    # optional mod_im value for dispaying a different pic for every item
    $image = '';
    $rssfile->addItem($about, $title, $link, $description, $subject, $date, $author, $comments, $image);
}