Permalink
Browse files

Whoops! Fixed one tiny upgrade thing ... this will make choices

with "publish" turned off upgrade predictably
  • Loading branch information...
1 parent c1f1664 commit eeb2d76ee88d8dd07a92ce289c8ebe5921bf85d7 moodler committed Jul 1, 2004
Showing with 2 additions and 0 deletions.
  1. +1 −0 mod/choice/db/mysql.php
  2. +1 −0 mod/choice/db/postgres7.php
View
1 mod/choice/db/mysql.php
@@ -38,6 +38,7 @@ function choice_upgrade($oldversion) {
table_column("choice", "", "allowupdate", "integer", "2", "unsigned", "0", "", "release");
}
if ($oldversion < 2004070102) {
+ modify_database("", "UPDATE prefix_choice SET allowupdate = '1' WHERE publish = 0;");
modify_database("", "UPDATE prefix_choice SET release = '1' WHERE publish > 0;");
modify_database("", "UPDATE prefix_choice SET publish = publish - 1 WHERE publish > 0;");
}
View
1 mod/choice/db/postgres7.php
@@ -24,6 +24,7 @@ function choice_upgrade($oldversion) {
table_column("choice", "", "allowupdate", "integer", "2", "unsigned", "0", "", "release");
}
if ($oldversion < 2004070102) {
+ modify_database("", "UPDATE prefix_choice SET allowupdate = '1' WHERE publish = 0;");
modify_database("", "UPDATE prefix_choice SET release = '1' WHERE publish > 0;");
modify_database("", "UPDATE prefix_choice SET publish = publish - 1 WHERE publish > 0;");
}

0 comments on commit eeb2d76

Please sign in to comment.