mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-08 16:14:26 +02:00
Rename ApipResponse->exit* methods to better show their meaning
This commit is contained in:
parent
960171c4e0
commit
642baa1f2a
68 changed files with 88 additions and 88 deletions
|
@ -128,7 +128,7 @@ class Update extends BaseApi
|
|||
$photo = Photo::upload($uid, $_FILES['media'], $album, $allow_cid, $allow_gid, $deny_cid, $deny_gid, $desc, $photo_id);
|
||||
if (!empty($photo)) {
|
||||
$data = ['photo' => $this->friendicaPhoto->createFromId($photo['resource_id'], null, $uid, $type)];
|
||||
$this->response->exit('photo_update', $data, $this->parameters['extension'] ?? null);
|
||||
$this->response->addFormattedContent('photo_update', $data, $this->parameters['extension'] ?? null);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -137,12 +137,12 @@ class Update extends BaseApi
|
|||
if ($result) {
|
||||
Photo::clearAlbumCache($uid);
|
||||
$answer = ['result' => 'updated', 'message' => 'Image id `' . $photo_id . '` has been updated.'];
|
||||
$this->response->exit('photo_update', ['$result' => $answer], $this->parameters['extension'] ?? null);
|
||||
$this->response->addFormattedContent('photo_update', ['$result' => $answer], $this->parameters['extension'] ?? null);
|
||||
return;
|
||||
} else {
|
||||
if ($nothingtodo) {
|
||||
$answer = ['result' => 'cancelled', 'message' => 'Nothing to update for image id `' . $photo_id . '`.'];
|
||||
$this->response->exit('photo_update', ['$result' => $answer], $this->parameters['extension'] ?? null);
|
||||
$this->response->addFormattedContent('photo_update', ['$result' => $answer], $this->parameters['extension'] ?? null);
|
||||
return;
|
||||
}
|
||||
throw new HTTPException\InternalServerErrorException('unknown error - update photo entry in database failed');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue