Code

Backport from trunk
[gosa.git] / gosa-plugins / samba / personal / samba / class_sambaMungedDial.inc
index 9f0c0b42de8f3962979e70ee532864e060e88fcb..f4616d54b3b2fc11e67ba8b5add75ee151d97dc8 100644 (file)
@@ -160,7 +160,7 @@ class sambaMungedDial
        $result_tmp= "";
        foreach ($params as $paramName => $paramValue) {
                /* String parameter? */
-               if (in_array($paramName, $this->stringParams)){
+               if (in_array_strict($paramName, $this->stringParams)){
                        $isString= TRUE;
                        $paramValue= sambaMungedDial::strhex($paramValue.chr(0).chr(0));
                } else {
@@ -168,7 +168,7 @@ class sambaMungedDial
                }
   
                /* Time parameter? */
-               if (in_array($paramName, $this->timeParams)){
+               if (in_array_strict($paramName, $this->timeParams)){
                        $paramValue= sambaMungedDial::genTime($paramValue);
                }
   
@@ -260,11 +260,11 @@ class sambaMungedDial
                $ctxParm= substr($ctxField, 0, $ctxParmLength);
                                
                /* If string parameter, convert */
-               if (in_array($ctxParmName, $this->stringParams)){
+               if (in_array_strict($ctxParmName, $this->stringParams)){
                                $ctxParm= sambaMungedDial::hexstr($ctxParm);
                }
                /* If time parameter, convert */
-               if (in_array($ctxParmName, $this->timeParams)){
+               if (in_array_strict($ctxParmName, $this->timeParams)){
                        $ctxParm= sambaMungedDial::readTime($ctxParm);
                }
   
@@ -444,21 +444,21 @@ class sambaMungedDial
     if($this->old_behavior==true) {
       $result= substr($this->ctx['CtxCfgFlags1'], 1, 1);
     } else {
-       $result= substr($this->ctx['CtxShadow'], 1, 1);
+      $result= substr($this->ctx['CtxShadow'], 1, 1);
     }
-       return $result;
+    return $result;
   }
 
   /* sets shadow value */
   function setShadow ($checked, $value)
   {
-       if ($checked) {
+    if ($checked) {
       if($this->old_behavior==true) {
         // We need to reset the old setting
                $this->ctx['CtxCfgFlags1'][1]= sprintf('%1X', $value);
       }
-               $this->ctx['CtxShadow'][1]= sprintf('%1x', $value);
-       }
+      $this->ctx['CtxShadow'][1]= sprintf('%1x', $value);
+    }
   }
 
   /* gets connect-client-drive-at-logon value: enabled/disabled */