mirror of https://github.com/friendica/friendica
changes by Marco
I removed the events of uid=0, thats more like the code in src/Model/Event. I also renamed some return keys.
This commit is contained in:
parent
2801efd795
commit
d38b3e5dab
|
@ -429,7 +429,6 @@ function api_error($type, $e, App\Arguments $args)
|
|||
function api_events_show($type)
|
||||
{
|
||||
$a = \get_app();
|
||||
|
||||
$user_info = api_get_user($a);
|
||||
|
||||
if (api_user() === false || $user_info === false)
|
||||
|
@ -439,7 +438,7 @@ function api_events_show($type)
|
|||
|
||||
$since_id = $_REQUEST['since_id'] ?? 0;
|
||||
$count = $_REQUEST['count'] ?? 20;
|
||||
$condition = ["`id` > ? AND (`uid` = 0 OR (`uid` = ?))", $since_id, api_user()];
|
||||
$condition = ["`id` > ? AND `uid` = ?", $since_id, api_user()];
|
||||
$params = ['limit'=> $count];
|
||||
$terms = DBA::select('event', [], $condition, $params);
|
||||
|
||||
|
@ -451,13 +450,13 @@ function api_events_show($type)
|
|||
'uid' => intval($term['uid']),
|
||||
'cid' => $term['cid'],
|
||||
'uri' => $term['uri'],
|
||||
'summary' => $term['summary'],
|
||||
'name' => $term['summary'],
|
||||
'desc' => BBCode::convert($term['desc']),
|
||||
'start' => $term['start'],
|
||||
'finish' => $term['finish'],
|
||||
'startTime' => $term['start'],
|
||||
'endTime' => $term['finish'],
|
||||
'type' => $term['type'],
|
||||
'nofinish' => $term['nofinish'],
|
||||
'location' => $term['location'],
|
||||
'place' => $term['location'],
|
||||
'adjust' => $term['adjust'],
|
||||
'ignore' => $term['ignore'],
|
||||
'allow_cid' => $term['allow_cid'],
|
||||
|
|
Loading…
Reference in New Issue