Skip to content

Commit

Permalink
Merge branch 'release/1.0.7' into v1
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed Mar 20, 2018
2 parents 77aba68 + 45836fb commit 800730c
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# FastCGI Cache Bust Changelog

## 1.0.7 - 2018.03.20
### Changed
* Added a config file override warning to the Settings page
* Fixed inconsistent quotes in the `config.php`

## 1.0.6 - 2018.03.02
### Changed
* Fixed deprecation errors from Craft CMS 3 RC13
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "nystudio107/craft-fastcgicachebust",
"description": "Bust the Nginx FastCGI Cache when entries are saved or created.",
"type": "craft-plugin",
"version": "1.0.6",
"version": "1.0.7",
"keywords": [
"craft",
"cms",
Expand Down
2 changes: 1 addition & 1 deletion src/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@

// Enter the full absolute path to the FastCGI Cache directory.
// If you require more than one FastCGI Cache directory cleared, separate the paths with a comma (,).
"cachePath" => '',
'cachePath' => '',

];
8 changes: 8 additions & 0 deletions src/templates/_includes/macros.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{% macro configWarning(setting, file) -%}
{%- set configArray = craft.app.config.getConfigFromFile(file) -%}
{%- if configArray[setting] is defined -%}
{{- "This is being overridden by the `#{setting}` setting in the `config/#{file}.php` file." |raw }}
{%- else -%}
{{ false }}
{%- endif -%}
{%- endmacro %}
7 changes: 5 additions & 2 deletions src/templates/settings.twig
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,15 @@

{% import "_includes/forms" as forms %}

{% from "fastcgi-cache-bust/_includes/macros.twig" import configWarning %}

{% do view.registerAssetBundle("nystudio107\\fastcgicachebust\\assetbundles\\fastcgicachebust\\FastcgiCacheBustAsset") %}

{{ forms.textField({
label: 'FastCGI Cache Path',
instructions: 'Enter the full absolute path to the FastCGI Cache directory. If you require more than one FastCGI Cache directory cleared, separate the paths with a comma (,).',
id: 'cachePath',
name: 'cachePath',
value: settings['cachePath']})
}}
value: settings['cachePath'],
warning: configWarning("cachePath", "fastcgi-cache-bust")
}) }}

0 comments on commit 800730c

Please sign in to comment.