I am trying to import forum data from another system into Drupal. Can anyone confirm how a container is distinguished from a forum in the Drupal database?
My impression is that containers and forums have almost identical records in the term_data and term_hierarchy tables. As far as I can tell, one of these items is a container only if its tid value from the term_data table appears in a serialized PHP array in a record in the variable table. A record there has the name 'forum_containers' and this serialized array as a value.
I see that this array is maintained by this code in forum.module:
$containers = variable_get('forum_containers', array());
$containers[] = $form_values['tid'];
variable_set('forum_containers', $containers);
In my test environment, I have the value 'a:3:{i:0;i:1;i:1;i:5;i:2;i:7;}'. I think this means I have three containers, where the tid values from term_data appear in the second, fourth and sixth semicolon-delimited type:value pairs within the array. In other words, I have a three-element array of containers, the first element has an integer index of 0 and an integer tid value of 1, the second element has an integer index of 1 and an integer value of 5, and the third element has an integer index of 2 and an integer value of 7.