diff --git a/checkin_notes b/checkin_notes index 2043d24c06..f0211da46e 100755 --- a/checkin_notes +++ b/checkin_notes @@ -19373,6 +19373,7 @@ Bruce Allen 13 Nov 2004 - Fixed links at bottom of workunits page, showing outcomes of results. - Added tabular description of tables to the database form page, longer clause box - Added fix (commented out) to get pictures for systems without TrueColor support (GD v 2) + - Fix to db_action.inc so it works under PHP<4.3.0 html/ops/ cancel_wu.php (removed) cancel_wu_form.php @@ -19382,3 +19383,4 @@ Bruce Allen 13 Nov 2004 html/inc/ db_ops.inc profile.inc + db_action.inc diff --git a/html/ops/db_action.php b/html/ops/db_action.php index 60533c63f9..59b26a0cf8 100644 --- a/html/ops/db_action.php +++ b/html/ops/db_action.php @@ -1,6 +1,7 @@ \n"; function append_sql_query($original,$addition,$first) { if ($first == 1) { @@ -114,7 +115,17 @@ "; } } - $result = mysql_query(mysql_real_escape_string($main_query)); + +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! + $escapehell=mysql_real_escape_string($main_query); +} else { + $escapehell=str_replace("\'", "'", $main_query); + $escapehell=str_replace("\\\"", "'", $escapehell); +} + + $result = mysql_query($escapehell); if ($result) { if ($detail == "low") { start_table();