function views_plugin_display_block::save_block_cache
Save the block cache setting in the blocks table if this block already exists in the blocks table. Dirty fix until http://drupal.org/node/235673 gets in.
1 call to views_plugin_display_block::save_block_cache()
- views_plugin_display_block::options_submit in plugins/
views_plugin_display_block.inc - Perform any necessary changes to the form values prior to storage. There is no need for this function to actually store the data.
File
-
plugins/
views_plugin_display_block.inc, line 240
Class
- views_plugin_display_block
- The plugin that handles a block.
Code
public function save_block_cache($delta, $cache_setting) {
if (strlen($delta) >= 32) {
$delta = md5($delta);
}
if (db_table_exists('block') && db_query("SELECT bid FROM {block} WHERE module = 'views' AND delta = :delta", array(
':delta' => $delta,
))->fetchField()) {
db_update('block')->fields(array(
'cache' => $cache_setting,
))
->condition('module', 'views')
->condition('delta', $delta)
->execute();
}
}