mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-10-25 15:58:24 -04:00
get the other dbPass use and quote it. Slight visual code style cleanup.
This commit is contained in:
1 parent
3a804a0d0c
commit
fbc0086fcc
1 file changed
+4
-10
+4
-10
@@ -412,15 +412,12 @@ if ( $version )
|
||||
{
|
||||
my ( $host, $port ) = ( $Config{ZM_DB_HOST} =~ /^([^:]+)(?::(.+))?$/ );
|
||||
my $command = "mysqldump";
|
||||
$command .= " -h".$host if defined($host);
|
||||
$command .= " -h".$host if defined($host);
|
||||
$command .= " -P".$port if defined($port);
|
||||
if ( $dbUser )
|
||||
{
|
||||
$command .= " -u".$dbUser;
|
||||
if ( $dbPass )
|
||||
{
|
||||
$command .= " -p".$dbPass;
|
||||
}
|
||||
$command .= ' -u'.$dbUser;
|
||||
$command .= ' -p"'.$dbPass.'"' if $dbPass;
|
||||
}
|
||||
my $backup = "@ZM_TMPDIR@/".$Config{ZM_DB_NAME}."-".$version.".dump";
|
||||
$command .= " --add-drop-table --databases ".$Config{ZM_DB_NAME}." > ".$backup;
|
||||
@@ -458,10 +455,7 @@ if ( $version )
|
||||
if ( $dbUser )
|
||||
{
|
||||
$command .= " -u".$dbUser;
|
||||
if ( $dbPass )
|
||||
{
|
||||
$command .= ' -p"'.$dbPass.'"';
|
||||
}
|
||||
$command .= ' -p"'.$dbPass.'"' if $dbPass;
|
||||
}
|
||||
$command .= " ".$Config{ZM_DB_NAME}." < ";
|
||||
if ( $updateDir )
|
||||
|
||||
Reference in new issue
Block a user