Changeset 7844

Show
Ignore:
Timestamp:
06/20/09 14:04:34 (1 year ago)
Author:
p_lindheimer
Message:

tweaks in dexcriptions and allow is_int to handle negatives

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.6/sipsettings/functions.inc.php

    r7843 r7844  
    3434 
    3535  /* checks if value is an integer */ 
    36   function is_int($value, $item, $message) { 
     36  function is_int($value, $item, $message, $negative=false) { 
    3737    $value = trim($value); 
    38     if ($value != '' && !ctype_digit($value) || $value < 0) { 
    39       $this->errors[] = array('id' => $item, 'value' => $value, 'message' => $message); 
     38    if ($value != '' && $negative) { 
     39      $tmp_value = substr($value,0,1) == '-' ? substr($value,1) : $value; 
     40      if (!ctype_digit($tmp_value)) { 
     41        $this->errors[] = array('id' => $item, 'value' => $value, 'message' => $message); 
     42      } 
     43    } elseif (!$negative) { 
     44      if (!ctype_digit($value) || ($value < 0 )) { 
     45        $this->errors[] = array('id' => $item, 'value' => $value, 'message' => $message); 
     46      } 
    4047    } 
    4148    return $value; 
  • modules/branches/2.6/sipsettings/module.xml

    r7842 r7844  
    99        </menuitems> 
    1010        <description> 
    11                 Use to configure Various Asterisk SIP Settings in the General section of sip.conf. Also includes an auto-configuration tool to determine NAT settings. 
     11                Use to configure Various Asterisk SIP Settings in the General section of sip.conf. Also includes an auto-configuration tool to determine NAT settings. The module assumes Asterisk version 1.4 or higher. Some settings may not exist in Asterisk 1.2 and will be ignored by Asterisk. 
    1212        </description> 
    1313        <publisher>Bandwidth.com</publisher> 
  • modules/branches/2.6/sipsettings/page.sipsettings.php

    r7839 r7844  
    639639  <tr class="jitter-buffer"> 
    640640    <td> 
    641       <a href="#" class="info"><?php echo _("Jitter Buffer Size")?><span><?php echo _("Asterisk: jbmaxsize. Max length of the jitterbuffer in milliseconds.<br /> Asterisk: jbresyncthreshold. Jump in the frame timestamps over which the jitterbuffer is resynchronized. Useful to improve the quality of the voice, with big jumps in/broken timestamps, usually sent from exotic devices and programs.")?></span></a> 
     641      <a href="#" class="info"><?php echo _("Jitter Buffer Size")?><span><?php echo _("Asterisk: jbmaxsize. Max length of the jitterbuffer in milliseconds.<br /> Asterisk: jbresyncthreshold. Jump in the frame timestamps over which the jitterbuffer is resynchronized. Useful to improve the quality of the voice, with big jumps in/broken timestamps, usually sent from exotic devices and programs. Can be set to -1 to disable.")?></span></a> 
    642642    </td> 
    643643    <td>