Changeset 10294
- Timestamp:
- 09/20/10 09:46:45 (3 years ago)
- Files:
-
- freepbx/trunk/amp_conf/htdocs/admin/header.php (modified) (1 diff)
- modules/branches/2.9/daynight/page.daynight.php (modified) (1 diff)
- modules/branches/2.9/timeconditions/page.timeconditions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
freepbx/trunk/amp_conf/htdocs/admin/header.php
r10288 r10294 116 116 } 117 117 118 119 120 // systems running on sqlite3 (or pgsql) this function is not available121 // 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_string123 // this shold be enough.124 // Fixes ticket: http://freepbx.org/trac/ticket/1963125 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 }137 118 ?> modules/branches/2.9/daynight/page.daynight.php
r9786 r10294 22 22 $night_recording_id = isset($_POST['night_recording_id']) ? $_POST['night_recording_id'] : ''; 23 23 24 isset($_REQUEST['itemid'])?$itemid= mysql_real_escape_string($_REQUEST['itemid']):$itemid='';24 isset($_REQUEST['itemid'])?$itemid=$db->escapeSimple($_REQUEST['itemid']):$itemid=''; 25 25 26 26 $daynightcodes = daynight_list(); modules/branches/2.9/timeconditions/page.timeconditions.php
r8922 r10294 15 15 isset($_REQUEST['action'])?$action = $_REQUEST['action']:$action=''; 16 16 //the item we are currently displaying 17 isset($_REQUEST['itemid'])?$itemid= mysql_real_escape_string($_REQUEST['itemid']):$itemid='';17 isset($_REQUEST['itemid'])?$itemid=$db->escapeSimple($_REQUEST['itemid']):$itemid=''; 18 18 19 19 $dispnum = "timeconditions"; //used for switch on config.php
