Code

Updated variable names
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 26 Aug 2010 10:36:24 +0000 (10:36 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 26 Aug 2010 10:36:24 +0000 (10:36 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19460 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/generic/statistics/chartClasses/class_actionSelectChart.inc
gosa-core/plugins/generic/statistics/chartClasses/class_categoryActionOverTime.inc
gosa-core/plugins/generic/statistics/chartClasses/class_passwordChangeChart.inc
gosa-core/plugins/generic/statistics/class_statistics.inc

index 2fecae2d431d2c639cb3603b5501e426e6d1e053..c70ad38305b1894ada4d076de8a75313401ff4ce 100644 (file)
@@ -21,11 +21,11 @@ class actionSelectChart extends statChart
         $dataSet = new pData;  
         $seriesCnt = 0;
 
-        if(!isset($gData['actionsAndCategoryPerInterval'][$this->current_action])){
-            $this->current_action = key($gData['actionsAndCategoryPerInterval']);
+        if(!isset($gData['actionTypeGraph'][$this->current_action])){
+            $this->current_action = key($gData['actionTypeGraph']);
         }
 
-        $dataBase = $gData['actionsAndCategoryPerInterval'][$this->current_action];
+        $dataBase = $gData['actionTypeGraph'][$this->current_action];
     
         foreach($dataBase as $category => $entriesPerDate){
             if(empty($category) || in_array($category, $this->skipSeries)) continue;
@@ -97,7 +97,7 @@ class actionSelectChart extends statChart
         $current = $this->current_action; 
         $str = "&nbsp;<b>"._("Action").":</b>&nbsp;".
             "<select name='actionSelectChart_action' size='1' onChange='document.mainform.submit();'>";
-        foreach(array_keys($this->graphData['actionsAndCategoryPerInterval']) as $name){
+        foreach(array_keys($this->graphData['actionTypeGraph']) as $name){
             $checked = ($name==$current)? 'selected' : '';
             $str .= "\n<option value='{$name}' {$checked}>"._($name)."</option>";
         }
index a22de0d550d5387a754421331e56d7a8fc1c680c..6d9e912ff5e05589331ef6377fa7a27ad19076d5 100644 (file)
@@ -20,7 +20,7 @@ class categoryActionsOverTime extends statChart
         $errorMax = (max($gData['errorsPerInterval']) < 100)? 100:max($gData['errorsPerInterval']);
         $dataSet = new pData;  
         $seriesCnt = 0;
-        foreach($gData['actionsPerInterval'] as $category => $entriesPerDate){
+        foreach($gData['actionsGraph'] as $category => $entriesPerDate){
             if(empty($category) || in_array($category, $this->skipSeries)) continue;
 
             // Add results to our data set.
@@ -37,7 +37,7 @@ class categoryActionsOverTime extends statChart
         // Keep a list of all selecteable data-series, to allow the user to disable
         //  or enable series on demand.
         $this->seriesList = array();
-        foreach($gData['actionsPerInterval'] as $key => $data){
+        foreach($gData['actionsGraph'] as $key => $data){
             $this->seriesList[$key] = $this->getCategoryTranslation($key); 
         }
         $this->seriesList['errorsPerInterval'] = _("Error");
@@ -105,7 +105,7 @@ class categoryActionsOverTime extends statChart
 
             // Remove all graph series and add the error-series, then draw the new graph.
             // (It is not relevant if it was really added before, so we simply remove all series!)
-            foreach($gData['actionsPerInterval'] as $category => $data){
+            foreach($gData['actionsGraph'] as $category => $data){
                 $dataSet->RemoveSerie($category);
             }
             $chart->setFixedScale(0,$errorMax);
index 70f8e0dd3d12459c8bf969638f4f5fbf69c2b203..78b56da6ac20ef2400f95955666295267afddfa2 100644 (file)
@@ -2,7 +2,7 @@
 
 class passwordChangeChart extends statChart
 {
-    protected $title = 'Password chnages';
+    protected $title = 'Password changes';
     protected $current_action = "";
 
     function __construct(&$config)
index 30c8e4bfd951f241d4b1ab5e4e26143d41b5943a..591345885fa544cf61af6f8097fbfa78c8d9db73 100644 (file)
@@ -267,20 +267,20 @@ class statistics extends plugin
 
         /* Prepare actions-per-interval array.
          */   
-        $gData['actionsPerInterval'] = array(); 
-        foreach($res['actionsPerInterval'] as $category => $data){
+        $gData['actionsGraph'] = array(); 
+        foreach($res['actionsGraph'] as $category => $data){
             if(empty($category)) continue;
             foreach($data as $dateStr => $count){
                 $date = strtotime($dateStr);
-                $gData['actionsPerInterval'][$category][$date]=$count;
+                $gData['actionsGraph'][$category][$date]=$count;
             }
-            ksort($gData['actionsPerInterval'][$category]);
+            ksort($gData['actionsGraph'][$category]);
         }
 
         /* Prepare actions-per-interval array.
          */   
-        $gData['actionsAndCategoryPerInterval'] = array(); 
-        foreach($res['actionsAndCategoryPerInterval'] as $action => $aData){
+        $gData['actionTypeGraph'] = array(); 
+        foreach($res['actionTypeGraph'] as $action => $aData){
             foreach($aData as $category => $data){
                 if(empty($category)) continue;
 
@@ -291,14 +291,14 @@ class statistics extends plugin
 
                 // Add missing date stamps
                 foreach($gData['dates'] as $timestamp => $value){
-                    $gData['actionsAndCategoryPerInterval'][$action][$category][$timestamp]=0;
+                    $gData['actionTypeGraph'][$action][$category][$timestamp]=0;
                 }
 
                 foreach($data as $dateStr => $count){
                     $date = strtotime($dateStr);
-                    $gData['actionsAndCategoryPerInterval'][$action][$category][$date]=$count;
+                    $gData['actionTypeGraph'][$action][$category][$date]=$count;
                 }
-                ksort($gData['actionsAndCategoryPerInterval'][$action][$category]);
+                ksort($gData['actionTypeGraph'][$action][$category]);
             }
         }