Changeset 9088
- Timestamp:
- 03/06/10 23:04:02 (2 years ago)
- Files:
-
- freepbx/trunk/upgrades/2.8.0alpha1/tables.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
freepbx/trunk/upgrades/2.8.0alpha1/tables.php
r9082 r9088 32 32 `match_pattern_prefix` VARCHAR( 60 ), 33 33 `match_pattern_pass` VARCHAR( 60 ), 34 `match_cid` VARCHAR( 60 ), 34 35 `prepend_digits` VARCHAR( 100 ), 35 PRIMARY KEY (`route_id`, `match_pattern_prefix`, `match_pattern_pass` )36 PRIMARY KEY (`route_id`, `match_pattern_prefix`, `match_pattern_pass`,`match_cid`,`prepend_digits`) 36 37 ) 37 38 "; … … 135 136 $parts = explode('|',$pattern,2); 136 137 if (count($parts) == 1) { 137 $insert_patterns[] = array($route_id, '', $pattern); 138 $prepend = ''; 139 $exten = $pattern; 138 140 } else { 139 $insert_patterns[] = array($route_id, $parts[0], $parts[1]); 141 $prepend = $parts[0]; 142 $exten = $parts[1]; 143 } 144 $parts = explode('/',$exten,2); 145 if (count($parts) == 1) { 146 $insert_patterns[] = array($route_id, $prepend, $exten, ''); 147 } else { 148 if ($parts[1][0] == "_") { 149 $parts[1] = substr($parts[1],1); 150 } 151 $insert_patterns[] = array($route_id, $prepend, $parts[0], $parts[1]); 140 152 } 141 153 } 142 $compiled = $db->prepare('INSERT INTO `outbound_route_patterns` (`route_id`, `match_pattern_prefix`, `match_pattern_pass` ) values (?,?,?)');154 $compiled = $db->prepare('INSERT INTO `outbound_route_patterns` (`route_id`, `match_pattern_prefix`, `match_pattern_pass`, `match_cid`) values (?,?,?,?)'); 143 155 $result = $db->executeMultiple($compiled,$insert_patterns); 144 156 if(DB::IsError($result)) {
