Changeset 4360 for modules/branches/2.3/core
- Timestamp:
- 07/11/07 23:41:50 (6 years ago)
- Files:
-
- modules/branches/2.3/core/functions.inc.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.3/core/functions.inc.php
r4326 r4360 648 648 function core_devices_list($tech="all") { 649 649 $sql = "SELECT id,description FROM devices"; 650 switch ($tech) { 651 case "iax": 650 switch (strtoupper($tech)) { 652 651 case "IAX": 653 652 $sql .= " WHERE tech = 'iax2'"; 654 653 break; 655 case "iax2":656 654 case "IAX2": 657 case "sip":658 655 case "SIP": 659 case "zap":660 656 case "ZAP": 661 657 $sql .= " WHERE tech = '".strtolower($tech)."'"; 662 658 break; 663 case " all":659 case "ALL": 664 660 default: 665 661 } 662 $sql .= ' ORDER BY id'; 666 663 $results = sql($sql,"getAll"); 667 664 668 665 foreach($results as $result){ 669 666 if (checkRange($result[0])){ 670 $extens[] = array($result[0],$result[1]); 667 $extens[] = array( 668 0=>$result[0], // for backwards compatibility 669 1=>$result[1], 670 'id'=>$result[0], // FETCHMODE_ASSOC emulation 671 'description'=>$result[1], 672 ); 671 673 } 672 674 } 673 675 if (isset($extens)) { 674 sort($extens);675 676 return $extens; 676 677 } else {
