diff --git a/CHANGELOG.md b/CHANGELOG.md index 50f855b2a..1e160286d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# v0.9.36 +## XX/XX/2015 + +1. [](#improved) + * Added isSymlink method in GPM to determine if Grav is symbolically linked or not + # v0.9.35 ## 08/06/2015 @@ -5,13 +11,12 @@ * Added `body_classes` field * Added `visiblity` toggle and help tooltips on new page form * Added new `Page.unsetRoute()` method to allow admin to regenerate the route -1. [](#improved) +2. [](#improved) * User save no longer stores username each time * Page list form field now shows all pages except root * Removed required option from page title * Added configuration settings for running Nginx in sub directory -1. [](#bugfix) - * Fixed issue with GPM and cURL throwing `Undefined offset: 1` error +3. [](#bugfix) * Fixed deep translation merging * Fixed broken **metadata** merging with site defaults * Fixed broken **summary** field diff --git a/system/src/Grav/Common/GPM/Installer.php b/system/src/Grav/Common/GPM/Installer.php index e2ebd0ed2..859257f3b 100644 --- a/system/src/Grav/Common/GPM/Installer.php +++ b/system/src/Grav/Common/GPM/Installer.php @@ -287,4 +287,14 @@ class Installer { return self::$error; } + + /** + * Allows to manually set an error + * @param $error the Error code + */ + + public static function setError($error) + { + self::$error = $error; + } } diff --git a/system/src/Grav/Common/GPM/Remote/Grav.php b/system/src/Grav/Common/GPM/Remote/Grav.php index 7b9cef274..d0a62a25f 100644 --- a/system/src/Grav/Common/GPM/Remote/Grav.php +++ b/system/src/Grav/Common/GPM/Remote/Grav.php @@ -87,4 +87,9 @@ class Grav extends AbstractPackageCollection { return version_compare(GRAV_VERSION, $this->getVersion(), '<'); } + + public function isSymlink() + { + return is_link(GRAV_ROOT . DS . 'index.php'); + } } diff --git a/system/src/Grav/Common/GPM/Upgrader.php b/system/src/Grav/Common/GPM/Upgrader.php index f9e3c0e81..590ad4df7 100644 --- a/system/src/Grav/Common/GPM/Upgrader.php +++ b/system/src/Grav/Common/GPM/Upgrader.php @@ -80,4 +80,14 @@ class Upgrader { return version_compare($this->getLocalVersion(), $this->getRemoteVersion(), "<"); } + + /** + * Checks if Grav is currently symbolically linked + * @return boolean True if Grav is symlinked, False otherwise. + */ + + public function isSymlink() + { + return $this->remote->isSymlink(); + } }