Changeset 5524
- Timestamp:
- 12/16/07 16:21:32 (5 years ago)
- Files:
-
- modules/branches/2.4/parking/functions.inc.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.4/parking/functions.inc.php
r5512 r5524 4 4 We call this with retrieve_conf 5 5 */ 6 7 class parking_conf {8 // return the filename to write9 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 file16 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 }26 6 27 7 function parking_get_config($engine) { … … 30 10 global $ext; // is this the best way to pass this? 31 11 global $asterisk_conf; 32 global $ parking_conf;12 global $core_conf; 33 13 global $version; 34 14 … … 60 40 // first write features_additional.inc include file 61 41 // 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); 65 45 66 46 if ($parkingtime) { 67 $ parking_conf->addSetting('parkingtime',$parkingtime);47 $core_conf->addFeatureGeneral('parkingtime',$parkingtime); 68 48 } 69 49 … … 75 55 if (isset($amp_conf["PARKINGPATCH"]) && strtolower($amp_conf["PARKINGPATCH"]) == 'true') { 76 56 if ($parkalertinfo) { 77 $ parking_conf->addSetting('parkreturnalertinfo',$parkalertinfo);57 $core_conf->addFeatureGeneral('parkreturnalertinfo',$parkalertinfo); 78 58 } 79 59 if ($parkcid) { 80 $ parking_conf->addSetting('parkreturncidprefix',$parkcid);60 $core_conf->addFeatureGeneral('parkreturncidprefix',$parkcid); 81 61 } 82 62 // No patch, do the default for orphaned calls … … 106 86 $ext->add($parkhints, $slot, '', new ext_parkedcall($slot)); 107 87 } 88 } else { 89 $core_conf->addFeatureGeneral('parkhints','yes'); 108 90 } 109 91 }
