Index: content.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cck/content.install,v
retrieving revision 1.42
diff -u -r1.42 content.install
--- content.install	4 Jul 2007 20:40:35 -0000	1.42
+++ content.install	5 Jul 2007 23:01:28 -0000
@@ -10,6 +10,24 @@
  */
 function content_install() {
   variable_set('content_schema_version', 1003);
+
+  // Add cck core tables.
+  drupal_install_schema('node_field');
+  drupal_install_schema('node_field_instance');
+  drupal_install_schema('cache_content');
+}
+
+
+/**
+ * Implementation of hook_uninstall().
+ */
+function content_uninstall() {
+  variable_del('content_schema_version');
+
+  // Remove cck core tables.
+  drupal_uninstall_schema('node_field');
+  drupal_uninstall_schema('node_field_instance');
+  drupal_uninstall_schema('cache_content');
 }
 
 /**
Index: content.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cck/content.module,v
retrieving revision 1.131
diff -u -r1.131 content.module
--- content.module	4 Jul 2007 23:47:54 -0000	1.131
+++ content.module	5 Jul 2007 23:55:02 -0000
@@ -13,8 +13,8 @@
 define('CONTENT_CALLBACK_DEFAULT', 0x0002);
 define('CONTENT_CALLBACK_CUSTOM', 0x0004);
 
-function content_help($section) {
-  if (preg_match('!^admin/content/types/.*/display$!', $section)) {
+function content_help($path, $arg) {
+  if (preg_match('!^admin/content/types/.*/display$!', $path)) {
     return t("Configure how this content type's fields and field labels should be displayed when it's viewed in teaser and full-page mode.");
   }
 }
@@ -33,13 +33,13 @@
 function content_init() {
   drupal_add_css(drupal_get_path('module', 'content') .'/content.css');
   if (arg(0) == 'admin') {
-    include_once('./'. drupal_get_path('module', 'content') .'/content_admin.inc');
+    module_load_include('inc', 'content', 'content_admin');
   }
   if (module_exists('views')) {
-    include_once('./'. drupal_get_path('module', 'content') .'/content_views.inc');
+    module_load_include('inc', 'content', 'content_views');
   }
   if (module_exists('pathauto')) {
-    include_once('./'. drupal_get_path('module', 'content') .'/content_pathauto.inc');
+    module_load_include('inc', 'content', 'content_pathauto');
   }
 }
 
@@ -66,6 +66,8 @@
       'page callback' => 'drupal_get_form',
       'page arguments' => array('content_admin_field_overview_form', $type_name),
       'access arguments' => array('administer content types'),
+      'file' => 'content_admin.inc',
+      'file path' => drupal_get_path('module', 'content'),
       'type' => MENU_LOCAL_TASK,
       'weight' => 0,
     );
@@ -74,6 +76,8 @@
       'page callback' => 'drupal_get_form',
       'page arguments' => array('content_admin_display_overview_form', $type_name),
       'access arguments' => array('administer content types'),
+      'file' => 'content_admin.inc',
+      'file path' => drupal_get_path('module', 'content'),
       'type' => MENU_LOCAL_TASK,
       'weight' => 1,
     );
@@ -82,6 +86,8 @@
       'page callback' => '_content_admin_field_add',
       'page arguments' => array($type_name),
       'access arguments' => array('administer content types'),
+      'file' => 'content_admin.inc',
+      'file path' => drupal_get_path('module', 'content'),
       'type' => MENU_LOCAL_TASK,
       'weight' => 2,
     );
@@ -91,6 +97,8 @@
         'title' => t($field['widget']['label']),
         'page callback' => 'drupal_get_form',
         'page arguments' => array('_content_admin_field', $type_name, $field_name),
+        'file' => 'content_admin.inc',
+        'file path' => drupal_get_path('module', 'content'),
         'access arguments' => array('administer content types'),
         'type' => MENU_CALLBACK,
       );
@@ -99,15 +107,39 @@
         'page callback' => 'drupal_get_form',
         'page arguments' => array('_content_admin_field_remove', $type_name, $field_name),
         'access arguments' => array('administer content types'),
+        'file' => 'content_admin.inc',
+        'file path' => drupal_get_path('module', 'content'),
         'type' => MENU_CALLBACK,
       );
     }
   }
-
   return $items;
 }
 
 /**
+ * Implementation of hook_theme().
+ */
+function content_theme() {
+  return array(
+    'content_field' => array(
+      'arguments' => array('node', 'field', 'items', 'teaser', 'page'),
+      ),
+    'content_admin_field_overview_form' => array(
+      'arguments' => array('form'),
+      ),
+    'content_admin_display_overview_form' => array(
+      'arguments' => array('form'),
+      ),
+    'content_admin_field_add_new_field_widget_type' => array(
+      'arguments' => array('form'),
+      ),
+    'content_view_multiple_field' => array(
+      'arguments' => array('items', 'field', 'data'),
+      ),
+    );
+}
+
+/**
  * Load data for a node type's fields.
  *
  * When loading one of the content.module nodes, we need to let each field handle
@@ -117,7 +149,7 @@
 function content_load($node) {
   $cid = 'content:'. $node->nid .':'. $node->vid;
   if ($cached = cache_get($cid, 'cache_content')) {
-    return unserialize($cached->data);
+    return $cached->data;
   }
   else {
     $default_additions = _content_field_invoke_default('load', $node);
@@ -132,7 +164,7 @@
         $default_additions[$key] = $value;
       }
     }
-    cache_set($cid, 'cache_content', serialize($default_additions));
+    cache_set($cid, $default_additions, 'cache_content');
     return $default_additions;
   }
 }
@@ -302,8 +334,8 @@
  *  any time the content module is enabled.
  */
 function content_enable() {
-  include_once('./'. drupal_get_path('module', 'content') .'/content_admin.inc');
-  include_once('./'. drupal_get_path('module', 'content') .'/content_crud.inc');
+  module_load_include('inc', 'content', 'content_admin');
+  module_load_include('inc', 'content', 'content_crud');
   content_types_rebuild();
 }
 
@@ -693,7 +725,7 @@
 
   if ($reset || !isset($info)) {
     if ($cached = cache_get('content_type_info', 'cache_content')) {
-      $info = unserialize($cached->data);
+      $info = $cached->data;
     }
     else {
       $info = array(
@@ -774,7 +806,7 @@
         $info['content types'][$type['type']] = $type;
       }
 
-      cache_set('content_type_info', 'cache_content', serialize($info));
+      cache_set('content_type_info', $info, 'cache_content');
     }
   }
   return $info;
@@ -787,15 +819,15 @@
 function content_node_type($op, $info) {
   switch ($op) {
     case 'insert':
-      include_once('./'. drupal_get_path('module', 'content') .'/content_crud.inc');
+      module_load_include('inc', 'content', 'content_crud');
       content_type_create($info);
       break;
     case 'update':
-      include_once('./'. drupal_get_path('module', 'content') .'/content_crud.inc');
+      module_load_include('inc', 'content', 'content_crud');
       content_type_update($info);
       break;
     case 'delete':
-      include_once('./'. drupal_get_path('module', 'content') .'/content_crud.inc');
+      module_load_include('inc', 'content', 'content_crud');
       content_type_delete($info);
       break;
   }
Index: content.schema
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cck/content.schema,v
retrieving revision 1.2
diff -u -r1.2 content.schema
--- content.schema	5 Jul 2007 15:13:40 -0000	1.2
+++ content.schema	5 Jul 2007 23:00:16 -0000
@@ -32,58 +32,5 @@
     'primary key' => array('field_name', 'type_name'),
   );
 
-  // Create a table for the cache.
-  $schema['cache_content'] = drupal_get_schema_unprocessed('system', 'cache');
-
-  // Add a table for each content type.
-  $content_type_info = _content_type_info();
-  foreach (content_types() as $type_name => $content_type) {
-    $content_tablename = _content_tablename($type_name, CONTENT_DB_STORAGE_PER_CONTENT_TYPE);
-    $schema[$content_tablename] = array(
-      'fields' => array(
-        'nid'     => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE),
-        'vid'     => array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, 'default' => 0),
-      ),
-      'indexes' => array(
-        'nid'     => array('nid'),
-      ),
-      'unique keys' => array(
-        'nid_vid' => array('nid', 'vid'),
-        'vid'     => array('vid')
-      ),
-      'primary key' => array('nid'),
-    );
-    // Add per content type fields to content table schema.
-    foreach ($content_type_info['content type'][$type_name]['fields'] as $field_name => $field) {
-      $db_info = content_database_info($field);
-      if ($db_info['table'] == $content_table) {
-        $schema[$content_tablename]['fields'] += $db_info['columns'];
-      }
-    }
-  }
-
-  // Add a table for each field that has its own table.
-  foreach ($content_type_info['fields'] as $field_name => $field) {
-    $field_tablename = _content_tablename($field_name, CONTENT_DB_STORAGE_PER_FIELD);
-    $db_info = content_database_info($field);
-    if ($db_info['table'] == $field_tablename) {
-      $schema[$field_tablename] = array(
-        'fields' => array(
-          'nid'     => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE),
-          'vid'     => array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, 'default' => 0),
-        ),
-        'indexes' => array(
-          'nid'     => array('nid'),
-        ),
-        'unique keys' => array(
-          'nid_vid' => array('nid', 'vid'),
-          'vid'     => array('vid')
-        ),
-        'primary key' => array('nid'),
-      );
-      $schema[$field_tablename]['fields'] += $db_info['columns'];
-    }
-  }
-
   return $schema;
 }
\ No newline at end of file
Index: content_admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cck/content_admin.inc,v
retrieving revision 1.67
diff -u -r1.67 content_admin.inc
--- content_admin.inc	4 Jul 2007 23:47:54 -0000	1.67
+++ content_admin.inc	5 Jul 2007 23:50:34 -0000
@@ -53,11 +53,12 @@
   $dummy_node = new stdClass();
   $dummy_node->type = $type['type'];
   $dummy_node->name = '';
-  $dummy_form_id = $type['type'] .'_node_form';
-  $dummy_form = node_form($dummy_node);
+  $form_state = array();
+  $dummy_form = array();
+  $dummy_form = node_form($form_state, $dummy_form);
   foreach (module_implements('form_alter') as $module) {
     $function = $module .'_form_alter';
-    $function($dummy_form, $dummy_form_id);
+    $function($dummy_form, $form_state);
   }
 
   // Move group fields into a 'fields' subgroup to make them easier to identify.
@@ -712,7 +713,7 @@
   $field = $type['fields'][$form_values['field_name']];
 
   if ($type && $field && $form_values['confirm']) {
-    include_once('./'. drupal_get_path('module', 'content') .'/content_crud.inc');
+    module_load_include('inc', 'content', 'content_crud');
     content_field_instance_delete($form_values);
 
     drupal_set_message(t('Removed field %field from %type.', array('%field' => $field['widget']['label'], '%type' => $type['name'])));
Index: content_copy.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cck/content_copy.info,v
retrieving revision 1.4
diff -u -r1.4 content_copy.info
--- content_copy.info	4 Jul 2007 23:46:29 -0000	1.4
+++ content_copy.info	6 Jul 2007 00:00:04 -0000
@@ -1,6 +1,6 @@
 ; $Id: content_copy.info,v 1.4 2007/07/04 23:46:29 yched Exp $
 name = Content Copy
 description = Enables ability to import/export field definitions.
-dependencies = content
+dependencies[] = content
 package = CCK
 core = 6.x
\ No newline at end of file
Index: fieldgroup.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cck/fieldgroup.info,v
retrieving revision 1.4
diff -u -r1.4 fieldgroup.info
--- fieldgroup.info	4 Jul 2007 23:46:29 -0000	1.4
+++ fieldgroup.info	5 Jul 2007 23:59:52 -0000
@@ -1,6 +1,6 @@
 ; $Id: fieldgroup.info,v 1.4 2007/07/04 23:46:29 yched Exp $
 name = Fieldgroup
 description = Create field groups for CCK fields.
-dependencies = content
+dependencies[] = content
 package = CCK
 core = 6.x
\ No newline at end of file
Index: fieldgroup.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cck/fieldgroup.module,v
retrieving revision 1.31
diff -u -r1.31 fieldgroup.module
--- fieldgroup.module	4 Jul 2007 23:47:54 -0000	1.31
+++ fieldgroup.module	5 Jul 2007 23:27:13 -0000
@@ -49,6 +49,20 @@
 
 }
 
+/**
+ * Implementation of hook_theme().
+ */
+function fieldgroup_theme() {
+  return array(
+    'fieldgroup_simple' => array(
+      'arguments' => array('element'),
+      ),
+    'fieldgroup_display_overview_form' => array(
+      'arguments' => array('form'),
+      ),
+  );
+}
+
 function fieldgroup_edit_group($content_type, $group_name, $action) {
   return drupal_get_form('fieldgroup_edit_group_form', $content_type, $group_name, $action);
 }
@@ -253,7 +267,7 @@
 
   if (!isset($groups) || $reset) {
     if ($cached = cache_get('fieldgroup_data', 'cache_content')) {
-      $data = unserialize($cached->data);
+      $data = $cached->data;
       $groups = $data['groups'];
       $groups_sorted = $data['groups_sorted'];
     }
@@ -275,7 +289,7 @@
       while ($field = db_fetch_array($result)) {
         $groups[$field['type_name']][$field['group_name']]['fields'][$field['field_name']] = $field;
       }
-      cache_set('fieldgroup_data', 'cache_content', serialize(array('groups' => $groups, 'groups_sorted' => $groups_sorted)));
+      cache_set('fieldgroup_data', array('groups' => $groups, 'groups_sorted' => $groups_sorted), 'cache_content');
     }
   }
 
Index: fieldgroup.schema
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cck/fieldgroup.schema,v
retrieving revision 1.1
diff -u -r1.1 fieldgroup.schema
--- fieldgroup.schema	4 Jul 2007 20:40:35 -0000	1.1
+++ fieldgroup.schema	5 Jul 2007 23:07:03 -0000
@@ -24,7 +24,5 @@
     'primary key' => array('type_name', 'group_name'),
   );
 
-  $schema['cache_content'] = drupal_get_schema_unprocessed('system', 'cache');
-
   return $schema;
 }
\ No newline at end of file
Index: nodereference.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cck/nodereference.info,v
retrieving revision 1.5
diff -u -r1.5 nodereference.info
--- nodereference.info	4 Jul 2007 23:46:29 -0000	1.5
+++ nodereference.info	5 Jul 2007 23:59:46 -0000
@@ -1,6 +1,6 @@
 ; $Id: nodereference.info,v 1.5 2007/07/04 23:46:29 yched Exp $
 name = Node Reference
 description = Defines a field type for referencing one node from another.
-dependencies = content
+dependencies[] = content
 package = CCK
 core = 6.x
\ No newline at end of file
Index: nodereference.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cck/nodereference.module,v
retrieving revision 1.65
diff -u -r1.65 nodereference.module
--- nodereference.module	28 Jun 2007 14:49:24 -0000	1.65
+++ nodereference.module	5 Jul 2007 23:22:40 -0000
@@ -22,6 +22,20 @@
 }
 
 /**
+ * Implementation of hook_theme().
+ */
+function nodereference_theme() {
+  return array(
+    'nodereference_simple' => array(
+      'arguments' => array('item'),
+      ),
+    'nodereference_advanced' => array(
+      'arguments' => array('item', 'view'),
+      ),
+  );
+}
+
+/**
  * Implementation of hook_field_info().
  */
 function nodereference_field_info() {
Index: number.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cck/number.info,v
retrieving revision 1.5
diff -u -r1.5 number.info
--- number.info	4 Jul 2007 23:46:29 -0000	1.5
+++ number.info	5 Jul 2007 23:59:40 -0000
@@ -1,6 +1,6 @@
 ; $Id: number.info,v 1.5 2007/07/04 23:46:29 yched Exp $
 name = Number
 description = Defines numeric field types.
-dependencies = content
+dependencies[] = content
 package = CCK
 core = 6.x
\ No newline at end of file
Index: optionwidgets.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cck/optionwidgets.info,v
retrieving revision 1.5
diff -u -r1.5 optionwidgets.info
--- optionwidgets.info	4 Jul 2007 23:46:29 -0000	1.5
+++ optionwidgets.info	5 Jul 2007 23:59:34 -0000
@@ -1,6 +1,6 @@
 ; $Id: optionwidgets.info,v 1.5 2007/07/04 23:46:29 yched Exp $
 name = Option Widgets
 description = Defines selection, check box and radio button widgets for text and numeric fields.
-dependencies = content
+dependencies[] = content
 package = CCK
 core = 6.x
\ No newline at end of file
Index: optionwidgets.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cck/optionwidgets.module,v
retrieving revision 1.18
diff -u -r1.18 optionwidgets.module
--- optionwidgets.module	29 Mar 2007 12:52:37 -0000	1.18
+++ optionwidgets.module	5 Jul 2007 23:23:47 -0000
@@ -7,6 +7,17 @@
  */
 
 /**
+ * Implementation of hook_theme().
+ */
+function optionwidgets_theme() {
+  return array(
+    'optionwidgets_none' => array(
+      'arguments' => array('widget_type', 'field_name', 'node_type'),
+      ),
+  );
+}
+
+/**
  * Implementation of hook_widget_info().
  */
 function optionwidgets_widget_info() {
Index: text.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cck/text.info,v
retrieving revision 1.5
diff -u -r1.5 text.info
--- text.info	4 Jul 2007 23:46:29 -0000	1.5
+++ text.info	5 Jul 2007 23:59:28 -0000
@@ -1,6 +1,6 @@
 ; $Id: text.info,v 1.5 2007/07/04 23:46:29 yched Exp $
 name = Text
 description = Defines simple text field types.
-dependencies = content
+dependencies[] = content
 package = CCK
 core = 6.x
\ No newline at end of file
