Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed a bug in postgres block upgrade script messing up with block ids

  • Loading branch information...
commit 80729b01d02dec49c77ebc9a14106045141f9afa 1 parent 8bc776b
patrickslee authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  blocks/db/postgres7.php
View
2  blocks/db/postgres7.php
@@ -59,9 +59,9 @@ function blocks_upgrade($oldversion=0) {
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");
Please sign in to comment.
Something went wrong with that request. Please try again.