예제 #1
0
    $threads = BoincThread::enum("forum = {$forum->id} and hidden=0 and status=0 {$since_clause}");
}
// there may be a better way to do this
$items = array();
foreach ($notifies as $n) {
    $i = null;
    $i->type = 0;
    $i->time = $n->create_time;
    $i->val = $n;
    $items[] = $i;
}
foreach ($threads as $t) {
    $i = null;
    $i->type = 1;
    $i->time = $t->create_time;
    $i->val = $t;
    $items[] = $i;
}
usort($items, 'notice_cmp');
notices_rss_start();
foreach ($items as $item) {
    switch ($item->type) {
        case 0:
            show_notify_rss_item($item->val);
            break;
        case 1:
            show_forum_rss_item($item->val, 0, 1, 0);
            break;
    }
}
notices_rss_end();
예제 #2
0
파일: notices.php 프로젝트: CalvinZhu/boinc
// there may be a better way to do this
$items = array();
foreach ($notifies as $n) {
    $i = new StdClass();
    $i->type = 0;
    $i->time = $n->create_time;
    $i->val = $n;
    $items[] = $i;
}
foreach ($threads as $t) {
    $i = new StdClass();
    $i->type = 1;
    $i->time = $t->create_time;
    $i->val = $t;
    $items[] = $i;
}
usort($items, 'notice_cmp');
$client_version = boinc_client_version();
$no_images = $client_version && $client_version < 70300;
notices_rss_start();
foreach ($items as $item) {
    switch ($item->type) {
        case 0:
            show_notify_rss_item($item->val);
            break;
        case 1:
            show_forum_rss_item($item->val, 0, 1, $no_images);
            break;
    }
}
notices_rss_end();