From ff22b80dfc2bfa4cb8cdf474ec66cd21d51e67c5 Mon Sep 17 00:00:00 2001
From: Rudi Grinberg <rudi.grinberg@sourcefabric.org>
Date: Mon, 17 Sep 2012 17:49:16 -0400
Subject: [PATCH 1/3] formatting

---
 .../application/models/ShowBuilder.php        | 40 +++++++++----------
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/airtime_mvc/application/models/ShowBuilder.php b/airtime_mvc/application/models/ShowBuilder.php
index d708681ca..80a5329a0 100644
--- a/airtime_mvc/application/models/ShowBuilder.php
+++ b/airtime_mvc/application/models/ShowBuilder.php
@@ -23,26 +23,26 @@ class Application_Model_ShowBuilder
     private $showInstances = array();
 
     private $defaultRowArray = array(
-        "header" => false,
-        "footer" => false,
-        "empty" => false,
-        "allowed" => false,
-        "id" => 0,
-        "instance" => "",
-        "starts" => "",
-        "ends" => "",
-        "runtime" => "",
-        "title" => "",
-        "creator" => "",
-        "album" => "",
-        "timestamp" => null,
-        "cuein" => "",
-        "cueout" => "",
-        "fadein" => "",
-        "fadeout" => "",
-        "image" => false,
-        "color" => "", //in hex without the '#' sign.
-        "backgroundColor"=> "", //in hex without the '#' sign.
+        "header"          => false,
+        "footer"          => false,
+        "empty"           => false,
+        "allowed"         => false,
+        "id"              => 0,
+        "instance"        => "",
+        "starts"          => "",
+        "ends"            => "",
+        "runtime"         => "",
+        "title"           => "",
+        "creator"         => "",
+        "album"           => "",
+        "timestamp"       => null,
+        "cuein"           => "",
+        "cueout"          => "",
+        "fadein"          => "",
+        "fadeout"         => "",
+        "image"           => false,
+        "color"           => "", //in hex without the '#' sign.
+        "backgroundColor" => "", //in hex without the '#' sign.
     );
 
     /*

From 69756f60ca10290395aa6af4f2911baf3dabca41 Mon Sep 17 00:00:00 2001
From: Rudi Grinberg <rudi.grinberg@sourcefabric.org>
Date: Mon, 17 Sep 2012 17:49:25 -0400
Subject: [PATCH 2/3] formatting

---
 airtime_mvc/application/models/ShowBuilder.php | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/airtime_mvc/application/models/ShowBuilder.php b/airtime_mvc/application/models/ShowBuilder.php
index 80a5329a0..184b58cad 100644
--- a/airtime_mvc/application/models/ShowBuilder.php
+++ b/airtime_mvc/application/models/ShowBuilder.php
@@ -51,12 +51,12 @@ class Application_Model_ShowBuilder
      */
     public function __construct($p_startDT, $p_endDT, $p_opts)
     {
-        $this->startDT = $p_startDT;
-        $this->endDT = $p_endDT;
-        $this->timezone = date_default_timezone_get();
-        $this->user = Application_Model_User::getCurrentUser();
-        $this->opts = $p_opts;
-        $this->epoch_now = floatval(microtime(true));
+        $this->startDT     = $p_startDT;
+        $this->endDT       = $p_endDT;
+        $this->timezone    = date_default_timezone_get();
+        $this->user        = Application_Model_User::getCurrentUser();
+        $this->opts        = $p_opts;
+        $this->epoch_now   = floatval(microtime(true));
         $this->currentShow = false;
     }
 

From 095a5cce4f6bc9ed3a9332a139a872089ec43031 Mon Sep 17 00:00:00 2001
From: Rudi Grinberg <rudi.grinberg@sourcefabric.org>
Date: Mon, 17 Sep 2012 17:51:50 -0400
Subject: [PATCH 3/3] Added better debugging

---
 airtime_mvc/application/models/ShowBuilder.php | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/airtime_mvc/application/models/ShowBuilder.php b/airtime_mvc/application/models/ShowBuilder.php
index 184b58cad..178533199 100644
--- a/airtime_mvc/application/models/ShowBuilder.php
+++ b/airtime_mvc/application/models/ShowBuilder.php
@@ -129,6 +129,7 @@ class Application_Model_ShowBuilder
      * 0 = past
      * 1 = current
      * 2 = future
+     * TODO : change all of the above to real constants -- RG
      */
     private function getScheduledStatus($p_epochItemStart, $p_epochItemEnd, &$row)
     {
@@ -157,6 +158,14 @@ class Application_Model_ShowBuilder
         //item is in the future.
         else if ($this->epoch_now < $p_epochItemStart) {
             $row["scheduled"] = 2;
+        } else {
+            Logging::warn("No-op? is this what should happen...printing
+                debug just in case");
+            $d = array(
+                '$p_epochItemStart' => $p_epochItemStart,
+                '$p_epochItemEnd'   => $p_epochItemEnd,
+                '$row'              => $row);
+            Logging::warn($d);
         }
     }