You are here

function casetracker_views_project_options in Case Tracker 5

Views filter handler; filter Case Tracker cases by their project.

1 string reference to 'casetracker_views_project_options'
casetracker_views_tables in ./casetracker_views.module
Implementation of hook_views_table().

File

./casetracker_views.module, line 313
Enables Views integration for Case Tracker.

Code

function casetracker_views_project_options() {
  $results = db_query(db_rewrite_sql("SELECT cp.project_number, n.title FROM {node} n INNER JOIN {casetracker_project} cp ON n.nid = cp.nid WHERE n.status = 1"));
  $projects = array();
  while ($result = db_fetch_object($results)) {
    $projects[$result->project_number] = $result->project_number . ' - ' . $result->title;
  }
  return $projects;
}