Skip to content
Snippets Groups Projects
Commit 964001bd authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix for apache 2.4

parent f9114500
No related branches found
No related tags found
No related merge requests found
......@@ -611,14 +611,28 @@ begin
destFile := pathWithSlashes+'/alias/dolibarr.conf';
srcFile := pathWithSlashes+'/alias/dolibarr.conf.install';
if not FileExists (destFile) and FileExists(srcFile) then
if FileExists(srcFile) then
begin
LoadStringFromFile (srcFile, srcContents);
StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
SaveStringToFile(destFile, srcContents, False);
if not FileExists (destFile)
begin
LoadStringFromFile (srcFile, srcContents);
StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
SaveStringToFile(destFile, srcContents, False);
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);
......@@ -632,13 +646,24 @@ begin
destFile := pathWithSlashes+'/apps/phpmyadmin'+phpmyadminVersion+'/config.inc.php';
srcFile := pathWithSlashes+'/apps/phpmyadmin'+phpmyadminVersion+'/config.inc.php.install';
if not FileExists (destFile) and FileExists (srcFile) then
if FileExists(srcFile) then
begin
// sinon on prends le fichier par defaut
LoadStringFromFile (srcFile, srcContents);
StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
SaveStringToFile(destFile,srcContents, False);
if not FileExists (destFile) then
begin
LoadStringFromFile (srcFile, srcContents);
StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
SaveStringToFile(destFile,srcContents, False);
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment