Update jQuery from 1.12.4 to 3.7.1
[phorkie.git] / www / list.php
index d4934bd271ad9a3e2e70c0fb5e023697142a8b08..7c60ceb5b2ff63e50a2e282a6a6f94a1ca16e3b0 100644 (file)
@@ -7,7 +7,7 @@ $reqWritePermissions = false;
 require_once 'www-header.php';
 $rs = new Repositories();
 
-$page = 0;
+$page = $GLOBALS['phorkie']['cfg']['defaultListPage'];
 if (isset($_GET['page'])) {
     if (!is_numeric($_GET['page'])) {
         throw new Exception_Input('List page is not numeric');
@@ -15,11 +15,11 @@ if (isset($_GET['page'])) {
     $page = (int)$_GET['page'] - 1;
 }
 
-$perPage = 10;
-list($repos, $repoCount) = $rs->getList($page, $perPage);
+$perPage = $GLOBALS['phorkie']['cfg']['perPage'];
+list($repos, $repoCount, $page) = $rs->getList($page, $perPage);
 
 $pager = new Html_Pager(
-    $repoCount, $perPage, $page + 1, '/list/%d'
+    $repoCount, $perPage, $page + 1, 'list/%d'
 );
 
 $db = new Database();