Changeset 12837

Show
Ignore:
Timestamp:
10/19/11 13:02:04 (2 years ago)
Author:
p_lindheimer
Message:

freepbx_conf not always set so can't accesss as global

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/branches/2.10/amp_conf/htdocs/admin/libraries/utility.functions.php

    r12726 r12837  
    702702 */ 
    703703function fpbx_which($app) { 
    704   global $amp_conf, $freepbx_conf; 
    705    
     704  // don't know if we will always have an open class and not even sure if 
     705  // $amp_conf will be set so to be safe deal with it all here. 
     706  // 
     707  $freepbx_conf =& freepbx_conf::create(); 
     708  $which = $freepbx_conf->get_conf_setting('WHICH_' . $app); 
     709 
    706710  //if we have the location cached return it 
    707   if (isset($amp_conf['WHICH_' . $app]) && $amp_conf['WHICH_' . $app]) { 
    708     return $amp_conf['WHICH_' . $app]
     711  if ($which) { 
     712    return $which
    709713     
    710714  //otherwise, search for it 
     
    731735          'value'     => $path[0], 
    732736          'defaultval'  => $path[0], 
    733           'readonly'    => 0
     737          'readonly'    => 1
    734738          'hidden'    => 0, 
    735739          'level'     => 2,