Changeset 8116

Show
Ignore:
Timestamp:
08/24/09 09:33:20 (2 years ago)
Author:
p_lindheimer
Message:

fixes #3821 no mysql escape needed in 1.6

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.6/cidlookup/functions.inc.php

    r8107 r8116  
    118118  global $ext;  // is this the best way to pass this? 
    119119  global $asterisk_conf; 
     120  global $version; 
    120121  switch($engine) { 
    121122    case "asterisk": 
     
    167168 
    168169            case "mysql": 
    169               //Escaping MySQL query - thanks to http://www.asteriskgui.com/index.php?get=utilities-mysqlscape 
    170  
    171               $replacements = array ( 
     170              if (version_compare($version, "1.6", "lt")) { 
     171                //Escaping MySQL query - thanks to http://www.asteriskgui.com/index.php?get=utilities-mysqlscape 
     172                $replacements = array ( 
    172173                  '\\' => '\\\\', 
    173174                  '"' => '\\"', 
     
    179180                  '.' => '\\.', 
    180181                  '|' => '\\|' 
    181               ); 
    182                
    183               $query = str_replace(array_keys($replacements), array_values($replacements), $item['mysql_query']); 
     182                ); 
     183                $query = str_replace(array_keys($replacements), array_values($replacements), $item['mysql_query']); 
     184              } else { 
     185                $query = $item['mysql_query']; 
     186              } 
    184187              $query = str_replace('[NUMBER]', '${CALLERID(num)}', $query); 
    185188 
  • modules/branches/2.6/cidlookup/module.xml

    r8107 r8116  
    1818  <md5sum>d2f2e76738ee52368f7d7dde6670d3cf</md5sum> 
    1919  <changelog> 
    20     *2.6.0.1* #3599 
     20    *2.6.0.1* #3599, #3821 
    2121    *2.6.0.0* localizations, misc 
    2222    *2.5.0.5* #3345