X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fphotos.php;h=bf3299de07fb867a44e67326dc2033d7158825b4;hb=969cd145ce0e717399dbfff6cbc1a45342206e1a;hp=663d0a40cbaa8d1ec65cdddb3c61dd79bb0eb230;hpb=a19b33651e98f964ed2c13a8d739db4f049b233e;p=friendica.git diff --git a/mod/photos.php b/mod/photos.php index 663d0a40cb..bf3299de07 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -39,7 +39,7 @@ function photos_init(&$a) { $o .= ''; $o .= ''; } if(! x($a->page,'aside')) @@ -408,7 +410,18 @@ function photos_post(&$a) { } else { $newname = $name; - if(strstr($name,'_') || strstr($name,' ')) { + $alias = ''; + $tagcid = 0; + if(strrpos($newname,'+')) + $tagcid = intval(substr($newname,strrpos($newname,'+') + 1)); + + if($tagcid) { + $r = q("SELECT * FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1", + intval($tagcid), + intval($profile_uid) + ); + } + elseif(strstr($name,'_') || strstr($name,' ')) { $newname = str_replace('_',' ',$name); $r = q("SELECT * FROM `contact` WHERE `name` = '%s' AND `uid` = %d LIMIT 1", dbesc($newname), @@ -581,8 +594,8 @@ function photos_post(&$a) { $visible = 1; else $visible = 0; - - if(intval($_REQUEST['not_visible'])) + + if(intval($_REQUEST['not_visible']) || $_REQUEST['not_visible'] === 'true') $visible = 0; $str_group_allow = perms2str(((is_array($_REQUEST['group_allow'])) ? $_REQUEST['group_allow'] : explode(',',$_REQUEST['group_allow'])));