diff options
| author | Cassio de Campos <cassiopc@gmail.com> | 2017-07-31 14:23:30 +0000 |
|---|---|---|
| committer | Cassio de Campos <cassiopc@gmail.com> | 2017-07-31 14:23:30 +0000 |
| commit | c795b45fc4672528ac79f1d209224aabe0e6c3f7 (patch) | |
| tree | e61134a6ccba652963dce7d3b9604907b80159b2 /src/fextdata.php | |
| parent | 03b21a68f9ff4d9fb566067a6dd18938057a424f (diff) | |
| download | boca-c795b45fc4672528ac79f1d209224aabe0e6c3f7.tar.gz boca-c795b45fc4672528ac79f1d209224aabe0e6c3f7.zip | |
bf
Diffstat (limited to 'src/fextdata.php')
| -rw-r--r-- | src/fextdata.php | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/fextdata.php b/src/fextdata.php index c5125df..619cf39 100644 --- a/src/fextdata.php +++ b/src/fextdata.php @@ -278,11 +278,14 @@ function getMainXML() { if(strtoupper(substr($s,0,5)) != "<XML>") { return false; } - importFromXML($s, $contest, $localsite); - $str = $sitedata[0] . ' ' . $sitedata[1] . ' ' . $sitedata[2] . ' ' . $ti; - $param = array('contestnumber' => $contest, 'mainsiteurl' => $str, 'updatetime' => $ct['updatetime']); - DBUpdateContest ($param, $c); - return true; + if(importFromXML($s, $contest, $localsite)) { + $str = $sitedata[0] . ' ' . $sitedata[1] . ' ' . $sitedata[2] . ' ' . $ti; + $param = array('contestnumber' => $contest, 'mainsiteurl' => $str, 'updatetime' => $ct['updatetime']); + DBUpdateContest ($param, null); + return true; + } else { + LOGError("error importing xml"); + } } else { LOGError("xmltransfer: failed (" . $ok . ")"); } @@ -345,7 +348,7 @@ function importFromXML($ar,$contest,$site,$tomain=false) { $param['contest'] = $contest; if(count($param) < 2) continue; unset($param['number']); - +LOGError("$key $val params " .print_r( $param,true)); if(!$tomain && $table == "answertable") { if(($ret=DBNewAnswer ($contest, $param, $conn))) { if($ret==2) { |