Changeset 6969

Show
Ignore:
Timestamp:
10/12/08 14:15:16 (2 months ago)
Author:
p_lindheimer
Message:

Auto Check-in of any outstanding patches

Files:

Legend:

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

    r6960 r6969  
    3838                return false; 
    3939        } 
     40} 
     41 
     42function callback_check_destinations($dest=true) { 
     43        global $active_modules; 
     44 
     45        $destlist = array(); 
     46        if (is_array($dest) && empty($dest)) { 
     47                return $destlist; 
     48        } 
     49        $sql = "SELECT callback_id, destination, description FROM callback "; 
     50        if ($dest !== true) { 
     51                $sql .= "WHERE destination in ('".implode("','",$dest)."')"; 
     52        } 
     53        $results = sql($sql,"getAll",DB_FETCHMODE_ASSOC); 
     54 
     55        $type = isset($active_modules['callback']['type'])?$active_modules['callback']['type']:'setup'; 
     56 
     57        foreach ($results as $result) { 
     58                $thisdest = $result['destination']; 
     59                $thisid   = $result['callback_id']; 
     60                $destlist[] = array( 
     61                        'dest' => $thisdest, 
     62                        'description' => sprintf(_("Callback: %s"),$result['description']), 
     63                        'edit_url' => 'config.php?display=callback&type='.$type.'&itemid='.urlencode($thisid), 
     64                ); 
     65        } 
     66        return $destlist; 
    4067} 
    4168 
Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads