Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed a bug in postgres block upgrade script messing up with block id…

…s (Merged from 15_STABLE)
  • Loading branch information...
commit dbbbb588a39370905827382133756247c4e32aaa 1 parent 803b6ea
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.