diff options
| author | Justin J. Novack <jnovack@gmail.com> | 2013-07-22 11:15:22 -0400 |
|---|---|---|
| committer | Christian Weiske <cweiske@cweiske.de> | 2013-08-20 22:13:59 +0200 |
| commit | a8a7006fb93492febf83dfa89583447d958b18fb (patch) | |
| tree | 4598d9973daeb9f45b1eae8c60d5a9ea661ab32e | |
| parent | 9fcf10c0d05122e610a8944fc3dd77e0605ebb7f (diff) | |
| download | phorkie-a8a7006fb93492febf83dfa89583447d958b18fb.tar.gz phorkie-a8a7006fb93492febf83dfa89583447d958b18fb.zip | |
Add perPage settings into config
| -rw-r--r-- | ChangeLog | 4 | ||||
| -rw-r--r-- | data/config.default.php | 3 | ||||
| -rw-r--r-- | data/config.php.dist | 1 | ||||
| -rw-r--r-- | www/list.php | 2 | ||||
| -rw-r--r-- | www/search.php | 2 |
5 files changed, 9 insertions, 3 deletions
@@ -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 diff --git a/data/config.default.php b/data/config.default.php index 009b572..7e6ebb9 100644 --- a/data/config.default.php +++ b/data/config.default.php @@ -12,7 +12,8 @@ $GLOBALS['phorkie']['cfg'] = array( '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, diff --git a/data/config.php.dist b/data/config.php.dist index 77d2005..81ffdbe 100644 --- a/data/config.php.dist +++ b/data/config.php.dist @@ -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']['perPage'] = 10; //$GLOBALS['phorkie']['auth']['securityLevel'] = 0; //$GLOBALS['phorkie']['auth']['listedUsersOnly'] = false; diff --git a/www/list.php b/www/list.php index 1ff8a87..88ad31d 100644 --- a/www/list.php +++ b/www/list.php @@ -15,7 +15,7 @@ if (isset($_GET['page'])) { $page = (int)$_GET['page'] - 1; } -$perPage = 10; +$perPage = $GLOBALS['phorkie']['cfg']['perPage']; list($repos, $repoCount) = $rs->getList($page, $perPage); $pager = new Html_Pager( diff --git a/www/search.php b/www/search.php index 2f2de2e..82b40a7 100644 --- a/www/search.php +++ b/www/search.php @@ -20,7 +20,7 @@ if (isset($_GET['page'])) { //PEAR Pager begins at 1 $page = (int)$_GET['page'] - 1; } -$perPage = 10; +$perPage = $GLOBALS['phorkie']['cfg']['perPage']; $db = new Database(); $search = $db->getSearch(); |
