diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-08-20 18:43:01 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-08-20 18:43:01 -0700 |
commit | afbbc9cd72e48a9eb4fb035eb01cd6e742d0088e (patch) | |
tree | 7b059c8ae935238f472fb02aa859a020bd08499f /include/event.php | |
parent | 05bec13bdc59713c89f0545d3a2955d886969dba (diff) | |
download | volse-hubzilla-afbbc9cd72e48a9eb4fb035eb01cd6e742d0088e.tar.gz volse-hubzilla-afbbc9cd72e48a9eb4fb035eb01cd6e742d0088e.tar.bz2 volse-hubzilla-afbbc9cd72e48a9eb4fb035eb01cd6e742d0088e.zip |
more work on tasks
Diffstat (limited to 'include/event.php')
-rw-r--r-- | include/event.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/event.php b/include/event.php index 95808452d..fad852dfc 100644 --- a/include/event.php +++ b/include/event.php @@ -918,3 +918,27 @@ function todo_stat() { 'CANCELLED' => t('Cancelled') ); } + + +function tasks_fetch($arr) { + + if(! local_channel()) + return; + + $ret = array(); + $sql_extra = " and event_status != 'COMPLETED' "; + if(argc() > 1 && argv(1) === 'all') + $sql_extra = ''; + + $r = q("select * from event where type = 'task' and uid = %d $sql_extra ", + intval(local_channel()) + ); + + $ret['success'] = (($r) ? true : false); + if($r) { + $ret['tasks'] = $r; + } + + return $ret; + +}
\ No newline at end of file |