Changeset 9922

Show
Ignore:
Timestamp:
06/25/10 13:09:36 (2 years ago)
Author:
p_lindheimer
Message:

define sql() if not defined, some install methods does not have this function defined

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/branches/2.8/upgrades/2.8.0rc1/custom-context.php

    r9919 r9922  
    2525    echo $text; 
    2626  } 
     27} 
     28 
     29if (!function_exists('sql')) { 
     30  function sql($sql,$type="query",$fetchmode=null) { 
     31    global $db; 
     32    $results = $db->$type($sql,$fetchmode); 
     33    if(DB::IsError($results)) { 
     34      die($results->getDebugInfo() . "SQL - <br /> $sql" ); 
     35    } 
     36    return $results; 
     37  } 
    2738} 
    2839