Fix: recovers encode and collate of database
This commit is contained in:
parent
ea5378e29c
commit
4969d9feef
@ -184,6 +184,10 @@ local $cfile = $cfiledir."conf.php";
|
|||||||
local $oldcfile = &transname();
|
local $oldcfile = &transname();
|
||||||
local $olddocdir = &transname();
|
local $olddocdir = &transname();
|
||||||
local $url;
|
local $url;
|
||||||
|
$tmpl = &get_template($d->{'template'});
|
||||||
|
$charset = $tmpl->{'mysql_charset'};
|
||||||
|
$collate = $tmpl->{'mysql_collate'};
|
||||||
|
$encoding = $tmpl->{'postgres_encoding'};
|
||||||
$path = &script_path_url($d, $opts);
|
$path = &script_path_url($d, $opts);
|
||||||
if ($path =~ /^https:/) {
|
if ($path =~ /^https:/) {
|
||||||
$url = "https://$d->{'dom'}";
|
$url = "https://$d->{'dom'}";
|
||||||
@ -241,8 +245,7 @@ if ($upgrade) {
|
|||||||
# Remove the installation directory.
|
# Remove the installation directory.
|
||||||
local $dinstall = "$opts->{'dir'}/install";
|
local $dinstall = "$opts->{'dir'}/install";
|
||||||
$dinstall =~ s/\/$//;
|
$dinstall =~ s/\/$//;
|
||||||
$out = &run_as_domain_user($d, "rm -rf ".quotemeta($dinstall )."/* ");
|
$out = &run_as_domain_user($d, "rm -Rf ".quotemeta($dinstall ));
|
||||||
$out = &run_as_domain_user($d, "rmdir ".quotemeta($dinstall ));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -257,6 +260,8 @@ else {
|
|||||||
[ "db_pass", $dbpass ],
|
[ "db_pass", $dbpass ],
|
||||||
[ "action", "set" ],
|
[ "action", "set" ],
|
||||||
[ "main_force_https", $opts->{'forcehttps'} ],
|
[ "main_force_https", $opts->{'forcehttps'} ],
|
||||||
|
[ "dolibarr_main_db_character_set", $charset ],
|
||||||
|
[ "dolibarr_main_db_collation", $collate ],
|
||||||
);
|
);
|
||||||
local $err = &call_dolibarr_wizard_page(\@params, "etape1", $d, $opts);
|
local $err = &call_dolibarr_wizard_page(\@params, "etape1", $d, $opts);
|
||||||
return (-1, "Dolibarr wizard failed : $err") if ($err);
|
return (-1, "Dolibarr wizard failed : $err") if ($err);
|
||||||
@ -278,8 +283,7 @@ else {
|
|||||||
# Remove the installation directory and protect config file.
|
# Remove the installation directory and protect config file.
|
||||||
local $dinstall = "$opts->{'dir'}/install";
|
local $dinstall = "$opts->{'dir'}/install";
|
||||||
$dinstall =~ s/\/$//;
|
$dinstall =~ s/\/$//;
|
||||||
$out = &run_as_domain_user($d, "rm -rf ".quotemeta($dinstall )."/* ");
|
$out = &run_as_domain_user($d, "rm -Rf ".quotemeta($dinstall ));
|
||||||
$out = &run_as_domain_user($d, "rmdir ".quotemeta($dinstall ));
|
|
||||||
&set_ownership_permissions(undef, undef, 0644, $cfile);
|
&set_ownership_permissions(undef, undef, 0644, $cfile);
|
||||||
&set_ownership_permissions(undef, undef, 0755, $cfiledir);
|
&set_ownership_permissions(undef, undef, 0755, $cfiledir);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user