Code

Backport from trunk
[gosa.git] / gosa-plugins / dhcp / admin / systems / services / dhcp / class_dhcpNetwork.inc
index 9c1fcf8c70fd7cf65c8122d225b9d804befb897d..259ae39272c455f86efde45ffd13ba6d1ed378d6 100644 (file)
@@ -31,7 +31,12 @@ class dhcpNetwork extends plugin
     function dhcpNetwork()
     {
         /* This is always an account */
+        $this->initTime = microtime(TRUE);
         $this->is_account= TRUE;
+
+        // Create statistic table entry
+        stats::log('plugin', $class = get_class($this), $category = array($this->acl_category),  $action = 'open',
+                $amount = 1, $duration = (microtime(TRUE) - $this->initTime));
     }
 
     function execute()
@@ -163,7 +168,7 @@ class dhcpNetwork extends plugin
                 } else {
 
                     /* Only quote filename values */
-                    if(in_array($key,array("filename"))){
+                    if(in_array_strict($key,array("filename"))){
                         $this->statements->set($key,'"'.trim(get_post($val),"\"").'"');
                     }else{
                         $this->statements->set($key,get_post($val));
@@ -192,7 +197,7 @@ class dhcpNetwork extends plugin
         $message= array();
 
         /* Check netmask and broadcast */
-        foreach(array("subnet-mask" => _("Netmask"), "broadcast-address" => _("Broadcast")) as $key => $typ){
+        foreach(array("subnet-mask" => _("Net mask"), "broadcast-address" => _("Broadcast address")) as $key => $typ){
             if (!$this->options->exists("$key")){
                 continue;
             }