| File inc/repo.inc.php changed (mode: 100644) (index 2728da7..8ddc4a8) |
| ... |
... |
function rg_repo_list_query($db, $url, $sql, $params, $login_ui) |
| 1319 |
1319 |
* List repos of page user 'ui'. |
* List repos of page user 'ui'. |
| 1320 |
1320 |
* @uid - owner of the to be listed repos |
* @uid - owner of the to be listed repos |
| 1321 |
1321 |
*/ |
*/ |
| 1322 |
|
function rg_repo_list($db, $rg, $url, $uid) |
|
|
1322 |
|
function rg_repo_list($db, $rg, $url, $uid, $limit) |
| 1323 |
1323 |
{ |
{ |
| 1324 |
1324 |
rg_log("repo_list: url=$url uid=" . $uid |
rg_log("repo_list: url=$url uid=" . $uid |
| 1325 |
1325 |
. " login_uid=" . $rg['login_ui']['uid']); |
. " login_uid=" . $rg['login_ui']['uid']); |
| |
| ... |
... |
function rg_repo_list($db, $rg, $url, $uid) |
| 1338 |
1338 |
|| ($rg['login_ui']['uid'] != $uid)) |
|| ($rg['login_ui']['uid'] != $uid)) |
| 1339 |
1339 |
$add .= " AND public = 1"; |
$add .= " AND public = 1"; |
| 1340 |
1340 |
|
|
| 1341 |
|
$sql = "SELECT * FROM repos" |
|
| 1342 |
|
. " WHERE deleted = 0" |
|
|
1341 |
|
if ($limit > 0) |
|
1342 |
|
$add_limit = ' LIMIT ' . $limit; |
|
1343 |
|
else |
|
1344 |
|
$add_limit = ''; |
|
1345 |
|
|
|
1346 |
|
$sql = 'SELECT * FROM repos' |
|
1347 |
|
. ' WHERE deleted = 0' |
| 1343 |
1348 |
. $add |
. $add |
| 1344 |
|
. " ORDER BY name"; |
|
|
1349 |
|
. ' ORDER BY name' |
|
1350 |
|
. $add_limit; |
| 1345 |
1351 |
|
|
| 1346 |
1352 |
return rg_repo_list_query($db, $url, $sql, $params, $rg['login_ui']); |
return rg_repo_list_query($db, $url, $sql, $params, $rg['login_ui']); |
| 1347 |
1353 |
} |
} |
| |
| ... |
... |
function rg_repo_discover($db, $op, $rg, $ui) |
| 2165 |
2171 |
break; |
break; |
| 2166 |
2172 |
|
|
| 2167 |
2173 |
default: |
default: |
| 2168 |
|
$x = rg_repo_list($db, $rg, '', $ui['uid']); |
|
|
2174 |
|
$x = rg_repo_list($db, $rg, '', $ui['uid'], 100); |
|
2175 |
|
if ($x === FALSE) |
|
2176 |
|
$x = rg_template('internal_err.html', $rg, TRUE /*xss*/); |
| 2169 |
2177 |
break; |
break; |
| 2170 |
2178 |
} |
} |
| 2171 |
2179 |
|
|
| 2172 |
2180 |
$rg['discover_menu_' . $op] = 1; |
$rg['discover_menu_' . $op] = 1; |
| 2173 |
|
$ret .= rg_template('repo/discover.html', $rg, TRUE /* xss */); |
|
|
2181 |
|
$ret .= rg_template('repo/discover.html', $rg, TRUE /*xss*/); |
| 2174 |
2182 |
$ret .= '<div class="generic_body">' . "\n"; |
$ret .= '<div class="generic_body">' . "\n"; |
| 2175 |
2183 |
$ret .= $x; |
$ret .= $x; |
| 2176 |
2184 |
$ret .= '</div>' . "\n"; |
$ret .= '</div>' . "\n"; |
| File inc/user/home-page.php changed (mode: 100644) (index a2e5ccd..8f05d4e) |
| ... |
... |
$_home .= rg_template('user/home.html', $rg, TRUE /*xss*/); |
| 18 |
18 |
|
|
| 19 |
19 |
// List of repositories |
// List of repositories |
| 20 |
20 |
//$_home .= 'Repositories:'; |
//$_home .= 'Repositories:'; |
| 21 |
|
$_home .= rg_repo_list($db, $rg, '', $rg['page_ui']['uid']); |
|
|
21 |
|
$_home .= rg_repo_list($db, $rg, '', $rg['page_ui']['uid'], 0); |
| 22 |
22 |
|
|
| 23 |
23 |
|
|
| 24 |
24 |
// hints |
// hints |