function casetracker_views_project_number in Case Tracker 5
Views field handler; display the project number of the Case Tracker project.
1 string reference to 'casetracker_views_project_number'
- casetracker_views_tables in ./
casetracker_views.module - Implementation of hook_views_table().
File
- ./
casetracker_views.module, line 224 - Enables Views integration for Case Tracker.
Code
function casetracker_views_project_number($fieldinfo, $fielddata, $value, $data) {
if (!empty($data->casetracker_project_project_number)) {
return $data->casetracker_project_project_number;
}
$project = db_fetch_object(db_query(db_rewrite_sql("SELECT cp.project_number FROM {casetracker_project} cp WHERE cp.nid = %d"), $data->nid));
if ($project->project_number) {
return $project->project_number;
}
}