Changeset 10294

Show
Ignore:
Timestamp:
09/20/10 09:46:45 (3 years ago)
Author:
mbrevda
Message:

re closes #4545 undose re #1963 - remove mysql_real_escape_string function from header.php

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/trunk/amp_conf/htdocs/admin/header.php

    r10288 r10294  
    116116} 
    117117 
    118  
    119  
    120 // systems running on sqlite3 (or pgsql) this function is not available 
    121 // instead of changing the whole code, lets hack our own version of this function. 
    122 // according to the documentation found here: http://il2.php.net/mysql_real_escape_string 
    123 // this shold be enough. 
    124 // Fixes ticket: http://freepbx.org/trac/ticket/1963 
    125 if (!function_exists('mysql_real_escape_string')) { 
    126   function mysql_real_escape_string($str) { 
    127     $str = str_replace( "\x00", "\\" . "\x00", $str ); 
    128     $str = str_replace( "\x1a", "\\" . "\x1a", $str ); 
    129     $str = str_replace( "\n" , "\\". "\n"    , $str ); 
    130     $str = str_replace( "\r" , "\\". "\r"    , $str ); 
    131     $str = str_replace( "\\" , "\\". "\\"    , $str ); 
    132     $str = str_replace( "'" , "''"           , $str ); 
    133     $str = str_replace( '"' , '""'           , $str ); 
    134     return $str; 
    135   } 
    136 } 
    137118?> 
  • modules/branches/2.9/daynight/page.daynight.php

    r9786 r10294  
    2222$night_recording_id = isset($_POST['night_recording_id']) ? $_POST['night_recording_id'] :  ''; 
    2323 
    24 isset($_REQUEST['itemid'])?$itemid=mysql_real_escape_string($_REQUEST['itemid']):$itemid=''; 
     24isset($_REQUEST['itemid'])?$itemid=$db->escapeSimple($_REQUEST['itemid']):$itemid=''; 
    2525 
    2626$daynightcodes = daynight_list(); 
  • modules/branches/2.9/timeconditions/page.timeconditions.php

    r8922 r10294  
    1515isset($_REQUEST['action'])?$action = $_REQUEST['action']:$action=''; 
    1616//the item we are currently displaying 
    17 isset($_REQUEST['itemid'])?$itemid=mysql_real_escape_string($_REQUEST['itemid']):$itemid=''; 
     17isset($_REQUEST['itemid'])?$itemid=$db->escapeSimple($_REQUEST['itemid']):$itemid=''; 
    1818 
    1919$dispnum = "timeconditions"; //used for switch on config.php