Use commit timestamps for ElasticSearch and sort on last commit time.
[phorkie.git] / www / new.php
index 8d1a231d1ff9e339f2bc062702c886ea074ddc20..965f5340e421f5eda836367bf0b27e6847502427 100644 (file)
@@ -10,10 +10,8 @@ namespace phorkie;
  *
  * Creates and redirects to display page
  */
  *
  * Creates and redirects to display page
  */
+$reqWritePermissions = true;
 require_once 'www-header.php';
 require_once 'www-header.php';
-if ($GLOBALS['phorkie']['auth']['secure'] > 0) {
-    require_once 'secure.php';
-}
 
 $repopo = new Repository_Post();
 if ($repopo->process($_POST, $_SESSION)) {
 
 $repopo = new Repository_Post();
 if ($repopo->process($_POST, $_SESSION)) {
@@ -30,7 +28,7 @@ render(
         'files'       => $phork,
         'description' => '',
         'htmlhelper'  => new HtmlHelper(),
         '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(),
     )
 );
         'dh'          => new \Date_HumanDiff(),
     )
 );