Skip to content

Commit

Permalink
Fixed issue #6348: Bar chart not translated in statistics when changi…
Browse files Browse the repository at this point in the history
…ng statistics language
  • Loading branch information
c-schmitz committed Jul 23, 2012
1 parent 3cc4c73 commit cfa6cfb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
16 changes: 8 additions & 8 deletions admin/statistics_function.php
Expand Up @@ -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
{
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
{
Expand All @@ -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 "<br/><br/>";
Expand Down
1 change: 1 addition & 0 deletions tmp/.gitignore
@@ -1,2 +1,3 @@
/*.sql
/*.zip
/*.png

0 comments on commit cfa6cfb

Please sign in to comment.