Use new method of getting base URL

This commit is contained in:
Matias Griese
2014-11-14 20:37:44 +02:00
parent 4fc65079d3
commit 6e73469691
2 changed files with 2 additions and 2 deletions

View File

@@ -187,7 +187,7 @@ class AdminPlugin extends Plugin
public function onTwigSiteVariables()
{
// TODO: use real plugin name instead
$theme_url = $this->config->get('system.base_url_relative') . '/user/plugins/admin/themes/' . $this->theme;
$theme_url = $this->grav['base_url'] . '/user/plugins/admin/themes/' . $this->theme;
$twig = $this->grav['twig'];
// Dynamic type support

View File

@@ -50,7 +50,7 @@ class Popularity
{
/** @var Page $page */
$page = self::$grav['page'];
$relative_url = str_replace($this->config->get('system.base_url_relative'), '', $page->url());
$relative_url = str_replace(self::$grav['base_url_relative'], '', $page->url());
// Don't track error pages or pages that have no route
if ($page->template() == 'error' || !$page->route()) {