fix no column problem
This commit is contained in:
parent
76190838df
commit
8aa9411129
|
@ -210,8 +210,10 @@ EOT;
|
|||
foreach ($body->votes as $vote)
|
||||
if (count($vote->vote) > $col_count)
|
||||
$col_count = count($vote->vote);
|
||||
|
||||
// if no columns (or too many), stop the pdf process
|
||||
if ($col_count < 1 || $col_count > 5)
|
||||
throw new Exception('Too many or no vote columns');
|
||||
return '';
|
||||
|
||||
// build the table header variables
|
||||
$table_col_count = str_repeat('|l', $col_count);
|
||||
|
@ -267,13 +269,13 @@ EOT;
|
|||
unlink("$ffull.aux");
|
||||
|
||||
// TODO: sign the pdf file
|
||||
shell_exec("");
|
||||
//shell_exec("");
|
||||
|
||||
// synchronize the file
|
||||
$this->sync_command("$ffull.pdf");
|
||||
|
||||
// return the hash of the file
|
||||
return trim(shell_exec("/usr/bin/sha256sum $file_path | awk '{ print $1 }'"));
|
||||
return trim(shell_exec("/usr/bin/sha256sum '$file_path' | awk '{ print $1 }'"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue