| 131 |
* @param array_ref $edges This array will be filled with the graph's adjacentcy list |
* @param array_ref $edges This array will be filled with the graph's adjacentcy list |
| 132 |
*/ |
*/ |
| 133 |
function get_graph(&$edges) { |
function get_graph(&$edges) { |
| 134 |
include(DATA_PATH); |
if (variable_get('sna_realtime_network', FALSE) == TRUE) { |
| 135 |
|
clear_cache(); |
| 136 |
|
$graph_source = variable_get('sna_data_source', GRAPH_SOURCE); |
| 137 |
|
$build_edges = 'build_edges_from_' . $graph_source; |
| 138 |
|
$build_edges($edges); |
| 139 |
|
$edges = transform_edges($edges); |
| 140 |
|
} |
| 141 |
|
else { |
| 142 |
|
include(DATA_PATH); |
| 143 |
|
} |
| 144 |
$limit = variable_get('sna_limit', 0); |
$limit = variable_get('sna_limit', 0); |
| 145 |
if ($limit > 0) { |
if ($limit > 0) { |
| 146 |
$edges = shrink($edges, $limit); |
$edges = shrink($edges, $limit); |
| 147 |
} |
} |
| 148 |
|
//print_r($edges); |
| 149 |
} |
} |
| 150 |
|
|
| 151 |
/** |
/** |