function biblio_update_6026 in Bibliography Module 7
Same name and namespace in other branches
- 6.2 biblio.install \biblio_update_6026()
- 6 biblio.install \biblio_update_6026()
- 7.2 biblio.install \biblio_update_6026()
File
- ./
biblio.install, line 1879
Code
function biblio_update_6026() {
// Move custom block titles stored in variable "biblio_block_title" to the block table if the title has not already been overriden.
$custom_title = variable_get('biblio_block_title', '');
if (!empty($custom_title)) {
$db_result = db_query("SELECT bid,title FROM {block} b where module='biblio' ");
foreach ($db_result as $block) {
if (empty($block->title)) {
db_query('UPDATE {block} SET title = :title WHERE bid = :bid', array(
':title' => $custom_title,
':bid' => $block->bid,
));
}
}
variable_del('biblio_block_title');
}
}