Separate Object\Photo into Model\Photo and Object\Image

- Renamed a bunch of functions to shorter or clearer names
This commit is contained in:
Hypolite Petovan 2017-12-07 08:56:11 -05:00
parent 7499824381
commit 3fc3e67b70
22 changed files with 464 additions and 408 deletions

View file

@ -12,9 +12,9 @@ use Friendica\Core\System;
use Friendica\Database\DBM;
use Friendica\Model\GlobalContact;
use Friendica\Object\Contact;
use Friendica\Object\Image;
use Friendica\Protocol\DFRN;
use Friendica\Protocol\OStatus;
use Friendica\Util\Lock;
require_once 'include/bbcode.php';
require_once 'include/oembed.php';
@ -1887,11 +1887,11 @@ function fix_private_photos($s, $uid, $item = null, $cid = 0) {
$width = intval($match[1]);
$height = intval($match[2]);
$ph = new Photo($data, $type);
if ($ph->isValid()) {
$ph->scaleImage(max($width, $height));
$data = $ph->imageString();
$type = $ph->getType();
$Image = new Image($data, $type);
if ($Image->isValid()) {
$Image->scaleDown(max($width, $height));
$data = $Image->asString();
$type = $Image->getType();
}
}