File TODO changed (mode: 100644) (index 6bb4458..9a2a408) |
8 |
8 |
Search for php_uname? |
Search for php_uname? |
9 |
9 |
|
|
10 |
10 |
== BEFORE NEXT RELEASE == |
== BEFORE NEXT RELEASE == |
|
11 |
|
[ ] Use HTTP_USER_AGENT for storing pulls in history. |
|
12 |
|
[ ] Seems I do not deal with renaming users, even if the function exists! |
11 |
13 |
[ ] Extra output when cloning: seems to be a bug in git. |
[ ] Extra output when cloning: seems to be a bug in git. |
12 |
14 |
[ ] If user is deleted, do not allow access to any other user area. |
[ ] If user is deleted, do not allow access to any other user area. |
13 |
15 |
Seems that now we allow access to repositories! |
Seems that now we allow access to repositories! |
|
... |
... |
to add a worker? Also, no hint is presented. |
754 |
756 |
Not only http. |
Not only http. |
755 |
757 |
[ ] If user has push access, why do we create a namespace?! |
[ ] If user has push access, why do we create a namespace?! |
756 |
758 |
Maybe because I do not know the pushed refs? |
Maybe because I do not know the pushed refs? |
757 |
|
[ ] 2fa: http is not supported yet! |
|
758 |
759 |
[ ] Now, also the web part can do the db update. |
[ ] Now, also the web part can do the db update. |
759 |
760 |
[ ] rg_repo_fetch_push_helper: if git repo is not created, delay the fetch/push? |
[ ] rg_repo_fetch_push_helper: if git repo is not created, delay the fetch/push? |
760 |
761 |
[ ] target_ui => owner_ui? |
[ ] target_ui => owner_ui? |
File inc/admin.inc.php changed (mode: 100644) (index 9fce1b3..87c2bf2) |
... |
... |
function rg_admin_report1_suggestions($db, $from, $to) |
281 |
281 |
} else { |
} else { |
282 |
282 |
$row = rg_sql_fetch_array($res); |
$row = rg_sql_fetch_array($res); |
283 |
283 |
$total = $row['total']; |
$total = $row['total']; |
|
284 |
|
rg_sql_free_result($res); |
284 |
285 |
} |
} |
285 |
|
rg_sql_free_result($res); |
|
286 |
286 |
|
|
287 |
287 |
// Yesterday |
// Yesterday |
288 |
288 |
$yesterday_text = ''; |
$yesterday_text = ''; |
|
... |
... |
function rg_admin_report1_suggestions($db, $from, $to) |
305 |
305 |
$yesterday = $count; |
$yesterday = $count; |
306 |
306 |
if ($count) |
if ($count) |
307 |
307 |
$yesterday_text = "\nYesterday suggestions:\n" . $list; |
$yesterday_text = "\nYesterday suggestions:\n" . $list; |
|
308 |
|
rg_sql_free_result($res); |
308 |
309 |
} |
} |
309 |
|
rg_sql_free_result($res); |
|
310 |
310 |
|
|
311 |
311 |
$ret .= "\nTotal suggestions: " . $total; |
$ret .= "\nTotal suggestions: " . $total; |
312 |
312 |
$ret .= "\nYesterday suggestions: " . $yesterday; |
$ret .= "\nYesterday suggestions: " . $yesterday; |
|
... |
... |
function rg_admin_report1($db, $rg) |
361 |
361 |
$row = rg_sql_fetch_array($res); |
$row = rg_sql_fetch_array($res); |
362 |
362 |
$yesterday = $row['count']; |
$yesterday = $row['count']; |
363 |
363 |
$total_yesterday_changes += $row['count']; |
$total_yesterday_changes += $row['count']; |
|
364 |
|
rg_sql_free_result($res); |
364 |
365 |
} |
} |
365 |
|
rg_sql_free_result($res); |
|
366 |
366 |
|
|
367 |
367 |
// Total |
// Total |
368 |
368 |
$sql = "SELECT COUNT(*) AS total FROM " . $table; |
$sql = "SELECT COUNT(*) AS total FROM " . $table; |
|
... |
... |
function rg_admin_report1($db, $rg) |
372 |
372 |
} else { |
} else { |
373 |
373 |
$row = rg_sql_fetch_array($res); |
$row = rg_sql_fetch_array($res); |
374 |
374 |
$total = $row['total']; |
$total = $row['total']; |
|
375 |
|
rg_sql_free_result($res); |
375 |
376 |
} |
} |
376 |
|
rg_sql_free_result($res); |
|
377 |
377 |
|
|
378 |
378 |
$body .= "\n" . $yesterday . "\t" . $total |
$body .= "\n" . $yesterday . "\t" . $total |
379 |
379 |
. "\t" . "yesterday / total " . $text; |
. "\t" . "yesterday / total " . $text; |
|
... |
... |
function rg_admin_report1($db, $rg) |
399 |
399 |
if ($users) |
if ($users) |
400 |
400 |
$body .= "\nYesterday users (" . $users . "):\n" |
$body .= "\nYesterday users (" . $users . "):\n" |
401 |
401 |
. $list; |
. $list; |
|
402 |
|
rg_sql_free_result($res); |
402 |
403 |
} |
} |
403 |
|
rg_sql_free_result($res); |
|
404 |
404 |
|
|
405 |
405 |
$sql = "SELECT name, description, public FROM repos" |
$sql = "SELECT name, description, public FROM repos" |
406 |
406 |
. " WHERE itime >= $y_start" |
. " WHERE itime >= $y_start" |
|
... |
... |
function rg_admin_report1($db, $rg) |
420 |
420 |
} |
} |
421 |
421 |
if ($repos) |
if ($repos) |
422 |
422 |
$body .= "\nYesterday repos (" . $repos . "):\n" . $list; |
$body .= "\nYesterday repos (" . $repos . "):\n" . $list; |
|
423 |
|
rg_sql_free_result($res); |
423 |
424 |
} |
} |
424 |
|
rg_sql_free_result($res); |
|
425 |
425 |
|
|
426 |
426 |
$sug = rg_admin_report1_suggestions($db, $y_start, $y_end); |
$sug = rg_admin_report1_suggestions($db, $y_start, $y_end); |
427 |
427 |
$body .= "\n" . $sug; |
$body .= "\n" . $sug; |
File tests/ssh.php changed (mode: 100644) (index 9d1975a..35d6015) |
... |
... |
$sc = rg_test_sc_generate($db, $rg_ui); |
216 |
216 |
$sql = "UPDATE scratch_codes SET sc = '0' || substring(sc from 1 for 7)" |
$sql = "UPDATE scratch_codes SET sc = '0' || substring(sc from 1 for 7)" |
217 |
217 |
. " WHERE uid = " . $rg_ui['uid']; |
. " WHERE uid = " . $rg_ui['uid']; |
218 |
218 |
$res = rg_sql_query($db, $sql); |
$res = rg_sql_query($db, $sql); |
|
219 |
|
if ($res === FALSE) { |
|
220 |
|
rg_log('Cannot do query!'); |
|
221 |
|
exit(1); |
|
222 |
|
} |
219 |
223 |
rg_sql_free_result($res); |
rg_sql_free_result($res); |
220 |
224 |
// we want to test with a short code, so insert one and flush cache |
// we want to test with a short code, so insert one and flush cache |
221 |
225 |
$key = 'user::' . $rg_ui['uid'] . '::login_tokens::sc'; |
$key = 'user::' . $rg_ui['uid'] . '::login_tokens::sc'; |
File tests/wh_http.php changed (mode: 100644) (index 38d4666..3c1a62d) |
... |
... |
rg_test_wh_add_edit($db, $rg_ui, 'http', $extra); |
313 |
313 |
$sql = "SELECT * FROM webhooks WHERE uid = " . $rg_ui['uid'] |
$sql = "SELECT * FROM webhooks WHERE uid = " . $rg_ui['uid'] |
314 |
314 |
. " AND id = " . $wh_id1; |
. " AND id = " . $wh_id1; |
315 |
315 |
$res = rg_sql_query($db, $sql); |
$res = rg_sql_query($db, $sql); |
|
316 |
|
if ($res === FALSE) { |
|
317 |
|
rg_log('Cannot do query!'); |
|
318 |
|
exit(1); |
|
319 |
|
} |
316 |
320 |
$row = rg_sql_fetch_array($res); |
$row = rg_sql_fetch_array($res); |
317 |
321 |
rg_sql_free_result($res); |
rg_sql_free_result($res); |
318 |
322 |
$row['idata'] = unserialize($row['idata']); |
$row['idata'] = unserialize($row['idata']); |
|
... |
... |
if (!strstr($r['body'], 'success')) { |
379 |
383 |
} |
} |
380 |
384 |
$sql = "SELECT id FROM webhooks WHERE id = " . $wh_id1; |
$sql = "SELECT id FROM webhooks WHERE id = " . $wh_id1; |
381 |
385 |
$res = rg_sql_query($db, $sql); |
$res = rg_sql_query($db, $sql); |
|
386 |
|
if ($res === FALSE) { |
|
387 |
|
rg_log('Cannot do query!'); |
|
388 |
|
exit(1); |
|
389 |
|
} |
382 |
390 |
$rows = rg_sql_num_rows($res); |
$rows = rg_sql_num_rows($res); |
383 |
391 |
rg_sql_free_result($res); |
rg_sql_free_result($res); |
384 |
392 |
if ($rows != 0) { |
if ($rows != 0) { |