$answer = array('result' => 'deleted', 'message' => 'album `' . $album . '` with all containing photos has been deleted.');
return api_format_data("photoalbum_delete", $type, array('$result' => $answer));
} else {
- throw new BadRequestException("unknown error - deleting from database failed");
+ throw new InternalServerErrorException("unknown error - deleting from database failed");
}
}
$answer = array('result' => 'updated', 'message' => 'album `' . $album . '` with all containing photos has been renamed to `' . $album_new . '`.');
return api_format_data("photoalbum_update", $type, array('$result' => $answer));
} else {
- throw new BadRequestException("unknown error - updating in database failed");
+ throw new InternalServerErrorException("unknown error - updating in database failed");
}
}
intval(local_user())
);
$typetoext = array(
- 'image/jpeg' => 'jpg',
- 'image/png' => 'png',
- 'image/gif' => 'gif'
+ 'image/jpeg' => 'jpg',
+ 'image/png' => 'png',
+ 'image/gif' => 'gif'
);
$data = array('photo'=>array());
if (dbm::is_result($r)) {
if (!is_null($data)) {
return api_format_data("photo_create", $type, $data);
} else {
- throw new BadRequestException("unknown error - uploading photo failed, see Friendica log for more information");
+ throw new InternalServerErrorException("unknown error - uploading photo failed, see Friendica log for more information");
}
}
$answer = array('result' => 'cancelled', 'message' => 'Nothing to update for image id `' . $photo_id . '`.');
return api_format_data("photo_update", $type, array('$result' => $answer));
}
- throw new BadRequestException("unknown error - update photo entry in database failed");
+ throw new InternalServerErrorException("unknown error - update photo entry in database failed");
}
}
- throw new BadRequestException("unknown error - this error on uploading or updating a photo should never happen");
+ throw new InternalServerErrorException("unknown error - this error on uploading or updating a photo should never happen");
}