]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
more array munging
authorEvan Prodromou <evan@prodromou.name>
Wed, 16 Jul 2008 03:13:46 +0000 (23:13 -0400)
committerEvan Prodromou <evan@prodromou.name>
Wed, 16 Jul 2008 03:13:46 +0000 (23:13 -0400)
darcs-hash:20080716031346-84dde-2aa160254fd80537ba89df2b39b4560c044d1bab.gz

lib/util.php

index e8ca5271631d63194e3c5debfa526163db59814f..ce86378848b663086b3a90ee92e661b20ca30640 100644 (file)
@@ -875,10 +875,7 @@ function common_save_replies($notice) {
                return true;
        }
        # XXX: is there another way to make an array copy?
-       $names = array_merge($match[1], array());
-       if ($tname) {
-               array_unshift($names, $tname);
-       }
+       $names = ($tname) ? array_unique(array_merge($match[1], array($tname))) : $match[1];
        $sender = Profile::staticGet($notice->profile_id);
        # store replied only for first @ (what user/notice what the reply directed,
        # we assume first @ is it)