|
Revision 10606, 1.0 kB
(checked in by p_lindheimer, 2 years ago)
|
closes #4651 update module uninstalls to ignore feature codes now being deleted by module_uninstall
|
- Property svn:mime-type set to
text/html
- Property svn:eol-style set to
native
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
// Delete all the followme trees. This function selects from the users table |
|---|
| 4 |
// and not the findmefollow table because the uninstall code deletes the tables |
|---|
| 5 |
// prior to running the uninstall script. (probably should be the opposite but...) |
|---|
| 6 |
// It is probably better this way anyhow, as there is no harm done if the user |
|---|
| 7 |
// has not followme settings and who knows ... maybe some stray ones got left |
|---|
| 8 |
// behind somehow. |
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
// TODO, is this needed...? |
|---|
| 12 |
// is this global...? what if we include this files |
|---|
| 13 |
// from a function...? |
|---|
| 14 |
global $astman; |
|---|
| 15 |
global $amp_conf; |
|---|
| 16 |
|
|---|
| 17 |
// Don't bother uninstalling feature codes, now module_uninstall does it |
|---|
| 18 |
|
|---|
| 19 |
$sql = "SELECT * FROM users"; |
|---|
| 20 |
$userresults = sql($sql,"getAll",DB_FETCHMODE_ASSOC); |
|---|
| 21 |
|
|---|
| 22 |
//add details to astdb |
|---|
| 23 |
if ($astman) { |
|---|
| 24 |
foreach($userresults as $usr) { |
|---|
| 25 |
extract($usr); |
|---|
| 26 |
$astman->database_deltree("AMPUSER/".$grpnum."/followme"); |
|---|
| 27 |
} |
|---|
| 28 |
} else { |
|---|
| 29 |
echo _("Cannot connect to Asterisk Manager with ").$amp_conf["AMPMGRUSER"]."/".$amp_conf["AMPMGRPASS"]; |
|---|
| 30 |
} |
|---|
| 31 |
|
|---|
| 32 |
sql('DROP TABLE IF EXISTS findmefollow'); |
|---|
| 33 |
|
|---|
| 34 |
?> |
|---|