/** * * @param integer $logId * @return GeoCacheLog */ private function buildLog($logId) { $db = OcDb::instance(); $logQuery = "SELECT * FROM `cache_logs` WHERE `cache_logs`.`id` = :1 LIMIT 1"; $s = $db->multiVariableQuery($logQuery, $logId); $logRow = $db->dbResultFetchOneRowOnly($s); $geoCacheLog = false; if ($logRow) { $geoCacheLog = new GeoCacheLog(); $geoCacheLog->setGeoCache($logRow['cache_id'])->setDate(new \DateTime($logRow['date']))->setDateCreated(new \DateTime($logRow['date_created']))->setDelByUserId($logRow['del_by_user_id'])->setDeleted($logRow['deleted'])->setEditByUserId($logRow['edit_by_user_id'])->setEditCount($logRow['edit_count'])->setEncrypt($logRow['encrypt'])->setLastDeleted($logRow['last_deleted'])->setLastModified(new \DateTime($logRow['last_modified']))->setId($logRow['id'])->setMp3count($logRow['mp3count'])->setNode($logRow['node'])->setOkapiSyncbase(new \DateTime($logRow['okapi_syncbase']))->setOwnerNotified($logRow['owner_notified'])->setPicturesCount($logRow['picturescount'])->setText($logRow['text'])->setTextHtml($logRow['text_html'])->setTextHtmlEdit($logRow['text_htmledit'])->setType($logRow['type'])->setUser($logRow['user_id'])->setUuid($logRow['uuid']); } return $geoCacheLog; }