You are here

function tft_get_archive_tid in Taxonomy File Tree 7

Same name and namespace in other branches
  1. 7.2 tft.module \tft_get_archive_tid()

Finds the archive folder for the current OG term.

Parameters

int $og_tid:

Return value

int|null

6 calls to tft_get_archive_tid()
tft_archive_file_form_submit in ./tft.admin.inc
Submission callback
tft_archive_folder_batch_process in ./tft.module
Processes the batch logic.
tft_archive_term_form_submit in ./tft.admin.inc
Submission callback
tft_is_term_archived in ./tft.module
Checks if the term is already archived.
tft_restore_archived_element in ./tft.module

... See full list

File

./tft.module, line 650
Module hooks.

Code

function tft_get_archive_tid($og_tid) {
  return db_query("SELECT td.tid FROM {taxonomy_term_data} td\n                    LEFT JOIN {taxonomy_term_hierarchy} th ON th.tid = td.tid\n                   WHERE th.parent = :tid AND td.name = 'Archives'", array(
    ':tid' => $og_tid,
  ))
    ->fetchField();
}