allow people to add more files when editing
[phorkie.git] / www / index.php
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..9a03b77c91e0ad223309d43857bbae9828d9a3a2 100644 (file)
@@ -0,0 +1,24 @@
+<?php
+namespace Phorkie;
+/**
+ * Show paste creation form
+ *
+ * Elements:
+ * - description
+ * - file name (default: default.php)
+ * - content
+ *
+ * Creates and redirects to display page
+ */
+require_once 'www-header.php';
+
+$repopo = new Repository_Post();
+if ($repopo->process($_POST)) {
+    redirect($repopo->repo->getLink('display'));
+}
+
+$phork = array(
+    '1' => new File(null, null)
+);
+render('index', array('files' => $phork, 'description' => ''));
+?>