source: extensions/floPure/tools/floPure.class.php @ 3577

Revision 3577, 475 bytes checked in by flop25, 11 years ago (diff)

first version beta of the 'version checker'

Line 
1<?php
2class 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.