mirror of
https://github.com/friendica/friendica
synced 2025-04-25 19:50:12 +00:00
add .gif to fix_private_photos checking, try another tactic to reduce notification duplication - check for duplicates after storage rather than before. This tactic worked out well to reduce item duplication.
This commit is contained in:
parent
a0e18a0ff8
commit
6242f9a147
4 changed files with 103 additions and 71 deletions
|
@ -3594,7 +3594,7 @@ function fix_private_photos($s, $uid, $item = null, $cid = 0) {
|
|||
// Only embed locally hosted photos
|
||||
$replace = false;
|
||||
$i = basename($image);
|
||||
$i = str_replace(array('.jpg','.png'),array('',''),$i);
|
||||
$i = str_replace(array('.jpg','.png','.gif'),array('','',''),$i);
|
||||
$x = strpos($i,'-');
|
||||
|
||||
if($x) {
|
||||
|
@ -3605,7 +3605,7 @@ function fix_private_photos($s, $uid, $item = null, $cid = 0) {
|
|||
intval($res),
|
||||
intval($uid)
|
||||
);
|
||||
if(count($r)) {
|
||||
if($r) {
|
||||
|
||||
// Check to see if we should replace this photo link with an embedded image
|
||||
// 1. No need to do so if the photo is public
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue