You are here

function biblio_update_28 in Bibliography Module 5

File

./biblio.install, line 701

Code

function biblio_update_28() {
  $result = array();

  // 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 title FROM {blocks} b where module='biblio' ");
    while ($block = db_fetch_object($db_result)) {
      if (empty($block->title)) {
        $block->title = $custom_title;
        $result[] = update_sql("UPDATE {blocks} SET title='" . $block->title . "' module='biblio' ");
      }
    }
    variable_del('biblio_block_title');
  }
  return $result;
}