Changeset 6143
- Timestamp:
- 07/23/08 14:21:54 (4 years ago)
- Files:
-
- modules/branches/2.4 (modified) (1 prop)
- modules/branches/2.4/core/functions.inc.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.4
- Property svnmerge-integrated changed from /modules/branches/2.3:1-5233,5245,5333,5336 /modules/branches/2.5:1-5852,5880,5930,5995,6016-6017,6030-6031 to /modules/branches/2.3:1-5233,5245,5333,5336 /modules/branches/2.5:1-5852,5880,5930,5995,6016-6017,6030-6031,6142
modules/branches/2.4/core/functions.inc.php
r5881 r6143 1820 1820 $thisUser = core_users_get($user); 1821 1821 if(isset($thisUser['voicemail']) && ($thisUser['voicemail'] != "novm")) { 1822 if(empty($thisUser['voicemail'])) 1822 if(empty($thisUser['voicemail'])) { 1823 1823 $vmcontext = "default"; 1824 else1824 } else { 1825 1825 $vmcontext = $thisUser['voicemail']; 1826 } 1826 1827 1827 1828 //voicemail symlink … … 2649 2650 if ($astman) { 2650 2651 $ud = $astman->database_get("AMPUSER",$extension."/device"); 2652 $current_vmcontext = $astman->database_get("AMPUSER",$extension."/voicemail"); 2653 $new_vmcontext = isset($vars['vmcontext']) ? $vars['vmcontext'] : 'novm'; 2651 2654 $vars['device'] = $ud; 2652 2655 } else { … … 2675 2678 core_users_del($extension, true); 2676 2679 core_users_add($vars, true); 2680 2681 // If the vmcontext has changed, we need to change all the links. In extension mode, the link 2682 // to the current fixed device will get changed, but none others will 2683 // 2684 if ($current_vmcontext != $new_vmcontext) { 2685 $user_devices = explode('&',$ud); 2686 foreach ($user_devices as $user_device) { 2687 exec("rm -f /var/spool/asterisk/voicemail/device/".$user_device); 2688 if ($new_context != 'novm') { 2689 exec("/bin/ln -s /var/spool/asterisk/voicemail/".$new_vmcontext."/".$extension."/ /var/spool/asterisk/voicemail/device/".$user_device); 2690 } 2691 } 2692 } 2677 2693 } 2678 2694 return true; 2679 2680 2695 } 2681 2696
