Skip to content

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

@jgerman-bot

Description

@jgerman-bot

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"

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions