mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-03 03:46:30 +01:00
Fixed route and blueprints locator stream.
This commit is contained in:
@@ -144,8 +144,8 @@ class AdminPlugin extends Plugin
|
||||
$this->grav['admin']->routes = $pages->routes();
|
||||
|
||||
// Remove default route from routes.
|
||||
if (isset($this->grav['admin']->routes[$this->grav['config']->get('system.home.alias')])) {
|
||||
unset($this->grav['admin']->routes[$this->grav['config']->get('system.home.alias')]);
|
||||
if (isset($this->grav['admin']->routes['/'])) {
|
||||
unset($this->grav['admin']->routes['/']);
|
||||
}
|
||||
|
||||
$pages->dispatch('/', true)->route($home);
|
||||
|
||||
@@ -198,7 +198,7 @@ class Admin
|
||||
public function blueprints($type)
|
||||
{
|
||||
if ($this->blueprints === null) {
|
||||
$this->blueprints = new Data\Blueprints(ROOT_DIR . 'system/blueprints/');
|
||||
$this->blueprints = new Data\Blueprints($this->grav['locator']->findResource('blueprints://'));
|
||||
}
|
||||
return $this->blueprints->get($type);
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ class Popularity
|
||||
{
|
||||
$this->config = self::$grav['config'];
|
||||
|
||||
$this->data_path = LOG_DIR . 'popularity';
|
||||
$this->data_path = self::$grav['locator']->findResource('log://') . 'popularity';
|
||||
$this->daily_file = $this->data_path.'/'.self::DAILY_FILE;
|
||||
$this->monthly_file = $this->data_path.'/'.self::MONTHLY_FILE;
|
||||
$this->totals_file = $this->data_path.'/'.self::TOTALS_FILE;
|
||||
|
||||
Reference in New Issue
Block a user