diff --git a/include/event.php b/include/event.php index fad852dfc..95a165fdc 100644 --- a/include/event.php +++ b/include/event.php @@ -927,10 +927,10 @@ function tasks_fetch($arr) { $ret = array(); $sql_extra = " and event_status != 'COMPLETED' "; - if(argc() > 1 && argv(1) === 'all') + if($arr && $arr['all'] == 1) $sql_extra = ''; - $r = q("select * from event where type = 'task' and uid = %d $sql_extra ", + $r = q("select * from event where type = 'task' and uid = %d $sql_extra order by created desc", intval(local_channel()) ); diff --git a/include/widgets.php b/include/widgets.php index 7433a1ec8..5e70730a3 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -1047,17 +1047,17 @@ function widget_tasklist($arr) { require_once('include/event.php'); - $o .= ''; - $o .= ''; - $o .= '