index 8a296489f5c55e29de9b03e9c06b6fdea9f459ae..822940453d043f7fe692f7fd8747538fdfab2050 100644 (file)
var $last_backup_name = "";
function setup_step_8()
var $last_backup_name = "";
function setup_step_8()
+ {
+ $this->update_strings();
+ }
+
+
+ function update_strings()
{
$this->s_title = _("Configuration file");
$this->s_info = _("In this step the configuration file will be created.");
{
$this->s_title = _("Configuration file");
$this->s_info = _("In this step the configuration file will be created.");
function get_conf_data()
{
function get_conf_data()
{
- return("currently not implemented.");
- }
+ $smarty = get_smarty();
+ $smarty->assign("cv",$this->parent->captured_values);
+ $str = $smarty->fetch(CONFIG_TEMPLATE_DIR.$this->gosa_conf_name);
+ return($str);
+ }
function execute()
function execute()
/* Downlaod config */
if(isset($_POST['getconf'])){
/* Downlaod config */
if(isset($_POST['getconf'])){
+
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-cache");
header("Pragma: no-cache");
header("Cache-Control: post-check=0, pre-check=0");
header("Content-type: text/plain");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-cache");
header("Pragma: no-cache");
header("Cache-Control: post-check=0, pre-check=0");
header("Content-type: text/plain");
- header('Content-Disposition: attachment; filename="gosa.conf"');
+
+ if (preg_match('/MSIE 5.5/', $_SERVER['HTTP_USER_AGENT']) ||
+ preg_match('/MSIE 6.0/', $_SERVER['HTTP_USER_AGENT'])){
+ header('Content-Disposition: filename="gosa.conf"');
+ } else {
+ header('Content-Disposition: attachment; filename="gosa.conf"');
+ }
+
+ $str = $this->get_conf_data();
+ $str = preg_replace("/\n[ ]*\n/","",$str);
+
echo $this->get_conf_data();
exit();
}
echo $this->get_conf_data();
exit();
}
}else{
$data = $this->get_conf_data();
}else{
$data = $this->get_conf_data();
- if(!fwrite($fp,strlen($data))){
+ if(!fwrite($fp,$data)){
$err_msg = sprintf(_("Can not write file '%s'. Please check folder permission and try again. Or use the manual method if this can not be fixed anyway."),CONFIG_DIR.$this->gosa_conf_name);
$abort =TRUE;
}else{
$err_msg = sprintf(_("Can not write file '%s'. Please check folder permission and try again. Or use the manual method if this can not be fixed anyway."),CONFIG_DIR.$this->gosa_conf_name);
$abort =TRUE;
}else{