mirror of
https://github.com/friendica/friendica
synced 2025-04-24 05:50:11 +00:00
Rename Photo::newResource() result variable from $hash to $resource_id
This commit is contained in:
parent
03bf1dcbd3
commit
26b5de9a76
5 changed files with 41 additions and 41 deletions
|
@ -836,9 +836,9 @@ class User
|
|||
if ($Image->isValid()) {
|
||||
$Image->scaleToSquare(300);
|
||||
|
||||
$hash = Photo::newResource();
|
||||
$resource_id = Photo::newResource();
|
||||
|
||||
$r = Photo::store($Image, $uid, 0, $hash, $filename, L10n::t('Profile Photos'), 4);
|
||||
$r = Photo::store($Image, $uid, 0, $resource_id, $filename, L10n::t('Profile Photos'), 4);
|
||||
|
||||
if ($r === false) {
|
||||
$photo_failure = true;
|
||||
|
@ -846,7 +846,7 @@ class User
|
|||
|
||||
$Image->scaleDown(80);
|
||||
|
||||
$r = Photo::store($Image, $uid, 0, $hash, $filename, L10n::t('Profile Photos'), 5);
|
||||
$r = Photo::store($Image, $uid, 0, $resource_id, $filename, L10n::t('Profile Photos'), 5);
|
||||
|
||||
if ($r === false) {
|
||||
$photo_failure = true;
|
||||
|
@ -854,14 +854,14 @@ class User
|
|||
|
||||
$Image->scaleDown(48);
|
||||
|
||||
$r = Photo::store($Image, $uid, 0, $hash, $filename, L10n::t('Profile Photos'), 6);
|
||||
$r = Photo::store($Image, $uid, 0, $resource_id, $filename, L10n::t('Profile Photos'), 6);
|
||||
|
||||
if ($r === false) {
|
||||
$photo_failure = true;
|
||||
}
|
||||
|
||||
if (!$photo_failure) {
|
||||
Photo::update(['profile' => 1], ['resource-id' => $hash]);
|
||||
Photo::update(['profile' => 1], ['resource-id' => $resource_id]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue