From 5981d17071c41f7e1e860a862877f849cccffb29 Mon Sep 17 00:00:00 2001 From: Bruce Allen Date: Thu, 2 Dec 2004 18:10:01 +0000 Subject: [PATCH] Modified to work correctly with ALL php versions svn path=/trunk/boinc/; revision=4703 --- html/inc/util_ops.inc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/html/inc/util_ops.inc b/html/inc/util_ops.inc index a6f81e7db3..c6317c6261 100644 --- a/html/inc/util_ops.inc +++ b/html/inc/util_ops.inc @@ -24,9 +24,7 @@ define("BODY_COLOR", " bgcolor=ffffff "); define("NOLOGIN", "Not logged in. Click here to login.\n"); function boinc_real_escape_string($unstripped) { - if (1) { - // valid for PHP>=4.3.0, 5. If there is a run-time php_version() function please use it - // instead of this hack! + if (version_compare(phpversion(),"4.3.0")>=0) { return mysql_real_escape_string($unstripped); } else { return str_replace("\'", "'", str_replace("\\\"", "'", $unstripped));