mirror of
https://github.com/friendica/friendica
synced 2025-01-09 12:44:43 +00:00
Fix DBA::fetch in API
This commit is contained in:
parent
aefbc703f2
commit
46211de037
1 changed files with 3 additions and 3 deletions
|
@ -6206,13 +6206,13 @@ function api_friendica_profile_show($type)
|
||||||
|
|
||||||
// get data of the specified profile id or all profiles of the user if not specified
|
// get data of the specified profile id or all profiles of the user if not specified
|
||||||
if ($profile_id != 0) {
|
if ($profile_id != 0) {
|
||||||
$r = Profile::get(api_user(), $profile_id);
|
$r = Profile::select(api_user(), $profile_id);
|
||||||
// error message if specified gid is not in database
|
// error message if specified gid is not in database
|
||||||
if (!DBA::isResult($r)) {
|
if (!DBA::isResult($r)) {
|
||||||
throw new BadRequestException("profile_id not available");
|
throw new BadRequestException("profile_id not available");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$r = Profile::get(api_user());
|
$r = Profile::select(api_user());
|
||||||
}
|
}
|
||||||
// loop through all returned profiles and retrieve data and users
|
// loop through all returned profiles and retrieve data and users
|
||||||
$k = 0;
|
$k = 0;
|
||||||
|
@ -6268,7 +6268,7 @@ function api_saved_searches_list($type)
|
||||||
$terms = DBA::select('search', ['id', 'term'], ['uid' => local_user()]);
|
$terms = DBA::select('search', ['id', 'term'], ['uid' => local_user()]);
|
||||||
|
|
||||||
$result = [];
|
$result = [];
|
||||||
while ($term = $terms->fetch()) {
|
while ($term = DBA::fetch($terms)) {
|
||||||
$result[] = [
|
$result[] = [
|
||||||
'created_at' => api_date(time()),
|
'created_at' => api_date(time()),
|
||||||
'id' => intval($term['id']),
|
'id' => intval($term['id']),
|
||||||
|
|
Loading…
Reference in a new issue