Skip to content

Commit

Permalink
Fixed issue #6119: Apostrophe bug in statistics PDF and Excel output
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed May 20, 2012
1 parent a78fd63 commit d6926f7
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions application/helpers/admin/statistics_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -740,16 +740,16 @@ function generate_statistics($surveyid, $allfields, $q2show='all', $usegraph=0,
{
case "xls":
$xlsRow = 0;
$sheet->write($xlsRow,0,$statlang->gT("Number of records in this query:"));
$sheet->write($xlsRow,0,$statlang->gT("Number of records in this query:",'unescaped'));
$sheet->write($xlsRow,1,$results);
++$xlsRow;
$sheet->write($xlsRow,0,$statlang->gT("Total records in survey:"));
$sheet->write($xlsRow,0,$statlang->gT("Total records in survey:",'unescaped'));
$sheet->write($xlsRow,1,$total);

if($total)
{
++$xlsRow;
$sheet->write($xlsRow,0,$statlang->gT("Percentage of total:"));
$sheet->write($xlsRow,0,$statlang->gT("Percentage of total:",'unescaped'));
$sheet->write($xlsRow,1,$percent."%");
}

Expand All @@ -759,16 +759,16 @@ function generate_statistics($surveyid, $allfields, $q2show='all', $usegraph=0,
// add summary to pdf
$array = array();
//$array[] = array($statlang->gT("Results"),"");
$array[] = array($statlang->gT("Number of records in this query:"), $results);
$array[] = array($statlang->gT("Total records in survey:"), $total);
$array[] = array($statlang->gT("Number of records in this query:",'unescaped'), $results);
$array[] = array($statlang->gT("Total records in survey:",'unescaped'), $total);

if($total)
$array[] = array($statlang->gT("Percentage of total:"), $percent."%");
$array[] = array($statlang->gT("Percentage of total:",'unescaped'), $percent."%");

$pdf->addPage('P','A4');

$pdf->Bookmark($pdf->delete_html($statlang->gT("Results")), 0, 0);
$pdf->titleintopdf($statlang->gT("Results"),$statlang->gT("Survey")." ".$surveyid);
$pdf->Bookmark($pdf->delete_html($statlang->gT("Results",'unescaped')), 0, 0);
$pdf->titleintopdf($statlang->gT("Results",'unescaped'),$statlang->gT("Survey",'unescaped')." ".$surveyid);
$pdf->tableintopdf($array);

$pdf->addPage('P','A4');
Expand Down

0 comments on commit d6926f7

Please sign in to comment.