|
Revision 8412, 0.8 kB
(checked in by Maikel, 3 years ago)
|
La desinstalación dejaba datos en la bd de asterisk, se corrigio ese detalle
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
$fcl = new featurecode('keylock', 'keylock_lock'); |
|---|
| 3 |
$fcu = new featurecode('keylock', 'keylock_unlock'); |
|---|
| 4 |
$fct = new featurecode('keylock', 'keylock_toggle'); |
|---|
| 5 |
$fcs = new featurecode('keylock', 'keylock_setpass'); |
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
$fcl->delete(); |
|---|
| 9 |
$fcu->delete(); |
|---|
| 10 |
$fct->delete(); |
|---|
| 11 |
$fcs->delete(); |
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
unset($fcl); |
|---|
| 15 |
unset($fcu); |
|---|
| 16 |
unset($fct); |
|---|
| 17 |
unset($fcs); |
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
global $astman; |
|---|
| 21 |
global $amp_conf; |
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
$sql = "SELECT * FROM users"; |
|---|
| 25 |
$userresults = sql($sql,"getAll",DB_FETCHMODE_ASSOC); |
|---|
| 26 |
|
|---|
| 27 |
//add details to astdb |
|---|
| 28 |
if ($astman) { |
|---|
| 29 |
foreach($userresults as $usr) { |
|---|
| 30 |
extract($usr); |
|---|
| 31 |
$astman->database_deltree("KEYLOCK/".$extension); |
|---|
| 32 |
} |
|---|
| 33 |
} else { |
|---|
| 34 |
echo _("Cannot connect to Asterisk Manager with ").$amp_conf["AMPMGRUSER"]."/".$amp_conf["AMPMGRPASS"]; |
|---|
| 35 |
} |
|---|
| 36 |
|
|---|
| 37 |
|
|---|
| 38 |
?> |
|---|