Commit 8c26f947 authored by nils.destoop's avatar nils.destoop Committed by tim.plunkett
Browse files

Issue #1621236 by zuuperman, dawehner: Fixed Fatal error on updating display...

Issue #1621236 by zuuperman, dawehner: Fixed Fatal error on updating display machine name, when blocks module is not installed.
parent 10a85c7e
......@@ -206,16 +206,21 @@ function update_block_bid($name, $old_delta, $delta) {
$hashes[$md5_delta] = $delta;
$delta = $md5_delta;
}
db_update('block')
->fields(array('delta' => $delta))
->condition('delta', $old_delta)
->execute();
// Maybe people don't have block module installed, so let's skip this.
if (module_exists('block')) {
db_update('block')
->fields(array('delta' => $delta))
->condition('delta', $old_delta)
->execute();
}
// Update the hashes if needed.
if ($hashes != $old_hashes) {
variable_set('views_block_hashes', $hashes);
}
}
/**
* Save the block cache setting in the blocks table if this block allready
* exists in the blocks table. Dirty fix untill http://drupal.org/node/235673 gets in.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment