function tft_is_file_archived in Taxonomy File Tree 7.2
Same name and namespace in other branches
- 7 tft.module \tft_is_file_archived()
File
- ./
tft.module, line 1292 - Hook implementations and module logic for TFT.
Code
function tft_is_file_archived($nid) {
$node = node_load($nid);
$folder_tids = array();
// Get original folder
foreach (array_keys($node->taxonomy) as $tid) {
if (variable_get('tft_vocabulary_vid', 0) == db_query("SELECT vid FROM {taxonomy_term_data} WHERE tid = :tid", array(
':tid' => $tid,
))
->fetchField()) {
$folder_tids[] = $tid;
}
}
foreach ($folder_tids as $tid) {
if (tft_is_term_archived($tid)) {
return TRUE;
}
}
return FALSE;
}