Code

Backport from trunk
[gosa.git] / gosa-plugins / fai / admin / fai / class_faiProfile.inc
index 5f97b2574956bfb4cb0c3ec975c7ed46da181c55..2f7d34773450892951386dfc935343494794858d 100644 (file)
@@ -68,7 +68,7 @@ class faiProfile extends plugin
 
             /* Sort by categorie */
             foreach($categories as $cat){
-                if(in_array($cat,$attrs['objectClass'])){
+                if(in_array_strict($cat,$attrs['objectClass'])){
 
                     /* Append entry */
                     $this->FAIAllclasses[$attrs['cn'][0]][$cat]=$attrs;
@@ -212,11 +212,7 @@ class faiProfile extends plugin
          * If we post the escaped strings they will be escaped again
          */
         foreach($this->attributes as $attrs){
-            if(get_magic_quotes_gpc()){
-                $smarty->assign($attrs,stripslashes($this->$attrs));
-            }else{
-                $smarty->assign($attrs,($this->$attrs));
-            }
+           $smarty->assign($attrs,set_post($this->$attrs));
         }
 
 
@@ -366,11 +362,11 @@ class faiProfile extends plugin
                             "name"          => "faiProfileRDN",
                             "type"          => "rdn",
                             "default"       => "ou=profiles,",
-                            "description"   => "The 'faiProfileRDN' statement defines the location where new fai-profiles will be created. The default is 'ou=profiles,'.",
+                            "description"   => _("RDN for FAI profile storage."),
                             "check"         => "gosaProperty::isRdn",
                             "migrate"       => "migrate_faiProfileRDN",
                             "group"         => "plugin",
-                            "mandatory"     => FALSE)),
+                  "mandatory"     => TRUE)),
 
 
                     "plProvidedAcls" => array(
@@ -389,7 +385,7 @@ class faiProfile extends plugin
     {
         $vars = array("cn");
         $smarty = get_smarty();
-        $smarty->assign("cn", htmlentities($this->cn));
+        $smarty->assign("cn", set_post($this->cn));
         $str = $smarty->fetch(get_template_path("paste_generic.tpl",TRUE));
         $ret = array();
         $ret['string'] = $str;