|
Revision 4159, 0.8 kB
(checked in by p_lindheimer, 6 years ago)
|
merge findmefollow/core extension destinations if any since now they are the same for all modules
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
global $db; |
|---|
| 4 |
global $amp_conf; |
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
$results = array(); |
|---|
| 8 |
$sql = "SELECT args, extension, priority FROM extensions WHERE context = 'ext-queues' AND descr = 'jump'"; |
|---|
| 9 |
$results = $db->getAll($sql, DB_FETCHMODE_ASSOC); |
|---|
| 10 |
if (!DB::IsError($results)) { |
|---|
| 11 |
foreach ($results as $result) { |
|---|
| 12 |
$old_dest = $result['args']; |
|---|
| 13 |
$extension = $result['extension']; |
|---|
| 14 |
$priority = $result['priority']; |
|---|
| 15 |
|
|---|
| 16 |
$new_dest = merge_ext_followme(trim($old_dest)); |
|---|
| 17 |
if ($new_dest != $old_dest) { |
|---|
| 18 |
$sql = "UPDATE extensions SET args = '$new_dest' WHERE extension = '$extension' AND priority = '$priority' AND context = 'ext-queues' AND descr = 'jump' AND args = '$old_dest'"; |
|---|
| 19 |
$results = $db->query($sql); |
|---|
| 20 |
if(DB::IsError($results)) { |
|---|
| 21 |
die($results->getMessage()); |
|---|
| 22 |
} |
|---|
| 23 |
} |
|---|
| 24 |
} |
|---|
| 25 |
} |
|---|
| 26 |
|
|---|
| 27 |
?> |
|---|
| 28 |
|
|---|