Show
Ignore:
Timestamp:
05/16/11 11:24:54 (2 years ago)
Author:
escape2mtns
Message:

fix func redefinition compatibility with FreePBX 2.9

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • contributed_modules/modules/smartroutes/bin/clean_calltracking.php

    r11706 r12077  
    199199} 
    200200 
    201 function out($text) { 
    202   //echo $text."\n"; 
    203 
    204  
    205 function outn($text) { 
    206   //echo $text; 
    207 
    208  
    209 function error($text) { 
    210   echo "[ERROR] ".$text."\n"; 
    211 
    212  
    213 function fatal($text, $extended_text="", $type="FATAL") { 
    214   global $db; 
    215  
    216   echo "[$type] ".$text." ".$extended_text."\n"; 
    217  
    218   if(!DB::isError($db)) { 
    219     $nt = notifications::create($db); 
    220     $nt->add_critical('cron_manager', $type, $text, $extended_text); 
    221   } 
    222  
    223   exit(1); 
    224 
    225  
    226 function debug($text) { 
    227   global $debug; 
    228  
    229   if ($debug) echo "[DEBUG-preDB] ".$text."\n"; 
     201if (!function_exists('out')) { 
     202  function out($text) { 
     203    //echo $text."\n"; 
     204  } 
     205
     206   
     207if (!function_exists('outn')) {  
     208  function outn($text) { 
     209    //echo $text; 
     210  } 
     211
     212   
     213if (!function_exists('error')) { 
     214  function error($text) { 
     215    echo "[ERROR] ".$text."\n"; 
     216  } 
     217
     218   
     219if (!function_exists('fatal')) { 
     220  function fatal($text, $extended_text="", $type="FATAL") { 
     221    global $db; 
     222   
     223    echo "[$type] ".$text." ".$extended_text."\n"; 
     224   
     225    if(!DB::isError($db)) { 
     226      $nt = notifications::create($db); 
     227      $nt->add_critical('cron_manager', $type, $text, $extended_text); 
     228    } 
     229   
     230    exit(1); 
     231  } 
     232
     233   
     234if (!function_exists('debug')) { 
     235  function debug($text) { 
     236    global $debug; 
     237   
     238    if ($debug) echo "[DEBUG-preDB] ".$text."\n"; 
     239  } 
    230240} 
    231241