| 48 | | foreach ($deltree as $family) { |
|---|
| 49 | | $astman->database_deltree($family); |
|---|
| 50 | | } |
|---|
| 51 | | |
|---|
| 52 | | foreach ($arr as $line) { |
|---|
| 53 | | $result = preg_match("/\[(.+)\] \[(.+)\]/", $line, $matches); |
|---|
| 54 | | // Now, the bad ones we know about are the ones that start with //, anything starting with SIP or IAX, |
|---|
| 55 | | // and RG (which are only temporary anyway). |
|---|
| 56 | | if (!isset($matches[1]) || $matches[1] == "") { continue; } |
|---|
| 57 | | $pattern = "/(^\/\/)|(^\/IAX)|(^\/SIP)|(^\/RG)|(^\/BLKVM)|(^\/FM)|(^\/dundi)/"; |
|---|
| 58 | | if (preg_match($pattern, $matches[1])) { continue; } |
|---|
| 59 | | preg_match("/(.+)\/(.+)$/", $matches[1], $famkey); |
|---|
| 60 | | $famkey[1]=trim($famkey[1], '/'); |
|---|
| 61 | | $astman->database_put($famkey[1], $famkey[2], '"'.$matches[2].'"'); |
|---|
| | 48 | if (!empty($dump)) { |
|---|
| | 49 | $arr = explode("\n", $dump); |
|---|
| | 50 | foreach ($deltree as $family) { |
|---|
| | 51 | $astman->database_deltree($family); |
|---|
| | 52 | } |
|---|
| | 53 | foreach ($arr as $line) { |
|---|
| | 54 | $result = preg_match("/\[(.+)\] \[(.+)\]/", $line, $matches); |
|---|
| | 55 | // Now, the bad ones we know about are the ones that start with //, anything starting with SIP or IAX, |
|---|
| | 56 | // and RG (which are only temporary anyway). |
|---|
| | 57 | if (!isset($matches[1]) || $matches[1] == "") { continue; } |
|---|
| | 58 | $pattern = "/(^\/\/)|(^\/IAX)|(^\/SIP)|(^\/RG)|(^\/BLKVM)|(^\/FM)|(^\/dundi)/"; |
|---|
| | 59 | if (preg_match($pattern, $matches[1])) { continue; } |
|---|
| | 60 | preg_match("/(.+)\/(.+)$/", $matches[1], $famkey); |
|---|
| | 61 | $famkey[1]=trim($famkey[1], '/'); |
|---|
| | 62 | $astman->database_put($famkey[1], $famkey[2], '"'.$matches[2].'"'); |
|---|
| | 63 | } |
|---|