File inc/bug.inc.php changed (mode: 100644) (index f24ef11..93a595b) |
... |
... |
function rg_bug_next_id($db, $repo_id) |
246 |
246 |
rg_sql_free_result($res); |
rg_sql_free_result($res); |
247 |
247 |
$next_bug_id = $row['next_bug_id']; |
$next_bug_id = $row['next_bug_id']; |
248 |
248 |
|
|
249 |
|
// TODO |
|
250 |
|
// We must not do this. Else, repo_info will find the empty |
|
251 |
|
// repo info! |
|
252 |
|
//$key = 'repo_by_id' . '::' . $repo_id . '::' . 'last_bug_id'; |
|
253 |
|
//rg_cache_set($key, $next_bug_id, RG_SOCKET_NO_WAIT); |
|
|
249 |
|
$key = 'repo_by_id' . '::' . $repo_id . '::' . 'last_bug_id'; |
|
250 |
|
rg_cache_set($key, $next_bug_id, RG_SOCKET_NO_WAIT); |
254 |
251 |
break; |
break; |
255 |
252 |
} |
} |
256 |
253 |
|
|
File inc/repo.inc.php changed (mode: 100644) (index 80f6ce7..4de9a39) |
... |
... |
function rg_repo_info($db, $repo_id, $uid, $repo_name) |
689 |
689 |
|
|
690 |
690 |
if ($repo_id > 0) { |
if ($repo_id > 0) { |
691 |
691 |
$c = rg_cache_get('repo_by_id' . '::' . $repo_id); |
$c = rg_cache_get('repo_by_id' . '::' . $repo_id); |
692 |
|
if ($c !== FALSE) { |
|
|
692 |
|
if (($c !== FALSE) && isset($c['repo_id'])) { |
693 |
693 |
$ret = $c; |
$ret = $c; |
694 |
694 |
break; |
break; |
695 |
695 |
} |
} |
|
... |
... |
function rg_repo_edit($db, $login_ui, &$new) |
981 |
981 |
$new['deleted'] = 0; |
$new['deleted'] = 0; |
982 |
982 |
$new['disk_used_mb'] = 0; |
$new['disk_used_mb'] = 0; |
983 |
983 |
$new['git_dir_done'] = 0; |
$new['git_dir_done'] = 0; |
|
984 |
|
$new['last_bug_id'] = 0; |
984 |
985 |
|
|
985 |
986 |
$sql = "INSERT INTO repos (uid, master, name" |
$sql = "INSERT INTO repos (uid, master, name" |
986 |
987 |
. ", itime, max_commit_size, description" |
. ", itime, max_commit_size, description" |
|
... |
... |
function rg_repo_edit($db, $login_ui, &$new) |
1051 |
1052 |
|
|
1052 |
1053 |
$new['ok'] = 1; |
$new['ok'] = 1; |
1053 |
1054 |
$new['exists'] = 1; |
$new['exists'] = 1; |
1054 |
|
rg_cache_set("repo_by_id::" . $new['repo_id'], $new, RG_SOCKET_NO_WAIT); |
|
|
1055 |
|
rg_cache_merge("repo_by_id::" . $new['repo_id'], $new, |
|
1056 |
|
RG_SOCKET_NO_WAIT); |
1055 |
1057 |
rg_cache_set("repo_by_name::" . $login_ui['uid'] . "::" |
rg_cache_set("repo_by_name::" . $login_ui['uid'] . "::" |
1056 |
1058 |
. $new['name'], $new['repo_id'], RG_SOCKET_NO_WAIT); |
. $new['name'], $new['repo_id'], RG_SOCKET_NO_WAIT); |
1057 |
1059 |
|
|
|
... |
... |
function rg_repo_edit_high_level($db, &$rg) |
1604 |
1606 |
$rg['ri']['description'] = trim(rg_var_str('description')); |
$rg['ri']['description'] = trim(rg_var_str('description')); |
1605 |
1607 |
$rg['ri']['public'] = rg_var_bool('public'); |
$rg['ri']['public'] = rg_var_bool('public'); |
1606 |
1608 |
$rg['ri']['license'] = trim(rg_var_str('license')); |
$rg['ri']['license'] = trim(rg_var_str('license')); |
1607 |
|
$rg['ri']['last_bug_id'] = 0; |
|
1608 |
1609 |
rg_repo_cosmetic($rg['ri']); |
rg_repo_cosmetic($rg['ri']); |
1609 |
1610 |
//rg_log_ml("CHECK: after repo edit: rg[ri]=" . print_r($rg['ri'], TRUE)); |
//rg_log_ml("CHECK: after repo edit: rg[ri]=" . print_r($rg['ri'], TRUE)); |
1610 |
1611 |
|
|
File inc/user.inc.php changed (mode: 100644) (index e739774..2b130e2) |
... |
... |
function rg_user_edit($db, $d) |
538 |
538 |
if (!$update_pass) |
if (!$update_pass) |
539 |
539 |
unset($d['pass']); |
unset($d['pass']); |
540 |
540 |
unset($d['pass2']); // not needed in cache |
unset($d['pass2']); // not needed in cache |
541 |
|
rg_cache_merge('user' . '::' . $d['uid'] . '::' . 'info', |
|
542 |
|
$d, RG_SOCKET_NO_WAIT); |
|
|
541 |
|
rg_cache_merge('user' . '::' . $d['uid'] |
|
542 |
|
. '::' . 'info', $d, RG_SOCKET_NO_WAIT); |
543 |
543 |
} |
} |
544 |
544 |
|
|
545 |
545 |
// TODO: should we cache here the user_by_uid and user_by_name |
// TODO: should we cache here the user_by_uid and user_by_name |