From d51e6b8d2da1ac7205694635945c415a3b0d1196 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Sat, 19 Jul 2014 12:58:46 +0200 Subject: [PATCH] Fix room deletion --- public/vroom.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/vroom.pl b/public/vroom.pl index 56a6aa1..dde8ad0 100755 --- a/public/vroom.pl +++ b/public/vroom.pl @@ -354,7 +354,9 @@ helper delete_rooms => sub { $timeout = time()-$config->{persistentInactivityTimeout}; $sth = eval { $self->db->prepare("SELECT `name` FROM rooms WHERE `activity_timestamp` < $timeout AND `persistent`='1';") } || return undef; $sth->execute(); - push @toDeleteName, $sth->fetchrow_array; + while (my $room = $sth->fetchrow_array){ + push @toDeleteName, $room; + } } foreach my $room (@toDeleteName){ my $data = $self->get_room($room);