Changeset 6008

Show
Ignore:
Timestamp:
07/14/08 16:59:08 (4 years ago)
Author:
p_lindheimer
Message:

make sure that ringgoups_list can be called to generate all groups even and add assoc value to list function

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.5/ringgroups/functions.inc.php

    r5281 r6008  
    5252      $ext->addInclude('from-internal-additional','grps'); 
    5353      $contextname = 'ext-group'; 
    54       $ringlist = ringgroups_list(); 
     54      $ringlist = ringgroups_list(true); 
    5555      if (is_array($ringlist)) { 
    5656        foreach($ringlist as $item) { 
     
    182182} 
    183183 
    184 function ringgroups_list() { 
     184function ringgroups_list($get_all=false) { 
    185185  $results = sql("SELECT grpnum, description FROM ringgroups ORDER BY CAST(grpnum as UNSIGNED)","getAll",DB_FETCHMODE_ASSOC); 
    186186  foreach ($results as $result) { 
    187     if (isset($result['grpnum']) && checkRange($result['grpnum'])) { 
    188       $grps[] = array($result['grpnum'], $result['description']); 
     187    if ($get_all || (isset($result['grpnum']) && checkRange($result['grpnum']))) { 
     188      $grps[] = array( 
     189        0 => $result['grpnum'],  
     190        1 => $result['description'], 
     191        'grpnum' => $result['grpnum'],  
     192        'description' => $result['description'], 
     193      ); 
    189194    } 
    190195  } 
     
    215220} 
    216221 
    217 function ringgroup_check_destinations($dest=true) { 
     222function ringgroups_check_destinations($dest=true) { 
    218223  global $active_modules; 
    219224