From: Brenda Wallace Date: Mon, 20 Jul 2009 02:18:48 +0000 (+1200) Subject: turn into canonical terms before checking for unique-ness of a tag in a notice X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d95f45f0705467cfc7e3650db932e43f0a20e45f;p=quix0rs-gnu-social.git turn into canonical terms before checking for unique-ness of a tag in a notice --- diff --git a/classes/Notice.php b/classes/Notice.php index 12b47f3604..7f002d838c 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -101,9 +101,17 @@ class Notice extends Memcached_DataObject if (!$count) { return true; } + + //turn each into their canonical tag + //this is needed to remove dupes before saving e.g. #hash.tag = #hashtag + $hashtags = array(); + for($i=0; $isaveTag($hashtag); } @@ -112,8 +120,6 @@ class Notice extends Memcached_DataObject function saveTag($hashtag) { - $hashtag = common_canonical_tag($hashtag); - $tag = new Notice_tag(); $tag->notice_id = $this->id; $tag->tag = $hashtag;