Changeset 10770

Show
Ignore:
Timestamp:
12/29/10 22:50:01 (2 years ago)
Author:
p_lindheimer
Message:

Merged revisions 10739 via svnmerge from
http://www.freepbx.org/v2/svn/freepbx/trunk

........

r10739 | p_lindheimer | 2010-12-28 13:10:49 -0800 (Tue, 28 Dec 2010) | 1 line


fixes #4719 don't redeclare sql funcition, this requires re-rolling 2.8 tarball on main site

........

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/branches/2.8

    • Property svnmerge-integrated changed from /freepbx/branches/2.7:1-10414 /freepbx/trunk:1-9714,9744,9768,10150-10151,10215 to /freepbx/branches/2.7:1-10414 /freepbx/trunk:1-9714,9744,9768,10150-10151,10215,10739
  • freepbx/branches/2.8/upgrades/2.8.0/custom-context.php

    r9922 r10770  
    2525    echo $text; 
    2626  } 
    27 } 
    28  
    29 if (!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   } 
    3827} 
    3928 
     
    6655         */ 
    6756        $sql = "SELECT a.*, b.seq FROM `outbound_routes` a JOIN `outbound_route_sequence` b ON a.route_id = b.route_id ORDER BY `seq`"; 
    68         $routes = sql($sql,"getAll",DB_FETCHMODE_ASSOC); 
     57        $routes = $db->getAll($sql,DB_FETCHMODE_ASSOC); 
     58        if(DB::IsError($routes)) { 
     59          die($routes->getDebugInfo() . "SQL - <br /> $sql" ); 
     60        } 
    6961        $newincludes = array(); 
    7062        foreach ($includes as $inc => $myinclude) { 
  • freepbx/branches/2.8/upgrades/2.8.0alpha1/tables.php

    r9784 r10770  
    22global $amp_conf; 
    33global $db; 
    4  
    5 if (!function_exists('sql')) { 
    6   function sql($sql,$type="query",$fetchmode=null) { 
    7     global $db; 
    8     $results = $db->$type($sql,$fetchmode); 
    9     if(DB::IsError($results)) { 
    10       die($results->getDebugInfo() . "SQL - <br /> $sql" ); 
    11     } 
    12     return $results; 
    13   } 
    14 } 
    154 
    165/*  fix manager.conf settings for older manager.conf files being upgraded as new permissions are needed for later releases of Asterisk 
     
    209198{ 
    210199  global $amp_conf; 
     200  global $db; 
    211201   
    212202  if ($amp_conf["AMPDBENGINE"] == "sqlite3")  
    213203  { 
    214     $results = sql("SELECT DISTINCT context FROM extensions WHERE context LIKE 'outrt-%' ORDER BY context ","getAll"); 
     204    $sql = "SELECT DISTINCT context FROM extensions WHERE context LIKE 'outrt-%' ORDER BY context "; 
     205    $results = $db->getAll($sql); 
     206    if(DB::IsError($results)) { 
     207      die($results->getDebugInfo() . "SQL - <br /> $sql" ); 
     208    } 
     209 
    215210    foreach( array_keys($results) as $idx ) 
    216211    { 
     
    220215  else 
    221216  { 
    222     $results = sql("SELECT DISTINCT SUBSTRING(context,7) FROM extensions WHERE context LIKE 'outrt-%' ORDER BY context ","getAll"); 
     217    $sql = "SELECT DISTINCT SUBSTRING(context,7) FROM extensions WHERE context LIKE 'outrt-%' ORDER BY context "; 
     218    $results = $db->getAll($sql); 
     219    if(DB::IsError($results)) { 
     220      die($results->getDebugInfo() . "SQL - <br /> $sql" ); 
     221    } 
    223222  } 
    224223  return $results; 
  • freepbx/branches/2.8/upgrades/2.8.0alpha2/tables.php

    r10389 r10770  
    22global $amp_conf; 
    33global $db; 
    4  
    5 if (!function_exists('sql')) { 
    6   function sql($sql,$type="query",$fetchmode=null) { 
    7     global $db; 
    8     $results = $db->$type($sql,$fetchmode); 
    9     if(DB::IsError($results)) { 
    10       die($results->getDebugInfo() . "SQL - <br /> $sql" ); 
    11     } 
    12     return $results; 
    13   } 
    14 } 
    154 
    165/*  fix manager.conf settings for older manager.conf files being upgraded as new permissions are needed for later releases of Asterisk 
     
    6958  out(_("created")); 
    7059  outn(_("migrating rules..")); 
    71   $patterns = sql('SELECT * FROM trunks_dialpatterns','getAll',DB_FETCHMODE_ASSOC); 
     60  $sql = 'SELECT * FROM trunks_dialpatterns'; 
     61  $patterns = $db->getAll($sql,DB_FETCHMODE_ASSOC); 
     62  if(DB::IsError($patterns)) { 
     63    die($patterns->getDebugInfo() . "SQL - <br /> $sql" ); 
     64  } 
    7265  $patterns_insert = array(); 
    7366  foreach ($patterns as $key => $pattern_rec) { 
  • freepbx/branches/2.8/upgrades/2.8.0rc1/custom-context.php

    r9922 r10770  
    2525    echo $text; 
    2626  } 
    27 } 
    28  
    29 if (!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   } 
    3827} 
    3928 
     
    6655         */ 
    6756        $sql = "SELECT a.*, b.seq FROM `outbound_routes` a JOIN `outbound_route_sequence` b ON a.route_id = b.route_id ORDER BY `seq`"; 
    68         $routes = sql($sql,"getAll",DB_FETCHMODE_ASSOC); 
     57        $routes = $db->getAll($sql,DB_FETCHMODE_ASSOC); 
     58        if(DB::IsError($routes)) { 
     59          die($routes->getDebugInfo() . "SQL - <br /> $sql" ); 
     60        } 
     61 
    6962        $newincludes = array(); 
    7063        foreach ($includes as $inc => $myinclude) {