xaizek / rocketgit (License: AGPLv3+) (since 2018-12-09)
Light and fast Git hosting solution suitable to serve both as a hub or as a personal code storage with its tickets, pull requests, API and much more.
Commit 2ccd4da309196c89d776950b3b2e9efec32a6c60

Bulk
Author: Catalin(ux) M. BOIE
Author date (UTC): 2012-10-29 18:30
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2012-10-29 18:30
Parent(s): ea67645051e11f3ef9ba3a115ccecb8e1f8cfee0
Signing key:
Tree: 7e1358e0417be8ad070b19a135f355fedc795ca3
File Lines added Lines deleted
AUTHORS 10 0
TODO 11 0
duilder 1 1
inc/bug.inc.php 2 1
inc/repo.inc.php 5 16
inc/rights.inc.php 36 46
inc/user/pass/pass.php 9 9
inc/user/repo-page.php 41 40
inc/user/repo/admin.php 5 3
inc/user/repo/bug/add/add.php 8 8
inc/user/repo/bug/main.php 8 7
inc/user/repo/bug/search/search.php 6 6
inc/user/repo/bug/show/show.php 15 15
inc/user/repo/edit/edit.php 2 1
inc/user/repo/rights/form.html 24 0
inc/user/repo/rights/rights.form.php 0 29
inc/user/repo/rights/rights.php 14 6
root/index.php 2 0
root/themes/default/main.css 1 0
root/themes/default/user/repo/rights/list/footer.html 5 0
root/themes/default/user/repo/rights/list/header.html 5 7
root/themes/default/user/repo/rights/list/line.html 10 0
root/themes/default/user/repo/rights/list/nodata.html 0 0
tests/repo.php 2 1
File AUTHORS added (mode: 100644) (index 0000000..df01c63)
1 Here will come, in chronological order, the people that helped me.
2 Thank you very much!
3
4 Ioana BOIE
5 Gabriel BOIE
6 Marian Stefan
7 Ioan Albescu
8 Nicolae Tipeiu
9 Bogdan Vatra
10 James Dean
File TODO changed (mode: 100644) (index 6d54040..6638c0e)
1 1 == BEFORE FIRST RELEASE! == == BEFORE FIRST RELEASE! ==
2 [ ] Delete rights by select.
3 [ ] menu shoul be on almost black bg with white text.
4 [ ] Description does not respect new lines.
5 [ ] Checking for "rg_ui['uid'] == 0" may not be enough.
6 Maybe rg_ui[['uid'] = repo['uid']?
7 [ ] "log" is not working.
8 [ ] When you search, private repos should not be present.
9 [ ] List on the first page the latest commits.
10 Do not forget to exclude private repos.
2 11 [ ] bug_update does not update labels! [ ] bug_update does not update labels!
3 12 [ ] Integrate remote_add.html. [ ] Integrate remote_add.html.
4 13 [ ] Should we expire the reset password token? Why? [ ] Should we expire the reset password token? Why?
 
23 32
24 33
25 34 == Medium == == Medium ==
35 [ ] Provide OpenVPN tunnels.
36 [ ] Errors should signal what field is not ok.
26 37 [ ] Replace all *.form.php with templates. [ ] Replace all *.form.php with templates.
27 38 [ ] Also log errmsg[] array! [ ] Also log errmsg[] array!
28 39 [ ] Do we need subop=1 into login.html? [ ] Do we need subop=1 into login.html?
File duilder changed (mode: 100755) (index a6e2825..abc39a1)
... ... function duilder_docs()
27 27 fi fi
28 28
29 29 echo "[*] Copying docs to [${EXPORT_PATH}]..." echo "[*] Copying docs to [${EXPORT_PATH}]..."
30 for f in README License LICENSE Changelog Changelog-last TODO FAQ INSTALL; do
30 for f in README License LICENSE Changelog Changelog-last TODO FAQ INSTALL AUTHORS; do
31 31 if [ -r "${f}" ]; then if [ -r "${f}" ]; then
32 32 cp -vp "${f}" "${EXPORT_PATH}/" cp -vp "${f}" "${EXPORT_PATH}/"
33 33 fi fi
File inc/bug.inc.php changed (mode: 100644) (index 7e4f243..60cb3b6)
... ... function rg_bug_search_load($db, $repo_id, $uid, $name)
471 471 "bugs_per_page" => 25, "bugs_per_page" => 25,
472 472 "global" => 0, "global" => 0,
473 473 "for_all_users" => 1, "for_all_users" => 1,
474 "standard" => 1
474 "standard" => 1,
475 "uid" => 0
475 476 ); );
476 477
477 478 // Pre-defined // Pre-defined
File inc/repo.inc.php changed (mode: 100644) (index ed54763..fd47157)
... ... $rg_repo_rights = array(
28 28 ); );
29 29
30 30 // What rights are on by default // What rights are on by default
31 // TODO: this should go into conf file?
31 32 $rg_repo_rights_default = "FMH"; $rg_repo_rights_default = "FMH";
32 33
33 34 rg_rights_register("repo", $rg_repo_rights); rg_rights_register("repo", $rg_repo_rights);
 
... ... function rg_repo_create($db, $master, $rg_ui, $name, $max_commit_size,
279 280 // and for permission reasons (we are 'apache' user here) // and for permission reasons (we are 'apache' user here)
280 281
281 282 rg_prof_end("repo_create"); rg_prof_end("repo_create");
282
283 283 return $ret; return $ret;
284 284 } }
285 285
 
... ... function rg_repo_create($db, $master, $rg_ui, $name, $max_commit_size,
289 289 function rg_repo_delete($db, $repo_id, $rg_ui) function rg_repo_delete($db, $repo_id, $rg_ui)
290 290 { {
291 291 rg_prof_start("repo_delete"); rg_prof_start("repo_delete");
292
293 292 rg_log("repo_delete: rg_uid=" . $rg_ui['uid'] . ", repo_id=$repo_id"); rg_log("repo_delete: rg_uid=" . $rg_ui['uid'] . ", repo_id=$repo_id");
294 293
295 294 // TODO: Check rights // TODO: Check rights
 
... ... function rg_repo_delete($db, $repo_id, $rg_ui)
304 303 rg_sql_free_result($res); rg_sql_free_result($res);
305 304
306 305 rg_prof_end("repo_delete"); rg_prof_end("repo_delete");
307
308 306 return TRUE; return TRUE;
309 307 } }
310 308
 
... ... function rg_repo_delete($db, $repo_id, $rg_ui)
315 313 function rg_repo_update($db, $user, &$new) function rg_repo_update($db, $user, &$new)
316 314 { {
317 315 rg_prof_start("repo_update"); rg_prof_start("repo_update");
318
319 316 rg_log("repo_update: user=" . $user rg_log("repo_update: user=" . $user
320 . " repo_id=" . $new['repo_id']
321 . " name=[" . $new['name'] . "]"
322 . " max_commit_size=" . $new['max_commit_size']
323 . " description=[" . $new['description'] . "]"
324 . " default_rights=" . $new['default_rights']
325 . " max_users=" . $new['max_users']);
317 . " new=" . rg_array2string($new));
326 318
327 319 if (rg_repo_ok($new['name']) !== TRUE) if (rg_repo_ok($new['name']) !== TRUE)
328 320 return FALSE; return FALSE;
 
... ... function rg_repo_update($db, $user, &$new)
364 356 rg_sql_free_result($res); rg_sql_free_result($res);
365 357
366 358 rg_prof_end("repo_update"); rg_prof_end("repo_update");
367
368 359 return TRUE; return TRUE;
369 360 } }
370 361
 
... ... function rg_repo_update($db, $user, &$new)
374 365 function rg_repo_list_query($db, $url, $sql) function rg_repo_list_query($db, $url, $sql)
375 366 { {
376 367 rg_prof_start("repo_list_query"); rg_prof_start("repo_list_query");
377
378 368 rg_log("repo_list_query: url=$url, sql=$sql..."); rg_log("repo_list_query: url=$url, sql=$sql...");
379 369
380 370 $res = rg_sql_query($db, $sql); $res = rg_sql_query($db, $sql);
 
... ... function rg_repo_list_query($db, $url, $sql)
433 423 rg_sql_free_result($res); rg_sql_free_result($res);
434 424
435 425 rg_prof_end("repo_list_query"); rg_prof_end("repo_list_query");
436
437 426 return rg_template_table("repo/list", $d, array()); return rg_template_table("repo/list", $d, array());
438 427 } }
439 428
 
... ... function rg_repo_rights_set($db, $ri, $uid, $rights)
587 576 /* /*
588 577 * List rights for a repo * List rights for a repo
589 578 */ */
590 function rg_repo_rights_list($db, $ri, $url)
579 function rg_repo_rights_load($db, $ri)
591 580 { {
592 rg_log("rg_repo_rights_list: repo_id=" . $ri['repo_id'] . " url=$url");
581 rg_log("rg_repo_rights_load: repo_id=" . $ri['repo_id']);
593 582
594 $r = rg_rights_list($db, "repo", $ri['repo_id'], $url);
583 $r = rg_rights_load($db, "repo", $ri['repo_id']);
595 584 if ($r === FALSE) { if ($r === FALSE) {
596 585 rg_repo_set_error("Cannot list rights (" . rg_rights_error() . ")"); rg_repo_set_error("Cannot list rights (" . rg_rights_error() . ")");
597 586 return FALSE; return FALSE;
File inc/rights.inc.php changed (mode: 100644) (index dd6adbf..ca76c1a)
... ... function rg_rights_get($db, $type, $obj_id, $uid)
155 155 return $ret; return $ret;
156 156 } }
157 157
158 $sql = "SELECT rights FROM rights"
158 $sql = "SELECT itime, rights FROM rights"
159 159 . " WHERE type = '$type'" . " WHERE type = '$type'"
160 160 . " AND uid = $uid" . " AND uid = $uid"
161 161 . " AND obj_id = $obj_id" . " AND obj_id = $obj_id"
 
... ... function rg_rights_get($db, $type, $obj_id, $uid)
173 173 $row = rg_sql_fetch_array($res); $row = rg_sql_fetch_array($res);
174 174 rg_sql_free_result($res); rg_sql_free_result($res);
175 175 if ($rows > 0) { if ($rows > 0) {
176 $ret['itime'] = $row['itime'];
176 177 $ret['rights'] = $row['rights']; $ret['rights'] = $row['rights'];
177 178 $ret['exists'] = 1; $ret['exists'] = 1;
178 179 } }
 
... ... function rg_rights_set($db, $type, $obj_id, $uid, $rights)
226 227 } }
227 228
228 229 /* /*
229 * List rights for a repo
230 * Returns an array with the rights
230 231 */ */
231 function rg_rights_list($db, $type, $obj_id, $url)
232 function rg_rights_load($db, $type, $obj_id)
232 233 { {
233 234 global $rg_rights; global $rg_rights;
234 235
235 rg_log("rg_rights_list: type=$type obj_id=$obj_id url=$url");
236 rg_prof_start("rights_list");
237 rg_log("rg_rights_list: type=$type obj_id=$obj_id");
238
239 $ret = FALSE;
240 do {
241 $sql = "SELECT * FROM rights"
242 . " WHERE type = '$type'"
243 . " AND obj_id = $obj_id";
244 $res = rg_sql_query($db, $sql);
245 if ($res === FALSE) {
246 rg_rights_set_error("cannot get info (" . rg_sql_error() . ")!");
247 break;
248 }
236 249
237 $ret = "";
250 $ret = array();
251 while (($row = rg_sql_fetch_array($res))) {
252 $row['username'] = "?";
253 $_ui = rg_user_info($db, $row['uid'], "", "");
254 if ($_ui['exists'] == 1)
255 $row['username'] = $_ui['username'];
238 256
239 $sql = "SELECT * FROM rights WHERE type = '$type' AND obj_id = $obj_id";
240 $res = rg_sql_query($db, $sql);
241 if ($res === FALSE) {
242 rg_rights_set_error("cannot get info (" . rg_sql_error() . ")!");
243 return FALSE;
244 }
257 $_r = rg_rights_text($type, $row['rights']);
258 $row['rights_text'] = implode(", ", $_r);
245 259
246 $ret .= "<table>\n";
247 $ret .= "<tr>\n";
248 $ret .= " <th>User</th>\n";
249 $ret .= " <th>Rights</th>\n";
250 $ret .= " <th>Operations</th>\n";
251 $ret .= "</tr>\n";
252 while (($row = rg_sql_fetch_array($res))) {
253 $ret .= "<tr>\n";
254
255 $_u = $row['uid'];
256 $_ui = rg_user_info($db, $row['uid'], "", "");
257 if ($_ui['exists'] == 1)
258 $_u = $_ui['username'];
259
260 $ret .= " <td>" . $_u . "</td>\n";
261
262 $_r = rg_rights_text($type, $row['rights']);
263 $_r = implode("<br />\n", $_r);
264 $ret .= " <td>" . $_r . "</td>\n";
265
266 // operations
267 // remove
268 $ret .= " <td>";
269 $ret .= " <div class=\"menu\">";
270 $ret .= " <ul>";
271 $v = $row['uid'];
272 $ret .= "<li><a href=\"$url?remove_uid=$v\">Remove</a></li>\n";
273 $ret .= "<li><a href=\"$url?edit_uid=$v\">Edit</a></li>\n";
274 $ret .= " </ul>";
275 $ret .= " </div>";
276 $ret .= " </td>";
277 $ret .= "</tr>\n";
278 }
279 $ret .= "</table>\n";
280 rg_sql_free_result($res);
260 $row['itime_text'] = gmdate("Y-m-d H:i", $row['itime']);
261
262 // To avoid confusion
263 $row['right_uid'] = $row['uid'];
264 unset($row['uid']);
265
266 $ret[] = $row;
267 }
268 rg_sql_free_result($res);
269 } while (0);
281 270
271 rg_prof_end("rights_list");
282 272 return $ret; return $ret;
283 273 } }
284 274
File inc/user/pass/pass.php changed (mode: 100644) (index 3bbe000..28f3b0d)
1 1 <?php <?php
2 2 rg_log("/inc/user/pass/pass"); rg_log("/inc/user/pass/pass");
3 3
4 $my_more = $more;
4 $user_pass_more = $more;
5 5
6 6 $errmsg = array(); $errmsg = array();
7 7
 
... ... if ($doit == 1) {
40 40 } }
41 41
42 42 if ($show_form == 1) { if ($show_form == 1) {
43 $my_more['rg_action'] = rg_re_post($cop);
44 $my_more['HTML:errmsg'] = rg_template_errmsg($errmsg);
45 $my_more['rg_form_token'] = rg_token_get($db, $sid);
46 $my_more['old_pass'] = $old_pass;
47 $my_more['pass1'] = $pass1;
48 $my_more['pass2'] = $pass2;
49
50 $_pass .= rg_template("user/pass.html", $my_more);
43 $user_pass_more['rg_action'] = rg_re_post($cop);
44 $user_pass_more['HTML:errmsg'] = rg_template_errmsg($errmsg);
45 $user_pass_more['rg_form_token'] = rg_token_get($db, $sid);
46 $user_pass_more['old_pass'] = $old_pass;
47 $user_pass_more['pass1'] = $pass1;
48 $user_pass_more['pass2'] = $pass2;
49
50 $_pass .= rg_template("user/pass.html", $user_pass_more);
51 51 } }
52 52
53 53 ?> ?>
File inc/user/repo-page.php changed (mode: 100644) (index a9ef6ab..0e16ec4)
2 2 rg_log("/inc/user/repo-page"); rg_log("/inc/user/repo-page");
3 3
4 4 $_repo_page = ""; $_repo_page = "";
5 $user_more = $more;
5 6
6 7 if (rg_user_ok($rr['user']) !== TRUE) { if (rg_user_ok($rr['user']) !== TRUE) {
7 8 $_repo_page .= "Invalid user!"; $_repo_page .= "Invalid user!";
 
... ... if ($ui === FALSE) {
42 43 // TODO: should we test against $ri?! // TODO: should we test against $ri?!
43 44 $can_admin = (rg_repo_allow($db, $ri, $rg_ui, "A") === TRUE) ? 1 : 0; $can_admin = (rg_repo_allow($db, $ri, $rg_ui, "A") === TRUE) ? 1 : 0;
44 45
45 $_more = array(
46 $user_more = array(
46 47 "owner" => $rr['user'], "owner" => $rr['user'],
47 48 "url_user" => rg_re_userpage($ui), "url_user" => rg_re_userpage($ui),
48 49 "url_repo" => rg_re_repopage($ui, $rr['repo']), "url_repo" => rg_re_repopage($ui, $rr['repo']),
 
... ... $_more = array(
50 51 "git" => rg_re_repo_git($rr), "git" => rg_re_repo_git($rr),
51 52 "can_admin" => $can_admin "can_admin" => $can_admin
52 53 ); );
53 $_more = array_merge($_more, $ri);
54 $_more['default_rights'] = implode(", ", rg_rights_text("repo", $ri['default_rights']));
55 $_more['max_commit_size'] = $ri['max_commit_size'] == 0 ? "unlimited" : rg_1024($ri['max_commit_size']);
56 $_more['max_users'] = $ri['max_users'] == 0 ? "unlimited" : rg_1000($ri['max_users']);
57 $_more['hints'] = "";
54 $user_more = array_merge($user_more, $ri);
55 $user_more['default_rights'] = implode(", ", rg_rights_text("repo", $ri['default_rights']));
56 $user_more['max_commit_size'] = $ri['max_commit_size'] == 0 ? "unlimited" : rg_1024($ri['max_commit_size']);
57 $user_more['max_users'] = $ri['max_users'] == 0 ? "unlimited" : rg_1000($ri['max_users']);
58 $user_more['hints'] = "";
58 59
59 60 $repo_dir = rg_repo_name2base($rr) . $rr['repo'] . ".git"; $repo_dir = rg_repo_name2base($rr) . $rr['repo'] . ".git";
60 61 rg_log("repo_dir=$repo_dir"); rg_log("repo_dir=$repo_dir");
 
... ... putenv("GIT_DIR=$repo_dir");
64 65 if (empty($subop)) if (empty($subop))
65 66 $subop = "source"; $subop = "source";
66 67
67 $_more['repo_body'] = "";
68 $_more['repo_right'] = "";
69 $_more['branches_and_tags'] = "";
68 $user_more['repo_body'] = "";
69 $user_more['repo_right'] = "";
70 $user_more['branches_and_tags'] = "";
70 71 $_repo_body = ""; $_repo_body = "";
71 72 $_repo_right = ""; $_repo_right = "";
72 73
73 74 // build urls list // build urls list
74 75 $urls = array(); $urls = array();
75 76 if ($rg_ssh_port != 0) if ($rg_ssh_port != 0)
76 $urls[]['HTML:url'] = '<a href="' . $_more['ssh'] . '">' . $_more['ssh'] . '</a>';
77 $urls[]['HTML:url'] = '<a href="' . $user_more['ssh'] . '">' . $user_more['ssh'] . '</a>';
77 78 if ($rg_git_port != 0) if ($rg_git_port != 0)
78 $urls[]['HTML:url'] = '<a href="' . $_more['git'] . '">' . $_more['git'] . '</a>';
79 $_more['HTML:urls'] = rg_template_table("repo/urls", $urls, $_more);
79 $urls[]['HTML:url'] = '<a href="' . $user_more['git'] . '">' . $user_more['git'] . '</a>';
80 $user_more['HTML:urls'] = rg_template_table("repo/urls", $urls, $user_more);
80 81
81 82 if (strcmp($subop, "admin") == 0) { if (strcmp($subop, "admin") == 0) {
82 83 if ($can_admin != 1) if ($can_admin != 1)
 
... ... if (strcmp($subop, "admin") == 0) {
89 90
90 91 $type_ref = rg_git_parse_ref($paras); $type_ref = rg_git_parse_ref($paras);
91 92 $ref = $type_ref['ref_path']; $ref = $type_ref['ref_path'];
92 $_more = array_merge($_more, $type_ref);
93 $user_more = array_merge($user_more, $type_ref);
93 94
94 $bt = rg_git_branches_and_tags($repo_dir, $_more['url_repo'],
95 $bt = rg_git_branches_and_tags($repo_dir, $user_more['url_repo'],
95 96 $type_ref['ref_url']); $type_ref['ref_url']);
96 rg_log("DEBUG: _more: " . rg_array2string($_more));
97 $_more = array_merge($_more, $bt);
97 rg_log("DEBUG: user_more: " . rg_array2string($user_more));
98 $user_more = array_merge($user_more, $bt);
98 99
99 100 $hints = array(); $hints = array();
100 101 if ($rg_ssh_port != 0) if ($rg_ssh_port != 0)
101 $hints[]['HTML:hint'] = rg_template("hints/repo/clone_ssh.html", $_more);
102 $hints[]['HTML:hint'] = rg_template("hints/repo/clone_ssh.html", $user_more);
102 103 if ($rg_git_port != 0) if ($rg_git_port != 0)
103 $hints[]['HTML:hint'] = rg_template("hints/repo/clone_git.html", $_more);
104 $hints[]['HTML:hint'] = rg_template("hints/repo/clone_git.html", $user_more);
104 105 if (rg_rights_allow($ri['default_rights'], "H")) // anonymous push? if (rg_rights_allow($ri['default_rights'], "H")) // anonymous push?
105 $hints[]['HTML:hint'] = rg_template("hints/repo/anon_push.html", $_more);
106 $hints[]['HTML:hint'] = rg_template("hints/repo/anon_push.html", $user_more);
106 107 rg_log("DEBUG: hints1: " . rg_array2string($hints)); rg_log("DEBUG: hints1: " . rg_array2string($hints));
107 $_more['HTML:hints'] = rg_template_table("hints/list", $hints, $_more);
108 rg_log("DEBUG: hints: " . $_more['HTML:hints']);
108 $user_more['HTML:hints'] = rg_template_table("hints/list", $hints, $user_more);
109 rg_log("DEBUG: hints: " . $user_more['HTML:hints']);
109 110
110 $_repo_body .= rg_template("repo/source.html", $_more);
111 $_repo_body .= rg_template("repo/source.html", $user_more);
111 112
112 113 rg_log("DEBUG: subop=[$subop]"); rg_log("DEBUG: subop=[$subop]");
113 114 if (strcmp($subop, "tree") == 0) { if (strcmp($subop, "tree") == 0) {
 
... ... if (strcmp($subop, "admin") == 0) {
116 117 if (strcmp($type, "blob") == 0) { if (strcmp($type, "blob") == 0) {
117 118 // find hash of blob // find hash of blob
118 119 $_path = implode("/", $paras); $_path = implode("/", $paras);
119 $_more['path'] = "/" . $_path;
120 $user_more['path'] = "/" . $_path;
120 121 $_tree = rg_git_ls_tree($ref, $_path); $_tree = rg_git_ls_tree($ref, $_path);
121 122 if ($_tree === FALSE) { if ($_tree === FALSE) {
122 123 $_repo_body .= "Invalid path!"; $_repo_body .= "Invalid path!";
 
... ... if (strcmp($subop, "admin") == 0) {
130 131 ); );
131 132 $blob = array_merge($blob, $_content); $blob = array_merge($blob, $_content);
132 133 $_repo_body .= rg_template("repo/blob.html", $_repo_body .= rg_template("repo/blob.html",
133 array_merge($blob, $_more));
134 array_merge($blob, $user_more));
134 135 } }
135 136 } else if (strcmp($type, "tree") == 0) { } else if (strcmp($type, "tree") == 0) {
136 137 // find treeish of dir // find treeish of dir
137 138 $_path = implode("/", $paras); $_path = implode("/", $paras);
138 $_more['path'] = "/" . $_path;
139 $user_more['path'] = "/" . $_path;
139 140 $_tree = rg_git_ls_tree($ref, $_path); $_tree = rg_git_ls_tree($ref, $_path);
140 141 if ($_tree === FALSE) { if ($_tree === FALSE) {
141 142 $_repo_body .= "Invalid path!"; $_repo_body .= "Invalid path!";
142 143 } else { } else {
143 144 $_hash = $_tree[0]['ref']; $_hash = $_tree[0]['ref'];
144 145 $_tree = rg_git_ls_tree($_hash, ""); $_tree = rg_git_ls_tree($_hash, "");
145 $_repo_body .= rg_template_table("repo/tree", $_tree, $_more);
146 $_repo_body .= rg_template_table("repo/tree", $_tree, $user_more);
146 147 } }
147 148 } else { // default is to show root tree } else { // default is to show root tree
148 $_more['path'] = "";
149 $user_more['path'] = "";
149 150 $_tree = rg_git_ls_tree($ref, ""); $_tree = rg_git_ls_tree($ref, "");
150 $_repo_body .= rg_template_table("repo/tree", $_tree, $_more);
151 $_repo_body .= rg_template_table("repo/tree", $_tree, $user_more);
151 152 } }
152 153 } else { // log is default } else { // log is default
153 154 // show the log // show the log
 
... ... if (strcmp($subop, "admin") == 0) {
157 158 $_repo_body .= "Error generating log!"; $_repo_body .= "Error generating log!";
158 159 // TODO: rg_internal_error? // TODO: rg_internal_error?
159 160 } else if (empty($log)) { } else if (empty($log)) {
160 $_repo_body .= rg_template("repo/not_init.html", $_more);
161 $_repo_body .= rg_template("repo/not_init.html", $user_more);
161 162 } else { } else {
162 163 //rg_log("DEBUG: log: " . print_r($log, TRUE)); //rg_log("DEBUG: log: " . print_r($log, TRUE));
163 164 $_repo_body .= rg_git_log_template($log, $_repo_body .= rg_git_log_template($log,
164 "repo/log", $_more);
165 "repo/log", $user_more);
165 166 } }
166 167
167 168 $type = array_shift($paras); $type = array_shift($paras);
 
... ... if (strcmp($subop, "admin") == 0) {
190 191 $_repo_body .= rg_git_diff($log[0]['patches'], "repo/diff.html"); $_repo_body .= rg_git_diff($log[0]['patches'], "repo/diff.html");
191 192 } }
192 193 } }
193 $_repo_right = rg_template("repo/source_r.html", $_more);
194 $_repo_right = rg_template("repo/source_r.html", $user_more);
194 195 } else if (strcmp($subop, "bug") == 0) { } else if (strcmp($subop, "bug") == 0) {
195 196 include($INC . "/user/repo/bug/main.php"); include($INC . "/user/repo/bug/main.php");
196 $_repo_body .= rg_template("repo/bug/main.html", $_more);
197 $_repo_body .= rg_template("repo/bug/main.html", $user_more);
197 198 } else if (strcmp($subop, "stats") == 0) { } else if (strcmp($subop, "stats") == 0) {
198 $_repo_body .= rg_template("repo/stats.html", $_more);
199 $_repo_body .= rg_template("repo/stats.html", $user_more);
199 200 } else if (strcmp($subop, "mr") == 0) { } else if (strcmp($subop, "mr") == 0) {
200 201 if (empty($paras[0])) { if (empty($paras[0])) {
201 $_repo_body .= rg_template("repo/mrs.html", $_more);
202 $_repo_body .= rg_template("repo/mrs.html", $user_more);
202 203
203 204 $r = rg_mr_load($db, $ri['repo_id'], 20); $r = rg_mr_load($db, $ri['repo_id'], 20);
204 205 if ($r === FALSE) { if ($r === FALSE) {
205 206 $_repo_body .= "Error getting merge request list (" $_repo_body .= "Error getting merge request list ("
206 207 . rg_mr_error() . ")."; . rg_mr_error() . ").";
207 208 } else { } else {
208 $_repo_body .= rg_template_table("repo/mr/list", $r, $_more);
209 $_repo_body .= rg_template_table("repo/mr/list", $r, $user_more);
209 210 } }
210 211 } else { } else {
211 212 $mr = preg_replace('/[^0-9a-zA-Z_]/', '', $paras[0]); $mr = preg_replace('/[^0-9a-zA-Z_]/', '', $paras[0]);
 
... ... if (strcmp($subop, "admin") == 0) {
222 223 break; break;
223 224 } }
224 225
225 $mri['HTML:diff'] = rg_git_log_template($_log, "repo/log", $_more);
226 $_repo_body .= rg_template("repo/mr/page.html", $mri, $_more);
226 $mri['HTML:diff'] = rg_git_log_template($_log, "repo/log", $user_more);
227 $_repo_body .= rg_template("repo/mr/page.html", $mri, $user_more);
227 228 } while (0); } while (0);
228 229 } }
229 230 } }
230 231
231 $_more['HTML:repo_body'] = $_repo_body;
232 $_more['HTML:repo_right'] = $_repo_right;
233 $_repo_page = rg_template("repo/main.html", $_more);
232 $user_more['HTML:repo_body'] = $_repo_body;
233 $user_more['HTML:repo_right'] = $_repo_right;
234 $_repo_page = rg_template("repo/main.html", $user_more);
234 235 ?> ?>
File inc/user/repo/admin.php changed (mode: 100644) (index 606e967..68431ee)
2 2 rg_log("/inc/user/repo/admin"); rg_log("/inc/user/repo/admin");
3 3
4 4 $_admin_body = ""; $_admin_body = "";
5 $repo_admin_more = $more;
5 6
7 // TODO: we must set the url globally, in index.php!
6 8 $_url_admin = rg_re_repopage($rg_ui, $rr['repo']) . "/admin"; $_url_admin = rg_re_repopage($rg_ui, $rr['repo']) . "/admin";
7 9
8 $_admin_more = array_merge($more, $ri);
9 $_admin_more['url_admin'] = $_url_admin;
10 $repo_admin_more = array_merge($repo_admin_more, $ri);
11 $repo_admin_more['url_admin'] = $_url_admin;
10 12
11 13 $_op = empty($paras) ? "" : $paras[0]; $_op = empty($paras) ? "" : $paras[0];
12 14 switch ($_op) { switch ($_op) {
 
... ... default:
33 35 } }
34 36
35 37 // menu // menu
36 $_admin_menu = rg_template("repo/admin.html", $_admin_more);
38 $_admin_menu = rg_template("repo/admin.html", $repo_admin_more);
37 39
38 40 $_admin = $_admin_menu . $_admin_body; $_admin = $_admin_menu . $_admin_body;
39 41
File inc/user/repo/bug/add/add.php changed (mode: 100644) (index 50efdb4..5322483)
1 1 <?php <?php
2 2 rg_log("/inc/user/repo/bug/add/add"); rg_log("/inc/user/repo/bug/add/add");
3 3
4 $bug_more = $_more;
4 $bug_add_more = $repo_bug_more;
5 5 $_bug_add = ""; $_bug_add = "";
6 6 $bug_errmsg = array(); $bug_errmsg = array();
7 7
 
... ... if ($doit == 0) {
53 53 } while (0); } while (0);
54 54 } }
55 55
56 $bug_more = array_merge($bug_more, $_x);
57 $bug_more['HTML:bug_errmsg'] = rg_template_errmsg($bug_errmsg);
58 $bug_more['bug_action'] = "Add bug";
59 $bug_more['rg_action'] = rg_re_post($cop);
60 $bug_more['rg_form_token'] = rg_token_get($db, $sid);
61 $bug_more['HTML:state_select'] = rg_bug_state_select($_x['state']);
62 $_bug_add .= rg_template("repo/bug/bug_add.html", $bug_more);
56 $bug_add_more = array_merge($bug_add_more, $_x);
57 $bug_add_more['HTML:bug_errmsg'] = rg_template_errmsg($bug_errmsg);
58 $bug_add_more['bug_action'] = "Add bug";
59 $bug_add_more['rg_action'] = rg_re_post($cop);
60 $bug_add_more['rg_form_token'] = rg_token_get($db, $sid);
61 $bug_add_more['HTML:state_select'] = rg_bug_state_select($_x['state']);
62 $_bug_add .= rg_template("repo/bug/bug_add.html", $bug_add_more);
63 63 ?> ?>
File inc/user/repo/bug/main.php changed (mode: 100644) (index 71fdb4d..43696d4)
1 1 <?php <?php
2 2 rg_log("/inc/user/repo/bug/main"); rg_log("/inc/user/repo/bug/main");
3 3
4 $repo_bug_more = $repo_admin_more;
4 5 $_bug_body = ""; $_bug_body = "";
5 6
6 $_more['can_save'] = $rg_ui['uid'] > 0 ? 1 : 0;
7 $repo_bug_more['can_save'] = $rg_ui['uid'] > 0 ? 1 : 0;
7 8
8 9 $_op = empty($paras) ? "list" : array_shift($paras); $_op = empty($paras) ? "list" : array_shift($paras);
9 10 switch ($_op) { switch ($_op) {
 
... ... case 'list': /* list */
41 42 $_bug_body .= "Error: cannot load all searches!"; // TODO $_bug_body .= "Error: cannot load all searches!"; // TODO
42 43 } else { } else {
43 44 $_bug_body .= rg_template_table("repo/bug/search/list", $_bug_body .= rg_template_table("repo/bug/search/list",
44 $r, $_more);
45 $r, $repo_bug_more);
45 46 } }
46 47
47 48 $filter = rg_bug_search_load($db, $ri['repo_id'], $rg_ui['uid'], $_search); $filter = rg_bug_search_load($db, $ri['repo_id'], $rg_ui['uid'], $_search);
 
... ... case 'list': /* list */
51 52 } }
52 53
53 54 if (isset($filter['name'])) if (isset($filter['name']))
54 $_more['search_name'] = $filter['name'];
55 $repo_bug_more['search_name'] = $filter['name'];
55 56
56 $r = rg_bug_search($db, $_more['url_repo'], $ri['repo_id'],
57 $r = rg_bug_search($db, $repo_bug_more['url_repo'], $ri['repo_id'],
57 58 $rg_ui['uid'], $filter); $rg_ui['uid'], $filter);
58 59 if ($r === FALSE) if ($r === FALSE)
59 60 $_bug_body .= "Error: Cannot search bugs!"; // TODO: do something OK here! $_bug_body .= "Error: Cannot search bugs!"; // TODO: do something OK here!
 
... ... case 'list': /* list */
62 63
63 64 // Show remove for custom search // Show remove for custom search
64 65 if (isset($filter['standard']) && ($filter['standard'] == 0)) { if (isset($filter['standard']) && ($filter['standard'] == 0)) {
65 $_remove_more = $_more;
66 $_remove_more = $repo_bug_more;
66 67 $_remove_more['rg_action'] = $_url . "/list/" . $filter['name']; $_remove_more['rg_action'] = $_url . "/list/" . $filter['name'];
67 68 $_remove_more['rg_form_token'] = rg_token_get($db, $sid); $_remove_more['rg_form_token'] = rg_token_get($db, $sid);
68 69 $_remove_more['search_remove_errmsg'] = ""; $_remove_more['search_remove_errmsg'] = "";
 
... ... default: // go directly to a bug
76 77 if ($bug_id == 0) { if ($bug_id == 0) {
77 78 rg_log("BAD, invalid op=$_op!"); rg_log("BAD, invalid op=$_op!");
78 79 } else { } else {
79 include($INC . "/user/repo/bug/show.php");
80 include($INC . "/user/repo/bug/show/show.php");
80 81 $_bug_body .= $_bug_show; $_bug_body .= $_bug_show;
81 82 } }
82 83 } }
83 84
84 $_more['HTML:bug_body'] = $_bug_body;
85 $repo_bug_more['HTML:bug_body'] = $_bug_body;
85 86 ?> ?>
File inc/user/repo/bug/search/search.php changed (mode: 100644) (index 8655c62..e76bd77)
1 1 <?php <?php
2 2 rg_log("/inc/user/repo/bug/search/search"); rg_log("/inc/user/repo/bug/search/search");
3 3
4 $_my_more = $_more;
4 $bug_search_more = $repo_bug_more;
5 5 $_bug_search = ""; $_bug_search = "";
6 6 $bug_errmsg = array(); $bug_errmsg = array();
7 7
 
... ... if ($doit == 0) {
56 56 } while (0); } while (0);
57 57 } }
58 58
59 $_my_more = array_merge($_my_more, $_x);
60 $_my_more['HTML:bug_errmsg'] = rg_template_errmsg($bug_errmsg);
61 $_my_more['rg_action'] = rg_re_post($cop);
62 $_my_more['HTML:state_select'] = rg_bug_state_select($_x['state']);
63 $_bug_search .= rg_template("repo/bug/search/search.html", $_my_more);
59 $bug_search_more = array_merge($bug_search_more, $_x);
60 $bug_search_more['HTML:bug_errmsg'] = rg_template_errmsg($bug_errmsg);
61 $bug_search_more['rg_action'] = rg_re_post($cop);
62 $bug_search_more['HTML:state_select'] = rg_bug_state_select($_x['state']);
63 $_bug_search .= rg_template("repo/bug/search/search.html", $bug_search_more);
64 64 ?> ?>
File inc/user/repo/bug/show/show.php renamed from inc/user/repo/bug/show.php (similarity 52%) (mode: 100644) (index 18b1972..7d06a6e)
1 1 <?php <?php
2 2 rg_log("/inc/user/repo/bug/show"); rg_log("/inc/user/repo/bug/show");
3 3
4 $repo_bug_show_more = $repo_bug_more;
4 5 $_bug_show = ""; $_bug_show = "";
5 6
6 $_my_more = $_more;
7 $_my_more['bug_id'] = $bug_id;
7 $repo_bug_show_more['bug_id'] = $bug_id;
8 8
9 9 $ibug = rg_bug_info($db, $ri['repo_id'], $bug_id); $ibug = rg_bug_info($db, $ri['repo_id'], $bug_id);
10 10 if ($ibug === FALSE) if ($ibug === FALSE)
11 11 rg_fatal("Cannot lookup bug!"); rg_fatal("Cannot lookup bug!");
12 12 if ($ibug['exists'] != 1) { if ($ibug['exists'] != 1) {
13 $_bug_body .= rg_template("repo/bug/not_found.html", $_my_more);
13 $_bug_body .= rg_template("repo/bug/not_found.html", $repo_bug_show_more);
14 14 return; return;
15 15 } }
16 16
17 $_my_more = array_merge($_my_more, $ibug);
17 $repo_bug_show_more = array_merge($repo_bug_show_more, $ibug);
18 18
19 19 // insert? // insert?
20 20 $doit = rg_var_uint("doit"); $doit = rg_var_uint("doit");
21 21 $note_errmsg = array(); $note_errmsg = array();
22 22 if ($doit == 0) { if ($doit == 0) {
23 23 // default values // default values
24 $_my_more['note'] = "";
24 $repo_bug_show_more['note'] = "";
25 25 } else { } else {
26 26 do { do {
27 27 $token = rg_var_str("token"); $token = rg_var_str("token");
 
... ... if ($doit == 0) {
47 47 } }
48 48
49 49 // prepare form for other note // prepare form for other note
50 $_my_more['note'] = "";
50 $repo_bug_show_more['note'] = "";
51 51 } while (0); } while (0);
52 52 } }
53 53
54 54 // load labels // load labels
55 55 $labels = rg_bug_label_get($db, $ri['repo_id'], $bug_id); $labels = rg_bug_label_get($db, $ri['repo_id'], $bug_id);
56 56 if ($labels === FALSE) if ($labels === FALSE)
57 $_my_more['HTML:labels'] = "Cannot load labels!";
57 $repo_bug_show_more['HTML:labels'] = "Cannot load labels!";
58 58 else else
59 $_my_more['HTML:labels'] = rg_bug_label_html($db, $ri['repo_id'], $bug_id);
59 $repo_bug_show_more['HTML:labels'] = rg_bug_label_html($db, $ri['repo_id'], $bug_id);
60 60
61 61 // load notes // load notes
62 62 $notes = rg_bug_note_list($db, $ri['repo_id'], $bug_id, 0); $notes = rg_bug_note_list($db, $ri['repo_id'], $bug_id, 0);
63 63 if ($notes === FALSE) if ($notes === FALSE)
64 $_my_more['HTML:notes'] = "Cannot load notes!";
64 $repo_bug_show_more['HTML:notes'] = "Cannot load notes!";
65 65 else else
66 $_my_more['HTML:notes'] = rg_template_table("repo/bug/list_note", $notes, $_my_more);
66 $repo_bug_show_more['HTML:notes'] = rg_template_table("repo/bug/list_note", $notes, $repo_bug_show_more);
67 67
68 68 // add note form // add note form
69 $_my_more['HTML:note_errmsg'] = rg_template_errmsg($note_errmsg);
69 $repo_bug_show_more['HTML:note_errmsg'] = rg_template_errmsg($note_errmsg);
70 70
71 $_my_more['rg_action'] = rg_re_post($cop);
72 $_my_more['rg_form_token'] = rg_token_get($db, $sid);
73 $_my_more['HTML:note_add'] = rg_template("repo/bug/note_add.html", $_my_more);
71 $repo_bug_show_more['rg_action'] = rg_re_post($cop);
72 $repo_bug_show_more['rg_form_token'] = rg_token_get($db, $sid);
73 $repo_bug_show_more['HTML:note_add'] = rg_template("repo/bug/note_add.html", $repo_bug_show_more);
74 74
75 $_bug_show .= rg_template("repo/bug/show.html", $_my_more);
75 $_bug_show .= rg_template("repo/bug/show.html", $repo_bug_show_more);
76 76 ?> ?>
File inc/user/repo/edit/edit.php changed (mode: 100644) (index b554608..a8db7bd)
2 2 rg_log("/inc/user/repo/edit/edit"); rg_log("/inc/user/repo/edit/edit");
3 3
4 4 $_edit = ""; $_edit = "";
5 $repo_edit_more = $repo_admin_more;
5 6
6 7 $errmsg = array(); $errmsg = array();
7 8
 
... ... if ($doit == 1) {
27 28 $errmsg[] = "internal error"; $errmsg[] = "internal error";
28 29 break; break;
29 30 } else if ($_ui['exists'] != 1) { } else if ($_ui['exists'] != 1) {
30 $errmsg[] = "user <b>$user</b> does not exists";
31 $errmsg[] = "user [$user] does not exists";
31 32 break; break;
32 33 } }
33 34
File inc/user/repo/rights/form.html added (mode: 100644) (index 0000000..41f9ca0)
1 <div class="formarea">
2
3 <div class="formarea_title">Grant rights</div><br />
4
5 @@errmsg@@
6
7 <form method="post" action="@@rg_action@@">
8 <input type="hidden" name="repo_id" value="@@repo_id@@" />
9 <input type="hidden" name="doit" value="1" />
10 <input type="hidden" name="token" value="@@rg_form_token@@" />
11
12 <label class="form_item_title" for="target_user">User</label><br />
13 <input type="text" name="target_user" value="@@target_user@@" />
14 <br />
15 <br />
16
17 <label class="form_item_title" for="rights">Rights</label><br />
18 @@rights_checkboxes@@
19 <br />
20
21 <input type="submit" name="button" value="Grant" />
22
23 </form>
24 </div>
File inc/user/repo/rights/rights.form.php deleted (index 7c38e5c..0000000)
1 <?php
2 $_form = '<div class="formarea">' . "\n";
3
4 $_form .= '<div class="formarea_title">Grant rights</div><br />' . "\n";
5
6 $_form .= rg_template_errmsg($errmsg);
7
8 $_form .= '
9 <form method="post" action="' . rg_re_post($cop) . '">
10 <input type="hidden" name="repo_id" value="' . $repo_id . '" />
11 <input type="hidden" name="doit" value="1" />
12 <input type="hidden" name="token" value="' . rg_token_get($db, $sid) . '" />
13
14 <label class="form_item_title" for="target_user">User</label><br />
15 <input type="text" name="target_user" value="' . $target_user . '" />
16 <br />
17 <br />
18
19 <label class="form_item_title" for="rights">Rights</label><br />
20 ' . rg_rights_checkboxes("repo", $rights) . '
21 <br />
22
23 <input type="submit" name="button" value="Grant" />
24
25 </form>
26 </div>
27 ';
28
29 ?>
File inc/user/repo/rights/rights.php changed (mode: 100644) (index eb13654..7eb1660)
1 1 <?php <?php
2 2 rg_log("/inc/user/repo/rights/rights"); rg_log("/inc/user/repo/rights/rights");
3 3
4 $repo_rights_more = $repo_admin_more;
5 $_rights = "";
6
4 7 $target_user = rg_var_str("target_user"); $target_user = rg_var_str("target_user");
5 8 $rights = rg_rights_a2s(rg_var_str("rights")); $rights = rg_rights_a2s(rg_var_str("rights"));
6 9 $remove_uid = rg_var_uint("remove_uid"); $remove_uid = rg_var_uint("remove_uid");
7 10 $edit_uid = rg_var_uint("edit_uid"); $edit_uid = rg_var_uint("edit_uid");
8 11
9 $_rights = "";
10
11 12 // we need it in forms // we need it in forms
12 13 $repo_id = $ri['repo_id']; $repo_id = $ri['repo_id'];
13 14
 
... ... while ($doit == 1) {
54 55 // lookup user // lookup user
55 56 $_ui = rg_user_info($db, 0, $target_user, ""); $_ui = rg_user_info($db, 0, $target_user, "");
56 57 if ($_ui['exists'] != 1) { if ($_ui['exists'] != 1) {
57 $errmsg[] = "user <b>$target_user</b> does not exists";
58 $errmsg[] = "user [$target_user] does not exists";
58 59 rg_log("User $target_user does not exists (" . rg_repo_error() . ")!"); rg_log("User $target_user does not exists (" . rg_repo_error() . ")!");
59 60 break; break;
60 61 } }
 
... ... while ($doit == 1) {
72 73 } }
73 74
74 75 // list rights // list rights
75 $_rights .= rg_repo_rights_list($db, $ri, $_url_admin . "/rights");
76 $rights_list = rg_repo_rights_load($db, $ri);
77 if ($rights_list === FALSE)
78 $_rights .= rg_warning("Cannot load rights. Try later");
79 else
80 $_rights .= rg_template_table("user/repo/rights/list", $rights_list, $repo_rights_more);
76 81
77 82 $_rights .= "<br />\n"; $_rights .= "<br />\n";
78 83
79 include($INC . "/user/repo/rights/rights.form.php");
80 $_rights .= $_form;
84 $repo_rights_more['rg_action'] = $cop;
85 $repo_rights_more['rg_form_token'] = rg_token_get($db, $sid);
86 $repo_rights_more['HTML:errmsg'] = rg_template_errmsg($errmsg);
87 $repo_rights_more['HTML:rights_checkboxes'] = rg_rights_checkboxes("repo", $rights);
88 $_rights .= rg_template("user/repo/rights/form.html", $repo_rights_more);
81 89 ?> ?>
File root/index.php changed (mode: 100644) (index 8c3520d..d95974b)
... ... $op = ""; $subop = ""; $subsubop = ""; $cop = "";
26 26 $rr = array("user" => "", "repo" => "", "prefix" => ""); $rr = array("user" => "", "repo" => "", "prefix" => "");
27 27 $paras = array(); $paras = array();
28 28 $rg_ui = array(); $rg_ui = array();
29 $more = array();
29 30
30 31 // We have variable 'vv' passed from webserver - build 'op' and rest of paras // We have variable 'vv' passed from webserver - build 'op' and rest of paras
31 32 $vv = rg_var_str("vv"); $vv = rg_var_str("vv");
 
... ... if (strcmp($vv, "/") == 0) { // main page for site (not for user)
70 71 } }
71 72 $cop = $vv; $cop = $vv;
72 73 } }
74 $more['url'] = $cop;
73 75
74 76
75 77 $doit = rg_var_uint("doit"); $doit = rg_var_uint("doit");
File root/themes/default/main.css changed (mode: 100644) (index 799f323..83062c4)
... ... form input[type="submit"] {
116 116 border: 0; border: 0;
117 117 border-spacing: 0; border-spacing: 0;
118 118 background-color: #FFFFFF; background-color: #FFFFFF;
119 margin: 3px 0 3px 0;
119 120 } }
120 121 #header table td { #header table td {
121 122 padding: 0 10px 0 0; padding: 0 10px 0 0;
File root/themes/default/user/repo/rights/list/footer.html added (mode: 100644) (index 0000000..6daf5cd)
1 </table>
2
3 <input type="submit" name="button" value="Delete selected rights" />
4 </form>
5 </div>
File root/themes/default/user/repo/rights/list/header.html copied from file root/themes/default/user/keys/list/header.html (similarity 54%) (mode: 100644) (index 0d20c77..e8ec802)
1 <div class="rg_keys_list">
1 <div class="repo_rights">
2 2
3 3 @@del_errmsg@@ @@del_errmsg@@
4 4
5 <form method="post" action="@@rg_action@@">
5 <form method="post" action="@@url@@">
6 6 <input type="hidden" name="delete" value="1" /> <input type="hidden" name="delete" value="1" />
7 7 <input type="hidden" name="token" value="@@rg_form_token@@" /> <input type="hidden" name="token" value="@@rg_form_token@@" />
8 8
9 9 <table> <table>
10 10 <tr> <tr>
11 11 <th>Select</th> <th>Select</th>
12 <th>User</th>
12 13 <th>Date (UTC)</th> <th>Date (UTC)</th>
13 <th>Fingerprint</th>
14 <th>Comment</th>
15 <th>Last use (UTC)</th>
16 <th>Last IP</th>
14 <th>Rights</th>
15 <th>Operations</th>
17 16 </tr> </tr>
18
File root/themes/default/user/repo/rights/list/line.html added (mode: 100644) (index 0000000..f43b969)
1 <tr>
2 <td><input type="checkbox" name="rights_delete_ids[@@rights_uid@@]" /></td>
3 <td>@@username@@</td>
4 <td>@@itime_text@@</td>
5 <td>@@rights_text@@</td>
6 <td>
7 <a href="@@url@@?edit_uid=@@right_uid@@">Edit</a>
8 </td>
9 </tr>
10
File root/themes/default/user/repo/rights/list/nodata.html copied from file root/themes/default/errmsg/nodata.html (similarity 100%)
File tests/repo.php changed (mode: 100644) (index 07ab152..c5880f9)
... ... if ($v === FALSE) {
165 165 } }
166 166
167 167 rg_log("list1"); rg_log("list1");
168 $r = rg_repo_rights_list($db, $ri, "/prj1");
168 $r = rg_repo_rights_load($db, $ri);
169 169 if ($r === FALSE) { if ($r === FALSE) {
170 170 rg_log("Cannot list rights (" . rg_repo_error() . ")"); rg_log("Cannot list rights (" . rg_repo_error() . ")");
171 171 exit(1); exit(1);
172 172 } }
173 // TODO: we should test if expected fields are returned!
173 174
174 175 rg_log("disk1"); rg_log("disk1");
175 176 $ri['disk_quota_mb'] = 10; $ri['disk_quota_mb'] = 10;
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/rocketgit

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/rocketgit

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master