Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.2] Search for content checked out by an author #43965

Merged
merged 6 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,11 @@ protected function getListQuery()
$search = '%' . substr($search, 8) . '%';
$query->where('(' . $db->quoteName('a.introtext') . ' LIKE :search1 OR ' . $db->quoteName('a.fulltext') . ' LIKE :search2)')
->bind([':search1', ':search2'], $search);
} elseif (stripos($search, 'checkedout:') === 0) {
$search = '%' . substr($search, 11) . '%';
$query->where('(' . $db->quoteName('uc.name') . ' LIKE :search1 OR ' . $db->quoteName('uc.username') . ' LIKE :search2)'
. ' AND ' . $db->quoteName('a.checked_out') . ' IS NOT NULL')
->bind([':search1', ':search2'], $search);
} else {
$search = '%' . str_replace(' ', '%', trim($search)) . '%';
$query->where(
Expand Down
2 changes: 1 addition & 1 deletion administrator/language/en-GB/com_content.ini
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ COM_CONTENT_FIELDSET_URLS_AND_IMAGES="Images and Links"
COM_CONTENT_FILTER_AUTHORS_BY_ME="Created by me"
COM_CONTENT_FILTER_FEATURED_NO="Unfeatured Articles"
COM_CONTENT_FILTER_FEATURED_YES="Featured Articles"
COM_CONTENT_FILTER_SEARCH_DESC="Search in title, alias and note. Prefix with ID: or AUTHOR: or CONTENT: to search for an article ID, article author or search in article content."
COM_CONTENT_FILTER_SEARCH_DESC="Search in title, alias and note. Prefix with ID: or AUTHOR: or CONTENT: to search for an article ID, article author or search in article content. Prefix with CHECKEDOUT: to search for content checked out by a specified user."
COM_CONTENT_FILTER_SEARCH_LABEL="Search Articles"
COM_CONTENT_FORM_TITLE_EDIT="Edit Article"
COM_CONTENT_FORM_TITLE_NEW="New Article"
Expand Down