newDataObject(); // Set implicit parts of the log entry $entry->setDateLogged(Core::getCurrentDate()); $entry->setIPAddress($request->getRemoteAddr()); $user = $request->getUser(); if ($user) $entry->setUserId($user->getId()); $entry->setAssocType(ASSOC_TYPE_SUBMISSION_FILE); $entry->setAssocId($submissionFile->getFileId()); // Set explicit parts of the log entry $entry->setEventType($eventType); $entry->setMessage($messageKey); $entry->setParams($params); $entry->setIsTranslated(0); // Legacy for other apps. All messages use locale keys. // Insert the resulting object $submissionFileEventLogDao->insertObject($entry); return $entry; } } ?>