mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-12 01:54:26 +02:00
png support for embedded private photos
This commit is contained in:
parent
67d8afb9d1
commit
ba2452a076
3 changed files with 4 additions and 4 deletions
|
@ -2952,7 +2952,7 @@ function fix_private_photos($s,$uid, $item = null, $cid = 0) {
|
|||
if(stristr($image , $site . '/photo/')) {
|
||||
$replace = false;
|
||||
$i = basename($image);
|
||||
$i = str_replace('.jpg','',$i);
|
||||
$i = str_replace(array('.jpg','.png'),array('',''),$i);
|
||||
$x = strpos($i,'-');
|
||||
if($x) {
|
||||
$res = substr($i,$x+1);
|
||||
|
@ -2994,7 +2994,7 @@ function fix_private_photos($s,$uid, $item = null, $cid = 0) {
|
|||
}
|
||||
if($replace) {
|
||||
logger('fix_private_photos: replacing photo', LOGGER_DEBUG);
|
||||
$s = str_replace($image, 'data:image/jpg;base64,' . base64_encode($r[0]['data']), $s);
|
||||
$s = str_replace($image, 'data:' . $r[0]['type'] . ';base64,' . base64_encode($r[0]['data']), $s);
|
||||
logger('fix_private_photos: replaced: ' . $s, LOGGER_DATA);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue