X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fphoto.php;h=b1dd9a5c3a3c60863c5fb71b5c7fc2f194016581;hb=738cb4ace6cb3dc4a78320577ffbdb3cdb773132;hp=653802d30e8bd27ffe4b3f7eec21c371323ab446;hpb=0360f7197aac062eb2fecf95969658ca56068deb;p=friendica.git diff --git a/mod/photo.php b/mod/photo.php index 653802d30e..b1dd9a5c3a 100644 --- a/mod/photo.php +++ b/mod/photo.php @@ -4,7 +4,7 @@ * @file mod/photo.php */ use Friendica\App; -use Friendica\Database\DBM; +use Friendica\Database\DBA; use Friendica\Object\Image; require_once 'include/security.php'; @@ -83,7 +83,7 @@ function photo_init(App $a) intval($resolution), intval($uid) ); - if (DBM::is_result($r)) { + if (DBA::isResult($r)) { $data = $r[0]['data']; $mimetype = $r[0]['type']; } @@ -107,18 +107,18 @@ function photo_init(App $a) // check if the photo exists and get the owner of the photo $r = q("SELECT `uid` FROM `photo` WHERE `resource-id` = '%s' LIMIT 1", - dbesc($photo), + DBA::escape($photo), intval($resolution) ); - if (DBM::is_result($r)) { + if (DBA::isResult($r)) { $sql_extra = permissions_sql($r[0]['uid']); // Now we'll see if we can access the photo $r = q("SELECT * FROM `photo` WHERE `resource-id` = '%s' AND `scale` <= %d $sql_extra ORDER BY scale DESC LIMIT 1", - dbesc($photo), + DBA::escape($photo), intval($resolution) ); - if (DBM::is_result($r)) { + if (DBA::isResult($r)) { $resolution = $r[0]['scale']; $data = $r[0]['data']; $mimetype = $r[0]['type']; @@ -192,7 +192,7 @@ function photo_init(App $a) // If the photo is public and there is an existing photo directory store the photo there if ($public and $file != '') { // If the photo path isn't there, try to create it - $basepath = $a->get_basepath(); + $basepath = $a->getBasePath(); if (!is_dir($basepath . "/photo")) { if (is_writable($basepath)) { mkdir($basepath . "/photo");