mirror of
https://github.com/friendica/friendica
synced 2025-04-24 03:10:11 +00:00
More parameter handling improved
This commit is contained in:
parent
6c767743d1
commit
fd4926b0f3
11 changed files with 27 additions and 32 deletions
|
@ -52,7 +52,12 @@ class Destroy extends BaseApi
|
|||
BaseApi::checkAllowedScope(BaseApi::SCOPE_WRITE);
|
||||
$uid = BaseApi::getCurrentUserID();
|
||||
|
||||
$id = $this->getRequestValue($request, 'id', 0);
|
||||
$id = $this->getRequestValue($request, 'id', 0);
|
||||
$id = $this->getRequestValue($this->parameters, 'id', $id);
|
||||
if (empty($id)) {
|
||||
throw new BadRequestException('Message id not specified');
|
||||
}
|
||||
|
||||
$verbose = $this->getRequestValue($request, 'friendica_verbose', false);
|
||||
|
||||
$parenturi = $request['friendica_parenturi'] ?? '';
|
||||
|
@ -64,11 +69,6 @@ class Destroy extends BaseApi
|
|||
return;
|
||||
}
|
||||
|
||||
// BadRequestException if no id specified (for clients using Twitter API)
|
||||
if ($id == 0) {
|
||||
throw new BadRequestException('Message id not specified');
|
||||
}
|
||||
|
||||
// add parent-uri to sql command if specified by calling app
|
||||
$sql_extra = ($parenturi != "" ? " AND `parent-uri` = '" . DBA::escape($parenturi) . "'" : "");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue