From 704521960e5b44acb3c646770c566eb9a0593c59 Mon Sep 17 00:00:00 2001 From: Flavio Copes Date: Fri, 15 Jul 2016 11:32:57 +0200 Subject: [PATCH 1/5] Make paramsRegex static to prevent issue with calling it statically --- system/src/Grav/Common/Uri.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/src/Grav/Common/Uri.php b/system/src/Grav/Common/Uri.php index 69f6b3802..0e22e9774 100644 --- a/system/src/Grav/Common/Uri.php +++ b/system/src/Grav/Common/Uri.php @@ -78,7 +78,7 @@ private function buildHostname() * * @return string */ - public function paramsRegex() + public static function paramsRegex() { return '/\/([^\:\#\/\?]*' . Grav::instance()['config']->get('system.param_sep') . '[^\:\#\/\?]*)/'; } From 8b6c77b8dd8a41e95030bfc23d7a3b08d519b7ab Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Fri, 15 Jul 2016 08:43:00 -0600 Subject: [PATCH 2/5] bad nginx.conf --- webserver-configs/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webserver-configs/nginx.conf b/webserver-configs/nginx.conf index f002a8767..18db9fdd5 100644 --- a/webserver-configs/nginx.conf +++ b/webserver-configs/nginx.conf @@ -12,7 +12,7 @@ server { # `location /subfolder {` # and the rewrite to use `/subfolder/index.php` location / { - location / { try_files $uri $uri/ /index.php?_url=$uri; } + try_files $uri $uri/ /index.php?_url=$uri; } ## End - Index From cdb575c1bc2768c7eb8a5eb130121ee1dbccbaee Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Fri, 15 Jul 2016 10:02:24 -0600 Subject: [PATCH 3/5] updated changelog --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 34c020e03..b718554db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +# v1.1.1 +## 07/xx/2016 + +1. [](#improved) + * Made `paramsRegex()` static to allow it to be called statically +1. [](#bugfix) + * Fixed a typo in the `webserver-configs/nginx.conf` example + # v1.1.0 ## 07/14/2016 From 5871d1a823931374619bb03060a5741f33f7f450 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Fri, 15 Jul 2016 11:44:16 -0600 Subject: [PATCH 4/5] Fix for invalid HTML chars and very long site titles #701 --- CHANGELOG.md | 1 + system/src/Grav/Common/Backup/ZipBackup.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b718554db..6c2c1aa83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ 1. [](#improved) * Made `paramsRegex()` static to allow it to be called statically 1. [](#bugfix) + * Fixed backup when using very long site titles with invalid characters [grav-plugin-admin#701](https://github.com/getgrav/grav-plugin-admin/issues/701) * Fixed a typo in the `webserver-configs/nginx.conf` example # v1.1.0 diff --git a/system/src/Grav/Common/Backup/ZipBackup.php b/system/src/Grav/Common/Backup/ZipBackup.php index b6fb0c2b7..c7d452b61 100644 --- a/system/src/Grav/Common/Backup/ZipBackup.php +++ b/system/src/Grav/Common/Backup/ZipBackup.php @@ -46,7 +46,7 @@ public static function backup($destination = null, callable $messager = null) } } - $name = Grav::instance()['config']->get('site.title', basename(GRAV_ROOT)); + $name = substr(strip_tags(Grav::instance()['config']->get('site.title', basename(GRAV_ROOT))), 0, 20); $inflector = new Inflector(); From 6e6ff7c0b4c996164c0be5452be01338d16f3dc3 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Sat, 16 Jul 2016 11:07:45 -0600 Subject: [PATCH 5/5] version update --- CHANGELOG.md | 2 +- system/defines.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c2c1aa83..7dbfe81c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ # v1.1.1 -## 07/xx/2016 +## 07/16/2016 1. [](#improved) * Made `paramsRegex()` static to allow it to be called statically diff --git a/system/defines.php b/system/defines.php index dc581d3ba..2cebe6db9 100644 --- a/system/defines.php +++ b/system/defines.php @@ -8,7 +8,7 @@ // Some standard defines define('GRAV', true); -define('GRAV_VERSION', '1.1.0'); +define('GRAV_VERSION', '1.1.1'); define('GRAV_TESTING', false); define('DS', '/'); define('GRAV_PHP_MIN', '5.5.9');