Changeset 5524

Show
Ignore:
Timestamp:
12/16/07 16:21:32 (5 years ago)
Author:
p_lindheimer
Message:

use core_conf and remove parking_conf so that general featues.conf include files are used

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.4/parking/functions.inc.php

    r5512 r5524  
    44  We call this with retrieve_conf 
    55*/ 
    6  
    7 class parking_conf { 
    8   // return the filename to write 
    9   function get_filename() { 
    10     return "parking_additional.inc"; 
    11   } 
    12   function addSetting($param, $value) { 
    13     $this->_params[] = array($param, $value); 
    14   } 
    15   // return the output that goes in the file 
    16   function generateConf() { 
    17     $output = ""; 
    18     if (isset($this->_params) && is_array($this->_params)) { 
    19       foreach ($this->_params as $settings) { 
    20         $output .= $settings[0].' => '.$settings[1]."\n"; 
    21       } 
    22     } 
    23     return $output; 
    24   } 
    25 } 
    266 
    277function parking_get_config($engine) { 
     
    3010  global $ext;  // is this the best way to pass this? 
    3111  global $asterisk_conf; 
    32   global $parking_conf; 
     12  global $core_conf; 
    3313  global $version; 
    3414 
     
    6040      // first write features_additional.inc include file 
    6141      // 
    62       $parking_conf->addSetting('parkext',$parkext); 
    63       $parking_conf->addSetting('parkpos',$parkpos1."-".$parkpos2); 
    64       $parking_conf->addSetting('context',$parkingcontext); 
     42      $core_conf->addFeatureGeneral('parkext',$parkext); 
     43      $core_conf->addFeatureGeneral('parkpos',$parkpos1."-".$parkpos2); 
     44      $core_conf->addFeatureGeneral('context',$parkingcontext); 
    6545 
    6646      if ($parkingtime) { 
    67         $parking_conf->addSetting('parkingtime',$parkingtime); 
     47        $core_conf->addFeatureGeneral('parkingtime',$parkingtime); 
    6848      } 
    6949 
     
    7555      if (isset($amp_conf["PARKINGPATCH"]) && strtolower($amp_conf["PARKINGPATCH"]) == 'true') { 
    7656        if ($parkalertinfo) { 
    77           $parking_conf->addSetting('parkreturnalertinfo',$parkalertinfo); 
     57          $core_conf->addFeatureGeneral('parkreturnalertinfo',$parkalertinfo); 
    7858        } 
    7959        if ($parkcid) { 
    80           $parking_conf->addSetting('parkreturncidprefix',$parkcid); 
     60          $core_conf->addFeatureGeneral('parkreturncidprefix',$parkcid); 
    8161        } 
    8262      // No patch, do the default for orphaned calls 
     
    10686          $ext->add($parkhints, $slot, '', new ext_parkedcall($slot)); 
    10787        } 
     88      } else { 
     89        $core_conf->addFeatureGeneral('parkhints','yes'); 
    10890      } 
    10991    }