| | 475 | |
|---|
| | 476 | |
|---|
| | 477 | /* verison_compare that works with freePBX version numbers |
|---|
| | 478 | */ |
|---|
| | 479 | function version_compare_freepbx($version1, $version2, $op = null) { |
|---|
| | 480 | $version1 = str_replace("rc","RC", strtolower($version1)); |
|---|
| | 481 | $version2 = str_replace("rc","RC", strtolower($version2)); |
|---|
| | 482 | if (!is_null($op)) { |
|---|
| | 483 | return version_compare($version1, $version2, $op); |
|---|
| | 484 | } else { |
|---|
| | 485 | return version_compare($version1, $version2); |
|---|
| | 486 | } |
|---|
| | 487 | } |
|---|
| | 488 | |
|---|
| 1634 | | if (version_compare($matches[2], $ver, $operator) ) { |
|---|
| 1635 | | $errors[] = _module_comparison_error_message('FreePBX', $matches[2], $ver, $operator); |
|---|
| | 1648 | $compare_ver = $matches[2]; |
|---|
| | 1649 | if (version_compare_freepbx($installed_ver, $compare_ver, $operator) ) { |
|---|
| | 1650 | // version is good |
|---|
| | 1651 | } else { |
|---|
| | 1652 | $errors[] = _module_comparison_error_message('FreePBX', $compare_ver, $installed_ver, $operator); |
|---|
| 1650 | | if (version_compare($matches[4], $modules[$matches[1]]['dbversion'], $operator) ) { |
|---|
| 1651 | | $errors[] = _module_comparison_error_message($matches[1].' module', $matches[4], $modules[$matches[1]]['dbversion'], $operator); |
|---|
| | 1669 | |
|---|
| | 1670 | if (version_compare_freepbx($installed_ver, $compare_ver, $operator) ) { |
|---|
| | 1671 | // version is good |
|---|
| | 1672 | } else { |
|---|
| | 1673 | $errors[] = _module_comparison_error_message($matches[1].' module', $compare_ver, $installed_ver, $operator); |
|---|