Skip to content

Commit

Permalink
Fixed: Couldn't restore backup archive - Can't locate object method "…
Browse files Browse the repository at this point in the history
…selectall_array" via package "DBI::db" (restore backup feature)

Fixed: Possible double POST request submission in restore backup interface
Fixed: Unexpected warning (FALSE warning) when running imscp-backup-all backup script in verbose mode
  • Loading branch information
nuxwin committed Apr 10, 2018
1 parent 7abdf60 commit 7e257d1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions engine/PerlLib/Modules/Domain.pm
Expand Up @@ -168,11 +168,11 @@ sub restore
# Restore know databases only
local $self->{'_dbh'}->{'RaiseError'} = 1;

my @rows = $self->{'_dbh'}->selectall_array(
my $rows = $self->{'_dbh'}->selectall_arrayref(
'SELECT sqld_name FROM sql_database WHERE domain_id = ?', { Slice => {} }, $self->{'domain_id'}
);

for my $row( @rows ) {
for my $row( @{ $rows } ) {
# Encode slashes as SOLIDUS unicode character
# Encode dots as Full stop unicode character
( my $encodedDbName = $row->{'sqld_name'} ) =~ s%([./])%{ '/', '@002f', '.', '@002e' }->{$1}%ge;
Expand Down
2 changes: 1 addition & 1 deletion engine/backup/imscp-backup-all
Expand Up @@ -159,7 +159,7 @@ sub backupDatabases
for my $dbName( keys %{$rows} ) {
local $@;
eval { $db->dumpdb( $dbName, $bkpDir ); };
warning( $@ );
warning( $@ ) if $@;
next if $@;

# Encode slashes as SOLIDUS unicode character
Expand Down
1 change: 1 addition & 0 deletions gui/public/client/backup.php
Expand Up @@ -55,6 +55,7 @@ function scheduleBackupRestoration($userId)

if (!empty($_POST)) {
scheduleBackupRestoration($_SESSION['user_id']);
redirectTo('backup.php');
}

$tpl = new iMSCP_pTemplate();
Expand Down

0 comments on commit 7e257d1

Please sign in to comment.