Fixed a bug in postgres block upgrade script messing up with block ids (Merged from 15_STABLE)

This commit is contained in:
patrickslee 2005-08-10 05:31:46 +00:00
parent 803b6ea4e3
commit dbbbb588a3

View File

@ -59,9 +59,9 @@ global $CFG;
if(!empty($records)) {
foreach($records as $block) {
$block->multiple = 0;
unset($block->id);
insert_record('block', $block);
}
execute_sql("SELECT setval('{$CFG->prefix}block_id_seq', (SELECT MAX(id) FROM {$CFG->prefix}block), true)");
}
execute_sql("DROP TABLE {$CFG->prefix}blocks");