Show
Ignore:
Timestamp:
12/11/07 19:03:52 (5 years ago)
Author:
p_lindheimer
Message:

check for version_compare_freepbx in case functions.inc.php is included in an install_amp upgrade

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/branches/2.4/amp_conf/htdocs/admin/functions.inc.php

    r5448 r5474  
    10381038 
    10391039 
    1040 /* verison_compare that works with freePBX version numbers 
    1041  */ 
    1042 function version_compare_freepbx($version1, $version2, $op = null) { 
    1043         $version1 = str_replace("rc","RC", strtolower($version1)); 
    1044         $version2 = str_replace("rc","RC", strtolower($version2)); 
    1045     if (!is_null($op)) { 
    1046       return version_compare($version1, $version2, $op); 
    1047     } else { 
    1048       return version_compare($version1, $version2); 
    1049     } 
     1040if (!function_exists('version_compare_freepbx')) { 
     1041  /* verison_compare that works with freePBX version numbers 
     1042  */ 
     1043  function version_compare_freepbx($version1, $version2, $op = null) { 
     1044          $version1 = str_replace("rc","RC", strtolower($version1)); 
     1045          $version2 = str_replace("rc","RC", strtolower($version2)); 
     1046      if (!is_null($op)) { 
     1047        return version_compare($version1, $version2, $op); 
     1048      } else { 
     1049        return version_compare($version1, $version2); 
     1050      } 
     1051  } 
    10501052} 
    10511053 
  • freepbx/branches/2.4/install_amp

    r5473 r5474  
    8888} 
    8989 
    90 function version_compare_freepbx($version1, $version2, $cond=null) { 
    91   $version1 = str_replace("rc","RC", strtolower($version1)); 
    92   $version2 = str_replace("rc","RC", strtolower($version2)); 
    93   return version_compare($version1, $version2, $cond); 
     90if (!function_exists('version_compare_freepbx')) { 
     91  /* verison_compare that works with freePBX version numbers 
     92  */ 
     93  function version_compare_freepbx($version1, $version2, $op = null) { 
     94          $version1 = str_replace("rc","RC", strtolower($version1)); 
     95          $version2 = str_replace("rc","RC", strtolower($version2)); 
     96      if (!is_null($op)) { 
     97        return version_compare($version1, $version2, $op); 
     98      } else { 
     99        return version_compare($version1, $version2); 
     100      } 
     101  } 
    94102} 
    95103