mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 08:23:12 +01:00
Make sure there is new data before deleting the old data
This commit is contained in:
parent
354c91ff90
commit
c73aeb5c62
@ -53,16 +53,19 @@
|
|||||||
{
|
{
|
||||||
$config_data = $this->config_data;
|
$config_data = $this->config_data;
|
||||||
|
|
||||||
$this->db->lock('phpgw_config');
|
if ($config_data)
|
||||||
$this->db->query("delete from phpgw_config where config_app='" . $this->appname . "'",__LINE__,__FILE__);
|
|
||||||
while (list($name,$value) = each($config_data))
|
|
||||||
{
|
{
|
||||||
$name = addslashes($name);
|
$this->db->lock('phpgw_config');
|
||||||
$value = addslashes($value);
|
$this->db->query("delete from phpgw_config where config_app='" . $this->appname . "'",__LINE__,__FILE__);
|
||||||
$this->db->query("insert into phpgw_config (config_app,config_name,config_value) "
|
while (list($name,$value) = each($config_data))
|
||||||
. "values ('" . $this->appname . "','" . $name . "','" . $value . "')",__LINE__,__FILE__);
|
{
|
||||||
|
$name = addslashes($name);
|
||||||
|
$value = addslashes($value);
|
||||||
|
$this->db->query("insert into phpgw_config (config_app,config_name,config_value) "
|
||||||
|
. "values ('" . $this->appname . "','" . $name . "','" . $value . "')",__LINE__,__FILE__);
|
||||||
|
}
|
||||||
|
$this->db->unlock();
|
||||||
}
|
}
|
||||||
$this->db->unlock();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function delete_repository()
|
function delete_repository()
|
||||||
|
Loading…
Reference in New Issue
Block a user