File TODO changed (mode: 100644) (index 7191bb5..d83e4d4) |
1 |
1 |
== Where I stopped last time == |
== Where I stopped last time == |
2 |
2 |
[ ] Add "Spread the word!" on website. |
[ ] Add "Spread the word!" on website. |
3 |
3 |
|
|
4 |
|
[ ] Security: validate sparas! |
|
5 |
|
[ ] Menus - change color for selected items, not the background color. |
|
6 |
4 |
[ ] Daca creez repo, nu-mi creaza dir-ul (de fapt, nu marcheaza in cache ca l-a |
[ ] Daca creez repo, nu-mi creaza dir-ul (de fapt, nu marcheaza in cache ca l-a |
7 |
5 |
creat din cauza event-ului care nu poate sa se conecteze la cache: |
creat din cauza event-ului care nu poate sa se conecteze la cache: |
8 |
6 |
broken pipe. Foarte ciudat. De ce nu ar putea trimite? |
broken pipe. Foarte ciudat. De ce nu ar putea trimite? |
9 |
7 |
Probabil socket-ul nu mai e deschis pentru ca cache-ul s-a restartat? |
Probabil socket-ul nu mai e deschis pentru ca cache-ul s-a restartat? |
|
8 |
|
Unde se intimpla asta?! |
|
9 |
|
[ ] Remove any err- files at first install. |
|
10 |
|
Se pare ca trebuie sa testez daca exista tabela 'state' in cron.php. |
|
11 |
|
Poate nu numai aici. Si sa stochez informatia asta in cache. |
10 |
12 |
[ ] I can do a select before write to be sure socket is open. |
[ ] I can do a select before write to be sure socket is open. |
11 |
13 |
If I get an error signal from select, reopen the socket. |
If I get an error signal from select, reopen the socket. |
12 |
|
[ ] Check search. |
|
13 |
14 |
[ ] Run unit testing. |
[ ] Run unit testing. |
14 |
15 |
[ ] SPF? mail-ul ajunge in spam! |
[ ] SPF? mail-ul ajunge in spam! |
15 |
16 |
[ ] Upload kvm image to downloads.rocketgit.com. Sign it? sha256 it? |
[ ] Upload kvm image to downloads.rocketgit.com. Sign it? sha256 it? |
File inc/sql.inc.php changed (mode: 100644) (index 95b424a..d2baec9) |
... |
... |
function rg_sql_rollback($h) |
337 |
337 |
return TRUE; |
return TRUE; |
338 |
338 |
} |
} |
339 |
339 |
|
|
|
340 |
|
/* |
|
341 |
|
* Test if a table exists |
|
342 |
|
* Returns FALSE on error, 0 if does not exists, 1 if exists |
|
343 |
|
*/ |
|
344 |
|
function rg_sql_table_exists($db, $table) |
|
345 |
|
{ |
|
346 |
|
$sql = "SELECT 1 FROM pg_class" |
|
347 |
|
. " WHERE relname = '" . $table . "'"; |
|
348 |
|
$res = rg_sql_query($db, $sql); |
|
349 |
|
if ($res === FALSE) |
|
350 |
|
return FALSE; |
|
351 |
|
|
|
352 |
|
$rows = rg_sql_num_rows($res); |
|
353 |
|
rg_sql_free_result($res); |
|
354 |
|
|
|
355 |
|
return $rows; |
|
356 |
|
} |
|
357 |
|
|
340 |
358 |
?> |
?> |
File inc/user/keys/keys.php changed (mode: 100644) (index b7df8ac..473ab98) |
... |
... |
$del_errmsg = array(); |
7 |
7 |
$_keys = ""; |
$_keys = ""; |
8 |
8 |
|
|
9 |
9 |
$key = rg_var_str("key"); |
$key = rg_var_str("key"); |
10 |
|
// TODO: should we accept UTF-8 chars? |
|
|
10 |
|
// TODO: should we accept UTF-8 chars (for comments)? |
11 |
11 |
$key = preg_replace("|[^/A-Za-z0-9 @/+_\.\=,-]|", "", $key); |
$key = preg_replace("|[^/A-Za-z0-9 @/+_\.\=,-]|", "", $key); |
12 |
12 |
$key_id = rg_var_uint("key_id"); |
$key_id = rg_var_uint("key_id"); |
13 |
13 |
$key_delete_ids = rg_var_str("key_delete_ids"); |
$key_delete_ids = rg_var_str("key_delete_ids"); |
14 |
14 |
|
|
15 |
|
// menu |
|
16 |
|
$_url = rg_re_url($sparas); |
|
17 |
|
|
|
18 |
15 |
$rg['HTML:status'] = ""; |
$rg['HTML:status'] = ""; |
19 |
16 |
|
|
20 |
17 |
if (rg_var_uint("add") == 1) { |
if (rg_var_uint("add") == 1) { |
File inc/util.inc.php changed (mode: 100644) (index 9d87bf6..ce9ab9b) |
... |
... |
function rg_error_handler($no, $str, $file, $line) |
1114 |
1114 |
if ($no == 0) |
if ($no == 0) |
1115 |
1115 |
return; |
return; |
1116 |
1116 |
|
|
|
1117 |
|
// call was prepended with '@' |
|
1118 |
|
if (error_reporting() == 0) |
|
1119 |
|
return; |
|
1120 |
|
|
1117 |
1121 |
$msg = "PHP ERROR: $file:$line: $str (errno=$no)"; |
$msg = "PHP ERROR: $file:$line: $str (errno=$no)"; |
1118 |
1122 |
$key = md5($msg); |
$key = md5($msg); |
1119 |
1123 |
rg_error_core($msg); |
rg_error_core($msg); |
|
... |
... |
function rg_socket_recv_wait($socket, $wait, $timeout) |
1253 |
1257 |
$ret_buf = ""; |
$ret_buf = ""; |
1254 |
1258 |
while (1) { |
while (1) { |
1255 |
1259 |
$reads = array($socket); $writes = array(); $ex = array(); |
$reads = array($socket); $writes = array(); $ex = array(); |
1256 |
|
$r = socket_select($reads, $writes, $ex, $tv_sec, $tv_usec); |
|
|
1260 |
|
$r = @socket_select($reads, $writes, $ex, $tv_sec, $tv_usec); |
1257 |
1261 |
if ($r === FALSE) { |
if ($r === FALSE) { |
1258 |
1262 |
rg_log("Cannot select(" . socket_strerror(socket_last_error()) . ")!"); |
rg_log("Cannot select(" . socket_strerror(socket_last_error()) . ")!"); |
1259 |
1263 |
break; |
break; |
|
... |
... |
function rg_socket_recv_wait($socket, $wait, $timeout) |
1269 |
1273 |
break; |
break; |
1270 |
1274 |
} |
} |
1271 |
1275 |
|
|
1272 |
|
$r = socket_recv($socket, $buf, 32 * 4096, 0); |
|
|
1276 |
|
$r = @socket_recv($socket, $buf, 32 * 4096, 0); |
1273 |
1277 |
if ($r === FALSE) { |
if ($r === FALSE) { |
1274 |
1278 |
rg_log("Cannot receive(" . socket_strerror(socket_last_error()) . ")!"); |
rg_log("Cannot receive(" . socket_strerror(socket_last_error()) . ")!"); |
1275 |
1279 |
break; |
break; |
|
... |
... |
function rg_socket_send($socket, $buf) |
1299 |
1303 |
$len = strlen($buf); |
$len = strlen($buf); |
1300 |
1304 |
$off = 0; |
$off = 0; |
1301 |
1305 |
while (1) { |
while (1) { |
1302 |
|
$r = socket_send($socket, substr($buf, $off), $len - $off, 0); |
|
|
1306 |
|
$r = @socket_send($socket, substr($buf, $off), $len - $off, 0); |
1303 |
1307 |
if ($r === FALSE) { |
if ($r === FALSE) { |
1304 |
1308 |
rg_log("Could not send (" . socket_strerror(socket_last_error()) . ")!"); |
rg_log("Could not send (" . socket_strerror(socket_last_error()) . ")!"); |
1305 |
1309 |
break; |
break; |
|
... |
... |
function rg_socket($path, $buf, $timeout, $tries) |
1333 |
1337 |
if (isset($rg_socket_cache[$path])) { |
if (isset($rg_socket_cache[$path])) { |
1334 |
1338 |
$socket = $rg_socket_cache[$path]; |
$socket = $rg_socket_cache[$path]; |
1335 |
1339 |
} else { |
} else { |
1336 |
|
$socket = socket_create(AF_UNIX, SOCK_STREAM, 0); |
|
|
1340 |
|
$socket = @socket_create(AF_UNIX, SOCK_STREAM, 0); |
1337 |
1341 |
if ($socket === FALSE) { |
if ($socket === FALSE) { |
1338 |
1342 |
rg_log("Could not create socket (" . socket_strerror(socket_last_error()) . ")!"); |
rg_log("Could not create socket (" . socket_strerror(socket_last_error()) . ")!"); |
1339 |
1343 |
break; |
break; |
1340 |
1344 |
} |
} |
1341 |
1345 |
|
|
1342 |
1346 |
while ($tries > 0) { |
while ($tries > 0) { |
1343 |
|
$r = socket_connect($socket, $path); |
|
|
1347 |
|
$r = @socket_connect($socket, $path); |
1344 |
1348 |
if ($r === FALSE) { |
if ($r === FALSE) { |
1345 |
1349 |
$tries--; |
$tries--; |
1346 |
1350 |
usleep(50 * 1000); |
usleep(50 * 1000); |
File root/themes/default/main.css changed (mode: 100644) (index fa3aa3d..12e3e61) |
... |
... |
form input[type="submit"] { |
109 |
109 |
} |
} |
110 |
110 |
|
|
111 |
111 |
.menu { |
.menu { |
112 |
|
background-color: #AAA; |
|
113 |
|
overflow: hidden; |
|
|
112 |
|
background-color: #999; |
114 |
113 |
padding: 3px 0px; |
padding: 3px 0px; |
115 |
114 |
} |
} |
116 |
115 |
.menu ul { list-style-type: none; } |
.menu ul { list-style-type: none; } |
117 |
116 |
.menu ul li { |
.menu ul li { |
118 |
|
display: inline; |
|
119 |
|
padding: 5px 0px; |
|
|
117 |
|
display: table-cell; |
|
118 |
|
padding: 2px 0px; |
120 |
119 |
} |
} |
121 |
120 |
.menu ul li a { |
.menu ul li a { |
122 |
121 |
text-decoration: none; |
text-decoration: none; |
123 |
122 |
color: #FFF; |
color: #FFF; |
124 |
123 |
font-size: 13pt; |
font-size: 13pt; |
125 |
124 |
font-weight: bold; |
font-weight: bold; |
126 |
|
padding: 5px 15px; |
|
|
125 |
|
padding: 2px 15px; |
127 |
126 |
} |
} |
128 |
127 |
.menu ul li a:hover { color: red; } |
.menu ul li a:hover { color: red; } |
129 |
|
.menu ul li.selected { background-color: #BBB; } |
|
130 |
|
.menu ul li.selected a:hover { color: #CCC; } |
|
|
128 |
|
.menu ul li.selected a { border-bottom: 2px solid #f00; } |
|
129 |
|
.menu ul li.selected a:hover { color: red; } |
|
130 |
|
|
|
131 |
|
.menu2 { background-color: #AAA; } |
|
132 |
|
.menu2 ul li.selected a { border-bottom: 2px solid #f00; } |
|
133 |
|
.menu2 ul li.selected a:hover { color: red; } |
131 |
134 |
|
|
132 |
|
.menu2 { background-color: #BBB; } |
|
133 |
|
.menu2 ul li.selected { background-color: #CCC; } |
|
134 |
|
.menu2 ul li.selected a:hover { color: #FFF; } |
|
|
135 |
|
.menu3 { background-color: #BBB; } |
|
136 |
|
.menu3 ul li.selected a { border-bottom: 2px solid #f00; } |
|
137 |
|
.menu3 ul li.selected a:hover { color: red; } |
135 |
138 |
|
|
136 |
139 |
.junk {} |
.junk {} |
137 |
140 |
|
|
File scripts/cachec.php changed (mode: 100644) (index 55d0ccf..40d77f3) |
... |
... |
rg_log_set_sid("000000"); // to spread the logs |
30 |
30 |
|
|
31 |
31 |
rg_log("Start..."); |
rg_log("Start..."); |
32 |
32 |
|
|
33 |
|
$master = socket_create(AF_UNIX, SOCK_STREAM, 0); |
|
|
33 |
|
$master = @socket_create(AF_UNIX, SOCK_STREAM, 0); |
34 |
34 |
if ($master === FALSE) { |
if ($master === FALSE) { |
35 |
35 |
rg_internal_error("Cannot create events socket!"); |
rg_internal_error("Cannot create events socket!"); |
36 |
36 |
exit(1); |
exit(1); |
37 |
37 |
} |
} |
38 |
38 |
|
|
39 |
|
$ret = socket_connect($master, $rg_cache_socket); |
|
|
39 |
|
$ret = @socket_connect($master, $rg_cache_socket); |
40 |
40 |
if ($ret === FALSE) { |
if ($ret === FALSE) { |
41 |
41 |
echo "Cannot connect: " . socket_strerror(socket_last_error()) . "!\n"; |
echo "Cannot connect: " . socket_strerror(socket_last_error()) . "!\n"; |
42 |
42 |
exit(1); |
exit(1); |