Compare commits

...

17 Commits

Author SHA1 Message Date
Andy Miller
88a3e874aa Merge branch 'release/1.5.9' 2019-03-20 14:01:21 -06:00
Andy Miller
af72951671 prepare for release 2019-03-20 14:01:10 -06:00
Andy Miller
5f2dfc8221 Use toolbox 1.4.2 in develop branch for now 2019-03-20 13:58:00 -06:00
Andy Miller
c706756d19 changelog updated 2019-03-20 13:52:27 -06:00
Andy Miller
a4801ead6a Fix for streams with EXIF 2019-03-20 13:52:04 -06:00
Andy Miller
ab23d071a4 Merge branch 'release/1.5.9' 2019-03-20 12:04:51 -06:00
Andy Miller
3e6c4e9c5e Merge tag '1.5.9' into develop
Release 1.5.9
2019-03-20 12:04:51 -06:00
Andy Miller
28db98c95d Prepare for release 2019-03-20 12:04:26 -06:00
Andy Miller
95583dbbcd updated vendor libs 2019-03-20 11:50:00 -06:00
Andy Miller
9d8fc4a065 New onPageContent() event 2019-03-20 11:16:18 -06:00
Matias Griese
b4a4b60871 Fixed phpdoc generation 2019-03-13 16:00:00 +02:00
Kirsten Roschanski
c80a3f5568 Update User.php (#2403) 2019-03-12 14:15:03 -06:00
Robbert
409b4028d0 fix dead link + add http > https changes to site urls (#2369) 2019-02-12 12:14:28 -07:00
Andy Miller
88121aaab4 Merge tag '1.5.8' into develop
Release v1.5.8
2019-02-07 16:04:56 -07:00
Andy Miller
8f588aca99 Merge branch 'release/1.5.8' 2019-02-07 16:04:55 -07:00
Andy Miller
5b34a9bfc4 prepare for release 2019-02-07 16:04:31 -07:00
Andy Miller
ef55d2615f update changelog 2019-02-07 16:03:49 -07:00
10 changed files with 125 additions and 104 deletions

View File

@@ -1,9 +1,22 @@
# v1.5.9
## 03/20/2019
1. [](#new)
* Added new `onPageContent()` event for every call to `Page::content()`
1. [](#improved)
* Fixed phpdoc generation
* Updated vendor libraries
* Force Toolbox v1.4.2
1. [](#bugfix)
* EXIF fix for streams
* Fix for User avatar not working due to uppercase or spaces in email [#2403](https://github.com/getgrav/grav/pull/2403)
# v1.5.8
## mm/dd/2019
## 02/07/2019
1. [](#improved)
* Improved `User` unserialize to not to break the object if serialized data is not what expected
* Removed unused parameter [#2357](https://github.com/getgrav/grav/pull/2357)
# v1.5.7
## 01/25/2019

View File

@@ -6,14 +6,14 @@ Grav is a **Fast**, **Simple**, and **Flexible**, file-based Web-platform. Ther
The underlying architecture of Grav is designed to use well-established and _best-in-class_ technologies to ensure that Grav is simple to use and easy to extend. Some of these key technologies include:
* [Twig Templating](http://twig.sensiolabs.org/): for powerful control of the user interface
* [Markdown](http://en.wikipedia.org/wiki/Markdown): for easy content creation
* [YAML](http://yaml.org): for simple configuration
* [Parsedown](http://parsedown.org/): for fast Markdown and Markdown Extra support
* [Doctrine Cache](http://doctrine-orm.readthedocs.io/projects/doctrine-orm/en/latest/reference/caching.html): layer for performance
* [Pimple Dependency Injection Container](http://pimple.sensiolabs.org/): for extensibility and maintainability
* [Symfony Event Dispatcher](http://symfony.com/doc/current/components/event_dispatcher/introduction.html): for plugin event handling
* [Symfony Console](http://symfony.com/doc/current/components/console/introduction.html): for CLI interface
* [Twig Templating](https://twig.sensiolabs.org/): for powerful control of the user interface
* [Markdown](https://en.wikipedia.org/wiki/Markdown): for easy content creation
* [YAML](https://yaml.org): for simple configuration
* [Parsedown](https://parsedown.org/): for fast Markdown and Markdown Extra support
* [Doctrine Cache](https://www.doctrine-project.org/projects/doctrine-orm/en/latest/reference/caching.html): layer for performance
* [Pimple Dependency Injection Container](https://pimple.sensiolabs.org/): for extensibility and maintainability
* [Symfony Event Dispatcher](https://symfony.com/doc/current/components/event_dispatcher/introduction.html): for plugin event handling
* [Symfony Console](https://symfony.com/doc/current/components/console/introduction.html): for CLI interface
* [Gregwar Image Library](https://github.com/Gregwar/Image): for dynamic image manipulation
# Requirements

View File

@@ -26,7 +26,7 @@
"gregwar/image": "2.*",
"donatj/phpuseragentparser": "~0.3",
"pimple/pimple": "~3.2",
"rockettheme/toolbox": "~1.4",
"rockettheme/toolbox": "1.4.2",
"maximebf/debugbar": "~1.10",
"ext-mbstring": "*",
"ext-openssl": "*",

166
composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "544658e69ae737e742e014c6c674cc70",
"content-hash": "2ab76ae21295d87c6ff140947c160865",
"packages": [
{
"name": "antoligy/dom-string-iterators",
@@ -52,16 +52,16 @@
},
{
"name": "composer/ca-bundle",
"version": "1.1.3",
"version": "1.1.4",
"source": {
"type": "git",
"url": "https://github.com/composer/ca-bundle.git",
"reference": "8afa52cd417f4ec417b4bfe86b68106538a87660"
"reference": "558f321c52faeb4828c03e7dc0cfe39a09e09a2d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/ca-bundle/zipball/8afa52cd417f4ec417b4bfe86b68106538a87660",
"reference": "8afa52cd417f4ec417b4bfe86b68106538a87660",
"url": "https://api.github.com/repos/composer/ca-bundle/zipball/558f321c52faeb4828c03e7dc0cfe39a09e09a2d",
"reference": "558f321c52faeb4828c03e7dc0cfe39a09e09a2d",
"shasum": ""
},
"require": {
@@ -104,7 +104,7 @@
"ssl",
"tls"
],
"time": "2018-10-18T06:09:13+00:00"
"time": "2019-01-28T09:30:10+00:00"
},
{
"name": "doctrine/cache",
@@ -245,16 +245,16 @@
},
{
"name": "donatj/phpuseragentparser",
"version": "v0.11.1",
"version": "v0.13.0",
"source": {
"type": "git",
"url": "https://github.com/donatj/PhpUserAgent.git",
"reference": "0eab93a89a1a73a087e795abc96d5777c3d48b64"
"reference": "5f2da266d2a386f9b231d4344ae37baf7a467c2d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/donatj/PhpUserAgent/zipball/0eab93a89a1a73a087e795abc96d5777c3d48b64",
"reference": "0eab93a89a1a73a087e795abc96d5777c3d48b64",
"url": "https://api.github.com/repos/donatj/PhpUserAgent/zipball/5f2da266d2a386f9b231d4344ae37baf7a467c2d",
"reference": "5f2da266d2a386f9b231d4344ae37baf7a467c2d",
"shasum": ""
},
"require": {
@@ -268,7 +268,7 @@
"type": "library",
"autoload": {
"files": [
"Source/UserAgentParser.php"
"src/UserAgentParser.php"
]
},
"notification-url": "https://packagist.org/downloads/",
@@ -292,7 +292,7 @@
"user agent",
"useragent"
],
"time": "2018-10-25T20:22:53+00:00"
"time": "2019-03-08T20:52:23+00:00"
},
{
"name": "erusev/parsedown",
@@ -489,17 +489,17 @@
},
{
"name": "gregwar/image",
"version": "v2.0.23",
"version": "v2.0.24",
"target-dir": "Gregwar/Image",
"source": {
"type": "git",
"url": "https://github.com/Gregwar/Image.git",
"reference": "25fbb91a95d41d44587ee7ca8923745b66221a7d"
"reference": "52145816255dd20cb4bb115d0f9e1030c6287994"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Gregwar/Image/zipball/25fbb91a95d41d44587ee7ca8923745b66221a7d",
"reference": "25fbb91a95d41d44587ee7ca8923745b66221a7d",
"url": "https://api.github.com/repos/Gregwar/Image/zipball/52145816255dd20cb4bb115d0f9e1030c6287994",
"reference": "52145816255dd20cb4bb115d0f9e1030c6287994",
"shasum": ""
},
"require": {
@@ -537,7 +537,7 @@
"gd",
"image"
],
"time": "2018-10-25T17:12:13+00:00"
"time": "2019-01-27T15:10:06+00:00"
},
{
"name": "guzzlehttp/psr7",
@@ -1353,16 +1353,16 @@
},
{
"name": "symfony/console",
"version": "v3.4.21",
"version": "v3.4.23",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "a700b874d3692bc8342199adfb6d3b99f62cc61a"
"reference": "71ce77f37af0c5ffb9590e43cc4f70e426945c5e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/a700b874d3692bc8342199adfb6d3b99f62cc61a",
"reference": "a700b874d3692bc8342199adfb6d3b99f62cc61a",
"url": "https://api.github.com/repos/symfony/console/zipball/71ce77f37af0c5ffb9590e43cc4f70e426945c5e",
"reference": "71ce77f37af0c5ffb9590e43cc4f70e426945c5e",
"shasum": ""
},
"require": {
@@ -1374,6 +1374,9 @@
"symfony/dependency-injection": "<3.4",
"symfony/process": "<3.3"
},
"provide": {
"psr/log-implementation": "1.0"
},
"require-dev": {
"psr/log": "~1.0",
"symfony/config": "~3.3|~4.0",
@@ -1383,7 +1386,7 @@
"symfony/process": "~3.3|~4.0"
},
"suggest": {
"psr/log-implementation": "For using the console logger",
"psr/log": "For using the console logger",
"symfony/event-dispatcher": "",
"symfony/lock": "",
"symfony/process": ""
@@ -1418,20 +1421,20 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
"time": "2019-01-04T04:42:43+00:00"
"time": "2019-02-23T15:06:07+00:00"
},
{
"name": "symfony/debug",
"version": "v3.4.21",
"version": "v3.4.23",
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
"reference": "26d7f23b9bd0b93bee5583e4d6ca5cb1ab31b186"
"reference": "8d8a9e877b3fcdc50ddecf8dcea146059753f782"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/debug/zipball/26d7f23b9bd0b93bee5583e4d6ca5cb1ab31b186",
"reference": "26d7f23b9bd0b93bee5583e4d6ca5cb1ab31b186",
"url": "https://api.github.com/repos/symfony/debug/zipball/8d8a9e877b3fcdc50ddecf8dcea146059753f782",
"reference": "8d8a9e877b3fcdc50ddecf8dcea146059753f782",
"shasum": ""
},
"require": {
@@ -1474,20 +1477,20 @@
],
"description": "Symfony Debug Component",
"homepage": "https://symfony.com",
"time": "2019-01-01T13:45:19+00:00"
"time": "2019-02-24T15:45:11+00:00"
},
{
"name": "symfony/event-dispatcher",
"version": "v3.4.21",
"version": "v3.4.23",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
"reference": "d1cdd46c53c264a2bd42505bd0e8ce21423bd0e2"
"reference": "ec625e2fff7f584eeb91754821807317b2e79236"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/d1cdd46c53c264a2bd42505bd0e8ce21423bd0e2",
"reference": "d1cdd46c53c264a2bd42505bd0e8ce21423bd0e2",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/ec625e2fff7f584eeb91754821807317b2e79236",
"reference": "ec625e2fff7f584eeb91754821807317b2e79236",
"shasum": ""
},
"require": {
@@ -1537,7 +1540,7 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
"time": "2019-01-01T18:08:36+00:00"
"time": "2019-02-23T15:06:07+00:00"
},
{
"name": "symfony/polyfill-ctype",
@@ -1584,7 +1587,7 @@
},
{
"name": "Gert de Pagter",
"email": "BackEndTea@gmail.com"
"email": "backendtea@gmail.com"
}
],
"description": "Symfony polyfill for ctype functions",
@@ -1717,16 +1720,16 @@
},
{
"name": "symfony/var-dumper",
"version": "v3.4.21",
"version": "v3.4.23",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
"reference": "a5f39641bb62e8b74e343467b145331273f615a2"
"reference": "d34d10236300876d14291e9df85c6ef3d3bb9066"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/a5f39641bb62e8b74e343467b145331273f615a2",
"reference": "a5f39641bb62e8b74e343467b145331273f615a2",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/d34d10236300876d14291e9df85c6ef3d3bb9066",
"reference": "d34d10236300876d14291e9df85c6ef3d3bb9066",
"shasum": ""
},
"require": {
@@ -1782,20 +1785,20 @@
"debug",
"dump"
],
"time": "2019-01-01T13:45:19+00:00"
"time": "2019-02-23T15:06:07+00:00"
},
{
"name": "symfony/yaml",
"version": "v3.4.21",
"version": "v3.4.23",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "554a59a1ccbaac238a89b19c8e551a556fd0e2ea"
"reference": "57f1ce82c997f5a8701b89ef970e36bb657fd09c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/554a59a1ccbaac238a89b19c8e551a556fd0e2ea",
"reference": "554a59a1ccbaac238a89b19c8e551a556fd0e2ea",
"url": "https://api.github.com/repos/symfony/yaml/zipball/57f1ce82c997f5a8701b89ef970e36bb657fd09c",
"reference": "57f1ce82c997f5a8701b89ef970e36bb657fd09c",
"shasum": ""
},
"require": {
@@ -1841,20 +1844,20 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
"time": "2019-01-01T13:45:19+00:00"
"time": "2019-02-23T15:06:07+00:00"
},
{
"name": "twig/twig",
"version": "v1.37.1",
"version": "v1.38.2",
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
"reference": "66be9366c76cbf23e82e7171d47cbfa54a057a62"
"reference": "874adbd9222f928f6998732b25b01b41dff15b0c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/66be9366c76cbf23e82e7171d47cbfa54a057a62",
"reference": "66be9366c76cbf23e82e7171d47cbfa54a057a62",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/874adbd9222f928f6998732b25b01b41dff15b0c",
"reference": "874adbd9222f928f6998732b25b01b41dff15b0c",
"shasum": ""
},
"require": {
@@ -1869,7 +1872,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.37-dev"
"dev-master": "1.38-dev"
}
},
"autoload": {
@@ -1907,7 +1910,7 @@
"keywords": [
"templating"
],
"time": "2019-01-14T14:59:29+00:00"
"time": "2019-03-12T18:45:24+00:00"
}
],
"packages-dev": [
@@ -1972,16 +1975,16 @@
},
{
"name": "codeception/codeception",
"version": "2.5.2",
"version": "2.5.4",
"source": {
"type": "git",
"url": "https://github.com/Codeception/Codeception.git",
"reference": "4f89de32929fef53ca6d83b159fe329b6d484c1c"
"reference": "a2ecfe2f3ad36cc29904d2d566b0d7280854e6c9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Codeception/Codeception/zipball/4f89de32929fef53ca6d83b159fe329b6d484c1c",
"reference": "4f89de32929fef53ca6d83b159fe329b6d484c1c",
"url": "https://api.github.com/repos/Codeception/Codeception/zipball/a2ecfe2f3ad36cc29904d2d566b0d7280854e6c9",
"reference": "a2ecfe2f3ad36cc29904d2d566b0d7280854e6c9",
"shasum": ""
},
"require": {
@@ -2013,7 +2016,7 @@
"predis/predis": "^1.0",
"squizlabs/php_codesniffer": "~2.0",
"symfony/process": ">=2.7 <5.0",
"vlucas/phpdotenv": "^2.4.0"
"vlucas/phpdotenv": "^3.0"
},
"suggest": {
"aws/aws-sdk-php": "For using AWS Auth in REST module and Queue module",
@@ -2060,7 +2063,7 @@
"functional testing",
"unit testing"
],
"time": "2019-01-02T10:28:51+00:00"
"time": "2019-02-20T20:45:25+00:00"
},
{
"name": "codeception/phpunit-wrapper",
@@ -3001,6 +3004,7 @@
"mock",
"xunit"
],
"abandoned": true,
"time": "2015-10-02T06:51:40+00:00"
},
{
@@ -3377,16 +3381,16 @@
},
{
"name": "symfony/browser-kit",
"version": "v3.4.21",
"version": "v3.4.23",
"source": {
"type": "git",
"url": "https://github.com/symfony/browser-kit.git",
"reference": "6d98fb221a263c66b1311203fe4eed154035f508"
"reference": "c0fadd368c1031109e996316e53ffeb886d37ea1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/browser-kit/zipball/6d98fb221a263c66b1311203fe4eed154035f508",
"reference": "6d98fb221a263c66b1311203fe4eed154035f508",
"url": "https://api.github.com/repos/symfony/browser-kit/zipball/c0fadd368c1031109e996316e53ffeb886d37ea1",
"reference": "c0fadd368c1031109e996316e53ffeb886d37ea1",
"shasum": ""
},
"require": {
@@ -3430,20 +3434,20 @@
],
"description": "Symfony BrowserKit Component",
"homepage": "https://symfony.com",
"time": "2019-01-01T13:45:19+00:00"
"time": "2019-02-23T15:06:07+00:00"
},
{
"name": "symfony/css-selector",
"version": "v3.4.21",
"version": "v3.4.23",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
"reference": "12f86295c46c36af9896cf21db6b6b8a1465315d"
"reference": "8ca29297c29b64fb3a1a135e71cb25f67f9fdccf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/css-selector/zipball/12f86295c46c36af9896cf21db6b6b8a1465315d",
"reference": "12f86295c46c36af9896cf21db6b6b8a1465315d",
"url": "https://api.github.com/repos/symfony/css-selector/zipball/8ca29297c29b64fb3a1a135e71cb25f67f9fdccf",
"reference": "8ca29297c29b64fb3a1a135e71cb25f67f9fdccf",
"shasum": ""
},
"require": {
@@ -3483,20 +3487,20 @@
],
"description": "Symfony CssSelector Component",
"homepage": "https://symfony.com",
"time": "2019-01-02T09:30:52+00:00"
"time": "2019-01-16T09:39:14+00:00"
},
{
"name": "symfony/dom-crawler",
"version": "v3.4.21",
"version": "v3.4.23",
"source": {
"type": "git",
"url": "https://github.com/symfony/dom-crawler.git",
"reference": "311f666d85d1075b0a294ba1f3de4ae9307d8180"
"reference": "d40023c057393fb25f7ca80af2a56ed948c45a09"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/311f666d85d1075b0a294ba1f3de4ae9307d8180",
"reference": "311f666d85d1075b0a294ba1f3de4ae9307d8180",
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/d40023c057393fb25f7ca80af2a56ed948c45a09",
"reference": "d40023c057393fb25f7ca80af2a56ed948c45a09",
"shasum": ""
},
"require": {
@@ -3540,20 +3544,20 @@
],
"description": "Symfony DomCrawler Component",
"homepage": "https://symfony.com",
"time": "2019-01-01T13:45:19+00:00"
"time": "2019-02-23T15:06:07+00:00"
},
{
"name": "symfony/finder",
"version": "v3.4.21",
"version": "v3.4.23",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
"reference": "3f2a2ab6315dd7682d4c16dcae1e7b95c8b8555e"
"reference": "fcdde4aa38f48190ce70d782c166f23930084f9b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/finder/zipball/3f2a2ab6315dd7682d4c16dcae1e7b95c8b8555e",
"reference": "3f2a2ab6315dd7682d4c16dcae1e7b95c8b8555e",
"url": "https://api.github.com/repos/symfony/finder/zipball/fcdde4aa38f48190ce70d782c166f23930084f9b",
"reference": "fcdde4aa38f48190ce70d782c166f23930084f9b",
"shasum": ""
},
"require": {
@@ -3589,20 +3593,20 @@
],
"description": "Symfony Finder Component",
"homepage": "https://symfony.com",
"time": "2019-01-01T13:45:19+00:00"
"time": "2019-02-22T14:44:53+00:00"
},
{
"name": "symfony/process",
"version": "v3.4.21",
"version": "v3.4.23",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
"reference": "0d41dd7d95ed179aed6a13393b0f4f97bfa2d25c"
"reference": "009f8dda80930e89e8344a4e310b08f9ff07dd2e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/0d41dd7d95ed179aed6a13393b0f4f97bfa2d25c",
"reference": "0d41dd7d95ed179aed6a13393b0f4f97bfa2d25c",
"url": "https://api.github.com/repos/symfony/process/zipball/009f8dda80930e89e8344a4e310b08f9ff07dd2e",
"reference": "009f8dda80930e89e8344a4e310b08f9ff07dd2e",
"shasum": ""
},
"require": {
@@ -3638,7 +3642,7 @@
],
"description": "Symfony Process Component",
"homepage": "https://symfony.com",
"time": "2019-01-02T21:24:08+00:00"
"time": "2019-01-16T13:27:11+00:00"
},
{
"name": "victorjonsson/markdowndocs",

View File

@@ -8,7 +8,7 @@
// Some standard defines
define('GRAV', true);
define('GRAV_VERSION', '1.5.7');
define('GRAV_VERSION', '1.5.9');
define('GRAV_TESTING', false);
define('DS', '/');

View File

@@ -73,6 +73,7 @@ class Media extends AbstractMedia
protected function init()
{
$config = Grav::instance()['config'];
$locator = Grav::instance()['locator'];
$exif_reader = isset(Grav::instance()['exif']) ? Grav::instance()['exif']->getReader() : false;
$media_types = array_keys(Grav::instance()['config']->get('media.types'));
@@ -155,7 +156,11 @@ class Media extends AbstractMedia
$meta_data = $meta->getData();
$meta_trimmed = array_diff_key($meta_data, array_flip($this->standard_exif));
if ($meta_trimmed) {
$file = File::instance($meta_path);
if ($locator->isStream($meta_path)) {
$file = File::instance($locator->findResource($meta_path, true, true));
} else {
$file = File::instance($meta_path);
}
$file->save(Yaml::dump($meta_trimmed));
$types['meta']['file'] = $meta_path;
}

View File

@@ -687,6 +687,8 @@ class Page implements PageInterface
$this->content = str_replace("<p>{$delimiter}</p>", '', $this->content);
}
// Fire event when Page::content() is called
Grav::instance()->fireEvent('onPageContent', new Event(['page' => $this]));
}
return $this->content;

View File

@@ -284,7 +284,7 @@ class User extends Data
return Grav::instance()['base_url'] . '/' . $avatar['path'];
}
return 'https://www.gravatar.com/avatar/' . md5($this->email);
return 'https://www.gravatar.com/avatar/' . md5( strtolower( trim($this->email) ) );
}
/**

View File

@@ -27,9 +27,11 @@ class FileCache extends AbstractCache
/**
* @inheritdoc
*/
public function __construct($namespace = '', $defaultLifetime = null)
public function __construct($namespace = '', $defaultLifetime = null, $folder = null)
{
parent::__construct($namespace, $defaultLifetime ?: 31557600); // = 1 year
$this->initFileCache($namespace, $folder ?? '');
}
/**
@@ -136,9 +138,9 @@ class FileCache extends AbstractCache
/**
* @param string $namespace
* @param string $directory
* @throws \Psr\SimpleCache\InvalidArgumentException
* @throws \Psr\SimpleCache\InvalidArgumentException|InvalidArgumentException
*/
private function init($namespace, $directory)
protected function initFileCache($namespace, $directory)
{
if (!isset($directory[0])) {
$directory = sys_get_temp_dir() . '/grav-cache';
@@ -153,9 +155,7 @@ class FileCache extends AbstractCache
$directory .= DIRECTORY_SEPARATOR . $namespace;
}
if (!file_exists($directory)) {
@mkdir($directory, 0777, true);
}
$this->mkdir($directory);
$directory .= DIRECTORY_SEPARATOR;
// On Windows the whole path is limited to 258 chars

View File

@@ -38,9 +38,6 @@ class Session implements SessionInterface
return self::$instance;
}
/**
* @inheritdoc
*/
public function __construct(array $options = [])
{
// Session is a singleton.