Add a compilation link for LaTeX documents
This commit is contained in:
parent
3eea4df363
commit
9d8d0ce4e9
4 changed files with 141 additions and 0 deletions
|
|
@ -247,6 +247,20 @@ class Paste
|
|||
return "";
|
||||
}
|
||||
|
||||
function get_gen()
|
||||
{
|
||||
if (!empty($_POST["passwd"]))
|
||||
$passwd = "=".$_POST["passwd"];
|
||||
else
|
||||
$passwd = "";
|
||||
$raw = '<a href="/raw.php?'.$this->fileref.$passwd.'">Raw</a> ';
|
||||
|
||||
if ($this->language == "latex")
|
||||
return $raw.'<a href="/gen.php?'.$this->fileref.$passwd.'">Générer le document</a> ';
|
||||
else
|
||||
return $raw;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the parsed code
|
||||
*/
|
||||
|
|
@ -300,6 +314,11 @@ class Paste
|
|||
return $ret.'</ul></div>';
|
||||
}
|
||||
}
|
||||
|
||||
function export_to_file($fileto)
|
||||
{
|
||||
file_put_contents($fileto, $this->content);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in a new issue