Changeset 370 for trunk/phpbms/include
- Timestamp:
- 12/03/07 10:26:25 (4 years ago)
- Files:
-
- 1 modified
-
trunk/phpbms/include/common_functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpbms/include/common_functions.php
r369 r370 489 489 490 490 function addSlashesToArray($thearray){ 491 if(get_magic_quotes_runtime() || get_magic_quotes_gpc()) 491 492 //This function prepares an array for SQL manipulation. 493 494 if(get_magic_quotes_runtime() || get_magic_quotes_gpc()){ 495 492 496 foreach ($thearray as $key=>$value) 493 497 if(is_array($value)) 494 498 $thearray[$key]= addSlashesToArray($value); 495 499 else 496 $thearray[$key] = stripslashes($value); 497 498 foreach ($thearray as $key=>$value) 499 if(!is_array($value)) 500 $thearray[$key] = mysql_real_escape_string($value); 500 $thearray[$key] = mysql_real_escape_string(stripslashes($value)); 501 502 } else 503 foreach ($thearray as $key=>$value) 504 if(is_array($value)) 505 $thearray[$key]= addSlashesToArray($value); 506 else 507 $thearray[$key] = mysql_real_escape_string($value); 501 508 502 509 return $thearray; 503 } 510 511 }//end function 512 504 513 505 514 function htmlQuotes($string){