Code

fixed replacement strings
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 11 Aug 2005 06:00:14 +0000 (06:00 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 11 Aug 2005 06:00:14 +0000 (06:00 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1103 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/gofon/phoneaccount/class_phoneAccount.inc

index 13d1b3926d7873cfb6f58ef8fcbe9d5aacb832b3..c55d63bd025300ffffc69f1ac59f8a3ce105fe20 100644 (file)
@@ -524,7 +524,7 @@ class phoneAccount extends plugin
       $macrotab="";
     }else{
 
-      $macrotab ="<table summary=\""._("Parameter")."\">";
+      $macrotab ="<table summary=\""._("Parameter")."\" width='100%'>";
       /* for every single parameter-> display textfile,combo, or true false switch*/
 
 
@@ -540,12 +540,12 @@ class phoneAccount extends plugin
 
           $string = $paras['default'];
 
-          $string=str_replace("%uid",$this->uid,$string);
-          $string=str_replace("%cn",$this->cn,$string);
+          $string=preg_replace("/%uid/i",$this->uid,$string);
+          $string=preg_replace("/%cn/i",$this->cn,$string);
 
           for($i = 0 ; $i < 10; $i++){
             if(isset($tmp[$i])){
-              $string = preg_replace("/%telephoneNumber_".($i+1)."/",$tmp[$i],$string);
+              $string = preg_replace("/%telephoneNumber_".($i+1)."/i",$tmp[$i],$string);
             }
           }
 
@@ -590,8 +590,8 @@ class phoneAccount extends plugin
           break;
 
           case "string":
-            $str="<input name='".$var."' value='".$choosen."' ".chkacl($this->acl, "goFonMacro").">";
-          $macrotab.= "<td>$name</td><td>$str";
+            $str="<input name='".$var."' value='".$choosen."' ".chkacl($this->acl, "goFonMacro")." style='width:340px;'>";
+          $macrotab.= "<td>$name</td><td style='width:350px'>$str";
           break;
 
         }