Update jQuery from 1.12.4 to 3.7.1
[phorkie.git] / www / delete.php
index f332028876216ec01e636e78145d467f1f6d6605..e0e8d9fcba4b6b4a9020721a5988ec0dc13f2917 100644 (file)
@@ -3,10 +3,8 @@ namespace phorkie;
 /**
  * Delete paste or ask for deletion
  */
+$reqWritePermissions = true;
 require_once 'www-header.php';
-if ($GLOBALS['phorkie']['auth']['secure'] > 0) {
-    require_once 'secure.php';
-}
 
 $repo = new Repository();
 $repo->loadFromRequest();
@@ -16,7 +14,7 @@ if (isset($_GET['confirm']) && $_GET['confirm'] == 1) {
         throw new Exception_Input('Deleting only possible via POST');
     }
     $repo->delete();
-    redirect('/');
+    redirect(Tools::fullUrl());
 }
 
 render(