detect baseurl automatically, load config file from .phar
[phorkie.git] / www / doap.php
1 <?php
2 namespace phorkie;
3 /**
4  * Display DOAP of the paste.
5  * Contains a machine-readable project description with Git URL.
6  */
7 $reqWritePermissions = false;
8 require_once 'www-header.php';
9
10 $repo = new Repository();
11 $repo->loadFromRequest();
12
13 header('Content-Type: application/rdf+xml');
14 render(
15     'doap',
16     array(
17         'repo' => $repo,
18         'date' => date('Y-m-d', end($repo->getHistory())->committerTime),
19         'link' => Tools::fullUrl($repo->getLink('display'))
20     )
21 );
22 ?>