MINOR: fixed undefined notice with export csv

This commit is contained in:
Will Rossiter 2009-07-10 04:51:24 +00:00
parent 72baa7e893
commit 031b91a791
2 changed files with 5 additions and 7 deletions

View File

@ -128,8 +128,8 @@ class SubmittedFormReportField extends FormField {
// Loop over all the names we can use // Loop over all the names we can use
for($i=0;$i<count($csvHeaderNames);$i++) { for($i=0;$i<count($csvHeaderNames);$i++) {
if(!$row[$i]) $csvData .= '"",'; // If there is no data for this column, output it as blank instead if(!isset($row[$i]) || !$row[$i]) $csvData .= '"",'; // If there is no data for this column, output it as blank instead
else $csvData .= '"'.$row[$i].'",'; // Otherwise, output the value for this column else $csvData .= '"'.str_replace('"', '\"', $row[$i]).'",';
} }
// Start a new row for each submission // Start a new row for each submission
$csvData .= "\n"; $csvData .= "\n";

View File

@ -68,12 +68,10 @@
<% end_if %> <% end_if %>
<fieldset class="customRules fieldOptionsGroup"> <fieldset class="customRules fieldOptionsGroup">
<legend>Custom Rules</legend> <legend><% _t('CUSTOMRULES', 'Custom Rules') %></legend>
<ul id="{$FieldName}-customRules"> <ul id="{$FieldName}-customRules">
<li> <li>
<a href="#" class="addCondition" title="<% _t('ADD', 'Add') %>"> <a href="#" class="addCondition" title="<% _t('ADD', 'Add') %>"><% _t('ADDRULE', 'Add Rule') %></a>
Add Rule
</a>
</li> </li>
<li class="addCustomRule"> <li class="addCustomRule">
<select name="{$FieldName}[CustomSettings][ShowOnLoad]"> <select name="{$FieldName}[CustomSettings][ShowOnLoad]">
@ -81,7 +79,7 @@
<option value="Hide" <% if ShowOnLoad %><% else %>selected="selected"<% end_if %>><% _t('HIDE', 'Hide') %></option> <option value="Hide" <% if ShowOnLoad %><% else %>selected="selected"<% end_if %>><% _t('HIDE', 'Hide') %></option>
</select> </select>
<label class="left">Field On Default</label> <label class="left"><% _t('FIELDONDEFAULT', 'Field On Default') %></label>
</li> </li>
<li class="hidden"> <li class="hidden">
<select class="displayOption customRuleField" name="{$FieldName}[CustomRules][Display]"> <select class="displayOption customRuleField" name="{$FieldName}[CustomRules][Display]">