mirror of
https://github.com/friendica/friendica
synced 2025-04-27 17:10:10 +00:00
Improved variable naming
This commit is contained in:
parent
91a12295ff
commit
76ccc52406
3 changed files with 17 additions and 17 deletions
|
@ -231,8 +231,8 @@ class Photos extends \Friendica\Module\BaseProfile
|
|||
|
||||
$resource_id = Photo::newResource();
|
||||
|
||||
$smallest = Photo::storeWithPreview($image, $this->owner['uid'], $resource_id, $filename, $filesize, $album, '', $str_contact_allow, $str_group_allow, $str_contact_deny, $str_group_deny);
|
||||
if ($smallest < 0) {
|
||||
$preview = Photo::storeWithPreview($image, $this->owner['uid'], $resource_id, $filename, $filesize, $album, '', $str_contact_allow, $str_group_allow, $str_contact_deny, $str_group_deny);
|
||||
if ($preview < 0) {
|
||||
$this->logger->warning('image store failed');
|
||||
$this->systemMessages->addNotice($this->t('Image upload failed.'));
|
||||
return;
|
||||
|
@ -274,7 +274,7 @@ class Photos extends \Friendica\Module\BaseProfile
|
|||
$arr['origin'] = 1;
|
||||
|
||||
$arr['body'] = '[url=' . $this->baseUrl . '/photos/' . $this->owner['nickname'] . '/image/' . $resource_id . ']'
|
||||
. '[img]' . $this->baseUrl . "/photo/{$resource_id}-{$smallest}.".$image->getExt() . '[/img]'
|
||||
. '[img]' . $this->baseUrl . "/photo/{$resource_id}-{$preview}.".$image->getExt() . '[/img]'
|
||||
. '[/url]';
|
||||
|
||||
$item_id = Item::insert($arr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue