Changeset 4360

Show
Ignore:
Timestamp:
07/11/07 20:41:50 (1 year ago)
Author:
gregmac
Message:

Import dashboard module

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.3/core/functions.inc.php

    r4326 r4360  
    648648function core_devices_list($tech="all") { 
    649649        $sql = "SELECT id,description FROM devices"; 
    650         switch ($tech) { 
    651                 case "iax": 
     650        switch (strtoupper($tech)) { 
    652651                case "IAX": 
    653652                        $sql .= " WHERE tech = 'iax2'"; 
    654653                        break; 
    655                 case "iax2": 
    656654                case "IAX2": 
    657                 case "sip": 
    658655                case "SIP": 
    659                 case "zap": 
    660656                case "ZAP": 
    661657                        $sql .= " WHERE tech = '".strtolower($tech)."'"; 
    662658                        break; 
    663                 case "all": 
     659                case "ALL": 
    664660                default: 
    665661        } 
     662        $sql .= ' ORDER BY id'; 
    666663        $results = sql($sql,"getAll"); 
    667664 
    668665        foreach($results as $result){ 
    669666                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                        ); 
    671673                } 
    672674        } 
    673675        if (isset($extens)) { 
    674                 sort($extens); 
    675676                return $extens; 
    676677        } else {