mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-04-05 04:08:47 +02:00
Call GPM::checkPackagesCanBeInstalled() when trying to install/update a package
This commit is contained in:
@@ -522,6 +522,26 @@ class Admin
|
||||
return $dependencies;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the passed packages list can be updated
|
||||
*
|
||||
* @param $packages
|
||||
*
|
||||
* @throws \Exception
|
||||
* @return bool
|
||||
*/
|
||||
public function checkPackagesCanBeInstalled($packages)
|
||||
{
|
||||
$gpm = $this->gpm();
|
||||
if (!$gpm) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->gpm->checkPackagesCanBeInstalled($packages);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an array of dependencies needed to be installed or updated for a list of packages
|
||||
* to be installed.
|
||||
@@ -539,7 +559,6 @@ class Admin
|
||||
|
||||
$dependencies = $this->gpm->getDependencies($packages);
|
||||
|
||||
|
||||
return $dependencies;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user