summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaren Stevenson2008-10-08 12:45:25 (GMT)
committer Karen Stevenson2008-10-08 12:45:25 (GMT)
commit2a0927281f18851c2ff9f6573645629d61b1a8cb (patch)
tree302dd371fd6472f6901d1b37a5b47d41aafd7e2c
parent9a8ca8270b3f2b9f45b9484f673f5fdada36f652 (diff)
#318387 Make sure old fieldgroup updates don't run if tables were never created.
-rw-r--r--CHANGELOG.txt1
-rw-r--r--modules/fieldgroup/fieldgroup.install9
2 files changed, 10 insertions, 0 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 7b2f50a..f37df92 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -3,6 +3,7 @@
CCK 6.2-dev
===========
+- #318387 Make sure old fieldgroup updates don't run if tables were never created.
- #318227 Clean up update abort logic to more clearly explain what still needs to be done, add a helper function to prevent dangerous database operations until database is updated.
- #317232 Change css file name from content.css to content-module.css to avoid namespace collisions.
- #316656 Default weight must be zero, not NULL, or form ordering will be incorrect.
diff --git a/modules/fieldgroup/fieldgroup.install b/modules/fieldgroup/fieldgroup.install
index 281ce6f..2e1bb50 100644
--- a/modules/fieldgroup/fieldgroup.install
+++ b/modules/fieldgroup/fieldgroup.install
@@ -76,6 +76,9 @@ function fieldgroup_schema() {
*/
function fieldgroup_update_1() {
$ret = array();
+ if (!db_table_exists('node_group')) {
+ return $ret;
+ }
switch ($GLOBALS['db_type']) {
case 'pgsql':
$ret[] = update_sql("UPDATE {node_group} SET group_name = 'group_'||SUBSTRING(group_name FROM 7)");
@@ -96,6 +99,9 @@ function fieldgroup_update_1() {
*/
function fieldgroup_update_2() {
$ret = array();
+ if (!db_table_exists('node_group')) {
+ return $ret;
+ }
// set settings column to accept larger values
switch ($GLOBALS['db_type']) {
@@ -140,6 +146,9 @@ function fieldgroup_update_2() {
*/
function fieldgroup_update_3() {
$ret = array();
+ if (!db_table_exists('node_group')) {
+ return $ret;
+ }
$result = db_query("SELECT * FROM {node_group}");
while ($group = db_fetch_array($result)) {
$group['settings'] = unserialize($group['settings']);