mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-05-07 02:26:23 +02:00
Added isSymlink logic to determine if Grav is symbolically linked or not.
This commit is contained in:
@@ -168,6 +168,16 @@ class Gpm
|
||||
|
||||
public static function selfupgrade() {
|
||||
$upgrader = new Upgrader();
|
||||
|
||||
if (!Installer::isGravInstance(GRAV_ROOT)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (is_link(GRAV_ROOT . DS . 'index.php')) {
|
||||
Installer::setError(Installer::IS_LINK);
|
||||
return false;
|
||||
}
|
||||
|
||||
$update = $upgrader->getAssets()['grav-update'];
|
||||
$tmp = CACHE_DIR . 'tmp/Grav-' . uniqid();
|
||||
$file = self::_downloadSelfupgrade($update, $tmp);
|
||||
|
||||
Reference in New Issue
Block a user