show url and HTTP method in exception
[phorkie.git] / www / index.php
index 54b1e3aa692795e57a0b789fad959f8e91201648..5b5e4f64288e2b326d11a90908dcdcf1787d2544 100644 (file)
@@ -1,34 +1,13 @@
 <?php
-namespace phorkie;
 /**
- * Show paste creation form
- *
- * Elements:
- * - description
- * - file name (default: default.php)
- * - content
- *
- * Creates and redirects to display page
+ * Jump to the index as per the configuration
  */
+namespace phorkie;
+$reqWritePermissions = false;
 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)
-);
-$db = new Database();
-render(
-    'index',
-    array(
-        'files'       => $phork,
-        'description' => '',
-        'htmlhelper'  => new HtmlHelper(),
-        'recents'     => $db->getSearch()->listAll(0, 5, 'crdate', 'desc'),
-        'dh'          => new \Date_HumanDiff(),
-    )
+header(
+    'Location: '
+    . Tools::fullUrl($GLOBALS['phorkie']['cfg']['index'])
 );
 ?>