diff --git a/libraries/chart/pChart/pChart.class b/libraries/chart/pChart/pChart.class index cb60d5441..eb2bc4693 100644 --- a/libraries/chart/pChart/pChart.class +++ b/libraries/chart/pChart/pChart.class @@ -88,7 +88,8 @@ drawPieGraph($Data,$DataDescription,$XPos,$YPos,$Radius=100,$DrawLabels=PIE_NOLABEL,$EnhanceColors=TRUE,$Skew=60,$SpliceHeight=20,$SpliceDistance=0,$Decimals=0) Other methods : setImageMap($Mode=TRUE,$GraphID="MyGraph") - getImageMap($MapName,$Flush=TRUE) + getImageMap() + getSavedImageMap($MapName,$Flush=TRUE) Render($FileName) Stroke() */ @@ -3491,8 +3492,14 @@ } + /* Get the current image map */ + function getImageMap() + { + return json_encode($this->ImageMap); + } + /* Load and cleanup the image map from disk */ - function getImageMap($MapName,$Flush=TRUE) + function getSavedImageMap($MapName,$Flush=TRUE) { /* Strip HTML query strings */ $Values = $this->tmpFolder.$MapName; @@ -3537,8 +3544,7 @@ } else { - foreach($this->ImageMap as $Key => $Value) - fwrite($Handle, htmlentities($Value)."\r"); + fwrite($Handle, $this->getImageMap()); } fclose ($Handle); } diff --git a/libraries/chart/pma_pchart_chart.php b/libraries/chart/pma_pchart_chart.php index 083174b21..e5c8bf649 100644 --- a/libraries/chart/pma_pchart_chart.php +++ b/libraries/chart/pma_pchart_chart.php @@ -192,7 +192,7 @@ abstract class PMA_pChart_Chart extends PMA_Chart $returnData .= ''; $returnData .= ' '; @@ -241,7 +241,7 @@ abstract class PMA_pChart_Chart extends PMA_Chart protected function getImageMap() { - return $this->chart->ImageMap; + return $this->chart->getImageMap(); } }