List of commits:
Subject Hash Author Date (UTC)
Bulk 2f4b63e9e1810c8afa882ce2bc80b5c897541656 Catalin(ux) M. BOIE 2012-08-20 19:12:00
Bulk 140a93ef4ef01a02deb0d40069ad50a9831b12e6 Catalin(ux) M. BOIE 2012-08-17 21:21:15
Show labels on bug page. 9770087d9479e2853e2054adbe51174f0e64440f Catalin(ux) M. BOIE 2012-07-05 20:14:01
Now, bug inserts works 1f015ea792b00f3ba52cf88a7bb5b9975828fd8f Catalin(ux) M. BOIE 2012-07-04 23:02:10
Bulk 9d56cfb9031f9e09680e61e41614fce4f846e767 Catalin(ux) M. BOIE 2012-07-04 22:03:35
Bulk + first version of bug tracking b6a908e44053809a8c00c14e71aaea3fee524fd9 Catalin(ux) M. BOIE 2012-05-15 21:18:35
Bulk 61b4d6048dca4647c779777323e23347bc89d1c0 Catalin(ux) M. BOIE 2012-05-09 19:28:35
Bulk d05a5530f3dd7e29a58adf5003944806535e2a41 Catalin(ux) M. BOIE 2012-05-09 03:20:27
Bulk 152dd3be1dc42e1f3585d43750c3c1c42551ae27 Catalin(ux) M. BOIE 2012-04-19 04:06:55
Bulk 2ec92b1397e09b0714d1ee423dcd72f4a220b332 Catalin(ux) M. BOIE 2012-04-16 06:43:38
aa 63a5cea75e640e6c11975bf6ab1c7bc49747a6bb Catalin(ux) M. BOIE 2012-03-26 21:09:23
Misc fixes eac04dc796b2c315b65753025e1e311bc25e83d7 Catalin(ux) M. BOIE 2012-03-26 18:14:32
Fixes for schema autoupdate 63d2a1a4f4c0498135a96f1a3d374868dc3d3535 Catalin(ux) M. BOIE 2012-03-23 04:19:09
Test CSRF token for the rights for a repo. e2d32e100f724e80ee623f191784ce429156ac39 Catalin(ux) M. BOIE 2012-03-22 03:54:37
Fixed anon push without create branch rights 3d474b7a569b16d87a426d4c3b971a50b3299894 Catalin(ux) M. BOIE 2012-03-22 03:43:06
Use rg_repos for repositories e5bda9469fddee7f201c22dfd89292830f4c342b Catalin(ux) M. BOIE 2012-03-22 03:42:06
Corrected <label> tags 7e8621e79480b8964e04de8c54f10f1a702ea1fd Catalin(ux) M. BOIE 2012-03-20 04:25:38
Fixed unit testing 31bfe5672e7d3b620d0e7b3c07ff72d84c149001 Catalin(ux) M. BOIE 2012-03-17 17:21:21
Fixed hook_update.sh unit testing 86c4079e81efc5a4a7878e91d8f4318e443961f7 Catalin(ux) M. BOIE 2012-03-16 22:32:35
Bulk updates f696473a7faee50782d3cc01e96cc85e7900b3de Catalin(ux) M. BOIE 2012-03-14 04:38:23
Commit 2f4b63e9e1810c8afa882ce2bc80b5c897541656 - Bulk
Author: Catalin(ux) M. BOIE
Author date (UTC): 2012-08-20 19:12
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2012-08-20 19:12
Parent(s): 140a93ef4ef01a02deb0d40069ad50a9831b12e6
Signing key:
Tree: 0ecce4725391ae750d7df8b4a8393d7537fe3074
File Lines added Lines deleted
Compare.txt 1 1
TODO 7 9
admin/init.php 2 2
inc/admin/users/add.php 15 2
inc/admin/users/edit.php 15 2
inc/admin/users/user.form.php 6 2
inc/dispatch/dispatch.php 1 2
inc/main/main.php 0 10
inc/struct.inc.php 24 7
inc/user.inc.php 10 2
inc/user/create.php 4 2
inc/user/info/info.php 12 4
inc/user/pass/pass.php 1 1
inc/user/repo/edit/edit.php 1 1
inc/util.inc.php 3 0
root/index.php 16 8
root/themes/default/body.html 8 0
root/themes/default/index.html 5 12
scripts/cron.php 1 1
scripts/q.php 1 1
scripts/remote.php 1 1
tests/bug.php 1 1
tests/keys.php 1 1
tests/repo.php 1 1
tests/state.php 1 1
tests/user.php 1 1
File Compare.txt changed (mode: 100644) (index e5236e2..09b46cb)
... ... SELinux friendly ? Yes ? ?
7 7 Disto friendly No Yes No No Disto friendly No Yes No No
8 8 Bug tracker Yes Yes Yes ? Bug tracker Yes Yes Yes ?
9 9 CLI commands (SSH) ? Yes ? ? CLI commands (SSH) ? Yes ? ?
10
10 API ? ? Yes ?
11 11
12 12 [Details] [Details]
13 13 Language Ruby+Perl PHP Ruby Ruby Language Ruby+Perl PHP Ruby Ruby
File TODO changed (mode: 100644) (index 92d81dc..53e593e)
1 1 == BEFORE FIRST RELEASE! == == BEFORE FIRST RELEASE! ==
2 [ ] Fix rg_user_edit everywhere!
3 [ ] Fix PostgreSQL auth because httpd is in private tmp so we need TCP!
4 [ ] Cannot lock the schema upgrade because both web and cron try to own the lock!
5 Let only cron/q/remote to do it, in web just wait (or give error)
6 (or auto retry).
7 2 [ ] See diff for merge requests. [ ] See diff for merge requests.
8 [ ] Add possibility to reject merge requests, to apply, to delete etc.
9 3 [ ] JUNK1/JUNK2: http://rg.embedromix.ro:8000/user/catab/rocketgit/commit/afd1df2..f919c9b [ ] JUNK1/JUNK2: http://rg.embedromix.ro:8000/user/catab/rocketgit/commit/afd1df2..f919c9b
10 4 [ ] Confirmation e-mail comes from rg1. [ ] Confirmation e-mail comes from rg1.
11 5 [ ] rg_log: why the fd is NULL?! [ ] rg_log: why the fd is NULL?!
 
13 7 [ ] "log" does not list last entries! More exactly, seems the owner does not update repo! [ ] "log" does not list last entries! More exactly, seems the owner does not update repo!
14 8 [ ] @@branch@@ is not defined for merge requests. Should it? Probably yes, to filter them. [ ] @@branch@@ is not defined for merge requests. Should it? Probably yes, to filter them.
15 9 [ ] Create a repo and click on it; seems we get error (gabi)! [ ] Create a repo and click on it; seems we get error (gabi)!
16 [ ] Add real name to user info.
17 10 [ ] Add permission to add bug tracker to a project. [ ] Add permission to add bug tracker to a project.
18 [ ] Remove all @@DUMP@@s from templates.
11 [ ] Remove all @@ DUMP @@s from templates.
19 12 [ ] We are escaping when we insert in database _and_ when we output on screen! [ ] We are escaping when we insert in database _and_ when we output on screen!
20 13 What should we do? What should we do?
21 [ ] Do we need to escape some chars in console (ssh rocketgit@host repo X)?
22 14 [ ] [ ]
23 15
24 16
25 17 == Medium == == Medium ==
18 [ ] Check admin creatin of an account.
19 [ ] Add possibility to reject merge requests, to apply, to delete etc.
20 [ ] Do we need to escape some chars in console (ssh rocketgit@host repo X)?
21 [ ] We need to switch to a template for the user form to get rid of a lot of
22 mambo-jumbo with the _u array passed!
23 [ ] Show the API on the webpage, exactly like Blender.
26 24 [ ] We can pass in authorized_keys aslo the key id. Maybe for usage? [ ] We can pass in authorized_keys aslo the key id. Maybe for usage?
27 25 [ ] Migrate to a single function to deal with a request so we can do better [ ] Migrate to a single function to deal with a request so we can do better
28 26 unit testing. unit testing.
File admin/init.php changed (mode: 100644) (index da9d26f..5e293ee)
... ... if ($db === FALSE) {
21 21 exit(1); exit(1);
22 22 } }
23 23
24 $r = rg_sql_struct_update_if_needed($db, 0);
24 $r = rg_sql_struct_update($db, 0);
25 25 if ($r !== TRUE) { if ($r !== TRUE) {
26 26 echo "Cannot init structure. Check the logs!\n"; echo "Cannot init structure. Check the logs!\n";
27 27 exit(1); exit(1);
 
... ... while (1) {
68 68 continue; continue;
69 69 } }
70 70
71 $r = rg_user_edit($d $_u);
71 $r = rg_user_edit($db, $_u);
72 72 if ($r !== TRUE) { if ($r !== TRUE) {
73 73 echo "Cannot create user (" . rg_user_error() . ")!\n"; echo "Cannot create user (" . rg_user_error() . ")!\n";
74 74 continue; continue;
File inc/admin/users/add.php changed (mode: 100644) (index bb0b957..f3a981a)
... ... if ($doit == 1) {
12 12 } }
13 13
14 14 $xuser = rg_var_str("xuser"); $xuser = rg_var_str("xuser");
15 $realname = rg_var_str("realname");
15 16 $email = rg_var_str("email"); $email = rg_var_str("email");
16 17 $xpass = rg_var_str("xpass"); $xpass = rg_var_str("xpass");
17 18 $is_admin = rg_var_uint("is_admin"); $is_admin = rg_var_uint("is_admin");
 
... ... if ($doit == 1) {
41 42 break; break;
42 43 } }
43 44
44 if (!rg_user_edit($db, 0, $xuser, $email, $xpass, $is_admin,
45 $disk_quota_mb, $rights, $session_time, "")) {
45 $_u = array();
46 $_u['uid'] = 0;
47 $_u['username'] = $xuser;
48 $_u['realname'] = $realname;
49 $_u['email'] = $email;
50 $_u['pass'] = $xpass;
51 $_u['is_admin'] = $is_admin;
52 $_u['disk_quota_mb'] = $disk_quota_mb;
53 $_u['rights'] = $rights;
54 $_u['session_time'] = $session_time;
55 $_u['confirm_token'] = "";
56 if (!rg_user_edit($db, $_u)) {
46 57 $errmsg[] = "Cannot add user (" . rg_user_error() . ")."; $errmsg[] = "Cannot add user (" . rg_user_error() . ").";
47 58 break; break;
48 59 } }
 
... ... if ($doit == 1) {
54 65 } }
55 66 } else { } else {
56 67 $xuser = ""; $xuser = "";
68 $realname = "";
57 69 $email = ""; $email = "";
58 70 $xpass = ""; $xpass = "";
59 71 $is_admin = 0; $is_admin = 0;
 
... ... if ($doit == 1) {
62 74 $session_time = $rg_session_time; $session_time = $rg_session_time;
63 75 } }
64 76
77 $create_mode = 1;
65 78 $admin_mode = 1; $admin_mode = 1;
66 79 $pass_mode = 1; $pass_mode = 1;
67 80 include($INC . "/admin/users/user.form.php"); include($INC . "/admin/users/user.form.php");
File inc/admin/users/edit.php changed (mode: 100644) (index 8e48fa6..44aa430)
... ... if ($doit == 1) {
15 15 } }
16 16
17 17 $xuser = rg_var_str("xuser"); $xuser = rg_var_str("xuser");
18 $realname = rg_var_str("realname");
18 19 $email = rg_var_str("email"); $email = rg_var_str("email");
19 20 $xpass = rg_var_str("xpass"); $xpass = rg_var_str("xpass");
20 21 $is_admin = rg_var_uint("is_admin"); $is_admin = rg_var_uint("is_admin");
 
... ... if ($doit == 1) {
34 35 break; break;
35 36 } }
36 37
37 if (!rg_user_edit($db, $uid, $xuser, $email, $xpass,
38 $is_admin, $disk_quota_mb, $rights, $session_time, "")) {
38 $_u = array();
39 $_u['uid'] = $uid;
40 $_u['username'] = $xuser;
41 $_u['realname'] = $realname;
42 $_u['email'] = $email;
43 $_u['pass'] = $xpass;
44 $_u['is_admin'] = $is_admin;
45 $_u['disk_quota_mb'] = $disk_quota_mb;
46 $_u['rights'] = $rights;
47 $_u['session_time'] = $session_time;
48 $_u['confirm_token'] = "";
49 if (!rg_user_edit($db, $_u)) {
39 50 $errmsg[] = "Cannot change info (" . rg_user_error() . ")."; $errmsg[] = "Cannot change info (" . rg_user_error() . ").";
40 51 break; break;
41 52 } }
 
... ... if ($doit == 1) {
56 67 $show_form = 0; $show_form = 0;
57 68 } else { } else {
58 69 $xuser = $_ui['username']; $xuser = $_ui['username'];
70 $realname = $_ui['realname'];
59 71 $email = $_ui['email']; $email = $_ui['email'];
60 72 $xpass = ""; $xpass = "";
61 73 $is_admin = $_ui['is_admin']; $is_admin = $_ui['is_admin'];
 
... ... if ($doit == 1) {
66 78 } }
67 79
68 80 if ($show_form == 1) { if ($show_form == 1) {
81 $create_mode = 0;
69 82 $admin_mode = 1; $admin_mode = 1;
70 83 $pass_mode = 1; $pass_mode = 1;
71 84 include($INC . "/admin/users/user.form.php"); include($INC . "/admin/users/user.form.php");
File inc/admin/users/user.form.php changed (mode: 100644) (index 1553dbc..cc5aeb8)
1 1 <?php <?php
2 2 $_form = '<div class="formarea">' . "\n"; $_form = '<div class="formarea">' . "\n";
3 3
4 $_form .= "<div class=\"formarea_title\">Change user details</div><br />\n";
4 if ($create_mode == 1)
5 $_title = "Create a new account";
6 else
7 $_title = "Change user details";
8 $_form .= "<div class=\"formarea_title\">$_title</div><br />\n";
5 9
6 10 if ($admin_mode == 1) { if ($admin_mode == 1) {
7 11 $sel_is_admin = array(0 => "", 1 => ""); $sel_is_admin = array(0 => "", 1 => "");
 
... ... $_form .= '
25 29 <br /> <br />
26 30 <br /> <br />
27 31
28 <label for="realname" class="form_item_title">Your name</label><br />
32 <label for="realname" class="form_item_title">Name</label><br />
29 33 <input type="text" name="realname" value="' . $realname . '" /> <input type="text" name="realname" value="' . $realname . '" />
30 34 <br /> <br />
31 35 <br /> <br />
File inc/dispatch/dispatch.php changed (mode: 100644) (index 1c8ccf9..31be41e)
... ... rg_log("/inc/dispatch/dispatch");
3 3
4 4 switch ($op) { switch ($op) {
5 5 case 'main': case 'main':
6 include($INC . "/main/main.php");
7 $body .= $_main;
6 $body .= rg_template("body.html", $more);
8 7 break; break;
9 8
10 9 case 'login': case 'login':
File inc/main/main.php deleted (index 7ea2280..0000000)
1 <?php
2 rg_log("/main/main.php");
3
4 $_main = "";
5
6 $_main .= "This is the main page where we will have an overview of what"
7 . " rocketgit is etc.";
8
9 ?>
10
File inc/struct.inc.php changed (mode: 100644) (index 8a200f1..d7cf83a)
... ... function rg_sql_struct_run($db, $flags, $old_schema_ver)
222 222 } }
223 223
224 224 /* /*
225 * Update schema if needed
226 * Returns FALSE in case of error
225 * Tests if schema update is needed. Return old version
227 226 */ */
228 function rg_sql_struct_update_if_needed($db, $flags)
227 function rg_sql_struct_update_needed($db)
229 228 { {
230 229 global $rg_sql_schema_ver; global $rg_sql_schema_ver;
231 230
232 rg_log("sql_struct_update: flags=$flags");
231 rg_log("sql_struct_update_needed:");
233 232
234 233 $old = rg_state_get($db, "schema_version"); $old = rg_state_get($db, "schema_version");
235 234 if (empty($old)) if (empty($old))
236 235 $old = 0; $old = 0;
237 236
238 rg_log("DEBUG: old=$old new=$rg_sql_schema_ver");
237 rg_log("\tDEBUG: old=$old new=$rg_sql_schema_ver");
239 238 if ($old == $rg_sql_schema_ver) { if ($old == $rg_sql_schema_ver) {
240 rg_log("DEBUG: schema is up to date!");
241 return TRUE;
239 rg_log("\tDEBUG: schema is up to date!");
240 return FALSE;
242 241 } }
243 242
243 return $old;
244 }
245
246 /*
247 * Update schema if needed
248 * Returns FALSE in case of error
249 * This must not be run by web user because of the owner of the locking file.
250 */
251 function rg_sql_struct_update($db, $flags)
252 {
253 global $rg_sql_schema_ver;
254
255 rg_log("sql_struct_update: flags=$flags");
256
257 $old = rg_sql_struct_update_needed($db);
258 if ($old === FALSE)
259 return TRUE;
260
244 261 // If we cannot lock, return error // If we cannot lock, return error
245 262 if (rg_lock("schema_upgrade.lock") === FALSE) if (rg_lock("schema_upgrade.lock") === FALSE)
246 263 return FALSE; return FALSE;
File inc/user.inc.php changed (mode: 100644) (index 797fcd0..dfe4d5f)
... ... function rg_user_edit($db, $d)
116 116
117 117 rg_log("user_edit: data: " . rg_array2string($d)); rg_log("user_edit: data: " . rg_array2string($d));
118 118
119 // DEBUG
120 if (!isset($d['username']))
121 rg_internal_error("username not passed");
122
119 123 if (rg_user_ok($d['username']) !== TRUE) if (rg_user_ok($d['username']) !== TRUE)
120 124 return FALSE; return FALSE;
121 125
 
... ... function rg_user_edit($db, $d)
129 133 $e_is_admin = $d['is_admin']; $e_is_admin = $d['is_admin'];
130 134 $e_disk_quota_mb = $d['disk_quota_mb']; $e_disk_quota_mb = $d['disk_quota_mb'];
131 135 $e_session_time = $d['session_time']; $e_session_time = $d['session_time'];
132 $e_confirm_token = $d['confirm_token'];
136 $e_confirm_token = isset($d['confirm_token']) ? $d['confirm_token'] : "";
133 137
134 138 if (empty($d['confirm_token'])) { if (empty($d['confirm_token'])) {
135 139 // no need to confirm account // no need to confirm account
 
... ... function rg_user_confirm_send($email, $token)
768 772
769 773 $headers = "From: $rg_admin_name <$rg_admin_email>"; $headers = "From: $rg_admin_name <$rg_admin_email>";
770 774
775 $proto = "http://";
776 if (isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'], "on") == 0))
777 $proto = "https://";
778
771 779 if (!mail($email, if (!mail($email,
772 780 "Account creation confirmation", "Account creation confirmation",
773 781 "Hello!\n\n" "Hello!\n\n"
774 782 . "Please confirm your account creation following:\n" . "Please confirm your account creation following:\n"
775 . (@strcmp($_SERVER['HTTPS'], "on") == 0 ? "https://" : "http://")
783 . $proto
776 784 . @$_SERVER['HTTP_HOST'] . @$_SERVER['HTTP_HOST']
777 785 . rg_re_url("/op/confirm") . "&token=$token", . rg_re_url("/op/confirm") . "&token=$token",
778 786 $headers, $headers,
File inc/user/create.php changed (mode: 100644) (index 060f44f..845a06d)
... ... rg_log("/inc/user/create");
4 4 $_create = "<br />\n"; $_create = "<br />\n";
5 5
6 6 if ($rg_account_allow_creation != 1) { if ($rg_account_allow_creation != 1) {
7 $_create .= "Site does not allow account creation.";
7 $_create .= "This site does not allow account creation. Ask the Admin.";
8 8 return; return;
9 9 } }
10 10
 
... ... if ($doit == 1) {
53 53 break; break;
54 54 } }
55 55
56 $r = rg_user_confirm_send($email, $confirm_token);
56 $r = rg_user_confirm_send($email, $_u['confirm_token']);
57 57 if ($r === FALSE) { if ($r === FALSE) {
58 58 $errmsg[] = "Cannot send e-mail (" . rg_user_error() . ")!"; $errmsg[] = "Cannot send e-mail (" . rg_user_error() . ")!";
59 59 break; break;
 
... ... if ($doit == 1) {
65 65 } }
66 66 } else { } else {
67 67 $xuser = ""; $xuser = "";
68 $realname = "";
68 69 $email = ""; $email = "";
69 70 $xpass = ""; $xpass = "";
70 71 $xpass2 = ""; $xpass2 = "";
 
... ... if ($doit == 1) {
72 73 } }
73 74
74 75 if ($show_form == 1) { if ($show_form == 1) {
76 $create_mode = 1;
75 77 $admin_mode = 0; $admin_mode = 0;
76 78 $pass_mode = 2; $pass_mode = 2;
77 79 include($INC . "/admin/users/user.form.php"); include($INC . "/admin/users/user.form.php");
File inc/user/info/info.php changed (mode: 100644) (index 29f7706..b68994f)
... ... if ($doit == 1) {
20 20 $session_time = rg_var_uint("session_time"); $session_time = rg_var_uint("session_time");
21 21
22 22 while (1) { while (1) {
23 $xpass = "";
24 if (!rg_user_edit($db, $rg_ui['uid'], $xuser, $realname, $email,
25 $xpass, $is_admin, $disk_quota_mb, $rights,
26 $session_time, "")) {
23 $_u = array();
24 $_u['uid'] = $rg_ui['uid'];
25 $_u['username'] = $xuser;
26 $_u['realname'] = $realname;
27 $_u['email'] = $email;
28 $_u['pass'] = "";
29 $_u['is_admin'] = $is_admin;
30 $_u['disk_quota_mb'] = $disk_quota_mb;
31 $_u['rights'] = $rights;
32 $_u['session_time'] = $session_time;
33 if (!rg_user_edit($db, $_u)) {
27 34 $errmsg[] = "Cannot change info (" . rg_user_error() . ")."; $errmsg[] = "Cannot change info (" . rg_user_error() . ").";
28 35 break; break;
29 36 } }
 
... ... if ($doit == 1) {
41 48 $session_time = $rg_ui['session_time']; $session_time = $rg_ui['session_time'];
42 49 } }
43 50
51 $create_mode = 0;
44 52 $admin_mode = 0; $admin_mode = 0;
45 53 $pass_mode = 0; $pass_mode = 0;
46 54 include($INC . "/admin/users/user.form.php"); include($INC . "/admin/users/user.form.php");
File inc/user/pass/pass.php changed (mode: 100644) (index 1c039ca..08c4bee)
... ... if ($doit == 1) {
32 32 break; break;
33 33 } }
34 34
35 $_pass .= "OK!<br />";
35 $_pass .= "Password was changed with success!<br />";
36 36 $show_form = 0; $show_form = 0;
37 37 break; break;
38 38 } }
File inc/user/repo/edit/edit.php changed (mode: 100644) (index 78170ee..28225c0)
... ... if ($doit == 1) {
42 42 break; break;
43 43 } }
44 44
45 $_edit .= "OK!";
45 $_edit .= "The repository was updated with success!";
46 46 $_show_form = 0; $_show_form = 0;
47 47
48 48 break; break;
File inc/util.inc.php changed (mode: 100644) (index 3130ebd..1cdf802)
... ... function rg_redirect($url)
540 540 */ */
541 541 function rg_array2string($a) function rg_array2string($a)
542 542 { {
543 if (!is_array($a))
544 rg_internal_error("not an array!");
545
543 546 if (empty($a)) if (empty($a))
544 547 return ""; return "";
545 548
File root/index.php changed (mode: 100644) (index 1e9fcc4..1f486b3)
... ... $op = ""; $subop = ""; $subsubop = ""; $cop = "";
25 25 $rr = array("user" => "", "repo" => "", "prefix" => ""); $rr = array("user" => "", "repo" => "", "prefix" => "");
26 26 $paras = array(); $paras = array();
27 27 $rg_ui = array(); $rg_ui = array();
28 $more = array();
28 29
29 30 // 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
30 31 $vv = rg_var_str("vv"); $vv = rg_var_str("vv");
 
... ... if ($db === FALSE) {
90 91 die("Cannot open database!"); die("Cannot open database!");
91 92 } }
92 93
93 $r = rg_sql_struct_update_if_needed($db, 0);
94 if ($r !== TRUE) {
95 echo "Schema is not up-to-date! Try again later";
96 exit(1);
94 while (1) {
95 $r = rg_sql_struct_update_needed($db);
96 if ($r === FALSE)
97 break;
98
99 echo "Schema is not up-to-date! Sleep 1 second...";
100 sleep(1);
97 101 } }
98 102
99 103 rg_user_login_by_sid($db, $sid, $rg_ui); rg_user_login_by_sid($db, $sid, $rg_ui);
 
... ... $first_menu = array(
133 137 "op" => "/op/logout") "op" => "/op/logout")
134 138 ); );
135 139 $first_menu[$op]['sub'] = $second_menu; $first_menu[$op]['sub'] = $second_menu;
136 $menu = implode("", rg_menu($first_menu, $rg_ui, $op, $subop));
140 $more['HTML:rg_menu'] = implode("", rg_menu($first_menu, $rg_ui, $op, $subop));
137 141
138 142 if ($rg_ui['uid'] > 0) if ($rg_ui['uid'] > 0)
139 $rg_username = $rg_ui['username'];
143 $more['rg_username'] = $rg_ui['username'];
140 144 else else
141 $rg_username = "Not logged in";
145 $more['rg_username'] = "Not logged in";
142 146
143 147 rg_prof_end("MAIN"); rg_prof_end("MAIN");
144 148
145 include($rg_scripts . "/root/themes/" . $rg_theme . "/index.php");
149 // TODO: Do something with the profiling, here
150
151 $more['HTML:rg_theme_url'] = $THEME_URL;
152 $more['HTML:rg_body'] = $body;
153 echo rg_template("index.html", $more);
146 154
147 155 rg_prof_log("rg_log"); rg_prof_log("rg_log");
148 156 ?> ?>
File root/themes/default/body.html added (mode: 100644) (index 0000000..71fe795)
1 <br />
2 <h1>Welcome to RocketGit!</h1>
3 <br />
4
5 Our target is to be the best FLOSS software for managin Git projects.
6 With your help, we will do it. Thanks!<br />
7 <br />
8 You can create an account <a href="/op/create_account">here<a/>.<br />
File root/themes/default/index.html renamed from root/themes/default/index.php (similarity 73%) (mode: 100644) (index ca5c534..4e673b5)
3 3 <head> <head>
4 4 <title>RocketGit</title> <title>RocketGit</title>
5 5 <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
6 <link rel="stylesheet" type="text/css" href="<?php echo $THEME_URL;?>/main.css" />
6 <link rel="stylesheet" type="text/css" href="@@rg_theme_url@@/main.css" />
7 7 </head> </head>
8 8
9 9 <body> <body>
 
12 12
13 13 <div id="header"> <div id="header">
14 14 <div style="float: right; padding: 5px;"> <div style="float: right; padding: 5px;">
15 <b><?php echo $rg_username; ?></b>
15 <b>@@rg_username@@</b>
16 16 </div> </div>
17 17
18 18 <div style="float: left; font-size:11pt; padding: 5px 10px 5px 0px;"> <div style="float: left; font-size:11pt; padding: 5px 10px 5px 0px;">
 
20 20 </div> </div>
21 21
22 22 <div id="menus"> <div id="menus">
23 <?php echo $menu; ?>
23 @@rg_menu@@
24 24 </div> </div>
25 25 </div> </div>
26 26
27 27 <div id="main"> <div id="main">
28 <?php echo $body; ?>
28 @@rg_body@@
29 29 </div> </div>
30 30
31 31 <div id="footer"> <div id="footer">
32 32 <div style="float: left; padding: 5px;"> <div style="float: left; padding: 5px;">
33 <img src="<?php echo $THEME_URL; ?>/logo/rg4.png" /><br />
33 <img src="@@rg_theme_url@@/logo/rg4.png" /><br />
34 34 <b>RocketGit</b> <b>RocketGit</b>
35 35 </div> </div>
36 36
 
39 39 </div> </div>
40 40 </div> </div>
41 41
42 <!--
43 <div id="profiling">
44 Profiling:<br />
45 <?php echo rg_prof_html(); ?>
46 </div>
47 -->
48
49 42 </div> <!-- container --> </div> <!-- container -->
50 43
51 44 </body> </body>
File scripts/cron.php changed (mode: 100644) (index 0c6efbe..eb2f1c6)
... ... if ($db === FALSE) {
28 28 exit(1); exit(1);
29 29 } }
30 30
31 $r = rg_sql_struct_update_if_needed($db, 0);
31 $r = rg_sql_struct_update($db, 0);
32 32 if ($r !== TRUE) if ($r !== TRUE)
33 33 exit(1); exit(1);
34 34
File scripts/q.php changed (mode: 100644) (index bd48577..021ff62)
... ... if ($db === FALSE) {
33 33 exit(1); exit(1);
34 34 } }
35 35
36 $r = rg_sql_struct_update_if_needed($db, 0);
36 $r = rg_sql_struct_update($db, 0);
37 37 if ($r !== TRUE) if ($r !== TRUE)
38 38 exit(1); exit(1);
39 39
File scripts/remote.php changed (mode: 100644) (index 9c96336..c0ae1ea)
... ... $db = rg_sql_open($rg_sql);
46 46 if ($db === FALSE) if ($db === FALSE)
47 47 fatal("Internal error (db)!"); fatal("Internal error (db)!");
48 48
49 $r = rg_sql_struct_update_if_needed($db, 0);
49 $r = rg_sql_struct_update($db, 0);
50 50 if ($r !== TRUE) if ($r !== TRUE)
51 51 fatal("We are in a short maintenance. Try again later."); fatal("We are in a short maintenance. Try again later.");
52 52
File tests/bug.php changed (mode: 100644) (index f192688..0942697)
... ... if ($db === FALSE) {
17 17 exit(1); exit(1);
18 18 } }
19 19
20 $r = rg_sql_struct_update_if_needed($db, RG_DROP_TABLES|RG_IGNORE_ERRORS);
20 $r = rg_sql_struct_update($db, RG_DROP_TABLES|RG_IGNORE_ERRORS);
21 21 if ($r !== TRUE) { if ($r !== TRUE) {
22 22 rg_log("Cannot create struct (" . rg_sql_error() . ")!"); rg_log("Cannot create struct (" . rg_sql_error() . ")!");
23 23 exit(1); exit(1);
File tests/keys.php changed (mode: 100644) (index 3589b9b..9a8605f)
... ... if ($db === FALSE) {
18 18 exit(1); exit(1);
19 19 } }
20 20
21 $r = rg_sql_struct_update_if_needed($db, RG_DROP_TABLES);
21 $r = rg_sql_struct_update($db, RG_DROP_TABLES);
22 22 if ($r !== TRUE) { if ($r !== TRUE) {
23 23 echo "Cannot create structure (" . rg_sql_error() . ")!\n"; echo "Cannot create structure (" . rg_sql_error() . ")!\n";
24 24 exit(1); exit(1);
File tests/repo.php changed (mode: 100644) (index 1aa07b4..9c1f318)
... ... if ($db === FALSE) {
86 86 exit(1); exit(1);
87 87 } }
88 88
89 $r = rg_sql_struct_update_if_needed($db, RG_DROP_TABLES|RG_IGNORE_ERRORS);
89 $r = rg_sql_struct_update($db, RG_DROP_TABLES|RG_IGNORE_ERRORS);
90 90 if ($r !== TRUE) { if ($r !== TRUE) {
91 91 rg_log("Cannot create struct (" . rg_sql_error() . ")!"); rg_log("Cannot create struct (" . rg_sql_error() . ")!");
92 92 exit(1); exit(1);
File tests/state.php changed (mode: 100644) (index dfbfe22..8d88961)
... ... if ($r !== TRUE) {
25 25 exit(1); exit(1);
26 26 } }
27 27
28 $r = rg_sql_struct_update_if_needed($db, RG_DROP_TABLES);
28 $r = rg_sql_struct_update($db, RG_DROP_TABLES);
29 29 if ($r !== TRUE) { if ($r !== TRUE) {
30 30 echo "Cannot create structure (" . rg_sql_error() . ")!\n"; echo "Cannot create structure (" . rg_sql_error() . ")!\n";
31 31 exit(1); exit(1);
File tests/user.php changed (mode: 100644) (index 35f73b7..023f968)
... ... if ($db === FALSE) {
25 25 exit(1); exit(1);
26 26 } }
27 27
28 $r = rg_sql_struct_update_if_needed($db, RG_DROP_TABLES);
28 $r = rg_sql_struct_update($db, RG_DROP_TABLES);
29 29 if ($r !== TRUE) { if ($r !== TRUE) {
30 30 echo "Cannot create structure (" . rg_sql_error() . ")!\n"; echo "Cannot create structure (" . rg_sql_error() . ")!\n";
31 31 exit(1); exit(1);
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://rocketgit.com/user/catalinux/rocketgit

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/catalinux/rocketgit

Clone this repository using git:
git clone git://git.rocketgit.com/user/catalinux/rocketgit

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