Time Conditions: Fix for Issue 881 (Advanced button) and Issue 882 (Delete issue).
This commit is contained in:
parent
c07b8c73ac
commit
06bfa6502e
|
|
@ -305,4 +305,13 @@
|
|||
$text['message-add']['fr-fr'] = "Ajouté";
|
||||
$text['message-add']['pt-pt'] = "Adição Efectuada";
|
||||
|
||||
$text['confirm-delete']['en-us'] = "Do you really want to delete this?";
|
||||
$text['confirm-delete']['es-cl'] = "¿Realmente desea eliminar este?";
|
||||
$text['confirm-delete']['pt-pt'] = "Deseja realmente remover isto?";
|
||||
$text['confirm-delete']['fr-fr'] = "Voulez-vous vraiment supprimer cela?";
|
||||
|
||||
$text['message-delete']['en-us'] = "Delete Completed";
|
||||
$text['message-delete']['es-cl'] = "Eliminar Completado";
|
||||
$text['message-delete']['pt-pt'] = "Apagar Concluído";
|
||||
$text['message-delete']['fr-fr'] = "Supprimer Terminé";
|
||||
?>
|
||||
|
|
@ -51,13 +51,12 @@ else {
|
|||
$dialplan_uuid = check_str($dialplan_uuid);
|
||||
|
||||
//get the dialplan data
|
||||
$sql = "select * from v_dialplans ";
|
||||
$sql = "select dialplan_context from v_dialplans ";
|
||||
$sql .= "where dialplan_uuid = '".$dialplan_uuid."' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
foreach ($result as &$row) {
|
||||
$database_dialplan_uuid = $row["dialplan_uuid"];
|
||||
$dialplan_contexts[] = $row["dialplan_context"];
|
||||
}
|
||||
unset($prep_statement);
|
||||
|
|
@ -72,14 +71,15 @@ else {
|
|||
|
||||
//delete child data
|
||||
$sql = "delete from v_dialplan_details ";
|
||||
$sql .= "where dialplan_uuid = '".$dialplan_uuid."'; ";
|
||||
$sql .= "and app_uuid = '4b821450-926b-175a-af93-a03c441818b1'; ";
|
||||
$sql .= "where dialplan_uuid = '".$dialplan_uuid."' ";
|
||||
$sql .= "and domain_uuid = '".$domain_uuid."'; ";
|
||||
$db->query($sql);
|
||||
unset($sql);
|
||||
|
||||
//delete parent data
|
||||
$sql = "delete from v_dialplans ";
|
||||
$sql .= "where dialplan_uuid = '".$dialplan_uuid."'; ";
|
||||
$sql .= "where dialplan_uuid = '".$dialplan_uuid."' ";
|
||||
$sql .= "and domain_uuid = '".$domain_uuid."' ";
|
||||
$sql .= "and app_uuid = '4b821450-926b-175a-af93-a03c441818b1'; ";
|
||||
$db->query($sql);
|
||||
unset($sql);
|
||||
|
|
|
|||
|
|
@ -721,7 +721,7 @@ echo " </td>\n";
|
|||
echo " <td align='right' valign='top'>\n";
|
||||
echo " <input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='".PROJECT_PATH."/app/time_conditions/time_conditions.php?app_uuid=4b821450-926b-175a-af93-a03c441818b1'\" value='".$text['button-back']."'>\n";
|
||||
if (if_group("superadmin") && $action == 'update') {
|
||||
echo " <input type='button' class='btn' name='' alt='".$text['button-advanced']."' onclick=\"document.location.href='".PROJECT_PATH."/app/time_conditions/time_conditions.php?id=".$dialplan_uuid."&app_uuid=4b821450-926b-175a-af93-a03c441818b1'\" value='".$text['button-advanced']."'>\n";
|
||||
echo " <input type='button' class='btn' name='' alt='".$text['button-advanced']."' onclick=\"document.location.href='".PROJECT_PATH."/app/dialplan/dialplan_edit.php?id=".$dialplan_uuid."&app_uuid=4b821450-926b-175a-af93-a03c441818b1'\" value='".$text['button-advanced']."'>\n";
|
||||
}
|
||||
echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
|
||||
echo " </td>\n";
|
||||
|
|
|
|||
|
|
@ -214,7 +214,7 @@ else {
|
|||
echo "<a href='".PROJECT_PATH."/app/time_conditions/time_condition_edit.php?id=".$row['dialplan_uuid'].(($app_uuid != '') ? "&app_uuid=".$app_uuid : null)."' alt='".$text['button-edit']."'>$v_link_label_edit</a>";
|
||||
}
|
||||
if (permission_exists('time_condition_delete')) {
|
||||
echo "<a href=\"dialplan_delete.php?id[]=".$row['dialplan_uuid'].(($app_uuid != '') ? "&app_uuid=".$app_uuid : null)."\" alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>";
|
||||
echo "<a href=\"time_condition_delete.php?id[]=".$row['dialplan_uuid'].(($app_uuid != '') ? "&app_uuid=".$app_uuid : null)."\" alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>";
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
|
|
|
|||
Loading…
Reference in New Issue