|
|
@ -479,7 +479,7 @@ helper delete_room => sub { |
|
|
|
my $data = $self->get_room_by_name($room); |
|
|
|
my $data = $self->get_room_by_name($room); |
|
|
|
if (!$data){ |
|
|
|
if (!$data){ |
|
|
|
$self->app->log->debug("Error: room $room doesn't exist"); |
|
|
|
$self->app->log->debug("Error: room $room doesn't exist"); |
|
|
|
return undef; |
|
|
|
return 0; |
|
|
|
} |
|
|
|
} |
|
|
|
if ($ec && $data->{etherpad_group}){ |
|
|
|
if ($ec && $data->{etherpad_group}){ |
|
|
|
$ec->delete_pad($data->{etherpad_group} . '$' . $room); |
|
|
|
$ec->delete_pad($data->{etherpad_group} . '$' . $room); |
|
|
@ -487,9 +487,9 @@ helper delete_room => sub { |
|
|
|
} |
|
|
|
} |
|
|
|
my $sth = eval { |
|
|
|
my $sth = eval { |
|
|
|
$self->db->prepare('DELETE FROM `rooms` |
|
|
|
$self->db->prepare('DELETE FROM `rooms` |
|
|
|
WHERE `id`=?'); |
|
|
|
WHERE `name`=?'); |
|
|
|
} || return undef; |
|
|
|
}; |
|
|
|
$sth->execute($data->{id}) || return undef; |
|
|
|
$sth->execute($room); |
|
|
|
return 1; |
|
|
|
return 1; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|