mirror of
https://github.com/friendica/friendica
synced 2025-04-26 01:50:11 +00:00
Separate Object\Photo into Model\Photo and Object\Image
- Renamed a bunch of functions to shorter or clearer names
This commit is contained in:
parent
7499824381
commit
3fc3e67b70
22 changed files with 464 additions and 408 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue