project; // get the project description. The first iteration of the project // module incorrectly stored the project description in the Drupal // node->body field. Also, the project.descriptin field is only 255 // characters which is not large neough. Therefore, we store the description // in the chado.projectprop table. For backwards compatibility, we // will check if the node->body is empty and if not we'll use that instead. // If there is data in the project.description field then we will use that, but // if there is data in the projectprop table for a descrtion then that takes // precedence $description = ''; if (property_exists($node, 'body')) { $description = $node->body; } if (property_exists($node, 'description')) { $description = $project->description; } else { $record = [ 'table' => 'project', 'id' => $project->project_id, ]; $property = [ 'type_name' => 'Project Description', 'cv_name' => 'project_property', ]; $projectprop = chado_get_property($record, $property); $description = $projectprop->value; } ?>