find('first', array( 'fields' => array('Value'), 'conditions' => array('Category' => $zmBandwidth.'band', 'Name' => $option) )); return($ZM_OPTIONS['Config']['Value']); } public function writeConfig() { $configFile = "/usr/local/etc/zm.conf"; $lines = file($configFile); foreach ($lines as $linenum => $line) { if ( preg_match( '/^\s*([^=\s]+)\s*=\s*(.+?)\s*$/', $line, $matches )) { Configure::write($matches[1], $matches[2]); } } $options = $this->find('list', array('fields' => array('Name', 'Value'))); foreach ($options as $key => $value) { Configure::write($key, $value); } Configure::write('SCALE_BASE', 100); } } ?>