Compare commits

...

89 Commits
1.0.2 ... 1.0.6

Author SHA1 Message Date
Andy Miller
f0145aa659 Merge branch 'release/1.0.6' 2015-12-22 17:15:44 -07:00
Andy Miller
879b5ef272 version update 2015-12-22 17:15:34 -07:00
Matias Griese
8e1b2bc6e4 FastCGI: Use Apache's mod_deflate if Grav's builtin gzip compression was turned off (#548) 2015-12-22 11:54:20 +02:00
Andy Miller
37dd107281 Revert "Fix orientation for images added via twig"
This reverts commit 484a34cd92.
2015-12-21 22:01:38 -07:00
Andy Miller
2d3b41c62d Revert "Fix for images orientation in page content"
This reverts commit 4581077dcd.
2015-12-21 22:01:32 -07:00
Andy Miller
c9b8fc0e1b Revert "Cleanup"
This reverts commit b2c7e22634.
2015-12-21 22:01:18 -07:00
Andy Miller
7eb57b674a Merge branch 'develop' of https://github.com/getgrav/grav into develop 2015-12-21 21:58:47 -07:00
Andy Miller
25b33d0204 Revert "Proposed fix for #541"
This reverts commit 6c6871f607.
2015-12-21 21:58:31 -07:00
Flavio Copes
d47faed870 Cleanup 2015-12-21 21:58:31 -07:00
Flavio Copes
9a8efdf9cd Fix for images orientation in page content 2015-12-21 21:58:31 -07:00
Flavio Copes
593fd20a15 Fix orientation for images added via twig 2015-12-21 21:58:31 -07:00
Flavio Copes
ef75582e20 Proposed fix for #541
After reading http://stackoverflow.com/a/6998242 rawurldecode (and
rawurlencode) is better over urldecode/urlencode: "rawurlencode is the
way to go most of the time. It deals with the modern scheme for URI
components, where as urlencode does things the old school way, where +
meant "space."
2015-12-21 21:58:31 -07:00
Andy Miller
7440074491 Revert "Proposed fix for #541"
This reverts commit 6c6871f607.
2015-12-21 21:46:36 -07:00
Andy Miller
9688ed0f51 Merge pull request #543 from getgrav/features/use-rawurldecode-encode
Use rawurldecode and rawurlencode instead of urldecode/urlencode
2015-12-21 21:16:59 -07:00
Andy Miller
45d415e547 Merge branch 'feature/exif-auto-fix-orientation' into develop 2015-12-21 21:13:09 -07:00
Flavio Copes
b2c7e22634 Cleanup 2015-12-21 19:18:51 +01:00
Flavio Copes
4581077dcd Fix for images orientation in page content 2015-12-21 19:10:19 +01:00
Flavio Copes
729f83b3d4 Fix regression in image parameters handling introduced in 23a9a73600
Parameters without a value (e.g. `sepia`, `grayscale`, `emboss` and
others) were not applied any more)
2015-12-21 18:02:25 +01:00
Flavio Copes
bf361db5fc File field validation, handle case multiple not specified 2015-12-21 16:26:05 +01:00
Flavio Copes
328e9b20de Also add config save to themes 2015-12-21 16:16:26 +01:00
Flavio Copes
484a34cd92 Fix orientation for images added via twig 2015-12-21 13:55:29 +01:00
Andy Miller
5ab4d916b0 tweaked whoops sidebar 2015-12-20 12:32:23 -07:00
Andy Miller
f0974e0d24 minor whoops styling 2015-12-20 12:30:15 -07:00
Andy Miller
06a5aa6d01 Manually rolled back APCu support for PHP7 until it is available in the released version of Doctrine (currently only in master branch) 2015-12-20 11:58:53 -07:00
Andy Miller
a88829bd57 Merge branch 'feature/update-whoops' into develop 2015-12-20 11:51:44 -07:00
Andy Miller
c023c74ae5 Merge branch 'feature/update-whoops' of https://github.com/getgrav/grav into feature/update-whoops 2015-12-20 11:51:14 -07:00
Andy Miller
a8ad14222d moved sample web server configs into a dedicated directory 2015-12-20 11:50:45 -07:00
Flavio Copes
6c6871f607 Proposed fix for #541
After reading http://stackoverflow.com/a/6998242 rawurldecode (and
rawurlencode) is better over urldecode/urlencode: "rawurlencode is the
way to go most of the time. It deals with the modern scheme for URI
components, where as urlencode does things the old school way, where +
meant "space."
2015-12-20 14:18:56 +01:00
Flavio Copes
5764e5e686 Merge branch 'develop' into feature/update-whoops 2015-12-20 11:52:52 +01:00
Flavio Copes
b89044a709 Fix language string 2015-12-20 11:51:48 +01:00
Flavio Copes
5fc4755d3b Merge pull request #537 from fbardel/patch-1
Update fr.yaml
2015-12-19 18:39:33 +01:00
François
2f2adaaee8 Update fr.yaml 2015-12-19 18:17:07 +01:00
Flavio Copes
e2ae24faa9 Merge branch 'develop' into feature/update-whoops 2015-12-19 15:30:08 +01:00
Flavio Copes
55bc84c118 Fix #535 case insensitive https check 2015-12-19 14:20:45 +01:00
Flavio Copes
a47d5d00b3 Merge branch 'develop' into feature/update-whoops 2015-12-19 11:53:52 +01:00
Flavio Copes
05c2b98929 Fix #523 locale in url with base_url_* variables, even if include_default_lang is set to false 2015-12-19 10:48:52 +01:00
Flavio Copes
c5d3098b25 Only call extra method on blueprints if blueprints exist
Reverts partial change made in

https://github.com/getgrav/grav/commit/ac3396e6c46f9bcd8d5cbb45370b5daad
c84aadc
2015-12-19 10:28:06 +01:00
Flavio Copes
6805f32a13 Merge pull request #533 from mikewink/patch-1
Fixed hardcoded string "Security"
2015-12-19 09:33:56 +01:00
Andy Miller
b8aa250a22 Merge branch 'develop' into feature/update-whoops 2015-12-18 23:08:31 -07:00
Andy Miller
bf05a36dfe Updated some libs 2015-12-18 23:08:14 -07:00
Andy Miller
8f9cdad916 Updated spelling in Parsedown to match imminent update 2015-12-18 20:50:27 -07:00
Djamil Legato
d2ed424a7c Fixed Travis parsing error [ci skip] 2015-12-18 16:05:35 -08:00
Andy Miller
08cbd9553f Merge branch 'release/1.0.5' 2015-12-18 16:50:33 -07:00
Andy Miller
369d2cb390 Merge branch 'release/1.0.5' into develop 2015-12-18 16:50:33 -07:00
Andy Miller
dcaa9a35c3 Missed changeling entry 2015-12-18 16:50:19 -07:00
Andy Miller
4a80691e07 version update 2015-12-18 16:49:03 -07:00
Mike Wink
215b2cdfa8 Fixed hardcoded string "Security"
Added the PLUGIN_ADMIN.SECURITY constant instead. Will add this to the admin language files too.
2015-12-19 00:12:01 +01:00
Andy Miller
425831a7ae Fix for empty file when writing cache 2015-12-18 15:09:21 -07:00
Djamil Legato
984e0455b1 'informations' is not a thing 😞 2015-12-18 13:44:59 -08:00
Djamil Legato
00ecfb30f3 Ensuring gpm selfupgrades doesn't continue if PHP min version requirement isn't met. Gracefully abort with error and details. 2015-12-18 13:38:28 -08:00
Djamil Legato
c18f20e483 Added GRAV_PHP_MIN 2015-12-18 13:37:19 -08:00
Djamil Legato
71c5ff8c51 Added new Upgrader::meetsRequirements method
Ensures the PHP version meets the Grav's mininum required one.
2015-12-18 13:35:31 -08:00
Djamil Legato
1996dd7de8 Allowing Installer to set errors as string 2015-12-18 13:33:57 -08:00
Andy Miller
e87daa2361 Added support to get plugin languages from individual language files in languages folder of plugin 2015-12-18 12:29:45 -07:00
Flavio Copes
987feb1385 Make saveConfig static so it's more easily accessible 2015-12-18 15:42:33 +01:00
Flavio Copes
8d048c689f Persists to disk the plugin parameters currently stored in the Grav Config object 2015-12-18 14:44:03 +01:00
Flavio Copes
139ef04e0a Handle non-array values in file validation 2015-12-18 10:38:10 +01:00
Flavio Copes
4c01e6c93e Merge pull request #530 from mufac/mufac-patch-1
Prevent error if no collections present
2015-12-18 10:04:11 +01:00
Andy Miller
27744ba747 Merge branch 'feature/markdown_extendability' into develop 2015-12-17 18:09:28 -07:00
Andy Miller
3d3c6f4eba missing doc blocks 2015-12-17 18:09:11 -07:00
Andy Miller
fb4abc5f5f Use Grav's version of Parsedown until PR is accepted (crossing fingers) 2015-12-17 17:52:20 -07:00
mufac
f29b141d69 Prevent error if no collections present
If there are no collections you can get a "Invalid argument supplied for foreach()" without an empty default.
2015-12-17 16:14:48 -06:00
Andy Miller
1cecd09423 requires changes in parsedown 2015-12-17 10:35:22 -07:00
Andy Miller
0142e76270 cleanup 2015-12-16 21:51:38 -07:00
Andy Miller
5f8c7f41ec Add ability to extend markdown 2015-12-16 19:50:10 -07:00
Flavio Copes
451baff26e filterFile if the file field allows multiple items returns an array, otherwise a string 2015-12-16 15:16:14 +01:00
Flavio Copes
78accfe98b Bump whoops version 2015-12-15 22:58:31 +01:00
Flavio Copes
0e8e27877e Fix https://github.com/getgrav/grav-plugin-admin/issues/335, when looping the fields param in a list field, first check it exists 2015-12-15 11:52:27 +01:00
Andy Miller
d8a993bc86 Properly convert comma to spaces for multiple attributes #518 2015-12-14 18:30:55 -07:00
Andy Miller
ec7dbbdc8b Added 7z format to standard file types #521 2015-12-14 18:13:14 -07:00
Flavio Copes
c45652de81 Make sure Grav can work with the 2.0.0-alpha1 Whoops update, and with the current 1.1 too 2015-12-14 14:21:39 +01:00
Djamil Legato
e152cfd10f Forcing travis VM to western most date and echo a Travis date to catch it on log 2015-12-12 17:47:19 -08:00
Andy Miller
747daa46f1 Merge branch 'release/1.0.4' 2015-12-12 13:03:34 -07:00
Andy Miller
17a0590ee4 Merge branch 'release/1.0.4' into develop 2015-12-12 13:03:34 -07:00
Andy Miller
653edb064b version update 2015-12-12 13:03:22 -07:00
Andy Miller
40f5d57737 Default value not in quotes. Needs to be a string for Admin compatibility - https://docs.saltstack.com/en/latest/topics/troubleshooting/yaml_idiosyncrasies.html#integers-are-parsed-as-integers 2015-12-12 08:43:41 -07:00
Flavio Copes
566c5cb38f Revert "Fix issue in images cache permissions"
This reverts commit 7e3058e3f0.
2015-12-12 10:18:32 +01:00
Flavio Copes
7e3058e3f0 Fix issue in images cache permissions
the leading '0' in the default 0755 was omitted as interpreted as an
integer, leading to errors in setting the images cache folder
permissions (not readable by Grav)
2015-12-12 10:13:21 +01:00
Djamil Legato
053d8a3fd5 Merge branch 'develop' of https://github.com/getgrav/grav into develop 2015-12-11 21:17:30 -08:00
Djamil Legato
0e810c15e2 Keep going if files are not found while creating a new project 2015-12-11 21:17:19 -08:00
Andy Miller
6b9154d1f3 Fix for cleaning build on linux 2015-12-11 22:08:59 -07:00
Andy Miller
4a5a400b89 Merge branch 'release/1.0.3' 2015-12-11 21:52:41 -07:00
Andy Miller
2d7a3232cc Merge branch 'release/1.0.3' into develop 2015-12-11 21:52:41 -07:00
Andy Miller
96d7c4790f version update 2015-12-11 21:52:14 -07:00
Andy Miller
c0b9ada21c fix for Image perms on admin save 2015-12-11 21:43:32 -07:00
Djamil Legato
7b116b41ae Not meant to be checked in 2015-12-11 20:42:30 -08:00
Djamil Legato
fcdd0bc0e9 Reverted CleanCommand to pure Command 2015-12-11 20:19:57 -07:00
Djamil Legato
0619f7c656 Reverted CleanCommand to pure Command 2015-12-11 18:44:52 -08:00
Andy Miller
48083b203a Merge branch 'release/1.0.2' into develop 2015-12-11 18:51:36 -07:00
41 changed files with 489 additions and 292 deletions

View File

@@ -44,7 +44,7 @@ RewriteRule .* index.php [L]
## Begin - Security
# Block all direct access for these folders
RewriteRule ^(.git|cache|bin|logs|backup)/(.*) error [F]
RewriteRule ^(.git|cache|bin|logs|backup|webserver-configs)/(.*) error [F]
# Block access to specific file types for these system folders
RewriteRule ^(system|vendor)/(.*)\.(txt|xml|md|html|yaml|php|pl|py|cgi|twig|sh|bat)$ error [F]
# Block access to specific file types for these user folders
@@ -54,7 +54,7 @@ RewriteRule \.md$ error [F]
# Block all direct access to files and folders beginning with a dot
RewriteRule (^\.|/\.) - [F]
# Block access to specific files in the root folder
RewriteRule ^(LICENSE.txt|composer.lock|composer.json|nginx.conf|web.config|htaccess.txt|\.htaccess)$ error [F]
RewriteRule ^(LICENSE.txt|composer.lock|composer.json|\.htaccess)$ error [F]
## End - Security
</IfModule>

View File

@@ -40,8 +40,10 @@ env:
- TRAVIS_TAG=$(curl --fail --user ${GH_API_USER} -s https://api.github.com/repos/getgrav/grav/releases/latest | grep tag_name | head -n 1 | cut -d '"' -f 4)
before_install:
- export TZ=Pacific/Honolulu
- composer self-update
- go get github.com/aktau/github-release
- echo "Travis Date - `date`"
- git clone --quiet --depth=50 --branch=master https://${BB_TOKEN}bitbucket.org/rockettheme/grav-devtools.git $RT_DEVTOOLS &>/dev/null;
- if [ ! -z "$TRAVIS_TAG" ]; then
cd "${RT_DEVTOOLS}";

View File

@@ -1,3 +1,50 @@
# v1.0.6
## 12/22/2015
1. [](#new)
* Set minimum requirements to [PHP 5.5.9](http://bit.ly/1Jt9OXO)
* Added `saveConfig` to Themes
1. [](#improved)
* Updated Whoops to new 2.0 version (PHP 7.0 compatbile)
* Moved sample web server configs into dedicated directory
* FastCGI will use Apache's `mod_deflate` if gzip turned off
1. [](#bugfix)
* Fix broken media image operators
* Only call extra method of blueprints if blueprints exist
* Fix lang prefix in url twig variables #523
* Fix case insensitive HTTPS check #535
* Field field validation handles case `multiple` missing
# v1.0.5
## 12/18/2015
1. [](#new)
* Add ability to extend markdown with plugins
* Added support for plugins to have individual language files
* Added `7z` to media formats
* Use Grav's fork of Parsedown until PR is merged
* New function to persist plugin configuration to disk
* GPM `selfupgrade` will now check PHP version requirements
1. [](#improved)
* If the field allows multiple files, return array
* Handle non-array values in file validation
1. [](#bugfix)
* Fix when looping `fields` param in a `list` field
* Properly convert commas to spaces for media attributes
* Forcing Travis VM to HI timezone to address future files in zip file
# v1.0.4
## 12/12/2015
1. [](#bugfix)
* Needed to put default image folder permissions for YAML compatibility
# v1.0.3
## 12/11/2015
1. [](#bugfix)
* Fixed issue when saving config causing incorrect image cache folder perms
# v1.0.2
## 12/11/2015

View File

@@ -6,8 +6,9 @@
"homepage": "http://getgrav.org",
"license": "MIT",
"require": {
"php": ">=5.4.0",
"php": ">=5.5.9",
"twig/twig": "~1.23",
"erusev/parsedown": "dev-master as 1.6.0",
"erusev/parsedown-extra": "~0.7",
"symfony/yaml": "~2.8",
"symfony/console": "~2.8",
@@ -15,7 +16,7 @@
"symfony/var-dumper": "~2.8",
"symfony/polyfill-iconv": "~1.0",
"doctrine/cache": "~1.5",
"filp/whoops": "1.1.10",
"filp/whoops": "2.0.0-alpha2",
"monolog/monolog": "~1.0",
"gregwar/image": "~2.0",
"ircmaxell/password-compat": "1.0.*",
@@ -25,6 +26,12 @@
"rockettheme/toolbox": "~1.2",
"maximebf/debugbar": "~1.10"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/getgrav/parsedown"
}
],
"autoload": {
"psr-4": {
"Grav\\": "system/src/Grav"

76
composer.lock generated
View File

@@ -4,21 +4,21 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "09fcc6b4528be7d9c8af68a66e85f0b2",
"content-hash": "69bee250cbc5160401d50cc47c8d6aba",
"hash": "94131c9b1e1bafa572e1022ca6093544",
"content-hash": "fd3f9839960586cb8d7c841eb3a51610",
"packages": [
{
"name": "doctrine/cache",
"version": "v1.5.2",
"version": "v1.5.4",
"source": {
"type": "git",
"url": "https://github.com/doctrine/cache.git",
"reference": "47c7128262da274f590ae6f86eb137a7a64e82af"
"reference": "47cdc76ceb95cc591d9c79a36dc3794975b5d136"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/cache/zipball/47c7128262da274f590ae6f86eb137a7a64e82af",
"reference": "47c7128262da274f590ae6f86eb137a7a64e82af",
"url": "https://api.github.com/repos/doctrine/cache/zipball/47cdc76ceb95cc591d9c79a36dc3794975b5d136",
"reference": "47cdc76ceb95cc591d9c79a36dc3794975b5d136",
"shasum": ""
},
"require": {
@@ -75,7 +75,7 @@
"cache",
"caching"
],
"time": "2015-12-03 10:50:37"
"time": "2015-12-19 05:03:47"
},
{
"name": "donatj/phpuseragentparser",
@@ -130,16 +130,16 @@
},
{
"name": "erusev/parsedown",
"version": "1.6.0",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/erusev/parsedown.git",
"reference": "3ebbd730b5c2cf5ce78bc1bf64071407fc6674b7"
"url": "https://github.com/getgrav/parsedown.git",
"reference": "e7443a2bd868e78946ae6a01a1b07d477ce6f4cc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/erusev/parsedown/zipball/3ebbd730b5c2cf5ce78bc1bf64071407fc6674b7",
"reference": "3ebbd730b5c2cf5ce78bc1bf64071407fc6674b7",
"url": "https://api.github.com/repos/getgrav/parsedown/zipball/e7443a2bd868e78946ae6a01a1b07d477ce6f4cc",
"reference": "e7443a2bd868e78946ae6a01a1b07d477ce6f4cc",
"shasum": ""
},
"type": "library",
@@ -148,7 +148,6 @@
"Parsedown": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
@@ -165,7 +164,10 @@
"markdown",
"parser"
],
"time": "2015-10-04 16:44:32"
"support": {
"source": "https://github.com/getgrav/parsedown/tree/master"
},
"time": "2015-12-19 03:45:14"
},
{
"name": "erusev/parsedown-extra",
@@ -213,36 +215,41 @@
},
{
"name": "filp/whoops",
"version": "1.1.10",
"version": "2.0.0-alpha2",
"source": {
"type": "git",
"url": "https://github.com/filp/whoops.git",
"reference": "72538eeb70bbfb11964412a3d098d109efd012f7"
"reference": "eb1ce6439db161a9f00cd57f33a9cfa1355229ec"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/filp/whoops/zipball/72538eeb70bbfb11964412a3d098d109efd012f7",
"reference": "72538eeb70bbfb11964412a3d098d109efd012f7",
"url": "https://api.github.com/repos/filp/whoops/zipball/eb1ce6439db161a9f00cd57f33a9cfa1355229ec",
"reference": "eb1ce6439db161a9f00cd57f33a9cfa1355229ec",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
"php": ">=5.5.9"
},
"require-dev": {
"mockery/mockery": "0.9.*"
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "^4.8 || ^5.0"
},
"suggest": {
"symfony/var-dumper": "Pretty print complex values better with var-dumper available",
"whoops/soap": "Formats errors as SOAP responses"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.2-dev"
"dev-master": "2.0-dev"
}
},
"autoload": {
"psr-0": {
"Whoops": "src/"
"psr-4": {
"Whoops\\": "src/Whoops/"
},
"classmap": [
"src/deprecated"
"files": [
"src/Whoops/functions.php"
]
},
"notification-url": "https://packagist.org/downloads/",
@@ -263,11 +270,10 @@
"exception",
"handling",
"library",
"silex-provider",
"whoops",
"zf2"
],
"time": "2015-06-29 05:42:04"
"time": "2015-12-15 12:27:17"
},
{
"name": "gregwar/cache",
@@ -1125,13 +1131,23 @@
}
],
"packages-dev": [],
"aliases": [],
"aliases": [
{
"alias": "1.6.0",
"alias_normalized": "1.6.0.0",
"version": "9999999-dev",
"package": "erusev/parsedown"
}
],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {
"erusev/parsedown": 20,
"filp/whoops": 15
},
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
"php": ">=5.4.0"
"php": ">=5.5.9"
},
"platform-dev": []
}

View File

@@ -1,110 +1,19 @@
body {
background-color: #eee;
}
body header {
background: #349886;
border-left: 8px solid #29796B;
background: #8552A2;
}
body .clipboard {
width: 28px;
height: 28px;
background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcAQMAAABIw03XAAAAA3NCSVQICAjb4U/gAAAABlBMVEX///////9VfPVsAAAAAnRSTlP/AOW3MEoAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAFnRFWHRDcmVhdGlvbiBUaW1lADEwLzE1LzE0xr/LJAAAADhJREFUCJlj+P///wcGBPGDQR5E8OMi2IEEczOIaAQRHSCioQBGHAAR/7AT/z+DiA8MMALVXhABAJf9Sr5aY+UFAAAAAElFTkSuQmCC);
body .left-panel {
background: inherit;
}
body .exc-title-primary {
color: #1C3631;
text-shadow: none;
color: #fff;
}
body .exc-title {
color: #2F5B52;
text-shadow: none;
}
body .data-table-container label {
color: #0082BA;
}
body .frame {
border: 0;
}
body .frames-container {
overflow-y: auto;
overflow-x: hidden;
}
body .active .frame-class {
color: #E3D8E9;
}
body .frame-class {
color: #9055AF;
}
body .frame.active {
border: 0;
box-shadow: none;
background-color: #9055AF;
color: #ddd;
}
body .frame:not(.active):hover {
background: #e9e9e9;
}
body .frame-file, body .data-table tbody {
font-family: "DejaVu Sans Mono", Menlo, Monaco, Consolas, Courier, monospace;
font-size: 13px;
}
body .frame-code {
background: #305669;
border-left: 8px solid #253A47;
padding: 1rem;
}
body .frame-code .frame-file {
background: #253A47;
color: #eee;
text-shadow: none;
box-shadow: none;
font-family: inherit;
}
body .frame-code .frame-file strong {
color: #fff;
font-weight: normal;
}
body .frame-comments {
background: #283E4D;
box-shadow: none;
}
body .frame-comments.empty:before {
color: #789AAB;
}
body .details-container {
border: 0;
}
body .details {
background-color: #eee;
border-left: 8px solid #ddd;
padding: 1rem;
}
body .code-block {
background: #2C4454;
box-shadow: none;
font-family: "DejaVu Sans Mono", Menlo, Monaco, Consolas, Courier, monospace;
font-size: 13px;
}
body .handler.active {
background: #666;
background: #e6e6e6;
}

View File

@@ -706,8 +706,8 @@ form:
help: PLUGIN_ADMIN.CACHE_PERMS_HELP
highlight: '0755'
options:
1: '0755'
0: '0775'
'0755': '0755'
'0775': '0775'
images.debug:

View File

@@ -55,7 +55,7 @@ form:
help: PLUGIN_ADMIN.LANGUAGE_HELP
security:
title: Security
title: PLUGIN_ADMIN.ACCESS_LEVELS
type: section
security: admin.super
@@ -82,4 +82,4 @@ form:
label: PLUGIN_ADMIN.SITE_ACCESS
multiple: false
validate:
type: array
type: array

View File

@@ -168,6 +168,10 @@ zip:
type: file
thumb: media/thumb-zip.png
mime: application/zip
7z:
type: file
thumb: media/thumb-7zip.png
mime: application/x-7z-compressed
gz:
type: file
thumb: media/thumb-gz.png

View File

@@ -97,7 +97,7 @@ debugger:
images:
default_image_quality: 85 # Default image quality to use when resampling images (85%)
cache_all: false # Cache all image by default
cache_perms: 0755 # Default cache folder perms. Usually 0755 or 0775 depending on setup
cache_perms: '0755' # MUST BE IN QUOTES!! Default cache folder perms. Usually '0755' or '0775'
debug: false # Show an overlay over images indicating the pixel depth of the image when working with retina for example
media:

View File

@@ -2,8 +2,9 @@
// Some standard defines
define('GRAV', true);
define('GRAV_VERSION', '1.0.2');
define('GRAV_VERSION', '1.0.6');
define('DS', '/');
define('GRAV_PHP_MIN', '5.5.9');
// Directories and Paths
if (!defined('GRAV_ROOT')) {

View File

@@ -43,13 +43,13 @@ INFLECTOR_SINGULAR:
'/([ti])a$/i': '\1um'
'/(n)ews$/i': '\1ews'
'/s$/i': ''
INFLECTOR_UNCOUNTABLE: ['équipment', 'information', 'riz', 'argent', 'espèces', 'séries', 'poisson', 'mouton']
INFLECTOR_UNCOUNTABLE: ['équipement', 'information', 'riz', 'argent', 'espèces', 'séries', 'poisson', 'mouton']
INFLECTOR_IRREGULAR:
'person': 'personnes'
'man': 'Hommes'
'man': 'hommes'
'child': 'enfants'
'sex': 'sexes'
'move': 'déplacemements'
'move': 'déplacements'
INFLECTOR_ORDINALS:
'default': 'ème'
'first': 'er'

View File

@@ -186,7 +186,7 @@ class Assets
$this->base_url = $base_url . '/';
// Register any preconfigured collections
foreach ($config->get('system.assets.collections') as $name => $collection) {
foreach ($config->get('system.assets.collections', []) as $name => $collection) {
$this->registerCollection($name, (array)$collection);
}
}

View File

@@ -338,8 +338,10 @@ class Blueprint implements \ArrayAccess, ExportInterface
if ($field['type'] === 'list') {
// we loop through list to get the actual field
foreach($field['fields'] as $subName => &$subField) {
$this->parseFormField($subField);
if (isset($field['fields']) && $field['fields']) {
foreach($field['fields'] as $subName => &$subField) {
$this->parseFormField($subField);
}
}
} else {
$this->parseFormField($field);

View File

@@ -211,7 +211,7 @@ class Data implements DataInterface, \ArrayAccess, \Countable, ExportInterface
*/
public function extra()
{
return $this->blueprints()->extra($this->items);
return $this->blueprints ? $this->blueprints->extra($this->items) : array();
}
/**

View File

@@ -283,7 +283,15 @@ class Validation
protected static function filterFile($value, array $params, array $field)
{
return (array) $value;
if (isset($field['multiple']) && $field['multiple'] == true) {
return (array) $value;
}
if (is_array($value)) {
return reset($value);
}
return $value;
}
/**

View File

@@ -2,51 +2,54 @@
namespace Grav\Common\Errors;
use Grav\Common\Grav;
use Whoops\Handler\CallbackHandler;
use Whoops\Handler\HandlerInterface;
use Whoops\Run;
use Whoops;
/**
* Class Debugger
* @package Grav\Common
*/
class Errors extends Run
class Errors
{
public function pushHandler($handler, $key = null)
{
if (is_callable($handler)) {
$handler = new CallbackHandler($handler);
}
if (!$handler instanceof HandlerInterface) {
throw new \InvalidArgumentException(
"Argument to " . __METHOD__ . " must be a callable, or instance of"
. "Whoops\\Handler\\HandlerInterface"
);
}
// Store with key if provided
if ($key) {
$this->handlerStack[$key] = $handler;
} else {
$this->handlerStack[] = $handler;
}
return $this;
}
public function resetHandlers()
{
$grav = Grav::instance();
$config = $grav['config']->get('system.errors');
if (isset($config['display']) && !$config['display']) {
unset($this->handlerStack['pretty']);
$this->handlerStack = array('simple' => new SimplePageHandler()) + $this->handlerStack;
}
if (isset($config['log']) && !$config['log']) {
unset($this->handlerStack['log']);
}
}
// Setup Whoops-based error handler
$whoops = new \Whoops\Run;
if (isset($config['display'])) {
if ($config['display']) {
$error_page = new Whoops\Handler\PrettyPageHandler;
$error_page->setPageTitle('Crikey! There was an error...');
$error_page->addResourcePath(GRAV_ROOT . '/system/assets');
$error_page->addCustomCss('whoops.css');
$whoops->pushHandler($error_page);
} else {
$whoops->pushHandler(new SimplePageHandler);
}
}
if (function_exists('Whoops\isAjaxRequest')) { //Whoops 2
if (Whoops\isAjaxRequest()) {
$whoops->pushHandler(new Whoops\Handler\JsonResponseHandler);
}
} else { //Whoops 1
$json_page = new Whoops\Handler\JsonResponseHandler;
$json_page->onlyForAjaxRequests(true);
}
if (isset($config['log']) && $config['log']) {
$logger = $grav['log'];
$whoops->pushHandler(function($exception, $inspector, $run) use ($logger) {
try {
$logger->addCritical($exception->getMessage() . ' - Trace: ' . $exception->getTraceAsString());
} catch (\Exception $e) {
echo $e;
}
}, 'log');
}
$whoops->register();
}
}

View File

@@ -281,6 +281,10 @@ class Installer
{
$msg = 'Unknown Error';
if (is_string(self::$error)) {
return self::$error;
}
switch (self::$error) {
case 0:
$msg = 'No Error';
@@ -333,7 +337,7 @@ class Installer
/**
* Allows to manually set an error
* @param $error the Error code
* @param int|string $error the Error code
*/
public static function setError($error)

View File

@@ -1,22 +1,32 @@
<?php
namespace Grav\Common\GPM;
use Grav\Common\Grav;
/**
* Class Upgrader
*
* @package Grav\Common\GPM
*/
class Upgrader
{
/**
* Remote details about latest Grav version
*
* @var Packages
*/
private $remote;
/**
* Internal cache
*
* @var Iterator
*/
protected $cache;
/**
* Creates a new GPM instance with Local and Remote packages available
*
* @param boolean $refresh Applies to Remote Packages only and forces a refetch of data
* @param callable $callback Either a function or callback in array notation
*/
@@ -27,6 +37,7 @@ class Upgrader
/**
* Returns the release date of the latest version of Grav
*
* @return string
*/
public function getReleaseDate()
@@ -36,6 +47,7 @@ class Upgrader
/**
* Returns the version of the installed Grav
*
* @return string
*/
public function getLocalVersion()
@@ -45,6 +57,7 @@ class Upgrader
/**
* Returns the version of the remotely available Grav
*
* @return string
*/
public function getRemoteVersion()
@@ -54,6 +67,7 @@ class Upgrader
/**
* Returns an array of assets available to download remotely
*
* @return array
*/
public function getAssets()
@@ -63,6 +77,7 @@ class Upgrader
/**
* Returns the changelog list for each version of Grav
*
* @param string $diff the version number to start the diff from
*
* @return array return the changelog list for each version
@@ -72,8 +87,21 @@ class Upgrader
return $this->remote->getChangelog($diff);
}
/**
* @return bool
*/
public function meetsRequirements()
{
if (version_compare(PHP_VERSION, GRAV_PHP_MIN, '<')) {
return false;
}
return true;
}
/**
* Checks if the currently installed Grav is upgradable to a newer version
*
* @return boolean True if it's upgradable, False otherwise.
*/
public function isUpgradable()
@@ -83,6 +111,7 @@ class Upgrader
/**
* Checks if Grav is currently symbolically linked
*
* @return boolean True if Grav is symlinked, False otherwise.
*/

View File

@@ -417,41 +417,49 @@ class Grav extends Container
*/
public function shutdown()
{
if ($this['config']->get('system.debugger.shutdown.close_connection')) {
// Prevent user abort.
if (function_exists('ignore_user_abort')) {
@ignore_user_abort(true);
}
// Close the session.
if (isset($this['session'])) {
$this['session']->close();
}
if ($this['config']->get('system.cache.gzip')) {
// Flush gzhandler buffer if gzip was enabled.
ob_end_flush();
} else {
// Otherwise prevent server from compressing the output.
header('Content-Encoding: none');
}
// Get length and close the connection.
header('Content-Length: ' . ob_get_length());
header("Connection: close");
// flush the regular buffer
ob_end_flush();
@ob_flush();
flush();
// Fix for fastcgi close connection issue.
if (function_exists('fastcgi_finish_request')) {
@fastcgi_finish_request();
}
// Prevent user abort allowing onShutdown event to run without interruptions.
if (function_exists('ignore_user_abort')) {
@ignore_user_abort(true);
}
// Close the session allowing new requests to be handled.
if (isset($this['session'])) {
$this['session']->close();
}
if ($this['config']->get('system.debugger.shutdown.close_connection', true)) {
// Flush the response and close the connection to allow time consuming tasks to be performed without leaving
// the connection to the client open. This will make page loads to feel much faster.
// FastCGI allows us to flush all response data to the client and finish the request.
$success = function_exists('fastcgi_finish_request') ? @fastcgi_finish_request() : false;
if (!$success) {
// Unfortunately without FastCGI there is no way to close the connection. We need to ask browser to
// close the connection for us.
if ($this['config']->get('system.cache.gzip')) {
// Flush gzhandler buffer if gzip setting was enabled.
ob_end_flush();
} else {
// Without gzip we have no other choice than to prevent server from compressing the output.
// This action turns off mod_deflate which would prevent us from closing the connection.
header('Content-Encoding: none');
}
// Get length and close the connection.
header('Content-Length: ' . ob_get_length());
header("Connection: close");
// Finally flush the regular buffer.
ob_end_flush();
@ob_flush();
flush();
}
}
// Run any time consuming tasks.
$this->fireEvent('onShutdown');
}

View File

@@ -3,6 +3,7 @@ namespace Grav\Common\Markdown;
use Grav\Common\GravTrait;
use Grav\Common\Uri;
use RocketTheme\Toolbox\Event\Event;
/**
* A trait to add some custom processing to the identifyLink() method in Parsedown and ParsedownExtra
@@ -15,9 +16,11 @@ trait ParsedownGravTrait
protected $base_url;
protected $pages_dir;
protected $special_chars;
protected $twig_link_regex = '/\!*\[(?:.*)\]\((\{([\{%#])\s*(.*?)\s*(?:\2|\})\})\)/';
public $completable_blocks = [];
public $continuable_blocks = [];
/**
* Initialization function to setup key variables needed by the MarkdownGravLinkTrait
*
@@ -26,8 +29,10 @@ trait ParsedownGravTrait
*/
protected function init($page, $defaults)
{
$grav = self::getGrav();
$this->page = $page;
$this->pages = self::getGrav()['pages'];
$this->pages = $grav['pages'];
$this->BlockTypes['{'] [] = "TwigTag";
$this->base_url = rtrim(self::getGrav()['base_url'] . self::getGrav()['pages']->base(), '/');
$this->pages_dir = self::getGrav()['locator']->findResource('page://');
@@ -41,8 +46,67 @@ trait ParsedownGravTrait
$this->setUrlsLinked($defaults['auto_url_links']);
$this->setMarkupEscaped($defaults['escape_markup']);
$this->setSpecialChars($defaults['special_chars']);
$grav->fireEvent('onMarkdownInitialized', new Event(['markdown' => $this]));
}
/**
* Be able to define a new Block type or override an existing one
*
* @param $type
* @param $tag
*/
public function addBlockType($type, $tag, $continuable = false, $completable = false)
{
$this->BlockTypes[$type] []= $tag;
if ($continuable) {
$this->continuable_blocks[] = $tag;
}
if ($completable) {
$this->completable_blocks[] = $tag;
}
}
/**
* Be able to define a new Inline type or override an existing one
*
* @param $type
* @param $tag
*/
public function addInlineType($type, $tag)
{
$this->InlineTypes[$type] []= $tag;
$this->inlineMarkerList .= $type;
}
/**
* Overrides the default behavior to allow for plugin-provided blocks to be continuable
*
* @param $Type
* @return bool
*/
protected function isBlockContinuable($Type)
{
$continuable = in_array($Type, $this->continuable_blocks) || method_exists($this, 'block'.$Type.'Continue');
return $continuable;
}
/**
* Overrides the default behavior to allow for plugin-provided blocks to be completable
*
* @param $Type
* @return bool
*/
protected function isBlockCompletable($Type)
{
$completable = in_array($Type, $this->completable_blocks) || method_exists($this, 'block'.$Type.'Complete');
return $completable;
}
/**
* Make the element function publicly accessible, Medium uses this to render from Twig
*
@@ -73,7 +137,7 @@ trait ParsedownGravTrait
*/
protected function blockTwigTag($Line)
{
if (preg_match('/[{%|{{|{#].*[#}|}}|%}]/', $Line['body'], $matches)) {
if (preg_match('/(?:{{|{%|{#)(.*)(?:}}|%}|#})/', $Line['body'], $matches)) {
$Block = array(
'markup' => $Line['body'],
);
@@ -208,7 +272,7 @@ trait ParsedownGravTrait
if (isset($url['query'])) {
$actions = array_reduce(explode('&', $url['query']), function ($carry, $item) {
$parts = explode('=', $item, 2);
$value = isset($parts[1]) ? $parts[1] : null;
$value = isset($parts[1]) ? $parts[1] : true;
$carry[$parts[0]] = $value;
return $carry;
@@ -230,7 +294,7 @@ trait ParsedownGravTrait
if ($attrib == 'classes') {
$attrib = 'class';
}
$excerpt['element']['attributes'][$attrib] = $value;
$excerpt['element']['attributes'][$attrib] = str_replace(',', ' ', $value);
unset($actions[$key]);
}
}
@@ -255,4 +319,16 @@ trait ParsedownGravTrait
return $excerpt;
}
// For extending this class via plugins
public function __call($method, $args)
{
if (isset($this->$method) === true) {
$func = $this->$method;
return call_user_func_array($func, $args);
}
}
}

View File

@@ -80,7 +80,8 @@ class ImageFile extends Image
// Asking the cache for the cacheFile
try {
$perms = octdec(self::getGrav()['config']->get('system.images.cache_perms', '0755'));
$perms = self::getGrav()['config']->get('system.images.cache_perms', '0755');
$perms = octdec($perms);
$file = $this->cache->setDirectoryMode($perms)->getOrCreateFile($cacheFile, $conditions, $generate, $actual);
} catch (GenerationError $e) {
$file = $e->getNewFile();

View File

@@ -6,6 +6,7 @@ use Grav\Common\Page\Page;
use Grav\Common\Config\Config;
use RocketTheme\Toolbox\Event\EventDispatcher;
use RocketTheme\Toolbox\Event\EventSubscriberInterface;
use RocketTheme\Toolbox\File\YamlFile;
/**
* The Plugin object just holds the id and path to a plugin.
@@ -182,4 +183,26 @@ class Plugin implements EventSubscriberInterface
// Return configurations as a new data config class
return new Data($header);
}
/**
* Persists to disk the plugin parameters currently stored in the Grav Config object
*
* @param string $plugin_name The name of the plugin whose config it should store.
*
* @return true
*/
public static function saveConfig($plugin_name) {
if (!$plugin_name) {
return false;
}
$locator = Grav::instance()['locator'];
$filename = 'config://plugins/' . $plugin_name . '.yaml';
$file = YamlFile::instance($locator->findResource($filename, true, true));
$content = Grav::instance()['config']->get('plugins.' . $plugin_name);
$file->save($content);
$file->free();
return true;
}
}

View File

@@ -108,10 +108,45 @@ class ConfigServiceProvider implements ServiceProviderInterface
$files += (new ConfigFileFinder)->locateFiles($paths);
$paths = $locator->findResources('plugins://');
$files += (new ConfigFileFinder)->setBase('plugins')->locateInFolders($paths, 'languages');
$paths = static::pluginFolderPaths($paths, 'languages');
$files += (new ConfigFileFinder)->locateFiles($paths);
}
$languages = new CompiledLanguages($cache, $files, GRAV_ROOT);
return $languages->name("master-{$setup->environment}")->load();
}
/**
* Find specific paths in plugins
*
* @param $plugins
* @param $folder_path
* @return array
*/
private static function pluginFolderPaths($plugins, $folder_path)
{
$paths = [];
foreach ($plugins as $path) {
$iterator = new \DirectoryIterator($path);
/** @var \DirectoryIterator $directory */
foreach ($iterator as $directory) {
if (!$directory->isDir() || $directory->isDot()) {
continue;
}
// Path to the languages folder
$lang_path = $directory->getPathName() . '/' . $folder_path;
// If this folder exists, add it to the list of paths
if (file_exists($lang_path)) {
$paths []= $lang_path;
}
}
}
return $paths;
}
}

View File

@@ -12,33 +12,7 @@ class ErrorServiceProvider implements ServiceProviderInterface
{
public function register(Container $container)
{
// Setup Whoops-based error handler
$errors = new Errors;
$error_page = new PrettyPageHandler;
$error_page->setPageTitle('Crikey! There was an error...');
$error_page->setEditor('sublime');
$error_page->addResourcePath(GRAV_ROOT . '/system/assets');
$error_page->addCustomCss('whoops.css');
$json_page = new JsonResponseHandler;
$json_page->onlyForAjaxRequests(true);
$errors->pushHandler($error_page, 'pretty');
$errors->pushHandler(new PlainTextHandler, 'text');
$errors->pushHandler($json_page, 'json');
$logger = $container['log'];
$errors->pushHandler(function (\Exception $exception, $inspector, $run) use ($logger) {
try {
$logger->addCritical($exception->getMessage() . ' - Trace: ' . $exception->getTraceAsString());
} catch (\Exception $e) {
echo $e;
}
}, 'log');
$errors->register();
$container['errors'] = $errors;
}
}

View File

@@ -20,4 +20,26 @@ class Theme extends Plugin
parent::__construct($name, $grav, $config);
}
/**
* Persists to disk the theme parameters currently stored in the Grav Config object
*
* @param string $theme_name The name of the theme whose config it should store.
*
* @return true
*/
public static function saveConfig($theme_name) {
if (!$theme_name) {
return false;
}
$locator = Grav::instance()['locator'];
$filename = 'config://themes/' . $theme_name . '.yaml';
$file = YamlFile::instance($locator->findResource($filename, true, true));
$content = Grav::instance()['config']->get('themes.' . $theme_name);
$file->save($content);
$file->free();
return true;
}
}

View File

@@ -80,7 +80,10 @@ class Twig
$active_language = $language->getActive();
$language_append = $active_language ? '/'.$active_language : '';
$language_append = '';
if ($language->getDefault() != $active_language || $config->get('system.languages.include_default_lang') === true) {
$language_append = $active_language ? '/' . $active_language : '';
}
// handle language templates if available
if ($language->enabled()) {

View File

@@ -20,6 +20,10 @@ trait WriteCacheFileTrait
*/
protected function writeCacheFile($file, $content)
{
if (empty($file)) {
return;
}
if (!isset(self::$umask)) {
self::$umask = self::getGrav()['config']->get('system.twig.umask_fix', false);
}

View File

@@ -46,7 +46,7 @@ class Uri
// set the base
if (isset($_SERVER['HTTPS'])) {
$base = (@$_SERVER['HTTPS'] == 'on') ? 'https://' : 'http://';
$base = (strtolower(@$_SERVER['HTTPS']) == 'on') ? 'https://' : 'http://';
} else {
$base = 'http://';
}

View File

@@ -2,14 +2,24 @@
namespace Grav\Console\Cli;
use Grav\Common\Filesystem\Folder;
use Grav\Console\ConsoleCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Formatter\OutputFormatterStyle;
/**
* Class CleanCommand
* @package Grav\Console\Cli
*/
class CleanCommand extends ConsoleCommand
class CleanCommand extends Command
{
/* @var InputInterface $output */
protected $input;
/* @var OutputInterface $output */
protected $output;
/**
* @var array
*/
@@ -83,7 +93,7 @@ class CleanCommand extends ConsoleCommand
'vendor/maximebf/debugbar/bower.json',
'vendor/maximebf/debugbar/composer.json',
'vendor/maximebf/debugbar/.bowerrc',
'vendor/maximebf/debugbar/src/Debugbar/Resources/vendor',
'vendor/maximebf/debugbar/src/DebugBar/Resources/vendor',
'vendor/maximebf/debugbar/demo',
'vendor/maximebf/debugbar/docs',
'vendor/maximebf/debugbar/tests',
@@ -174,8 +184,10 @@ class CleanCommand extends ConsoleCommand
/**
* @return int|null|void
*/
protected function serve()
protected function execute(InputInterface $input, OutputInterface $output)
{
$this->setupConsole($input, $output);
$this->cleanPaths();
}
@@ -183,12 +195,9 @@ class CleanCommand extends ConsoleCommand
{
$this->output->writeln('');
$this->output->writeln('<red>DELETING</red>');
$anything = false;
foreach ($this->paths_to_remove as $path) {
$path = ROOT_DIR . $path;
if (is_dir($path) && @Folder::delete($path)) {
$anything = true;
$this->output->writeln('<red>dir: </red>' . $path);
@@ -197,12 +206,30 @@ class CleanCommand extends ConsoleCommand
$this->output->writeln('<red>file: </red>' . $path);
}
}
if (!$anything) {
$this->output->writeln('');
$this->output->writeln('<green>Nothing to clean...</green>');
}
}
/**
* Set colors style definition for the formatter.
*
* @param InputInterface $input
* @param OutputInterface $output
*/
public function setupConsole(InputInterface $input, OutputInterface $output)
{
$this->input = $input;
$this->output = $output;
$this->output->getFormatter()->setStyle('normal', new OutputFormatterStyle('white'));
$this->output->getFormatter()->setStyle('yellow', new OutputFormatterStyle('yellow', null, array('bold')));
$this->output->getFormatter()->setStyle('red', new OutputFormatterStyle('red', null, array('bold')));
$this->output->getFormatter()->setStyle('cyan', new OutputFormatterStyle('cyan', null, array('bold')));
$this->output->getFormatter()->setStyle('green', new OutputFormatterStyle('green', null, array('bold')));
$this->output->getFormatter()->setStyle('magenta', new OutputFormatterStyle('magenta', null, array('bold')));
$this->output->getFormatter()->setStyle('white', new OutputFormatterStyle('white', null, array('bold')));
}
}

View File

@@ -162,7 +162,7 @@ class SandboxCommand extends ConsoleCommand
$to = $this->destination . $target;
$this->output->writeln(' <cyan>' . $source . '</cyan> <comment>-></comment> ' . $to);
Folder::rcopy($from, $to);
@Folder::rcopy($from, $to);
}
}

View File

@@ -82,6 +82,18 @@ class SelfupgradeCommand extends ConsoleCommand
$remote = $this->upgrader->getRemoteVersion();
$release = strftime('%c', strtotime($this->upgrader->getReleaseDate()));
if (!$this->upgrader->meetsRequirements()) {
$this->output->writeln("");
$this->output->writeln("<red>ATTENTION:</red>");
$this->output->writeln(" Grav has increased the minimum PHP requirement.");
$this->output->writeln(" You are currently running PHP <red>" . PHP_VERSION . "</red>, but PHP <green>" . GRAV_PHP_MIN . "</green> is required.");
$this->output->writeln(" Additional information: <white>http://getgrav.org/blog/changing-php-requirements-to-5.5</white>");
$this->output->writeln("");
$this->output->writeln("Selfupgrade aborted.");
$this->output->writeln("");
exit;
}
if (!$this->upgrader->isUpgradable()) {
$this->output->writeln("You are already running the latest version of Grav (v" . $local . ") released on " . $release);
exit;

View File

@@ -1,8 +0,0 @@
<?php
namespace Grav;
class TestCase extends \PHPUnit_Framework_TestCase
{
}

View File

@@ -1,6 +0,0 @@
<?php
error_reporting(E_ALL);
date_default_timezone_set(@date_default_timezone_get());
require_once __DIR__.'/../../vendor/autoload.php';
require_once __DIR__.'/Grav/TestCase.php';

View File

@@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
bootstrap="./bootstrap.php"
>
<testsuites>
<testsuite name="Full Grav Test Suite">
<directory>./Grav/</directory>
</testsuite>
</testsuites>
</phpunit>

View File

@@ -0,0 +1,12 @@
:8080
gzip
fastcgi / 127.0.0.1:9000 {
ext .php
split .php
index index.php
}
rewrite {
regexp .*
ext /
to /index.php?_url={uri}
}

View File

@@ -44,7 +44,7 @@ RewriteRule .* index.php [L]
## Begin - Security
# Block all direct access for these folders
RewriteRule ^(.git|cache|bin|logs|backup)/(.*) error [F]
RewriteRule ^(.git|cache|bin|logs|backup|webserver-configs)/(.*) error [F]
# Block access to specific file types for these system folders
RewriteRule ^(system|vendor)/(.*)\.(txt|xml|md|html|yaml|php|pl|py|cgi|twig|sh|bat)$ error [F]
# Block access to specific file types for these user folders
@@ -54,7 +54,7 @@ RewriteRule \.md$ error [F]
# Block all direct access to files and folders beginning with a dot
RewriteRule (^\.|/\.) - [F]
# Block access to specific files in the root folder
RewriteRule ^(LICENSE.txt|composer.lock|composer.json|nginx.conf|web.config|htaccess.txt|\.htaccess)$ error [F]
RewriteRule ^(LICENSE.txt|composer.lock|composer.json|\.htaccess)$ error [F]
## End - Security
</IfModule>