diff --git a/system/src/Grav/Common/GPM/Remote/AbstractPackageCollection.php b/system/src/Grav/Common/GPM/Remote/AbstractPackageCollection.php index 2895793a3..a1cdddfcd 100644 --- a/system/src/Grav/Common/GPM/Remote/AbstractPackageCollection.php +++ b/system/src/Grav/Common/GPM/Remote/AbstractPackageCollection.php @@ -41,10 +41,11 @@ class AbstractPackageCollection extends BaseCollection throw new \RuntimeException("A repository is required to indicate the origin of the remote collection"); } + $channel = Grav::instance()['config']->get('system.gpm.releases', 'stable'); $cache_dir = Grav::instance()['locator']->findResource('cache://gpm', true, true); $this->cache = new FilesystemCache($cache_dir); - $this->repository = $repository . '?v=' . GRAV_VERSION; + $this->repository = $repository . '?v=' . GRAV_VERSION . '&' . $channel . '=1'; $this->raw = $this->cache->fetch(md5($this->repository)); $this->fetch($refresh, $callback); diff --git a/system/src/Grav/Common/GPM/Remote/GravCore.php b/system/src/Grav/Common/GPM/Remote/GravCore.php index 2c16bbb70..31b8c57a6 100644 --- a/system/src/Grav/Common/GPM/Remote/GravCore.php +++ b/system/src/Grav/Common/GPM/Remote/GravCore.php @@ -18,9 +18,10 @@ class GravCore extends AbstractPackageCollection */ public function __construct($refresh = false, $callback = null) { + $channel = Grav::instance()['config']->get('system.gpm.releases', 'stable'); $cache_dir = Grav::instance()['locator']->findResource('cache://gpm', true, true); $this->cache = new FilesystemCache($cache_dir); - $this->repository .= '?v=' . GRAV_VERSION; + $this->repository .= '?v=' . GRAV_VERSION . '&' . $channel . '=1'; $this->raw = $this->cache->fetch(md5($this->repository)); $this->fetch($refresh, $callback); diff --git a/system/src/Grav/Common/GPM/Remote/Plugins.php b/system/src/Grav/Common/GPM/Remote/Plugins.php index 074e5d039..036fc0c2a 100644 --- a/system/src/Grav/Common/GPM/Remote/Plugins.php +++ b/system/src/Grav/Common/GPM/Remote/Plugins.php @@ -21,8 +21,6 @@ class Plugins extends AbstractPackageCollection */ public function __construct($refresh = false, $callback = null) { - $this->repository .= '?v=' . GRAV_VERSION; - parent::__construct($this->repository, $refresh, $callback); } } diff --git a/system/src/Grav/Common/GPM/Remote/Themes.php b/system/src/Grav/Common/GPM/Remote/Themes.php index cc4af7d02..43a5af54d 100644 --- a/system/src/Grav/Common/GPM/Remote/Themes.php +++ b/system/src/Grav/Common/GPM/Remote/Themes.php @@ -21,8 +21,6 @@ class Themes extends AbstractPackageCollection */ public function __construct($refresh = false, $callback = null) { - $this->repository .= '?v=' . GRAV_VERSION; - parent::__construct($this->repository, $refresh, $callback); } }