| 78 | | // Now process everything else |
|---|
| 79 | | foreach (array_keys($ivr_newname) as $old) { |
|---|
| 80 | | // Timeconditions |
|---|
| 81 | | sql("UPDATE timeconditions set truegoto='".$ivr_newname[$arr[0]].",s,1' where truegoto='$old,s,1'"); |
|---|
| 82 | | sql("UPDATE timeconditions set falsegoto='".$ivr_newname[$arr[0]].",s,1' where falsegoto='$old,s,1'"); |
|---|
| 83 | | // Inbound Routes |
|---|
| 84 | | sql("UPDATE incoming set destination='".$ivr_newname[$arr[0]].",s,1' where destination='$old,s,1'"); |
|---|
| 85 | | // Ring Groups |
|---|
| 86 | | sql("UPDATE ringgroups set postdest='".$ivr_newname[$arr[0]].",s,1' where postdest='$old,s,1'"); |
|---|
| | 78 | // Now process everything else - if there's anything to process. |
|---|
| | 79 | if (isset($ivr_newname) && is_array($ivr_newname)) { |
|---|
| | 80 | foreach (array_keys($ivr_newname) as $old) { |
|---|
| | 81 | // Timeconditions |
|---|
| | 82 | sql("UPDATE timeconditions set truegoto='".$ivr_newname[$arr[0]].",s,1' where truegoto='$old,s,1'"); |
|---|
| | 83 | sql("UPDATE timeconditions set falsegoto='".$ivr_newname[$arr[0]].",s,1' where falsegoto='$old,s,1'"); |
|---|
| | 84 | // Inbound Routes |
|---|
| | 85 | sql("UPDATE incoming set destination='".$ivr_newname[$arr[0]].",s,1' where destination='$old,s,1'"); |
|---|
| | 86 | // Ring Groups |
|---|
| | 87 | sql("UPDATE ringgroups set postdest='".$ivr_newname[$arr[0]].",s,1' where postdest='$old,s,1'"); |
|---|
| | 88 | } |
|---|