Changeset 4106

Show
Ignore:
Timestamp:
06/21/07 12:27:33 (6 years ago)
Author:
p_lindheimer
Message:

Merged revisions 4105 via svnmerge from
https://amportal.svn.sourceforge.net/svnroot/amportal/freepbx/trunk

........

r4105 | p_lindheimer | 2007-06-21 09:25:19 -0700 (Thu, 21 Jun 2007) | 1 line


allow depends_on version comparisons to handle multiple digit version numbers as well as non-digits (e.g. 2.2.0beta1), may also be related to #1982

........

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/branches/2.2

    • Property svnmerge-integrated changed from /freepbx/trunk:1-3224,3231,3245-3246,3291-3295,3297,3299-3332,3336,3338-3365,3367-3373,3375-3388,3390-3391,3393-3395,3419,3437,3567,3614-3622,3624,3652,3688,3696,3756,3850,3885,4005,4084 to /freepbx/trunk:1-3224,3231,3245-3246,3291-3295,3297,3299-3332,3336,3338-3365,3367-3373,3375-3388,3390-3391,3393-3395,3419,3437,3567,3614-3622,3624,3652,3688,3696,3756,3850,3885,4005,4084,4105
  • freepbx/branches/2.2/amp_conf/htdocs/admin/functions.inc.php

    r3938 r4106  
    13261326        switch ($type) { 
    13271327          case 'version': 
    1328             if (preg_match('/^(lt|le|gt|ge|==|=|eq|!=|ne)?\s*(\d(\.\d)*)$/i', $value, $matches)) { 
     1328            if (preg_match('/^(lt|le|gt|ge|==|=|eq|!=|ne)?\s*(\d+(\.[^\.]+)*)$/i', $value, $matches)) { 
    13291329              // matches[1] = operator, [2] = version 
    13301330              $ver = getversion(); 
     
    13361336          break; 
    13371337          case 'module': 
    1338             if (preg_match('/^([a-z0-9_]+)(\s+(lt|le|gt|ge|==|=|eq|!=|ne)?\s*(\d(\.\d)*))?$/i', $value, $matches)) { 
     1338            if (preg_match('/^([a-z0-9_]+)(\s+(lt|le|gt|ge|==|=|eq|!=|ne)?\s*(\d+(\.[^\.]+)*))?$/i', $value, $matches)) { 
    13391339              // matches[1] = modulename, [3]=comparison operator, [4] = version 
    13401340              $modules = module_getinfo($matches[1]); 
     
    13891389            $engine_dependency = true; 
    13901390             
    1391             if (preg_match('/^([a-z0-9_]+)(\s+(lt|le|gt|ge|==|=|eq|!=|ne)?\s*(\d(\.\d)*))?$/i', $value, $matches)) { 
     1391            if (preg_match('/^([a-z0-9_]+)(\s+(lt|le|gt|ge|==|=|eq|!=|ne)?\s*(\d+(\.[^\.]+)*))?$/i', $value, $matches)) { 
    13921392              // matches[1] = engine, [3]=comparison operator, [4] = version 
    13931393              $operator = (!empty($matches[3]) ? $matches[3] : 'ge'); // default to >=