Beispiel #1
0
    $listData['_uid_field'] = 'd_completed';
    $listData['_feed_descr'] = $lang->get('feed_completed_tasks');
    $sqlWhere = 'AND compl=1';
} elseif ($feedType == 'modified') {
    $listData['_uid_field'] = 'd_edited';
    $listData['_feed_descr'] = $lang->get('feed_modified_tasks');
} elseif ($feedType == 'current') {
    $listData['_uid_field'] = 'd_created';
    $listData['_feed_descr'] = $lang->get('feed_new_tasks');
    $sqlWhere = 'AND compl=0';
} else {
    $listData['_uid_field'] = 'd_created';
    $listData['_feed_descr'] = $lang->get('feed_new_tasks');
}
$listData['_feed_title'] = sprintf($lang->get('feed_title'), $listData['name']) . ' - ' . $listData['_feed_descr'];
htmlarray_ref($listData);
$data = array();
$q = $db->dq("SELECT * FROM {$db->prefix}todolist WHERE list_id={$listId} {$sqlWhere} ORDER BY " . $listData['_uid_field'] . " DESC LIMIT 100");
while ($r = $q->fetch_assoc($q)) {
    if ($r['prio'] > 0) {
        $r['prio'] = '+' . $r['prio'];
    }
    $a = array();
    if ($r['prio']) {
        $a[] = $lang->get('priority') . ": {$r['prio']}";
    }
    if ($r['duedate'] != '') {
        $ad = explode('-', $r['duedate']);
        $a[] = $lang->get('due') . ": " . formatDate3(Config::get('dateformat'), (int) $ad[0], (int) $ad[1], (int) $ad[2], $lang);
    }
    if ($r['tags'] != '') {
Beispiel #2
0
function htmlarray($a, $exclude = null)
{
    htmlarray_ref($a, $exclude);
    return $a;
}