JoomlaPolska / jezyk-J4

Język polski dla Joomla 4
GNU General Public License v2.0
3 stars 5 forks source link

[5.0] Smart Search: Allow to hide archived content #408

Closed joomlapl-bot closed 7 months ago

joomlapl-bot commented 1 year ago

PR w związku ze zmianą oryginału https://github.com/joomla/joomla-cms/pull/41504 Poniżej zmiany w oryginale:

Click to expand the diff! ```diff diff --git a/administrator/components/com_finder/src/Indexer/Adapter.php b/administrator/components/com_finder/src/Indexer/Adapter.php index 65e8d33b2c4a6..0669d8f4d2555 100644 --- a/administrator/components/com_finder/src/Indexer/Adapter.php +++ b/administrator/components/com_finder/src/Indexer/Adapter.php @@ -919,9 +919,16 @@ protected function translateState($item, $category = null) // Translate the state switch ($item) { - // Published and archived items only should return a published state + // Published items should always show up in search results case 1: + return 1; + + // Archived items should only show up when option is enabled case 2: + if ($this->params->get('search_archived', 1) == 0) { + return 0; + } + return 1; // All other states should return an unpublished state diff --git a/administrator/language/en-GB/plg_finder_categories.ini b/administrator/language/en-GB/plg_finder_categories.ini index 62e086af6adf5..37527650399d3 100644 --- a/administrator/language/en-GB/plg_finder_categories.ini +++ b/administrator/language/en-GB/plg_finder_categories.ini @@ -5,6 +5,8 @@ PLG_FINDER_CATEGORIES="Smart Search - Categories" PLG_FINDER_CATEGORIES_XML_DESCRIPTION="This plugin indexes Joomla! Categories." +PLG_FINDER_CATEGORIES_FIELD_SEARCH_ARCHIVED_DESC="When changing this setting, you have to run the index command in Smart Search before this takes effect." +PLG_FINDER_CATEGORIES_FIELD_SEARCH_ARCHIVED_LABEL="Search Archived Content" PLG_FINDER_CATEGORIES_TAXONOMIES_LABEL="Taxonomies to Index" PLG_FINDER_CATEGORIES_TAXONOMIES_LANGUAGE="Language" PLG_FINDER_CATEGORIES_TAXONOMIES_TYPE="Type" diff --git a/administrator/language/en-GB/plg_finder_contacts.ini b/administrator/language/en-GB/plg_finder_contacts.ini index d55214f36b51a..c7ab9917db870 100644 --- a/administrator/language/en-GB/plg_finder_contacts.ini +++ b/administrator/language/en-GB/plg_finder_contacts.ini @@ -5,6 +5,8 @@ PLG_FINDER_CONTACTS="Smart Search - Contacts" PLG_FINDER_CONTACTS_XML_DESCRIPTION="This plugin indexes Joomla! Contacts." +PLG_FINDER_CONTACTS_FIELD_SEARCH_ARCHIVED_DESC="When changing this setting, you have to run the index command in Smart Search before this takes effect." +PLG_FINDER_CONTACTS_FIELD_SEARCH_ARCHIVED_LABEL="Search Archived Content" PLG_FINDER_CONTACTS_TAXONOMIES_CATEGORY="Category" PLG_FINDER_CONTACTS_TAXONOMIES_COUNTRY="Country" PLG_FINDER_CONTACTS_TAXONOMIES_LABEL="Taxonomies to Index" diff --git a/administrator/language/en-GB/plg_finder_content.ini b/administrator/language/en-GB/plg_finder_content.ini index 4a58a44c7c390..5cf0f0faa1be1 100644 --- a/administrator/language/en-GB/plg_finder_content.ini +++ b/administrator/language/en-GB/plg_finder_content.ini @@ -4,6 +4,8 @@ ; Note : All ini files need to be saved as UTF-8 PLG_FINDER_CONTENT="Smart Search - Content" +PLG_FINDER_CONTENT_FIELD_SEARCH_ARCHIVED_DESC="When changing this setting, you have to run the index command in Smart Search before this takes effect." +PLG_FINDER_CONTENT_FIELD_SEARCH_ARCHIVED_LABEL="Search Archived Content" PLG_FINDER_CONTENT_TAXONOMIES_AUTHOR="Author" PLG_FINDER_CONTENT_TAXONOMIES_CATEGORY="Category" PLG_FINDER_CONTENT_TAXONOMIES_LABEL="Taxonomies to Index" diff --git a/administrator/language/en-GB/plg_finder_newsfeeds.ini b/administrator/language/en-GB/plg_finder_newsfeeds.ini index e311469ada5a2..de8dbc76cd2a7 100644 --- a/administrator/language/en-GB/plg_finder_newsfeeds.ini +++ b/administrator/language/en-GB/plg_finder_newsfeeds.ini @@ -4,6 +4,8 @@ ; Note : All ini files need to be saved as UTF-8 PLG_FINDER_NEWSFEEDS="Smart Search - News Feeds" +PLG_FINDER_NEWSFEEDS_FIELD_SEARCH_ARCHIVED_DESC="When changing this setting, you have to run the index command in Smart Search before this takes effect." +PLG_FINDER_NEWSFEEDS_FIELD_SEARCH_ARCHIVED_LABEL="Search Archived Content" PLG_FINDER_NEWSFEEDS_XML_DESCRIPTION="This plugin indexes Joomla! News feeds." PLG_FINDER_NEWSFEEDS_TAXONOMIES_CATEGORY="Category" PLG_FINDER_NEWSFEEDS_TAXONOMIES_LABEL="Taxonomies to Index" diff --git a/administrator/language/en-GB/plg_finder_tags.ini b/administrator/language/en-GB/plg_finder_tags.ini index 14b009a250aad..aa663215f91e0 100644 --- a/administrator/language/en-GB/plg_finder_tags.ini +++ b/administrator/language/en-GB/plg_finder_tags.ini @@ -7,6 +7,8 @@ PLG_FINDER_QUERY_FILTER_BRANCH_P_TAG="Tags" PLG_FINDER_QUERY_FILTER_BRANCH_S_TAG="Tag" PLG_FINDER_TAGS="Smart Search - Tags" PLG_FINDER_TAGS_XML_DESCRIPTION="This plugin indexes Joomla! Tags." +PLG_FINDER_TAGS_FIELD_SEARCH_ARCHIVED_DESC="When changing this setting, you have to run the index command in Smart Search before this takes effect." +PLG_FINDER_TAGS_FIELD_SEARCH_ARCHIVED_LABEL="Search Archived Content" PLG_FINDER_TAGS_TAXONOMIES_AUTHOR="Author" PLG_FINDER_TAGS_TAXONOMIES_LABEL="Taxonomies to Index" PLG_FINDER_TAGS_TAXONOMIES_LANGUAGE="Language" diff --git a/plugins/finder/categories/categories.xml b/plugins/finder/categories/categories.xml index 20838b34bdb3a..e9ff96e9443db 100644 --- a/plugins/finder/categories/categories.xml +++ b/plugins/finder/categories/categories.xml @@ -21,6 +21,18 @@
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +