X-Git-Url: https://git.cweiske.de/phorkie.git/blobdiff_plain/5c314428027bea7f3743d24968bd294e65b662ca..ba406cb340bcbfc88f465a3cefd416cdda95fd43:/www/edit.php diff --git a/www/edit.php b/www/edit.php index 9acc1d6..e95ca3f 100644 --- a/www/edit.php +++ b/www/edit.php @@ -1,22 +1,31 @@ loadFromRequest(); $repopo = new Repository_Post($repo); -if ($repopo->process($_POST)) { - redirect($repo->getLink('display')); +if ($repopo->process($_POST, $_SESSION)) { + redirect($repo->getLink('display', null, true)); +} + +$file = null; +if (isset($_GET['file'])) { + $file = $repo->getFileByName($_GET['file']); } render( 'edit', array( 'repo' => $repo, + 'singlefile' => $file, + 'dh' => new \Date_HumanDiff(), + 'htmlhelper' => new HtmlHelper(), ) ); ?>