From e2aca66c357190841c1617252ec0ac74a5609bc8 Mon Sep 17 00:00:00 2001 From: Carsten Schmitz Date: Mon, 23 Jul 2012 15:28:31 +0200 Subject: [PATCH] Fixed issue #6348: Bar chart not translated in statistics when changing statistics language --- application/helpers/admin/statistics_helper.php | 16 ++++++++-------- .../views/admin/export/statistics_view.php | 2 +- tmp/.gitignore | 1 + 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/application/helpers/admin/statistics_helper.php b/application/helpers/admin/statistics_helper.php index a74242d9e77..659f0ff34d7 100644 --- a/application/helpers/admin/statistics_helper.php +++ b/application/helpers/admin/statistics_helper.php @@ -114,9 +114,9 @@ function createChart($iQuestionID, $iSurveyID, $type, $lbl, $gdata, $grawdata, $ $counter++; } - if ($cache->IsInCache("graph".$statlang->langcode.$iSurveyID,$DataSet->GetData())) + if ($cache->IsInCache("graph".$language.$iSurveyID,$DataSet->GetData())) { - $cachefilename=basename($cache->GetFileFromCache("graph".$statlang->langcode.$iSurveyID,$DataSet->GetData())); + $cachefilename=basename($cache->GetFileFromCache("graph".$language.$iSurveyID,$DataSet->GetData())); } else { @@ -146,8 +146,8 @@ function createChart($iQuestionID, $iSurveyID, $type, $lbl, $gdata, $grawdata, $ $graph->setFontProperties($rootdir.DIRECTORY_SEPARATOR.'fonts'.DIRECTORY_SEPARATOR.$chartfontfile, $chartfontsize); $graph->drawLegend(510,30,$DataSet->GetDataDescription(),255,255,255); - $cache->WriteToCache("graph".$statlang->langcode.$iSurveyID,$DataSet->GetData(),$graph); - $cachefilename=basename($cache->GetFileFromCache("graph".$statlang->langcode.$iSurveyID,$DataSet->GetData())); + $cache->WriteToCache("graph".$language.$iSurveyID,$DataSet->GetData(),$graph); + $cachefilename=basename($cache->GetFileFromCache("graph".$language.$iSurveyID,$DataSet->GetData())); unset($graph); } } //end if (bar chart) @@ -203,9 +203,9 @@ function createChart($iQuestionID, $iSurveyID, $type, $lbl, $gdata, $grawdata, $ $DataSet->AddAllSeries(); $DataSet->SetAbsciseLabelSerie("Serie2"); - if ($cache->IsInCache("graph".$statlang->langcode.$iSurveyID, $DataSet->GetData())) + if ($cache->IsInCache("graph".$language.$iSurveyID, $DataSet->GetData())) { - $cachefilename=basename($cache->GetFileFromCache("graph".$statlang->langcode.$iSurveyID,$DataSet->GetData())); + $cachefilename=basename($cache->GetFileFromCache("graph".$language.$iSurveyID,$DataSet->GetData())); } else { @@ -221,8 +221,8 @@ function createChart($iQuestionID, $iSurveyID, $type, $lbl, $gdata, $grawdata, $ $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); - $cache->WriteToCache("graph".$statlang->langcode.$iSurveyID,$DataSet->GetData(),$graph); - $cachefilename=basename($cache->GetFileFromCache("graph".$statlang->langcode.$iSurveyID,$DataSet->GetData())); + $cache->WriteToCache("graph".$language.$iSurveyID,$DataSet->GetData(),$graph); + $cachefilename=basename($cache->GetFileFromCache("graph".$language.$iSurveyID,$DataSet->GetData())); unset($graph); } } //end else -> pie charts diff --git a/application/views/admin/export/statistics_view.php b/application/views/admin/export/statistics_view.php index 752f6b6b527..97861b2f8c1 100644 --- a/application/views/admin/export/statistics_view.php +++ b/application/views/admin/export/statistics_view.php @@ -9,7 +9,7 @@
diff --git a/tmp/.gitignore b/tmp/.gitignore index c09eefefa1f..9d875d2e4ef 100644 --- a/tmp/.gitignore +++ b/tmp/.gitignore @@ -1,3 +1,4 @@ *.html /*.lss +/*.png