Fixed route and blueprints locator stream.

This commit is contained in:
Pereira Ricardo
2015-01-11 18:33:45 +01:00
parent 5f1320c8a6
commit 1fbff2b767
3 changed files with 4 additions and 4 deletions

View File

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

View File

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

View File

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