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
for($i=0;$i<count($csvHeaderNames);$i++) {
if(!$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
if(!isset($row[$i]) || !$row[$i]) $csvData .= '"",'; // If there is no data for this column, output it as blank instead
else $csvData .= '"'.str_replace('"', '\"', $row[$i]).'",';
}
// Start a new row for each submission
$csvData .= "\n";

View File

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