Commit 37cd9705 authored by Sandra Sandhöfer's avatar Sandra Sandhöfer

#550 bananas get sorted

parent 141a88b2
Pipeline #68875551 passed with stages
in 9 minutes and 36 seconds
......@@ -289,6 +289,7 @@ Here we go :-) Just a month after our last release. Expect the next one in a mon
- Use typeahead-address-photon for address autocomplete. Update leaflet and typeahead for recent NPM versions in the same go !640 @NerdyProjects
- link top area of welcome message to profile #427 !635 @Defka
- Added a number conditionally to the dashboard event view if there is more than one event !650 @jofranz
- Sorted trust bananas by date !550
## Bugfixes
- Improve/correct user profile badge count !612 @pmayd
......
......@@ -81,7 +81,7 @@ final class ProfileGateway extends BaseGateway
$data['bouched'] = false;
$data['bananen'] = false;
$stm = 'SELECT 1 FROM `fs_rating` WHERE rater_id = :fsId AND foodsaver_id = :fs_id AND ratingtype = 2';
$stm = 'SELECT 1 FROM `fs_rating` WHERE rater_id = :fsId AND foodsaver_id = :fs_id AND ratingtype = 2 ';
try {
if ($this->db->fetchValue($stm, [':fsId' => $fsId, ':fs_id' => $this->fs_id])) {
......@@ -104,6 +104,7 @@ final class ProfileGateway extends BaseGateway
WHERE r.rater_id = fs.id
AND r.foodsaver_id = :fs_id
AND r.ratingtype = 2
ORDER BY time DESC
';
$data['bananen'] = $this->db->fetchAll($stm, [':fs_id' => $this->fs_id]);
......
......@@ -341,6 +341,7 @@ class ProfileView extends View
<table class="pintable">
<tbody>';
$odd = 'even';
foreach ($this->foodsaver['bananen'] as $b) {
if ($odd == 'even') {
$odd = 'odd';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment