Fix so it works under PHP<4.3.0

svn path=/trunk/boinc/; revision=4551
This commit is contained in:
Bruce Allen 2004-11-14 02:57:57 +00:00
parent 94e886d4cb
commit fb4e61bb80
2 changed files with 14 additions and 1 deletions

View File

@ -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

View File

@ -1,6 +1,7 @@
<?php
require_once("../inc/util_ops.inc");
require_once("../inc/db_ops.inc");
echo "<!--\$Id$ -->\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();