Fix for apache 2.4

This commit is contained in:
Laurent Destailleur 2016-07-08 00:16:22 +02:00
parent f911450017
commit 964001bda2

View File

@ -611,7 +611,9 @@ begin
destFile := pathWithSlashes+'/alias/dolibarr.conf'; destFile := pathWithSlashes+'/alias/dolibarr.conf';
srcFile := pathWithSlashes+'/alias/dolibarr.conf.install'; srcFile := pathWithSlashes+'/alias/dolibarr.conf.install';
if not FileExists (destFile) and FileExists(srcFile) then if FileExists(srcFile) then
begin
if not FileExists (destFile)
begin begin
LoadStringFromFile (srcFile, srcContents); LoadStringFromFile (srcFile, srcContents);
@ -620,6 +622,18 @@ begin
SaveStringToFile(destFile, srcContents, False); SaveStringToFile(destFile, srcContents, False);
end end
else
begin
// We must replace to use format 2.4 of apache
DeleteFile(destFile);
LoadStringFromFile (srcFile, srcContents);
StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
SaveStringToFile(destFile, srcContents, False);
end
end
DeleteFile(srcFile); DeleteFile(srcFile);
@ -632,14 +646,25 @@ begin
destFile := pathWithSlashes+'/apps/phpmyadmin'+phpmyadminVersion+'/config.inc.php'; destFile := pathWithSlashes+'/apps/phpmyadmin'+phpmyadminVersion+'/config.inc.php';
srcFile := pathWithSlashes+'/apps/phpmyadmin'+phpmyadminVersion+'/config.inc.php.install'; srcFile := pathWithSlashes+'/apps/phpmyadmin'+phpmyadminVersion+'/config.inc.php.install';
if not FileExists (destFile) and FileExists (srcFile) then if FileExists(srcFile) then
begin
if not FileExists (destFile) then
begin begin
// sinon on prends le fichier par defaut
LoadStringFromFile (srcFile, srcContents); LoadStringFromFile (srcFile, srcContents);
StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True); StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True); StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
SaveStringToFile(destFile,srcContents, False); SaveStringToFile(destFile,srcContents, False);
end end
else
begin
// We must replace to use format 2.4 of apache
DeleteFile(destFile);
LoadStringFromFile (srcFile, srcContents);
StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
SaveStringToFile(destFile,srcContents, False);
end
end