anchors for file names
[phorkie.git] / www / display.php
1 <?php
2 namespace Phorkie;
3 /**
4  * Display paste contents
5  */
6 require_once 'www-header.php';
7
8 $repo = new Repository();
9 $repo->loadFromRequest();
10
11 /*
12 $tplFiles = array();
13 foreach ($files as $file) {
14     $tplFile = array();
15     $tplFile['filename'] = basename($file);
16     $tplFile['type'] = get_type_from_file($file);
17     //FIXME: highlight
18     $tplFile['content'] = file_get_contents($file);
19     $tplFile['raw'] = '/' . $id . '/raw/' . $tplFile['filename'];
20     $tplFiles[] = $tplFile;
21 }
22 */
23
24 render(
25     'display',
26     array(
27         'repo' => $repo,
28         /*
29         'description' => file_get_contents($repoDir . '/.git/description'),
30         'files' => $tplFiles,
31         'links' => array(
32             'edit' => '/' . $id . '/edit'
33         )
34         */
35     )
36 );
37 ?>