1
1
Fork 0

Revert $term DB result check

This commit is contained in:
Philipp Holzer 2019-07-27 15:34:08 +02:00
parent 37d03bbeae
commit b7f1de1e64
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90

View file

@ -6268,17 +6268,15 @@ function api_saved_searches_list($type)
$terms = DBA::select('search', ['id', 'term'], ['uid' => local_user()]);
$result = [];
if (DBA::isResult($terms)) {
while ($term = $terms->fetch()) {
$result[] = [
'created_at' => api_date(time()),
'id' => intval($term['id']),
'id_str' => $term['id'],
'name' => $term['term'],
'position' => null,
'query' => $term['term']
];
}
while ($term = $terms->fetch()) {
$result[] = [
'created_at' => api_date(time()),
'id' => intval($term['id']),
'id_str' => $term['id'],
'name' => $term['term'],
'position' => null,
'query' => $term['term']
];
}
DBA::close($terms);