diff --git a/administrator/components/com_content/models/articles.php b/administrator/components/com_content/models/articles.php index c38c16b5d5293..0f30feab5947d 100644 --- a/administrator/components/com_content/models/articles.php +++ b/administrator/components/com_content/models/articles.php @@ -330,6 +330,11 @@ protected function getListQuery() $search = $db->quote('%' . $db->escape(substr($search, 7), true) . '%'); $query->where('(ua.name LIKE ' . $search . ' OR ua.username LIKE ' . $search . ')'); } + elseif (stripos($search, 'content:') === 0) + { + $search = $db->quote('%' . $db->escape(substr($search, 8), true) . '%'); + $query->where('(a.introtext LIKE ' . $search . ' OR a.fulltext LIKE ' . $search . ')'); + } else { $search = $db->quote('%' . str_replace(' ', '%', $db->escape(trim($search), true) . '%')); diff --git a/administrator/components/com_content/models/featured.php b/administrator/components/com_content/models/featured.php index 81af7d7f57f5d..cf87fc899512f 100644 --- a/administrator/components/com_content/models/featured.php +++ b/administrator/components/com_content/models/featured.php @@ -199,6 +199,11 @@ protected function getListQuery() $search = $db->quote('%' . $db->escape(substr($search, 7), true) . '%'); $query->where('(ua.name LIKE ' . $search . ' OR ua.username LIKE ' . $search . ')'); } + elseif (stripos($search, 'content:') === 0) + { + $search = $db->quote('%' . $db->escape(substr($search, 8), true) . '%'); + $query->where('(a.introtext LIKE ' . $search . ' OR a.fulltext LIKE ' . $search . ')'); + } else { $search = $db->quote('%' . str_replace(' ', '%', $db->escape(trim($search), true) . '%')); diff --git a/administrator/language/en-GB/en-GB.com_content.ini b/administrator/language/en-GB/en-GB.com_content.ini index deaddc6e90c9e..2569f592bbdc8 100644 --- a/administrator/language/en-GB/en-GB.com_content.ini +++ b/administrator/language/en-GB/en-GB.com_content.ini @@ -118,7 +118,7 @@ COM_CONTENT_FIELDS_TYPE_MODAL_ARTICLE="Article" COM_CONTENT_FIELDSET_PUBLISHING="Publishing" COM_CONTENT_FIELDSET_RULES="Permissions" COM_CONTENT_FIELDSET_URLS_AND_IMAGES="Images and Links" -COM_CONTENT_FILTER_SEARCH_DESC="Search in title and alias. Prefix with ID: or AUTHOR: to search for an article ID or article author." +COM_CONTENT_FILTER_SEARCH_DESC="Search in title and alias. Prefix with ID: or AUTHOR: or CONTENT: to search for an article ID, article author or search in article content." COM_CONTENT_FILTER_SEARCH_LABEL="Search Articles" COM_CONTENT_FLOAT_DESC="Controls placement of the image." COM_CONTENT_FLOAT_FULLTEXT_LABEL="Full Text Image Float"