Subject | Hash | Author | Date (UTC) |
---|---|---|---|
worker fixes for when admin edits workers | f54af2c20ebd4df3b3424cab2e0bfb80aa8bafe6 | Catalin(ux) M. BOIE | 2016-09-25 20:26:08 |
Corrected typos and made clear some comments/hints | ab0c22fb84e13b9699b45ca8bc8181dd15f7a4a5 | Catalin(ux) M. BOIE | 2016-09-25 20:23:59 |
Do not show the query in the error message in plan.inc.php | feee2b816a64c9032e2fc9c37bb1a8216d43bc62 | Catalin(ux) M. BOIE | 2016-09-25 20:23:04 |
Renamed systemd.service to rocketgit-fpm.service | e24cc46ce59727f6acccb674e4ab53430a877171 | Catalin(ux) M. BOIE | 2016-09-25 20:21:35 |
.spec file fixes: use %{_unitdir} instead of @USR@/lib and systemd dependency | f39aea08f7b63aae84b3bc4f68bc8995f06e52e9 | Catalin(ux) M. BOIE | 2016-09-21 18:45:27 |
Fix duilder: forgot to replace @USR@ | d2d4920111d02c35944e15da642728a4b695c9ff | Catalin(ux) M. BOIE | 2016-09-21 17:56:15 |
Bump version to 0.57 | b8be77c83936b5083d004f380ec0366d5562342e | Catalin(ux) M. BOIE | 2016-09-21 17:26:09 |
In features, add something about Affero | ee43843c67c6d495a545773d87ed5c002b99483f | Catalin(ux) M. BOIE | 2016-09-21 17:12:06 |
fix a unit test | e1145815a78faa7f24e899750547ba893a05d173 | Catalin(ux) M. BOIE | 2016-09-21 16:56:01 |
Invalid repo path used | 8d9766033596179b235d6756a0af551a503278f2 | Catalin(ux) M. BOIE | 2016-09-21 16:54:52 |
Typo | b0b945bb27ce33e5065de0e59aca757b92852c60 | Catalin(ux) M. BOIE | 2016-09-21 16:54:13 |
git remote change was replaced with git remote set-url | 06d39d3519b2d026a4fe425586a64822cf430d4b | Catalin(ux) M. BOIE | 2016-09-21 16:53:49 |
Lots of fixes for html/css to adapt to any device | 8558dc5641c14bd49187ef40eea4d2f58f56b337 | Catalin(ux) M. BOIE | 2016-09-21 16:52:59 |
Author file update | 4face2cce133cc994efc67a1721a5260af3ab2a1 | Catalin(ux) M. BOIE | 2016-09-21 16:51:04 |
duilder fixes (USR was not defined) | fd5ff1e7c3d974714570237c323ece393aaaa85b | Catalin(ux) M. BOIE | 2016-09-21 16:50:39 |
Autodetect admin e-mail based on host name | 52901d8c0f73af6e909738ac8bc1cf331787e55e | Catalin(ux) M. BOIE | 2016-09-20 02:43:55 |
When ssh host nmae is autodetected, it must not also use the http port | c5dea927e57df2ac32a34037c5c36d829dc9356f | Catalin(ux) M. BOIE | 2016-09-19 16:25:14 |
Adapt a little bit the install guide because of php-fpm | cd6a0d9755dfb7b2a8b283e53d838b9724f22697 | Catalin(ux) M. BOIE | 2016-09-17 10:45:59 |
Bump version to 0.56 | 5c2c03e15864ebe466ac4dd3f8b0d761c363b13e | Catalin(ux) M. BOIE | 2016-09-17 10:45:16 |
Debian: adapt a little bit the dependencies | 47f680a9e0330a360919b33255a403d1d99e47fc | Catalin(ux) M. BOIE | 2016-09-17 10:44:43 |
File | Lines added | Lines deleted |
---|---|---|
inc/workers.inc.php | 12 | 16 |
File inc/workers.inc.php changed (mode: 100644) (index 43096a2..7e6f287) | |||
... | ... | function rg_worker_add($db, $uid, $a) | |
253 | 253 | rg_prof_start('worker_add'); | rg_prof_start('worker_add'); |
254 | 254 | rg_log_enter('worker_add'); | rg_log_enter('worker_add'); |
255 | 255 | ||
256 | //rg_log_ml('DEBUG: a: ' . print_r($a, TRUE)); | ||
256 | //rg_log_ml('DEBUG: uid=' . $uid . ', a: ' . print_r($a, TRUE)); | ||
257 | 257 | ||
258 | 258 | $ret = FALSE; | $ret = FALSE; |
259 | 259 | while (1) { | while (1) { |
260 | $params = array(); | ||
260 | $params = $a; | ||
261 | 261 | $params['uid'] = $uid; | $params['uid'] = $uid; |
262 | $params['id'] = $a['id']; | ||
263 | $params['name'] = $a['name']; | ||
264 | $params['cost'] = $a['cost']; | ||
265 | $params['workers'] = $a['workers']; | ||
266 | 262 | ||
267 | 263 | if ($a['id'] == 0) { | if ($a['id'] == 0) { |
268 | 264 | $params['itime'] = time(); | $params['itime'] = time(); |
... | ... | function rg_worker_add_high_level($db, $rg, $op, $paras) | |
485 | 481 | $ret = ''; | $ret = ''; |
486 | 482 | $errmsg = array(); | $errmsg = array(); |
487 | 483 | ||
484 | // All admins will have 'who' == 0 | ||
485 | if ($rg['login_ui']['is_admin'] == 1) | ||
486 | $target_uid = 0; | ||
487 | else | ||
488 | $target_uid = $rg['login_ui']['uid']; | ||
489 | |||
488 | 490 | $rg['worker'] = array(); | $rg['worker'] = array(); |
489 | 491 | if (strcmp($op, 'add') == 0) { | if (strcmp($op, 'add') == 0) { |
490 | 492 | $rg['worker']['id'] = 0; | $rg['worker']['id'] = 0; |
... | ... | function rg_worker_add_high_level($db, $rg, $op, $paras) | |
492 | 494 | $rg['worker']['key'] = rg_id(32); | $rg['worker']['key'] = rg_id(32); |
493 | 495 | $rg['worker']['cost'] = 10; | $rg['worker']['cost'] = 10; |
494 | 496 | $rg['worker']['workers'] = 1; | $rg['worker']['workers'] = 1; |
495 | } else { | ||
497 | } else { // edit | ||
496 | 498 | if (isset($paras[0])) { | if (isset($paras[0])) { |
497 | 499 | $id = intval($paras[0]); | $id = intval($paras[0]); |
498 | $r = rg_worker_find_by_id($db, $rg['login_ui']['uid'], | ||
499 | $id); | ||
500 | |||
501 | $r = rg_worker_find_by_id($db, $target_uid, $id); | ||
500 | 502 | if ($r === -1) | if ($r === -1) |
501 | 503 | $errmsg[] = 'error loading list; try again later'; | $errmsg[] = 'error loading list; try again later'; |
502 | 504 | else if ($r === 0) | else if ($r === 0) |
... | ... | function rg_worker_add_high_level($db, $rg, $op, $paras) | |
542 | 544 | break; | break; |
543 | 545 | } | } |
544 | 546 | ||
545 | if ($rg['login_ui']['is_admin'] == 1) { | ||
546 | $rg['worker']['who'] = 0; | ||
547 | $target_uid = 0; | ||
548 | } else { | ||
549 | $rg['worker']['who'] = $rg['login_ui']['uid']; | ||
550 | $target_uid = $rg['login_ui']['uid']; | ||
551 | } | ||
547 | $rg['worker']['who'] = $target_uid; | ||
552 | 548 | $r = rg_worker_add($db, $target_uid, $rg['worker']); | $r = rg_worker_add($db, $target_uid, $rg['worker']); |
553 | 549 | if ($r === FALSE) { | if ($r === FALSE) { |
554 | 550 | $errmsg[] = rg_worker_error(); | $errmsg[] = rg_worker_error(); |