Changeset 5197

Show
Ignore:
Timestamp:
11/03/07 13:14:12 (6 years ago)
Author:
p_lindheimer
Message:

Merged revisions 5186-5188,5192,5194-5196 via svnmerge from
http://svn.freepbx.org/modules/branches/2.3

........

r5186 | p_lindheimer | 2007-11-02 15:35:24 -0700 (Fri, 02 Nov 2007) | 1 line


#2411, #2402 - fix bug so editing a device does not logout the user, and add default_user field along with fix to macro-user-logoff so that default user information is retained when a user logs off, and fix issue that was allowing a blank extension to be created when javascript was disabled or bugs existed which would make extensions stop working on a system

........

r5187 | p_lindheimer | 2007-11-02 15:47:03 -0700 (Fri, 02 Nov 2007) | 1 line


#2359 deal with other special characters in fax did during fax processing

........

r5188 | p_lindheimer | 2007-11-02 15:57:34 -0700 (Fri, 02 Nov 2007) | 1 line


move Macro(user-callerid) to be called with each conf to accomodate future language settings

........

r5192 | p_lindheimer | 2007-11-02 18:04:40 -0700 (Fri, 02 Nov 2007) | 1 line


#2455 allow + and other valid dial digits

........

r5196 | p_lindheimer | 2007-11-03 09:33:45 -0700 (Sat, 03 Nov 2007) | 1 line


fix to r5186 (#2411, #2402): when editing device into a fixed device, reset user. When changing a device from a fixed to adhoc, reset user

........

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.4

    • Property svnmerge-integrated changed from /modules/branches/2.3:1-5080,5111,5128,5130,5155,5157,5159,5163,5165 to /modules/branches/2.3:1-5080,5111,5128,5130,5155,5157,5159,5163,5165,5186-5188,5190,5192,5194-5196
  • modules/branches/2.4/blacklist/module.xml

    r4941 r5197  
    22  <rawname>blacklist</rawname> 
    33  <name>Blacklist</name> 
    4   <version>1.1.3.5</version> 
     4  <version>1.1.3.6</version> 
    55  <type>setup</type> 
    66  <category>Inbound Call Control</category> 
     
    99  </menuitems> 
    1010  <changelog> 
     11    *1.1.3.6* #2455 allow + and other valid dial digits 
    1112    *1.1.3.5* changed categories 
    1213    *1.1.3.4* bump for rc1 
  • modules/branches/2.4/blacklist/page.blacklist.php

    r4592 r5197  
    106106  </tr> 
    107107  </table> 
    108  
    109108<script language="javascript"> 
    110109<!-- 
     
    113112theForm.number.focus(); 
    114113 
     114function isDialDigitsPlus(s) 
     115{ 
     116  var i; 
     117 
     118  if (isEmpty(s)) { 
     119    return false; 
     120  } 
     121 
     122  for (i = 0; i < s.length; i++) { 
     123    var c = s.charAt(i); 
     124 
     125    if (!isDialDigitChar(c) && (c != "+")) return false; 
     126  } 
     127  return true; 
     128} 
     129 
     130 
    115131function edit_onsubmit() { 
    116132  defaultEmptyOK = false; 
    117         if (!isInteger(theForm.number.value)) 
     133        if (!isDialDigitsPlus(theForm.number.value)) 
    118134                return warnInvalid(theForm.number, "Please enter a valid Number"); 
    119135  return true; 
  • modules/branches/2.4/conferences/functions.inc.php

    r5167 r5197  
    5353         
    5454        // Start the conference 
    55         $ext->add($contextname, 'STARTMEETME', '', new ext_macro('user-callerid')); 
    5655        $ext->add($contextname, 'STARTMEETME', '', new ext_meetme('${MEETME_ROOMNUM}','${MEETME_OPTS}','${PIN}')); 
    5756        $ext->add($contextname, 'STARTMEETME', '', new ext_hangup('')); 
     
    7069           
    7170          // entry point 
     71          $ext->add($contextname, $roomnum, '', new ext_macro('user-callerid')); 
    7272          $ext->add($contextname, $roomnum, '', new ext_setvar('MEETME_ROOMNUM',$roomnum)); 
    7373          $ext->add($contextname, $roomnum, '', new ext_gotoif('$["${DIALSTATUS}" = "ANSWER"]',($roomuserpin == '' && $roomadminpin == '' ? 'USER' : 'READPIN')));       
  • modules/branches/2.4/conferences/module.xml

    r5168 r5197  
    22  <rawname>conferences</rawname> 
    33  <name>Conferences</name> 
    4   <version>1.2.1.2</version> 
     4  <version>1.2.1.3</version> 
    55  <type>setup</type> 
    66  <category>Internal Options &amp; Configuration</category> 
    77  <description>Allow creation of conference rooms (meet-me) where multiple people can talk together.</description> 
    88  <changelog> 
     9    *1.2.1.3* move Macro(user-callerid) to be called with each conf to accomodate future language settings 
    910    *1.2.1.2* add call to Macro(user-callerid) to get proper CID in Meetme Conference 
    1011    *1.2.1.1* bump for rc1 
  • modules/branches/2.4/core/bin/fax-process.pl

    r4110 r5197  
    5353    $subject = $tmp; 
    5454  } 
    55   # Convert %20 to spaces, leave anythign else alone. 
     55  # Convert %2x to proper characters, leave anything else alone. 
    5656  $subject =~ s/\%20/ /g; 
     57    $subject =~ s/\%21/\!/g; 
     58    $subject =~ s/\%22/\"/g; 
     59    $subject =~ s/\%23/\#/g; 
     60    $subject =~ s/\%24/\$/g; 
     61    $subject =~ s/\%25/\%/g; 
     62    $subject =~ s/\%26/\&/g; 
     63    $subject =~ s/\%27/\'/g; 
     64    $subject =~ s/\%28/\(/g; 
     65    $subject =~ s/\%29/\)/g; 
     66    $subject =~ s/\%2a/\*/g; 
     67    $subject =~ s/\%2A/\*/g; 
     68    $subject =~ s/\%2b/\+/g; 
     69    $subject =~ s/\%2B/\+/g; 
     70    $subject =~ s/\%2c/\,/g; 
     71    $subject =~ s/\%2C/\,/g; 
     72    $subject =~ s/\%2d/\-/g; 
     73    $subject =~ s/\%2D/\-/g; 
     74    $subject =~ s/\%2e/\./g; 
     75    $subject =~ s/\%2E/\./g; 
     76    $subject =~ s/\%2f/\//g; 
     77    $subject =~ s/\%2F/\//g; 
    5778  } elsif ($cmd eq "--type") { 
    5879  my $tmp = shift @ARGV; 
  • modules/branches/2.4/core/etc/extensions.conf

    r5156 r5197  
    899899exten => s,7,Set(DB(AMPUSER/${DEVAMPUSER}/device)=${AMPUSERDEVICES}) 
    900900; reset device -> user mapping 
    901 exten => s,8,Set(DB(DEVICE/${CALLERID(number)}/user)=none) 
    902 exten => s,9,Playback(vm-goodbye) 
     901exten => s,8,Set(DEFAULTUSER=${DB(DEVICE/${CALLERID(number)}/default_user)}) 
     902exten => s,9,Set(DB(DEVICE/${CALLERID(number)}/user)=${IF($["${DEFAULTUSER}"=""]?none:${DEFAULTUSER})}) 
     903exten => s,10,Playback(vm-goodbye) 
    903904 
    904905exten => s-FIXED,1,NoOp(Device is FIXED and cannot be logged out of) 
  • modules/branches/2.4/core/functions.inc.php

    r5169 r5197  
    750750 
    751751 
    752 function core_devices_add($id,$tech,$dial,$devicetype,$user,$description,$emergency_cid=null){ 
     752function core_devices_add($id,$tech,$dial,$devicetype,$user,$description,$emergency_cid=null,$editmode=false){ 
    753753  global $amp_conf; 
    754754  global $currentFile; 
     
    756756 
    757757  $display = isset($_REQUEST['display'])?$_REQUEST['display']:''; 
     758 
     759  if (trim($id) == '' ) { 
     760    if ($display != 'extensions') { 
     761      echo "<script>javascript:alert('"._("You must put in a device id")."');</script>"; 
     762    } 
     763    return false; 
     764  } 
    758765   
    759766  //ensure this id is not already in use 
     
    801808  //add details to astdb 
    802809  if ($astman) { 
     810    // if adding or editting a fixed device, user property should always be set 
     811    if ($devicetype == 'fixed' || !$editmode) { 
     812      $astman->database_put("DEVICE",$id."/user",$user); 
     813    } 
     814    // If changing from a fixed to an adhoc, the user property should be intialized 
     815    // to the new default, not remain as the previous fixed user 
     816    if ($editmode) { 
     817      $previous_type = $astman->database_get("DEVICE",$id."/type"); 
     818      if ($previous_type == 'fixed' && $devicetype == 'adhoc') { 
     819        $astman->database_put("DEVICE",$id."/user",$user); 
     820      } 
     821    } 
    803822    $astman->database_put("DEVICE",$id."/dial",$dial); 
    804823    $astman->database_put("DEVICE",$id."/type",$devicetype); 
    805     $astman->database_put("DEVICE",$id."/user",$user); 
     824    $astman->database_put("DEVICE",$id."/default_user",$user); 
    806825    if(!empty($emergency_cid)) 
    807826      $astman->database_put("DEVICE",$id."/emergency_cid","\"".$emergency_cid."\""); 
     
    851870} 
    852871 
    853 function core_devices_del($account){ 
     872function core_devices_del($account,$editmode=false){ 
    854873  global $amp_conf; 
    855874  global $currentFile; 
     
    882901      } 
    883902    } 
    884     $astman->database_del("DEVICE",$account."/dial"); 
    885     $astman->database_del("DEVICE",$account."/type"); 
    886     $astman->database_del("DEVICE",$account."/user"); 
    887     $astman->database_del("DEVICE",$account."/emergency_cid"); 
     903    if (! $editmode) { 
     904      $astman->database_del("DEVICE",$account."/dial"); 
     905      $astman->database_del("DEVICE",$account."/type"); 
     906      $astman->database_del("DEVICE",$account."/user"); 
     907      $astman->database_del("DEVICE",$account."/default_user"); 
     908      $astman->database_del("DEVICE",$account."/emergency_cid"); 
     909    } 
    888910 
    889911    //delete from devices table 
     
    13151337 
    13161338  $thisexten = isset($thisexten) ? $thisexten : ''; 
     1339 
     1340  if (trim($thisexten) == '' ) { 
     1341    echo "<script>javascript:alert('"._("You must put in an extension (or user) number")."');</script>"; 
     1342    return false; 
     1343  } 
    13171344 
    13181345  //ensure this id is not already in use 
     
    31883215      // really bad hack - but if core_users_edit fails, want to stop core_devices_edit 
    31893216      if (!isset($GLOBALS['abort']) || $GLOBALS['abort'] !== true) { 
    3190         core_devices_del($extdisplay); 
    3191         core_devices_add($deviceid,$tech,$devinfo_dial,$devicetype,$deviceuser,$description,$emergency_cid); 
     3217        core_devices_del($extdisplay,true); 
     3218        core_devices_add($deviceid,$tech,$devinfo_dial,$devicetype,$deviceuser,$description,$emergency_cid,true); 
    31923219        needreload(); 
    31933220        redirect_standard_continue('extdisplay');