From 99f7fa7daf1ba4734be741bde0385b526b7a7d38 Mon Sep 17 00:00:00 2001 From: Barry Anders Date: Thu, 1 Jun 2017 10:27:24 -0500 Subject: [PATCH] Fix #7 and #9 --- CHANGELOG.md | 7 +++++++ LICENSE.md | 2 +- README.md | 4 ++-- blackhole.php | 6 +++--- blueprints.yaml | 8 ++++---- 5 files changed, 17 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cc29fa2..2277226 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# v0.5.2 +## 6/1/2017 + +1. [](#bugfix) + * Fixes [#7](https://github.com/barryanders/grav-plugin-blackhole/issues/7) and [#9](https://github.com/barryanders/grav-plugin-blackhole/issues/9) + + # v0.5.1 ## 4/9/2017 diff --git a/LICENSE.md b/LICENSE.md index 1cd587d..71e1de0 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2016 Barry Anders +Copyright (c) Sohma Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/README.md b/README.md index 0ceb433..d76b849 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,6 @@ bin/plugin blackhole generate https://website.com static ## Author -| [![twitter/barryanders](https://avatars3.githubusercontent.com/u/5648875?v=2&s=70)](http://twitter.com/barryanders "Follow @barryanders on Twitter") | +| ![Sohma](https://avatars3.githubusercontent.com/u/5648875?v=2&s=70) | |---| -| [Barry Anders](https://barryanders.github.io/) | +| [Sohma](http://sohma.net) | diff --git a/blackhole.php b/blackhole.php index 144e26e..c7eb2e2 100644 --- a/blackhole.php +++ b/blackhole.php @@ -20,7 +20,7 @@ public static function getSubscribedEvents() public function onPageInitialized() { // get page routes - if ($_GET['pages'] == 'all') { + if (!empty($_GET['pages']) && $_GET['pages'] == 'all') { ob_start(); // get destination from admin plugin $destination = $this->config->get('plugins.blackhole.destination'); @@ -35,7 +35,7 @@ public function onPageInitialized() $routes[] = $route; } } - if ($_GET['destination']) { + if (!empty($_GET['destination'])) { $this->content = $destination; } else { $this->content = json_encode($routes, JSON_UNESCAPED_SLASHES); @@ -46,7 +46,7 @@ public function onPageInitialized() public function onOutputRendered() { // Push routes to ?pages=all - if ($_GET['pages'] == 'all') { + if (!empty($_GET['pages']) && $_GET['pages'] == 'all') { ob_end_clean(); echo $this->content; } diff --git a/blueprints.yaml b/blueprints.yaml index 2a1bb41..2db49e2 100644 --- a/blueprints.yaml +++ b/blueprints.yaml @@ -1,13 +1,13 @@ name: Blackhole -version: 0.5.1 +version: 0.5.2 description: Generates an html copy of your website icon: circle author: - name: Barry + name: Sohma homepage: https://github.com/barryanders/grav-plugin-blackhole keywords: grav, plugin, static, site, generator -bugs: https://github.com/barryanders/grav-plugin-blackhole/issues -docs: https://github.com/barryanders/grav-plugin-blackhole/blob/master/README.md +bugs: https://github.com/itssohma/grav-plugin-blackhole/issues +docs: https://github.com/itssohma/grav-plugin-blackhole/blob/master/README.md license: MIT form: