Skip to content

Commit

Permalink
[4.1] Action Logs improved search (#36242)
Browse files Browse the repository at this point in the history
* [4.1] Action Logs improved search

This simple PR changes the search in the action logs to include the message field (aka the Action Column) so that now you can find every action that touched a specific article etc.

As this includes the username we can simply change the query from username to message

To test make sure you have more than 1 user that has performed actions on the site. Then make sure that the search finds the results you expect **including** testing the searches with the filters applied

* Update administrator/components/com_actionlogs/src/Model/ActionlogsModel.php

Co-authored-by: Quy <[email protected]>

Co-authored-by: Quy <[email protected]>
  • Loading branch information
brianteeman and Quy authored Dec 13, 2021
1 parent 01ac616 commit d2964a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ protected function getListQuery()
else
{
$search = '%' . $search . '%';
$query->where($db->quoteName('u.username') . ' LIKE :username')
->bind(':username', $search);
$query->where($db->quoteName('a.message') . ' LIKE :message')
->bind(':message', $search);
}
}

Expand Down
2 changes: 1 addition & 1 deletion administrator/language/en-GB/com_actionlogs.ini
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ COM_ACTIONLOGS_FIELD_VALUE_GET="GET"
COM_ACTIONLOGS_FIELD_VALUE_PATCH="PATCH"
COM_ACTIONLOGS_FIELD_VALUE_POST="POST"
COM_ACTIONLOGS_FIELD_VALUE_PUT="PUT"
COM_ACTIONLOGS_FILTER_SEARCH_DESC="Search in username. Prefix with ID: to search for an action log ID."
COM_ACTIONLOGS_FILTER_SEARCH_DESC="Search in action. Prefix with ID: to search for an action log ID."
COM_ACTIONLOGS_FILTER_SEARCH_LABEL="Search Actions Log"
COM_ACTIONLOGS_IP_ADDRESS="IP Address"
COM_ACTIONLOGS_IP_ADDRESS_ASC="IP Address ascending"
Expand Down

0 comments on commit d2964a4

Please sign in to comment.