From cfa6cfb4e26f1dd4a3e2ece4407e046170c38385 Mon Sep 17 00:00:00 2001 From: Carsten Schmitz Date: Mon, 23 Jul 2012 15:22:50 +0200 Subject: [PATCH] Fixed issue #6348: Bar chart not translated in statistics when changing statistics language --- admin/statistics_function.php | 16 ++++++++-------- tmp/.gitignore | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/admin/statistics_function.php b/admin/statistics_function.php index 5eb69d4787f..faa97d9676a 100644 --- a/admin/statistics_function.php +++ b/admin/statistics_function.php @@ -3165,9 +3165,9 @@ function generate_statistics($surveyid, $allfields, $q2show='all', $usegraph=0, $counter++; } - if ($MyCache->IsInCache("graph".$surveyid,$DataSet->GetData())) + if ($MyCache->IsInCache("graph".$statlang->langcode.$surveyid,$DataSet->GetData())) { - $cachefilename=basename($MyCache->GetFileFromCache("graph".$surveyid,$DataSet->GetData())); + $cachefilename=basename($MyCache->GetFileFromCache("graph".$statlang->langcode.$surveyid,$DataSet->GetData())); } else { @@ -3197,8 +3197,8 @@ function generate_statistics($surveyid, $allfields, $q2show='all', $usegraph=0, $graph->setFontProperties($rootdir."/fonts/".$chartfontfile, $chartfontsize); $graph->drawLegend(510,30,$DataSet->GetDataDescription(),255,255,255); - $MyCache->WriteToCache("graph".$surveyid,$DataSet->GetData(),$graph); - $cachefilename=basename($MyCache->GetFileFromCache("graph".$surveyid,$DataSet->GetData())); + $MyCache->WriteToCache("graph".$statlang->langcode.$surveyid,$DataSet->GetData(),$graph); + $cachefilename=basename($MyCache->GetFileFromCache("graph".$statlang->langcode.$surveyid,$DataSet->GetData())); unset($graph); } } //end if (bar chart) @@ -3260,9 +3260,9 @@ function generate_statistics($surveyid, $allfields, $q2show='all', $usegraph=0, $DataSet->AddAllSeries(); $DataSet->SetAbsciseLabelSerie("Serie2"); - if ($MyCache->IsInCache("graph".$surveyid,$DataSet->GetData())) + if ($MyCache->IsInCache("graph".$statlang->langcode.$surveyid,$DataSet->GetData())) { - $cachefilename=basename($MyCache->GetFileFromCache("graph".$surveyid,$DataSet->GetData())); + $cachefilename=basename($MyCache->GetFileFromCache("graph".$statlang->langcode.$surveyid,$DataSet->GetData())); } else { @@ -3278,8 +3278,8 @@ function generate_statistics($surveyid, $allfields, $q2show='all', $usegraph=0, $graph->drawPieGraph($DataSet->GetData(),$DataSet->GetDataDescription(),225,round($gheight/2),170,PIE_PERCENTAGE,TRUE,50,20,5); $graph->setFontProperties($rootdir."/fonts/".$chartfontfile,$chartfontsize); $graph->drawPieLegend(430,12,$DataSet->GetData(),$DataSet->GetDataDescription(),250,250,250); - $MyCache->WriteToCache("graph".$surveyid,$DataSet->GetData(),$graph); - $cachefilename=basename($MyCache->GetFileFromCache("graph".$surveyid,$DataSet->GetData())); + $MyCache->WriteToCache("graph".$statlang->langcode.$surveyid,$DataSet->GetData(),$graph); + $cachefilename=basename($MyCache->GetFileFromCache("graph".$statlang->langcode.$surveyid,$DataSet->GetData())); unset($graph); } //print_r($DataSet->GetData()); echo "

"; diff --git a/tmp/.gitignore b/tmp/.gitignore index 0c6f2f1e57e..37272d18157 100644 --- a/tmp/.gitignore +++ b/tmp/.gitignore @@ -1,2 +1,3 @@ /*.sql /*.zip +/*.png