function agenda_settings in Agenda 6.2
Same name and namespace in other branches
- 6 agenda.module \agenda_settings()
- 7.2 agenda.module \agenda_settings()
- 7 agenda.module \agenda_settings()
Retrieve the settings for a block
Parameters
int $delta The ID of the agenda:
string $parameter The parameter required:
2 calls to agenda_settings()
- agenda_debug in ./
agenda.admin.php - Provide a page to debug a calendar ID that is not working
- agenda_display_block in ./
agenda.module - Generate the themed agenda block
File
- ./
agenda.module, line 232
Code
function agenda_settings($delta) {
$res = db_query('SELECT name, value FROM {agenda} WHERE bid=%d', $delta);
$settings = new stdClass();
$settings->bid = $delta;
while ($row = db_fetch_array($res)) {
$settings->{$row['name']} = $row['value'];
}
if (!count($settings) || !isset($settings->title)) {
$settings = FALSE;
}
return $settings;
}