mirror of
https://github.com/friendica/friendica
synced 2025-04-23 14:30:11 +00:00
Changed:
- used `$this->getRequestValue($request, 'foo', <bar>)` instead of `$request['foo'] ?? <bar>` - fixed wrong variable naming - changed double-quotes to single - see https://github.com/friendica/friendica/issues/11631#issuecomment-1196410497
This commit is contained in:
parent
5ec407699b
commit
eaed3945d1
21 changed files with 28 additions and 30 deletions
|
@ -84,7 +84,7 @@ abstract class DirectMessagesEndpoint extends BaseApi
|
|||
$params['order'] = ['id'];
|
||||
}
|
||||
|
||||
$cid = BaseApi::getContactIDForSearchterm($request['screen_name'] ?? '', $request['profileurl'] ?? '', $request['user_id'] ?? 0, 0);
|
||||
$cid = BaseApi::getContactIDForSearchterm($this->getRequestValue($request, 'screen_name', ''), $this->getRequestValue($request, 'profileurl', ''), $this->getRequestValue($request, 'user_id', 0), 0);
|
||||
if (!empty($cid)) {
|
||||
$cdata = Contact::getPublicAndUserContactID($cid, $uid);
|
||||
if (!empty($cdata['user'])) {
|
||||
|
@ -109,7 +109,7 @@ abstract class DirectMessagesEndpoint extends BaseApi
|
|||
|
||||
$ret = [];
|
||||
foreach ($ids as $id) {
|
||||
$ret[] = $this->directMessage->createFromMailId($id, $uid, $request['getText'] ?? '');
|
||||
$ret[] = $this->directMessage->createFromMailId($id, $uid, $this->getRequestValue($request, 'getText', ''));
|
||||
}
|
||||
|
||||
self::setLinkHeader();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue