mirror of
https://github.com/getgrav/grav.git
synced 2025-12-05 15:29:57 +01:00
Compare commits
46 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fa7e6be95a | ||
|
|
cea43a2d21 | ||
|
|
b7387c8741 | ||
|
|
c83852f4e1 | ||
|
|
ce271cf389 | ||
|
|
8ee367e52e | ||
|
|
db03091cff | ||
|
|
c9367ba4f3 | ||
|
|
24edf15e16 | ||
|
|
70e65129d7 | ||
|
|
a5e97ef846 | ||
|
|
8a1f0d4932 | ||
|
|
79bff58021 | ||
|
|
a0918dfc4f | ||
|
|
a09c6b1088 | ||
|
|
dfed333e1b | ||
|
|
578e12940b | ||
|
|
7d215f95cf | ||
|
|
5435ee60d8 | ||
|
|
761d79272c | ||
|
|
d72eca7fb5 | ||
|
|
ca9dba1372 | ||
|
|
34cc3781d6 | ||
|
|
4eb986643c | ||
|
|
290e5be534 | ||
|
|
aea26f4db9 | ||
|
|
bf5e742a7f | ||
|
|
bd21b7f966 | ||
|
|
021fbb8ecd | ||
|
|
6d7e9ba107 | ||
|
|
62a32ab5c5 | ||
|
|
2e3a64fcef | ||
|
|
ecdbff68d8 | ||
|
|
036fc2d2af | ||
|
|
ab58cca3f7 | ||
|
|
f883820c6a | ||
|
|
9053f9ab44 | ||
|
|
bd7706a38e | ||
|
|
da7a93527d | ||
|
|
3b4296c7a4 | ||
|
|
8e065e1109 | ||
|
|
93f3fa9685 | ||
|
|
27a9390ec7 | ||
|
|
9eded2ef39 | ||
|
|
636bc97d29 | ||
|
|
1976471982 |
37
CHANGELOG.md
37
CHANGELOG.md
@@ -1,3 +1,40 @@
|
||||
# v1.4.8
|
||||
## 07/31/2018
|
||||
|
||||
1. [](#improved)
|
||||
* Add Grav version to debug bar messages tab [#2106](https://github.com/getgrav/grav/pull/2106)
|
||||
* Add Nginx config for ddev project to `webserver-configs` [#2117](https://github.com/getgrav/grav/pull/2117)
|
||||
* Vendor library updates
|
||||
1. [](#bugfix)
|
||||
* Don't allow `null` to be set as Page content
|
||||
|
||||
# v1.4.7
|
||||
## 07/13/2018
|
||||
|
||||
1. [](#improved)
|
||||
* Use `getFilename` instead of `getBasename` [#2087](https://github.com/getgrav/grav/issues/2087)
|
||||
1. [](#bugfix)
|
||||
* Fix for modular page preview [#2066](https://github.com/getgrav/grav/issues/2066)
|
||||
* `Page::routeCanonical()` should be string not array [#2069](https://github.com/getgrav/grav/issues/2069)
|
||||
|
||||
# v1.4.6
|
||||
## 06/20/2018
|
||||
|
||||
1. [](#improved)
|
||||
* Manually re-added the improved SSL off-loading that was lost with Grav v1.4.0 merge [#1888](https://github.com/getgrav/grav/pull/1888)
|
||||
* Handle multibyte strings in `truncateLetters()` [#2007](https://github.com/getgrav/grav/pull/2007)
|
||||
* Updated robots.txt to include `/user/images/` folder [#2043](https://github.com/getgrav/grav/pull/2043)
|
||||
* Add getter methods for original and action to the Page object [#2005](https://github.com/getgrav/grav/pull/2005)
|
||||
* Modular template extension follows the master page extension [#2044](https://github.com/getgrav/grav/pull/2044)
|
||||
* Vendor library updates
|
||||
1. [](#bugfix)
|
||||
* Handle `errors.display` system property better in admin plugin [admin#1452](https://github.com/getgrav/grav-plugin-admin/issues/1452)
|
||||
* Fix classes on non-http based protocol links [#2034](https://github.com/getgrav/grav/issues/2034)
|
||||
* Fixed crash on IIS (Windows) with open_basedir in effect [#2053](https://github.com/getgrav/grav/issues/2053)
|
||||
* Fixed incorrect routing with setup.php based base [#1892](https://github.com/getgrav/grav/issues/1892)
|
||||
* Fixed image resource memory deallocation [#2045](https://github.com/getgrav/grav/pull/2045)
|
||||
* Fixed issue with Errors `display:` option not handling integers properly [admin#1452](https://github.com/getgrav/grav-plugin-admin/issues/1452)
|
||||
|
||||
# v1.4.5
|
||||
## 05/15/2018
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
"gregwar/image": "2.*",
|
||||
"donatj/phpuseragentparser": "~0.3",
|
||||
"pimple/pimple": "~3.2",
|
||||
"rockettheme/toolbox": "~1.3",
|
||||
"rockettheme/toolbox": "~1.3.9",
|
||||
"maximebf/debugbar": "~1.10",
|
||||
"ext-mbstring": "*",
|
||||
"ext-openssl": "*",
|
||||
|
||||
276
composer.lock
generated
276
composer.lock
generated
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"_readme": [
|
||||
"This file locks the dependencies of your project to a known state",
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "c71dffc7daccd08aba7a52a476569d4c",
|
||||
"content-hash": "5d9e73f7f63897aa224d4878c5fb0df3",
|
||||
"packages": [
|
||||
{
|
||||
"name": "antoligy/dom-string-iterators",
|
||||
@@ -244,16 +244,16 @@
|
||||
},
|
||||
{
|
||||
"name": "donatj/phpuseragentparser",
|
||||
"version": "v0.9.0",
|
||||
"version": "v0.10.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/donatj/PhpUserAgent.git",
|
||||
"reference": "ea79de6a18e52285e62cd75cf1cebe276ecaf503"
|
||||
"reference": "9de58cc2a3e986bfee7f4cea3365c830b765cf65"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/donatj/PhpUserAgent/zipball/ea79de6a18e52285e62cd75cf1cebe276ecaf503",
|
||||
"reference": "ea79de6a18e52285e62cd75cf1cebe276ecaf503",
|
||||
"url": "https://api.github.com/repos/donatj/PhpUserAgent/zipball/9de58cc2a3e986bfee7f4cea3365c830b765cf65",
|
||||
"reference": "9de58cc2a3e986bfee7f4cea3365c830b765cf65",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -291,7 +291,7 @@
|
||||
"user agent",
|
||||
"useragent"
|
||||
],
|
||||
"time": "2017-10-23T16:52:52+00:00"
|
||||
"time": "2018-06-21T15:54:46+00:00"
|
||||
},
|
||||
{
|
||||
"name": "erusev/parsedown",
|
||||
@@ -384,16 +384,16 @@
|
||||
},
|
||||
{
|
||||
"name": "filp/whoops",
|
||||
"version": "2.1.14",
|
||||
"version": "2.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filp/whoops.git",
|
||||
"reference": "c6081b8838686aa04f1e83ba7e91f78b7b2a23e6"
|
||||
"reference": "181c4502d8f34db7aed7bfe88d4f87875b8e947a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/filp/whoops/zipball/c6081b8838686aa04f1e83ba7e91f78b7b2a23e6",
|
||||
"reference": "c6081b8838686aa04f1e83ba7e91f78b7b2a23e6",
|
||||
"url": "https://api.github.com/repos/filp/whoops/zipball/181c4502d8f34db7aed7bfe88d4f87875b8e947a",
|
||||
"reference": "181c4502d8f34db7aed7bfe88d4f87875b8e947a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -401,9 +401,9 @@
|
||||
"psr/log": "^1.0.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "0.9.*",
|
||||
"mockery/mockery": "^0.9 || ^1.0",
|
||||
"phpunit/phpunit": "^4.8.35 || ^5.7",
|
||||
"symfony/var-dumper": "^2.6 || ^3.0"
|
||||
"symfony/var-dumper": "^2.6 || ^3.0 || ^4.0"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/var-dumper": "Pretty print complex values better with var-dumper available",
|
||||
@@ -412,7 +412,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.0-dev"
|
||||
"dev-master": "2.1-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -441,7 +441,7 @@
|
||||
"throwable",
|
||||
"whoops"
|
||||
],
|
||||
"time": "2017-11-23T18:22:44+00:00"
|
||||
"time": "2018-03-03T17:56:25+00:00"
|
||||
},
|
||||
{
|
||||
"name": "gregwar/cache",
|
||||
@@ -656,16 +656,16 @@
|
||||
},
|
||||
{
|
||||
"name": "matthiasmullie/minify",
|
||||
"version": "1.3.59",
|
||||
"version": "1.3.60",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/matthiasmullie/minify.git",
|
||||
"reference": "62dac3bce06de66f0d71fe6490cf1c508d3c3ff7"
|
||||
"reference": "ab7fea80ce5ce6549baaf272bc8bd926a7e08f90"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/matthiasmullie/minify/zipball/62dac3bce06de66f0d71fe6490cf1c508d3c3ff7",
|
||||
"reference": "62dac3bce06de66f0d71fe6490cf1c508d3c3ff7",
|
||||
"url": "https://api.github.com/repos/matthiasmullie/minify/zipball/ab7fea80ce5ce6549baaf272bc8bd926a7e08f90",
|
||||
"reference": "ab7fea80ce5ce6549baaf272bc8bd926a7e08f90",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -712,7 +712,7 @@
|
||||
"minifier",
|
||||
"minify"
|
||||
],
|
||||
"time": "2018-02-02T12:44:18+00:00"
|
||||
"time": "2018-04-18T08:50:35+00:00"
|
||||
},
|
||||
{
|
||||
"name": "matthiasmullie/path-converter",
|
||||
@@ -1299,16 +1299,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/console",
|
||||
"version": "v2.8.38",
|
||||
"version": "v2.8.43",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/console.git",
|
||||
"reference": "7f78892d900c72a40acd1fe793c856ef0c110f26"
|
||||
"reference": "42a0adc7dd656ca2e360285eb6d822df9ce0b160"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/7f78892d900c72a40acd1fe793c856ef0c110f26",
|
||||
"reference": "7f78892d900c72a40acd1fe793c856ef0c110f26",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/42a0adc7dd656ca2e360285eb6d822df9ce0b160",
|
||||
"reference": "42a0adc7dd656ca2e360285eb6d822df9ce0b160",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1322,7 +1322,7 @@
|
||||
"symfony/process": "~2.1|~3.0.0"
|
||||
},
|
||||
"suggest": {
|
||||
"psr/log": "For using the console logger",
|
||||
"psr/log-implementation": "For using the console logger",
|
||||
"symfony/event-dispatcher": "",
|
||||
"symfony/process": ""
|
||||
},
|
||||
@@ -1356,7 +1356,7 @@
|
||||
],
|
||||
"description": "Symfony Console Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2018-04-03T05:20:27+00:00"
|
||||
"time": "2018-07-09T12:58:09+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/debug",
|
||||
@@ -1417,7 +1417,7 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/event-dispatcher",
|
||||
"version": "v2.8.38",
|
||||
"version": "v2.8.43",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/event-dispatcher.git",
|
||||
@@ -1476,17 +1476,72 @@
|
||||
"time": "2018-04-06T07:35:03+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-iconv",
|
||||
"version": "v1.7.0",
|
||||
"name": "symfony/polyfill-ctype",
|
||||
"version": "v1.8.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-iconv.git",
|
||||
"reference": "bd515d8f392730c833bc1ba993a4f598da64fa5b"
|
||||
"url": "https://github.com/symfony/polyfill-ctype.git",
|
||||
"reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/bd515d8f392730c833bc1ba993a4f598da64fa5b",
|
||||
"reference": "bd515d8f392730c833bc1ba993a4f598da64fa5b",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/7cc359f1b7b80fc25ed7796be7d96adc9b354bae",
|
||||
"reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.8-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Ctype\\": ""
|
||||
},
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
},
|
||||
{
|
||||
"name": "Gert de Pagter",
|
||||
"email": "BackEndTea@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "Symfony polyfill for ctype functions",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"compatibility",
|
||||
"ctype",
|
||||
"polyfill",
|
||||
"portable"
|
||||
],
|
||||
"time": "2018-04-30T19:57:29+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-iconv",
|
||||
"version": "v1.8.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-iconv.git",
|
||||
"reference": "7cb8436a814d5b0fcf292810ee26f8b0cb47584d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/7cb8436a814d5b0fcf292810ee26f8b0cb47584d",
|
||||
"reference": "7cb8436a814d5b0fcf292810ee26f8b0cb47584d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1498,7 +1553,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.7-dev"
|
||||
"dev-master": "1.8-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -1532,20 +1587,20 @@
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"time": "2018-01-30T19:27:44+00:00"
|
||||
"time": "2018-04-26T10:06:28+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-mbstring",
|
||||
"version": "v1.7.0",
|
||||
"version": "v1.8.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
||||
"reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b"
|
||||
"reference": "3296adf6a6454a050679cde90f95350ad604b171"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/78be803ce01e55d3491c1397cf1c64beb9c1b63b",
|
||||
"reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/3296adf6a6454a050679cde90f95350ad604b171",
|
||||
"reference": "3296adf6a6454a050679cde90f95350ad604b171",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1557,7 +1612,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.7-dev"
|
||||
"dev-master": "1.8-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -1591,20 +1646,20 @@
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"time": "2018-01-30T19:27:44+00:00"
|
||||
"time": "2018-04-26T10:06:28+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/var-dumper",
|
||||
"version": "v2.8.38",
|
||||
"version": "v2.8.43",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/var-dumper.git",
|
||||
"reference": "942a8142104deb3254f7da292a923b6d4eac8081"
|
||||
"reference": "b77b888c33407f9d4f6e7c6ab4fe7fb5336d41d7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/942a8142104deb3254f7da292a923b6d4eac8081",
|
||||
"reference": "942a8142104deb3254f7da292a923b6d4eac8081",
|
||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/b77b888c33407f9d4f6e7c6ab4fe7fb5336d41d7",
|
||||
"reference": "b77b888c33407f9d4f6e7c6ab4fe7fb5336d41d7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1659,24 +1714,25 @@
|
||||
"debug",
|
||||
"dump"
|
||||
],
|
||||
"time": "2018-04-03T05:20:27+00:00"
|
||||
"time": "2018-07-04T15:34:47+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/yaml",
|
||||
"version": "v2.8.38",
|
||||
"version": "v2.8.43",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/yaml.git",
|
||||
"reference": "be720fcfae4614df204190d57795351059946a77"
|
||||
"reference": "51356b7a2ff7c9fd06b2f1681cc463bb62b5c1ff"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/yaml/zipball/be720fcfae4614df204190d57795351059946a77",
|
||||
"reference": "be720fcfae4614df204190d57795351059946a77",
|
||||
"url": "https://api.github.com/repos/symfony/yaml/zipball/51356b7a2ff7c9fd06b2f1681cc463bb62b5c1ff",
|
||||
"reference": "51356b7a2ff7c9fd06b2f1681cc463bb62b5c1ff",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.9"
|
||||
"php": ">=5.3.9",
|
||||
"symfony/polyfill-ctype": "~1.8"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
@@ -1708,24 +1764,25 @@
|
||||
],
|
||||
"description": "Symfony Yaml Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2018-01-03T07:36:31+00:00"
|
||||
"time": "2018-05-01T22:52:40+00:00"
|
||||
},
|
||||
{
|
||||
"name": "twig/twig",
|
||||
"version": "v1.35.3",
|
||||
"version": "v1.35.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/twigphp/Twig.git",
|
||||
"reference": "b48680b6eb7d16b5025b9bfc4108d86f6b8af86f"
|
||||
"reference": "7e081e98378a1e78c29cc9eba4aefa5d78a05d2a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/twigphp/Twig/zipball/b48680b6eb7d16b5025b9bfc4108d86f6b8af86f",
|
||||
"reference": "b48680b6eb7d16b5025b9bfc4108d86f6b8af86f",
|
||||
"url": "https://api.github.com/repos/twigphp/Twig/zipball/7e081e98378a1e78c29cc9eba4aefa5d78a05d2a",
|
||||
"reference": "7e081e98378a1e78c29cc9eba4aefa5d78a05d2a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
"php": ">=5.3.3",
|
||||
"symfony/polyfill-ctype": "^1.8"
|
||||
},
|
||||
"require-dev": {
|
||||
"psr/container": "^1.0",
|
||||
@@ -1764,16 +1821,16 @@
|
||||
},
|
||||
{
|
||||
"name": "Twig Team",
|
||||
"homepage": "http://twig.sensiolabs.org/contributors",
|
||||
"homepage": "https://twig.symfony.com/contributors",
|
||||
"role": "Contributors"
|
||||
}
|
||||
],
|
||||
"description": "Twig, the flexible, fast, and secure template language for PHP",
|
||||
"homepage": "http://twig.sensiolabs.org",
|
||||
"homepage": "https://twig.symfony.com",
|
||||
"keywords": [
|
||||
"templating"
|
||||
],
|
||||
"time": "2018-03-20T04:25:58+00:00"
|
||||
"time": "2018-07-13T07:12:17+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [
|
||||
@@ -1929,16 +1986,16 @@
|
||||
},
|
||||
{
|
||||
"name": "codeception/phpunit-wrapper",
|
||||
"version": "6.0.9",
|
||||
"version": "6.0.10",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Codeception/phpunit-wrapper.git",
|
||||
"reference": "450f1cfc5f49539c421061e64338f5edb8baad6a"
|
||||
"reference": "7057e599d97b02b4efb009681a43b327dbce138a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Codeception/phpunit-wrapper/zipball/450f1cfc5f49539c421061e64338f5edb8baad6a",
|
||||
"reference": "450f1cfc5f49539c421061e64338f5edb8baad6a",
|
||||
"url": "https://api.github.com/repos/Codeception/phpunit-wrapper/zipball/7057e599d97b02b4efb009681a43b327dbce138a",
|
||||
"reference": "7057e599d97b02b4efb009681a43b327dbce138a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1971,20 +2028,20 @@
|
||||
}
|
||||
],
|
||||
"description": "PHPUnit classes used by Codeception",
|
||||
"time": "2018-03-31T18:50:01+00:00"
|
||||
"time": "2018-06-20T20:08:14+00:00"
|
||||
},
|
||||
{
|
||||
"name": "codeception/stub",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Codeception/Stub.git",
|
||||
"reference": "95fb7a36b81890dd2e5163e7ab31310df6f1bb99"
|
||||
"reference": "681b62348837a5ef07d10d8a226f5bc358cc8805"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Codeception/Stub/zipball/95fb7a36b81890dd2e5163e7ab31310df6f1bb99",
|
||||
"reference": "95fb7a36b81890dd2e5163e7ab31310df6f1bb99",
|
||||
"url": "https://api.github.com/repos/Codeception/Stub/zipball/681b62348837a5ef07d10d8a226f5bc358cc8805",
|
||||
"reference": "681b62348837a5ef07d10d8a226f5bc358cc8805",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2004,7 +2061,7 @@
|
||||
"MIT"
|
||||
],
|
||||
"description": "Flexible Stub wrapper for PHPUnit's Mock Builder",
|
||||
"time": "2018-02-18T13:56:56+00:00"
|
||||
"time": "2018-05-17T09:31:08+00:00"
|
||||
},
|
||||
{
|
||||
"name": "doctrine/instantiator",
|
||||
@@ -2114,16 +2171,16 @@
|
||||
},
|
||||
{
|
||||
"name": "fzaninotto/faker",
|
||||
"version": "v1.7.1",
|
||||
"version": "v1.8.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/fzaninotto/Faker.git",
|
||||
"reference": "d3ed4cc37051c1ca52d22d76b437d14809fc7e0d"
|
||||
"reference": "f72816b43e74063c8b10357394b6bba8cb1c10de"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/fzaninotto/Faker/zipball/d3ed4cc37051c1ca52d22d76b437d14809fc7e0d",
|
||||
"reference": "d3ed4cc37051c1ca52d22d76b437d14809fc7e0d",
|
||||
"url": "https://api.github.com/repos/fzaninotto/Faker/zipball/f72816b43e74063c8b10357394b6bba8cb1c10de",
|
||||
"reference": "f72816b43e74063c8b10357394b6bba8cb1c10de",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2131,7 +2188,7 @@
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-intl": "*",
|
||||
"phpunit/phpunit": "^4.0 || ^5.0",
|
||||
"phpunit/phpunit": "^4.8.35 || ^5.7",
|
||||
"squizlabs/php_codesniffer": "^1.5"
|
||||
},
|
||||
"type": "library",
|
||||
@@ -2160,20 +2217,20 @@
|
||||
"faker",
|
||||
"fixtures"
|
||||
],
|
||||
"time": "2017-08-15T16:48:10+00:00"
|
||||
"time": "2018-07-12T10:23:15+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/guzzle",
|
||||
"version": "6.3.2",
|
||||
"version": "6.3.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/guzzle.git",
|
||||
"reference": "68d0ea14d5a3f42a20e87632a5f84931e2709c90"
|
||||
"reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/68d0ea14d5a3f42a20e87632a5f84931e2709c90",
|
||||
"reference": "68d0ea14d5a3f42a20e87632a5f84931e2709c90",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba",
|
||||
"reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2183,7 +2240,7 @@
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-curl": "*",
|
||||
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4",
|
||||
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0",
|
||||
"psr/log": "^1.0"
|
||||
},
|
||||
"suggest": {
|
||||
@@ -2225,7 +2282,7 @@
|
||||
"rest",
|
||||
"web service"
|
||||
],
|
||||
"time": "2018-03-26T16:33:04+00:00"
|
||||
"time": "2018-04-22T15:46:56+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/promises",
|
||||
@@ -2426,23 +2483,23 @@
|
||||
},
|
||||
{
|
||||
"name": "phpspec/prophecy",
|
||||
"version": "1.7.5",
|
||||
"version": "1.7.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpspec/prophecy.git",
|
||||
"reference": "dfd6be44111a7c41c2e884a336cc4f461b3b2401"
|
||||
"reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/dfd6be44111a7c41c2e884a336cc4f461b3b2401",
|
||||
"reference": "dfd6be44111a7c41c2e884a336cc4f461b3b2401",
|
||||
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/33a7e3c4fda54e912ff6338c48823bd5c0f0b712",
|
||||
"reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"doctrine/instantiator": "^1.0.2",
|
||||
"php": "^5.3|^7.0",
|
||||
"phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0",
|
||||
"sebastian/comparator": "^1.1|^2.0",
|
||||
"sebastian/comparator": "^1.1|^2.0|^3.0",
|
||||
"sebastian/recursion-context": "^1.0|^2.0|^3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
@@ -2485,7 +2542,7 @@
|
||||
"spy",
|
||||
"stub"
|
||||
],
|
||||
"time": "2018-02-19T10:16:54+00:00"
|
||||
"time": "2018-04-18T13:57:24+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-code-coverage",
|
||||
@@ -3237,7 +3294,7 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/browser-kit",
|
||||
"version": "v3.4.8",
|
||||
"version": "v3.4.13",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/browser-kit.git",
|
||||
@@ -3294,16 +3351,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/css-selector",
|
||||
"version": "v3.4.8",
|
||||
"version": "v3.4.13",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/css-selector.git",
|
||||
"reference": "519a80d7c1d95c6cc0b67f686d15fe27c6910de0"
|
||||
"reference": "d2ce52290b648ae33b5301d09bc14ee378612914"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/css-selector/zipball/519a80d7c1d95c6cc0b67f686d15fe27c6910de0",
|
||||
"reference": "519a80d7c1d95c6cc0b67f686d15fe27c6910de0",
|
||||
"url": "https://api.github.com/repos/symfony/css-selector/zipball/d2ce52290b648ae33b5301d09bc14ee378612914",
|
||||
"reference": "d2ce52290b648ae33b5301d09bc14ee378612914",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3343,24 +3400,25 @@
|
||||
],
|
||||
"description": "Symfony CssSelector Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2018-03-19T22:32:39+00:00"
|
||||
"time": "2018-05-16T12:49:49+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/dom-crawler",
|
||||
"version": "v3.4.8",
|
||||
"version": "v3.4.13",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/dom-crawler.git",
|
||||
"reference": "1a4cffeb059226ff6bee9f48acb388faf674afff"
|
||||
"reference": "54c9e817b74c7be1840344bf4feaa7a7d02abfb8"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/1a4cffeb059226ff6bee9f48acb388faf674afff",
|
||||
"reference": "1a4cffeb059226ff6bee9f48acb388faf674afff",
|
||||
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/54c9e817b74c7be1840344bf4feaa7a7d02abfb8",
|
||||
"reference": "54c9e817b74c7be1840344bf4feaa7a7d02abfb8",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.5.9|>=7.0.8",
|
||||
"symfony/polyfill-ctype": "~1.8",
|
||||
"symfony/polyfill-mbstring": "~1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
@@ -3399,20 +3457,20 @@
|
||||
],
|
||||
"description": "Symfony DomCrawler Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2018-03-19T22:32:39+00:00"
|
||||
"time": "2018-07-05T11:53:23+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/finder",
|
||||
"version": "v3.4.8",
|
||||
"version": "v3.4.13",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/finder.git",
|
||||
"reference": "bd14efe8b1fabc4de82bf50dce62f05f9a102433"
|
||||
"reference": "3a8c3de91d2b2c68cd2d665cf9d00f7ef9eaa394"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/finder/zipball/bd14efe8b1fabc4de82bf50dce62f05f9a102433",
|
||||
"reference": "bd14efe8b1fabc4de82bf50dce62f05f9a102433",
|
||||
"url": "https://api.github.com/repos/symfony/finder/zipball/3a8c3de91d2b2c68cd2d665cf9d00f7ef9eaa394",
|
||||
"reference": "3a8c3de91d2b2c68cd2d665cf9d00f7ef9eaa394",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3448,20 +3506,20 @@
|
||||
],
|
||||
"description": "Symfony Finder Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2018-04-04T05:07:11+00:00"
|
||||
"time": "2018-06-19T20:52:10+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/process",
|
||||
"version": "v3.4.8",
|
||||
"version": "v3.4.13",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/process.git",
|
||||
"reference": "4b7d64e852886319e93ddfdecff0d744ab87658b"
|
||||
"reference": "f741672edfcfe3a2ea77569d419006f23281d909"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/process/zipball/4b7d64e852886319e93ddfdecff0d744ab87658b",
|
||||
"reference": "4b7d64e852886319e93ddfdecff0d744ab87658b",
|
||||
"url": "https://api.github.com/repos/symfony/process/zipball/f741672edfcfe3a2ea77569d419006f23281d909",
|
||||
"reference": "f741672edfcfe3a2ea77569d419006f23281d909",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3497,7 +3555,7 @@
|
||||
],
|
||||
"description": "Symfony Process Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2018-04-03T05:22:50+00:00"
|
||||
"time": "2018-07-09T09:01:07+00:00"
|
||||
},
|
||||
{
|
||||
"name": "victorjonsson/markdowndocs",
|
||||
|
||||
@@ -9,3 +9,4 @@ Disallow: /vendor/
|
||||
Disallow: /user/
|
||||
Allow: /user/pages/
|
||||
Allow: /user/themes/
|
||||
Allow: /user/images/
|
||||
|
||||
@@ -835,6 +835,8 @@ form:
|
||||
-1: PLUGIN_ADMIN.ERROR_SYSTEM
|
||||
0: PLUGIN_ADMIN.ERROR_SIMPLE
|
||||
1: PLUGIN_ADMIN.ERROR_FULL_BACKTRACE
|
||||
validate:
|
||||
type: int
|
||||
|
||||
|
||||
errors.log:
|
||||
|
||||
@@ -3,7 +3,7 @@ default_lang: en # Default language for site (potenti
|
||||
|
||||
author:
|
||||
name: John Appleseed # Default author name
|
||||
email: 'john@email.com' # Default author email
|
||||
email: 'john@example.com' # Default author email
|
||||
|
||||
taxonomies: [category,tag] # Arbitrary list of taxonomy types
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
// Some standard defines
|
||||
define('GRAV', true);
|
||||
define('GRAV_VERSION', '1.4.5');
|
||||
define('GRAV_VERSION', '1.4.8');
|
||||
define('GRAV_TESTING', false);
|
||||
define('DS', '/');
|
||||
|
||||
|
||||
@@ -207,7 +207,7 @@ class ConfigFileFinder
|
||||
continue;
|
||||
}
|
||||
|
||||
$name = $directory->getBasename();
|
||||
$name = $directory->getFilename();
|
||||
$find = ($lookup ?: $name) . '.yaml';
|
||||
$filename = "{$path}/{$name}/{$find}";
|
||||
|
||||
|
||||
@@ -60,6 +60,7 @@ class Debugger
|
||||
if ($this->enabled()) {
|
||||
$this->debugbar->addCollector(new ConfigCollector((array)$this->config->get('system'), 'Config'));
|
||||
$this->debugbar->addCollector(new ConfigCollector((array)$this->config->get('plugins'), 'Plugins'));
|
||||
$this->addMessage('Grav v' . GRAV_VERSION);
|
||||
}
|
||||
|
||||
return $this;
|
||||
|
||||
@@ -296,17 +296,17 @@ class Installer
|
||||
{
|
||||
foreach (new \DirectoryIterator($source_path) as $file) {
|
||||
|
||||
if ($file->isLink() || $file->isDot() || in_array($file->getBasename(),$ignores)) {
|
||||
if ($file->isLink() || $file->isDot() || in_array($file->getFilename(), $ignores)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$path = $install_path . DS . $file->getBasename();
|
||||
$path = $install_path . DS . $file->getFilename();
|
||||
|
||||
if ($file->isDir()) {
|
||||
Folder::delete($path);
|
||||
Folder::move($file->getPathname(), $path);
|
||||
|
||||
if ($file->getBasename() == 'bin') {
|
||||
if ($file->getFilename() === 'bin') {
|
||||
foreach (glob($path . DS . '*') as $bin_file) {
|
||||
@chmod($bin_file, 0755);
|
||||
}
|
||||
|
||||
@@ -172,10 +172,9 @@ class Excerpts
|
||||
if ($type !== 'image' && !empty($url_parts['stream']) && !empty($url_parts['path'])) {
|
||||
$url_parts['path'] = Grav::instance()['base_url_relative'] . '/' . static::resolveStream("{$url_parts['scheme']}://{$url_parts['path']}");
|
||||
unset($url_parts['stream'], $url_parts['scheme']);
|
||||
|
||||
$excerpt['element']['attributes']['href'] = Uri::buildUrl($url_parts);
|
||||
}
|
||||
|
||||
$excerpt['element']['attributes']['href'] = Uri::buildUrl($url_parts);
|
||||
return $excerpt;
|
||||
}
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ class Truncator {
|
||||
if ($letters->key() >= $limit) {
|
||||
|
||||
$currentText = $letters->currentTextPosition();
|
||||
$currentText[0]->nodeValue = substr($currentText[0]->nodeValue, 0, $currentText[1] + 1);
|
||||
$currentText[0]->nodeValue = mb_substr($currentText[0]->nodeValue, 0, $currentText[1] + 1);
|
||||
self::removeProceedingNodes($currentText[0], $body);
|
||||
|
||||
if (!empty($ellipsis)) {
|
||||
|
||||
@@ -86,7 +86,7 @@ class Media extends AbstractMedia
|
||||
/** @var \DirectoryIterator $info */
|
||||
foreach ($iterator as $path => $info) {
|
||||
// Ignore folders and Markdown files.
|
||||
if (!$info->isFile() || $info->getExtension() === 'md' || $info->getBasename()[0] === '.') {
|
||||
if (!$info->isFile() || $info->getExtension() === 'md' || $info->getFilename()[0] === '.') {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,6 +44,21 @@ abstract class AbstractMedia extends Getters
|
||||
return $this->offsetGet($filename);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $offset
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
$object = parent::offsetGet($offset);
|
||||
|
||||
// It would be nice if previous image modification would not affect the later ones.
|
||||
//$object = $object ? clone($object) : null;
|
||||
|
||||
return $object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a list of all media.
|
||||
*
|
||||
@@ -168,8 +183,8 @@ abstract class AbstractMedia extends Getters
|
||||
$type = 'base';
|
||||
|
||||
while (($part = array_shift($fileParts)) !== null) {
|
||||
if ($part != 'meta' && $part != 'thumb') {
|
||||
if (isset($extension)) {
|
||||
if ($part !== 'meta' && $part !== 'thumb') {
|
||||
if (null !== $extension) {
|
||||
$name .= '.' . $extension;
|
||||
}
|
||||
$extension = $part;
|
||||
|
||||
@@ -11,10 +11,16 @@ namespace Grav\Common\Page\Medium;
|
||||
use Grav\Common\Grav;
|
||||
use Gregwar\Image\Exceptions\GenerationError;
|
||||
use Gregwar\Image\Image;
|
||||
use Gregwar\Image\Source;
|
||||
use RocketTheme\Toolbox\Event\Event;
|
||||
|
||||
class ImageFile extends Image
|
||||
{
|
||||
public function __destruct()
|
||||
{
|
||||
$this->getAdapter()->deinit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear previously applied operations
|
||||
*/
|
||||
@@ -30,15 +36,15 @@ class ImageFile extends Image
|
||||
* @param int $quality the quality (for JPEG)
|
||||
* @param bool $actual
|
||||
*
|
||||
* @return mixed|string
|
||||
* @return string
|
||||
*/
|
||||
public function cacheFile($type = 'jpg', $quality = 80, $actual = false)
|
||||
{
|
||||
if ($type == 'guess') {
|
||||
if ($type === 'guess') {
|
||||
$type = $this->guessType();
|
||||
}
|
||||
|
||||
if (!count($this->operations) && $type == $this->guessType() && !$this->forceCache) {
|
||||
if (!$this->forceCache && !count($this->operations) && $type === $this->guessType()) {
|
||||
return $this->getFilename($this->getFilePath());
|
||||
}
|
||||
|
||||
@@ -60,8 +66,7 @@ class ImageFile extends Image
|
||||
$cacheFile .= $this->prettyName;
|
||||
}
|
||||
|
||||
|
||||
$cacheFile .= '.'.$type;
|
||||
$cacheFile .= '.' . $type;
|
||||
|
||||
// If the files does not exists, save it
|
||||
$image = $this;
|
||||
@@ -76,7 +81,7 @@ class ImageFile extends Image
|
||||
$generate = function ($target) use ($image, $type, $quality) {
|
||||
$result = $image->save($target, $type, $quality);
|
||||
|
||||
if ($result != $target) {
|
||||
if ($result !== $target) {
|
||||
throw new GenerationError($result);
|
||||
}
|
||||
|
||||
@@ -87,15 +92,19 @@ class ImageFile extends Image
|
||||
try {
|
||||
$perms = Grav::instance()['config']->get('system.images.cache_perms', '0755');
|
||||
$perms = octdec($perms);
|
||||
$file = $this->cache->setDirectoryMode($perms)->getOrCreateFile($cacheFile, $conditions, $generate, $actual);
|
||||
$file = $this->getCacheSystem()->setDirectoryMode($perms)->getOrCreateFile($cacheFile, $conditions, $generate, $actual);
|
||||
} catch (GenerationError $e) {
|
||||
$file = $e->getNewFile();
|
||||
}
|
||||
|
||||
// Nulling the resource
|
||||
$this->getAdapter()->setSource(new Source\File($file));
|
||||
$this->getAdapter()->deinit();
|
||||
|
||||
if ($actual) {
|
||||
return $file;
|
||||
} else {
|
||||
return $this->getFilename($file);
|
||||
}
|
||||
|
||||
return $this->getFilename($file);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,6 +103,18 @@ class ImageMedium extends Medium
|
||||
}
|
||||
}
|
||||
|
||||
public function __destruct()
|
||||
{
|
||||
unset($this->image);
|
||||
}
|
||||
|
||||
public function __clone()
|
||||
{
|
||||
$this->image = $this->image ? clone $this->image : null;
|
||||
|
||||
parent::__clone();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add meta file for the medium.
|
||||
*
|
||||
@@ -156,10 +168,10 @@ class ImageMedium extends Medium
|
||||
$image_dir = Grav::instance()['locator']->findResource('cache://images', false);
|
||||
$saved_image_path = $this->saveImage();
|
||||
|
||||
$output = preg_replace('|^' . preg_quote(GRAV_ROOT) . '|', '', $saved_image_path);
|
||||
$output = preg_replace('|^' . preg_quote(GRAV_ROOT, '|') . '|', '', $saved_image_path);
|
||||
|
||||
if (Utils::startsWith($output, $image_path)) {
|
||||
$output = '/' . $image_dir . preg_replace('|^' . preg_quote($image_path) . '|', '', $output);
|
||||
$output = '/' . $image_dir . preg_replace('|^' . preg_quote($image_path, '|') . '|', '', $output);
|
||||
}
|
||||
|
||||
if ($reset) {
|
||||
@@ -226,13 +238,13 @@ class ImageMedium extends Medium
|
||||
{
|
||||
if ($this->get('prettyname')) {
|
||||
return $this->get('prettyname');
|
||||
} else {
|
||||
$basename = $this->get('basename');
|
||||
if (preg_match('/[a-z0-9]{40}-(.*)/', $basename, $matches)) {
|
||||
$basename = $matches[1];
|
||||
}
|
||||
return $basename;
|
||||
}
|
||||
|
||||
$basename = $this->get('basename');
|
||||
if (preg_match('/[a-z0-9]{40}-(.*)/', $basename, $matches)) {
|
||||
$basename = $matches[1];
|
||||
}
|
||||
return $basename;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -280,7 +292,7 @@ class ImageMedium extends Medium
|
||||
// It's possible that MediumFactory::fromFile returns null if the
|
||||
// original image file no longer exists and this class instance was
|
||||
// retrieved from the page cache
|
||||
if (isset($derivative)) {
|
||||
if (null !== $derivative) {
|
||||
$index = 2;
|
||||
$alt_widths = array_keys($this->alternatives);
|
||||
sort($alt_widths);
|
||||
@@ -339,7 +351,6 @@ class ImageMedium extends Medium
|
||||
|
||||
if ($this->image) {
|
||||
$this->image();
|
||||
$this->image->clearOperations(); // Clear previously applied operations
|
||||
$this->querystring('');
|
||||
$this->filter();
|
||||
$this->clearAlternatives();
|
||||
@@ -432,7 +443,7 @@ class ImageMedium extends Medium
|
||||
* Set or get sizes parameter for srcset media action
|
||||
*
|
||||
* @param string $sizes
|
||||
* @return $this
|
||||
* @return string
|
||||
*/
|
||||
public function sizes($sizes = null)
|
||||
{
|
||||
@@ -459,7 +470,7 @@ class ImageMedium extends Medium
|
||||
*/
|
||||
public function width($value = 'auto')
|
||||
{
|
||||
if (!$value || $value == 'auto')
|
||||
if (!$value || $value === 'auto')
|
||||
$this->attributes['width'] = $this->get('width');
|
||||
else
|
||||
$this->attributes['width'] = $value;
|
||||
@@ -480,7 +491,7 @@ class ImageMedium extends Medium
|
||||
*/
|
||||
public function height($value = 'auto')
|
||||
{
|
||||
if (!$value || $value == 'auto')
|
||||
if (!$value || $value === 'auto')
|
||||
$this->attributes['height'] = $this->get('height');
|
||||
else
|
||||
$this->attributes['height'] = $value;
|
||||
@@ -496,11 +507,11 @@ class ImageMedium extends Medium
|
||||
*/
|
||||
public function __call($method, $args)
|
||||
{
|
||||
if ($method == 'cropZoom') {
|
||||
if ($method === 'cropZoom') {
|
||||
$method = 'zoomCrop';
|
||||
}
|
||||
|
||||
if (!in_array($method, self::$magic_actions)) {
|
||||
if (!\in_array($method, self::$magic_actions, true)) {
|
||||
return parent::__call($method, $args);
|
||||
}
|
||||
|
||||
@@ -551,6 +562,9 @@ class ImageMedium extends Medium
|
||||
// Use existing cache folder or if it doesn't exist, create it.
|
||||
$cacheDir = $locator->findResource('cache://images', true) ?: $locator->findResource('cache://images', true, true);
|
||||
|
||||
// Make sure we free previous image.
|
||||
unset($this->image);
|
||||
|
||||
$this->image = ImageFile::open($file)
|
||||
->setCacheDir($cacheDir)
|
||||
->setActualCacheDir($cacheDir)
|
||||
@@ -562,7 +576,7 @@ class ImageMedium extends Medium
|
||||
/**
|
||||
* Save the image with cache.
|
||||
*
|
||||
* @return mixed|string
|
||||
* @return string
|
||||
*/
|
||||
protected function saveImage()
|
||||
{
|
||||
@@ -576,7 +590,7 @@ class ImageMedium extends Medium
|
||||
return $this->result;
|
||||
}
|
||||
|
||||
if ($this->get('debug') && !$this->debug_watermarked) {
|
||||
if (!$this->debug_watermarked && $this->get('debug')) {
|
||||
$ratio = $this->get('ratio');
|
||||
if (!$ratio) {
|
||||
$ratio = 1;
|
||||
@@ -623,9 +637,9 @@ class ImageMedium extends Medium
|
||||
}
|
||||
|
||||
return $max;
|
||||
} else {
|
||||
return $this;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -73,6 +73,11 @@ class Medium extends Data implements RenderableInterface
|
||||
$this->reset();
|
||||
}
|
||||
|
||||
public function __clone()
|
||||
{
|
||||
// Allows future compatibility as parent::__clone() works.
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a copy of this media object
|
||||
*
|
||||
@@ -80,7 +85,7 @@ class Medium extends Data implements RenderableInterface
|
||||
*/
|
||||
public function copy()
|
||||
{
|
||||
return clone($this);
|
||||
return clone $this;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -813,6 +813,8 @@ class Page
|
||||
*/
|
||||
public function setRawContent($content)
|
||||
{
|
||||
$content = $content === null ? '': $content;
|
||||
|
||||
$this->content = $content;
|
||||
}
|
||||
|
||||
@@ -1790,7 +1792,7 @@ class Page
|
||||
public function routeCanonical($var = null)
|
||||
{
|
||||
if ($var !== null) {
|
||||
$this->routes['canonical'] = (array)$var;
|
||||
$this->routes['canonical'] = $var;
|
||||
}
|
||||
|
||||
if (!empty($this->routes) && isset($this->routes['canonical'])) {
|
||||
@@ -2955,4 +2957,26 @@ class Page
|
||||
return $route;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the Page Unmodified (original) version of the page.
|
||||
*
|
||||
* @return Page
|
||||
* The original version of the page.
|
||||
*/
|
||||
public function getOriginal()
|
||||
{
|
||||
return $this->_original;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the action.
|
||||
*
|
||||
* @return string
|
||||
* The Action string.
|
||||
*/
|
||||
public function getAction()
|
||||
{
|
||||
return $this->_action;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1007,32 +1007,63 @@ class Pages
|
||||
throw new \RuntimeException('Fatal error when creating page instances.');
|
||||
}
|
||||
|
||||
$content_exists = false;
|
||||
$pages_found = new \GlobIterator($directory . '/*' . CONTENT_EXT);
|
||||
// Build regular expression for all the allowed page extensions.
|
||||
$page_extensions = $language->getFallbackPageExtensions();
|
||||
$regex = '/^[^\.]*(' . implode('|', array_map(
|
||||
function ($str) {
|
||||
return preg_quote($str, '/');
|
||||
},
|
||||
$page_extensions
|
||||
)) . ')$/';
|
||||
|
||||
$folders = [];
|
||||
$page_found = null;
|
||||
|
||||
$page_extension = '';
|
||||
$last_modified = 0;
|
||||
|
||||
if ($pages_found && count($pages_found) > 0) {
|
||||
$iterator = new \FilesystemIterator($directory);
|
||||
/** @var \FilesystemIterator $file */
|
||||
foreach ($iterator as $file) {
|
||||
$filename = $file->getFilename();
|
||||
|
||||
$page_extensions = $language->getFallbackPageExtensions();
|
||||
// Ignore all hidden files if set.
|
||||
if ($this->ignore_hidden && $filename && $filename[0] === '.') {
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach ($page_extensions as $extension) {
|
||||
foreach ($pages_found as $found) {
|
||||
if ($found->isDir()) {
|
||||
continue;
|
||||
}
|
||||
$regex = '/^[^\.]*' . preg_quote($extension, '/') . '$/';
|
||||
if (preg_match($regex, $found->getFilename())) {
|
||||
$page_found = $found;
|
||||
$page_extension = $extension;
|
||||
break 2;
|
||||
}
|
||||
// Handle folders later.
|
||||
if ($file->isDir()) {
|
||||
// But ignore all folders in ignore list.
|
||||
if (!\in_array($filename, $this->ignore_folders, true)) {
|
||||
$folders[] = $file;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
// Ignore all files in ignore list.
|
||||
if (\in_array($filename, $this->ignore_files, true)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Update last modified date to match the last updated file in the folder.
|
||||
$modified = $file->getMTime();
|
||||
if ($modified > $last_modified) {
|
||||
$last_modified = $modified;
|
||||
}
|
||||
|
||||
// Page is the one that matches to $page_extensions list with the lowest index number.
|
||||
if (preg_match($regex, $filename, $matches, PREG_OFFSET_CAPTURE)) {
|
||||
$ext = $matches[1][0];
|
||||
|
||||
if ($page_found === null || array_search($ext, $page_extensions, true) < array_search($page_extension, $page_extensions, true)) {
|
||||
$page_found = $file;
|
||||
$page_extension = $ext;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($parent && !empty($page_found)) {
|
||||
$content_exists = false;
|
||||
if ($parent && $page_found) {
|
||||
$page->init($page_found, $page_extension);
|
||||
|
||||
$content_exists = true;
|
||||
@@ -1042,48 +1073,31 @@ class Pages
|
||||
}
|
||||
}
|
||||
|
||||
// set current modified of page
|
||||
$last_modified = $page->modified();
|
||||
// Now handle all the folders under the page.
|
||||
/** @var \FilesystemIterator $file */
|
||||
foreach ($folders as $file) {
|
||||
$filename = $file->getFilename();
|
||||
|
||||
$iterator = new \FilesystemIterator($directory);
|
||||
|
||||
/** @var \DirectoryIterator $file */
|
||||
foreach ($iterator as $file) {
|
||||
$name = $file->getFilename();
|
||||
|
||||
// Ignore all hidden files if set.
|
||||
if ($this->ignore_hidden && $name && $name[0] === '.') {
|
||||
// if folder contains separator, continue
|
||||
if (Utils::contains($file->getFilename(), $config->get('system.param_sep', ':'))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($file->isFile()) {
|
||||
// Update the last modified if it's newer than already found
|
||||
if (!in_array($file->getBasename(), $this->ignore_files) && ($modified = $file->getMTime()) > $last_modified) {
|
||||
$last_modified = $modified;
|
||||
}
|
||||
} elseif ($file->isDir() && !in_array($file->getFilename(), $this->ignore_folders)) {
|
||||
if (!$page->path()) {
|
||||
$page->path($file->getPath());
|
||||
}
|
||||
|
||||
// if folder contains separator, continue
|
||||
if (Utils::contains($file->getFilename(), $config->get('system.param_sep', ':'))) {
|
||||
continue;
|
||||
}
|
||||
$path = $directory . DS . $filename;
|
||||
$child = $this->recurse($path, $page);
|
||||
|
||||
if (!$page->path()) {
|
||||
$page->path($file->getPath());
|
||||
}
|
||||
if (Utils::startsWith($filename, '_')) {
|
||||
$child->routable(false);
|
||||
}
|
||||
|
||||
$path = $directory . DS . $name;
|
||||
$child = $this->recurse($path, $page);
|
||||
$this->children[$page->path()][$child->path()] = ['slug' => $child->slug()];
|
||||
|
||||
if (Utils::startsWith($name, '_')) {
|
||||
$child->routable(false);
|
||||
}
|
||||
|
||||
$this->children[$page->path()][$child->path()] = ['slug' => $child->slug()];
|
||||
|
||||
if ($config->get('system.pages.events.page')) {
|
||||
$this->grav->fireEvent('onFolderProcessed', new Event(['page' => $page]));
|
||||
}
|
||||
if ($config->get('system.pages.events.page')) {
|
||||
$this->grav->fireEvent('onFolderProcessed', new Event(['page' => $page]));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ class Plugins extends Iterator
|
||||
if (!$directory->isDir()) {
|
||||
continue;
|
||||
}
|
||||
$plugins[] = $directory->getBasename();
|
||||
$plugins[] = $directory->getFilename();
|
||||
}
|
||||
|
||||
natsort($plugins);
|
||||
|
||||
@@ -98,7 +98,7 @@ class Themes extends Iterator
|
||||
continue;
|
||||
}
|
||||
|
||||
$theme = $directory->getBasename();
|
||||
$theme = $directory->getFilename();
|
||||
$result = self::get($theme);
|
||||
|
||||
if ($result) {
|
||||
|
||||
@@ -238,7 +238,9 @@ class Twig
|
||||
// Process Modular Twig
|
||||
if ($item->modularTwig()) {
|
||||
$twig_vars['content'] = $content;
|
||||
$template = $item->template() . TEMPLATE_EXT;
|
||||
$extension = $item->templateFormat();
|
||||
$extension = $extension ? ".{$extension}.twig" : TEMPLATE_EXT;
|
||||
$template = $item->template() . $extension;
|
||||
$output = $content = $local_twig->render($template, $twig_vars);
|
||||
}
|
||||
|
||||
|
||||
@@ -150,11 +150,10 @@ class Uri
|
||||
|
||||
$uri = str_replace(static::filterPath($this->root), '', $this->url);
|
||||
|
||||
|
||||
// remove the setup.php based base if set:
|
||||
$setup_base = $grav['pages']->base();
|
||||
if ($setup_base) {
|
||||
$uri = str_replace($setup_base, '', $uri);
|
||||
$uri = preg_replace('|^' . preg_quote($setup_base, '|') . '|', '', $uri);
|
||||
}
|
||||
|
||||
// If configured to, redirect trailing slash URI's with a 302 redirect
|
||||
@@ -687,18 +686,19 @@ class Uri
|
||||
*/
|
||||
public static function buildUrl($parsed_url)
|
||||
{
|
||||
$scheme = isset($parsed_url['scheme']) ? $parsed_url['scheme'] . '://' : (isset($parsed_url['host']) ? '//' : '');
|
||||
$host = isset($parsed_url['host']) ? $parsed_url['host'] : '';
|
||||
$port = isset($parsed_url['port']) ? ':' . $parsed_url['port'] : '';
|
||||
$user = isset($parsed_url['user']) ? $parsed_url['user'] : '';
|
||||
$pass = isset($parsed_url['pass']) ? ':' . $parsed_url['pass'] : '';
|
||||
$pass = ($user || $pass) ? "{$pass}@" : '';
|
||||
$path = isset($parsed_url['path']) ? $parsed_url['path'] : '';
|
||||
$path = !empty($parsed_url['params']) ? rtrim($path, '/') . static::buildParams($parsed_url['params']) : $path;
|
||||
$query = !empty($parsed_url['query']) ? '?' . $parsed_url['query'] : '';
|
||||
$fragment = isset($parsed_url['fragment']) ? '#' . $parsed_url['fragment'] : '';
|
||||
$scheme = isset($parsed_url['scheme']) ? $parsed_url['scheme'] . ':' : '';
|
||||
$authority = isset($parsed_url['host']) ? '//' : '';
|
||||
$host = isset($parsed_url['host']) ? $parsed_url['host'] : '';
|
||||
$port = isset($parsed_url['port']) ? ':' . $parsed_url['port'] : '';
|
||||
$user = isset($parsed_url['user']) ? $parsed_url['user'] : '';
|
||||
$pass = isset($parsed_url['pass']) ? ':' . $parsed_url['pass'] : '';
|
||||
$pass = ($user || $pass) ? "{$pass}@" : '';
|
||||
$path = isset($parsed_url['path']) ? $parsed_url['path'] : '';
|
||||
$path = !empty($parsed_url['params']) ? rtrim($path, '/') . static::buildParams($parsed_url['params']) : $path;
|
||||
$query = !empty($parsed_url['query']) ? '?' . $parsed_url['query'] : '';
|
||||
$fragment = isset($parsed_url['fragment']) ? '#' . $parsed_url['fragment'] : '';
|
||||
|
||||
return "{$scheme}{$user}{$pass}{$host}{$port}{$path}{$query}{$fragment}";
|
||||
return "{$scheme}{$authority}{$user}{$pass}{$host}{$port}{$path}{$query}{$fragment}";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1119,8 +1119,12 @@ class Uri
|
||||
protected function createFromEnvironment(array $env)
|
||||
{
|
||||
// Build scheme.
|
||||
if (isset($env['REQUEST_SCHEME'])) {
|
||||
$this->scheme = $env['REQUEST_SCHEME'];
|
||||
if (isset($env['HTTP_X_FORWARDED_PROTO'])) {
|
||||
$this->scheme = $env['HTTP_X_FORWARDED_PROTO'];
|
||||
} elseif (isset($env['X-FORWARDED-PROTO'])) {
|
||||
$this->scheme = $env['X-FORWARDED-PROTO'];
|
||||
} elseif (isset($env['REQUEST_SCHEME'])) {
|
||||
$this->scheme = $env['REQUEST_SCHEME'];
|
||||
} else {
|
||||
$https = isset($env['HTTPS']) ? $env['HTTPS'] : '';
|
||||
$this->scheme = (empty($https) || strtolower($https) === 'off') ? 'http' : 'https';
|
||||
@@ -1143,7 +1147,16 @@ class Uri
|
||||
$this->host = $this->validateHostname($hostname) ? $hostname : 'unknown';
|
||||
|
||||
// Build port.
|
||||
$this->port = isset($env['SERVER_PORT']) ? (int)$env['SERVER_PORT'] : null;
|
||||
if (isset($env['HTTP_X_FORWARDED_PORT'])) {
|
||||
$this->port = (int)$env['HTTP_X_FORWARDED_PORT'];
|
||||
} elseif (isset($env['X-FORWARDED-PORT'])) {
|
||||
$this->port = (int)$env['X-FORWARDED-PORT'];
|
||||
} elseif (isset($env['SERVER_PORT'])) {
|
||||
$this->port = (int)$env['SERVER_PORT'];
|
||||
} else {
|
||||
$this->port = null;
|
||||
}
|
||||
|
||||
if ($this->hasStandardPort()) {
|
||||
$this->port = null;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
title: Grav
|
||||
author:
|
||||
name: Joe Bloggs
|
||||
email: 'joe@test.com'
|
||||
email: 'joe@example.com'
|
||||
metadata:
|
||||
description: 'Grav is an easy to use, yet powerful, open source flat-file CMS'
|
||||
|
||||
|
||||
118
webserver-configs/nginx-ddev-site.conf
Normal file
118
webserver-configs/nginx-ddev-site.conf
Normal file
@@ -0,0 +1,118 @@
|
||||
# ddev GravCMS config
|
||||
|
||||
# You can override ddev's configuration by placing an edited copy
|
||||
# of this config (or one of the other ones) in .ddev/nginx-site.conf
|
||||
# See https://ddev.readthedocs.io/en/latest/users/extend/customization-extendibility/#providing-custom-nginx-configuration
|
||||
|
||||
# Set https to 'on' if x-forwarded-proto is https
|
||||
map $http_x_forwarded_proto $fcgi_https {
|
||||
default off;
|
||||
https on;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80; ## listen for ipv4; this line is default and implied
|
||||
listen [::]:80 default ipv6only=on; ## listen for ipv6
|
||||
# The NGINX_DOCROOT variable is substituted with
|
||||
# its value when the container is started.
|
||||
root $NGINX_DOCROOT;
|
||||
index index.php index.htm index.html;
|
||||
|
||||
# Make site accessible from http://localhost/
|
||||
server_name _;
|
||||
|
||||
# Disable sendfile as per https://docs.vagrantup.com/v2/synced-folders/virtualbox.html
|
||||
sendfile off;
|
||||
error_log /var/log/nginx/error.log info;
|
||||
access_log /var/log/nginx/access.log;
|
||||
|
||||
location / {
|
||||
absolute_redirect off;
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
# pass the PHP scripts to FastCGI server listening on socket
|
||||
location ~ \.php$ {
|
||||
try_files $uri =404;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass unix:/run/php-fpm.sock;
|
||||
fastcgi_buffers 16 16k;
|
||||
fastcgi_buffer_size 32k;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_intercept_errors on;
|
||||
# fastcgi_read_timeout should match max_execution_time in php.ini
|
||||
fastcgi_read_timeout 10m;
|
||||
fastcgi_param SERVER_NAME $host;
|
||||
fastcgi_param HTTPS $fcgi_https;
|
||||
}
|
||||
|
||||
# Expire rules for static content
|
||||
# Feed
|
||||
location ~* \.(?:rss|atom|cache)$ {
|
||||
expires 1h;
|
||||
}
|
||||
|
||||
# Media: images, icons, video, audio, HTC
|
||||
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ {
|
||||
expires 1M;
|
||||
access_log off;
|
||||
add_header Cache-Control "public";
|
||||
}
|
||||
|
||||
# Prevent clients from accessing hidden files (starting with a dot)
|
||||
# This is particularly important if you store .htpasswd files in the site hierarchy
|
||||
# Access to `/.well-known/` is allowed.
|
||||
# https://www.mnot.net/blog/2010/04/07/well-known
|
||||
# https://tools.ietf.org/html/rfc5785
|
||||
location ~* /\.(?!well-known\/) {
|
||||
deny all;
|
||||
}
|
||||
|
||||
# Prevent clients from accessing to backup/config/source files
|
||||
location ~* (?:\.(?:bak|conf|dist|fla|in[ci]|log|psd|sh|sql|sw[op])|~)$ {
|
||||
deny all;
|
||||
}
|
||||
|
||||
## Begin - Security
|
||||
# deny all direct access for these folders
|
||||
location ~* /(\.git|cache|bin|logs|backup|tests)/.*$ { return 403; }
|
||||
# deny running scripts inside core system folders
|
||||
location ~* /(system|vendor)/.*\.(txt|xml|md|html|yaml|yml|php|pl|py|cgi|twig|sh|bat)$ { return 403; }
|
||||
# deny running scripts inside user folder
|
||||
location ~* /user/.*\.(txt|md|yaml|yml|php|pl|py|cgi|twig|sh|bat)$ { return 403; }
|
||||
# deny access to specific files in the root folder
|
||||
location ~ /(LICENSE\.txt|composer\.lock|composer\.json|nginx\.conf|web\.config|htaccess\.txt|\.htaccess) { return 403; }
|
||||
## End - Security
|
||||
|
||||
|
||||
## provide a health check endpoint
|
||||
location /healthcheck {
|
||||
access_log off;
|
||||
stub_status on;
|
||||
keepalive_timeout 0; # Disable HTTP keepalive
|
||||
return 200;
|
||||
}
|
||||
|
||||
error_page 400 401 /40x.html;
|
||||
location = /40x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
|
||||
location ~ ^/(fpmstatus|ping)$ {
|
||||
access_log off;
|
||||
stub_status on;
|
||||
keepalive_timeout 0; # Disable HTTP keepalive
|
||||
allow 127.0.0.1;
|
||||
allow all;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
fastcgi_pass unix:/run/php-fpm.sock;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -30,7 +30,8 @@ server {
|
||||
## Begin - PHP
|
||||
location ~ \.php$ {
|
||||
# Choose either a socket or TCP/IP address
|
||||
fastcgi_pass unix:/var/run/php5-fpm.sock;
|
||||
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
|
||||
# fastcgi_pass unix:/var/run/php5-fpm.sock; #legacy
|
||||
# fastcgi_pass 127.0.0.1:9000;
|
||||
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
|
||||
Reference in New Issue
Block a user