aboutsummaryrefslogtreecommitdiffstats
path: root/mod/photos.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/photos.php')
-rw-r--r--mod/photos.php17
1 files changed, 14 insertions, 3 deletions
diff --git a/mod/photos.php b/mod/photos.php
index 663d0a40c..51d6a4b65 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -408,7 +408,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 +592,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'])));