X-Git-Url: https://git.cweiske.de/phorkie.git/blobdiff_plain/6d0777840e50ce98f3d96629b4e92bbdccd3001c..825c9662ddc1c534712056c458c8f6d71b81b921:/www/display.php diff --git a/www/display.php b/www/display.php index 5bd06bb..a41f4a8 100644 --- a/www/display.php +++ b/www/display.php @@ -1,42 +1,26 @@ loadFromRequest(); -$files = glob($repoDir . '/*'); -$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( - 'description' => file_get_contents($repoDir . '/.git/description'), - 'files' => $tplFiles, - 'links' => array( - 'edit' => '/' . $id . '/edit' - ) + 'repo' => $repo, + 'dh' => new \Date_HumanDiff(), + 'htmlhelper' => new HtmlHelper(), ) ); ?>