Click to expand the diff!
```diff
diff --git a/administrator/components/com_finder/src/View/Searches/HtmlView.php b/administrator/components/com_finder/src/View/Searches/HtmlView.php
index 5769739189fb..c067bc33bc54 100644
--- a/administrator/components/com_finder/src/View/Searches/HtmlView.php
+++ b/administrator/components/com_finder/src/View/Searches/HtmlView.php
@@ -125,7 +125,12 @@ public function display($tpl = null)
// Check if component is enabled
if (!$this->enabled) {
- $app->enqueueMessage(Text::sprintf('COM_FINDER_LOGGING_DISABLED', $output), 'warning');
+ // Check if the user has access to the component options
+ if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) {
+ $app->enqueueMessage(Text::sprintf('COM_FINDER_LOGGING_DISABLED', $output), 'warning');
+ } else {
+ $app->enqueueMessage(Text::_('COM_FINDER_LOGGING_DISABLED_NO_AUTH'), 'warning');
+ }
}
// Prepare the view.
diff --git a/administrator/language/en-GB/com_finder.ini b/administrator/language/en-GB/com_finder.ini
index 917c618e39ea..4ee239b3ee08 100644
--- a/administrator/language/en-GB/com_finder.ini
+++ b/administrator/language/en-GB/com_finder.ini
@@ -169,6 +169,7 @@ COM_FINDER_INDEXER_MESSAGE_RUNNING="Your content is being indexed. Do not close
COM_FINDER_ITEM_X_ONLY="%s Only"
COM_FINDER_ITEMS="Content"
COM_FINDER_LOGGING_DISABLED="Gathering of statistics is disabled. Enable it in the %s."
+COM_FINDER_LOGGING_DISABLED_NO_AUTH="Gathering of statistics is disabled. You don't have permission to change this. Please contact a website administrator if this is incorrect."
COM_FINDER_MANAGER_SEARCHES="Smart Search: Search Term Analysis"
COM_FINDER_MAPS="Maps"
COM_FINDER_MAPS_CONFIRM_DELETE_PROMPT="Are you sure you want to delete the selected map(s)?"
```
PR w związku ze zmianą oryginału https://github.com/joomla/joomla-cms/pull/39705 Poniżej zmiany w oryginale:
Click to expand the diff!
```diff diff --git a/administrator/components/com_finder/src/View/Searches/HtmlView.php b/administrator/components/com_finder/src/View/Searches/HtmlView.php index 5769739189fb..c067bc33bc54 100644 --- a/administrator/components/com_finder/src/View/Searches/HtmlView.php +++ b/administrator/components/com_finder/src/View/Searches/HtmlView.php @@ -125,7 +125,12 @@ public function display($tpl = null) // Check if component is enabled if (!$this->enabled) { - $app->enqueueMessage(Text::sprintf('COM_FINDER_LOGGING_DISABLED', $output), 'warning'); + // Check if the user has access to the component options + if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) { + $app->enqueueMessage(Text::sprintf('COM_FINDER_LOGGING_DISABLED', $output), 'warning'); + } else { + $app->enqueueMessage(Text::_('COM_FINDER_LOGGING_DISABLED_NO_AUTH'), 'warning'); + } } // Prepare the view. diff --git a/administrator/language/en-GB/com_finder.ini b/administrator/language/en-GB/com_finder.ini index 917c618e39ea..4ee239b3ee08 100644 --- a/administrator/language/en-GB/com_finder.ini +++ b/administrator/language/en-GB/com_finder.ini @@ -169,6 +169,7 @@ COM_FINDER_INDEXER_MESSAGE_RUNNING="Your content is being indexed. Do not close COM_FINDER_ITEM_X_ONLY="%s Only" COM_FINDER_ITEMS="Content" COM_FINDER_LOGGING_DISABLED="Gathering of statistics is disabled. Enable it in the %s." +COM_FINDER_LOGGING_DISABLED_NO_AUTH="Gathering of statistics is disabled. You don't have permission to change this. Please contact a website administrator if this is incorrect." COM_FINDER_MANAGER_SEARCHES="Smart Search: Search Term Analysis" COM_FINDER_MAPS="Maps" COM_FINDER_MAPS_CONFIRM_DELETE_PROMPT="Are you sure you want to delete the selected map(s)?" ```