git.cweiske.de
/
phorkie.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
let the session expire in 2 weeks
[phorkie.git]
/
www
/
list.php
diff --git
a/www/list.php
b/www/list.php
index 911f26d1a728b54dcb7a9d22d452cae65d539dc6..7c60ceb5b2ff63e50a2e282a6a6f94a1ca16e3b0 100644
(file)
--- a/
www/list.php
+++ b/
www/list.php
@@
-1,12
+1,13
@@
<?php
/**
<?php
/**
- *
Fork
a repository
+ *
List
a repository
*/
namespace phorkie;
*/
namespace phorkie;
+$reqWritePermissions = false;
require_once 'www-header.php';
$rs = new Repositories();
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');
if (isset($_GET['page'])) {
if (!is_numeric($_GET['page'])) {
throw new Exception_Input('List page is not numeric');
@@
-14,18
+15,21
@@
if (isset($_GET['page'])) {
$page = (int)$_GET['page'] - 1;
}
$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(
$pager = new Html_Pager(
- $repoCount, $perPage, $page + 1, '
/
list/%d'
+ $repoCount, $perPage, $page + 1, 'list/%d'
);
);
+$db = new Database();
render(
'list',
array(
render(
'list',
array(
- 'repos' => $repos,
- 'pager' => $pager,
+ 'repos' => $repos,
+ 'pager' => $pager,
+ 'recents' => $db->getSearch()->listAll(0, 5, 'modate', 'desc'),
+ 'dh' => new \Date_HumanDiff(),
)
);
?>
)
);
?>