Changeset 9663
- Timestamp:
- 05/22/10 10:14:54 (3 years ago)
- Files:
-
- freepbx/trunk/amp_conf/htdocs/recordings/includes/asi.php (modified) (2 diffs)
- freepbx/trunk/amp_conf/htdocs/recordings/includes/bootstrap.php (modified) (1 diff)
- freepbx/trunk/amp_conf/htdocs/recordings/includes/callme.php (modified) (1 diff)
- freepbx/trunk/amp_conf/htdocs/recordings/includes/common.php (modified) (4 diffs)
- freepbx/trunk/amp_conf/htdocs/recordings/includes/login.php (modified) (10 diffs)
- freepbx/trunk/amp_conf/htdocs/recordings/modules/settings.module (modified) (6 diffs)
- freepbx/trunk/amp_conf/htdocs/recordings/modules/voicemail.module (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
freepbx/trunk/amp_conf/htdocs/recordings/includes/asi.php
r4993 r9663 104 104 105 105 if (preg_match('/Value/',$buffer)) { 106 $parts = split('',trim($buffer));106 $parts = preg_split('/\s/',trim($buffer)); 107 107 $response = $parts[1]; 108 108 } … … 138 138 139 139 if (preg_match('/Value:/',$buffer)) { 140 $parts = split('Value:',trim($buffer));140 $parts = preg_split('/Value:/',trim($buffer)); 141 141 $response = $parts[1]; 142 142 } freepbx/trunk/amp_conf/htdocs/recordings/includes/bootstrap.php
r9651 r9663 232 232 // check for PEAR 233 233 $include_path = ini_get('include_path'); 234 $buf = split(':|,',$include_path);234 $buf = preg_split('/:|,/',$include_path); 235 235 236 236 $found = 0; freepbx/trunk/amp_conf/htdocs/recordings/includes/callme.php
r7042 r9663 64 64 if (preg_match('/Value: [^\s]*/', $results_elem, $matches) != 0) 65 65 { 66 $parts = split('', trim($matches[0]));66 $parts = preg_split('/\s/', trim($matches[0])); 67 67 $callme_num = $parts[1]; 68 68 } freepbx/trunk/amp_conf/htdocs/recordings/includes/common.php
r9469 r9663 45 45 include_once($path); 46 46 $path_parts = pathinfo($path); 47 list($name,$ext) = split("\.",$path_parts['basename']);47 list($name,$ext) = preg_split("/\./",$path_parts['basename']); 48 48 49 49 // check for module and get rank … … 55 55 $found = 0; 56 56 if ($ARI_ADMIN_MODULES) { 57 $admin_modules = split(',',$ARI_ADMIN_MODULES);57 $admin_modules = preg_split('/,/',$ARI_ADMIN_MODULES); 58 58 foreach ($admin_modules as $key => $value) { 59 59 if ($name==$value) { … … 67 67 $disabled = 0; 68 68 if ($ARI_DISABLED_MODULES) { 69 $disabled_modules = split(',',$ARI_DISABLED_MODULES);69 $disabled_modules = preg_split('/,/',$ARI_DISABLED_MODULES); 70 70 foreach ($disabled_modules as $key => $value) { 71 71 if ($name==$value) { … … 145 145 146 146 $include = 0; 147 $files = split(';',$AMP_FUNCTIONS_FILES);147 $files = preg_split('/;/',$AMP_FUNCTIONS_FILES); 148 148 foreach ($files as $file) { 149 149 if (is_file($file)) { freepbx/trunk/amp_conf/htdocs/recordings/includes/login.php
r9467 r9663 106 106 107 107 $include_filename = ''; 108 $parts = split('',$line);108 $parts = preg_split('/\s/',$line); 109 109 if (isset($parts[1])) { 110 110 $include_filename = trim($parts[1]); … … 136 136 // check for user and process 137 137 unset($value); 138 $parts = split('=>',$line);138 $parts = preg_split('/=>/',$line); 139 139 if (isset($parts[0])) { 140 140 $var = $parts[0]; … … 145 145 $var = trim($var); 146 146 if ($var==$username && $value) { 147 $buf = split(',',$value);147 $buf = preg_split('/,/',$value); 148 148 if ($buf[0]==$password) { 149 149 … … 163 163 } 164 164 165 $options = split('\|',$buf[4]);165 $options = preg_split('/\|/',$buf[4]); 166 166 foreach ($options as $option) { 167 $opt_buf = split('=',$option);167 $opt_buf = preg_split('/=/',$option); 168 168 $voicemail_email[$opt_buf[0]] = trim($opt_buf[1]); 169 169 } … … 171 171 $admin = 0; 172 172 if ($ARI_ADMIN_EXTENSIONS) { 173 $extensions = split(',',$ARI_ADMIN_EXTENSIONS);173 $extensions = preg_split('/,/',$ARI_ADMIN_EXTENSIONS); 174 174 foreach ($extensions as $key => $value) { 175 175 if ($extension==$value) { … … 182 182 $admin_callmonitor = 0; 183 183 if ($CALLMONITOR_ADMIN_EXTENSIONS) { 184 $extensions = split(',',$CALLMONITOR_ADMIN_EXTENSIONS);184 $extensions = preg_split('/,/',$CALLMONITOR_ADMIN_EXTENSIONS); 185 185 foreach ($extensions as $key => $value) { 186 186 if ($value=='all' || $extension==$value) { … … 209 209 foreach($ASTERISK_PROTOCOLS as $protocol => $value) { 210 210 211 $config_files = split(';',$value['config_files']);211 $config_files = preg_split('/;/',$value['config_files']); 212 212 foreach ($config_files as $config_file) { 213 213 … … 218 218 219 219 unset($value); 220 $parts = split('=',$line);220 $parts = preg_split('/=/',$line); 221 221 if (isset($parts[0])) { 222 222 $var = trim($parts[0]); … … 242 242 $admin = 0; 243 243 if ($ARI_ADMIN_EXTENSIONS) { 244 $extensions = split(',',$ARI_ADMIN_EXTENSIONS);244 $extensions = preg_split('/,/',$ARI_ADMIN_EXTENSIONS); 245 245 foreach ($extensions as $key => $value) { 246 246 if ($extension==$value) { … … 253 253 $admin_callmonitor = 0; 254 254 if ($CALLMONITOR_ADMIN_EXTENSIONS) { 255 $extensions = split(',',$CALLMONITOR_ADMIN_EXTENSIONS);255 $extensions = preg_split('/,/',$CALLMONITOR_ADMIN_EXTENSIONS); 256 256 foreach ($extensions as $key => $value) { 257 257 if ($value=='all' || $extension==$value) { freepbx/trunk/amp_conf/htdocs/recordings/modules/settings.module
r9475 r9663 444 444 foreach ($lines as $key => $line) { 445 445 unset($value); 446 list($var,$value) = split('=>',$line);446 list($var,$value) = preg_split('/=>/',$line); 447 447 $var = trim($var); 448 448 if ($var==$exten && $value) { 449 449 // write out line with password change 450 $buf = split(',',$value);450 $buf = preg_split('/,/',$value); 451 451 $buf[0] = $voicemail_password; 452 452 $line = $var . " => " . join(',', $buf); … … 531 531 foreach ($lines as $key => $line) { 532 532 unset($value); 533 list($var,$value) = split('=>',$line);533 list($var,$value) = preg_split('/=>/',$line); 534 534 $var = trim($var); 535 535 if ($var==$exten && $value) { 536 536 // write out line with voicemail email change 537 $buf = split(',',$value);537 $buf = preg_split('/,/',$value); 538 538 $buf[2] = $voicemail_email_address; 539 539 $buf[3] = $voicemail_pager_address; … … 606 606 if (preg_match("/include/i",$line)) { 607 607 $include_filename = ''; 608 $parts = split('',$line);608 $parts = preg_split('/\s/',$line); 609 609 if (isset($parts[1])) { 610 610 $include_filename = trim($parts[1]); … … 631 631 // check for user and process 632 632 unset($value); 633 $parts = split('=>',$line);633 $parts = preg_split('/=>/',$line); 634 634 if (isset($parts[0])) { 635 635 $var = $parts[0]; … … 640 640 $var = trim($var); 641 641 if ($var==$exten && $value) { 642 $buf = split(',',$value);642 $buf = preg_split('/,/',$value); 643 643 //if ($buf[0]==$password) { 644 644 // authenticated … … 663 663 $voicemail_pager_enable = 0; 664 664 } 665 $options = split('\|',$buf[4]);665 $options = preg_split('/\|/',$buf[4]); 666 666 foreach ($options as $option) { 667 $opt_buf = split('=',$option);667 $opt_buf = preg_split('/=/',$option); 668 668 $voicemail_opts[$opt_buf[0]] = trim($opt_buf[1]); 669 669 } freepbx/trunk/amp_conf/htdocs/recordings/modules/voicemail.module
r9455 r9663 81 81 82 82 // make folder list 83 $paths = split(';',$ASTERISK_VOICEMAIL_PATH);83 $paths = preg_split('/;/',$ASTERISK_VOICEMAIL_PATH); 84 84 $i = 0; 85 85 while ($ASTERISK_VOICEMAIL_FOLDERS[$i]) { … … 189 189 190 190 $mailbox_rx = getArgument($args,'mailbox_rx'); 191 list($context_rx,$extension_rx) = split('/',$mailbox_rx);191 list($context_rx,$extension_rx) = preg_split('/\//',$mailbox_rx); 192 192 if ($extension_rx=='') { 193 193 $_SESSION['ari_error'] … … 214 214 // Check email address(es) and construct address list for TO field. 215 215 // TO 216 $email_list = split(",", $em_to);216 $email_list = preg_split("/,/", $em_to); 217 217 foreach ($email_list as $list_elem) { 218 218 $list_elem = trim($list_elem); … … 373 373 $sort = ($sort=='' || strtolower($sort) == 'desc') ? 'desc' : 'asc'; 374 374 375 $paths = split(';',$ASTERISK_VOICEMAIL_PATH);375 $paths = preg_split('/;/',$ASTERISK_VOICEMAIL_PATH); 376 376 377 377 $displayname = $_SESSION['ari_user']['displayname']; … … 432 432 // get username and add to options 433 433 if (preg_match("/\=\>/i",$line)) { 434 list($username,$value) = split('=>',$line);434 list($username,$value) = preg_split('/=>/',$line); 435 435 $username = trim($username); 436 436 if ($username!=$_SESSION['ari_user']['extension']) { 437 437 //$ext_array[] = $username . "|" . $forwardContext; 438 list(,$real_name,) = split(",",$value,3);438 list(,$real_name,) = preg_split("/,/",$value,3); 439 439 $ext_array[] = $real_name . "|" . $username . "|" . $forwardContext; 440 440 } … … 755 755 foreach ($lines as $key => $line) { 756 756 unset($value); 757 list($key,$value) = split('=',$line);757 list($key,$value) = preg_split('/=/',$line); 758 758 if ($value) { 759 759 … … 826 826 $path = fixPathSlash($path_parts['dirname']); 827 827 828 list($name,$ext) = split("\.",$path_parts['basename']);828 list($name,$ext) = preg_split("/\./",$path_parts['basename']); 829 829 830 830 // delete all related files using a wildcard … … 863 863 864 864 // recieving path 865 $paths = split(';',$ASTERISK_VOICEMAIL_PATH);865 $paths = preg_split('/;/',$ASTERISK_VOICEMAIL_PATH); 866 866 $path_rx = appendPath($paths[0],$context_rx); 867 867 if (!is_dir($path_rx)) { … … 901 901 //so that files like msg0000.7025f35d463ebbafa101db8a88c71b681aa8443d.mp3 902 902 //don't interfere with finding the true last file number 903 list($name,$ext) = split("\.",$path_parts['basename'],2);903 list($name,$ext) = preg_split("/\./",$path_parts['basename'],2); 904 904 $num = preg_replace("/[a-zA-Z]/",'', $name); 905 905 if ($num > $lastNum) { … … 929 929 $path = $path_parts['dirname']; 930 930 $path = fixPathSlash($path); 931 list($name,$ext) = split("\.",$path_parts['basename']);931 list($name,$ext) = preg_split("/\./",$path_parts['basename']); 932 932 if (is_dir($path)) { 933 933 … … 942 942 //so that files like msg0000.7025f35d463ebbafa101db8a88c71b681aa8443d.mp3 943 943 //don't get clobbered by preg_replace() of digits 944 list($name,$ext) = split("\.",$path_parts['basename'],2);944 list($name,$ext) = preg_split("/\./",$path_parts['basename'],2); 945 945 $folder_rx = preg_replace("/\d+/",sprintf("%0" . $lastNumLen . "d",$lastNum),$name) . "." . $ext; 946 946 $dst = appendPath($path_rx,$folder_rx); … … 1019 1019 foreach ($lines as $key => $line) { 1020 1020 unset($value); 1021 list($key,$value) = split('=',$line);1021 list($key,$value) = preg_split('/=/',$line); 1022 1022 $key = trim($key); 1023 1023 $value = trim($value);
