r2754 - tagNameOnChain(): new helper function
authorDenis Ovsienko <infrastation@yandex.ru>
Fri, 15 May 2009 15:23:36 +0000 (15:23 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Fri, 15 May 2009 15:23:36 +0000 (15:23 +0000)
inc/functions.php

index c23159259327322eb4950d1b5fa6c127cc89df51..7502387ec2bf061fe235835134f4f0499cc69459 100644 (file)
@@ -1037,6 +1037,14 @@ function tagOnChain ($taginfo, $tagchain)
        return FALSE;
 }
 
+function tagNameOnChain ($tagname, $tagchain)
+{
+       foreach ($tagchain as $test)
+               if ($test['tag'] == $tagname)
+                       return TRUE;
+       return FALSE;
+}
+
 // Idem, but use ID list instead of chain.
 function tagOnIdList ($taginfo, $tagidlist)
 {