mirror of
https://github.com/twisterarmy/cloud-server.git
synced 2025-09-09 20:31:58 +00:00
add custom initial revisions number
This commit is contained in:
parent
336f3ca1a9
commit
3baeca3365
@ -68,6 +68,11 @@ if (isset($_POST) && !empty($_POST)) {
|
||||
// Get avatar revision
|
||||
$avatarSeq = $_modelAvatar->getMaxSeq($_SESSION['userId']) + 1;
|
||||
|
||||
// Custom initial revision
|
||||
if ($avatarSeq == 1) {
|
||||
$avatarSeq = $avatarSeq + TWISTER_SEQ_START_FROM;
|
||||
}
|
||||
|
||||
// Save avatar revision to DHT
|
||||
$_twister->putDHT($_SESSION['userName'],
|
||||
'avatar',
|
||||
@ -95,6 +100,11 @@ if (isset($_POST) && !empty($_POST)) {
|
||||
// Get profile revision
|
||||
$profileSeq = $_modelProfile->getMaxSeq($_SESSION['userId']) + 1;
|
||||
|
||||
// Custom initial revision
|
||||
if ($profileSeq == 1) {
|
||||
$profileSeq = $profileSeq + TWISTER_SEQ_START_FROM;
|
||||
}
|
||||
|
||||
// Save profile revision to DHT
|
||||
$_twister->putDHT($_SESSION['userName'],
|
||||
'profile',
|
||||
|
@ -22,6 +22,8 @@ define('TWISTER_PROTOCOL', '');
|
||||
define('TWISTER_USER', '');
|
||||
define('TWISTER_PASSWORD', '');
|
||||
|
||||
define('TWISTER_SEQ_START_FROM', 0); // Start initial DHT revision from
|
||||
|
||||
// MEMCACHE
|
||||
define('MEMCACHE_HOST', 'localhost');
|
||||
define('MEMCACHE_PORT', 11211);
|
||||
|
Loading…
x
Reference in New Issue
Block a user