mirror of
https://github.com/friendica/friendica
synced 2025-04-19 05:50:10 +00:00
Reenable Twitter/Search test
This commit is contained in:
parent
616cf012f9
commit
e10045f13f
2 changed files with 26 additions and 15 deletions
|
@ -42,15 +42,15 @@ class Search extends BaseApi
|
|||
|
||||
$userlist = [];
|
||||
|
||||
if (!empty($_GET['q'])) {
|
||||
if (!empty($request['q'])) {
|
||||
$contacts = Contact::selectToArray(
|
||||
['id'],
|
||||
[
|
||||
'`uid` = 0 AND (`name` = ? OR `nick` = ? OR `url` = ? OR `addr` = ?)',
|
||||
$_GET['q'],
|
||||
$_GET['q'],
|
||||
$_GET['q'],
|
||||
$_GET['q'],
|
||||
$request['q'],
|
||||
$request['q'],
|
||||
$request['q'],
|
||||
$request['q'],
|
||||
]
|
||||
);
|
||||
|
||||
|
@ -63,12 +63,12 @@ class Search extends BaseApi
|
|||
}
|
||||
$userlist = ['users' => $userlist];
|
||||
} else {
|
||||
throw new NotFoundException('User ' . $_GET['q'] . ' not found.');
|
||||
throw new NotFoundException('User ' . $request['q'] . ' not found.');
|
||||
}
|
||||
} else {
|
||||
throw new BadRequestException('No search term specified.');
|
||||
}
|
||||
|
||||
$this->response->exit('users', ['user' => $userlist], $this->parameters['extension'] ?? null);
|
||||
$this->response->exit('users', $userlist, $this->parameters['extension'] ?? null);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue