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 #3257

Closed
jgerman-bot opened this issue Aug 30, 2024 · 0 comments · Fixed by #3259
Closed

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

jgerman-bot opened this issue Aug 30, 2024 · 0 comments · Fixed by #3259

Comments

@jgerman-bot
Copy link

New language relevant PR in upstream repo: joomla/joomla-cms#43965 Here are the upstream changes:

Click to expand the diff!
diff --git a/administrator/components/com_content/src/Model/ArticlesModel.php b/administrator/components/com_content/src/Model/ArticlesModel.php
index 48fc454838a2e..659d50dbedf34 100644
--- a/administrator/components/com_content/src/Model/ArticlesModel.php
+++ b/administrator/components/com_content/src/Model/ArticlesModel.php
@@ -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(
diff --git a/administrator/language/en-GB/com_content.ini b/administrator/language/en-GB/com_content.ini
index 730c0745ca3dc..0db92cc6123cb 100644
--- a/administrator/language/en-GB/com_content.ini
+++ b/administrator/language/en-GB/com_content.ini
@@ -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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

4 participants