private static function parseSudoCreated(Module_Audit $module, $row) { $data = explode(':', trim($row)); if (count($data) !== 3) { return self::error('Invalid row: ' . $row); } $id = $data[1]; $filename = $data[2]; $filename = substr($filename, strrpos($filename, '/') + 1); $data = explode('-', $filename); if (count($data) !== 5) { return self::error('Invalid row: ' . $row); } $log = new GWF_AuditLog(array('al_id' => $id, 'al_eusername' => $data[0], 'al_username' => $data[1], 'al_type' => $data[2], 'al_time_start' => $data[3], 'al_time_end' => NULL, 'al_rand' => $data[4], 'al_data' => NULL)); if (false === $log->replace()) { echo GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__)); return false; } $filename = $log->getFileName(); if (false === GWF_File::touch($filename)) { echo GWF_HTML::err('ERR_WRITE_FILE', array($filename)); return false; } return self::sendMails($module, $log, 1); }