Update jQuery from 1.12.4 to 3.7.1
[phorkie.git] / www / new.php
index fc6d5f38b196b9810e9af438cd5b8ba377e80293..6ec746b421fc8a646ed13583671643acc8fd6885 100644 (file)
@@ -10,14 +10,12 @@ namespace phorkie;
  *
  * Creates and redirects to display page
  */
+$reqWritePermissions = true;
 require_once 'www-header.php';
-if ($GLOBALS['phorkie']['auth']['secure'] > 0) {
-    require_once 'secure.php';
-}
 
 $repopo = new Repository_Post();
-if ($repopo->process($_POST)) {
-    redirect($repopo->repo->getLink('display'));
+if ($repopo->process($_POST, $_SESSION)) {
+    redirect($repopo->repo->getLink('display', null, true));
 }
 
 $phork = array(
@@ -30,7 +28,7 @@ render(
         'files'       => $phork,
         'description' => '',
         'htmlhelper'  => new HtmlHelper(),
-        'recents'     => $db->getSearch()->listAll(0, 5, 'crdate', 'desc'),
+        'recents'     => $db->getSearch()->listAll(0, 5, 'modate', 'desc'),
         'dh'          => new \Date_HumanDiff(),
     )
 );