/[drupal]/contributions/modules/query_export/civicrm.inc
ViewVC logotype

Diff of /contributions/modules/query_export/civicrm.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1, Thu Jun 8 06:34:55 2006 UTC revision 1.2, Sat Aug 26 00:06:30 2006 UTC
# Line 66  function query_export_get_crm_fields($pr Line 66  function query_export_get_crm_fields($pr
66   * Record getter   * Record getter
67   *   *
68   */   */
69  function query_export_get_civicrm_contact_array($meta_data, $qname, $args, $start, $num_recs){  function query_export_get_civicrm_contact_array($meta_data, $qname,
70                                                                                                                                                                                                    $query_nid,
71                                                                                                                                                                                                    $args, $profile,
72                                                                                                                                                                                                    $start, $num_recs){
73    //These are just nodes, and our ids in this case are NIDs.    //These are just nodes, and our ids in this case are NIDs.
74    $list = array();    $list = array();
75    //TO DO: the only name type we support is by numbered group:    //TO DO: the only name type we support is by numbered group:
76    list($base, $gid) = explode('-', $qname);    list($base, $gid) = explode('-', $qname);
77    if($base != 'group')    if($base != 'group')
78      return $list; //empty still      return $list; //empty still
79    $contacts = civinode_util_group_contacts($gid);    $contacts = civinode_util_group_contacts($gid, $start, $num_recs);
80    //TO DO: screen for access    //TO DO: screen for access
81    foreach($contacts as $cid){    foreach($contacts as $cid){
82      //TO DO: need to screen by profile      //TO DO: need to screen by profile
83      $list[] = civinode_util_load_cdata($cid);                  $data = civinode_util_load_cdata($cid);
84                    //We need to filter a bit for bad chars
85                    $filtered = array();
86                    foreach ($data as $key => $val) {
87                            $filtered[$key] = query_export_filter_output($val);
88                    }
89                    $list[] = $filtered;
90    }    }
91    
92    return $list;    return $list;

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.2