diff --git a/app/voicemails/voicemail_messages.php b/app/voicemails/voicemail_messages.php index 9a7ee5a80b..457514f7a6 100644 --- a/app/voicemails/voicemail_messages.php +++ b/app/voicemails/voicemail_messages.php @@ -178,7 +178,7 @@ $voicemails = $vm->messages(); //count messages - $new_messages = 0; + $new_messages = $num_rows = 0; if (is_array($voicemails) && @sizeof($voicemails) != 0) { foreach ($voicemails as $voicemail) { if (is_array($voicemail['messages'])) { diff --git a/app/voicemails/voicemails.php b/app/voicemails/voicemails.php index 17e1c6e838..18ef21370c 100644 --- a/app/voicemails/voicemails.php +++ b/app/voicemails/voicemails.php @@ -79,6 +79,16 @@ } } } + else { + $voicemail = new voicemail; + $rows = $voicemail->voicemails(); + if (is_array($rows) && @sizeof($rows) != 0) { + foreach ($rows as $row) { + $voicemail_uuids[]['voicemail_uuid'] = $row['voicemail_uuid']; + } + } + unset($voicemail, $rows, $row); + } //get order and order by $order_by = $_GET["order_by"];