Esempio n. 1
0
 function prepare_for_generateconfig()
 {
     //Grandstream likes lower case letters in its mac address
     $this->mac = strtolower($this->mac);
     parent::prepare_for_generateconfig();
     $this->options['gs_timezone'] = 720 + $this->timezone['gmtoffset'] / 60;
 }
Esempio n. 2
0
 function prepare_for_generateconfig()
 {
     //Mitel likes lower case letters in its mac address
     $this->mac = strtoupper($this->mac);
     $this->options['model'] = $this->model;
     parent::prepare_for_generateconfig();
 }
Esempio n. 3
0
 function prepare_for_generateconfig()
 {
     //Traphone likes upper case letters in its mac address
     $this->mac = strtoupper($this->mac);
     parent::prepare_for_generateconfig();
     $this->config_file_replacements['$mac'] = strtoupper($this->mac);
     $this->config_file_replacements['$model'] = strtoupper($this->model);
 }
Esempio n. 4
0
 function prepare_for_generateconfig()
 {
     //To upper case letters
     $this->mac = strtoupper($this->mac);
     parent::prepare_for_generateconfig();
     $this->config_file_replacements['$mac'] = strtoupper($this->mac);
     $this->config_file_replacements['$model'] = strtoupper($this->model);
 }
Esempio n. 5
0
 function prepare_for_generateconfig()
 {
     //spa likes lower case letters in its mac address
     $this->mac = strtoupper($this->mac);
     if (isset($this->settings['image_name']) && $this->settings['image_name'] != '' && strpos("loadInformation", $this->settings['image_name']) === FALSE) {
         $this->settings['image_name'] = '<loadInformation>' . $this->settings['image_name'] . '</loadInformation>';
     }
     parent::prepare_for_generateconfig();
     $this->config_file_replacements['$mac'] = strtolower($this->mac);
     $this->config_file_replacements['$model'] = str_replace('SPA', 'spa', strtoupper($this->model));
 }
Esempio n. 6
0
 function prepare_for_generateconfig()
 {
     parent::prepare_for_generateconfig();
     preg_match('/.*(-|\\+)(\\d*):(\\d*)/i', $this->timezone['timezone'], $matches);
     switch ($matches[3]) {
         case '30':
             $point = '.5';
             break;
         default:
             $point = '';
             break;
     }
     $this->timezone['timezone'] = $matches[1] . $matches[2] . $point;
 }
Esempio n. 7
0
 function prepare_for_generateconfig()
 {
     parent::prepare_for_generateconfig();
     $this->mac = strtoupper($this->mac);
     if (!isset($this->settings["vlan"]) or $this->settings["vlan"] === "") {
         $this->settings["vlan"] = "0";
     }
     if (isset($this->DateTimeZone)) {
         $transitions = $this->DateTimeZone->getTransitions();
         // Find the last 2 transitions before (1 year from now).
         // 5 day extra window just in case.
         // this can either be the next two, or the last one (very recent) and the next one.
         while (count($transitions) > 1 && $transitions[2]['ts'] < time() + 360 * 24 * 60 * 60) {
             array_shift($transitions);
         }
         if (count($transitions) == 1) {
             $options['dstoffset'] = '';
             // no more transitions - are there no transitions at all for this timezone (E.g. GMT)?
         } else {
             if ($transitions[0]['isdst']) {
                 $summer = 0;
                 $winter = 1;
             } else {
                 $summer = 1;
                 $winter = 0;
             }
         }
         $this->timezone['gmtoffset'] = $transitions[$summer]['offset'];
         $dst = $transitions[$summer]['offset'] - $transitions[$winter]['offset'];
         // Have to calculate as gmt, because otherwise DST would throw it off - the time the clocks change never
         // happens; the instant we get there, the clocks have moved.
         $summerstart = gmdate("d.m H:i:s", $transitions[$summer]['ts'] + $this->timezone['gmtoffset'] - $dst);
         $summerend = gmdate("d.m H:i:s", $transitions[$winter]['ts'] + $this->timezone['gmtoffset']);
         $this->settings['dstrule'] = "{$dst} {$summerstart} {$summerend}";
     }
 }
Esempio n. 8
0
 function prepare_for_generateconfig()
 {
     //Grandstream likes lower case letters in its mac address
     $this->mac = strtolower($this->mac);
     parent::prepare_for_generateconfig();
 }
Esempio n. 9
0
 function prepare_for_generateconfig()
 {
     $this->mac = strtoupper($this->mac);
     parent::prepare_for_generateconfig();
 }