| 193 | | //check to see if were using the directory in ivr's |
|---|
| 194 | | $count = $db->getOne('SELECT count(*) FROM ivr WHERE displayname != "__install_done"'); |
|---|
| 195 | | if(DB::IsError($count)) { |
|---|
| 196 | | die_freepbx(_('Error migrating to new directory! ERROR: Could not get count of Ivr\'s using the legacy Directory ' . $q->getDebugInfo())); |
|---|
| | 192 | //check to see if were using the directory in ivr's, ensureing that we have ivr's |
|---|
| | 193 | $ivr_stat = $db->getOne('SELECT count(*) FROM modules WHERE modulename = "ivr" AND enabled = 1'); |
|---|
| | 194 | if(DB::IsError($q)) { |
|---|
| | 195 | die_freepbx(_('Error migrating to new directory! ERROR: Could not get Ivr status ' . $q->getDebugInfo())); |
|---|
| | 196 | } |
|---|
| | 197 | if ($ivr_stat == 1) { |
|---|
| | 198 | $count = $db->getOne('SELECT count(*) FROM ivr WHERE displayname != "__install_done"'); |
|---|
| | 199 | if(DB::IsError($count)) { |
|---|
| | 200 | die_freepbx(_('Error migrating to new directory! ERROR: Could not get count of Ivr\'s using the legacy Directory ' . $q->getDebugInfo())); |
|---|
| | 201 | } |
|---|
| | 202 | } else { |
|---|
| | 203 | $count = 0; |
|---|