| 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; |