Just do the latter here and ignore the insert on any bucket names that already exist for this team. You can figure that out from the global bucket hash provided by DAO_Bucket::getAll()
Just array_flip() the submitted bucket names so they become indexes, and foreach over it with isset() and it won't cost any extra queries. Be sure you're comparing team_id's because 2 teams can have a bucket names 'Spam' -- just not the same team twice.
Duplicate named buckets in the same category are no longer inserted.
Comment by
Joe Geck [13/Jul/07 02:45 AM]
No dupes here.