function tvi_load_settings in Taxonomy Views Integrator 6
Same name and namespace in other branches
- 7 includes/tvi.query.inc \tvi_load_settings()
Loads a setting from the database or return a default, if the $return_default flag is set.
3 calls to tvi_load_settings()
- tvi_get_term_info in ./
tvi.module - Returns different data sets with the term, view, and settings information for a specified term id.
- tvi_term_form in includes/
tvi.admin.inc - Adds TVI administration form to the term edit page
- tvi_vocab_form in includes/
tvi.admin.inc - Adds TVI administration form to the vocabulary edit page
File
- includes/
tvi.query.inc, line 30 - TVI Database Interface
Code
function tvi_load_settings($xid, $type = TVI_TYPE_TERM, $return_default = TRUE) {
$settings = db_fetch_object(db_query("SELECT * FROM {tvi_settings} ts WHERE ts.type = '%s' AND ts.xid = %d", $type, $xid));
if (!is_object($settings)) {
return $return_default ? tvi_default_settings($type, $xid) : NULL;
}
$settings->is_default = FALSE;
return $settings;
}