friendica-7130 Edits of images not possible

This commit is contained in:
Philipp Holzer 2019-05-26 15:00:19 +02:00
parent ea218438d2
commit 2652787460
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90

View file

@ -29,8 +29,8 @@ use Friendica\Util\Crypto;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Map;
use Friendica\Util\Security;
use Friendica\Util\Temporal;
use Friendica\Util\Strings;
use Friendica\Util\Temporal;
use Friendica\Util\XML;
function photos_init(App $a) {
@ -315,7 +315,7 @@ function photos_post(App $a)
$str_group_deny = !empty($_POST['group_deny']) ? perms2str($_POST['group_deny']) : '';
$str_contact_deny = !empty($_POST['contact_deny']) ? perms2str($_POST['contact_deny']) : '';
$resource_id = $a->argv[2];
$resource_id = $a->argv[3];
if (!strlen($albname)) {
$albname = DateTimeFormat::localNow('Y');
@ -418,10 +418,11 @@ function photos_post(App $a)
if ($item_id) {
$item = Item::selectFirst(['tag', 'inform'], ['id' => $item_id, 'uid' => $page_owner_uid]);
}
if (DBA::isResult($item)) {
$old_tag = $item['tag'];
$old_inform = $item['inform'];
if (DBA::isResult($item)) {
$old_tag = $item['tag'];
$old_inform = $item['inform'];
}
}
if (strlen($rawtags)) {
@ -524,13 +525,13 @@ function photos_post(App $a)
}
}
$newtag = $old_tag;
$newtag = $old_tag ?? '';
if (strlen($newtag) && strlen($str_tags)) {
$newtag .= ',';
}
$newtag .= $str_tags;
$newinform = $old_inform;
$newinform = $old_inform ?? '';
if (strlen($newinform) && strlen($inform)) {
$newinform .= ',';
}
@ -735,7 +736,7 @@ function photos_post(App $a)
@unlink($src);
$foo = 0;
Hook::callAll('photo_post_end',$foo);
exit();
return;
}
$exif = $image->orient($src);
@ -761,7 +762,7 @@ function photos_post(App $a)
if (!$r) {
Logger::log('mod/photos.php: photos_post(): image store failed', Logger::DEBUG);
notice(L10n::t('Image upload failed.') . EOL);
exit();
return;
}
if ($width > 640 || $height > 640) {