From ef4dfbc6ca9db8fdf5d16ba2c000c3715cfeafb1 Mon Sep 17 00:00:00 2001 From: Cassio de Campos Date: Mon, 31 Jul 2017 15:56:06 +0100 Subject: bf --- src/db.php | 7 +++++++ src/fextdata.php | 2 +- src/site/getsite.php | 3 +-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/db.php b/src/db.php index 03858a7..11f0e58 100644 --- a/src/db.php +++ b/src/db.php @@ -81,6 +81,13 @@ function DB_lo_import($conn, $file) { else return pg_lo_import ($conn, $file); } +function DB_lo_import_text($conn, $text) { + $oid = DB_lo_create($conn); + $handle = DB_lo_open($conn, $oid, "w"); + DB_lo_write($handle, "large object data"); + DB_lo_close($handle); +} + function DB_lo_export($contest, $conn, $oid, $file) { if (strcmp(phpversion(),'4.2.0')<0) $stat= pg_loexport ($oid, $file, $conn); diff --git a/src/fextdata.php b/src/fextdata.php index 731db96..e66073c 100644 --- a/src/fextdata.php +++ b/src/fextdata.php @@ -273,7 +273,7 @@ function getMainXML() { LOGError("xmltransfer: failed (" . $s . ")"); $s = substr($s, strpos($s, "\n") + 1); - LOGError("string: " . substr($s,0,50)); + // LOGError("string: " . substr($s,0,50)); $s = decryptData($s,myhash (trim($sitedata[2])),'xml from main not ok'); if(strtoupper(substr($s,0,5)) != "") { return false; diff --git a/src/site/getsite.php b/src/site/getsite.php index d2c4bf0..08235a0 100644 --- a/src/site/getsite.php +++ b/src/site/getsite.php @@ -27,8 +27,7 @@ if(($ct = DBContestInfo($_SESSION["usertable"]["contestnumber"])) == null) { } if($ct["contestlocalsite"]==$ct["contestmainsite"]) { $fromsite = $_SESSION["usertable"]["usericpcid"]; - LOGLevel("Connection received from site=$fromsite PHPID=".$_COOKIE['PHPSESSID'].",extra=".$_SESSION['usertable']['usersessionextra']. - ",session=".session_id(),2); + LOGLevel("Connection received from site=$fromsite",2); // PHPID=".$_COOKIE['PHPSESSID'].",extra=".$_SESSION['usertable']['usersessionextra'].",session=".session_id(),2); if($fromsite != '' && is_numeric($fromsite) && $fromsite > 0) { if(isset($_POST)) { $u = DBUserInfo($_SESSION["usertable"]["contestnumber"], $_SESSION["usertable"]["usersitenumber"], $_SESSION["usertable"]["usernumber"],null,false); -- cgit v1.2.3