add padding fix to edit page
[phorkie.git] / www / edit.php
index 226b774e056f5040c6306a1e11aa942662b69341..4199c3496ed44ee0f9228c0936b02317a813e559 100644 (file)
@@ -3,16 +3,14 @@ namespace phorkie;
 /**
  * Edit paste contents
  */
+$reqWritePermissions = true;
 require_once 'www-header.php';
-if ($GLOBALS['phorkie']['auth']['secure'] > 0) {
-    require_once 'secure.php';
-}
 
 $repo = new Repository();
 $repo->loadFromRequest();
 
 $repopo = new Repository_Post($repo);
-if ($repopo->process($_POST)) {
+if ($repopo->process($_POST, $_SESSION)) {
     redirect($repo->getLink('display'));
 }
 
@@ -20,6 +18,7 @@ render(
     'edit',
     array(
         'repo' => $repo,
+        'dh'   => new \Date_HumanDiff(),
         'htmlhelper' => new HtmlHelper(),
     )
 );