Show
Ignore:
Timestamp:
03/08/11 19:22:57 (1 year ago)
Author:
p_lindheimer
Message:

Merged revisions 11746 via svnmerge from
http://www.freepbx.org/v2/svn/freepbx/branches/2.5

................

r11746 | p_lindheimer | 2011-03-08 17:20:03 -0800 (Tue, 08 Mar 2011) | 23 lines


Merged revisions 11745 via svnmerge from
http://www.freepbx.org/v2/svn/freepbx/branches/2.6


................

r11745 | p_lindheimer | 2011-03-08 17:17:27 -0800 (Tue, 08 Mar 2011) | 16 lines


Merged revisions 11744 via svnmerge from
http://www.freepbx.org/v2/svn/freepbx/branches/2.7


................

r11744 | p_lindheimer | 2011-03-08 17:16:29 -0800 (Tue, 08 Mar 2011) | 9 lines


Merged revisions 11743 via svnmerge from
http://www.freepbx.org/v2/svn/freepbx/branches/2.8


........

r11743 | p_lindheimer | 2011-03-08 17:15:03 -0800 (Tue, 08 Mar 2011) | 1 line


distro info from 2.9

........

................

................

................

Files:

Legend:

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

    • Property svnmerge-integrated changed from /freepbx/branches/2.5:1-6424,6563,6764,7544,7592-7613,7615,7617-7624,7626-7627,7630-7640,7700,7706,9513,10466,11468 /freepbx/branches/2.3:1-4129,4131,4133-4134,4136-4995,5088,5135,5140,5194 /freepbx/trunk:1-5453,5736,5739,5748,5750,5758,5760,5765,5771,5773,5779,5782,5819,5827,5836,5838,5965,5974,6045,6056,6144,6215,6220,6226,6321-6322,6369 to /freepbx/branches/2.3:1-4129,4131,4133-4134,4136-4995,5088,5135,5140,5194 /freepbx/branches/2.5:1-6424,6563,6764,7544,7592-7613,7615,7617-7624,7626-7627,7630-7640,7700,7706,9513,10466,11468,11746 /freepbx/trunk:1-5453,5736,5739,5748,5750,5758,5760,5765,5771,5773,5779,5782,5819,5827,5836,5838,5965,5974,6045,6056,6144,6215,6220,6226,6321-6322,6369
  • freepbx/branches/2.4/amp_conf/htdocs/admin/functions.inc.php

    r11469 r11747  
    33333333  } 
    33343334  $options .= "&phpver=".urlencode(phpversion()); 
     3335  $distro_info = _module_distro_id(); 
     3336  $options .= "&distro=".urlencode($distro_info['pbx_type']); 
     3337  $options .= "&distrover=".urlencode($distro_info['pbx_version']); 
    33353338 
    33363339  $announcement = @ file_get_contents("http://mirror.freepbx.org/version-".getversion().".html".$options); 
     
    34403443  } 
    34413444}  
     3445 
     3446function _module_distro_id() { 
     3447  static $pbx_type; 
     3448  static $pbx_version; 
     3449 
     3450  if (isset($pbx_type)) { 
     3451    return array('pbx_type' => $pbx_type, 'pbx_version' => $pbx_version); 
     3452  } 
     3453 
     3454  // FreePBX Distro 
     3455  if (file_exists('/etc/asterisk/freepbxdistro-version')) { 
     3456    $pbx_type = 'freepbxdistro'; 
     3457    $pbx_version = trim(file_get_contents('/etc/asterisk/freepbxdistro-version')); 
     3458 
     3459  // Trixbox 
     3460  } elseif (file_exists('/etc/trixbox/trixbox-version')) { 
     3461    $pbx_type = 'trixbox'; 
     3462    $pbx_version = trim(file_get_contents('/etc/trixbox/trixbox-version')); 
     3463 
     3464  // AsteriskNOW 
     3465  } elseif (file_exists('/etc/asterisknow-version')) { 
     3466    $pbx_type = 'asterisknow'; 
     3467    $pbx_version = trim(file_get_contents('/etc/asterisknow-version')); 
     3468   
     3469  // Elastix 
     3470  } elseif (is_dir('/usr/share/elastix') || file_exists('/usr/share/elastix/pre_elastix_version.info')) { 
     3471    $pbx_type = 'elastix'; 
     3472    $pbx_version = ''; 
     3473    if (class_exists('PDO') && file_exists('/var/www/db/settings.db')) { 
     3474      $elastix_db = new PDO('sqlite:/var/www/db/settings.db'); 
     3475      $result = $elastix_db->query("SELECT value FROM settings WHERE key='elastix_version_release'"); 
     3476      if ($result !== false) foreach ($result as $row) { 
     3477        if (isset($row['value'])) { 
     3478          $pbx_version = $row['value']; 
     3479          break; 
     3480        } 
     3481      } 
     3482    } 
     3483    if (!$pbx_version && file_exists('/usr/share/elastix/pre_elastix_version.info')) { 
     3484      $pbx_version = trim(file_get_contents('/usr/share/elastix/pre_elastix_version.info')); 
     3485    } 
     3486    if (!$pbx_version) { 
     3487      $pbx_version = '2.X+'; 
     3488    } 
     3489 
     3490  // PIAF 
     3491  } elseif (file_exists('/etc/pbx/.version') || file_exists('/etc/pbx/.color')) { 
     3492    $pbx_type = 'piaf'; 
     3493    $pbx_version = ''; 
     3494    if (file_exists('/etc/pbx/.version')) { 
     3495      $pbx_version = trim(file_get_contents('/etc/pbx/.version')); 
     3496    } 
     3497    if (file_exists('/etc/pbx/.color')) { 
     3498      $pbx_version .= '.' . trim(file_get_contents('/etc/pbx/.color')); 
     3499    } 
     3500    if (!$pbx_version) { 
     3501      if (file_exists('/etc/pbx/ISO-Version')) { 
     3502        $pbx_ver_raw = trim(file_get_contents('/etc/pbx/ISO-Version')); 
     3503        $pbx_arr = explode('=',$pbx_ver_raw); 
     3504        $pbx_version = $pbx_arr[count($pbx_arr)-1]; 
     3505      } else { 
     3506        $pbx_version = 'unknown'; 
     3507      } 
     3508    } 
     3509 
     3510  // Old PIAF or Fonica 
     3511  } elseif (file_exists('/etc/pbx/version') || file_exists('/etc/pbx/ISO-Version')) { 
     3512    $pbx_type = 'fonica'; 
     3513    if (file_exists('/etc/pbx/ISO-Version')) { 
     3514      $pbx_ver_raw = trim(file_get_contents('/etc/pbx/ISO-Version')); 
     3515      $pbx_arr = explode('=',$pbx_ver_raw); 
     3516      $pbx_version = $pbx_arr[count($pbx_arr)-1]; 
     3517      if (stristr($pbx_arr[0],'foncordiax') !== false) { 
     3518        $pbx_version .= '.pro'; 
     3519      } else { 
     3520        $pbx_version = str_replace(' ','.',$pbx_version); 
     3521        if ($pbx_version != '1.0.standard') { 
     3522          $pbx_type = 'piaf'; 
     3523        } 
     3524      } 
     3525    } else { 
     3526      $pbx_version = 'unknown'; 
     3527    } 
     3528  } else { 
     3529    $pbx_type = 'unknown'; 
     3530    $pbx_version = 'unknown'; 
     3531  } 
     3532  return array('pbx_type' => $pbx_type, 'pbx_version' => $pbx_version); 
     3533} 
    34423534 
    34433535function module_run_notification_checks() { 
     
    36043696  return $contexts; 
    36053697} 
    3606  
    3607 ?>