Skip to content

Commit

Permalink
fix: Fix non working filters
Browse files Browse the repository at this point in the history
  • Loading branch information
kumy committed Jun 18, 2024
1 parent a3738ba commit be5590e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ protected function getObjectName(): string {
* @return string[]
*/
protected function getSearchable(): array {
return ['gkid', 'name'];
return ['gkid', 'comment', 'waypoint'];
}
}
8 changes: 8 additions & 0 deletions website/app/GeoKrety/Controller/Pages/UserInventory.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,15 @@ protected function getFilter(): array {
return ['holder = ?', $this->user->id];
}

protected function getHas(\GeoKrety\Model\Base $object): void {
$object->orHas('owner', ['0=1']); // Trick to create join on owner table
}

protected function getTemplate(): string {
return 'elements/geokrety_as_list_user_inventory.tpl';
}

protected function getSearchable(): array {
return ['gkid', 'name', 'gk_users__owner.username'];
}
}
8 changes: 8 additions & 0 deletions website/app/GeoKrety/Controller/Pages/UserRecentMoves.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ protected function getFilter(): array {
return ['author = ?', $this->user->id];
}

protected function getHas(\GeoKrety\Model\Base $object): void {
$object->orHas('geokret', ['0=1']); // Trick to create join on geokret table
}

protected function getSearchable(): array {
return ['gkid', 'comment', 'waypoint', 'gk_geokrety__geokret.name'];
}

protected function getTemplate(): string {
return 'elements/move_as_list.tpl';
}
Expand Down

0 comments on commit be5590e

Please sign in to comment.