fast fix for the bug regarding infolog config, caused by the drop of the intantiation of config in boinfolog

This commit is contained in:
Klaus Leithoff 2008-03-06 07:58:08 +00:00
parent a53b69af40
commit d10607a16e

View File

@ -1255,36 +1255,38 @@ class uiinfolog
); );
if($_POST['save'] || $_POST['apply']) if($_POST['save'] || $_POST['apply'])
{ {
$config =& CreateObject('phpgwapi.config','infolog');
$config->read_repository();
if (get_magic_quotes_gpc()) if (get_magic_quotes_gpc())
{ {
$_POST = self::array_stripslashes($_POST); $_POST = self::array_stripslashes($_POST);
} }
$this->bo->config->config_data['link_pathes'] = $this->bo->link_pathes = array(); $config->config_data['link_pathes'] = $this->bo->link_pathes = array();
$this->bo->config->config_data['send_file_ips'] = $this->bo->send_file_ips = array(); $config->config_data['send_file_ips'] = $this->bo->send_file_ips = array();
$valid = get_var('valid',Array('POST')); $valid = get_var('valid',Array('POST'));
$trans = get_var('trans',Array('POST')); $trans = get_var('trans',Array('POST'));
$ip = get_var('ip',Array('POST')); $ip = get_var('ip',Array('POST'));
foreach($valid as $key => $val) foreach($valid as $key => $val)
{ {
if($val) if($val)
{ {
$this->bo->config->config_data['link_pathes'][$val] = $this->bo->link_pathes[$val] = $trans[$key]; $config->config_data['link_pathes'][$val] = $this->bo->link_pathes[$val] = $trans[$key];
$this->bo->config->config_data['send_file_ips'][$val] = $this->bo->send_file_ips[$val] = $ip[$key]; $config->config_data['send_file_ips'][$val] = $this->bo->send_file_ips[$val] = $ip[$key];
} }
} }
$this->bo->responsible_edit = array('info_status','info_percent','info_datecompleted'); $this->bo->responsible_edit = array('info_status','info_percent','info_datecompleted');
if ($_POST['responsible_edit']) if ($_POST['responsible_edit'])
{ {
$extra = array_intersect($_POST['responsible_edit'],array_keys($fields)); $extra = array_intersect($_POST['responsible_edit'],array_keys($fields));
$this->bo->config->config_data['responsible_edit'] = $this->bo->responsible_edit = array_merge($this->bo->responsible_edit,$extra); $config->config_data['responsible_edit'] = $this->bo->responsible_edit = array_merge($this->bo->responsible_edit,$extra);
} }
$this->bo->config->config_data['implicit_rights'] = $this->bo->implicit_rights = $_POST['implicit_rights'] == 'edit' ? 'edit' : 'read'; $config->config_data['implicit_rights'] = $this->bo->implicit_rights = $_POST['implicit_rights'] == 'edit' ? 'edit' : 'read';
$this->bo->config->config_data['history'] = $this->bo->history = $_POST['history'];
$this->bo->config->save_repository(True); $config->config_data['history'] = $this->bo->history = $_POST['history'];
$config->save_repository(True);
} }
if($_POST['cancel'] || $_POST['save']) if($_POST['cancel'] || $_POST['save'])
{ {