226b774e056f5040c6306a1e11aa942662b69341
[phorkie.git] / www / edit.php
1 <?php
2 namespace phorkie;
3 /**
4  * Edit paste contents
5  */
6 require_once 'www-header.php';
7 if ($GLOBALS['phorkie']['auth']['secure'] > 0) {
8     require_once 'secure.php';
9 }
10
11 $repo = new Repository();
12 $repo->loadFromRequest();
13
14 $repopo = new Repository_Post($repo);
15 if ($repopo->process($_POST)) {
16     redirect($repo->getLink('display'));
17 }
18
19 render(
20     'edit',
21     array(
22         'repo' => $repo,
23         'htmlhelper' => new HtmlHelper(),
24     )
25 );
26 ?>