mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-22 17:11:07 +00:00
Use a different way to use piwik
This commit is contained in:
parent
07643dde08
commit
077ddbe1ae
3 changed files with 5 additions and 18 deletions
|
@ -20,10 +20,8 @@ services:
|
|||
- { name: twig.extension }
|
||||
|
||||
wallabag.twig_piwik_extension:
|
||||
class: Wallabag\CoreBundle\Twig\WallabagPiwikExtension
|
||||
class: PiwikTwigExtension\PiwikTwigExtension
|
||||
public: false
|
||||
arguments:
|
||||
- "@craue_config"
|
||||
tags:
|
||||
- { name: twig.extension }
|
||||
|
||||
|
|
|
@ -71,6 +71,9 @@
|
|||
<div id="warning_message">
|
||||
You're trying wallabag v2, which is in alpha version. If you find a bug, please have a look to <a href="https://github.com/wallabag/wallabag/issues">our issues list</a> and <a href="https://github.com/wallabag/wallabag/issues/new">open a new if necessary</a>
|
||||
</div>
|
||||
{{ piwik() }}
|
||||
|
||||
{% if craue_setting('piwik_enabled') %}
|
||||
{{ piwik(craue_setting('piwik_host'), craue_setting('piwik_site_id')) }}
|
||||
{% endif %}
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Wallabag\CoreBundle\Twig;
|
||||
|
||||
use Craue\ConfigBundle\Util\Config;
|
||||
use PiwikTwigExtension\PiwikTwigExtension;
|
||||
|
||||
class WallabagPiwikExtension extends PiwikTwigExtension
|
||||
{
|
||||
public function __construct(Config $craueConfig)
|
||||
{
|
||||
parent::__construct($craueConfig->get('piwik_host'), $craueConfig->get('piwik_site_id'), $craueConfig->get('piwik_enabled'));
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue