Add perPage settings into config
authorJustin J. Novack <jnovack@gmail.com>
Mon, 22 Jul 2013 15:15:22 +0000 (11:15 -0400)
committerChristian Weiske <cweiske@cweiske.de>
Tue, 20 Aug 2013 20:13:59 +0000 (22:13 +0200)
ChangeLog
data/config.default.php
data/config.php.dist
www/list.php
www/search.php

index 8886a1c..2d10757 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-08-20  Justin J. Novack  <jnovack@gmail.com>
+
+       * Add perPage settings into config
+
 2013-08-20  Christian Weiske  <cweiske@cweiske.de>
 
        * Fix bug #41: AGPL link broken
 2013-08-20  Christian Weiske  <cweiske@cweiske.de>
 
        * Fix bug #41: AGPL link broken
index 009b572..7e6ebb9 100644 (file)
@@ -12,7 +12,8 @@ $GLOBALS['phorkie']['cfg'] = array(
     'setupcheck'    => true,
     'elasticsearch' => null,
     'geshi'         => 'MediaWiki/geshi/geshi/geshi.php',
     'setupcheck'    => true,
     'elasticsearch' => null,
     'geshi'         => 'MediaWiki/geshi/geshi/geshi.php',
-    'index'         => 'new'//"new" or "list"
+    'index'         => 'new',//"new" or "list"
+    'perPage'       => 10,
 );
 $GLOBALS['phorkie']['auth'] = array(
     // 0 = public, no authentication, 1 = protect adds/edits/deletes,
 );
 $GLOBALS['phorkie']['auth'] = array(
     // 0 = public, no authentication, 1 = protect adds/edits/deletes,
index 77d2005..81ffdbe 100644 (file)
@@ -6,6 +6,7 @@
 //$GLOBALS['phorkie']['cfg']['git']['private'] = 'ssh://git@bogo:paste/';
 //$GLOBALS['phorkie']['cfg']['elasticsearch'] = 'http://localhost:9200/phorkie/';
 //$GLOBALS['phorkie']['cfg']['setupcheck'] = false;
 //$GLOBALS['phorkie']['cfg']['git']['private'] = 'ssh://git@bogo:paste/';
 //$GLOBALS['phorkie']['cfg']['elasticsearch'] = 'http://localhost:9200/phorkie/';
 //$GLOBALS['phorkie']['cfg']['setupcheck'] = false;
+//$GLOBALS['phorkie']['cfg']['perPage'] = 10;
 
 //$GLOBALS['phorkie']['auth']['securityLevel'] = 0;
 //$GLOBALS['phorkie']['auth']['listedUsersOnly'] = false;
 
 //$GLOBALS['phorkie']['auth']['securityLevel'] = 0;
 //$GLOBALS['phorkie']['auth']['listedUsersOnly'] = false;
index 1ff8a87..88ad31d 100644 (file)
@@ -15,7 +15,7 @@ if (isset($_GET['page'])) {
     $page = (int)$_GET['page'] - 1;
 }
 
     $page = (int)$_GET['page'] - 1;
 }
 
-$perPage = 10;
+$perPage = $GLOBALS['phorkie']['cfg']['perPage'];
 list($repos, $repoCount) = $rs->getList($page, $perPage);
 
 $pager = new Html_Pager(
 list($repos, $repoCount) = $rs->getList($page, $perPage);
 
 $pager = new Html_Pager(
index 2f2de2e..82b40a7 100644 (file)
@@ -20,7 +20,7 @@ if (isset($_GET['page'])) {
     //PEAR Pager begins at 1
     $page = (int)$_GET['page'] - 1;
 }
     //PEAR Pager begins at 1
     $page = (int)$_GET['page'] - 1;
 }
-$perPage = 10;
+$perPage = $GLOBALS['phorkie']['cfg']['perPage'];
 
 $db     = new Database();
 $search = $db->getSearch();
 
 $db     = new Database();
 $search = $db->getSearch();