fix accidential bug in last commit
[phorkie.git] / www / display.php
index b6b7d7f7939242f9aa21505a35197087e1ed155b..464741b8c86f77c208a5ebfbc1ea3c8057631dd7 100644 (file)
@@ -1,37 +1,28 @@
 <?php
-namespace Phorkie;
+namespace phorkie;
 /**
  * Display paste contents
  */
+$reqWritePermissions = false;
 require_once 'www-header.php';
 
 $repo = new Repository();
 $repo->loadFromRequest();
 
-/*
-$tplFiles = array();
-foreach ($files as $file) {
-    $tplFile = array();
-    $tplFile['filename'] = basename($file);
-    $tplFile['type'] = get_type_from_file($file);
-    //FIXME: highlight
-    $tplFile['content'] = file_get_contents($file);
-    $tplFile['raw'] = '/' . $id . '/raw/' . $tplFile['filename'];
-    $tplFiles[] = $tplFile;
-}
-*/
+header('X-Pingback: ' . $repo->getLink('linkback', null, true));
+header(
+    'Link: <' . $repo->getLink('linkback', null, true) . '>;'
+    . 'rel="http://webmention.org/"'
+);
 
 render(
     'display',
     array(
         'repo' => $repo,
-        /*
-        'description' => file_get_contents($repoDir . '/.git/description'),
-        'files' => $tplFiles,
-        'links' => array(
-            'edit' => '/' . $id . '/edit'
-        )
-        */
+        'dh'   => new \Date_HumanDiff(),
+        'htmlhelper' => new HtmlHelper(),
+        'domain'     => $_SERVER['HTTP_HOST'],
+        'flashmessages' => FlashMessage::getAll(),
     )
 );
 ?>