Code

Prepared statistics to print password changes over time
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 26 Aug 2010 09:40:26 +0000 (09:40 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 26 Aug 2010 09:40:26 +0000 (09:40 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19458 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/generic/statistics/class_statistics.inc

index 85658dc7bbacfa28955e77fb0837866f52666775..e4e3b076a72dd319049c567d62b08568536b4a29 100644 (file)
@@ -343,6 +343,22 @@ class statistics extends plugin
             }
         }
 
+        // Get info about used password hashes 
+        $gData['usedPasswordHashes'] = array();
+        foreach($res['usedPasswordHashes'] as $category => $data){
+
+            // Add missing date stamps
+            foreach($gData['dates'] as $timestamp => $value){
+                $gData['usedPasswordHashes'][$category][$timestamp]=0;
+            }
+
+            foreach($data as $dateStr => $count){
+                $date = strtotime($dateStr);
+                $gData['usedPasswordHashes'][$category][$date]=$count;
+            }
+            ksort($gData['usedPasswordHashes'][$category]);
+        }
+
         // Get action usage, to be able to render a pie chart about most done actions.
         $gData['actionsPerPluginAction'] = $res['actionsPerPluginAction'];
         return($gData);