Skip to content

Commit

Permalink
Fixing bug #632: Question title offset being wrong.
Browse files Browse the repository at this point in the history
git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/phpsurveyor@2819 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
David Olivier committed Apr 29, 2007
1 parent ab774b1 commit 3b354e0
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions admin/exportresults.php
Original file line number Diff line number Diff line change
Expand Up @@ -614,11 +614,14 @@
if ($type == "doc")
{
$flarray=explode($separator, $firstline);
$fli=1;
$fli=0;
foreach ($flarray as $fl)
{
$fieldmap[$fli]['title']=$fl;
$fli++;
if ($fl != "id")
{
$fieldmap[$fli]['title']=$fl;
$fli++;
}
}
}
elseif ($type == "xls")
Expand Down Expand Up @@ -706,7 +709,7 @@
$colcounter=0;
foreach ($drow as $rowfield)
{
$rowfield=str_replace("–","-",$rowfield);
$rowfield=str_replace("?","-",$rowfield);
$sheet->write($rowcounter,$colcounter,mb_convert_encoding($rowfield, "UTF-16LE", "UTF-8"));
$colcounter++;
}
Expand Down Expand Up @@ -738,7 +741,7 @@
{
$field=$dresult->FetchField($i);
$fieldinfo=$field->name;
if ($fieldinfo != "id" && $fieldinfo != "datestamp" && $fieldinfo != "ipaddr"&& $fieldinfo != "token" && $fieldinfo != "firstname" && $fieldinfo != "lastname" && $fieldinfo != "email" && $fieldinfo != "attribute_1" && $fieldinfo != "attribute_2")
if ($fieldinfo != "startlanguge" && $fieldinfo != "id" && $fieldinfo != "datestamp" && $fieldinfo != "ipaddr"&& $fieldinfo != "token" && $fieldinfo != "firstname" && $fieldinfo != "lastname" && $fieldinfo != "email" && $fieldinfo != "attribute_1" && $fieldinfo != "attribute_2")
{
$fielddata=arraySearchByKey($fieldinfo, $fieldmap, "fieldname", 1);
$fqid=$fielddata['qid'];
Expand Down Expand Up @@ -786,6 +789,9 @@
case "attribute_2":
$ftitle=$clang->gT("Attribute 2").":";
break;
case "startlanguage":
$ftitle=$clang->gT("Language").":";
break;
default:
$fielddata=arraySearchByKey($fieldinfo, $fieldmap, "fieldname", 1);
if (isset($fielddata['title'])) {$ftitle=$fielddata['title'].":";} else {$ftitle='';}
Expand Down

0 comments on commit 3b354e0

Please sign in to comment.