Added isSymlink logic to determine if Grav is symbolically linked or not.

This commit is contained in:
Djamil Legato
2015-08-07 13:33:25 -07:00
parent d28656ce4b
commit 8922f6a486
4 changed files with 33 additions and 3 deletions

View File

@@ -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

View File

@@ -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;
}
}

View File

@@ -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');
}
}

View File

@@ -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();
}
}