From ad5b976978011e2bf16fea5537af5b211e8e65eb Mon Sep 17 00:00:00 2001 From: Friendika Date: Wed, 29 Jun 2011 18:59:05 -0700 Subject: allow spaces in @ tags --- mod/photos.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mod/photos.php') diff --git a/mod/photos.php b/mod/photos.php index 2cd4e2622..187eb154c 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -380,6 +380,8 @@ function photos_post(&$a) { if(count($tags)) { foreach($tags as $tag) { + if(isset($profile)) + unset($profile); if(strpos($tag,'@') === 0) { $name = substr($tag,1); if((strpos($name,'@')) || (strpos($name,'http://'))) { @@ -401,7 +403,7 @@ function photos_post(&$a) { } else { $newname = $name; - if(strstr($name,'_')) { + if(strstr($name,'_') || strstr($name,' ')) { $newname = str_replace('_',' ',$name); $r = q("SELECT * FROM `contact` WHERE `name` = '%s' AND `uid` = %d LIMIT 1", dbesc($newname), -- cgit v1.2.3