Skip to content

Commit

Permalink
Merge pull request #15110 from craftcms/feature/override-rebrand-path
Browse files Browse the repository at this point in the history
Override rebrand path
  • Loading branch information
brandonkelly authored Jun 1, 2024
2 parents 6837ebc + cedcc9d commit 99c03ad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG-WIP.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- The web-based installer now displays the error message when installation fails.
- GraphQL schema edit pages now have a “Save and continue editing” alternate action.
- The system edition can now be defined by a `CRAFT_EDITION` environment variable. ([#15094](https://github.com/craftcms/cms/discussions/15094))
- The rebrand assets path can now be defined by a `CRAFT_REBRAND_PATH` environment variable. ([#15110](https://github.com/craftcms/cms/pull/15110))

### Development
- Added the `{% expires %}` tag, which simplifies setting cache headers on the response. ([#14969](https://github.com/craftcms/cms/pull/14969))
Expand Down
5 changes: 4 additions & 1 deletion src/services/Path.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
namespace craft\services;

use Craft;
use craft\helpers\App;
use craft\helpers\FileHelper;
use yii\base\Component;
use yii\base\Exception;
Expand Down Expand Up @@ -215,7 +216,9 @@ public function getConfigDeltaPath(bool $create = true): string
*/
public function getRebrandPath(bool $create = true): string
{
$path = $this->getStoragePath($create) . DIRECTORY_SEPARATOR . 'rebrand';
$path = App::env('CRAFT_REBRAND_PATH')
? App::parseEnv('$CRAFT_REBRAND_PATH')
: $this->getStoragePath($create) . DIRECTORY_SEPARATOR . 'rebrand';

if ($create) {
FileHelper::createDirectory($path);
Expand Down

0 comments on commit 99c03ad

Please sign in to comment.