diff --git a/CHANGELOG.md b/CHANGELOG.md
index 82ecf3b72..c49db82b5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,8 +1,93 @@
-# v1.1.7
+# v1.1.10
## XX/XX/2016
+1. [](#improved)
+ * Improve detection of home path. Also allow ~/.grav on Windows, drop ConsoleTrait::isWindows() method, used only for that [#1204](https://github.com/getgrav/grav/pull/1204)
+1. [](#bugfix)
+ * Fixed case where extracting a package would cause an error during rename
+ * Fix issue with using Yaml::parse direcly on a filename, now deprecated
+
+# v1.1.9
+## 12/13/2016
+
+1. [](#new)
+ * RC released as stable
+1. [](#improved)
+ * Better error handling in cache clear
+ * YAML syntax fixes for the future compatibility
+ * Added new parameter `remove` for `onBeforeCacheClear` event
+ * Add support for calling Media object as function to get medium by filename
+1. [](#bugfix)
+ * Added checks before accessing admin reference during `Page::blueprints()` call. Allows to access `page.blueprints` from Twig in the frontend
+
+# v1.1.9-rc.3
+## 12/07/2016
+
+1. [](#new)
+ * Add `ignore_empty` property to be used on array fields, if positive only save options with a value
+ * Use new `permissions` field in user account
+ * Add `range(int start, int end, int step)` twig function to generate an array of numbers between start and end, inclusive
+ * New retina Media image derivatives array support (`![](image.jpg?derivatives=[640,1024,1440])`) [#1147](https://github.com/getgrav/grav/pull/1147)
+ * Added stream support for images (`![Sepia Image](image://image.jpg?sepia)`)
+ * Added stream support for links (`[Download PDF](user://data/pdf/my.pdf)`)
+ * Added new `onBeforeCacheClear` event to add custom paths to cache clearing process
+1. [](#improved)
+ * Added alias `selfupdate` to the `self-upgrade` `bin/gpm` CLI command
+ * Synced `webserver-configs/htaccess.txt` with `.htaccess`
+ * Use permissions field in group details.
+ * Updated vendor libraries
+ * Added a warning on GPM update to update Grav first if needed [#1194](https://github.com/getgrav/grav/pull/1194)
+ 1. [](#bugfix)
+ * Fix page collections problem with `@page.modular` [#1178](https://github.com/getgrav/grav/pull/1178)
+ * Fix issue with using a multiple taxonomy filter of which one had no results, thanks to @hughbris [#1184](https://github.com/getgrav/grav/issues/1184)
+ * Fix saving permissions in group
+ * Fixed issue with redirect of a page getting moved to a different location
+
+# v1.1.9-rc.2
+## 11/26/2016
+
+1. [](#new)
+ * Added two new sort order options for pages: `publish_date` and `unpublish_date` [#1173](https://github.com/getgrav/grav/pull/1173))
+1. [](#improved)
+ * Multisite: Create image cache folder if it doesn't exist
+ * Add 2 new language values for French [#1174](https://github.com/getgrav/grav/issues/1174)
+1. [](#bugfix)
+ * Fixed issue when we have a meta file without corresponding media [#1179](https://github.com/getgrav/grav/issues/1179)
+ * Update class namespace for Admin class [#874](https://github.com/getgrav/grav-plugin-admin/issues/874)
+
+# v1.1.9-rc.1
+## 11/09/2016
+
+1. [](#new)
+ * Added a `CompiledJsonFile` object to better handle Json files.
+ * Added Base32 encode/decode class
+ * Added a new `User::find()` method
+1. [](#improved)
+ * Moved `messages` object into core Grav from login plugin
+ * Added `getTaxonomyItemKeys` to the Taxonomy object [#1124](https://github.com/getgrav/grav/issues/1124)
+ * Added a `redirect_me` Twig function [#1124](https://github.com/getgrav/grav/issues/1124)
+ * Added a Caddyfile for newer Caddy versions [#1115](https://github.com/getgrav/grav/issues/1115)
+ * Allow to override sorting flags for page header-based or default ordering. If the `intl` PHP extension is loaded, only these flags are available: https://secure.php.net/manual/en/collator.asort.php. Otherwise, you can use the PHP standard sorting flags (https://secure.php.net/manual/en/array.constants.php) [#1169](https://github.com/getgrav/grav/issues/1169)
+1. [](#bugfix)
+ * Fixed an issue with site redirects/routes, not processing with extension (.html, .json, etc.)
+ * Don't truncate HTML if content length is less than summary size [#1125](https://github.com/getgrav/grav/issues/1125)
+ * Return max available number when calling random() on a collection passing an int > available items [#1135](https://github.com/getgrav/grav/issues/1135)
+ * Use correct ratio when applying image filters to image alternatives [#1147](https://github.com/getgrav/grav/issues/1147)
+ * Fixed URI path in multi-site when query parameters were used in front page
+
+# v1.1.8
+## 10/22/2016
+
+1. [](#bugfix)
+ * Fixed warning with unset `ssl` option when using GPM [#1132](https://github.com/getgrav/grav/issues/1132)
+
+# v1.1.7
+## 10/22/2016
+
+1. [](#improved)
+ * Improved the capabilities of Image derivatives [#1107](https://github.com/getgrav/grav/pull/1107)
1. [](#bugfix)
- * Only pass verify_peer settings to cURL and fopen if the setting is disabled
+ * Only pass verify_peer settings to cURL and fopen if the setting is disabled [#1120](https://github.com/getgrav/grav/issues/1120)
# v1.1.6
## 10/19/2016
diff --git a/composer.lock b/composer.lock
index 92c0cb53d..d00fccb24 100644
--- a/composer.lock
+++ b/composer.lock
@@ -53,16 +53,16 @@
},
{
"name": "doctrine/cache",
- "version": "v1.6.0",
+ "version": "v1.6.1",
"source": {
"type": "git",
"url": "https://github.com/doctrine/cache.git",
- "reference": "f8af318d14bdb0eff0336795b428b547bd39ccb6"
+ "reference": "b6f544a20f4807e81f7044d31e679ccbb1866dc3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/cache/zipball/f8af318d14bdb0eff0336795b428b547bd39ccb6",
- "reference": "f8af318d14bdb0eff0336795b428b547bd39ccb6",
+ "url": "https://api.github.com/repos/doctrine/cache/zipball/b6f544a20f4807e81f7044d31e679ccbb1866dc3",
+ "reference": "b6f544a20f4807e81f7044d31e679ccbb1866dc3",
"shasum": ""
},
"require": {
@@ -119,7 +119,7 @@
"cache",
"caching"
],
- "time": "2015-12-31 16:37:02"
+ "time": "2016-10-29 11:16:17"
},
{
"name": "donatj/phpuseragentparser",
@@ -178,12 +178,12 @@
"source": {
"type": "git",
"url": "https://github.com/erusev/parsedown.git",
- "reference": "cbc4b3f6126e484acc033ec4edf3886f319a0c0f"
+ "reference": "20ff8bbb57205368b4b42d094642a3e52dac85fb"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/erusev/parsedown/zipball/cbc4b3f6126e484acc033ec4edf3886f319a0c0f",
- "reference": "cbc4b3f6126e484acc033ec4edf3886f319a0c0f",
+ "url": "https://api.github.com/repos/erusev/parsedown/zipball/20ff8bbb57205368b4b42d094642a3e52dac85fb",
+ "reference": "20ff8bbb57205368b4b42d094642a3e52dac85fb",
"shasum": ""
},
"require": {
@@ -212,7 +212,7 @@
"markdown",
"parser"
],
- "time": "2016-10-09 10:04:16"
+ "time": "2016-11-02 15:56:58"
},
{
"name": "erusev/parsedown-extra",
@@ -466,16 +466,16 @@
},
{
"name": "matthiasmullie/minify",
- "version": "1.3.38",
+ "version": "1.3.42",
"source": {
"type": "git",
"url": "https://github.com/matthiasmullie/minify.git",
- "reference": "de4bcf23b6a3291bd828ce800aab834304eb50c5"
+ "reference": "b473affbb76ae6ec4e46d368b5081b5bfcdd3ed2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/de4bcf23b6a3291bd828ce800aab834304eb50c5",
- "reference": "de4bcf23b6a3291bd828ce800aab834304eb50c5",
+ "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/b473affbb76ae6ec4e46d368b5081b5bfcdd3ed2",
+ "reference": "b473affbb76ae6ec4e46d368b5081b5bfcdd3ed2",
"shasum": ""
},
"require": {
@@ -484,6 +484,7 @@
"php": ">=5.3.0"
},
"require-dev": {
+ "friendsofphp/php-cs-fixer": "~1.0",
"matthiasmullie/scrapbook": "~1.0",
"phpunit/phpunit": "~4.8"
},
@@ -518,7 +519,7 @@
"minifier",
"minify"
],
- "time": "2016-10-13 11:49:22"
+ "time": "2016-11-23 10:16:14"
},
{
"name": "matthiasmullie/path-converter",
@@ -632,16 +633,16 @@
},
{
"name": "monolog/monolog",
- "version": "1.21.0",
+ "version": "1.22.0",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/monolog.git",
- "reference": "f42fbdfd53e306bda545845e4dbfd3e72edb4952"
+ "reference": "bad29cb8d18ab0315e6c477751418a82c850d558"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Seldaek/monolog/zipball/f42fbdfd53e306bda545845e4dbfd3e72edb4952",
- "reference": "f42fbdfd53e306bda545845e4dbfd3e72edb4952",
+ "url": "https://api.github.com/repos/Seldaek/monolog/zipball/bad29cb8d18ab0315e6c477751418a82c850d558",
+ "reference": "bad29cb8d18ab0315e6c477751418a82c850d558",
"shasum": ""
},
"require": {
@@ -652,7 +653,7 @@
"psr/log-implementation": "1.0.0"
},
"require-dev": {
- "aws/aws-sdk-php": "^2.4.9",
+ "aws/aws-sdk-php": "^2.4.9 || ^3.0",
"doctrine/couchdb": "~1.0@dev",
"graylog2/gelf-php": "~1.0",
"jakub-onderka/php-parallel-lint": "0.9",
@@ -706,7 +707,7 @@
"logging",
"psr-3"
],
- "time": "2016-07-29 03:23:52"
+ "time": "2016-11-26 00:15:39"
},
{
"name": "pimple/pimple",
@@ -899,16 +900,16 @@
},
{
"name": "symfony/console",
- "version": "v2.8.12",
+ "version": "v2.8.14",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "d7a5a88178f94dcc29531ea4028ea614e35452d4"
+ "reference": "a871ba00e0f604dceac64c56c27f99fbeaf4854e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/d7a5a88178f94dcc29531ea4028ea614e35452d4",
- "reference": "d7a5a88178f94dcc29531ea4028ea614e35452d4",
+ "url": "https://api.github.com/repos/symfony/console/zipball/a871ba00e0f604dceac64c56c27f99fbeaf4854e",
+ "reference": "a871ba00e0f604dceac64c56c27f99fbeaf4854e",
"shasum": ""
},
"require": {
@@ -956,7 +957,7 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
- "time": "2016-09-28 00:10:16"
+ "time": "2016-11-15 23:02:12"
},
{
"name": "symfony/debug",
@@ -1017,16 +1018,16 @@
},
{
"name": "symfony/event-dispatcher",
- "version": "v2.8.12",
+ "version": "v2.8.14",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
- "reference": "889983a79a043dfda68f38c38b6dba092dd49cd8"
+ "reference": "25c576abd4e0f212e678fe8b2bd9a9a98c7ea934"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/889983a79a043dfda68f38c38b6dba092dd49cd8",
- "reference": "889983a79a043dfda68f38c38b6dba092dd49cd8",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/25c576abd4e0f212e678fe8b2bd9a9a98c7ea934",
+ "reference": "25c576abd4e0f212e678fe8b2bd9a9a98c7ea934",
"shasum": ""
},
"require": {
@@ -1073,20 +1074,20 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
- "time": "2016-07-28 16:56:28"
+ "time": "2016-10-13 01:43:15"
},
{
"name": "symfony/polyfill-iconv",
- "version": "v1.2.0",
+ "version": "v1.3.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-iconv.git",
- "reference": "b287e8554b1ffd9b5b20b5df940d906930ff4a10"
+ "reference": "cba36f3616d9866b3e52662e88da5c090fac1e97"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/b287e8554b1ffd9b5b20b5df940d906930ff4a10",
- "reference": "b287e8554b1ffd9b5b20b5df940d906930ff4a10",
+ "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/cba36f3616d9866b3e52662e88da5c090fac1e97",
+ "reference": "cba36f3616d9866b3e52662e88da5c090fac1e97",
"shasum": ""
},
"require": {
@@ -1098,7 +1099,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.2-dev"
+ "dev-master": "1.3-dev"
}
},
"autoload": {
@@ -1132,20 +1133,20 @@
"portable",
"shim"
],
- "time": "2016-05-18 14:26:46"
+ "time": "2016-11-14 01:06:16"
},
{
"name": "symfony/polyfill-mbstring",
- "version": "v1.2.0",
+ "version": "v1.3.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "dff51f72b0706335131b00a7f49606168c582594"
+ "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/dff51f72b0706335131b00a7f49606168c582594",
- "reference": "dff51f72b0706335131b00a7f49606168c582594",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/e79d363049d1c2128f133a2667e4f4190904f7f4",
+ "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4",
"shasum": ""
},
"require": {
@@ -1157,7 +1158,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.2-dev"
+ "dev-master": "1.3-dev"
}
},
"autoload": {
@@ -1191,20 +1192,20 @@
"portable",
"shim"
],
- "time": "2016-05-18 14:26:46"
+ "time": "2016-11-14 01:06:16"
},
{
"name": "symfony/var-dumper",
- "version": "v2.8.12",
+ "version": "v2.8.14",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
- "reference": "08761341cc4a3b2d9d9578364f7c655b178254aa"
+ "reference": "195c6238ec319cde9204b2d7f271654ceb69b71b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/var-dumper/zipball/08761341cc4a3b2d9d9578364f7c655b178254aa",
- "reference": "08761341cc4a3b2d9d9578364f7c655b178254aa",
+ "url": "https://api.github.com/repos/symfony/var-dumper/zipball/195c6238ec319cde9204b2d7f271654ceb69b71b",
+ "reference": "195c6238ec319cde9204b2d7f271654ceb69b71b",
"shasum": ""
},
"require": {
@@ -1254,20 +1255,20 @@
"debug",
"dump"
],
- "time": "2016-09-29 14:06:15"
+ "time": "2016-11-03 07:52:58"
},
{
"name": "symfony/yaml",
- "version": "v2.8.12",
+ "version": "v2.8.14",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
- "reference": "e7540734bad981fe59f8ef14b6fc194ae9df8d9c"
+ "reference": "befb26a3713c97af90d25dd12e75621ef14d91ff"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/yaml/zipball/e7540734bad981fe59f8ef14b6fc194ae9df8d9c",
- "reference": "e7540734bad981fe59f8ef14b6fc194ae9df8d9c",
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/befb26a3713c97af90d25dd12e75621ef14d91ff",
+ "reference": "befb26a3713c97af90d25dd12e75621ef14d91ff",
"shasum": ""
},
"require": {
@@ -1303,20 +1304,20 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
- "time": "2016-09-02 01:57:56"
+ "time": "2016-11-14 16:15:57"
},
{
"name": "twig/twig",
- "version": "v1.26.1",
+ "version": "v1.28.2",
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
- "reference": "a09d8ee17ac1cfea29ed60c83960ad685c6a898d"
+ "reference": "b22ce0eb070e41f7cba65d78fe216de29726459c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/twigphp/Twig/zipball/a09d8ee17ac1cfea29ed60c83960ad685c6a898d",
- "reference": "a09d8ee17ac1cfea29ed60c83960ad685c6a898d",
+ "url": "https://api.github.com/repos/twigphp/Twig/zipball/b22ce0eb070e41f7cba65d78fe216de29726459c",
+ "reference": "b22ce0eb070e41f7cba65d78fe216de29726459c",
"shasum": ""
},
"require": {
@@ -1324,12 +1325,12 @@
},
"require-dev": {
"symfony/debug": "~2.7",
- "symfony/phpunit-bridge": "~2.7"
+ "symfony/phpunit-bridge": "~3.2@dev"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.26-dev"
+ "dev-master": "1.28-dev"
}
},
"autoload": {
@@ -1364,22 +1365,22 @@
"keywords": [
"templating"
],
- "time": "2016-10-05 18:57:41"
+ "time": "2016-11-23 18:41:40"
}
],
"packages-dev": [
{
"name": "behat/gherkin",
- "version": "v4.4.4",
+ "version": "v4.4.5",
"source": {
"type": "git",
"url": "https://github.com/Behat/Gherkin.git",
- "reference": "cf8cc94647101e02a33d690245896d83d880aea1"
+ "reference": "5c14cff4f955b17d20d088dec1bde61c0539ec74"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Behat/Gherkin/zipball/cf8cc94647101e02a33d690245896d83d880aea1",
- "reference": "cf8cc94647101e02a33d690245896d83d880aea1",
+ "url": "https://api.github.com/repos/Behat/Gherkin/zipball/5c14cff4f955b17d20d088dec1bde61c0539ec74",
+ "reference": "5c14cff4f955b17d20d088dec1bde61c0539ec74",
"shasum": ""
},
"require": {
@@ -1425,20 +1426,20 @@
"gherkin",
"parser"
],
- "time": "2016-09-18 12:16:14"
+ "time": "2016-10-30 11:50:56"
},
{
"name": "codeception/codeception",
- "version": "2.2.5",
+ "version": "2.2.7",
"source": {
"type": "git",
"url": "https://github.com/Codeception/Codeception.git",
- "reference": "b4729341e469d0f174f3cade85718ff5bf8dd751"
+ "reference": "86770e89d266557c20dd0b1de5390e706f4770c1"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Codeception/Codeception/zipball/b4729341e469d0f174f3cade85718ff5bf8dd751",
- "reference": "b4729341e469d0f174f3cade85718ff5bf8dd751",
+ "url": "https://api.github.com/repos/Codeception/Codeception/zipball/86770e89d266557c20dd0b1de5390e706f4770c1",
+ "reference": "86770e89d266557c20dd0b1de5390e706f4770c1",
"shasum": ""
},
"require": {
@@ -1456,7 +1457,7 @@
"symfony/browser-kit": ">=2.7 <4.0",
"symfony/console": ">=2.7 <4.0",
"symfony/css-selector": ">=2.7 <4.0",
- "symfony/dom-crawler": ">=2.7 <4.0",
+ "symfony/dom-crawler": ">=2.7.5 <4.0",
"symfony/event-dispatcher": ">=2.7 <4.0",
"symfony/finder": ">=2.7 <4.0",
"symfony/yaml": ">=2.7 <4.0"
@@ -1472,7 +1473,8 @@
"pda/pheanstalk": "~3.0",
"php-amqplib/php-amqplib": "~2.4",
"predis/predis": "^1.0",
- "squizlabs/php_codesniffer": "~2.0"
+ "squizlabs/php_codesniffer": "~2.0",
+ "vlucas/phpdotenv": "^2.4.0"
},
"suggest": {
"codeception/specify": "BDD-style code blocks",
@@ -1516,7 +1518,7 @@
"functional testing",
"unit testing"
],
- "time": "2016-09-29 01:29:59"
+ "time": "2016-12-05 04:12:24"
},
{
"name": "doctrine/instantiator",
@@ -1731,16 +1733,16 @@
},
{
"name": "guzzlehttp/promises",
- "version": "1.2.0",
+ "version": "1.3.0",
"source": {
"type": "git",
"url": "https://github.com/guzzle/promises.git",
- "reference": "c10d860e2a9595f8883527fa0021c7da9e65f579"
+ "reference": "2693c101803ca78b27972d84081d027fca790a1e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/promises/zipball/c10d860e2a9595f8883527fa0021c7da9e65f579",
- "reference": "c10d860e2a9595f8883527fa0021c7da9e65f579",
+ "url": "https://api.github.com/repos/guzzle/promises/zipball/2693c101803ca78b27972d84081d027fca790a1e",
+ "reference": "2693c101803ca78b27972d84081d027fca790a1e",
"shasum": ""
},
"require": {
@@ -1778,7 +1780,7 @@
"keywords": [
"promise"
],
- "time": "2016-05-18 16:56:05"
+ "time": "2016-11-18 17:47:58"
},
{
"name": "guzzlehttp/psr7",
@@ -1939,16 +1941,16 @@
},
{
"name": "phpdocumentor/type-resolver",
- "version": "0.2",
+ "version": "0.2.1",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
- "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443"
+ "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/b39c7a5b194f9ed7bd0dd345c751007a41862443",
- "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443",
+ "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb",
+ "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb",
"shasum": ""
},
"require": {
@@ -1982,20 +1984,20 @@
"email": "me@mikevanriel.com"
}
],
- "time": "2016-06-10 07:14:17"
+ "time": "2016-11-25 06:54:22"
},
{
"name": "phpspec/prophecy",
- "version": "v1.6.1",
+ "version": "v1.6.2",
"source": {
"type": "git",
"url": "https://github.com/phpspec/prophecy.git",
- "reference": "58a8137754bc24b25740d4281399a4a3596058e0"
+ "reference": "6c52c2722f8460122f96f86346600e1077ce22cb"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpspec/prophecy/zipball/58a8137754bc24b25740d4281399a4a3596058e0",
- "reference": "58a8137754bc24b25740d4281399a4a3596058e0",
+ "url": "https://api.github.com/repos/phpspec/prophecy/zipball/6c52c2722f8460122f96f86346600e1077ce22cb",
+ "reference": "6c52c2722f8460122f96f86346600e1077ce22cb",
"shasum": ""
},
"require": {
@@ -2003,10 +2005,11 @@
"php": "^5.3|^7.0",
"phpdocumentor/reflection-docblock": "^2.0|^3.0.2",
"sebastian/comparator": "^1.1",
- "sebastian/recursion-context": "^1.0"
+ "sebastian/recursion-context": "^1.0|^2.0"
},
"require-dev": {
- "phpspec/phpspec": "^2.0"
+ "phpspec/phpspec": "^2.0",
+ "phpunit/phpunit": "^4.8 || ^5.6.5"
},
"type": "library",
"extra": {
@@ -2044,7 +2047,7 @@
"spy",
"stub"
],
- "time": "2016-06-07 08:13:47"
+ "time": "2016-11-21 14:58:47"
},
{
"name": "phpunit/php-code-coverage",
@@ -2110,16 +2113,16 @@
},
{
"name": "phpunit/php-file-iterator",
- "version": "1.4.1",
+ "version": "1.4.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
- "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0"
+ "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6150bf2c35d3fc379e50c7602b75caceaa39dbf0",
- "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5",
+ "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5",
"shasum": ""
},
"require": {
@@ -2153,7 +2156,7 @@
"filesystem",
"iterator"
],
- "time": "2015-06-21 13:08:43"
+ "time": "2016-10-03 07:40:28"
},
{
"name": "phpunit/php-text-template",
@@ -2242,16 +2245,16 @@
},
{
"name": "phpunit/php-token-stream",
- "version": "1.4.8",
+ "version": "1.4.9",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
- "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da"
+ "reference": "3b402f65a4cc90abf6e1104e388b896ce209631b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da",
- "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3b402f65a4cc90abf6e1104e388b896ce209631b",
+ "reference": "3b402f65a4cc90abf6e1104e388b896ce209631b",
"shasum": ""
},
"require": {
@@ -2287,20 +2290,20 @@
"keywords": [
"tokenizer"
],
- "time": "2015-09-15 10:49:45"
+ "time": "2016-11-15 14:06:22"
},
{
"name": "phpunit/phpunit",
- "version": "4.8.27",
+ "version": "4.8.30",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "c062dddcb68e44b563f66ee319ddae2b5a322a90"
+ "reference": "a534e04d0bd39c557c2881c341efd06fa6f1292a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c062dddcb68e44b563f66ee319ddae2b5a322a90",
- "reference": "c062dddcb68e44b563f66ee319ddae2b5a322a90",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a534e04d0bd39c557c2881c341efd06fa6f1292a",
+ "reference": "a534e04d0bd39c557c2881c341efd06fa6f1292a",
"shasum": ""
},
"require": {
@@ -2316,7 +2319,7 @@
"phpunit/php-text-template": "~1.2",
"phpunit/php-timer": "^1.0.6",
"phpunit/phpunit-mock-objects": "~2.3",
- "sebastian/comparator": "~1.1",
+ "sebastian/comparator": "~1.2.2",
"sebastian/diff": "~1.2",
"sebastian/environment": "~1.3",
"sebastian/exporter": "~1.2",
@@ -2359,7 +2362,7 @@
"testing",
"xunit"
],
- "time": "2016-07-21 06:48:14"
+ "time": "2016-12-01 17:05:48"
},
{
"name": "phpunit/phpunit-mock-objects",
@@ -2469,22 +2472,22 @@
},
{
"name": "sebastian/comparator",
- "version": "1.2.0",
+ "version": "1.2.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
- "reference": "937efb279bd37a375bcadf584dec0726f84dbf22"
+ "reference": "6a1ed12e8b2409076ab22e3897126211ff8b1f7f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22",
- "reference": "937efb279bd37a375bcadf584dec0726f84dbf22",
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/6a1ed12e8b2409076ab22e3897126211ff8b1f7f",
+ "reference": "6a1ed12e8b2409076ab22e3897126211ff8b1f7f",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"sebastian/diff": "~1.2",
- "sebastian/exporter": "~1.2"
+ "sebastian/exporter": "~1.2 || ~2.0"
},
"require-dev": {
"phpunit/phpunit": "~4.4"
@@ -2529,7 +2532,7 @@
"compare",
"equality"
],
- "time": "2015-07-26 15:48:44"
+ "time": "2016-11-19 09:18:40"
},
{
"name": "sebastian/diff",
@@ -2841,16 +2844,16 @@
},
{
"name": "symfony/browser-kit",
- "version": "v3.1.5",
+ "version": "v3.2.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/browser-kit.git",
- "reference": "901319a31c9b3cee7857b4aeeb81b5d64dfa34fc"
+ "reference": "34348c2691ce6254e8e008026f4c5e72c22bb318"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/browser-kit/zipball/901319a31c9b3cee7857b4aeeb81b5d64dfa34fc",
- "reference": "901319a31c9b3cee7857b4aeeb81b5d64dfa34fc",
+ "url": "https://api.github.com/repos/symfony/browser-kit/zipball/34348c2691ce6254e8e008026f4c5e72c22bb318",
+ "reference": "34348c2691ce6254e8e008026f4c5e72c22bb318",
"shasum": ""
},
"require": {
@@ -2867,7 +2870,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.1-dev"
+ "dev-master": "3.2-dev"
}
},
"autoload": {
@@ -2894,20 +2897,20 @@
],
"description": "Symfony BrowserKit Component",
"homepage": "https://symfony.com",
- "time": "2016-09-06 11:02:40"
+ "time": "2016-10-13 13:35:11"
},
{
"name": "symfony/css-selector",
- "version": "v3.1.5",
+ "version": "v3.2.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
- "reference": "ca809c64072e0fe61c1c7fb3c76cdc32265042ac"
+ "reference": "e1241f275814827c411d922ba8e64cf2a00b2994"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/css-selector/zipball/ca809c64072e0fe61c1c7fb3c76cdc32265042ac",
- "reference": "ca809c64072e0fe61c1c7fb3c76cdc32265042ac",
+ "url": "https://api.github.com/repos/symfony/css-selector/zipball/e1241f275814827c411d922ba8e64cf2a00b2994",
+ "reference": "e1241f275814827c411d922ba8e64cf2a00b2994",
"shasum": ""
},
"require": {
@@ -2916,7 +2919,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.1-dev"
+ "dev-master": "3.2-dev"
}
},
"autoload": {
@@ -2947,20 +2950,20 @@
],
"description": "Symfony CssSelector Component",
"homepage": "https://symfony.com",
- "time": "2016-09-06 11:02:40"
+ "time": "2016-11-03 08:11:03"
},
{
"name": "symfony/dom-crawler",
- "version": "v3.1.5",
+ "version": "v3.2.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/dom-crawler.git",
- "reference": "bb7395e8b1db3654de82b9f35d019958276de4d7"
+ "reference": "c6b6111f5aae7c58698cdc10220785627ac44a2c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/bb7395e8b1db3654de82b9f35d019958276de4d7",
- "reference": "bb7395e8b1db3654de82b9f35d019958276de4d7",
+ "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/c6b6111f5aae7c58698cdc10220785627ac44a2c",
+ "reference": "c6b6111f5aae7c58698cdc10220785627ac44a2c",
"shasum": ""
},
"require": {
@@ -2976,7 +2979,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.1-dev"
+ "dev-master": "3.2-dev"
}
},
"autoload": {
@@ -3003,20 +3006,20 @@
],
"description": "Symfony DomCrawler Component",
"homepage": "https://symfony.com",
- "time": "2016-08-05 08:37:39"
+ "time": "2016-11-25 12:32:42"
},
{
"name": "symfony/finder",
- "version": "v3.1.5",
+ "version": "v3.2.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
- "reference": "205b5ffbb518a98ba2ae60a52656c4a31ab00c6f"
+ "reference": "4263e35a1e342a0f195c9349c0dee38148f8a14f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/finder/zipball/205b5ffbb518a98ba2ae60a52656c4a31ab00c6f",
- "reference": "205b5ffbb518a98ba2ae60a52656c4a31ab00c6f",
+ "url": "https://api.github.com/repos/symfony/finder/zipball/4263e35a1e342a0f195c9349c0dee38148f8a14f",
+ "reference": "4263e35a1e342a0f195c9349c0dee38148f8a14f",
"shasum": ""
},
"require": {
@@ -3025,7 +3028,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.1-dev"
+ "dev-master": "3.2-dev"
}
},
"autoload": {
@@ -3052,24 +3055,24 @@
],
"description": "Symfony Finder Component",
"homepage": "https://symfony.com",
- "time": "2016-09-28 00:11:12"
+ "time": "2016-11-03 08:11:03"
},
{
"name": "webmozart/assert",
- "version": "1.1.0",
+ "version": "1.2.0",
"source": {
"type": "git",
"url": "https://github.com/webmozart/assert.git",
- "reference": "bb2d123231c095735130cc8f6d31385a44c7b308"
+ "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/webmozart/assert/zipball/bb2d123231c095735130cc8f6d31385a44c7b308",
- "reference": "bb2d123231c095735130cc8f6d31385a44c7b308",
+ "url": "https://api.github.com/repos/webmozart/assert/zipball/2db61e59ff05fe5126d152bd0655c9ea113e550f",
+ "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f",
"shasum": ""
},
"require": {
- "php": "^5.3.3|^7.0"
+ "php": "^5.3.3 || ^7.0"
},
"require-dev": {
"phpunit/phpunit": "^4.6",
@@ -3078,7 +3081,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.2-dev"
+ "dev-master": "1.3-dev"
}
},
"autoload": {
@@ -3102,7 +3105,7 @@
"check",
"validate"
],
- "time": "2016-08-09 15:02:57"
+ "time": "2016-11-23 20:04:58"
}
],
"aliases": [
diff --git a/system/blueprints/pages/default.yaml b/system/blueprints/pages/default.yaml
index 14116aab0..f38957ccf 100644
--- a/system/blueprints/pages/default.yaml
+++ b/system/blueprints/pages/default.yaml
@@ -2,7 +2,7 @@ title: PLUGIN_ADMIN.DEFAULT
rules:
slug:
- pattern: "[a-zа-я][a-zа-я0-9_\-]+"
+ pattern: '[a-zа-я][a-zа-я0-9_\-]+'
min: 2
max: 80
@@ -139,7 +139,7 @@ form:
label: PLUGIN_ADMIN.PARENT
classes: fancy
data-options@: '\Grav\Common\Page\Pages::parentsRawRoutes'
- data-default@: '\Grav\Plugin\admin::rawRoute'
+ data-default@: '\Grav\Plugin\Admin\Admin::rawRoute'
options:
'/': PLUGIN_ADMIN.DEFAULT_OPTION_ROOT
diff --git a/system/blueprints/pages/external.yaml b/system/blueprints/pages/external.yaml
index 568e2f61f..9f95d3e0c 100644
--- a/system/blueprints/pages/external.yaml
+++ b/system/blueprints/pages/external.yaml
@@ -5,7 +5,7 @@ title: PLUGIN_ADMIN:EXTERNAL
rules:
slug:
- pattern: "[a-zа-я][a-zа-я0-9_\-]+"
+ pattern: '[a-zа-я][a-zа-я0-9_\-]+'
min: 2
max: 80
diff --git a/system/blueprints/pages/modular_new.yaml b/system/blueprints/pages/modular_new.yaml
index 57ede83e8..273292363 100644
--- a/system/blueprints/pages/modular_new.yaml
+++ b/system/blueprints/pages/modular_new.yaml
@@ -1,6 +1,6 @@
rules:
slug:
- pattern: "[a-z][a-z0-9_\-]+"
+ pattern: '[a-z][a-z0-9_\-]+'
min: 2
max: 80
@@ -30,7 +30,7 @@ form:
label: PLUGIN_ADMIN.PAGE
classes: fancy
data-options@: '\Grav\Common\Page\Pages::parentsRawRoutes'
- data-default@: '\Grav\Plugin\admin::rawRoute'
+ data-default@: '\Grav\Plugin\Admin\Admin::rawRoute'
validate:
required: true
diff --git a/system/blueprints/pages/modular_raw.yaml b/system/blueprints/pages/modular_raw.yaml
index 6e71eaa13..ed25992a3 100644
--- a/system/blueprints/pages/modular_raw.yaml
+++ b/system/blueprints/pages/modular_raw.yaml
@@ -1,6 +1,6 @@
rules:
slug:
- pattern: "[a-z][a-z0-9_\-]+"
+ pattern: '[a-z][a-z0-9_\-]+'
min: 2
max: 80
@@ -79,7 +79,7 @@ form:
label: PLUGIN_ADMIN.PARENT
classes: fancy
data-options@: '\Grav\Common\Page\Pages::parentsRawRoutes'
- data-default@: '\Grav\Plugin\admin::rawRoute'
+ data-default@: '\Grav\Plugin\Admin\Admin::rawRoute'
options:
'': PLUGIN_ADMIN.DEFAULT_OPTION_SELECT
validate:
diff --git a/system/blueprints/pages/move.yaml b/system/blueprints/pages/move.yaml
index 5fda52fd2..ed3c46312 100644
--- a/system/blueprints/pages/move.yaml
+++ b/system/blueprints/pages/move.yaml
@@ -1,6 +1,6 @@
rules:
slug:
- pattern: "[a-z][a-z0-9_\-]+"
+ pattern: '[a-z][a-z0-9_\-]+'
min: 2
max: 80
@@ -12,6 +12,6 @@ form:
label: PLUGIN_ADMIN.PARENT
classes: fancy
data-options@: '\Grav\Common\Page\Pages::parentsRawRoutes'
- data-default@: '\Grav\Plugin\admin::rawRoute'
+ data-default@: '\Grav\Plugin\Admin\Admin::rawRoute'
options:
'/': PLUGIN_ADMIN.DEFAULT_OPTION_ROOT
diff --git a/system/blueprints/pages/new.yaml b/system/blueprints/pages/new.yaml
index 0b2fe75fc..49b85b729 100644
--- a/system/blueprints/pages/new.yaml
+++ b/system/blueprints/pages/new.yaml
@@ -1,6 +1,6 @@
rules:
slug:
- pattern: "[a-z][a-z0-9_\-]+"
+ pattern: '[a-z][a-z0-9_\-]+'
min: 2
max: 80
@@ -32,7 +32,7 @@ form:
label: PLUGIN_ADMIN.PARENT_PAGE
classes: fancy
data-options@: '\Grav\Common\Page\Pages::parentsRawRoutes'
- data-default@: '\Grav\Plugin\admin::getLastPageRoute'
+ data-default@: '\Grav\Plugin\Admin\Admin::getLastPageRoute'
options:
'/': PLUGIN_ADMIN.DEFAULT_OPTION_ROOT
validate:
@@ -44,7 +44,7 @@ form:
label: PLUGIN_ADMIN.PAGE_FILE
help: PLUGIN_ADMIN.PAGE_FILE_HELP
data-options@: '\Grav\Common\Page\Pages::types'
- data-default@: '\Grav\Plugin\admin::getLastPageName'
+ data-default@: '\Grav\Plugin\Admin\Admin::getLastPageName'
validate:
required: true
diff --git a/system/blueprints/pages/new_folder.yaml b/system/blueprints/pages/new_folder.yaml
index c4fe96165..16024b749 100644
--- a/system/blueprints/pages/new_folder.yaml
+++ b/system/blueprints/pages/new_folder.yaml
@@ -1,6 +1,6 @@
rules:
slug:
- pattern: "[a-z][a-z0-9_\-]+"
+ pattern: '[a-z][a-z0-9_\-]+'
min: 2
max: 80
@@ -25,7 +25,7 @@ form:
label: PLUGIN_ADMIN.PARENT_PAGE
classes: fancy
data-options@: '\Grav\Common\Page\Pages::parentsRawRoutes'
- data-default@: '\Grav\Plugin\admin::getLastPageRoute'
+ data-default@: '\Grav\Plugin\Admin\Admin::getLastPageRoute'
options:
'/': PLUGIN_ADMIN.DEFAULT_OPTION_ROOT
validate:
diff --git a/system/blueprints/pages/raw.yaml b/system/blueprints/pages/raw.yaml
index fe5dba2fe..60870eaf7 100644
--- a/system/blueprints/pages/raw.yaml
+++ b/system/blueprints/pages/raw.yaml
@@ -1,6 +1,6 @@
rules:
slug:
- pattern: "[a-z][a-z0-9_\-]+"
+ pattern: '[a-z][a-z0-9_\-]+'
min: 2
max: 80
@@ -79,7 +79,7 @@ form:
label: PLUGIN_ADMIN.PARENT
classes: fancy
data-options@: '\Grav\Common\Page\Pages::parentsRawRoutes'
- data-default@: '\Grav\Plugin\admin::rawRoute'
+ data-default@: '\Grav\Plugin\Admin\Admin::rawRoute'
options:
'/': PLUGIN_ADMIN.DEFAULT_OPTION_ROOT
diff --git a/system/blueprints/user/account.yaml b/system/blueprints/user/account.yaml
index bd1caa85f..ff657b4c4 100644
--- a/system/blueprints/user/account.yaml
+++ b/system/blueprints/user/account.yaml
@@ -1,4 +1,4 @@
-title: Site
+title: Account
form:
validation: loose
@@ -56,7 +56,7 @@ form:
label: PLUGIN_ADMIN.LANGUAGE
size: medium
classes: fancy
- data-options@: '\Grav\Plugin\admin::adminLanguages'
+ data-options@: '\Grav\Plugin\Admin\Admin::adminLanguages'
default: 'en'
help: PLUGIN_ADMIN.LANGUAGE_HELP
@@ -77,16 +77,9 @@ form:
validate:
type: commalist
- access.admin:
- type: array
- label: PLUGIN_ADMIN.ADMIN_ACCESS
- multiple: false
- validate:
- type: array
-
- access.site:
- type: array
- label: PLUGIN_ADMIN.SITE_ACCESS
- multiple: false
+ access:
+ type: permissions
+ label: PLUGIN_ADMIN.PERMISSIONS
+ ignore_empty: true
validate:
type: array
diff --git a/system/blueprints/user/group.yaml b/system/blueprints/user/group.yaml
index 0adcbb5c0..a5a7477b6 100644
--- a/system/blueprints/user/group.yaml
+++ b/system/blueprints/user/group.yaml
@@ -29,16 +29,9 @@ form:
size: small
label: PLUGIN_ADMIN_PRO.ICON
- access.admin:
- type: array
- label: PLUGIN_ADMIN.ADMIN_ACCESS
- multiple: false
- validate:
- type: array
-
- access.site:
- type: array
- label: PLUGIN_ADMIN.SITE_ACCESS
- multiple: false
+ access:
+ type: permissions
+ label: PLUGIN_ADMIN.PERMISSIONS
+ ignore_empty: true
validate:
type: array
diff --git a/system/defines.php b/system/defines.php
index 7ef5561b4..956dd1b1d 100644
--- a/system/defines.php
+++ b/system/defines.php
@@ -8,7 +8,7 @@
// Some standard defines
define('GRAV', true);
-define('GRAV_VERSION', '1.1.6');
+define('GRAV_VERSION', '1.1.9');
define('GRAV_TESTING', false);
define('DS', '/');
define('GRAV_PHP_MIN', '5.5.9');
diff --git a/system/src/Grav/Common/Cache.php b/system/src/Grav/Common/Cache.php
index 048260527..5891d75ed 100644
--- a/system/src/Grav/Common/Cache.php
+++ b/system/src/Grav/Common/Cache.php
@@ -11,7 +11,7 @@
use \Doctrine\Common\Cache as DoctrineCache;
use Grav\Common\Config\Config;
use Grav\Common\Filesystem\Folder;
-use Grav\Common\Grav;
+use RocketTheme\Toolbox\Event\Event;
/**
* The GravCache object is used throughout Grav to store and retrieve cached data.
@@ -356,36 +356,38 @@ public static function clearCache($remove = 'standard')
$remove_paths = self::$standard_remove;
}
+ // Clearing cache event to add paths to clear
+ Grav::instance()->fireEvent('onBeforeCacheClear', new Event(['remove' => $remove, 'paths' => &$remove_paths]));
foreach ($remove_paths as $stream) {
// Convert stream to a real path
try {
$path = $locator->findResource($stream, true, true);
- } catch (\Exception $e) {
- // stream not found..
- continue;
- }
- $anything = false;
- $files = glob($path . '/*');
-
- if (is_array($files)) {
- foreach ($files as $file) {
- if (is_file($file)) {
- if (@unlink($file)) {
- $anything = true;
- }
- } elseif (is_dir($file)) {
- if (Folder::delete($file)) {
- $anything = true;
+ $anything = false;
+ $files = glob($path . '/*');
+
+ if (is_array($files)) {
+ foreach ($files as $file) {
+ if (is_file($file)) {
+ if (@unlink($file)) {
+ $anything = true;
+ }
+ } elseif (is_dir($file)) {
+ if (Folder::delete($file)) {
+ $anything = true;
+ }
}
}
}
- }
- if ($anything) {
- $output[] = '
This is a string to truncate
', Utils::truncateHtml('This is a string to truncate
', 100)); $this->assertEquals('', Utils::truncateHtml('', 6)); $this->assertEquals('This is a string.
\nIt splits two lines.
", Utils::truncateHtml("This is a string.
\nIt splits two lines.
", 100)); } public function testSafeTruncateHtml() diff --git a/webserver-configs/Caddyfile b/webserver-configs/Caddyfile index 682947087..9d3b43760 100644 --- a/webserver-configs/Caddyfile +++ b/webserver-configs/Caddyfile @@ -6,23 +6,25 @@ fastcgi / 127.0.0.1:9000 php # deny all direct access for these folders rewrite { r /(.git|cache|bin|logs|backups|tests)/.*$ - status 403 + to /403 } # deny running scripts inside core system folders rewrite { r /(system|vendor)/.*\.(txt|xml|md|html|yaml|php|pl|py|cgi|twig|sh|bat)$ - status 403 + to /403 } # deny running scripts inside user folder rewrite { r /user/.*\.(txt|md|yaml|php|pl|py|cgi|twig|sh|bat)$ - status 403 + to /403 } # deny access to specific files in the root folder rewrite { r /(LICENSE.txt|composer.lock|composer.json|nginx.conf|web.config|htaccess.txt|\.htaccess) - status 403 + to /403 } + +status 403 /403 ## End - Security # global rewrite should come last. diff --git a/webserver-configs/Caddyfile-0.8.x b/webserver-configs/Caddyfile-0.8.x new file mode 100644 index 000000000..520eafb42 --- /dev/null +++ b/webserver-configs/Caddyfile-0.8.x @@ -0,0 +1,33 @@ +# Caddyfile for Caddy 0.8.x and below + +:8080 +gzip +fastcgi / 127.0.0.1:9000 php + +# Begin - Security +# deny all direct access for these folders +rewrite { + r /(.git|cache|bin|logs|backups|tests)/.*$ + status 403 +} +# deny running scripts inside core system folders +rewrite { + r /(system|vendor)/.*\.(txt|xml|md|html|yaml|php|pl|py|cgi|twig|sh|bat)$ + status 403 +} +# deny running scripts inside user folder +rewrite { + r /user/.*\.(txt|md|yaml|php|pl|py|cgi|twig|sh|bat)$ + status 403 +} +# deny access to specific files in the root folder +rewrite { + r /(LICENSE.txt|composer.lock|composer.json|nginx.conf|web.config|htaccess.txt|\.htaccess) + status 403 +} +## End - Security + +# global rewrite should come last. +rewrite { + to {path} {path}/ /index.php?_url={uri} +} diff --git a/webserver-configs/htaccess.txt b/webserver-configs/htaccess.txt index c82ca8fa6..faef479f7 100644 --- a/webserver-configs/htaccess.txt +++ b/webserver-configs/htaccess.txt @@ -3,7 +3,7 @@ RewriteEngine On ## Begin RewriteBase -# If you are getting 404 errors on subpages, you may have to uncomment the RewriteBase entry +# If you are getting 500 or 404 errors on subpages, you may have to uncomment the RewriteBase entry # You should change the '/' to your appropriate subfolder. For example if you have # your Grav install at the root of your site '/' should work, else it might be something # along the lines of: RewriteBase /