function paperDownload($prow, $final = false) { global $Conf, $Me; // don't let PC download papers in progress if ($prow->timeSubmitted <= 0 && !$Me->can_view_pdf($prow)) { return ""; } $doc = $prow->document($final ? DTYPE_FINAL : DTYPE_SUBMISSION); return $doc ? documentDownload($doc) : ""; }
private function unparse_html($row, PaperOptionValue $ov, $no_size) { $docs = []; foreach ($ov->documents($row) as $d) { $name = htmlspecialchars($d->unique_filename); $docs[] = documentDownload($d, count($docs) ? "sdlimgsp" : "sdlimg", $name, $no_size); } return join("<br />", $docs); }