function domain_theme_lookup in Domain Access 6.2
Same name and namespace in other branches
- 5 domain_theme/domain_theme.module \domain_theme_lookup()
- 7.3 domain_theme/domain_theme.module \domain_theme_lookup()
- 7.2 domain_theme/domain_theme.module \domain_theme_lookup()
Get domain theme information
Parameters
$domain_id: The domain_id taken from {domain}.
$theme: The string representation of a {domain_theme} entry. Optional. If this value is NULL, the default theme for this domain will be returned.
$reset: A boolean flag to clear the static variable if necessary. Not used. Here for consistency.
Return value
An array containing the requested row from the {domain_theme} table. Returns -1 on failure.
4 calls to domain_theme_lookup()
- domain_theme_form_system_themes_form_alter in domain_theme/
domain_theme.admin.inc - Implement hook_form_alter().
- domain_theme_init in domain_theme/
domain_theme.module - Implement hook_init()
- domain_theme_page in domain_theme/
domain_theme.admin.inc - The domain theme page callback router.
- domain_theme_submit in domain_theme/
domain_theme.admin.inc - FormsAPI submit handler for the theme settings
1 string reference to 'domain_theme_lookup'
- domain_theme_domainbatch in domain_theme/
domain_theme.module - Implement hook_domainbatch()
File
- domain_theme/
domain_theme.module, line 127 - Domain Theme module for the Domain Access module group.
Code
function domain_theme_lookup($domain_id, $theme = NULL, $reset = FALSE) {
if (!is_null($theme)) {
$return = db_fetch_array(db_query("SELECT domain_id, theme, settings, status FROM {domain_theme} WHERE domain_id = %d AND theme= '%s'", $domain_id, $theme));
}
else {
$return = db_fetch_array(db_query("SELECT domain_id, theme, settings, status FROM {domain_theme} WHERE domain_id = %d AND status = 1", $domain_id));
}
if (empty($return)) {
$return = -1;
}
return $return;
}