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
70597eb67a
commit
52bddd580c
22 changed files with 464 additions and 408 deletions
11
update.php
11
update.php
|
@ -6,7 +6,8 @@ use Friendica\Core\Config;
|
|||
use Friendica\Core\PConfig;
|
||||
use Friendica\Core\Worker;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Object\Photo;
|
||||
use Friendica\Model\Photo;
|
||||
use Friendica\Object\Image;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -153,10 +154,10 @@ function update_1014()
|
|||
$r = q("SELECT * FROM `photo` WHERE `scale` = 4");
|
||||
if (DBM::is_result($r)) {
|
||||
foreach ($r as $rr) {
|
||||
$ph = new Photo($rr['data']);
|
||||
if ($ph->isValid()) {
|
||||
$ph->scaleImage(48);
|
||||
$ph->store($rr['uid'],$rr['contact-id'],$rr['resource-id'],$rr['filename'],$rr['album'],6,(($rr['profile']) ? 1 : 0));
|
||||
$Image = new Image($rr['data']);
|
||||
if ($Image->isValid()) {
|
||||
$Image->scaleDown(48);
|
||||
Photo::store($Image, $rr['uid'],$rr['contact-id'],$rr['resource-id'],$rr['filename'],$rr['album'],6,(($rr['profile']) ? 1 : 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue