index 5f8c1d0e1eb6602c15c09509581805cfdcd1d9d0..6fc523247ad3255c3fae25e6d6338d2429f19aa6 100644 (file)
/* Configuration file location */
define ("CONFIG_DIR", "/etc/gosa");
-define ("CONFIG_FILE", "gosa.conf-trunk");
+define ("CONFIG_FILE", "gosa.conf");
define ("CONFIG_TEMPLATE_DIR", "../contrib/");
-define ("HELP_BASEDIR", "/var/www/doc/");
/* Define get_list flags */
define("GL_NONE", 0);
"mimetypeou" => "ou=mime,");
/* Preset ou... */
- if (isset($config->current[$name])){
- $ou= $config->current[$name];
+ if (isset($config->current[strtoupper($name)])){
+ $ou= $config->current[strtoupper($name)];
} elseif (isset($map[$name])) {
$ou = $map[$name];
return($ou);
if ($ou != ""){
if (!preg_match('/^[^=]+=[^=]+/', $ou)){
- return @LDAP::convert("ou=$ou,");
+ $ou = @LDAP::convert("ou=$ou");
} else {
- return @LDAP::convert("$ou,");
+ $ou = @LDAP::convert("$ou");
}
+
+ if(preg_match("/".normalizePreg($config->current['BASE'])."$/",$ou)){
+ return($ou);
+ }else{
+ return("$ou,");
+ }
+
} else {
return "";
}
} else {
$smarty->assign ("action", _("Edit anyway"));
}
- $smarty->assign ("message", sprintf(_("You're going to edit the LDAP entry/entries '%s'"), "<b>".$msg."</b>", ""));
+ $smarty->assign ("message", sprintf(_("You're going to edit the LDAP entry/entries %s"), "<b>".$msg."</b>", ""));
return ($smarty->fetch (get_template_path('islocked.tpl')));
}
@@ -2664,10 +2670,17 @@ function send_binary_content($data,$name,$type = "application/octet-stream")
HTML output, without breaking quotes.
@param The String we want to encode.
@return The encoded String
-*/
+ */
function xmlentities($str)
-{
- return (htmlentities($str,ENT_QUOTES));
+{
+ if(is_string($str)){
+ return(htmlentities($str,ENT_QUOTES));
+ }elseif(is_array($str)){
+ foreach($str as $name => $value){
+ $str[$name] = xmlentities($value);
+ }
+ }
+ return($str);
}