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:
friendica 2013-02-07 23:43:55 -08:00
parent a0e18a0ff8
commit 6242f9a147
4 changed files with 103 additions and 71 deletions

View file

@ -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