function dynamic_banner_find_load_default in Dynamic Banner 7
Same name and namespace in other branches
- 7.2 dynamic_banner.module \dynamic_banner_find_load_default()
- 8.x dynamic_banner.module \dynamic_banner_find_load_default()
Find the default banner and return all of it's attributes
1 call to dynamic_banner_find_load_default()
- dynamic_banner_admin_form in includes/
callbacks.inc - The main form dealing with dynamic banner There is now only one form for dynamic banner to deal with unlink in the d6 version
File
- includes/
callbacks.inc, line 755 - Dynamic Banner Admin Pages and various other functions to make them work Most of the code in this file was derived from path module
Code
function dynamic_banner_find_load_default() {
$query = db_select('dynamic_banner', 'd');
$query
->condition('d.path', 'DEFAULT', '=')
->fields('d');
$result = $query
->execute()
->fetchObject();
if ($result) {
return $result;
}
// do not return null for this
$blank_banner = new stdClass();
$blank_banner->dbid = 0;
$blank_banner->path = 'DEFAULT';
$blank_banner->imgurl = '';
$blank_banner->mode = 'normal';
$blank_banner->text = '';
$blank_banner->link = '';
$blank_banner->imgfid = '';
return $blank_banner;
}