index dd922df9649b76bde51fab9c5bec92e232ce33ec..c01a2ec0e519fe9e696298030f2692cccbe49b79 100644 (file)
var $filename = "";
var $last_modified = 0;
var $filename = "";
var $last_modified = 0;
+ public $configRegistry = NULL;
+
/*! \brief Class constructor of the config class
*
* \param string 'filename' path to the configuration file
/*! \brief Class constructor of the config class
*
* \param string 'filename' path to the configuration file
if ($filename != ""){
$this->parse($filename);
}
if ($filename != ""){
$this->parse($filename);
}
+
+ // Load configuration registry
+ $this->configRegistry = new configRegistry($this);
}
}
fclose($fh);
if(!xml_parse($this->parser, chop($xmldata))){
$msg = sprintf(_("XML error in gosa.conf: %s at line %d"),
fclose($fh);
if(!xml_parse($this->parser, chop($xmldata))){
$msg = sprintf(_("XML error in gosa.conf: %s at line %d"),
- xml_error_string(xml_get_error_code($this->parser)),
- xml_get_current_line_number($this->parser));
+ bold(xml_error_string(xml_get_error_code($this->parser))),
+ bold(xml_get_current_line_number($this->parser)));
msg_dialog::display(_("Configuration error"), $msg, FATAL_ERROR_DIALOG);
exit;
}
msg_dialog::display(_("Configuration error"), $msg, FATAL_ERROR_DIALOG);
exit;
}
}
break;
}
break;
+ case 'PATHMENU':
+ $this->data['PATHMENU']= array(); ;
+ break;
+
/* Inser plugins */
case 'PLUGIN':
if ($this->tags[$this->level-3] == 'MENU' &&
/* Inser plugins */
case 'PLUGIN':
if ($this->tags[$this->level-3] == 'MENU' &&
$this->data['MENU'][$this->section][$this->gpc++]= $attrs;
}
$this->data['MENU'][$this->section][$this->gpc++]= $attrs;
}
+ if ($this->tags[$this->level-2] == 'PATHMENU'){
+ $this->data['PATHMENU'][$this->gpc++]= $attrs;
+ }
if ($this->tags[$this->level-2] == 'SERVICEMENU'){
$this->data['SERVICE'][$attrs['CLASS']]= $attrs;
}
if ($this->tags[$this->level-2] == 'SERVICEMENU'){
$this->data['SERVICE'][$attrs['CLASS']]= $attrs;
}
/* Check for connection */
if (is_null($this->ldap) || (is_int($this->ldap) && $this->ldap == 0)){
$smarty= get_smarty();
/* Check for connection */
if (is_null($this->ldap) || (is_int($this->ldap) && $this->ldap == 0)){
$smarty= get_smarty();
- msg_dialog::display(_("LDAP error"), _("Cannot bind to LDAP. Please contact the system administrator."), FATAL_ERROR_DIALOG);
+ msg_dialog::display(_("LDAP error"), _("Cannot bind to LDAP!"), FATAL_ERROR_DIALOG);
exit();
}
exit();
}
*
*
*/
*
*
*/
- function get_cfg_value($name, $default= "") {
+ function get_cfg_value($name, $default= "")
+ {
+
+ if($this->configRegistry->propertyExists('core',$name)){
+ return($this->configRegistry->getPropertyValue('core',$name));
+ }
+
+ syslog(1, $name);
+
$name= strtoupper($name);
/* Check if we have a current value for $name */
$name= strtoupper($name);
/* Check if we have a current value for $name */
/* Check contributed config version and current config version.
*/
if(($this->config_version == "NOT SET") || ($this->config_version != $current && !empty($this->config_version))){
/* Check contributed config version and current config version.
*/
if(($this->config_version == "NOT SET") || ($this->config_version != $current && !empty($this->config_version))){
- msg_dialog::display(_("Configuration"),_("The configuration file you are using seems to be outdated. Please move the GOsa configuration file away to run the GOsa setup again."));
+ msg_dialog::display(_("Configuration"),_("The configuration file you are using is outdated. Please move the GOsa configuration file away to run the GOsa setup again."));
}
}
}
}
if(!session::is_set("snapshotFailMessageSend")){
session::set("snapshotFailMessageSend",TRUE);
msg_dialog::display(_("Configuration error"),
if(!session::is_set("snapshotFailMessageSend")){
session::set("snapshotFailMessageSend",TRUE);
msg_dialog::display(_("Configuration error"),
- sprintf(_("The snapshot functionality is enabled, but the required variable '%s' is not set."),
- "snapshotBase"), ERROR_DIALOG);
+ sprintf(_("The snapshot functionality is enabled, but the required variable %s is not set."),
+ bold("snapshotBase")), ERROR_DIALOG);
}
return(FALSE);
}
}
return(FALSE);
}
if(!session::is_set("snapshotFailMessageSend")){
session::set("snapshotFailMessageSend",TRUE);
msg_dialog::display(_("Configuration error"),
if(!session::is_set("snapshotFailMessageSend")){
session::set("snapshotFailMessageSend",TRUE);
msg_dialog::display(_("Configuration error"),
- sprintf(_("The snapshot functionality is enabled, but the required compression module is missing. Please install '%s'."),"php5-zip / php5-gzip"), ERROR_DIALOG);
+ sprintf(_("The snapshot functionality is enabled, but the required compression module is missing. Please install %s."), bold("php5-zip / php5-gzip")), ERROR_DIALOG);
}
return(FALSE);
}
}
return(FALSE);
}
if(!session::is_set("snapshotFailMessageSend")){
session::set("snapshotFailMessageSend",TRUE);
msg_dialog::display(_("Configuration error"),
if(!session::is_set("snapshotFailMessageSend")){
session::set("snapshotFailMessageSend",TRUE);
msg_dialog::display(_("Configuration error"),
- sprintf(_("The snapshot functionality is enabled, but the required variable '%s' is not set."),
- $missing), ERROR_DIALOG);
+ sprintf(_("The snapshot functionality is enabled, but the required variable %s is not set."),
+ bold($missing)), ERROR_DIALOG);
}
return(FALSE);
}
}
return(FALSE);
}