From cc68065f94d644f743877e26f540f0ccacd2fd80 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Fri, 10 Oct 2014 15:57:29 -0600 Subject: [PATCH 1/3] Fix for extended image url handling in markdown --- .../Common/Markdown/MarkdownGravLinkTrait.php | 3 ++- system/src/Grav/Common/Uri.php | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/system/src/Grav/Common/Markdown/MarkdownGravLinkTrait.php b/system/src/Grav/Common/Markdown/MarkdownGravLinkTrait.php index 56a1d7d84..7ac0b2000 100644 --- a/system/src/Grav/Common/Markdown/MarkdownGravLinkTrait.php +++ b/system/src/Grav/Common/Markdown/MarkdownGravLinkTrait.php @@ -5,6 +5,7 @@ use Grav\Common\Debugger; use Grav\Common\GravTrait; use Grav\Common\Page\Medium; +use Grav\Common\Uri; /** * A trait to add some custom processing to the identifyLink() method in Parsedown and ParsedownExtra @@ -97,7 +98,7 @@ protected function identifyLink($Excerpt) } } else { // not a current page media file, see if it needs converting to relative - $Excerpt['element']['attributes']['src'] = $this->convertUrl($url['path']); + $Excerpt['element']['attributes']['src'] = $this->convertUrl(Uri::build_url($url)); } } } diff --git a/system/src/Grav/Common/Uri.php b/system/src/Grav/Common/Uri.php index e1cefae30..3e914334d 100644 --- a/system/src/Grav/Common/Uri.php +++ b/system/src/Grav/Common/Uri.php @@ -333,4 +333,23 @@ public function ip() return $ipaddress; } + + /** + * The opposite of built-in PHP method parse_url() + * + * @param $parsed_url + * @return string + */ + public static function build_url($parsed_url) { + $scheme = isset($parsed_url['scheme']) ? $parsed_url['scheme'] . '://' : ''; + $host = isset($parsed_url['host']) ? $parsed_url['host'] : ''; + $port = isset($parsed_url['port']) ? ':' . $parsed_url['port'] : ''; + $user = isset($parsed_url['user']) ? $parsed_url['user'] : ''; + $pass = isset($parsed_url['pass']) ? ':' . $parsed_url['pass'] : ''; + $pass = ($user || $pass) ? "$pass@" : ''; + $path = isset($parsed_url['path']) ? $parsed_url['path'] : ''; + $query = isset($parsed_url['query']) ? '?' . $parsed_url['query'] : ''; + $fragment = isset($parsed_url['fragment']) ? '#' . $parsed_url['fragment'] : ''; + return "$scheme$user$pass$host$port$path$query$fragment"; + } } From d2bfacad4eea6de1ef26c87b6a2bea72f3360ace Mon Sep 17 00:00:00 2001 From: Djamil Legato Date: Fri, 10 Oct 2014 15:07:47 -0700 Subject: [PATCH 2/3] Resetting permissions of binaries after an upgrade --- system/src/Grav/Common/GPM/Installer.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/system/src/Grav/Common/GPM/Installer.php b/system/src/Grav/Common/GPM/Installer.php index 84574dd86..dc2d563c2 100644 --- a/system/src/Grav/Common/GPM/Installer.php +++ b/system/src/Grav/Common/GPM/Installer.php @@ -143,6 +143,12 @@ public static function sophisticatedInstall($zip, $install_path, $tmp) if (is_dir($path)) { Folder::delete($path); Folder::move($tmp . DS . $filename, $path); + + if ($fileinfo['basename'] == 'bin') { + foreach (glob($path . DS . '*') as $file) { + @chmod($file, 0755); + } + } } else { if (is_file($path)) { @unlink($path); From 538fa23b9dda476db9eed016c3b113ea7447ad9b Mon Sep 17 00:00:00 2001 From: Djamil Legato Date: Fri, 10 Oct 2014 15:13:19 -0700 Subject: [PATCH 3/3] Rereleasing 0.9.3 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 40a7657ab..d9840d26d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # ![](https://avatars1.githubusercontent.com/u/8237355?v=2&s=50) Grav -Grav is a **Fast**, **Simple**, and **Flexible**, file-based Web-platform. There is **Zero** installation required. Just extract the ZIP archive, and you are already up and running. It follows similar principals to other flat-file CMS platforms, but has a different design philosophy than most. +Grav is a **Fast**, **Simple**, and **Flexible**, file-based Web-platform. There is **Zero** installation required. Just extract the ZIP archive, and you are already up and running. It follows similar principals to other flat-file CMS platforms, but has a different design philosophy than most. Grav comes with a powerful **Package Management System** to allow for simple installation and upgrading of plugins and themes, as well as simple updating of Grav itself. The underlying architecture of Grav has been designed to use well-established and _best-in-class_ technologies, where applicable, to ensure that Grav is simple to use and easy to extend. Some of these key technologies include: