1
1
Fork 0

Unified JSON exit

This commit is contained in:
Michael 2022-04-09 11:58:01 +00:00
commit d15023fe4b
21 changed files with 61 additions and 80 deletions

View file

@ -20,6 +20,7 @@
*/
use Friendica\App;
use Friendica\Core\System;
use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Model\User;
@ -37,8 +38,7 @@ function msearch_post(App $a)
if (!strlen($search)) {
$output = ['total' => 0, 'items_page' => $perpage, 'page' => $page, 'results' => $results];
echo json_encode($output);
exit();
System::jsonExit($output);
}
$total = 0;
@ -60,7 +60,5 @@ function msearch_post(App $a)
$output = ['total' => $total, 'items_page' => $perpage, 'page' => $page, 'results' => $results];
echo json_encode($output);
exit();
System::jsonExit($output);
}