mirror of
https://github.com/friendica/friendica
synced 2025-04-24 07:50:11 +00:00
Use the $request variable
This commit is contained in:
parent
8ff2cc3976
commit
f11bf08a7b
11 changed files with 28 additions and 28 deletions
|
@ -57,7 +57,7 @@ class UpdateProfileImage extends BaseApi
|
|||
}
|
||||
|
||||
// output for client
|
||||
$skip_status = $_REQUEST['skip_status'] ?? false;
|
||||
$skip_status = $request['skip_status'] ?? false;
|
||||
|
||||
$user_info = DI::twitterUser()->createFromUserId($uid, $skip_status)->toArray();
|
||||
|
||||
|
|
|
@ -38,9 +38,9 @@ class Show extends ContactEndpoint
|
|||
self::checkAllowedScope(self::SCOPE_READ);
|
||||
$uid = BaseApi::getCurrentUserID();
|
||||
|
||||
$source_cid = BaseApi::getContactIDForSearchterm($_REQUEST['source_screen_name'] ?? '', '', $_REQUEST['source_id'] ?? 0, $uid);
|
||||
$source_cid = BaseApi::getContactIDForSearchterm($request['source_screen_name'] ?? '', '', $request['source_id'] ?? 0, $uid);
|
||||
|
||||
$target_cid = BaseApi::getContactIDForSearchterm($_REQUEST['target_screen_name'] ?? '', '', $_REQUEST['target_id'] ?? 0, $uid);
|
||||
$target_cid = BaseApi::getContactIDForSearchterm($request['target_screen_name'] ?? '', '', $request['target_id'] ?? 0, $uid);
|
||||
|
||||
$source = Contact::getById($source_cid);
|
||||
if (empty($source)) {
|
||||
|
|
|
@ -60,7 +60,7 @@ class Create extends BaseApi
|
|||
$uid = BaseApi::getCurrentUserID();
|
||||
|
||||
// params
|
||||
$name = $_REQUEST['name'] ?? '';
|
||||
$name = $request['name'] ?? '';
|
||||
|
||||
if ($name == '') {
|
||||
throw new HTTPException\BadRequestException('group name not specified');
|
||||
|
|
|
@ -60,7 +60,7 @@ class Destroy extends BaseApi
|
|||
$uid = BaseApi::getCurrentUserID();
|
||||
|
||||
// params
|
||||
$gid = $_REQUEST['list_id'] ?? 0;
|
||||
$gid = $request['list_id'] ?? 0;
|
||||
|
||||
// error if no gid specified
|
||||
if ($gid == 0) {
|
||||
|
|
|
@ -60,8 +60,8 @@ class Update extends BaseApi
|
|||
$uid = BaseApi::getCurrentUserID();
|
||||
|
||||
// params
|
||||
$gid = $_REQUEST['list_id'] ?? 0;
|
||||
$name = $_REQUEST['name'] ?? '';
|
||||
$gid = $request['list_id'] ?? 0;
|
||||
$name = $request['name'] ?? '';
|
||||
|
||||
// error if no gid specified
|
||||
if ($gid == 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue