Compare commits
No commits in common. "c02e35580f761578669603d75c51445fd4df10e9" and "fc6792ccfcef369124c342d7eba75cae8d052a1f" have entirely different histories.
c02e35580f
...
fc6792ccfc
@ -10,7 +10,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"esoko/soko-web": "0.10.1",
|
||||
"esoko/soko-web": "0.10",
|
||||
"fzaninotto/faker": "^1.9"
|
||||
},
|
||||
"require-dev": {
|
||||
|
8
composer.lock
generated
8
composer.lock
generated
@ -4,15 +4,15 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "27b6af78f89ef8dde87e918118511571",
|
||||
"content-hash": "db04b12ad70bbdfe83841fa292277ec6",
|
||||
"packages": [
|
||||
{
|
||||
"name": "esoko/soko-web",
|
||||
"version": "v0.10.1",
|
||||
"version": "0.10",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://git.esoko.eu/esoko/soko-web.git",
|
||||
"reference": "585d469b695365e6f8c0f9b596dbb18b6d3ce584"
|
||||
"reference": "fd286c9cffadc4a26609bfa00944f8014a2f3f59"
|
||||
},
|
||||
"require": {
|
||||
"phpmailer/phpmailer": "^6.8",
|
||||
@ -33,7 +33,7 @@
|
||||
"GNU GPL 3.0"
|
||||
],
|
||||
"description": "Lightweight web framework",
|
||||
"time": "2023-05-02T16:06:33+00:00"
|
||||
"time": "2023-05-02T10:55:47+00:00"
|
||||
},
|
||||
{
|
||||
"name": "fzaninotto/faker",
|
||||
|
@ -40,7 +40,7 @@ class ChallengeRepository
|
||||
$select = new Select(\Container::$dbConnection);
|
||||
$select->innerJoin('user_in_challenge', ['challenge', 'id'], '=', ['user_in_challenge', 'challenge_id']);
|
||||
$select->innerJoin('users', ['users', 'id'], '=', ['user_in_challenge', 'user_id']);
|
||||
$select->where(['user_in_challenge', 'user_id'], '=', $user->getId());
|
||||
$select->where('user_id', '=', $user->getId());
|
||||
|
||||
yield from \Container::$persistentDataManager->selectMultipleFromDb($select, Challenge::class);
|
||||
}
|
||||
@ -50,8 +50,8 @@ class ChallengeRepository
|
||||
$select = new Select(\Container::$dbConnection);
|
||||
$select->innerJoin('user_in_challenge', ['challenge', 'id'], '=', ['user_in_challenge', 'challenge_id']);
|
||||
$select->innerJoin('users', ['users', 'id'], '=', ['user_in_challenge', 'user_id']);
|
||||
$select->where(['user_in_challenge', 'user_id'], '=', $user->getId());
|
||||
$select->where(['user_in_challenge', 'is_owner'], '=', true);
|
||||
$select->where('user_id', '=', $user->getId());
|
||||
$select->where('is_owner', '=', true);
|
||||
|
||||
yield from \Container::$persistentDataManager->selectMultipleFromDb($select, Challenge::class);
|
||||
}
|
||||
@ -60,7 +60,7 @@ class ChallengeRepository
|
||||
{
|
||||
$select = new Select(\Container::$dbConnection);
|
||||
$select->innerJoin('place_in_challenge', ['challenges', 'id'], '=', ['place_in_challenge', 'challenge_id']);
|
||||
$select->where(['place_in_challenge', 'place_id'], '=', $place->getId());
|
||||
$select->where('place_id', '=', $place->getId());
|
||||
|
||||
yield from \Container::$persistentDataManager->selectMultipleFromDb($select, Challenge::class);
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ class GuessRepository
|
||||
$select = new Select(\Container::$dbConnection);
|
||||
$select->innerJoin('place_in_challenge', ['place_in_challenge', 'id'], '=', ['guesses', 'place_in_challenge_id']);
|
||||
$select->where('user_id', '=', $user->getId());
|
||||
$select->where(['place_in_challenge', 'challenge_id'], '=', $challenge->getId());
|
||||
$select->where('challenge_id', '=', $challenge->getId());
|
||||
|
||||
yield from \Container::$persistentDataManager->selectMultipleFromDb($select, Guess::class);
|
||||
}
|
||||
@ -33,8 +33,8 @@ class GuessRepository
|
||||
$select = new Select(\Container::$dbConnection);
|
||||
$select->innerJoin('place_in_challenge', ['place_in_challenge', 'id'], '=', ['guesses', 'place_in_challenge_id']);
|
||||
$select->where('user_id', '=', $user->getId());
|
||||
$select->where(['place_in_challenge', 'challenge_id'], '=', $challenge->getId());
|
||||
$select->where(['place_in_challenge', 'place_id'], '=', $place->getId());
|
||||
$select->where('challenge_id', '=', $challenge->getId());
|
||||
$select->where('place_id', '=', $place->getId());
|
||||
|
||||
return \Container::$persistentDataManager->selectFromDb($select, Guess::class);
|
||||
}
|
||||
@ -44,8 +44,8 @@ class GuessRepository
|
||||
$select = new Select(\Container::$dbConnection);
|
||||
$select->innerJoin('place_in_challenge', ['place_in_challenge', 'id'], '=', ['guesses', 'place_in_challenge_id']);
|
||||
$select->where('user_id', '=', $userId);
|
||||
$select->where(['place_in_challenge', 'challenge_id'], '=', $challenge->getId());
|
||||
$select->orderBy(['place_in_challenge', 'round']);
|
||||
$select->where('challenge_id', '=', $challenge->getId());
|
||||
$select->orderBy('round');
|
||||
|
||||
yield from \Container::$persistentDataManager->selectMultipleFromDb($select, Guess::class);
|
||||
}
|
||||
@ -58,8 +58,8 @@ class GuessRepository
|
||||
}
|
||||
|
||||
$select = new Select(\Container::$dbConnection);
|
||||
$select->where(['guesses__place_in_challenge', 'challenge_id'], '=', $challenge->getId());
|
||||
$select->orderBy(['guesses__place_in_challenge', 'round']);
|
||||
$select->where('challenge_id', '=', $challenge->getId());
|
||||
$select->orderBy('round');
|
||||
|
||||
yield from \Container::$persistentDataManager->selectMultipleFromDb($select, Guess::class, true, $withRelations);
|
||||
}
|
||||
@ -72,8 +72,8 @@ class GuessRepository
|
||||
}
|
||||
|
||||
$select = new Select(\Container::$dbConnection);
|
||||
$select->where(['guesses__place_in_challenge', 'challenge_id'], '=', $challenge->getId());
|
||||
$select->where(['guesses__place_in_challenge', 'round'], '=', $round);
|
||||
$select->where('challenge_id', '=', $challenge->getId());
|
||||
$select->where('round', '=', $round);
|
||||
|
||||
yield from \Container::$persistentDataManager->selectMultipleFromDb($select, Guess::class, true, $withRelations);
|
||||
}
|
||||
@ -82,7 +82,7 @@ class GuessRepository
|
||||
{
|
||||
$select = new Select(\Container::$dbConnection);
|
||||
$select->innerJoin('place_in_challenge', ['place_in_challenge', 'id'], '=', ['guesses', 'place_in_challenge_id']);
|
||||
$select->where(['place_in_challenge', 'place_id'], '=', $place->getId());
|
||||
$select->where('place_id', '=', $place->getId());
|
||||
|
||||
yield from \Container::$persistentDataManager->selectMultipleFromDb($select, Guess::class);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ class MapRepository
|
||||
$select = new Select(\Container::$dbConnection);
|
||||
$select->innerJoin('places', ['maps', 'id'], '=', ['places', 'map_id']);
|
||||
$select->innerJoin('place_in_challenge', ['places', 'id'], '=', ['place_in_challenge', 'place_id']);
|
||||
$select->where(['place_in_challenge', 'challenge_id'], '=', $challenge->getId());
|
||||
$select->where('challenge_id', '=', $challenge->getId());
|
||||
$select->limit(1);
|
||||
|
||||
return \Container::$persistentDataManager->selectFromDb($select, Map::class);
|
||||
|
@ -110,7 +110,7 @@ class PlaceRepository
|
||||
$selectUnvisited = new Select(\Container::$dbConnection, 'places');
|
||||
$selectUnvisited->leftJoin($selectPlacesByCurrentUser, ['places', 'id'], '=', ['places_by_current_user', 'place_id']);
|
||||
$selectUnvisited->where('map_id', '=', $mapId);
|
||||
$selectUnvisited->where(['places_by_current_user', 'last_time'], '=', null);
|
||||
$selectUnvisited->where('last_time', '=', null);
|
||||
$numberOfUnvisitedPlaces = $selectUnvisited->count();
|
||||
|
||||
// look for as many new places as possible but maximum $n
|
||||
@ -174,8 +174,8 @@ class PlaceRepository
|
||||
{
|
||||
$select = new Select(\Container::$dbConnection);
|
||||
$select->innerJoin('place_in_challenge', ['places', 'id'], '=', ['place_in_challenge', 'place_id']);
|
||||
$select->where(['place_in_challenge', 'challenge_id'], '=', $challenge->getId());
|
||||
$select->orderBy(['place_in_challenge', 'round']);
|
||||
$select->where('challenge_id', '=', $challenge->getId());
|
||||
$select->orderBy('round');
|
||||
$select->limit(1, $round);
|
||||
|
||||
return \Container::$persistentDataManager->selectFromDb($select, Place::class);
|
||||
@ -185,8 +185,8 @@ class PlaceRepository
|
||||
{
|
||||
$select = new Select(\Container::$dbConnection);
|
||||
$select->innerJoin('place_in_challenge', ['places', 'id'], '=', ['place_in_challenge', 'place_id']);
|
||||
$select->where(['place_in_challenge', 'challenge_id'], '=', $challenge->getId());
|
||||
$select->orderBy(['place_in_challenge', 'round']);
|
||||
$select->where('challenge_id', '=', $challenge->getId());
|
||||
$select->orderBy('round');
|
||||
|
||||
yield from \Container::$persistentDataManager->selectMultipleFromDb($select, Place::class);
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ class UserInChallengeRepository
|
||||
|
||||
$select = new Select(\Container::$dbConnection);
|
||||
$select->where('user_id', '=', $userId);
|
||||
$select->where(['user_in_challenge__challenge', 'token'], '=', $token);
|
||||
$select->where('token', '=', $token);
|
||||
|
||||
return \Container::$persistentDataManager->selectFromDb($select, UserInChallenge::class, true, $withRelations);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user