mirror of
https://github.com/getgrav/grav.git
synced 2025-12-05 23:39:58 +01:00
Compare commits
91 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a7c2505f36 | ||
|
|
25b5becd1a | ||
|
|
49013a0ed0 | ||
|
|
a861d57763 | ||
|
|
a4ab5d9106 | ||
|
|
442cb01adb | ||
|
|
c6793c1dee | ||
|
|
3b7a7d09a0 | ||
|
|
80901cecdb | ||
|
|
7f23828ece | ||
|
|
8e1dca4360 | ||
|
|
86d989a722 | ||
|
|
046b9240e4 | ||
|
|
67f0cfb039 | ||
|
|
238e209982 | ||
|
|
c5f5ac62b5 | ||
|
|
776cf388b0 | ||
|
|
c1c458a934 | ||
|
|
ab721de49c | ||
|
|
133e83f89d | ||
|
|
af47fc7d60 | ||
|
|
7adaf536f1 | ||
|
|
ffd61065ac | ||
|
|
8ff1042fe3 | ||
|
|
79fa88c315 | ||
|
|
f2898f9f20 | ||
|
|
7fbac765e7 | ||
|
|
ccad675336 | ||
|
|
0aa36f3cb0 | ||
|
|
cc61464be3 | ||
|
|
d0e57c8276 | ||
|
|
898ab989aa | ||
|
|
580dac1784 | ||
|
|
2eb8690c2d | ||
|
|
942652ec27 | ||
|
|
6fb8cd293a | ||
|
|
5e7d103eab | ||
|
|
82f3322d40 | ||
|
|
0dd5d08514 | ||
|
|
8d64835765 | ||
|
|
481fe1903e | ||
|
|
96028d1d69 | ||
|
|
8532c2d06e | ||
|
|
9147a10cc7 | ||
|
|
0179c6ee65 | ||
|
|
7a3f136207 | ||
|
|
550b51f77a | ||
|
|
3572833e7a | ||
|
|
c52931e7fa | ||
|
|
535a3d9a83 | ||
|
|
d075c29254 | ||
|
|
299a658050 | ||
|
|
42d3b12b13 | ||
|
|
3eace66274 | ||
|
|
c66bae55b4 | ||
|
|
d1b0f12e5b | ||
|
|
0543d997f6 | ||
|
|
b7e1eb9d1b | ||
|
|
eecf914881 | ||
|
|
cc8a20537e | ||
|
|
04690ce206 | ||
|
|
7a7ffd3492 | ||
|
|
667c4340d8 | ||
|
|
39af36977e | ||
|
|
4cf5f00441 | ||
|
|
85d1ed7255 | ||
|
|
cafd371475 | ||
|
|
ebce5ecd31 | ||
|
|
51c3b6d105 | ||
|
|
f02b7a6028 | ||
|
|
828e1a54f1 | ||
|
|
04d7945f10 | ||
|
|
4b948e2cbb | ||
|
|
122ded671c | ||
|
|
c7c234d04a | ||
|
|
a37582eb4c | ||
|
|
4776b0e6b5 | ||
|
|
926d78d9cb | ||
|
|
7bfb316d6b | ||
|
|
9168b192ff | ||
|
|
c2d22694f3 | ||
|
|
633a2a750f | ||
|
|
13341c323d | ||
|
|
1bfbb71767 | ||
|
|
66fc3ae8c5 | ||
|
|
f6667077f3 | ||
|
|
bbc4a23c86 | ||
|
|
c178b22c10 | ||
|
|
cd081b22a4 | ||
|
|
3dc0a2994b | ||
|
|
34d4cd9ab1 |
@@ -2,7 +2,8 @@ language: php
|
||||
php:
|
||||
- '5.5'
|
||||
- '5.6'
|
||||
- '7.0'
|
||||
- '7.0.21'
|
||||
- '7.1'
|
||||
branches:
|
||||
only:
|
||||
- develop
|
||||
@@ -37,7 +38,7 @@ env:
|
||||
- GOPATH="$HOME/go"
|
||||
- PATH="$GOPATH/bin:$PATH"
|
||||
# GH_TOKEN [API Key]
|
||||
- secure: "jS+c+g2v33vypG4VtqiSDW2qQ4dGJZlrUKBRCztoy1yrOrYRPvc5Vzi/AS3fDmZ4yizukEwmUNNzyZQcgFvLPpmCCml46Dovp8R9OXhbNe8OnULmaSn2Zkr71oblMYu6ZP+RpYvNq0BIdSB3u2TiFriHMiTIkX9UwZNaUCOX1ig="
|
||||
- secure: "NR9pV7YteY9OoPmjDTQG0fDfocVu+tCeiDH1F2GFhXCu71UOIvqWXpOxp0RHkG5GIXdCFHx59yu+ZO275lbaHkbF8+4lVSVrV4RcGn+pIncvxr6iZCVW05dbAxV3H8alK+xYJRGmbyfQl5wIM49WvmuGHZjcmIloS4t/omQ3N+I="
|
||||
# BB_TOKEN value => "user:pass@"
|
||||
- secure: "einUtSEkUWy2IrqLXyVjwUU+mwaaoiOXRRVdLBpA3Zye6bZx8cm5h/5AplkPWhM/NmCJoW/MwNZHHkFhlr3mDRov5iOxVmTTYfnXB+I5lxYTSgduOLLErS7mU8hfADpVDU8bHNU44fNGD3UEiG1PD4qQBX4DMlqIFmR20mjs81k="
|
||||
# GH_API_USER [for curl]
|
||||
|
||||
64
CHANGELOG.md
64
CHANGELOG.md
@@ -1,3 +1,67 @@
|
||||
# v1.3.4
|
||||
## 09/29/2017
|
||||
|
||||
1. [](#new)
|
||||
* Added filter support for Page collections (routable/visible/type/access/etc.)
|
||||
1. [](#improved)
|
||||
* Implemented `Composer\CaBundle` for SSL Certs [#1241](https://github.com/getgrav/grav/issues/1241)
|
||||
* Refactored the Assets sorting logic
|
||||
* Improved language overrides to merge only 'extra' translations [#1514](https://github.com/getgrav/grav/issues/1514)
|
||||
* Improved support for Assets with query strings [#1451](https://github.com/getgrav/grav/issues/1451)
|
||||
* Twig extension cleanup
|
||||
1. [](#bugfix)
|
||||
* Fixed an issue where fallback was not supporting dynamic page generation
|
||||
* Fixed issue with Image query string not being fully URL encoded [#1622](https://github.com/getgrav/grav/issues/1622)
|
||||
* Fixed `Page::summary()` when using delimiter and multibyte UTF8 Characters [#1644](https://github.com/getgrav/grav/issues/1644)
|
||||
* Fixed missing `.json` thumbnail throwing error when adding media [grav-plugin-admin#1156](https://github.com/getgrav/grav-plugin-admin/issues/1156)
|
||||
* Fixed insecure session cookie initialization [#1656](https://github.com/getgrav/grav/pull/1656)
|
||||
|
||||
# v1.3.3
|
||||
## 09/07/2017
|
||||
|
||||
1. [](#new)
|
||||
* Added support for 2-Factor Authentication in admin profile
|
||||
* Added `gaussianBlur` media method [#1623](https://github.com/getgrav/grav/pull/1623)
|
||||
* Added new `|chunk_split()`, `|basename`, and `|dirname` Twig filter
|
||||
* Added new `tl` Twig filter/function to support specific translations [#1618](https://github.com/getgrav/grav/issues/1618)
|
||||
1. [](#improved)
|
||||
* User `authorization` now requires a check for `authenticated` - REQUIRED: `Login v2.4.0`
|
||||
* Added options to `Page::summary()` to support size without HTML tags [#1554](https://github.com/getgrav/grav/issues/1554)
|
||||
* Forced `natsort` on plugins to ensure consistent plugin load ordering across platforms [#1614](https://github.com/getgrav/grav/issues/1614)
|
||||
* Use new `multilevel` field to handle Asset Collections [#1201](https://github.com/getgrav/grav-plugin-admin/issues/1201)
|
||||
* Added support for redis `password` option [#1620](https://github.com/getgrav/grav/issues/1620)
|
||||
* Use 302 rather than 301 redirects by default [#1619](https://github.com/getgrav/grav/issues/1619)
|
||||
* GPM Installer will try to load alphanumeric version of the class if no standard class found [#1630](https://github.com/getgrav/grav/issues/1630)
|
||||
* Add current page position to `User` class [#1632](https://github.com/getgrav/grav/issues/1632)
|
||||
* Added option to enable case insensitive URLs [#1638](https://github.com/getgrav/grav/issues/1638)
|
||||
* Updated vendor libraries
|
||||
* Updated `travis.yml` to add support for PHP 7.1 as well as 7.0.21 for test suite
|
||||
1. [](#bugfix)
|
||||
* Fixed UTF8 multibyte UTF8 character support in `Page::summary()` [#1554](https://github.com/getgrav/grav/issues/1554)
|
||||
|
||||
# v1.3.2
|
||||
## 08/16/2017
|
||||
|
||||
1. [](#new)
|
||||
* Added a new `cache_control` system and page level property [#1591](https://github.com/getgrav/grav/issues/1591)
|
||||
* Added a new `clear_images_by_default` system property to stop cache clear events from removing processed images [#1481](https://github.com/getgrav/grav/pull/1481)
|
||||
* Added new `onTwigLoader()` event to enable utilization of loader methods
|
||||
* Added new `Twig::addPath()` and `Twig::prependPath()` methods to wrap loader methods and support namespacing [#1604](https://github.com/getgrav/grav/issues/1604)
|
||||
* Added new `array_key_exists()` Twig function wrapper
|
||||
* Added a new `Collection::intersect()` method [#1605](https://github.com/getgrav/grav/issues/1605)
|
||||
1. [](#bugfix)
|
||||
* Allow `session.timeout` field to be set to `0` via blueprints [#1598](https://github.com/getgrav/grav/issues/1598)
|
||||
* Fixed `Data::exists()` and `Data::raw()` functions breaking if `Data::file()` hasn't been called with non-null value
|
||||
* Fixed parent theme auto-loading in child themes of Gantry 5
|
||||
|
||||
# v1.3.1
|
||||
## 07/19/2017
|
||||
|
||||
1. [](#bugfix)
|
||||
* Fix ordering for Linux + International environments [#1574](https://github.com/getgrav/grav/issues/1574)
|
||||
* Check if medium thumbnail exists before resetting
|
||||
* Update Travis' auth token
|
||||
|
||||
# v1.3.0
|
||||
## 07/16/2017
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Grav
|
||||
Copyright (c) 2017 Grav
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
"symfony/event-dispatcher": "~2.8",
|
||||
"symfony/var-dumper": "~2.8",
|
||||
"symfony/polyfill-iconv": "~1.0",
|
||||
"doctrine/cache": "~1.5",
|
||||
"doctrine/cache": "1.6.*",
|
||||
"doctrine/collections": "1.3",
|
||||
"filp/whoops": "~2.0",
|
||||
"matthiasmullie/minify": "^1.3",
|
||||
"monolog/monolog": "~1.0",
|
||||
"gregwar/image": "~2.0",
|
||||
"gregwar/image": "2.*",
|
||||
"donatj/phpuseragentparser": "~0.3",
|
||||
"pimple/pimple": "~3.0",
|
||||
"rockettheme/toolbox": "~1.0",
|
||||
@@ -31,13 +31,21 @@
|
||||
"ext-zip": "*",
|
||||
"league/climate": "^3.2",
|
||||
"antoligy/dom-string-iterators": "^1.0",
|
||||
"miljar/php-exif": "^0.6.3"
|
||||
"miljar/php-exif": "^0.6.3",
|
||||
"composer/ca-bundle": "^1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"codeception/codeception": "^2.1",
|
||||
"phpunit/php-code-coverage": "~2.0",
|
||||
"fzaninotto/faker": "^1.5"
|
||||
"fzaninotto/faker": "^1.5",
|
||||
"victorjonsson/markdowndocs": "dev-master"
|
||||
},
|
||||
"repositories": [
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/trilbymedia/PHP-Markdown-Documentation-Generator"
|
||||
}
|
||||
],
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Grav\\": "system/src/Grav"
|
||||
|
||||
445
composer.lock
generated
445
composer.lock
generated
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "550adaab2ad1daea868cb5568ccbe19d",
|
||||
"content-hash": "24c56b5fbd83e5c8173f1c38c2805b68",
|
||||
"packages": [
|
||||
{
|
||||
"name": "antoligy/dom-string-iterators",
|
||||
@@ -51,17 +51,76 @@
|
||||
"time": "2015-11-04T17:33:14+00:00"
|
||||
},
|
||||
{
|
||||
"name": "doctrine/cache",
|
||||
"version": "v1.6.1",
|
||||
"name": "composer/ca-bundle",
|
||||
"version": "1.0.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/doctrine/cache.git",
|
||||
"reference": "b6f544a20f4807e81f7044d31e679ccbb1866dc3"
|
||||
"url": "https://github.com/composer/ca-bundle.git",
|
||||
"reference": "9dd73a03951357922d8aee6cc084500de93e2343"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/doctrine/cache/zipball/b6f544a20f4807e81f7044d31e679ccbb1866dc3",
|
||||
"reference": "b6f544a20f4807e81f7044d31e679ccbb1866dc3",
|
||||
"url": "https://api.github.com/repos/composer/ca-bundle/zipball/9dd73a03951357922d8aee6cc084500de93e2343",
|
||||
"reference": "9dd73a03951357922d8aee6cc084500de93e2343",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-openssl": "*",
|
||||
"ext-pcre": "*",
|
||||
"php": "^5.3.2 || ^7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.5",
|
||||
"psr/log": "^1.0",
|
||||
"symfony/process": "^2.5 || ^3.0"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/process": "This is necessary to reliably check whether openssl_x509_parse is vulnerable on older php versions, but can be ignored on PHP 5.5.6+"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Composer\\CaBundle\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jordi Boggiano",
|
||||
"email": "j.boggiano@seld.be",
|
||||
"homepage": "http://seld.be"
|
||||
}
|
||||
],
|
||||
"description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.",
|
||||
"keywords": [
|
||||
"cabundle",
|
||||
"cacert",
|
||||
"certificate",
|
||||
"ssl",
|
||||
"tls"
|
||||
],
|
||||
"time": "2017-09-11T07:24:36+00:00"
|
||||
},
|
||||
{
|
||||
"name": "doctrine/cache",
|
||||
"version": "v1.6.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/doctrine/cache.git",
|
||||
"reference": "eb152c5100571c7a45470ff2a35095ab3f3b900b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/doctrine/cache/zipball/eb152c5100571c7a45470ff2a35095ab3f3b900b",
|
||||
"reference": "eb152c5100571c7a45470ff2a35095ab3f3b900b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -118,7 +177,7 @@
|
||||
"cache",
|
||||
"caching"
|
||||
],
|
||||
"time": "2016-10-29T11:16:17+00:00"
|
||||
"time": "2017-07-22T12:49:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "doctrine/collections",
|
||||
@@ -239,16 +298,16 @@
|
||||
},
|
||||
{
|
||||
"name": "erusev/parsedown",
|
||||
"version": "1.6.2",
|
||||
"version": "1.6.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/erusev/parsedown.git",
|
||||
"reference": "1bf24f7334fe16c88bf9d467863309ceaf285b01"
|
||||
"reference": "728952b90a333b5c6f77f06ea9422b94b585878d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/erusev/parsedown/zipball/1bf24f7334fe16c88bf9d467863309ceaf285b01",
|
||||
"reference": "1bf24f7334fe16c88bf9d467863309ceaf285b01",
|
||||
"url": "https://api.github.com/repos/erusev/parsedown/zipball/728952b90a333b5c6f77f06ea9422b94b585878d",
|
||||
"reference": "728952b90a333b5c6f77f06ea9422b94b585878d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -277,7 +336,7 @@
|
||||
"markdown",
|
||||
"parser"
|
||||
],
|
||||
"time": "2017-03-29T16:04:15+00:00"
|
||||
"time": "2017-05-14T14:47:48+00:00"
|
||||
},
|
||||
{
|
||||
"name": "erusev/parsedown-extra",
|
||||
@@ -325,16 +384,16 @@
|
||||
},
|
||||
{
|
||||
"name": "filp/whoops",
|
||||
"version": "2.1.9",
|
||||
"version": "2.1.10",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filp/whoops.git",
|
||||
"reference": "b238974e1c7cc1859b0c16ddc1c02ecb70ecc07f"
|
||||
"reference": "ffbbd2c06c64b08fb47974eed5dbce4ca2bb0eec"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/filp/whoops/zipball/b238974e1c7cc1859b0c16ddc1c02ecb70ecc07f",
|
||||
"reference": "b238974e1c7cc1859b0c16ddc1c02ecb70ecc07f",
|
||||
"url": "https://api.github.com/repos/filp/whoops/zipball/ffbbd2c06c64b08fb47974eed5dbce4ca2bb0eec",
|
||||
"reference": "ffbbd2c06c64b08fb47974eed5dbce4ca2bb0eec",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -382,7 +441,7 @@
|
||||
"whoops",
|
||||
"zf2"
|
||||
],
|
||||
"time": "2017-06-03T18:33:07+00:00"
|
||||
"time": "2017-08-03T18:23:40+00:00"
|
||||
},
|
||||
{
|
||||
"name": "gregwar/cache",
|
||||
@@ -532,16 +591,16 @@
|
||||
},
|
||||
{
|
||||
"name": "matthiasmullie/minify",
|
||||
"version": "1.3.45",
|
||||
"version": "1.3.52",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/matthiasmullie/minify.git",
|
||||
"reference": "09b83e9dbdc50cf6734c6a9652a54891c0651998"
|
||||
"reference": "134b25a63d83a80ae128aedc9a99987e064b4382"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/matthiasmullie/minify/zipball/09b83e9dbdc50cf6734c6a9652a54891c0651998",
|
||||
"reference": "09b83e9dbdc50cf6734c6a9652a54891c0651998",
|
||||
"url": "https://api.github.com/repos/matthiasmullie/minify/zipball/134b25a63d83a80ae128aedc9a99987e064b4382",
|
||||
"reference": "134b25a63d83a80ae128aedc9a99987e064b4382",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -588,7 +647,7 @@
|
||||
"minifier",
|
||||
"minify"
|
||||
],
|
||||
"time": "2017-06-13T15:54:31+00:00"
|
||||
"time": "2017-09-15T13:02:11+00:00"
|
||||
},
|
||||
{
|
||||
"name": "matthiasmullie/path-converter",
|
||||
@@ -641,16 +700,16 @@
|
||||
},
|
||||
{
|
||||
"name": "maximebf/debugbar",
|
||||
"version": "1.13.1",
|
||||
"version": "v1.14.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/maximebf/php-debugbar.git",
|
||||
"reference": "afee79a236348e39a44cb837106b7c5b4897ac2a"
|
||||
"reference": "e23a98f2d65607d8aa6c7b409a513f8fdf4acdde"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/afee79a236348e39a44cb837106b7c5b4897ac2a",
|
||||
"reference": "afee79a236348e39a44cb837106b7c5b4897ac2a",
|
||||
"url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/e23a98f2d65607d8aa6c7b409a513f8fdf4acdde",
|
||||
"reference": "e23a98f2d65607d8aa6c7b409a513f8fdf4acdde",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -669,7 +728,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.13-dev"
|
||||
"dev-master": "1.14-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -698,7 +757,7 @@
|
||||
"debug",
|
||||
"debugbar"
|
||||
],
|
||||
"time": "2017-01-05T08:46:19+00:00"
|
||||
"time": "2017-08-17T07:17:00+00:00"
|
||||
},
|
||||
{
|
||||
"name": "miljar/php-exif",
|
||||
@@ -835,25 +894,29 @@
|
||||
},
|
||||
{
|
||||
"name": "pimple/pimple",
|
||||
"version": "v3.0.2",
|
||||
"version": "v3.2.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/silexphp/Pimple.git",
|
||||
"reference": "a30f7d6e57565a2e1a316e1baf2a483f788b258a"
|
||||
"reference": "4d45fb62d96418396ec58ba76e6f065bca16e10a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/silexphp/Pimple/zipball/a30f7d6e57565a2e1a316e1baf2a483f788b258a",
|
||||
"reference": "a30f7d6e57565a2e1a316e1baf2a483f788b258a",
|
||||
"url": "https://api.github.com/repos/silexphp/Pimple/zipball/4d45fb62d96418396ec58ba76e6f065bca16e10a",
|
||||
"reference": "4d45fb62d96418396ec58ba76e6f065bca16e10a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
"php": ">=5.3.0",
|
||||
"psr/container": "^1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/phpunit-bridge": "^3.2"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.0.x-dev"
|
||||
"dev-master": "3.2.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -877,7 +940,56 @@
|
||||
"container",
|
||||
"dependency injection"
|
||||
],
|
||||
"time": "2015-09-11T15:10:35+00:00"
|
||||
"time": "2017-07-23T07:32:15+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/container",
|
||||
"version": "1.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/container.git",
|
||||
"reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
|
||||
"reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Psr\\Container\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "PHP-FIG",
|
||||
"homepage": "http://www.php-fig.org/"
|
||||
}
|
||||
],
|
||||
"description": "Common Container Interface (PHP FIG PSR-11)",
|
||||
"homepage": "https://github.com/php-fig/container",
|
||||
"keywords": [
|
||||
"PSR-11",
|
||||
"container",
|
||||
"container-interface",
|
||||
"container-interop",
|
||||
"psr"
|
||||
],
|
||||
"time": "2017-02-14T16:28:37+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/log",
|
||||
@@ -928,16 +1040,16 @@
|
||||
},
|
||||
{
|
||||
"name": "rockettheme/toolbox",
|
||||
"version": "1.3.5",
|
||||
"version": "1.3.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/rockettheme/toolbox.git",
|
||||
"reference": "1be0986127007c9691345729607f94ba0e8a5120"
|
||||
"reference": "2f7c83780bbcf527e057f15efe755e10694eb2bc"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/rockettheme/toolbox/zipball/1be0986127007c9691345729607f94ba0e8a5120",
|
||||
"reference": "1be0986127007c9691345729607f94ba0e8a5120",
|
||||
"url": "https://api.github.com/repos/rockettheme/toolbox/zipball/2f7c83780bbcf527e057f15efe755e10694eb2bc",
|
||||
"reference": "2f7c83780bbcf527e057f15efe755e10694eb2bc",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -972,7 +1084,7 @@
|
||||
"php",
|
||||
"rockettheme"
|
||||
],
|
||||
"time": "2017-05-22T13:09:53+00:00"
|
||||
"time": "2017-09-23T13:39:25+00:00"
|
||||
},
|
||||
{
|
||||
"name": "seld/cli-prompt",
|
||||
@@ -1024,16 +1136,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/console",
|
||||
"version": "v2.8.22",
|
||||
"version": "v2.8.27",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/console.git",
|
||||
"reference": "3ef6ef64abecd566d551d9e7f6393ac6e93b2462"
|
||||
"reference": "c0807a2ca978e64d8945d373a9221a5c35d1a253"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/3ef6ef64abecd566d551d9e7f6393ac6e93b2462",
|
||||
"reference": "3ef6ef64abecd566d551d9e7f6393ac6e93b2462",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/c0807a2ca978e64d8945d373a9221a5c35d1a253",
|
||||
"reference": "c0807a2ca978e64d8945d373a9221a5c35d1a253",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1081,7 +1193,7 @@
|
||||
],
|
||||
"description": "Symfony Console Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2017-06-02T14:36:56+00:00"
|
||||
"time": "2017-08-27T14:29:03+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/debug",
|
||||
@@ -1142,7 +1254,7 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/event-dispatcher",
|
||||
"version": "v2.8.22",
|
||||
"version": "v2.8.27",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/event-dispatcher.git",
|
||||
@@ -1202,16 +1314,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-iconv",
|
||||
"version": "v1.4.0",
|
||||
"version": "v1.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-iconv.git",
|
||||
"reference": "ae1347fa81423b67dbc232c8c111facb367ff8b9"
|
||||
"reference": "1ea0e08453819ecc7130e1fb0ee10862c2f33ed0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/ae1347fa81423b67dbc232c8c111facb367ff8b9",
|
||||
"reference": "ae1347fa81423b67dbc232c8c111facb367ff8b9",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/1ea0e08453819ecc7130e1fb0ee10862c2f33ed0",
|
||||
"reference": "1ea0e08453819ecc7130e1fb0ee10862c2f33ed0",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1223,7 +1335,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.4-dev"
|
||||
"dev-master": "1.5-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -1257,20 +1369,20 @@
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"time": "2017-06-09T08:25:21+00:00"
|
||||
"time": "2017-06-14T15:44:48+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-mbstring",
|
||||
"version": "v1.4.0",
|
||||
"version": "v1.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
||||
"reference": "f29dca382a6485c3cbe6379f0c61230167681937"
|
||||
"reference": "7c8fae0ac1d216eb54349e6a8baa57d515fe8803"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/f29dca382a6485c3cbe6379f0c61230167681937",
|
||||
"reference": "f29dca382a6485c3cbe6379f0c61230167681937",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7c8fae0ac1d216eb54349e6a8baa57d515fe8803",
|
||||
"reference": "7c8fae0ac1d216eb54349e6a8baa57d515fe8803",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1282,7 +1394,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.4-dev"
|
||||
"dev-master": "1.5-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -1316,20 +1428,20 @@
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"time": "2017-06-09T14:24:12+00:00"
|
||||
"time": "2017-06-14T15:44:48+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/var-dumper",
|
||||
"version": "v2.8.22",
|
||||
"version": "v2.8.27",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/var-dumper.git",
|
||||
"reference": "8108f6200e8a1cf999df2691431a2d71e6db1152"
|
||||
"reference": "83ebf3e92c0b2231fa63b8e584a2a3d3cd9876ef"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/8108f6200e8a1cf999df2691431a2d71e6db1152",
|
||||
"reference": "8108f6200e8a1cf999df2691431a2d71e6db1152",
|
||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/83ebf3e92c0b2231fa63b8e584a2a3d3cd9876ef",
|
||||
"reference": "83ebf3e92c0b2231fa63b8e584a2a3d3cd9876ef",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1384,11 +1496,11 @@
|
||||
"debug",
|
||||
"dump"
|
||||
],
|
||||
"time": "2017-06-02T08:28:06+00:00"
|
||||
"time": "2017-08-27T14:29:03+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/yaml",
|
||||
"version": "v2.8.22",
|
||||
"version": "v2.8.27",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/yaml.git",
|
||||
@@ -1437,16 +1549,16 @@
|
||||
},
|
||||
{
|
||||
"name": "twig/twig",
|
||||
"version": "v1.34.3",
|
||||
"version": "v1.35.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/twigphp/Twig.git",
|
||||
"reference": "451c6f4197e113e24c1c85bc3fc8c2d77adeff2e"
|
||||
"reference": "daa657073e55b0a78cce8fdd22682fddecc6385f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/twigphp/Twig/zipball/451c6f4197e113e24c1c85bc3fc8c2d77adeff2e",
|
||||
"reference": "451c6f4197e113e24c1c85bc3fc8c2d77adeff2e",
|
||||
"url": "https://api.github.com/repos/twigphp/Twig/zipball/daa657073e55b0a78cce8fdd22682fddecc6385f",
|
||||
"reference": "daa657073e55b0a78cce8fdd22682fddecc6385f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1460,7 +1572,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.34-dev"
|
||||
"dev-master": "1.35-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -1498,7 +1610,7 @@
|
||||
"keywords": [
|
||||
"templating"
|
||||
],
|
||||
"time": "2017-06-07T18:45:17+00:00"
|
||||
"time": "2017-09-27T18:06:46+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [
|
||||
@@ -1563,23 +1675,23 @@
|
||||
},
|
||||
{
|
||||
"name": "codeception/codeception",
|
||||
"version": "2.3.3",
|
||||
"version": "2.3.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Codeception/Codeception.git",
|
||||
"reference": "67cd520b4f20cdfc3a52d1a0022924125822a8e6"
|
||||
"reference": "e807cd458eb9f7ae7464f33ad835a2f54aa73194"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Codeception/Codeception/zipball/67cd520b4f20cdfc3a52d1a0022924125822a8e6",
|
||||
"reference": "67cd520b4f20cdfc3a52d1a0022924125822a8e6",
|
||||
"url": "https://api.github.com/repos/Codeception/Codeception/zipball/e807cd458eb9f7ae7464f33ad835a2f54aa73194",
|
||||
"reference": "e807cd458eb9f7ae7464f33ad835a2f54aa73194",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"behat/gherkin": "~4.4.0",
|
||||
"ext-json": "*",
|
||||
"ext-mbstring": "*",
|
||||
"facebook/webdriver": ">=1.0.1 <2.0",
|
||||
"facebook/webdriver": ">=1.1.3 <2.0",
|
||||
"guzzlehttp/guzzle": ">=4.1.4 <7.0",
|
||||
"guzzlehttp/psr7": "~1.0",
|
||||
"php": ">=5.4.0 <8.0",
|
||||
@@ -1609,6 +1721,7 @@
|
||||
"php-amqplib/php-amqplib": "~2.4",
|
||||
"predis/predis": "^1.0",
|
||||
"squizlabs/php_codesniffer": "~2.0",
|
||||
"symfony/process": ">=2.7 <4.0",
|
||||
"vlucas/phpdotenv": "^2.4.0"
|
||||
},
|
||||
"suggest": {
|
||||
@@ -1653,7 +1766,7 @@
|
||||
"functional testing",
|
||||
"unit testing"
|
||||
],
|
||||
"time": "2017-06-02T00:22:30+00:00"
|
||||
"time": "2017-08-10T20:28:02+00:00"
|
||||
},
|
||||
{
|
||||
"name": "doctrine/instantiator",
|
||||
@@ -1763,29 +1876,31 @@
|
||||
},
|
||||
{
|
||||
"name": "fzaninotto/faker",
|
||||
"version": "v1.6.0",
|
||||
"version": "v1.7.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/fzaninotto/Faker.git",
|
||||
"reference": "44f9a286a04b80c76a4e5fb7aad8bb539b920123"
|
||||
"reference": "d3ed4cc37051c1ca52d22d76b437d14809fc7e0d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/fzaninotto/Faker/zipball/44f9a286a04b80c76a4e5fb7aad8bb539b920123",
|
||||
"reference": "44f9a286a04b80c76a4e5fb7aad8bb539b920123",
|
||||
"url": "https://api.github.com/repos/fzaninotto/Faker/zipball/d3ed4cc37051c1ca52d22d76b437d14809fc7e0d",
|
||||
"reference": "d3ed4cc37051c1ca52d22d76b437d14809fc7e0d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.3.3|^7.0"
|
||||
"php": "^5.3.3 || ^7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-intl": "*",
|
||||
"phpunit/phpunit": "~4.0",
|
||||
"squizlabs/php_codesniffer": "~1.5"
|
||||
"phpunit/phpunit": "^4.0 || ^5.0",
|
||||
"squizlabs/php_codesniffer": "^1.5"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": []
|
||||
"branch-alias": {
|
||||
"dev-master": "1.8-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
@@ -1807,7 +1922,7 @@
|
||||
"faker",
|
||||
"fixtures"
|
||||
],
|
||||
"time": "2016-04-29T12:21:54+00:00"
|
||||
"time": "2017-08-15T16:48:10+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/guzzle",
|
||||
@@ -1992,16 +2107,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpdocumentor/reflection-common",
|
||||
"version": "1.0",
|
||||
"version": "1.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpDocumentor/ReflectionCommon.git",
|
||||
"reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c"
|
||||
"reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c",
|
||||
"reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
|
||||
"reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2042,26 +2157,26 @@
|
||||
"reflection",
|
||||
"static analysis"
|
||||
],
|
||||
"time": "2015-12-27T11:43:31+00:00"
|
||||
"time": "2017-09-11T18:02:19+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpdocumentor/reflection-docblock",
|
||||
"version": "3.1.1",
|
||||
"version": "3.2.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
|
||||
"reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e"
|
||||
"reference": "4aada1f93c72c35e22fb1383b47fee43b8f1d157"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e",
|
||||
"reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/4aada1f93c72c35e22fb1383b47fee43b8f1d157",
|
||||
"reference": "4aada1f93c72c35e22fb1383b47fee43b8f1d157",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.5",
|
||||
"phpdocumentor/reflection-common": "^1.0@dev",
|
||||
"phpdocumentor/type-resolver": "^0.2.0",
|
||||
"phpdocumentor/type-resolver": "^0.3.0",
|
||||
"webmozart/assert": "^1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
@@ -2087,24 +2202,24 @@
|
||||
}
|
||||
],
|
||||
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
|
||||
"time": "2016-09-30T07:12:33+00:00"
|
||||
"time": "2017-08-08T06:39:58+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpdocumentor/type-resolver",
|
||||
"version": "0.2.1",
|
||||
"version": "0.3.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpDocumentor/TypeResolver.git",
|
||||
"reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb"
|
||||
"reference": "fb3933512008d8162b3cdf9e18dba9309b7c3773"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb",
|
||||
"reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/fb3933512008d8162b3cdf9e18dba9309b7c3773",
|
||||
"reference": "fb3933512008d8162b3cdf9e18dba9309b7c3773",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.5",
|
||||
"php": "^5.5 || ^7.0",
|
||||
"phpdocumentor/reflection-common": "^1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
@@ -2134,26 +2249,26 @@
|
||||
"email": "me@mikevanriel.com"
|
||||
}
|
||||
],
|
||||
"time": "2016-11-25T06:54:22+00:00"
|
||||
"time": "2017-06-03T08:32:36+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpspec/prophecy",
|
||||
"version": "v1.7.0",
|
||||
"version": "v1.7.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpspec/prophecy.git",
|
||||
"reference": "93d39f1f7f9326d746203c7c056f300f7f126073"
|
||||
"reference": "c9b8c6088acd19d769d4cc0ffa60a9fe34344bd6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/93d39f1f7f9326d746203c7c056f300f7f126073",
|
||||
"reference": "93d39f1f7f9326d746203c7c056f300f7f126073",
|
||||
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/c9b8c6088acd19d769d4cc0ffa60a9fe34344bd6",
|
||||
"reference": "c9b8c6088acd19d769d4cc0ffa60a9fe34344bd6",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"doctrine/instantiator": "^1.0.2",
|
||||
"php": "^5.3|^7.0",
|
||||
"phpdocumentor/reflection-docblock": "^2.0|^3.0.2",
|
||||
"phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0",
|
||||
"sebastian/comparator": "^1.1|^2.0",
|
||||
"sebastian/recursion-context": "^1.0|^2.0|^3.0"
|
||||
},
|
||||
@@ -2164,7 +2279,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.6.x-dev"
|
||||
"dev-master": "1.7.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -2197,7 +2312,7 @@
|
||||
"spy",
|
||||
"stub"
|
||||
],
|
||||
"time": "2017-03-02T20:05:34+00:00"
|
||||
"time": "2017-09-04T11:05:03+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-code-coverage",
|
||||
@@ -3044,20 +3159,20 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/browser-kit",
|
||||
"version": "v3.3.2",
|
||||
"version": "v3.3.9",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/browser-kit.git",
|
||||
"reference": "c2c8ceb1aa9dab9eae54e9150e6a588ce3e53be1"
|
||||
"reference": "aee7120b058c268363e606ff5fe8271da849a1b5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/browser-kit/zipball/c2c8ceb1aa9dab9eae54e9150e6a588ce3e53be1",
|
||||
"reference": "c2c8ceb1aa9dab9eae54e9150e6a588ce3e53be1",
|
||||
"url": "https://api.github.com/repos/symfony/browser-kit/zipball/aee7120b058c268363e606ff5fe8271da849a1b5",
|
||||
"reference": "aee7120b058c268363e606ff5fe8271da849a1b5",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.5.9",
|
||||
"php": "^5.5.9|>=7.0.8",
|
||||
"symfony/dom-crawler": "~2.8|~3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
@@ -3097,24 +3212,24 @@
|
||||
],
|
||||
"description": "Symfony BrowserKit Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2017-04-12T14:14:56+00:00"
|
||||
"time": "2017-07-29T21:54:42+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/css-selector",
|
||||
"version": "v3.3.2",
|
||||
"version": "v3.3.9",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/css-selector.git",
|
||||
"reference": "4d882dced7b995d5274293039370148e291808f2"
|
||||
"reference": "c5f5263ed231f164c58368efbce959137c7d9488"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/css-selector/zipball/4d882dced7b995d5274293039370148e291808f2",
|
||||
"reference": "4d882dced7b995d5274293039370148e291808f2",
|
||||
"url": "https://api.github.com/repos/symfony/css-selector/zipball/c5f5263ed231f164c58368efbce959137c7d9488",
|
||||
"reference": "c5f5263ed231f164c58368efbce959137c7d9488",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.5.9"
|
||||
"php": "^5.5.9|>=7.0.8"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
@@ -3150,24 +3265,24 @@
|
||||
],
|
||||
"description": "Symfony CssSelector Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2017-05-01T15:01:29+00:00"
|
||||
"time": "2017-07-29T21:54:42+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/dom-crawler",
|
||||
"version": "v3.3.2",
|
||||
"version": "v3.3.9",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/dom-crawler.git",
|
||||
"reference": "fc2c588ce376e9fe04a7b8c79e3ec62fe32d95b1"
|
||||
"reference": "6b511d7329b203a620f09a2288818d27dcc915ae"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/fc2c588ce376e9fe04a7b8c79e3ec62fe32d95b1",
|
||||
"reference": "fc2c588ce376e9fe04a7b8c79e3ec62fe32d95b1",
|
||||
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/6b511d7329b203a620f09a2288818d27dcc915ae",
|
||||
"reference": "6b511d7329b203a620f09a2288818d27dcc915ae",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.5.9",
|
||||
"php": "^5.5.9|>=7.0.8",
|
||||
"symfony/polyfill-mbstring": "~1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
@@ -3206,24 +3321,24 @@
|
||||
],
|
||||
"description": "Symfony DomCrawler Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2017-05-25T23:10:31+00:00"
|
||||
"time": "2017-09-11T15:55:22+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/finder",
|
||||
"version": "v3.3.2",
|
||||
"version": "v3.3.9",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/finder.git",
|
||||
"reference": "baea7f66d30854ad32988c11a09d7ffd485810c4"
|
||||
"reference": "b2260dbc80f3c4198f903215f91a1ac7fe9fe09e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/finder/zipball/baea7f66d30854ad32988c11a09d7ffd485810c4",
|
||||
"reference": "baea7f66d30854ad32988c11a09d7ffd485810c4",
|
||||
"url": "https://api.github.com/repos/symfony/finder/zipball/b2260dbc80f3c4198f903215f91a1ac7fe9fe09e",
|
||||
"reference": "b2260dbc80f3c4198f903215f91a1ac7fe9fe09e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.5.9"
|
||||
"php": "^5.5.9|>=7.0.8"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
@@ -3255,24 +3370,24 @@
|
||||
],
|
||||
"description": "Symfony Finder Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2017-06-01T21:01:25+00:00"
|
||||
"time": "2017-07-29T21:54:42+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/process",
|
||||
"version": "v3.3.2",
|
||||
"version": "v3.3.9",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/process.git",
|
||||
"reference": "8e30690c67aafb6c7992d6d8eb0d707807dd3eaf"
|
||||
"reference": "b7666e9b438027a1ea0e1ee813ec5042d5d7f6f0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/process/zipball/8e30690c67aafb6c7992d6d8eb0d707807dd3eaf",
|
||||
"reference": "8e30690c67aafb6c7992d6d8eb0d707807dd3eaf",
|
||||
"url": "https://api.github.com/repos/symfony/process/zipball/b7666e9b438027a1ea0e1ee813ec5042d5d7f6f0",
|
||||
"reference": "b7666e9b438027a1ea0e1ee813ec5042d5d7f6f0",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.5.9"
|
||||
"php": "^5.5.9|>=7.0.8"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
@@ -3304,7 +3419,53 @@
|
||||
],
|
||||
"description": "Symfony Process Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2017-05-22T12:32:03+00:00"
|
||||
"time": "2017-07-29T21:54:42+00:00"
|
||||
},
|
||||
{
|
||||
"name": "victorjonsson/markdowndocs",
|
||||
"version": "dev-master",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/trilbymedia/PHP-Markdown-Documentation-Generator.git",
|
||||
"reference": "c9fa153b28a79f5da89ec32aa501be92db212aed"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/trilbymedia/PHP-Markdown-Documentation-Generator/zipball/c9fa153b28a79f5da89ec32aa501be92db212aed",
|
||||
"reference": "c9fa153b28a79f5da89ec32aa501be92db212aed",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.5.0",
|
||||
"symfony/console": ">=2.6"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "3.7.23"
|
||||
},
|
||||
"bin": [
|
||||
"bin/phpdoc-md"
|
||||
],
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"PHPDocsMD": "src/"
|
||||
}
|
||||
},
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Victor Jonsson",
|
||||
"email": "kontakt@victorjonsson.se"
|
||||
}
|
||||
],
|
||||
"description": "Command line tool for generating markdown-formatted class documentation",
|
||||
"homepage": "https://github.com/victorjonsson/PHP-Markdown-Documentation-Generator",
|
||||
"support": {
|
||||
"source": "https://github.com/trilbymedia/PHP-Markdown-Documentation-Generator/tree/master"
|
||||
},
|
||||
"time": "2017-09-20T13:29:22+00:00"
|
||||
},
|
||||
{
|
||||
"name": "webmozart/assert",
|
||||
@@ -3359,7 +3520,9 @@
|
||||
],
|
||||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": [],
|
||||
"stability-flags": {
|
||||
"victorjonsson/markdowndocs": 20
|
||||
},
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": {
|
||||
|
||||
@@ -22,15 +22,15 @@ form:
|
||||
help: PLUGIN_ADMIN.HOME_PAGE_HELP
|
||||
|
||||
home.hide_in_urls:
|
||||
type: toggle
|
||||
label: PLUGIN_ADMIN.HIDE_HOME_IN_URLS
|
||||
help: PLUGIN_ADMIN.HIDE_HOME_IN_URLS_HELP
|
||||
highlight: 0
|
||||
options:
|
||||
1: PLUGIN_ADMIN.YES
|
||||
0: PLUGIN_ADMIN.NO
|
||||
validate:
|
||||
type: bool
|
||||
type: toggle
|
||||
label: PLUGIN_ADMIN.HIDE_HOME_IN_URLS
|
||||
help: PLUGIN_ADMIN.HIDE_HOME_IN_URLS_HELP
|
||||
highlight: 0
|
||||
options:
|
||||
1: PLUGIN_ADMIN.YES
|
||||
0: PLUGIN_ADMIN.NO
|
||||
validate:
|
||||
type: bool
|
||||
|
||||
|
||||
pages.theme:
|
||||
@@ -377,6 +377,12 @@ form:
|
||||
validate:
|
||||
type: number
|
||||
min: 1
|
||||
pages.cache_control:
|
||||
type: text
|
||||
size: medium
|
||||
label: PLUGIN_ADMIN.CACHE_CONTROL
|
||||
help: PLUGIN_ADMIN.CACHE_CONTROL_HELP
|
||||
placeholder: 'e.g. public, max-age=31536000'
|
||||
pages.last_modified:
|
||||
type: toggle
|
||||
label: PLUGIN_ADMIN.LAST_MODIFIED
|
||||
@@ -508,6 +514,17 @@ form:
|
||||
help: PLUGIN_ADMIN.CACHE_PREFIX_HELP
|
||||
placeholder: PLUGIN_ADMIN.CACHE_PREFIX_PLACEHOLDER
|
||||
|
||||
cache.clear_images_by_default:
|
||||
type: toggle
|
||||
label: PLUGIN_ADMIN.CLEAR_IMAGES_BY_DEFAULT
|
||||
help: PLUGIN_ADMIN.CLEAR_IMAGES_BY_DEFAULT_HELP
|
||||
highlight: 1
|
||||
options:
|
||||
1: PLUGIN_ADMIN.YES
|
||||
0: PLUGIN_ADMIN.NO
|
||||
validate:
|
||||
type: bool
|
||||
|
||||
cache.cli_compatibility:
|
||||
type: toggle
|
||||
label: PLUGIN_ADMIN.CLI_COMPATIBILITY
|
||||
@@ -599,6 +616,12 @@ form:
|
||||
help: PLUGIN_ADMIN.REDIS_PORT_HELP
|
||||
placeholder: "6379"
|
||||
|
||||
cache.redis.password:
|
||||
type: text
|
||||
size: small
|
||||
label: PLUGIN_ADMIN.REDIS_PASSWORD
|
||||
|
||||
|
||||
|
||||
twig:
|
||||
type: section
|
||||
@@ -789,10 +812,12 @@ form:
|
||||
type: bool
|
||||
|
||||
assets.collections:
|
||||
type: array
|
||||
type: multilevel
|
||||
label: PLUGIN_ADMIN.COLLECTIONS
|
||||
placeholder_key: collection_name
|
||||
placeholder_value: collection_path
|
||||
validate:
|
||||
type: array
|
||||
|
||||
errors:
|
||||
type: section
|
||||
@@ -986,7 +1011,7 @@ form:
|
||||
help: PLUGIN_ADMIN.TIMEOUT_HELP
|
||||
validate:
|
||||
type: number
|
||||
min: 1
|
||||
min: 0
|
||||
|
||||
session.name:
|
||||
type: text
|
||||
@@ -1138,6 +1163,17 @@ form:
|
||||
validate:
|
||||
type: bool
|
||||
|
||||
case_insensitive_urls:
|
||||
type: toggle
|
||||
label: PLUGIN_ADMIN.CASE_INSENSITIVE_URLS
|
||||
highlight: 0
|
||||
help: PLUGIN_ADMIN.CASE_INSENSITIVE_URLS_HELP
|
||||
options:
|
||||
1: PLUGIN_ADMIN.YES
|
||||
0: PLUGIN_ADMIN.NO
|
||||
validate:
|
||||
type: bool
|
||||
|
||||
param_sep:
|
||||
type: select
|
||||
size: medium
|
||||
|
||||
@@ -66,6 +66,37 @@ form:
|
||||
default: 'en'
|
||||
help: PLUGIN_ADMIN.LANGUAGE_HELP
|
||||
|
||||
twofa_check:
|
||||
type: conditional
|
||||
condition: config.plugins.admin.twofa_enabled
|
||||
|
||||
fields:
|
||||
|
||||
twofa:
|
||||
title: PLUGIN_ADMIN.2FA_TITLE
|
||||
type: section
|
||||
underline: true
|
||||
|
||||
twofa_enabled:
|
||||
type: toggle
|
||||
label: PLUGIN_ADMIN.2FA_ENABLED
|
||||
classes: twofa-toggle
|
||||
highlight: 1
|
||||
default: 0
|
||||
options:
|
||||
1: PLUGIN_ADMIN.YES
|
||||
0: PLUGIN_ADMIN.NO
|
||||
validate:
|
||||
type: bool
|
||||
|
||||
|
||||
twofa_secret:
|
||||
type: 2fa_secret
|
||||
outerclasses: 'twofa-secret'
|
||||
label: PLUGIN_ADMIN.2FA_SECRET
|
||||
sublabel: PLUGIN_ADMIN.2FA_SECRET_HELP
|
||||
|
||||
|
||||
security:
|
||||
title: PLUGIN_ADMIN.ACCESS_LEVELS
|
||||
type: section
|
||||
|
||||
@@ -53,12 +53,13 @@ pages:
|
||||
types: [txt,xml,html,htm,json,rss,atom] # list of valid page types
|
||||
append_url_extension: '' # Append page's extension in Page urls (e.g. '.html' results in /path/page.html)
|
||||
expires: 604800 # Page expires time in seconds (604800 seconds = 7 days)
|
||||
cache_control: # Can be blank for no setting, or a valid `cache-control` text value
|
||||
last_modified: false # Set the last modified date header based on file modification timestamp
|
||||
etag: false # Set the etag header tag
|
||||
vary_accept_encoding: false # Add `Vary: Accept-Encoding` header
|
||||
redirect_default_route: false # Automatically redirect to a page's default route
|
||||
redirect_default_code: 301 # Default code to use for redirects
|
||||
redirect_trailing_slash: true # Handle automatically or 301 redirect a trailing / URL
|
||||
redirect_default_code: 302 # Default code to use for redirects
|
||||
redirect_trailing_slash: true # Handle automatically or 302 redirect a trailing / URL
|
||||
ignore_files: [.DS_Store] # Files to ignore in Pages
|
||||
ignore_folders: [.git, .idea] # Folders to ignore in Pages
|
||||
ignore_hidden: true # Ignore all Hidden files and folders
|
||||
@@ -73,6 +74,7 @@ cache:
|
||||
method: file # Method to check for updates in pages: file|folder|hash|none
|
||||
driver: auto # One of: auto|file|apc|xcache|memcache|wincache
|
||||
prefix: 'g' # Cache prefix string (prevents cache conflicts)
|
||||
clear_images_by_default: true # By default grav will include processed images in cache clear, this can be disabled
|
||||
cli_compatibility: false # Ensures only non-volatile drivers are used (file, redis, memcache, etc.)
|
||||
lifetime: 604800 # Lifetime of cached data in seconds (0 = infinite)
|
||||
gzip: false # GZip compress the page output
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
// Some standard defines
|
||||
define('GRAV', true);
|
||||
define('GRAV_VERSION', '1.3.0');
|
||||
define('GRAV_VERSION', '1.3.4');
|
||||
//define('GRAV_TESTING', true);
|
||||
define('DS', '/');
|
||||
|
||||
|
||||
BIN
system/images/media/thumb-json.png
Normal file
BIN
system/images/media/thumb-json.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.6 KiB |
@@ -184,7 +184,7 @@ class Assets
|
||||
|
||||
// Set timestamp
|
||||
if (isset($config['enable_asset_timestamp']) && $config['enable_asset_timestamp'] === true) {
|
||||
$this->timestamp = '?' . Grav::instance()['cache']->getKey();
|
||||
$this->timestamp = Grav::instance()['cache']->getKey();
|
||||
}
|
||||
|
||||
return $this;
|
||||
@@ -285,9 +285,20 @@ class Assets
|
||||
return $this;
|
||||
}
|
||||
|
||||
$query = [];
|
||||
|
||||
$modified = false;
|
||||
$remote = $this->isRemoteLink($asset);
|
||||
if (!$remote) {
|
||||
|
||||
$asset_parts = parse_url($asset);
|
||||
if (isset($asset_parts['query'])) {
|
||||
$query[] = $asset_parts['query'];
|
||||
unset($asset_parts['query']);
|
||||
$asset = Uri::buildUrl($asset_parts);
|
||||
}
|
||||
|
||||
|
||||
$modified = $this->getLastModificationTime($asset);
|
||||
$asset = $this->buildLocalLink($asset);
|
||||
}
|
||||
@@ -305,7 +316,8 @@ class Assets
|
||||
'pipeline' => (bool) $pipeline,
|
||||
'loading' => $loading ?: '',
|
||||
'group' => $group ?: 'head',
|
||||
'modified' => $modified
|
||||
'modified' => $modified,
|
||||
'query' => implode('&', $query),
|
||||
];
|
||||
|
||||
// check for dynamic array and merge with defaults
|
||||
@@ -508,24 +520,9 @@ class Assets
|
||||
|
||||
// Sort array by priorities (larger priority first)
|
||||
if (Grav::instance()) {
|
||||
uasort($this->css, function ($a, $b) {
|
||||
if ($a['priority'] == $b['priority']) {
|
||||
return $b['order'] - $a['order'];
|
||||
}
|
||||
|
||||
return $a['priority'] - $b['priority'];
|
||||
});
|
||||
|
||||
uasort($this->inline_css, function ($a, $b) {
|
||||
if ($a['priority'] == $b['priority']) {
|
||||
return $b['order'] - $a['order'];
|
||||
}
|
||||
|
||||
return $a['priority'] - $b['priority'];
|
||||
});
|
||||
uasort($this->css, array($this, 'sortAssetsByPriorityThenOrder'));
|
||||
uasort($this->inline_css, array($this, 'sortAssetsByPriorityThenOrder'));
|
||||
}
|
||||
$this->css = array_reverse($this->css);
|
||||
$this->inline_css = array_reverse($this->inline_css);
|
||||
|
||||
$inlineGroup = array_key_exists('loading', $attributes) && $attributes['loading'] === 'inline';
|
||||
|
||||
@@ -553,7 +550,7 @@ class Assets
|
||||
}
|
||||
else {
|
||||
$media = isset($file['media']) ? sprintf(' media="%s"', $file['media']) : '';
|
||||
$output .= '<link href="' . $file['asset'] . $this->getTimestamp($file) . '"' . $attributes . $media . ' />' . "\n";
|
||||
$output .= '<link href="' . $file['asset'] . $this->getQuerystring($file) . '"' . $attributes . $media . ' />' . "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -573,7 +570,7 @@ class Assets
|
||||
}
|
||||
else {
|
||||
$media = isset($file['media']) ? sprintf(' media="%s"', $file['media']) : '';
|
||||
$output .= '<link href="' . $file['asset'] . $this->getTimestamp($file) . '"' . $attributes . $media . ' />' . "\n";
|
||||
$output .= '<link href="' . $file['asset'] . $this->getQuerystring($file) . '"' . $attributes . $media . ' />' . "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -609,24 +606,8 @@ class Assets
|
||||
}
|
||||
|
||||
// Sort array by priorities (larger priority first)
|
||||
uasort($this->js, function ($a, $b) {
|
||||
if ($a['priority'] == $b['priority']) {
|
||||
return $b['order'] - $a['order'];
|
||||
}
|
||||
|
||||
return $a['priority'] - $b['priority'];
|
||||
});
|
||||
|
||||
uasort($this->inline_js, function ($a, $b) {
|
||||
if ($a['priority'] == $b['priority']) {
|
||||
return $b['order'] - $a['order'];
|
||||
}
|
||||
|
||||
return $a['priority'] - $b['priority'];
|
||||
});
|
||||
|
||||
$this->js = array_reverse($this->js);
|
||||
$this->inline_js = array_reverse($this->inline_js);
|
||||
uasort($this->js, array($this, 'sortAssetsByPriorityThenOrder'));
|
||||
uasort($this->inline_js, array($this, 'sortAssetsByPriorityThenOrder'));
|
||||
|
||||
$inlineGroup = array_key_exists('loading', $attributes) && $attributes['loading'] === 'inline';
|
||||
|
||||
@@ -653,7 +634,7 @@ class Assets
|
||||
$inline_js .= $this->gatherLinks([$file], JS_ASSET) . "\n";
|
||||
}
|
||||
else {
|
||||
$output .= '<script src="' . $file['asset'] . $this->getTimestamp($file) . '"' . $attributes . ' ' . $file['loading'] . '></script>' . "\n";
|
||||
$output .= '<script src="' . $file['asset'] . $this->getQuerystring($file) . '"' . $attributes . ' ' . $file['loading'] . '></script>' . "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -672,7 +653,7 @@ class Assets
|
||||
$inline_js .= $this->gatherLinks([$file], JS_ASSET) . "\n";
|
||||
}
|
||||
else {
|
||||
$output .= '<script src="' . $file['asset'] . $this->getTimestamp($file) . '"' . $attributes . ' ' . $file['loading'] . '></script>' . "\n";
|
||||
$output .= '<script src="' . $file['asset'] . $this->getQuerystring($file) . '"' . $attributes . ' ' . $file['loading'] . '></script>' . "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1384,22 +1365,50 @@ class Assets
|
||||
*/
|
||||
public function setTimestamp($value)
|
||||
{
|
||||
$this->timestamp = '?' . $value;
|
||||
$this->timestamp = $value;
|
||||
}
|
||||
|
||||
public function getTimestamp($asset = null)
|
||||
/**
|
||||
* Get the timestamp for assets
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTimestamp($include_join = true)
|
||||
{
|
||||
if (is_array($asset)) {
|
||||
if ($asset['remote'] === false) {
|
||||
if (Utils::contains($asset['asset'], '?')) {
|
||||
return str_replace('?', '&', $this->timestamp);
|
||||
} else {
|
||||
return $this->timestamp;
|
||||
}
|
||||
}
|
||||
} elseif (empty($asset)) {
|
||||
return $this->timestamp;
|
||||
if ($this->timestamp) {
|
||||
$timestamp = $include_join ? '?' . $this->timestamp : $this->timestamp;
|
||||
return $timestamp;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param $asset
|
||||
* @return string
|
||||
*/
|
||||
public function getQuerystring($asset)
|
||||
{
|
||||
$querystring = '';
|
||||
|
||||
if (!empty($asset['query'])) {
|
||||
if (Utils::contains($asset['asset'], '?')) {
|
||||
$querystring .= '&' . $asset['query'];
|
||||
} else {
|
||||
$querystring .= '?' . $asset['query'];
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->timestamp) {
|
||||
if (Utils::contains($asset['asset'], '?') || $querystring) {
|
||||
$querystring .= '&' . $this->timestamp;
|
||||
} else {
|
||||
$querystring .= '?' . $this->timestamp;
|
||||
}
|
||||
}
|
||||
|
||||
return $querystring;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1416,9 +1425,13 @@ class Assets
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
protected function priorityCompare($a, $b)
|
||||
protected function sortAssetsByPriorityThenOrder($a, $b)
|
||||
{
|
||||
return $a ['priority'] - $b ['priority'];
|
||||
if ($a['priority'] == $b['priority']) {
|
||||
return $a['order'] - $b['order'];
|
||||
}
|
||||
|
||||
return $b['priority'] - $a['priority'];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -63,6 +63,14 @@ class Cache extends Getters
|
||||
'asset://',
|
||||
];
|
||||
|
||||
protected static $standard_remove_no_images = [
|
||||
'cache://twig/',
|
||||
'cache://doctrine/',
|
||||
'cache://compiled/',
|
||||
'cache://validated-',
|
||||
'asset://',
|
||||
];
|
||||
|
||||
protected static $all_remove = [
|
||||
'cache://',
|
||||
'cache://images',
|
||||
@@ -232,6 +240,7 @@ class Cache extends Getters
|
||||
case 'redis':
|
||||
$redis = new \Redis();
|
||||
$socket = $this->config->get('system.cache.redis.socket', false);
|
||||
$password = $this->config->get('system.cache.redis.password', false);
|
||||
|
||||
if ($socket) {
|
||||
$redis->connect($socket);
|
||||
@@ -240,6 +249,11 @@ class Cache extends Getters
|
||||
$this->config->get('system.cache.redis.port', 6379));
|
||||
}
|
||||
|
||||
// Authenticate with password if set
|
||||
if ($password && !$redis->auth($password)) {
|
||||
throw new \RedisException('Redis authentication failed');
|
||||
}
|
||||
|
||||
$driver = new DoctrineCache\RedisCache();
|
||||
$driver->setRedis($redis);
|
||||
break;
|
||||
@@ -360,7 +374,12 @@ class Cache extends Getters
|
||||
$remove_paths = self::$tmp_remove;
|
||||
break;
|
||||
default:
|
||||
$remove_paths = self::$standard_remove;
|
||||
if (Grav::instance()['config']->get('system.cache.clear_images_by_default')) {
|
||||
$remove_paths = self::$standard_remove;
|
||||
} else {
|
||||
$remove_paths = self::$standard_remove_no_images;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Clearing cache event to add paths to clear
|
||||
|
||||
@@ -60,9 +60,9 @@ class CompiledLanguages extends CompiledBase
|
||||
{
|
||||
$file = CompiledYamlFile::instance($filename);
|
||||
if (preg_match('|languages\.yaml$|', $filename)) {
|
||||
$this->object->mergeRecursive((array)$file->content());
|
||||
$this->object->mergeRecursive($file->content());
|
||||
} else {
|
||||
$this->object->join($name, $file->content(), '/');
|
||||
$this->object->mergeRecursive([$name => $file->content()]);
|
||||
}
|
||||
$file->free();
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
namespace Grav\Common\Config;
|
||||
|
||||
use Grav\Common\Data\Data;
|
||||
use Grav\Common\Utils;
|
||||
|
||||
class Languages extends Data
|
||||
{
|
||||
@@ -49,6 +50,6 @@ class Languages extends Data
|
||||
|
||||
public function mergeRecursive(array $data)
|
||||
{
|
||||
$this->items = array_merge_recursive($this->items, $data);
|
||||
$this->items = Utils::arrayMergeRecursiveUnique($this->items, $data);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -251,7 +251,9 @@ class Data implements DataInterface, \ArrayAccess, \Countable, ExportInterface
|
||||
*/
|
||||
public function exists()
|
||||
{
|
||||
return $this->file()->exists();
|
||||
$file = $this->file();
|
||||
|
||||
return $file && $file->exists();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -263,7 +265,9 @@ class Data implements DataInterface, \ArrayAccess, \Countable, ExportInterface
|
||||
*/
|
||||
public function raw()
|
||||
{
|
||||
return $this->file()->raw();
|
||||
$file = $this->file();
|
||||
|
||||
return $file ? $file->raw() : '';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -238,6 +238,12 @@ class Installer
|
||||
return $class_name;
|
||||
}
|
||||
|
||||
$class_name_alphanumeric = preg_replace('/[^a-zA-Z0-9]+/', '', $class_name);
|
||||
|
||||
if (class_exists($class_name_alphanumeric)) {
|
||||
return $class_name_alphanumeric;
|
||||
}
|
||||
|
||||
return $installer;
|
||||
}
|
||||
|
||||
|
||||
@@ -112,6 +112,16 @@ class Response
|
||||
$config = Grav::instance()['config'];
|
||||
$overrides = [];
|
||||
|
||||
// Override CA Bundle
|
||||
$caPathOrFile = \Composer\CaBundle\CaBundle::getSystemCaRootBundlePath();
|
||||
if (is_dir($caPathOrFile) || (is_link($caPathOrFile) && is_dir(readlink($caPathOrFile)))) {
|
||||
$overrides['curl'][CURLOPT_CAPATH] = $caPathOrFile;
|
||||
$overrides['fopen']['ssl']['capath'] = $caPathOrFile;
|
||||
} else {
|
||||
$overrides['curl'][CURLOPT_CAINFO] = $caPathOrFile;
|
||||
$overrides['fopen']['ssl']['cafile'] = $caPathOrFile;
|
||||
}
|
||||
|
||||
// SSL Verify Peer and Proxy Setting
|
||||
$settings = [
|
||||
'method' => $config->get('system.gpm.method', self::$method),
|
||||
|
||||
@@ -174,7 +174,7 @@ class Grav extends Container
|
||||
}
|
||||
|
||||
if ($code === null) {
|
||||
$code = $this['config']->get('system.pages.redirect_default_code', 301);
|
||||
$code = $this['config']->get('system.pages.redirect_default_code', 302);
|
||||
}
|
||||
|
||||
if (isset($this['session'])) {
|
||||
@@ -227,15 +227,24 @@ class Grav extends Container
|
||||
|
||||
header('Content-type: ' . Utils::getMimeByExtension($format, 'text/html'));
|
||||
|
||||
$cache_control = $page->cacheControl();
|
||||
|
||||
// Calculate Expires Headers if set to > 0
|
||||
$expires = $page->expires();
|
||||
|
||||
if ($expires > 0) {
|
||||
$expires_date = gmdate('D, d M Y H:i:s', time() + $expires) . ' GMT';
|
||||
header('Cache-Control: max-age=' . $expires);
|
||||
if (!$cache_control) {
|
||||
header('Cache-Control: max-age=' . $expires);
|
||||
}
|
||||
header('Expires: ' . $expires_date);
|
||||
}
|
||||
|
||||
// Set cache-control header
|
||||
if ($cache_control) {
|
||||
header('Cache-Control: ' . strtolower($cache_control));
|
||||
}
|
||||
|
||||
// Set the last modified time
|
||||
if ($page->lastModified()) {
|
||||
$last_modified_date = gmdate('D, d M Y H:i:s', $page->modified()) . ' GMT';
|
||||
@@ -491,5 +500,7 @@ class Grav extends Container
|
||||
Utils::download($page->path() . DIRECTORY_SEPARATOR . $uri->basename(), $download);
|
||||
}
|
||||
}
|
||||
|
||||
return $page;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,6 +63,20 @@ class Collection extends Iterator
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a page with path and slug
|
||||
*
|
||||
* @param $path
|
||||
* @param $slug
|
||||
* @return $this
|
||||
*/
|
||||
public function add($path, $slug)
|
||||
{
|
||||
$this->items[$path] = ['slug' => $slug];
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Create a copy of this collection
|
||||
@@ -89,6 +103,23 @@ class Collection extends Iterator
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Intersect another collection with the current collection
|
||||
*
|
||||
* @param Collection $collection
|
||||
* @return $this
|
||||
*/
|
||||
public function intersect(Collection $collection)
|
||||
{
|
||||
$array1 = $this->items;
|
||||
$array2 = $collection->toArray();
|
||||
|
||||
$this->items = array_uintersect($array1, $array2, function($val1, $val2) {
|
||||
return strcmp($val1['slug'], $val2['slug']);
|
||||
});
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set parameters to the Collection
|
||||
*
|
||||
|
||||
@@ -204,7 +204,7 @@ class Media extends AbstractMedia
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
function path()
|
||||
public function path()
|
||||
{
|
||||
return $this->path;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ class ImageMedium extends Medium
|
||||
'resize', 'forceResize', 'cropResize', 'crop', 'zoomCrop',
|
||||
'negate', 'brightness', 'contrast', 'grayscale', 'emboss',
|
||||
'smooth', 'sharp', 'edge', 'colorize', 'sepia', 'enableProgressive',
|
||||
'rotate', 'flip', 'fixOrientation'
|
||||
'rotate', 'flip', 'fixOrientation', 'gaussianBlur'
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@@ -367,7 +367,7 @@ class Medium extends Data implements RenderableInterface
|
||||
|
||||
$this->mode = $mode;
|
||||
|
||||
return $mode === 'thumbnail' ? $this->getThumbnail()->reset() : $this->reset();
|
||||
return $mode === 'thumbnail' ? ($this->getThumbnail() ? $this->getThumbnail()->reset() : null) : $this->reset();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -490,7 +490,7 @@ class Medium extends Data implements RenderableInterface
|
||||
{
|
||||
$qs = $method;
|
||||
if (count($args) > 1 || (count($args) == 1 && !empty($args[0]))) {
|
||||
$qs .= '=' . implode(',', array_map(function ($a) { return urlencode($a); }, $args));
|
||||
$qs .= '=' . implode(',', array_map(function ($a) { return rawurlencode($a); }, $args));
|
||||
}
|
||||
|
||||
if (!empty($qs)) {
|
||||
|
||||
@@ -42,6 +42,7 @@ class Page
|
||||
protected $parent;
|
||||
protected $template;
|
||||
protected $expires;
|
||||
protected $cache_control;
|
||||
protected $visible;
|
||||
protected $published;
|
||||
protected $publish_date;
|
||||
@@ -115,7 +116,7 @@ class Page
|
||||
* Initializes the page instance variables based on a file
|
||||
*
|
||||
* @param \SplFileInfo $file The file information for the .md file that the page represents
|
||||
* @param string $extension
|
||||
* @param string $extension
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@@ -330,7 +331,8 @@ class Page
|
||||
$frontmatter_file = $this->path . '/' . $this->folder . '/frontmatter.yaml';
|
||||
if (file_exists($frontmatter_file)) {
|
||||
$frontmatter_data = (array)Yaml::parse(file_get_contents($frontmatter_file));
|
||||
$this->header = (object)array_replace_recursive($frontmatter_data, (array)$this->header);
|
||||
$this->header = (object)array_replace_recursive($frontmatter_data,
|
||||
(array)$this->header);
|
||||
}
|
||||
// Process frontmatter with Twig if enabled
|
||||
if (Grav::instance()['config']->get('system.pages.frontmatter.process_twig') === true) {
|
||||
@@ -429,6 +431,9 @@ class Page
|
||||
if (isset($this->header->expires)) {
|
||||
$this->expires = intval($this->header->expires);
|
||||
}
|
||||
if (isset($this->header->cache_control)) {
|
||||
$this->cache_control = $this->header->cache_control;
|
||||
}
|
||||
if (isset($this->header->etag)) {
|
||||
$this->etag = (bool)$this->header->etag;
|
||||
}
|
||||
@@ -481,9 +486,11 @@ class Page
|
||||
*
|
||||
* @param int $size Max summary size.
|
||||
*
|
||||
* @param boolean $textOnly Only count text size.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function summary($size = null)
|
||||
public function summary($size = null, $textOnly = false)
|
||||
{
|
||||
$config = (array)Grav::instance()['config']->get('site.summary');
|
||||
if (isset($this->header->summary)) {
|
||||
@@ -497,11 +504,12 @@ class Page
|
||||
|
||||
// Set up variables to process summary from page or from custom summary
|
||||
if ($this->summary === null) {
|
||||
$content = $this->content();
|
||||
$content = $textOnly ? strip_tags($this->content()) : $this->content();
|
||||
$summary_size = $this->summary_size;
|
||||
} else {
|
||||
$content = $this->summary;
|
||||
$summary_size = mb_strlen($this->summary);
|
||||
$content = strip_tags($this->summary);
|
||||
// Use mb_strwidth to deal with the 2 character widths characters
|
||||
$summary_size = mb_strwidth($content, 'utf-8');
|
||||
}
|
||||
|
||||
// Return calculated summary based on summary divider's position
|
||||
@@ -510,7 +518,12 @@ class Page
|
||||
if (!in_array($format, ['short', 'long'])) {
|
||||
return $content;
|
||||
} elseif (($format === 'short') && isset($summary_size)) {
|
||||
return mb_substr($content, 0, $summary_size);
|
||||
// Use mb_strimwidth to slice the string
|
||||
if (mb_strwidth($content, 'utf8') > $summary_size) {
|
||||
return mb_substr($content, 0, $summary_size);
|
||||
} else {
|
||||
return $content;
|
||||
}
|
||||
}
|
||||
|
||||
// Get summary size from site config's file
|
||||
@@ -526,6 +539,15 @@ class Page
|
||||
$size = 300;
|
||||
}
|
||||
|
||||
// Only return string but not html, wrap whatever html tag you want when using
|
||||
if ($textOnly) {
|
||||
if (mb_strwidth($content, 'utf-8') <= $size) {
|
||||
return $content;
|
||||
}
|
||||
|
||||
return mb_strimwidth($content, 0, $size, '...', 'utf-8');
|
||||
}
|
||||
|
||||
$summary = Utils::truncateHTML($content, $size);
|
||||
|
||||
return html_entity_decode($summary);
|
||||
@@ -586,7 +608,7 @@ class Page
|
||||
|
||||
|
||||
$process_markdown = $this->shouldProcess('markdown');
|
||||
$process_twig = $this->shouldProcess('twig') || $this->modularTwig() ;
|
||||
$process_twig = $this->shouldProcess('twig') || $this->modularTwig();
|
||||
|
||||
$cache_enable = isset($this->header->cache_enable) ? $this->header->cache_enable : $config->get('system.cache.enabled',
|
||||
true);
|
||||
@@ -797,7 +819,7 @@ class Page
|
||||
* Get value from a page variable (used mostly for creating edit forms).
|
||||
*
|
||||
* @param string $name Variable name.
|
||||
* @param mixed $default
|
||||
* @param mixed $default
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
@@ -1074,7 +1096,7 @@ class Page
|
||||
public function toArray()
|
||||
{
|
||||
return [
|
||||
'header' => (array)$this->header(),
|
||||
'header' => (array)$this->header(),
|
||||
'content' => (string)$this->value('content')
|
||||
];
|
||||
}
|
||||
@@ -1250,6 +1272,22 @@ class Page
|
||||
return !isset($this->expires) ? Grav::instance()['config']->get('system.pages.expires') : $this->expires;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets and sets the cache-control property. If not set it will return the default value (null)
|
||||
* https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control for more details on valid options
|
||||
*
|
||||
* @param null $var
|
||||
* @return null
|
||||
*/
|
||||
public function cacheControl($var = null)
|
||||
{
|
||||
if ($var !== null) {
|
||||
$this->cache_control = $var;
|
||||
}
|
||||
|
||||
return !isset($this->cache_control) ? Grav::instance()['config']->get('system.pages.cache_control') : $this->cache_control;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets and sets the title for this Page. If no title is set, it will use the slug() to get a name
|
||||
*
|
||||
@@ -1466,9 +1504,9 @@ class Page
|
||||
foreach ($value as $property => $prop_value) {
|
||||
$prop_key = $key . ":" . $property;
|
||||
$this->metadata[$prop_key] = [
|
||||
'name' => $prop_key,
|
||||
'name' => $prop_key,
|
||||
'property' => $prop_key,
|
||||
'content' => htmlspecialchars($prop_value, ENT_QUOTES, 'UTF-8')
|
||||
'content' => htmlspecialchars($prop_value, ENT_QUOTES, 'UTF-8')
|
||||
];
|
||||
}
|
||||
} else {
|
||||
@@ -1477,7 +1515,7 @@ class Page
|
||||
if (in_array($key, $header_tag_http_equivs)) {
|
||||
$this->metadata[$key] = [
|
||||
'http_equiv' => $key,
|
||||
'content' => htmlspecialchars($value, ENT_QUOTES, 'UTF-8')
|
||||
'content' => htmlspecialchars($value, ENT_QUOTES, 'UTF-8')
|
||||
];
|
||||
} elseif ($key == 'charset') {
|
||||
$this->metadata[$key] = ['charset' => htmlspecialchars($value, ENT_QUOTES, 'UTF-8')];
|
||||
@@ -1485,7 +1523,10 @@ class Page
|
||||
// if it's a social metadata with separator, render as property
|
||||
$separator = strpos($key, ':');
|
||||
$hasSeparator = $separator && $separator < strlen($key) - 1;
|
||||
$entry = ['name' => $key, 'content' => htmlspecialchars($value, ENT_QUOTES, 'UTF-8')];
|
||||
$entry = [
|
||||
'name' => $key,
|
||||
'content' => htmlspecialchars($value, ENT_QUOTES, 'UTF-8')
|
||||
];
|
||||
|
||||
if ($hasSeparator) {
|
||||
$entry['property'] = $key;
|
||||
@@ -1569,6 +1610,7 @@ class Page
|
||||
* Returns the canonical URL for a page
|
||||
*
|
||||
* @param bool $include_lang
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function canonical($include_lang = true)
|
||||
@@ -1583,6 +1625,7 @@ class Page
|
||||
* @param bool $canonical true to return the canonical URL
|
||||
* @param bool $include_lang
|
||||
* @param bool $raw_route
|
||||
*
|
||||
* @return string The url.
|
||||
*/
|
||||
public function url($include_host = false, $canonical = false, $include_lang = true, $raw_route = false)
|
||||
@@ -2227,6 +2270,23 @@ class Page
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the item in the current position.
|
||||
*
|
||||
* @param string $path the path the item
|
||||
*
|
||||
* @return Integer the index of the current page.
|
||||
*/
|
||||
public function currentPosition()
|
||||
{
|
||||
$collection = $this->parent()->collection('content', false);
|
||||
if ($collection instanceof Collection) {
|
||||
return $collection->currentPosition($this->path());
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether or not this page is the currently active page requested via the URL.
|
||||
*
|
||||
@@ -2307,7 +2367,7 @@ class Page
|
||||
* Helper method to return an ancestor page.
|
||||
*
|
||||
* @param string $url The url of the page
|
||||
* @param bool $lookup Name of the parent folder
|
||||
* @param bool $lookup Name of the parent folder
|
||||
*
|
||||
* @return \Grav\Common\Page\Page page you were looking for if it exists
|
||||
*/
|
||||
@@ -2323,7 +2383,7 @@ class Page
|
||||
* Helper method to return an ancestor page to inherit from. The current
|
||||
* page object is returned.
|
||||
*
|
||||
* @param string $field Name of the parent folder
|
||||
* @param string $field Name of the parent folder
|
||||
*
|
||||
* @return Page
|
||||
*/
|
||||
@@ -2335,11 +2395,12 @@ class Page
|
||||
|
||||
return $inherited;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to return an ancestor field only to inherit from. The
|
||||
* first occurrence of an ancestor field will be returned if at all.
|
||||
*
|
||||
* @param string $field Name of the parent folder
|
||||
* @param string $field Name of the parent folder
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
@@ -2353,7 +2414,7 @@ class Page
|
||||
/**
|
||||
* Method that contains shared logic for inherited() and inheritedField()
|
||||
*
|
||||
* @param string $field Name of the parent folder
|
||||
* @param string $field Name of the parent folder
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
@@ -2363,11 +2424,12 @@ class Page
|
||||
|
||||
/** @var Pages $pages */
|
||||
$inherited = $pages->inherited($this->route, $field);
|
||||
$inheritedParams = (array) $inherited->value('header.' . $field);
|
||||
$currentParams = (array) $this->value('header.' . $field);
|
||||
if($inheritedParams && is_array($inheritedParams)) {
|
||||
$inheritedParams = (array)$inherited->value('header.' . $field);
|
||||
$currentParams = (array)$this->value('header.' . $field);
|
||||
if ($inheritedParams && is_array($inheritedParams)) {
|
||||
$currentParams = array_replace_recursive($inheritedParams, $currentParams);
|
||||
}
|
||||
|
||||
return [$inherited, $currentParams];
|
||||
}
|
||||
|
||||
@@ -2375,7 +2437,7 @@ class Page
|
||||
* Helper method to return a page.
|
||||
*
|
||||
* @param string $url the url of the page
|
||||
* @param bool $all
|
||||
* @param bool $all
|
||||
*
|
||||
* @return \Grav\Common\Page\Page page you were looking for if it exists
|
||||
*/
|
||||
@@ -2391,7 +2453,7 @@ class Page
|
||||
* Get a collection of pages in the current context.
|
||||
*
|
||||
* @param string|array $params
|
||||
* @param boolean $pagination
|
||||
* @param boolean $pagination
|
||||
*
|
||||
* @return Collection
|
||||
* @throws \InvalidArgumentException
|
||||
@@ -2445,6 +2507,41 @@ class Page
|
||||
}
|
||||
}
|
||||
|
||||
// If a filter or filters are set, filter the collection...
|
||||
if (isset($params['filter'])) {
|
||||
foreach ((array)$params['filter'] as $type => $filter) {
|
||||
switch ($type) {
|
||||
case 'visible':
|
||||
$collection->visible($filter);
|
||||
break;
|
||||
case 'non-visible':
|
||||
$collection->nonVisible($filter);
|
||||
break;
|
||||
case 'modular':
|
||||
$collection->modular($filter);
|
||||
break;
|
||||
case 'non-modular':
|
||||
$collection->nonModular($filter);
|
||||
break;
|
||||
case 'routable':
|
||||
$collection->routable($filter);
|
||||
break;
|
||||
case 'non-routable':
|
||||
$collection->nonRoutable($filter);
|
||||
break;
|
||||
case 'type':
|
||||
$collection->ofType($filter);
|
||||
break;
|
||||
case 'types':
|
||||
$collection->ofOneOfTheseTypes($filter);
|
||||
break;
|
||||
case 'access':
|
||||
$collection->ofOneOfTheseAccessLevels($filter);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($params['dateRange'])) {
|
||||
$start = isset($params['dateRange']['start']) ? $params['dateRange']['start'] : 0;
|
||||
$end = isset($params['dateRange']['end']) ? $params['dateRange']['end'] : false;
|
||||
@@ -2727,7 +2824,7 @@ class Page
|
||||
|
||||
// Reorder all moved pages.
|
||||
foreach ($siblings as $slug => $page) {
|
||||
$order = intval(trim($page->order(),'.'));
|
||||
$order = intval(trim($page->order(), '.'));
|
||||
$counter++;
|
||||
|
||||
if ($order) {
|
||||
|
||||
@@ -406,7 +406,7 @@ class Pages
|
||||
|
||||
$ancestorField = $page->parent()->value('header.' . $field);
|
||||
|
||||
if ($ancestorField != null) {
|
||||
if ($ancestorField !== null) {
|
||||
return $page->parent();
|
||||
} elseif (!$page->parent()->root()) {
|
||||
return $this->inherited($page->parent()->route(), $field);
|
||||
@@ -670,7 +670,7 @@ class Pages
|
||||
|
||||
}
|
||||
|
||||
if ($limitLevels == false || ($level+1 < $limitLevels)) {
|
||||
if ($limitLevels === false || ($level+1 < $limitLevels)) {
|
||||
foreach ($current->children() as $next) {
|
||||
if ($showAll || $next->routable() || ($next->modular() && $showModular)) {
|
||||
$list = array_merge($list, $this->getList($next, $level + 1, $rawRoutes, $showAll, $showFullpath, $showSlug, $showModular, $limitLevels));
|
||||
@@ -1259,7 +1259,7 @@ class Pages
|
||||
if ($col) {
|
||||
if (($sort_flags & SORT_NATURAL) === SORT_NATURAL) {
|
||||
$list = preg_replace_callback('~([0-9]+)\.~', function($number) {
|
||||
return sprintf('%032d', $number);
|
||||
return sprintf('%032d.', $number[0]);
|
||||
}, $list);
|
||||
}
|
||||
|
||||
|
||||
@@ -27,13 +27,18 @@ class Plugins extends Iterator
|
||||
$locator = Grav::instance()['locator'];
|
||||
|
||||
$iterator = $locator->getIterator('plugins://');
|
||||
foreach ($iterator as $directory) {
|
||||
|
||||
$plugins = [];
|
||||
foreach($iterator as $directory) {
|
||||
if (!$directory->isDir()) {
|
||||
continue;
|
||||
}
|
||||
$plugins[] = $directory->getBasename();
|
||||
}
|
||||
|
||||
$plugin = $directory->getBasename();
|
||||
natsort($plugins);
|
||||
|
||||
foreach ($plugins as $plugin) {
|
||||
$this->add($this->loadPlugin($plugin));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ class PageServiceProvider implements ServiceProviderInterface
|
||||
|
||||
// some debugger override logic
|
||||
if ($page->debugger() === false) {
|
||||
Grav::instance()['debugger']->enabled(false);
|
||||
$c['debugger']->enabled(false);
|
||||
}
|
||||
|
||||
if ($c['config']->get('system.force_ssl')) {
|
||||
@@ -86,7 +86,7 @@ class PageServiceProvider implements ServiceProviderInterface
|
||||
if (!$page || !$page->routable()) {
|
||||
|
||||
// Try fallback URL stuff...
|
||||
$c->fallbackUrl($path);
|
||||
$page = $c->fallbackUrl($path);
|
||||
|
||||
if (!$page) {
|
||||
$path = $c['locator']->findResource('system://pages/notfound.md');
|
||||
@@ -94,7 +94,6 @@ class PageServiceProvider implements ServiceProviderInterface
|
||||
$page->init(new \SplFileInfo($path));
|
||||
$page->routable(false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return $page;
|
||||
|
||||
@@ -83,6 +83,8 @@ class Session extends BaseSession
|
||||
$session_name .= '-admin';
|
||||
}
|
||||
$this->setName($session_name);
|
||||
ini_set('session.cookie_secure', $secure);
|
||||
ini_set('session.cookie_httponly', $httponly);
|
||||
$this->start();
|
||||
setcookie(session_name(), session_id(), $session_timeout ? time() + $session_timeout : 0, $session_path, $domain, $secure, $httponly);
|
||||
}
|
||||
|
||||
@@ -168,7 +168,7 @@ class Themes extends Iterator
|
||||
/**
|
||||
* Load current theme.
|
||||
*
|
||||
* @return Theme|object
|
||||
* @return Theme
|
||||
*/
|
||||
public function load()
|
||||
{
|
||||
@@ -253,7 +253,7 @@ class Themes extends Iterator
|
||||
stream_wrapper_unregister($scheme);
|
||||
}
|
||||
$type = !empty($config['type']) ? $config['type'] : 'ReadOnlyStream';
|
||||
if ($type[0] != '\\') {
|
||||
if ($type[0] !== '\\') {
|
||||
$type = '\\RocketTheme\\Toolbox\\StreamWrapper\\' . $type;
|
||||
}
|
||||
|
||||
@@ -301,7 +301,7 @@ class Themes extends Iterator
|
||||
|
||||
/** @var \DirectoryIterator $directory */
|
||||
foreach ($iterator as $file) {
|
||||
if ($file->getExtension() != 'yaml') {
|
||||
if ($file->getExtension() !== 'yaml') {
|
||||
continue;
|
||||
}
|
||||
$languages[$file->getBasename('.yaml')] = CompiledYamlFile::instance($file->getPathname())->content();
|
||||
@@ -321,27 +321,36 @@ class Themes extends Iterator
|
||||
*/
|
||||
protected function autoloadTheme($class)
|
||||
{
|
||||
$prefix = "Grav\\Theme";
|
||||
$prefix = 'Grav\\Theme\\';
|
||||
if (false !== strpos($class, $prefix)) {
|
||||
// Remove prefix from class
|
||||
$class = substr($class, strlen($prefix));
|
||||
$locator = $this->grav['locator'];
|
||||
|
||||
// Try Old style theme classes
|
||||
$path = strtolower(ltrim(preg_replace('#\\\|_(?!.+\\\)#', '/', $class), '/'));
|
||||
$file = $this->grav['locator']->findResource("themes://{$path}/{$path}.php");
|
||||
// First try lowercase version of the classname.
|
||||
$path = strtolower($class);
|
||||
$file = $locator("themes://{$path}/theme.php") ?: $locator("themes://{$path}/{$path}.php");
|
||||
|
||||
// Load class
|
||||
if (file_exists($file)) {
|
||||
return include_once($file);
|
||||
if ($file) {
|
||||
return include_once $file;
|
||||
}
|
||||
|
||||
// Replace namespace tokens to directory separators
|
||||
$path = $this->grav['inflector']->hyphenize(ltrim($class,"\\"));
|
||||
$file = $this->grav['locator']->findResource("themes://{$path}/{$path}.php");
|
||||
$path = $this->grav['inflector']->hyphenize($class);
|
||||
$file = $locator("themes://{$path}/theme.php") ?: $locator("themes://{$path}/{$path}.php");
|
||||
|
||||
// Load class
|
||||
if (file_exists($file)) {
|
||||
return include_once($file);
|
||||
if ($file) {
|
||||
return include_once $file;
|
||||
}
|
||||
|
||||
// Try Old style theme classes
|
||||
$path = strtolower(preg_replace('#\\\|_(?!.+\\\)#', '/', $class));
|
||||
$file = $locator("themes://{$path}/theme.php") ?: $locator("themes://{$path}/{$path}.php");
|
||||
|
||||
// Load class
|
||||
if ($file) {
|
||||
return include_once $file;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -98,6 +98,9 @@ class Twig
|
||||
$this->grav->fireEvent('onTwigTemplatePaths');
|
||||
|
||||
$this->loader = new \Twig_Loader_Filesystem($this->twig_paths);
|
||||
|
||||
$this->grav->fireEvent('onTwigLoader');
|
||||
|
||||
$this->loaderArray = new \Twig_Loader_Array([]);
|
||||
$loader_chain = new \Twig_Loader_Chain([$this->loaderArray, $this->loader]);
|
||||
|
||||
@@ -359,6 +362,26 @@ class Twig
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Wraps the Twig_Loader_Filesystem addPath method (should be used only in `onTwigLoader()` event
|
||||
* @param $template_path
|
||||
* @param null $namespace
|
||||
*/
|
||||
public function addPath($template_path, $namespace = '__main__')
|
||||
{
|
||||
$this->loader->addPath($template_path, $namespace);
|
||||
}
|
||||
|
||||
/**
|
||||
* Wraps the Twig_Loader_Filesystem prependPath method (should be used only in `onTwigLoader()` event
|
||||
* @param $template_path
|
||||
* @param null $namespace
|
||||
*/
|
||||
public function prependPath($template_path, $namespace = '__main__')
|
||||
{
|
||||
$this->loader->prependPath($template_path, $namespace);
|
||||
}
|
||||
|
||||
/**
|
||||
* Simple helper method to get the twig template if it has already been set, else return
|
||||
* the one being passed in
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
namespace Grav\Common\Twig;
|
||||
|
||||
use Grav\Common\Grav;
|
||||
use Grav\Common\Page\Collection;
|
||||
use Grav\Common\Page\Media;
|
||||
use Grav\Common\Utils;
|
||||
use Grav\Common\Markdown\Parsedown;
|
||||
@@ -66,6 +67,8 @@ class TwigExtension extends \Twig_Extension
|
||||
new \Twig_SimpleFilter('*ize', [$this, 'inflectorFilter']),
|
||||
new \Twig_SimpleFilter('absolute_url', [$this, 'absoluteUrlFilter']),
|
||||
new \Twig_SimpleFilter('contains', [$this, 'containsFilter']),
|
||||
new \Twig_SimpleFilter('chunk_split', [$this, 'chunkSplitFilter']),
|
||||
|
||||
new \Twig_SimpleFilter('defined', [$this, 'definedDefaultFilter']),
|
||||
new \Twig_SimpleFilter('ends_with', [$this, 'endsWithFilter']),
|
||||
new \Twig_SimpleFilter('fieldName', [$this, 'fieldNameFilter']),
|
||||
@@ -89,11 +92,15 @@ class TwigExtension extends \Twig_Extension
|
||||
new \Twig_SimpleFilter('sort_by_key', [$this, 'sortByKeyFilter']),
|
||||
new \Twig_SimpleFilter('starts_with', [$this, 'startsWithFilter']),
|
||||
new \Twig_SimpleFilter('t', [$this, 'translate']),
|
||||
new \Twig_SimpleFilter('tl', [$this, 'translateLanguage']),
|
||||
new \Twig_SimpleFilter('ta', [$this, 'translateArray']),
|
||||
new \Twig_SimpleFilter('truncate', ['\Grav\Common\Utils', 'truncate']),
|
||||
new \Twig_SimpleFilter('truncate_html', ['\Grav\Common\Utils', 'truncateHTML']),
|
||||
new \Twig_SimpleFilter('json_decode', [$this, 'jsonDecodeFilter']),
|
||||
new \Twig_SimpleFilter('array_unique', 'array_unique'),
|
||||
new \Twig_SimpleFilter('basename', 'basename'),
|
||||
new \Twig_SimpleFilter('dirname', 'dirname'),
|
||||
new \Twig_SimpleFilter('print_r', 'print_r'),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -107,20 +114,25 @@ class TwigExtension extends \Twig_Extension
|
||||
return [
|
||||
new \Twig_SimpleFunction('array', [$this, 'arrayFunc']),
|
||||
new \Twig_SimpleFunction('array_key_value', [$this, 'arrayKeyValueFunc']),
|
||||
new \Twig_SimpleFunction('array_key_exists', 'array_key_exists'),
|
||||
new \Twig_SimpleFunction('array_unique', 'array_unique'),
|
||||
new \Twig_SimpleFunction('array_intersect', [$this, 'arrayIntersectFunc']),
|
||||
new \Twig_simpleFunction('authorize', [$this, 'authorize']),
|
||||
new \Twig_SimpleFunction('debug', [$this, 'dump'], ['needs_context' => true, 'needs_environment' => true]),
|
||||
new \Twig_SimpleFunction('dump', [$this, 'dump'], ['needs_context' => true, 'needs_environment' => true]),
|
||||
new \Twig_SimpleFunction('vardump', [$this, 'vardumpFunc']),
|
||||
new \Twig_SimpleFunction('print_r', 'print_r'),
|
||||
new \Twig_SimpleFunction('evaluate', [$this, 'evaluateStringFunc'], ['needs_context' => true, 'needs_environment' => true]),
|
||||
new \Twig_SimpleFunction('evaluate_twig', [$this, 'evaluateTwigFunc'], ['needs_context' => true, 'needs_environment' => true]),
|
||||
new \Twig_SimpleFunction('gist', [$this, 'gistFunc']),
|
||||
new \Twig_SimpleFunction('nonce_field', [$this, 'nonceFieldFunc']),
|
||||
new \Twig_SimpleFunction('pathinfo', [$this, 'pathinfoFunc']),
|
||||
new \Twig_SimpleFunction('pathinfo', 'pathinfo'),
|
||||
new \Twig_simpleFunction('random_string', [$this, 'randomStringFunc']),
|
||||
new \Twig_SimpleFunction('repeat', [$this, 'repeatFunc']),
|
||||
new \Twig_SimpleFunction('regex_replace', [$this, 'regexReplace']),
|
||||
new \Twig_SimpleFunction('string', [$this, 'stringFunc']),
|
||||
new \Twig_simpleFunction('t', [$this, 'translate']),
|
||||
new \Twig_simpleFunction('tl', [$this, 'translateLanguage']),
|
||||
new \Twig_simpleFunction('ta', [$this, 'translateArray']),
|
||||
new \Twig_SimpleFunction('url', [$this, 'urlFunc']),
|
||||
new \Twig_SimpleFunction('json_decode', [$this, 'jsonDecodeFilter']),
|
||||
@@ -235,15 +247,15 @@ class TwigExtension extends \Twig_Extension
|
||||
/**
|
||||
* Inflector supports following notations:
|
||||
*
|
||||
* {{ 'person'|pluralize }} => people
|
||||
* {{ 'shoes'|singularize }} => shoe
|
||||
* {{ 'welcome page'|titleize }} => "Welcome Page"
|
||||
* {{ 'send_email'|camelize }} => SendEmail
|
||||
* {{ 'CamelCased'|underscorize }} => camel_cased
|
||||
* {{ 'Something Text'|hyphenize }} => something-text
|
||||
* {{ 'something_text_to_read'|humanize }} => "Something text to read"
|
||||
* {{ '181'|monthize }} => 5
|
||||
* {{ '10'|ordinalize }} => 10th
|
||||
* `{{ 'person'|pluralize }} => people`
|
||||
* `{{ 'shoes'|singularize }} => shoe`
|
||||
* `{{ 'welcome page'|titleize }} => "Welcome Page"`
|
||||
* `{{ 'send_email'|camelize }} => SendEmail`
|
||||
* `{{ 'CamelCased'|underscorize }} => camel_cased`
|
||||
* `{{ 'Something Text'|hyphenize }} => something-text`
|
||||
* `{{ 'something_text_to_read'|humanize }} => "Something text to read"`
|
||||
* `{{ '181'|monthize }} => 5`
|
||||
* `{{ '10'|ordinalize }} => 10th`
|
||||
*
|
||||
* @param string $action
|
||||
* @param string $data
|
||||
@@ -373,6 +385,19 @@ class TwigExtension extends \Twig_Extension
|
||||
return $array;
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper for chunk_split() function
|
||||
*
|
||||
* @param $value
|
||||
* @param $chars
|
||||
* @param string $split
|
||||
* @return string
|
||||
*/
|
||||
public function chunkSplitFilter($value, $chars, $split = '-')
|
||||
{
|
||||
return chunk_split($value, $chars, $split);
|
||||
}
|
||||
|
||||
/**
|
||||
* determine if a string contains another
|
||||
*
|
||||
@@ -591,6 +616,20 @@ class TwigExtension extends \Twig_Extension
|
||||
return $this->grav['language']->translate(func_get_args());
|
||||
}
|
||||
|
||||
/**
|
||||
* Translate Strings
|
||||
*
|
||||
* @param $args
|
||||
* @param array|null $languages
|
||||
* @param bool $array_support
|
||||
* @param bool $html_out
|
||||
* @return mixed
|
||||
*/
|
||||
public function translateLanguage($args, array $languages = null, $array_support = false, $html_out = false)
|
||||
{
|
||||
return $this->grav['language']->translate($args, $languages, $array_support, $html_out);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $key
|
||||
* @param $index
|
||||
@@ -818,6 +857,23 @@ class TwigExtension extends \Twig_Extension
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper for array_intersect() method
|
||||
*
|
||||
* @param $array1
|
||||
* @param $array2
|
||||
* @return array
|
||||
*/
|
||||
public function arrayIntersectFunc($array1, $array2)
|
||||
{
|
||||
if ($array1 instanceof Collection && $array2 instanceof Collection) {
|
||||
return $array1->intersect($array2);
|
||||
} else {
|
||||
return array_intersect($array1, $array2);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string from a value. If the value is array, return it json encoded
|
||||
*
|
||||
@@ -1038,14 +1094,4 @@ class TwigExtension extends \Twig_Extension
|
||||
var_dump($var);
|
||||
}
|
||||
|
||||
/**
|
||||
* Simple wrapper for pathinfo()
|
||||
*
|
||||
* @param $var
|
||||
* @return mixed
|
||||
*/
|
||||
public function pathinfoFunc($var)
|
||||
{
|
||||
return pathinfo($var);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -286,6 +286,11 @@ class Uri
|
||||
|
||||
$this->url = $this->base . $this->uri;
|
||||
|
||||
// if case insensitive urls is enabled, lowercase the url
|
||||
if( $grav['config']->get('system.case_insensitive_urls') ){
|
||||
$this->url = strtolower($this->url);
|
||||
}
|
||||
|
||||
// get any params and remove them
|
||||
$uri = str_replace($this->root, '', $this->url);
|
||||
|
||||
@@ -295,9 +300,9 @@ class Uri
|
||||
$uri = str_replace($setup_base, '', $uri);
|
||||
}
|
||||
|
||||
// If configured to, redirect trailing slash URI's with a 301 redirect
|
||||
// If configured to, redirect trailing slash URI's with a 302 redirect
|
||||
if ($config->get('system.pages.redirect_trailing_slash', false) && $uri != '/' && Utils::endsWith($uri, '/')) {
|
||||
$grav->redirect(str_replace($this->root, '', rtrim($uri, '/')), 301);
|
||||
$grav->redirect(str_replace($this->root, '', rtrim($uri, '/')), 302);
|
||||
}
|
||||
|
||||
// process params
|
||||
|
||||
@@ -197,6 +197,10 @@ class User extends Data
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$this->authenticated) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (isset($this->state) && $this->state !== 'enabled') {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -43,7 +43,8 @@ class AssetsTest extends \Codeception\TestCase\Test
|
||||
'pipeline' => true,
|
||||
'loading' => '',
|
||||
'group' => 'head',
|
||||
'modified' => false
|
||||
'modified' => false,
|
||||
'query' => ''
|
||||
], reset($array));
|
||||
|
||||
$this->assets->add('test.js');
|
||||
@@ -59,7 +60,8 @@ class AssetsTest extends \Codeception\TestCase\Test
|
||||
'pipeline' => true,
|
||||
'loading' => '',
|
||||
'group' => 'head',
|
||||
'modified' => false
|
||||
'modified' => false,
|
||||
'query' => ''
|
||||
], reset($array));
|
||||
|
||||
//test addCss(). Test adding asset to a separate group
|
||||
@@ -77,7 +79,8 @@ class AssetsTest extends \Codeception\TestCase\Test
|
||||
'pipeline' => true,
|
||||
'loading' => '',
|
||||
'group' => 'head',
|
||||
'modified' => false
|
||||
'modified' => false,
|
||||
'query' => ''
|
||||
], reset($array));
|
||||
|
||||
//test addCss(). Testing with remote URL
|
||||
@@ -95,7 +98,8 @@ class AssetsTest extends \Codeception\TestCase\Test
|
||||
'pipeline' => true,
|
||||
'loading' => '',
|
||||
'group' => 'head',
|
||||
'modified' => false
|
||||
'modified' => false,
|
||||
'query' => ''
|
||||
], reset($array));
|
||||
|
||||
//test addCss() adding asset to a separate group, and with an alternate rel attribute
|
||||
@@ -119,7 +123,8 @@ class AssetsTest extends \Codeception\TestCase\Test
|
||||
'pipeline' => true,
|
||||
'loading' => '',
|
||||
'group' => 'head',
|
||||
'modified' => false
|
||||
'modified' => false,
|
||||
'query' => ''
|
||||
], reset($array));
|
||||
|
||||
//Test CSS Groups
|
||||
@@ -139,7 +144,8 @@ class AssetsTest extends \Codeception\TestCase\Test
|
||||
'pipeline' => true,
|
||||
'loading' => '',
|
||||
'group' => 'footer',
|
||||
'modified' => false
|
||||
'modified' => false,
|
||||
'query' => ''
|
||||
], reset($array));
|
||||
|
||||
//Test JS Groups
|
||||
@@ -159,7 +165,8 @@ class AssetsTest extends \Codeception\TestCase\Test
|
||||
'pipeline' => true,
|
||||
'loading' => '',
|
||||
'group' => 'footer',
|
||||
'modified' => false
|
||||
'modified' => false,
|
||||
'query' => ''
|
||||
], reset($array));
|
||||
|
||||
//Test async / defer
|
||||
@@ -177,7 +184,8 @@ class AssetsTest extends \Codeception\TestCase\Test
|
||||
'pipeline' => true,
|
||||
'loading' => 'async',
|
||||
'group' => 'head',
|
||||
'modified' => false
|
||||
'modified' => false,
|
||||
'query' => ''
|
||||
], reset($array));
|
||||
|
||||
$this->assets->reset();
|
||||
@@ -194,7 +202,8 @@ class AssetsTest extends \Codeception\TestCase\Test
|
||||
'pipeline' => true,
|
||||
'loading' => 'defer',
|
||||
'group' => 'head',
|
||||
'modified' => false
|
||||
'modified' => false,
|
||||
'query' => ''
|
||||
], reset($array));
|
||||
|
||||
//Test inline
|
||||
@@ -412,14 +421,14 @@ class AssetsTest extends \Codeception\TestCase\Test
|
||||
$this->assets->setTimestamp('foo');
|
||||
$this->assets->addCSS('http://somesite.com/test.css');
|
||||
$css = $this->assets->css();
|
||||
$this->assertSame('<link href="http://somesite.com/test.css" type="text/css" rel="stylesheet" />' . PHP_EOL, $css);
|
||||
$this->assertSame('<link href="http://somesite.com/test.css?foo" type="text/css" rel="stylesheet" />' . PHP_EOL, $css);
|
||||
|
||||
// external CSS already with param
|
||||
$this->assets->reset();
|
||||
$this->assets->setTimestamp('foo');
|
||||
$this->assets->addCSS('http://somesite.com/test.css?bar');
|
||||
$css = $this->assets->css();
|
||||
$this->assertSame('<link href="http://somesite.com/test.css?bar" type="text/css" rel="stylesheet" />' . PHP_EOL, $css);
|
||||
$this->assertSame('<link href="http://somesite.com/test.css?bar&foo" type="text/css" rel="stylesheet" />' . PHP_EOL, $css);
|
||||
|
||||
// local JS nothing extra
|
||||
$this->assets->reset();
|
||||
@@ -440,14 +449,14 @@ class AssetsTest extends \Codeception\TestCase\Test
|
||||
$this->assets->setTimestamp('foo');
|
||||
$this->assets->addJs('http://somesite.com/test.js');
|
||||
$css = $this->assets->js();
|
||||
$this->assertSame('<script src="http://somesite.com/test.js" type="text/javascript" ></script>' . PHP_EOL, $css);
|
||||
$this->assertSame('<script src="http://somesite.com/test.js?foo" type="text/javascript" ></script>' . PHP_EOL, $css);
|
||||
|
||||
// external JS already with param
|
||||
$this->assets->reset();
|
||||
$this->assets->setTimestamp('foo');
|
||||
$this->assets->addJs('http://somesite.com/test.js?bar');
|
||||
$css = $this->assets->js();
|
||||
$this->assertSame('<script src="http://somesite.com/test.js?bar" type="text/javascript" ></script>' . PHP_EOL, $css);
|
||||
$this->assertSame('<script src="http://somesite.com/test.js?bar&foo" type="text/javascript" ></script>' . PHP_EOL, $css);
|
||||
}
|
||||
|
||||
public function testAddInlineCss()
|
||||
|
||||
Reference in New Issue
Block a user