]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Photo.php
Merge pull request #5923 from MrPetovan/task/improve-contact-module
[friendica.git] / src / Model / Photo.php
index 5400cafb40394be2d35708c8ad1cf7d4e411e68e..e64158e175ced54a67d79fecf190be2965c561b5 100644 (file)
@@ -146,7 +146,7 @@ class Photo
 
                        // Remove the cached photo
                        $a = get_app();
-                       $basepath = $a->get_basepath();
+                       $basepath = $a->getBasePath();
 
                        if (is_dir($basepath . "/photo")) {
                                $filename = $basepath . '/photo/' . $hash . '-4.' . $Image->getExt();
@@ -239,8 +239,8 @@ class Photo
                                        WHERE `uid` = %d  AND `album` != '%s' AND `album` != '%s' $sql_extra
                                        GROUP BY `album` ORDER BY `created` DESC",
                                        intval($uid),
-                                       dbesc('Contact Photos'),
-                                       dbesc(L10n::t('Contact Photos'))
+                                       DBA::escape('Contact Photos'),
+                                       DBA::escape(L10n::t('Contact Photos'))
                                );
                        } else {
                                // This query doesn't do the count and is much faster
@@ -248,8 +248,8 @@ class Photo
                                        FROM `photo` USE INDEX (`uid_album_scale_created`)
                                        WHERE `uid` = %d  AND `album` != '%s' AND `album` != '%s' $sql_extra",
                                        intval($uid),
-                                       dbesc('Contact Photos'),
-                                       dbesc(L10n::t('Contact Photos'))
+                                       DBA::escape('Contact Photos'),
+                                       DBA::escape(L10n::t('Contact Photos'))
                                );
                        }
                        Cache::set($key, $albums, CACHE_DAY);