function domain_theme_lookup in Domain Access 5
Same name and namespace in other branches
- 6.2 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}. Optional.
$theme: The string representation of a {domain_theme} entry. Optional.
$clear: 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.
3 calls to domain_theme_lookup()
- domain_theme_form_alter in domain_theme/
domain_theme_form.inc - Implement hook_form_alter()
- domain_theme_menu in domain_theme/
domain_theme.module - Implement hook_menu()
- domain_theme_submit in domain_theme/
domain_theme_form.inc - FormsAPI submut 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 154 - Domain Theme module for the Domain Access module group.
Code
function domain_theme_lookup($domain_id = NULL, $theme = NULL, $clear = FALSE) {
if (!is_null($domain_id)) {
$return = db_fetch_array(db_query("SELECT domain_id, theme, settings FROM {domain_theme} WHERE domain_id = %d", $domain_id));
}
else {
if (!is_null($theme)) {
$return = db_fetch_array(db_query("SELECT domain_id, theme, settings FROM {domain_theme} WHERE theme= '%s'", $theme));
}
}
if (empty($return)) {
$return = -1;
}
return $return;
}