function similarterms_get_overrides in Similar By Terms 6
Same name and namespace in other branches
- 7 similarterms.module \similarterms_get_overrides()
This function returns a list of overrides
2 calls to similarterms_get_overrides()
- similarterms_form_alter in ./
similarterms.module - Implementation of hook_form_alter().
- similarterms_list in ./
similarterms.module - Output the block
File
- ./
similarterms.module, line 416 - Similar By Terms module displays a block with similar content based on taxonomy terms.
Code
function similarterms_get_overrides($nid, $vid = NULL) {
$paths = array();
$query = "SELECT * FROM {similarterms_override} WHERE nid = '%s'";
$args = array(
$nid,
);
if ($vid) {
$query .= " AND vid = %s";
$args[] = $vid;
}
$result = db_query($query, $args);
while ($object = db_fetch_object($result)) {
$paths[$object->vid][] = $object->path;
}
return $paths;
}