Revision: 2162
          http://mrbs.svn.sourceforge.net/mrbs/?rev=2162&view=rev
Author:   cimorrison
Date:     2011-11-02 10:45:58 +0000 (Wed, 02 Nov 2011)
Log Message:
-----------
Fixed some undefined variable errors

Modified Paths:
--------------
    mrbs/trunk/web/report.php

Modified: mrbs/trunk/web/report.php
===================================================================
--- mrbs/trunk/web/report.php   2011-11-02 10:26:36 UTC (rev 2161)
+++ mrbs/trunk/web/report.php   2011-11-02 10:45:58 UTC (rev 2162)
@@ -123,13 +123,13 @@
   }
   elseif ($output_as_html)
   {
-    $html .= "<colgroup>";
+    $html = "<colgroup>";
     foreach ($values as $value)
     {
       $html .= "<col>";
     }
     $html .= "</colgroup>\n";
-    $html = "<thead>\n";
+    $html .= "<thead>\n";
     $html .= "<tr>\n";
     foreach ($values as $value)
     {
@@ -192,7 +192,6 @@
     return;
   }
   
-  $rows_output++;
   $values = array();
   
   // Booking name
@@ -327,7 +326,8 @@
     {
       // If the custom field is an associative array then we want
       // the value rather than the array key
-      if (is_assoc($select_options["entry.$key"]) && 
+      if (isset($select_options["entry.$key"]) &&
+          is_assoc($select_options["entry.$key"]) && 
           array_key_exists($row[$key], $select_options["entry.$key"]))
       {
         $output = $select_options["entry.$key"][$row[$key]];
@@ -361,20 +361,22 @@
   {
     $json_data['aaData'][] = $values;
   }
-  elseif ($output_as_csv)
-  {
-    $line = '"';
-    $line .= implode("\"$csv_col_sep\"", $values);
-    $line .= '"' . $csv_row_sep;
-  }
   else
   {
-    $line = "<tr>\n<td>";
-    $line .= implode("</td>\n<td>", $values);
-    $line .= "</td>\n</tr>\n";
+    if ($output_as_csv)
+    {
+      $line = '"';
+      $line .= implode("\"$csv_col_sep\"", $values);
+      $line .= '"' . $csv_row_sep;
+    }
+    else
+    {
+      $line = "<tr>\n<td>";
+      $line .= implode("</td>\n<td>", $values);
+      $line .= "</td>\n</tr>\n";
+    }
+    echo $line;
   }
-  
-  echo $line;
 }
 
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
RSA&#174; Conference 2012
Save $700 by Nov 18
Register now&#33;
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to