Changeset 13808

Show
Ignore:
Timestamp:
03/14/12 17:01:32 (1 year ago)
Author:
p_lindheimer
Message:

fixes #5665 don't try to access queue functions if they are not there

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.10/ivr/functions.inc.php

    r13736 r13808  
    3838      } 
    3939       
    40       //draw a list of ivrs included by any queues 
    41       $queues = queues_list(true); 
    42       $qivr = array(); 
    43       foreach ($queues as $q) { 
    44         $thisq = queues_get($q[0]); 
    45         if ($thisq['context'] && strpos($thisq['context'], 'ivr-') === 0) { 
    46           $qivr[] = str_replace('ivr-', '', $thisq['context']); 
     40      if (function_exists('queues_list')) { 
     41        //draw a list of ivrs included by any queues 
     42        $queues = queues_list(true); 
     43        $qivr = array(); 
     44        foreach ($queues as $q) { 
     45          $thisq = queues_get($q[0]); 
     46          if ($thisq['context'] && strpos($thisq['context'], 'ivr-') === 0) { 
     47            $qivr[] = str_replace('ivr-', '', $thisq['context']); 
     48          } 
    4749        } 
    4850      } 
     
    108110             
    109111            //only display these two lines if the ivr is included in any queues 
    110             if (in_array($ivr['id'], $qivr)) { 
     112            if (function_exists('queues_list') && in_array($ivr['id'], $qivr)) { 
    111113              $ext->add($c, $e['selection'],'', new ext_macro('blkvm-clr')); 
    112114              $ext->add($c, $e['selection'], '', new ext_setvar('__NODEST', '')); 
    113                
    114115            } 
    115116 
  • modules/branches/2.10/ivr/module.xml

    r13748 r13808  
    1111  </description> 
    1212  <changelog> 
     13    *2.10.0.7* #5665 
    1314    *2.10.0.6* #5568 
    1415    *2.10.0.5* #5587, #5588