Single file editing
[phorkie.git] / www / edit.php
index 4199c3496ed44ee0f9228c0936b02317a813e559..e95ca3f5ed2dbf5441f79300dc5bfacdd8853308 100644 (file)
@@ -11,13 +11,19 @@ $repo->loadFromRequest();
 
 $repopo = new Repository_Post($repo);
 if ($repopo->process($_POST, $_SESSION)) {
-    redirect($repo->getLink('display'));
+    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(),
     )