Click to expand the diff!
```diff
diff --git a/administrator/components/com_media/src/Controller/ApiController.php b/administrator/components/com_media/src/Controller/ApiController.php
index 46497ab5a426..cf5362d68bae 100644
--- a/administrator/components/com_media/src/Controller/ApiController.php
+++ b/administrator/components/com_media/src/Controller/ApiController.php
@@ -12,10 +12,12 @@
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Helper\MediaHelper;
+use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\MVC\Model\BaseModel;
use Joomla\CMS\Response\JsonResponse;
+use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\Component\Media\Administrator\Exception\FileExistsException;
use Joomla\Component\Media\Administrator\Exception\FileNotFoundException;
@@ -355,7 +357,9 @@ private function checkContent()
|| ($postMaxSize > 0 && $contentLength > $postMaxSize)
|| ($memoryLimit > -1 && $contentLength > $memoryLimit)
) {
- throw new \Exception(Text::_('COM_MEDIA_ERROR_WARNFILETOOLARGE'), 403);
+ $link = 'index.php?option=com_config&view=component&component=com_media';
+ $output = HTMLHelper::_('link', Route::_($link), Text::_('JOPTIONS'));
+ throw new \Exception(Text::sprintf('COM_MEDIA_ERROR_WARNFILETOOLARGE', $output), 403);
}
}
diff --git a/administrator/language/en-GB/com_media.ini b/administrator/language/en-GB/com_media.ini
index ccc19dde3b7d..61ae6cb41001 100644
--- a/administrator/language/en-GB/com_media.ini
+++ b/administrator/language/en-GB/com_media.ini
@@ -37,7 +37,7 @@ COM_MEDIA_ERROR_NOT_FOUND="File or Folder not found"
COM_MEDIA_ERROR_NO_ADAPTER_FOUND="No adapter found."
COM_MEDIA_ERROR_NO_CONTENT_AVAILABLE="No content available!"
COM_MEDIA_ERROR_NO_PROVIDERS="No filesystem providers have been found. Please enable at least one filesystem plugin."
-COM_MEDIA_ERROR_WARNFILETOOLARGE="This file is too large to upload. You can change the limits for your site in the component options."
+COM_MEDIA_ERROR_WARNFILETOOLARGE="This file is too large to upload. You can change the limits for your site in the Media component %s."
COM_MEDIA_FIELDSET_OPTIONS_LABEL="Media"
COM_MEDIA_FIELD_CHECK_MIME_DESC="Use MIME Magic or Fileinfo to attempt to verify files. Try disabling this if you get invalid mime type errors."
COM_MEDIA_FIELD_CHECK_MIME_LABEL="Check MIME Types"
```
PR w związku ze zmianą oryginału https://github.com/joomla/joomla-cms/pull/39741 Poniżej zmiany w oryginale:
Click to expand the diff!
```diff diff --git a/administrator/components/com_media/src/Controller/ApiController.php b/administrator/components/com_media/src/Controller/ApiController.php index 46497ab5a426..cf5362d68bae 100644 --- a/administrator/components/com_media/src/Controller/ApiController.php +++ b/administrator/components/com_media/src/Controller/ApiController.php @@ -12,10 +12,12 @@ use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Helper\MediaHelper; +use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\MVC\Controller\BaseController; use Joomla\CMS\MVC\Model\BaseModel; use Joomla\CMS\Response\JsonResponse; +use Joomla\CMS\Router\Route; use Joomla\CMS\Session\Session; use Joomla\Component\Media\Administrator\Exception\FileExistsException; use Joomla\Component\Media\Administrator\Exception\FileNotFoundException; @@ -355,7 +357,9 @@ private function checkContent() || ($postMaxSize > 0 && $contentLength > $postMaxSize) || ($memoryLimit > -1 && $contentLength > $memoryLimit) ) { - throw new \Exception(Text::_('COM_MEDIA_ERROR_WARNFILETOOLARGE'), 403); + $link = 'index.php?option=com_config&view=component&component=com_media'; + $output = HTMLHelper::_('link', Route::_($link), Text::_('JOPTIONS')); + throw new \Exception(Text::sprintf('COM_MEDIA_ERROR_WARNFILETOOLARGE', $output), 403); } } diff --git a/administrator/language/en-GB/com_media.ini b/administrator/language/en-GB/com_media.ini index ccc19dde3b7d..61ae6cb41001 100644 --- a/administrator/language/en-GB/com_media.ini +++ b/administrator/language/en-GB/com_media.ini @@ -37,7 +37,7 @@ COM_MEDIA_ERROR_NOT_FOUND="File or Folder not found" COM_MEDIA_ERROR_NO_ADAPTER_FOUND="No adapter found." COM_MEDIA_ERROR_NO_CONTENT_AVAILABLE="No content available!" COM_MEDIA_ERROR_NO_PROVIDERS="No filesystem providers have been found. Please enable at least one filesystem plugin." -COM_MEDIA_ERROR_WARNFILETOOLARGE="This file is too large to upload. You can change the limits for your site in the component options." +COM_MEDIA_ERROR_WARNFILETOOLARGE="This file is too large to upload. You can change the limits for your site in the Media component %s." COM_MEDIA_FIELDSET_OPTIONS_LABEL="Media" COM_MEDIA_FIELD_CHECK_MIME_DESC="Use MIME Magic or Fileinfo to attempt to verify files. Try disabling this if you get invalid mime type errors." COM_MEDIA_FIELD_CHECK_MIME_LABEL="Check MIME Types" ```