? before.sql
? info_cleanup.patch
? schedule/before.sql
? schedule/working.patch
Index: archive/station_archive.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/station/archive/station_archive.install,v
retrieving revision 1.13
diff -u -p -r1.13 station_archive.install
--- archive/station_archive.install	20 Apr 2009 00:00:29 -0000	1.13
+++ archive/station_archive.install	2 Jun 2009 08:45:11 -0000
@@ -3,7 +3,7 @@
 // $Id: station_archive.install,v 1.13 2009/04/20 00:00:29 drewish Exp $
 
 /**
- * Install the initial schema.
+ * Implementation of hook_schema().
  */
 function station_archive_install() {
   drupal_install_schema('station_archive');
Index: catalog/station_catalog.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/station/catalog/station_catalog.install,v
retrieving revision 1.14
diff -u -p -r1.14 station_catalog.install
--- catalog/station_catalog.install	26 May 2009 18:01:14 -0000	1.14
+++ catalog/station_catalog.install	2 Jun 2009 08:45:12 -0000
@@ -3,7 +3,7 @@
 // $Id: station_catalog.install,v 1.14 2009/05/26 18:01:14 drewish Exp $
 
 /**
- * Install the initial schema.
+ * Implementation of hook_schema().
  */
 function station_catalog_install() {
   drupal_install_schema('station_catalog');
Index: playlist/station_playlist.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/station/playlist/station_playlist.install,v
retrieving revision 1.11
diff -u -p -r1.11 station_playlist.install
--- playlist/station_playlist.install	28 May 2009 04:13:26 -0000	1.11
+++ playlist/station_playlist.install	2 Jun 2009 08:45:12 -0000
@@ -3,12 +3,16 @@
 // $Id: station_playlist.install,v 1.11 2009/05/28 04:13:26 drewish Exp $
 
 /**
- * Install the initial schema.
+ * Implementation of hook_schema().
  */
 function station_playlist_install() {
-  content_notify('install', 'station_playlist');
   drupal_install_schema('station_playlist');
 
+  // To deal with the possibility that we're being installed at the same time
+  // as CCK and the field modules we depend on, we need to manually enable the
+  // the modules to ensure they're availabe before we create our fields.
+  module_enable(array('content', 'nodereference', 'date'));
+
   # var_export(content_fields('field_station_program', 'station_playlist'));
   $program_field = array (
     'field_name' => 'field_station_program',
@@ -230,9 +234,6 @@ function station_playlist_install() {
  */
 function station_playlist_uninstall() {
   if (module_exists('content')) {
-    drupal_load('module', 'content');
-    content_notify('uninstall', 'station_playlist');
-
     module_load_include('inc', 'content', 'includes/content.crud');
     content_field_instance_delete('field_station_program', 'station_playlist');
     content_field_instance_delete('field_station_playlist_date', 'station_playlist');
@@ -245,23 +246,6 @@ function station_playlist_uninstall() {
 }
 
 /**
- * Implementation of hook_enable().
- */
-function station_playlist_enable() {
-  drupal_load('module', 'content');
-  content_notify('enable', 'station_playlist');
-}
-
-/**
- * Implementation of hook_disable().
- */
-function station_playlist_disable() {
-  drupal_load('module', 'content');
-  content_notify('disable', 'station_playlist');
-}
-
-
-/**
  * Implementation of hook_schema().
  */
 function station_playlist_schema() {
@@ -351,11 +335,8 @@ function station_playlist_update_6000() 
     $ret['#abort'] = array('success' => FALSE, 'query' => t('Station Playlist now requires CCK, Node Reference, and Link modules. Some updates are still pending.<br/>Please re-run the update script.'));
     return $ret;
   }
-  // Make sure there's no pending CCK udpates
+  // Make sure there's no pending CCK updates
   drupal_load('module', 'content');
-  if ($abort = content_check_update('station_playlist')) {
-    return $abort;
-  }
   if ($abort = content_check_update('nodereference')) {
     return $abort;
   }
Index: program/station_program.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/station/program/station_program.install,v
retrieving revision 1.11
diff -u -p -r1.11 station_program.install
--- program/station_program.install	28 May 2009 04:13:27 -0000	1.11
+++ program/station_program.install	2 Jun 2009 08:45:12 -0000
@@ -2,11 +2,13 @@
 // $Id: station_program.install,v 1.11 2009/05/28 04:13:27 drewish Exp $
 
 /**
- * Install the initial schema.
+ * Implementation of hook_schema().
  */
 function station_program_install() {
-  drupal_load('module', 'content');
-  content_notify('install', 'station_program');
+  // To deal with the possibility that we're being installed at the same time
+  // as CCK and the field modules we depend on, we need to manually enable the
+  // the modules to ensure they're availabe before we create our fields.
+  module_enable(array('content', 'text', 'link'));
 
   # var_export(content_fields('field_station_program_genre', 'station_program'));
   $genre_field = array (
@@ -213,9 +215,6 @@ function station_program_install() {
  */
 function station_program_uninstall() {
   if (module_exists('content')) {
-    drupal_load('module', 'content');
-    content_notify('uninstall', 'station_program');
-
     module_load_include('inc', 'content', 'includes/content.crud');
     content_field_instance_delete('field_station_program_genre', 'station_program');
     content_field_instance_delete('field_station_program_link', 'station_program');
@@ -223,22 +222,6 @@ function station_program_uninstall() {
 }
 
 /**
- * Implementation of hook_enable().
- */
-function station_program_enable() {
-  drupal_load('module', 'content');
-  content_notify('enable', 'station_program');
-}
-
-/**
- * Implementation of hook_disable().
- */
-function station_program_disable() {
-  drupal_load('module', 'content');
-  content_notify('disable', 'station_program');
-}
-
-/**
  * Implementation of hook_update_last_removed().
  */
 function station_program_update_last_removed() {
@@ -275,9 +258,9 @@ function station_program_update_6000() {
     $ret['#abort'] = array('success' => FALSE, 'query' => t('Station Program now requires CCK, Text and Link modules. Some updates are still pending.<br/>Please re-run the update script.'));
     return $ret;
   }
-  // Make sure there's no pending CCK udpates
+  // Make sure there's no pending CCK updates
   drupal_load('module', 'content');
-  if ($abort = content_check_update('station_program')) {
+  if ($abort = content_check_update('text')) {
     return $abort;
   }
   if ($abort = content_check_update('link')) {
Index: schedule/station_schedule.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/station/schedule/station_schedule.install,v
retrieving revision 1.24
diff -u -p -r1.24 station_schedule.install
--- schedule/station_schedule.install	31 May 2009 23:01:22 -0000	1.24
+++ schedule/station_schedule.install	2 Jun 2009 08:45:12 -0000
@@ -3,11 +3,16 @@
 // $Id: station_schedule.install,v 1.24 2009/05/31 23:01:22 drewish Exp $
 
 /**
- * Install the initial schema.
+ * Implementation of hook_schema().
  */
 function station_schedule_install() {
   drupal_install_schema('station_schedule');
 
+  // To deal with the possibility that we're being installed at the same time
+  // as CCK and the field modules we depend on, we need to manually enable the
+  // the modules to ensure they're availabe before we create our fields.
+  module_enable(array('content', 'userreference'));
+
   $roles = user_roles(TRUE);
   $dj_role = variable_get('station_schedule_dj_role', DRUPAL_AUTHENTICATED_RID);
   $dj_title = variable_get('station_schedule_dj_title', 'DJs');
@@ -46,7 +51,7 @@ function station_schedule_install() {
     'db_storage' => '0',
     'module' => 'userreference',
     'active' => '1',
-    'locked' => '0',
+    'locked' => '1',
     'columns' =>
     array (
       'uid' =>
@@ -96,17 +101,14 @@ function station_schedule_install() {
  * Implementation of hook_uninstall().
  */
 function station_schedule_uninstall() {
-  drupal_uninstall_schema('station_schedule');
-
   if (module_exists('content')) {
-    drupal_load('module', 'content');
-    content_notify('uninstall', 'station_program');
-
     module_load_include('inc', 'content', 'includes/content.crud');
     content_field_instance_delete('field_station_program_genre', 'station_program');
     content_field_instance_delete('field_station_program_link', 'station_program');
   }
 
+  drupal_uninstall_schema('station_schedule');
+
   variable_del('station_schedule_redirect_old_urls');
   variable_del('station_schedule_default');
 
@@ -115,26 +117,6 @@ function station_schedule_uninstall() {
 }
 
 /**
- * Implementation of hook_requirements().
- */
-function station_schedule_requirements($phase) {
-  $requirements = array();
-  $t = get_t();
-
-  // The installer doesn't order modules by dependency, and since
-  // station_schedule sorts ahead of userreference it'll try to install us
-  // before userreference. See: http://drupal.org/node/357519
-  if ($phase == 'install' && !module_exists('userreference')) {
-    $requirements['station_schedule_userreference'] = array(
-      'description' => $t('Sadly the Station Schedule cannot be installed until the User Reference module has been fully installed. User Reference should now be installed, so please try installing Station Schedule again.'),
-      'severity' => REQUIREMENT_ERROR,
-    );
-  }
-
-  return $requirements;
-}
-
-/**
  * Implementation of hook_schema().
  */
 function station_schedule_schema() {
@@ -417,7 +399,7 @@ function station_schedule_update_6001() 
     $ret['#abort'] = array('success' => FALSE, 'query' => t('Station Playlist now requires CCK and User Reference modules. Some updates are still pending.<br/>Please re-run the update script.'));
     return $ret;
   }
-  // Make sure there's no pending CCK udpates
+  // Make sure there's no pending CCK updates
   drupal_load('module', 'content');
   if ($abort = content_check_update('userreference')) {
     return $abort;
@@ -461,7 +443,7 @@ function station_schedule_update_6001() 
     'db_storage' => '0',
     'module' => 'userreference',
     'active' => '1',
-    'locked' => '0',
+    'locked' => '1',
     'columns' =>
     array (
       'uid' =>
