diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2008-11-03 05:55:57 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2008-11-03 05:55:57 +0000 |
commit | d0f8f90a364fb1ab6253e9e2cfa42ecd57cc6c3b (patch) | |
tree | ff72a2b6b625de24c862c63aaab7c143e9a4120d /modules | |
parent | 0f956d42022bf6fd1e830b9bcb3fad6fa493a426 (diff) | |
download | brdo-d0f8f90a364fb1ab6253e9e2cfa42ecd57cc6c3b.tar.gz brdo-d0f8f90a364fb1ab6253e9e2cfa42ecd57cc6c3b.tar.bz2 |
#303889 by David_Rothstein, kbahey, and chx: Make it possible to update D6 -> D7.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/node/node.module | 5 | ||||
-rw-r--r-- | modules/system/system.install | 9 |
2 files changed, 8 insertions, 6 deletions
diff --git a/modules/node/node.module b/modules/node/node.module index 473eb857d..eed4cf34a 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -594,8 +594,9 @@ function _node_types_build() { while ($type_object = db_fetch_object($type_result)) { // Check for node types from disabled modules and mark their types for removal. // Types defined by the node module in the database (rather than by a separate - // module using hook_node_info) have a base value of 'node_content'. - if ($type_object->base != 'node_content' && empty($info_array[$type_object->type])) { + // module using hook_node_info) have a base value of 'node_content'. The isset() + // check prevents errors on old (pre-Drupal 7) databases. + if (isset($type_object->base) && $type_object->base != 'node_content' && empty($info_array[$type_object->type])) { $type_object->disabled = TRUE; } if (!isset($_node_types[$type_object->type]) || $type_object->modified) { diff --git a/modules/system/system.install b/modules/system/system.install index a1c353aa9..af0140121 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -2955,7 +2955,7 @@ function system_update_7006() { 'type' => array('type' => 'varchar', 'length' => 9, 'not null' => TRUE, 'default' => ''), 'filename' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), 'module' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'suffix' => array('type' => 'varchar', 'length' => 69, 'not null' => TRUE, 'default' => ''), + 'suffix' => array('type' => 'varchar', 'length' => 68, 'not null' => TRUE, 'default' => ''), 'weight' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), ), 'primary key' => array('name', 'type'), @@ -3071,8 +3071,8 @@ function system_update_7009() { */ function system_update_7010() { $ret = array(); - db_change_field($ret, 'menu_router', 'load_functions', 'load_functions', array('type' => 'text', 'not null' => TRUE, 'default' => '')); - db_change_field($ret, 'menu_router', 'to_arg_functions', 'to_arg_functions', array('type' => 'text', 'not null' => TRUE, 'default' => '',)); + db_change_field($ret, 'menu_router', 'load_functions', 'load_functions', array('type' => 'text', 'not null' => TRUE)); + db_change_field($ret, 'menu_router', 'to_arg_functions', 'to_arg_functions', array('type' => 'text', 'not null' => TRUE)); return $ret; } @@ -3107,10 +3107,11 @@ function system_update_7012() { $ret = array(); db_drop_unique_key($ret, 'search_dataset', 'sid_type'); db_add_primary_key($ret, 'search_dataset', array('sid', 'type')); - + db_drop_index($ret, 'search_index', 'word'); db_drop_unique_key($ret, 'search_index', 'word_sid_type'); db_add_primary_key($ret, 'search_index', array('word', 'sid', 'type')); + return $ret; } |