]> git.mxchange.org Git - friendica.git/blobdiff - include/api.php
Merge pull request #4602 from tobiasd/20180316-installdoc
[friendica.git] / include / api.php
index f7c04aaf88f0e4e621178e69d53bbd2b04e5be32..a7d8ab3ca3a3af8fec7c6b19190f3b41c21473f4 100644 (file)
@@ -4614,7 +4614,7 @@ function save_media_to_database($mediatype, $media, $type, $album, $allow_cid, $
        $height = $Image->getHeight();
 
        // create a new resource-id if not already provided
-       $hash = ($photo_id == null) ? photo_new_resource() : $photo_id;
+       $hash = ($photo_id == null) ? Photo::newResource() : $photo_id;
 
        if ($mediatype == "photo") {
                // upload normal image (scales 0, 1, 2)
@@ -5913,10 +5913,12 @@ function api_saved_searches_list($type)
        $result = [];
        while ($term = $terms->fetch()) {
                $result[] = [
-                       'name' => $term['term'],
-                       'query' => $term['term'],
+                       'created_at' => api_date(time()),
+                       'id' => intval($term['id']),
                        'id_str' => $term['id'],
-                       'id' => intval($term['id'])
+                       'name' => $term['term'],
+                       'position' => null,
+                       'query' => $term['term']
                ];
        }