List of commits:
Subject Hash Author Date (UTC)
Improved user info caching a0ec540e7be1aa620a559c6f77537b9687aacc11 Catalin(ux) M. BOIE 2016-04-06 16:16:54
Improved git_init function c2732004dbb1695444be3030111faf4401c83fb1 Catalin(ux) M. BOIE 2016-04-06 16:16:09
Improved docker image creation ec28c883d9f7c9c69d80302a7d70ea1d630b070c Catalin(ux) M. BOIE 2016-04-06 16:15:11
Improved installation (checksum for postgres, useless SELinux booleans 4d9dcd67da247000a19a2f81aebd81f265bfe293 Catalin(ux) M. BOIE 2016-04-06 16:14:25
Add RLUG to history c84c2eaab9c1eb7e6898ef14f12fd8701c6fc285 Catalin(ux) M. BOIE 2016-04-06 16:13:32
Added unit test for e-mail confirmation 8a835c3ffa6f27c208fef6b4525f9aa571c603f6 Catalin(ux) M. BOIE 2016-03-27 11:41:35
Avoid caching in docker c8bc0ff648b60aa159c2a83d8ab1db3c574f19c3 Catalin(ux) M. BOIE 2016-03-14 16:32:25
Do not allow random input as reference fe5d01344b9131edeb2812f72549bf74d8242653 Catalin(ux) M. BOIE 2016-03-14 16:31:59
Bump version to 0.50 485f0f8bae787bfbd7c52c9b934af977d8a2b871 Catalin(ux) M. BOIE 2016-03-11 23:32:34
Fixed bug add menu 47d48b6bbf669bd51d6876521fa288d217dda5d2 Catalin(ux) M. BOIE 2016-03-11 23:32:02
docker small fixes 1e68d0bbf8e16365068636a4e813c8ae0db2be5c Catalin(ux) M. BOIE 2016-03-11 23:31:34
Corrected a problem in spec file 8d28fc4e9d66d9a07d1148d893176a99533f8796 Catalin(ux) M. BOIE 2016-03-11 17:33:18
Bump version to v0.49 1481eafa69e1b2f2e2922a7b26acc3dc9a56f1a3 Catalin(ux) M. BOIE 2016-03-11 17:26:13
Just some comments 96f8542619d772c29b9bb07e4a066b7302d6f35c Catalin(ux) M. BOIE 2016-03-11 17:25:29
TODO clean-ups 3e34a304a204792b1a1a0b403c88e3164441066c Catalin(ux) M. BOIE 2016-03-09 17:27:10
Document web hooks and anonymous push 449e2d788ec06a49cc93f7d058df51ec351b9244 Catalin(ux) M. BOIE 2016-03-09 17:26:29
Do not log password in logs 4e183a15605f4b338863ea97192e46e0cf62cfe8 Catalin(ux) M. BOIE 2016-03-09 17:25:52
Do not continue to show objects if repo returned an error cd2a6a06d7867bb5da19108c6ab575e741b8b08e Catalin(ux) M. BOIE 2016-03-09 03:50:28
Make more clearer the events error message c76dd790a73e04318f0fc58b22d7701858e7dadf Catalin(ux) M. BOIE 2016-03-08 20:57:37
Accept 301 as a valid HTTP code 368f187c74e54052dbeeddfe9b5a533b155a62c2 Catalin(ux) M. BOIE 2016-03-08 20:57:01
Commit a0ec540e7be1aa620a559c6f77537b9687aacc11 - Improved user info caching
Author: Catalin(ux) M. BOIE
Author date (UTC): 2016-04-06 16:16
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2016-04-06 16:16
Parent(s): c2732004dbb1695444be3030111faf4401c83fb1
Signing key:
Tree: 7650410e6306ee5f5e5401100fae67a12598dd5b
File Lines added Lines deleted
inc/user.inc.php 16 23
File inc/user.inc.php changed (mode: 100644) (index 47aedee..ca4cbe7)
... ... function rg_user_cosmetic(&$row)
126 126 if (isset($row['itime'])) if (isset($row['itime']))
127 127 $row['itime_nice'] = gmdate('Y-m-d', $row['itime']); $row['itime_nice'] = gmdate('Y-m-d', $row['itime']);
128 128
129 $row['email_md5'] = md5(strtolower(trim($row['email'])));
130
131 $row['homepage'] = rg_re_userpage($row);
132
129 133 $row['HTML:gravatar'] = '<img class="gravatar" src="https://www.gravatar.com/avatar/' $row['HTML:gravatar'] = '<img class="gravatar" src="https://www.gravatar.com/avatar/'
130 134 . $row['email_md5'] . $row['email_md5']
131 135 . '?s=64&amp;r=g" alt="avatar" width="64" height="64" />'; . '?s=64&amp;r=g" alt="avatar" width="64" height="64" />';
 
... ... function rg_user_edit($db, $d)
522 526 $row = rg_sql_fetch_array($res); $row = rg_sql_fetch_array($res);
523 527 rg_sql_free_result($res); rg_sql_free_result($res);
524 528
525 // More stuff to be cached
526 $d['email_md5'] = md5(strtolower(trim($d['email'])));
527
528 529 if ($d['uid'] == 0) { // add if ($d['uid'] == 0) { // add
530 $d['uid'] = $row['uid'];
529 531 rg_cache_set('user' . '::' . $d['uid'] . '::' . ':info', rg_cache_set('user' . '::' . $d['uid'] . '::' . ':info',
530 532 $d, RG_SOCKET_NO_WAIT); $d, RG_SOCKET_NO_WAIT);
531 533
532 534 $event = array('category' => 2000, 'prio' => 50, $event = array('category' => 2000, 'prio' => 50,
533 'ui' => array(
534 'uid' => $row['uid'],
535 'realname' => $d['realname'],
536 'username' => $d['username'],
537 'email' => $d['confirmed'] > 0 ? $d['email'] : "",
538 'confirm_token' => $d['confirm_token']
539 ),
535 'ui' => $d,
540 536 'rg_account_email_confirm' => $rg_account_email_confirm, 'rg_account_email_confirm' => $rg_account_email_confirm,
541 537 'url' => rg_base_url() 'url' => rg_base_url()
542 538 ); );
 
... ... function rg_user_info($db, $uid, $user, $email)
630 626 "email" => $email); "email" => $email);
631 627
632 628 if ($uid > 0) { if ($uid > 0) {
633 // We will get all info about fthe user not only 'info'
629 // We will get all info about the user not only 'info'
634 630 // to populate the cache with all info. // to populate the cache with all info.
635 631 $c = rg_cache_get('user' . '::' . $uid); $c = rg_cache_get('user' . '::' . $uid);
636 if ($c !== FALSE) {
637 if (isset($c['info'])) {
638 $ret = $c['info'];
639 $ret['exists'] = 1;
640 rg_user_cosmetic($ret);
641 break;
642 }
632 if (($c !== FALSE)
633 && (isset($c['info']))
634 && (isset($c['info']['uid']))) {
635 $ret = $c['info'];
636 $ret['exists'] = 1;
637 rg_user_cosmetic($ret);
638 break;
643 639 } }
644 640
645 641 $sql = "SELECT * FROM users WHERE uid = @@uid@@"; $sql = "SELECT * FROM users WHERE uid = @@uid@@";
 
... ... function rg_user_info($db, $uid, $user, $email)
686 682
687 683 $ret = array_merge($ret, $row); $ret = array_merge($ret, $row);
688 684
689 $ret['homepage'] = rg_re_userpage($ret);
690 $ret['email_md5'] = md5(strtolower(trim($ret['email'])));
691
692 685 rg_cache_set('user' . '::' . $ret['uid'] . '::' . 'info', rg_cache_set('user' . '::' . $ret['uid'] . '::' . 'info',
693 686 $ret, RG_SOCKET_NO_WAIT); $ret, RG_SOCKET_NO_WAIT);
694 687 rg_cache_set('username_to_uid::' . $ret['username'], rg_cache_set('username_to_uid::' . $ret['username'],
 
... ... function rg_user_confirm($db, $token)
1422 1415 } }
1423 1416 rg_sql_free_result($res); rg_sql_free_result($res);
1424 1417
1425 rg_cache_merge('user' . '::' . $uid . '::' . 'info',
1426 $params, RG_SOCKET_NO_WAIT);
1418 rg_cache_set('user' . '::' . $uid . '::' . 'info'
1419 . '::' . 'confirmed', $now, RG_SOCKET_NO_WAIT);
1427 1420
1428 1421 $ret = $uid; $ret = $uid;
1429 1422 break; break;
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