Last change
on this file since 3577 was
3577,
checked in by flop25, 15 years ago
|
first version beta of the 'version checker'
|
File size:
475 bytes
|
Rev | Line | |
---|
[3577] | 1 | <?php |
---|
| 2 | class floPure |
---|
| 3 | { |
---|
| 4 | /**var $fs_plugins = array(); |
---|
| 5 | var $db_plugins_by_id = array(); |
---|
| 6 | var $server_plugins = array(); |
---|
| 7 | |
---|
| 8 | * Sort functions |
---|
| 9 | */ |
---|
| 10 | function floPure_version_compare($a, $b) |
---|
| 11 | { |
---|
| 12 | $pattern = array('/([a-z])/ei', '/\.+/', '/\.\Z|\A\./'); |
---|
| 13 | $replacement = array( "'.'.intval('\\1', 36).'.'", '.', ''); |
---|
| 14 | |
---|
| 15 | $array = preg_replace($pattern, $replacement, array($a, $b)); |
---|
| 16 | |
---|
| 17 | return version_compare($array[0], $array[1], '>='); |
---|
| 18 | } |
---|
| 19 | } |
---|
| 20 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.