Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
authored August 10, 2005

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  blocks/db/postgres7.php
2  blocks/db/postgres7.php
@@ -59,9 +59,9 @@ function blocks_upgrade($oldversion=0) {
59 59
         if(!empty($records)) {
60 60
             foreach($records as $block) {
61 61
                 $block->multiple = 0;
62  
-                unset($block->id);
63 62
                 insert_record('block', $block);
64 63
             }
  64
+            execute_sql("SELECT setval('{$CFG->prefix}block_id_seq', (SELECT MAX(id) FROM {$CFG->prefix}block), true)");
65 65
         }
66 66
 
67 67
         execute_sql("DROP TABLE {$CFG->prefix}blocks");

0 notes on commit dbbbb58

Please sign in to comment.
Something went wrong with that request. Please try again.