Changeset 5290

Show
Ignore:
Timestamp:
11/25/07 03:21:03 (5 years ago)
Author:
p_lindheimer
Message:

added gabcast_getdest() and gabcast_getdestinfo()

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.4/gabcast/functions.inc.php

    r4041 r5290  
    4040  } else { 
    4141    return null; 
     42  } 
     43} 
     44 
     45function gabcast_getdest($exten) { 
     46  return array('gabcast,'.$exten.',1'); 
     47} 
     48 
     49function gabcast_getdestinfo($dest) { 
     50  global $active_modules; 
     51 
     52  if (substr(trim($dest),0,8) == 'gabcast,') { 
     53    $exten = explode(',',$dest); 
     54    $exten = $exten[1]; 
     55    $thisexten = gabcast_get($exten); 
     56    if (empty($thisexten)) { 
     57      return array(); 
     58    } else { 
     59      $type = isset($active_modules['announcement']['type'])?$active_modules['announcement']['type']:'tool'; 
     60      return array('description' => 'Gabcast Channel : '.$thisexten['channbr'], 
     61                   'edit_url' => 'config.php?type='.$type.'&display=gabcast&ext='.urlencode($exten).'&action=edit', 
     62 
     63                  ); 
     64    } 
     65  } else { 
     66    return false; 
    4267  } 
    4368}