function get_old_revisions($id)
 {
     $id = (int) $id;
     $results = array();
     $sql = "SELECT p.* FROM controller_procedure p WHERE procedure_id = {$id} ORDER BY end_date DESC";
     $this->db->query($sql, __LINE__, __FILE__);
     while ($this->db->next_record()) {
         $procedure = new controller_procedure($this->unmarshal($this->db->f('id'), 'int'));
         $procedure->set_title($this->unmarshal($this->db->f('title', true), 'string'));
         $procedure->set_purpose($this->unmarshal($this->db->f('purpose', true), 'string'));
         $procedure->set_responsibility($this->unmarshal($this->db->f('responsibility', true), 'string'));
         $procedure->set_description($this->unmarshal($this->db->f('description', true), 'string'));
         $procedure->set_reference($this->unmarshal($this->db->f('reference', true), 'string'));
         $procedure->set_attachment($this->unmarshal($this->db->f('attachment', true), 'string'));
         $procedure->set_start_date(date($GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'], $this->unmarshal($this->db->f('start_date'), 'int')));
         $procedure->set_end_date(date($GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'], $this->unmarshal($this->db->f('end_date'), 'int')));
         $procedure->set_procedure_id($this->unmarshal($this->db->f('procedure_id'), 'int'));
         $procedure->set_revision_no($this->unmarshal($this->db->f('revision_no'), 'int'));
         $procedure->set_revision_date(date($GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'], $this->unmarshal($this->db->f('revision_date'), 'int')));
         $procedure->set_control_area_id($this->unmarshal($this->db->f('control_area_id'), 'int'));
         $category = execMethod('phpgwapi.categories.return_single', $this->unmarshal($this->db->f('control_area_id', 'int')));
         $procedure->set_control_area_name($category_name = $category[0]['name']);
         $results[] = $procedure->toArray();
     }
     return $results;
 }