-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '5.1-dev' into users-accesslevel-delete
- Loading branch information
Showing
911 changed files
with
15,961 additions
and
6,436 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
administrator/components/com_admin/postinstall/htaccessbrotli.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
/** | ||
* @package Joomla.Administrator | ||
* @subpackage com_admin | ||
* | ||
* @copyright (C) 2024 Open Source Matters, Inc. <https://www.joomla.org> | ||
* @license GNU General Public License version 2 or later; see LICENSE.txt | ||
* | ||
* This file contains post-installation message handling for notifying users of a change | ||
* in the default .htaccess file regarding Brotli compression. | ||
*/ | ||
|
||
// phpcs:disable PSR1.Files.SideEffects | ||
\defined('_JEXEC') or die; | ||
// phpcs:enable PSR1.Files.SideEffects | ||
|
||
/** | ||
* Notifies users of a change in the default .htaccess file regarding setting for brotli to prevent double compression | ||
* | ||
* This check returns true regardless of condition. | ||
* | ||
* @return boolean | ||
* | ||
* @since 4.4.4 | ||
*/ | ||
function admin_postinstall_htaccessbrotli_condition() | ||
{ | ||
$htaccessContent = ''; | ||
|
||
if (is_file(JPATH_ROOT . '/.htaccess') || is_file(JPATH_ROOT . '/htaccess.txt')) { | ||
$htaccessContent = file_get_contents(is_file(JPATH_ROOT . '/.htaccess') ? JPATH_ROOT . '/.htaccess' : JPATH_ROOT . '/htaccess.txt'); | ||
} | ||
|
||
return !str_contains($htaccessContent, 'E=no-brotli:1'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.