? .cvsignore
? before.sql
? station_529998.patch
? station_582778.patch
? station_next.patch
? archive/station_494616.patch
? archive/station_archive_views_inc.patch
? archive/station_playlist_260798.patch
? archive/views_working.patch
? schedule/before.sql
? schedule/views/.cvsignore
? schedule/views/station_schedule_handler_filter_program_scheduled.inc
? schedule/views/station_schedule_handler_filter_time_range.inc
Index: schedule/views.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/station/schedule/views.inc,v
retrieving revision 1.20
diff -u -p -r1.20 views.inc
--- schedule/views.inc	29 Aug 2009 08:01:43 -0000	1.20
+++ schedule/views.inc	20 Sep 2009 21:13:55 -0000
@@ -218,9 +218,7 @@ function station_schedule_views_tables()
  * Substitute current time; this works with cached queries.
  */
 function station_schedule_views_query_substitutions($view) {
-  $timestamp = station_local_ts(time());
-  $minute = station_minute_from_day_hour(date('w', $timestamp), date('G', $timestamp));
-  return array('***CURRENT_STATION_MINUTE***' => $minute);
+  return array('***CURRENT_STATION_MINUTE***' => station_minute_from_local_ts());
 }
 
 /**
Index: schedule/views/station_schedule.views.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/station/schedule/views/station_schedule.views.inc,v
retrieving revision 1.7
diff -u -p -r1.7 station_schedule.views.inc
--- schedule/views/station_schedule.views.inc	20 Sep 2009 06:56:56 -0000	1.7
+++ schedule/views/station_schedule.views.inc	20 Sep 2009 21:13:55 -0000
@@ -14,10 +14,10 @@ function station_schedule_views_handlers
       'station_schedule_handler_field_streams' => array(
         'parent' => 'views_handler_field',
       ),
-      'station_schedule_handler_field_start_time' => array(
+      'station_schedule_handler_field_time' => array(
         'parent' => 'views_handler_field',
       ),
-      'station_schedule_handler_field_finish_time' => array(
+      'station_schedule_handler_field_time_range' => array(
         'parent' => 'views_handler_field',
       ),
       'station_schedule_handler_field_iid_link' => array(
@@ -41,9 +41,9 @@ function station_schedule_views_handlers
       ),
 
       // Filter handlers
-//      'station_schedule_handler_filter_current_time' => array(
-//        'parent' => 'views_handler_filter_numeric',
-//      ),
+      'station_schedule_handler_filter_time_range' => array(
+        'parent' => 'views_handler_filter',
+      ),
     ),
   );
 }
@@ -67,9 +67,7 @@ function station_schedule_views_plugins(
  * Implementation of views_query_substitutions().
  */
 function station_schedule_views_query_substitutions($view) {
-  $timestamp = station_local_ts(time());
-  $minute = station_minute_from_day_hour(date('w', $timestamp), date('G', $timestamp));
-  return array('***CURRENT_STATION_MINUTE***' => $minute);
+  return array('***CURRENT_STATION_MINUTE***' => station_minute_from_local_ts());
 }
 
 /**
@@ -203,36 +201,44 @@ function station_schedule_views_data() {
       'label' => t('Program'),
     ),
   );
-  $data['station_schedule_item']['start'] = array(
+  $data['station_schedule_item']['time'] = array(
     'title' => t('Time'),
-    'help' => t("Schedule instance start time."),
+    'help' => t("Schedule instance time range."),
     'field' => array(
-      'handler' => 'station_schedule_handler_field_start_time',
-      'click sortable' => TRUE,
+      'handler' => 'station_schedule_handler_field_time_range',
+      'additional fields' => array('start', 'finish'),
     ),
     'argument' => array(
       'handler' => 'station_schedule_handler_argument_day',
       'label' => t('Day of week'),
     ),
 //    'filter' => array(
-//      'handler' => 'station_schedule_handler_filter_time',
+//      'handler' => 'station_schedule_handler_filter_time_range',
+//      'additional fields' => array('start', 'finish'),
 //      'label' => t('Start'),
 //    ),
     'sort' => array(
       'handler' => 'station_schedule_handler_sort_time',
     ),
   );
+  $data['station_schedule_item']['start'] = array(
+    'title' => t('Start'),
+    'help' => t("Schedule instance start time."),
+    'field' => array(
+      'handler' => 'station_schedule_handler_field_time',
+      'click sortable' => TRUE,
+    ),
+    'sort' => array(
+      'handler' => 'station_schedule_handler_sort_time',
+    ),
+  );
   $data['station_schedule_item']['finish'] = array(
     'title' => t('Finish'),
     'help' => t("Schedule instance completion time."),
     'field' => array(
-      'handler' => 'station_schedule_handler_field_finish_time',
+      'handler' => 'station_schedule_handler_field_time',
       'click sortable' => TRUE,
     ),
-//     'filter' => array(
-//       'handler' => 'station_schedule_handler_filter_time',
-//       'label' => t('Finish'),
-//     ),
     'sort' => array(
       'handler' => 'station_schedule_handler_sort_time',
     ),
Index: schedule/views/station_schedule.views_default.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/station/schedule/views/station_schedule.views_default.inc,v
retrieving revision 1.7
diff -u -p -r1.7 station_schedule.views_default.inc
--- schedule/views/station_schedule.views_default.inc	15 Sep 2009 04:14:18 -0000	1.7
+++ schedule/views/station_schedule.views_default.inc	20 Sep 2009 21:13:55 -0000
@@ -1,7 +1,6 @@
 <?php
 
 // $Id: station_schedule.views_default.inc,v 1.7 2009/09/15 04:14:18 drewish Exp $
-
 /**
  * Implementation of hook_views_default_views().
  */
@@ -40,6 +39,22 @@ function station_schedule_views_default_
   $handler->override_option('fields', array(
     'start' => array(
       'label' => 'Time',
+      'alter' => array(
+        'alter_text' => 0,
+        'text' => '',
+        'make_link' => 0,
+        'path' => '',
+        'alt' => '',
+        'prefix' => '',
+        'suffix' => '',
+        'help' => '',
+        'trim' => 0,
+        'max_length' => '',
+        'word_boundary' => 1,
+        'ellipsis' => 1,
+        'strip_tags' => 0,
+        'html' => 0,
+      ),
       'style' => 'station_hour',
       'exclude' => 0,
       'id' => 'start',
@@ -280,7 +295,23 @@ function station_schedule_views_default_
   $handler->override_option('fields', array(
     'start' => array(
       'label' => 'Time',
-      'style' => 'station_hour_range',
+      'alter' => array(
+        'alter_text' => 0,
+        'text' => '',
+        'make_link' => 0,
+        'path' => '',
+        'alt' => '',
+        'prefix' => '',
+        'suffix' => '',
+        'help' => '',
+        'trim' => 0,
+        'max_length' => '',
+        'word_boundary' => 1,
+        'ellipsis' => 1,
+        'strip_tags' => 0,
+        'html' => 0,
+      ),
+      'style' => 'station_hour',
       'exclude' => 0,
       'id' => 'start',
       'table' => 'station_schedule_item',
@@ -687,4 +718,3 @@ function station_schedule_views_default_
 }
 
 
-
Index: schedule/views/station_schedule_handler_field_finish_time.inc
===================================================================
RCS file: schedule/views/station_schedule_handler_field_finish_time.inc
diff -N schedule/views/station_schedule_handler_field_finish_time.inc
--- schedule/views/station_schedule_handler_field_finish_time.inc	10 Jun 2009 05:07:12 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,37 +0,0 @@
-<?php
-// $Id: station_schedule_handler_field_finish_time.inc,v 1.2 2009/06/10 05:07:12 drewish Exp $
-
-class station_schedule_handler_field_finish_time extends views_handler_field {
-  function construct() {
-    parent::construct();
-    $this->additional_fields['start'] = 'start';
-  }
-
-  function option_definition() {
-    $options = parent::option_definition();
-    $options['style'] = array('default' => 'station_hour');
-    return $options;
-  }
-
-  function options_form(&$form, &$form_state) {
-    parent::options_form($form, $form_state);
-
-    $form['style'] = array(
-      '#type' => 'radios',
-      '#title' => t('Style'),
-      '#options' => array(
-        'station_hour' => t('Time'),
-        'station_dayhour' => t('Day time'),
-        'station_hour_duration' => t('Duration'),
-      ),
-      '#default_value' => $this->options['style'],
-      '#description' => t('Which time style should be used.'),
-    );
-  }
-
-  function render($values) {
-    $start = $values->{$this->aliases['start']};
-    $finish = $values->{$this->field_alias};
-    return theme($this->options['style'], $start, $finish);
-  }
-}
Index: schedule/views/station_schedule_handler_field_start_time.inc
===================================================================
RCS file: schedule/views/station_schedule_handler_field_start_time.inc
diff -N schedule/views/station_schedule_handler_field_start_time.inc
--- schedule/views/station_schedule_handler_field_start_time.inc	10 Jun 2009 05:07:12 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,38 +0,0 @@
-<?php
-// $Id: station_schedule_handler_field_start_time.inc,v 1.2 2009/06/10 05:07:12 drewish Exp $
-
-class station_schedule_handler_field_start_time extends views_handler_field {
-  function construct() {
-    parent::construct();
-    $this->additional_fields['finish'] = 'finish';
-  }
-
-  function option_definition() {
-    $options = parent::option_definition();
-    $options['style'] = array('default' => 'station_hour');
-    return $options;
-  }
-
-  function options_form(&$form, &$form_state) {
-    parent::options_form($form, $form_state);
-
-    $form['style'] = array(
-      '#type' => 'radios',
-      '#title' => t('Style'),
-      '#options' => array(
-        'station_hour' => t('Time'),
-        'station_hour_range' => t('Time range'),
-        'station_dayhour' => t('Day time'),
-        'station_dayhour_range' => t('Day time range'),
-      ),
-      '#default_value' => $this->options['style'],
-      '#description' => t('Which time style should be used.'),
-    );
-  }
-
-  function render($values) {
-    $start = $values->{$this->field_alias};
-    $finish = $values->{$this->aliases['finish']};
-    return theme($this->options['style'], $start, $finish);
-  }
-}
Index: schedule/views/station_schedule_handler_field_time.inc
===================================================================
RCS file: schedule/views/station_schedule_handler_field_time.inc
diff -N schedule/views/station_schedule_handler_field_time.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ schedule/views/station_schedule_handler_field_time.inc	20 Sep 2009 21:13:55 -0000
@@ -0,0 +1,30 @@
+<?php
+// $Id: station_schedule_handler_field_finish_time.inc,v 1.2 2009/06/10 05:07:12 drewish Exp $
+
+class station_schedule_handler_field_time extends views_handler_field {
+  function option_definition() {
+    $options = parent::option_definition();
+    $options['style'] = array('default' => 'station_hour');
+    return $options;
+  }
+
+  function options_form(&$form, &$form_state) {
+    parent::options_form($form, $form_state);
+
+    $form['style'] = array(
+      '#type' => 'radios',
+      '#title' => t('Style'),
+      '#options' => array(
+        'station_hour' => t('Time'),
+        'station_dayhour' => t('Day time'),
+        'station_hour_duration' => t('Duration'),
+      ),
+      '#default_value' => $this->options['style'],
+      '#description' => t('Which time style should be used.'),
+    );
+  }
+
+  function render($values) {
+    return theme($this->options['style'], $values->{$this->field_alias});
+  }
+}
Index: schedule/views/station_schedule_handler_field_time_range.inc
===================================================================
RCS file: schedule/views/station_schedule_handler_field_time_range.inc
diff -N schedule/views/station_schedule_handler_field_time_range.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ schedule/views/station_schedule_handler_field_time_range.inc	20 Sep 2009 21:13:55 -0000
@@ -0,0 +1,40 @@
+<?php
+// $Id: station_schedule_handler_field_start_time.inc,v 1.2 2009/06/10 05:07:12 drewish Exp $
+
+class station_schedule_handler_field_time_range extends views_handler_field {
+  function option_definition() {
+    $options = parent::option_definition();
+    $options['style'] = array('default' => 'station_hour_range');
+    return $options;
+  }
+
+  function options_form(&$form, &$form_state) {
+    parent::options_form($form, $form_state);
+
+    $form['style'] = array(
+      '#type' => 'radios',
+      '#title' => t('Style'),
+      '#options' => array(
+        'station_hour' => t('Starting time'),
+        'station_hour_range' => t('Time range'),
+        'station_dayhour' => t('Starting day/time'),
+        'station_dayhour_range' => t('Day/time range'),
+      ),
+      '#default_value' => $this->options['style'],
+      '#description' => t('Which time style should be used.'),
+    );
+  }
+
+  function query() {
+    // Since 'time' isn't a real field just add in our additional fields and
+    // be done with it.
+    $this->ensure_my_table();
+    $this->add_additional_fields();
+  }
+
+  function render($values) {
+    $start = $values->{$this->aliases['start']};
+    $finish = $values->{$this->aliases['finish']};
+    return theme($this->options['style'], $start, $finish);
+  }
+}
