function _kml_feed_check_access in KML 5
Same name and namespace in other branches
- 6 kml.module \_kml_feed_check_access()
1 call to _kml_feed_check_access()
- kml_interface in ./
kml.module - Default callback
File
- ./
kml.module, line 573 - KML Module
Code
function _kml_feed_check_access($nodes, $attributes, $cache_name) {
/* Get the node list and take note of latest change */
$max_changed = 0;
$hash_list = array();
$nodes_array = array();
while ($node = db_fetch_object($nodes)) {
$node = node_load($node->nid);
if (node_access('view', $node)) {
$nodes_array[] = $node;
$hash_list[] = $node->nid;
if ($node->changed > $max_changed) {
$max_changed = $node->changed;
}
}
}
sort($hash_list);
$cid = $cache_name . ':' . md5(join('+', $hash_list));
_kml_feed_check_cache($nodes_array, $attributes, $cid, $max_changed);
}