mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Fix a voicemail bug
Fix the voicemail link Use only one keep local feature Deprecate the voicemail_local_after_forward
This commit is contained in:
@@ -100,7 +100,6 @@
|
||||
$voicemail_file = $_POST["voicemail_file"];
|
||||
$voicemail_local_after_email = $_POST["voicemail_local_after_email"] ?? null;
|
||||
$voicemail_destination = $_POST["voicemail_destination"];
|
||||
$voicemail_local_after_forward = $_POST["voicemail_local_after_forward"] ?? null;
|
||||
$voicemail_enabled = $_POST["voicemail_enabled"] ?? 'false';
|
||||
$voicemail_description = $_POST["voicemail_description"];
|
||||
$voicemail_tutorial = $_POST["voicemail_tutorial"] ?? null;
|
||||
@@ -181,21 +180,6 @@
|
||||
if (permission_exists('voicemail_local_after_email') && !empty($voicemail_mail_to)) {
|
||||
$array['voicemails'][0]['voicemail_local_after_email'] = $voicemail_local_after_email ?? 'false';
|
||||
}
|
||||
else if (permission_exists('voicemail_local_after_forward')) {
|
||||
$array['voicemails'][0]['voicemail_local_after_email'] = $voicemail_local_after_forward ?? 'false';
|
||||
}
|
||||
else {
|
||||
$array['voicemails'][0]['voicemail_local_after_email'] = 'true';
|
||||
}
|
||||
if (permission_exists('voicemail_local_after_forward')) {
|
||||
$array['voicemails'][0]['voicemail_local_after_forward'] = $voicemail_local_after_forward ?? 'false';
|
||||
}
|
||||
else if (permission_exists('voicemail_local_after_email') && !empty($voicemail_mail_to)) {
|
||||
$array['voicemails'][0]['voicemail_local_after_forward'] = $voicemail_local_after_email ?? 'false';
|
||||
}
|
||||
else {
|
||||
$array['voicemails'][0]['voicemail_local_after_forward'] = 'true';
|
||||
}
|
||||
$array['voicemails'][0]['voicemail_enabled'] = $voicemail_enabled;
|
||||
$array['voicemails'][0]['voicemail_description'] = $voicemail_description;
|
||||
|
||||
@@ -362,7 +346,6 @@
|
||||
$voicemail_recording_options = $row["voicemail_recording_options"];
|
||||
$voicemail_file = $row["voicemail_file"];
|
||||
$voicemail_local_after_email = $row["voicemail_local_after_email"];
|
||||
$voicemail_local_after_forward = $row["voicemail_local_after_forward"];
|
||||
$voicemail_enabled = $row["voicemail_enabled"];
|
||||
$voicemail_description = $row["voicemail_description"];
|
||||
}
|
||||
@@ -371,7 +354,6 @@
|
||||
else {
|
||||
$voicemail_file = $_SESSION['voicemail']['voicemail_file']['text'];
|
||||
$voicemail_local_after_email = $_SESSION['voicemail']['keep_local']['boolean'];
|
||||
$voicemail_local_after_forward = $_SESSION['voicemail']['keep_local']['boolean'];
|
||||
}
|
||||
|
||||
//remove the spaces
|
||||
@@ -381,7 +363,6 @@
|
||||
|
||||
//set the defaults
|
||||
if (empty($voicemail_local_after_email)) { $voicemail_local_after_email = 'true'; }
|
||||
if (empty($voicemail_local_after_forward)) { $voicemail_local_after_forward = 'true'; }
|
||||
if (empty($voicemail_enabled)) { $voicemail_enabled = 'true'; }
|
||||
if (empty($voicemail_transcription_enabled)) { $voicemail_transcription_enabled = $_SESSION['voicemail']['transcription_enabled_default']['boolean']; }
|
||||
if (empty($voicemail_tutorial)) { $voicemail_tutorial = 'false'; }
|
||||
@@ -970,36 +951,6 @@
|
||||
echo " </tr>";
|
||||
}
|
||||
|
||||
if (
|
||||
permission_exists('voicemail_forward') &&
|
||||
permission_exists('voicemail_local_after_forward') &&
|
||||
!empty($voicemail_destinations_assigned) &&
|
||||
is_array($voicemail_destinations_assigned)
|
||||
) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-voicemail_local_after_forward']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
if (substr($_SESSION['theme']['input_toggle_style']['text'], 0, 6) == 'switch') {
|
||||
echo " <label class='switch'>\n";
|
||||
echo " <input type='checkbox' id='voicemail_local_after_forward' name='voicemail_local_after_forward' value='true' ".($voicemail_local_after_forward == 'true' ? "checked='checked'" : null).">\n";
|
||||
echo " <span class='slider'></span> \n";
|
||||
echo " </label>\n";
|
||||
}
|
||||
else {
|
||||
echo " <select class='formfld' id='voicemail_local_after_forward' name='voicemail_local_after_forward'>\n";
|
||||
echo " <option value='true'>".$text['option-true']."</option>\n";
|
||||
echo " <option value='false' ".($voicemail_local_after_forward == 'false' ? "selected='selected'" : null).">".$text['option-false']."</option>\n";
|
||||
echo " </select>\n";
|
||||
}
|
||||
echo "<br />\n";
|
||||
echo $text['description-voicemail_local_after_forward']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
unset($voicemail_destinations_assigned);
|
||||
}
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-voicemail_enabled']."\n";
|
||||
|
||||
Reference in New Issue
Block a user