Use commit timestamps for ElasticSearch and sort on last commit time.
[phorkie.git] / www / new.php
index fc6d5f38b196b9810e9af438cd5b8ba377e80293..965f5340e421f5eda836367bf0b27e6847502427 100644 (file)
@@ -10,13 +10,11 @@ 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)) {
+if ($repopo->process($_POST, $_SESSION)) {
     redirect($repopo->repo->getLink('display'));
 }
 
@@ -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(),
     )
 );