function classified_block_save in Classified Ads 6.3
Same name and namespace in other branches
- 7.3 classified.module \classified_block_save()
Implements the D7 hook_block_save().
1 call to classified_block_save()
- classified_block in ./
classified.module - Implements hook_block().
File
- ./
classified.module, line 694 - A pure D6 classified ads module inspired by the ed_classified module.
Code
function classified_block_save($delta, $edit) {
if (in_array($delta, array(
'recent',
'popular',
))) {
$vars = _classified_get_vars();
$name = 'classified-' . $delta . '-count';
$count = $edit[$name];
if (!is_numeric($count) || $count < 0 || $count > 999) {
drupal_set_message(t('Invalid number of entries requested (@count). Resetting to default (@default).', array(
'@count' => empty($count) ? 0 : $count,
'@default' => $vars[$name],
)));
$count = $vars[$name];
}
variable_set($name, $count);
}
}