mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-24 23:58:54 +01:00
added a unlink before each rename for windows systems
This commit is contained in:
parent
acaae4b3e6
commit
3fcb565374
@ -563,7 +563,12 @@
|
||||
|
||||
if (is_writable(PHPGW_SERVER_ROOT."/$app/setup"))
|
||||
{
|
||||
rename($file,PHPGW_SERVER_ROOT."/$app/setup/tables_current.old.inc.php");
|
||||
$old_file = PHPGW_SERVER_ROOT . "/$app/setup/tables_current.old.inc.php";
|
||||
if (file_exists($old_file))
|
||||
{
|
||||
unlink($old_file);
|
||||
}
|
||||
rename($file,$old_file);
|
||||
}
|
||||
while ($header[strlen($header)-1] == "\t")
|
||||
{
|
||||
@ -629,7 +634,12 @@
|
||||
|
||||
if (is_writable(PHPGW_SERVER_ROOT."/$app/setup"))
|
||||
{
|
||||
rename($file,PHPGW_SERVER_ROOT."/$app/setup/setup.old.inc.php");
|
||||
$old_file = PHPGW_SERVER_ROOT . "/$app/setup/setup.old.inc.php";
|
||||
if (file_exists($old_file))
|
||||
{
|
||||
unlink($old_file);
|
||||
}
|
||||
rename($file,$old_file);
|
||||
}
|
||||
$fnew = eregi_replace("(.*\\$"."setup_info\\['$app'\\]\\['version'\\][ \\t]*=[ \\t]*')[^']*('.*)","\\1$new"."\\2",$fcontent);
|
||||
|
||||
@ -728,7 +738,12 @@
|
||||
$update = fread($f,filesize($file_update));
|
||||
$update = str_replace('?>','',$update);
|
||||
fclose($f);
|
||||
rename($file_update,PHPGW_SERVER_ROOT."/$app/setup/tables_update.old.inc.php");
|
||||
$old_file = PHPGW_SERVER_ROOT . "/$app/setup/tables_update.old.inc.php";
|
||||
if (file_exists($old_file))
|
||||
{
|
||||
unlink($old_file);
|
||||
}
|
||||
rename($file_update,$old_file);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -535,6 +535,10 @@
|
||||
$file .= '.xet';
|
||||
if (file_exists($file))
|
||||
{
|
||||
if (file_exists($old_file))
|
||||
{
|
||||
unlink($old_file);
|
||||
}
|
||||
rename($file,$old_file);
|
||||
}
|
||||
|
||||
|
@ -609,7 +609,12 @@
|
||||
$file = "$dir/etemplates.inc.php";
|
||||
if (file_exists($file))
|
||||
{
|
||||
rename($file,"$dir/etemplates.old.inc.php");
|
||||
$old_file = "$dir/etemplates.old.inc.php";
|
||||
if (file_exists($old_file))
|
||||
{
|
||||
unlink($old_file);
|
||||
}
|
||||
rename($file,$old_file);
|
||||
}
|
||||
|
||||
if (!($f = fopen($file,'w')))
|
||||
@ -777,7 +782,12 @@
|
||||
$file = "$dir/phpgw_$lang.lang";
|
||||
if (file_exists($file))
|
||||
{
|
||||
rename($file,"$dir/phpgw_$lang.old.lang");
|
||||
$old_file = "$dir/phpgw_$lang.old.lang";
|
||||
if (file_exists($old_file))
|
||||
{
|
||||
unlink($old_file);
|
||||
}
|
||||
rename($file,$old_file);
|
||||
}
|
||||
$solangfile->write_file($app,$langarr,$lang);
|
||||
$solangfile->loaddb($app,$lang);
|
||||
|
Loading…
Reference in New Issue
Block a user