aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag')
-rw-r--r--src/Wallabag/CoreBundle/Command/InstallCommand.php15
-rw-r--r--src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php15
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/base.html.twig1
-rw-r--r--src/Wallabag/CoreBundle/Twig/WallabagPiwikExtension.php14
4 files changed, 45 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php
index b3e20ceb..93520f9a 100644
--- a/src/Wallabag/CoreBundle/Command/InstallCommand.php
+++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php
@@ -312,6 +312,21 @@ class InstallCommand extends ContainerAwareCommand
312 'value' => 'http://v2.wallabag.org', 312 'value' => 'http://v2.wallabag.org',
313 'section' => 'misc', 313 'section' => 'misc',
314 ], 314 ],
315 [
316 'name' => 'piwik_enabled',
317 'value' => '0',
318 'section' => 'analytics',
319 ],
320 [
321 'name' => 'piwik_host',
322 'value' => 'http://v2.wallabag.org',
323 'section' => 'analytics',
324 ],
325 [
326 'name' => 'piwik_site_id',
327 'value' => '1',
328 'section' => 'analytics',
329 ],
315 ]; 330 ];
316 331
317 foreach ($settings as $setting) { 332 foreach ($settings as $setting) {
diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php
index 5e89c2a9..10b60f30 100644
--- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php
+++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php
@@ -110,6 +110,21 @@ class LoadSettingData extends AbstractFixture implements OrderedFixtureInterface
110 'value' => 'http://v2.wallabag.org', 110 'value' => 'http://v2.wallabag.org',
111 'section' => 'misc', 111 'section' => 'misc',
112 ], 112 ],
113 [
114 'name' => 'piwik_enabled',
115 'value' => '0',
116 'section' => 'analytics',
117 ],
118 [
119 'name' => 'piwik_host',
120 'value' => 'http://v2.wallabag.org',
121 'section' => 'analytics',
122 ],
123 [
124 'name' => 'piwik_site_id',
125 'value' => '1',
126 'section' => 'analytics',
127 ],
113 ]; 128 ];
114 129
115 foreach ($settings as $setting) { 130 foreach ($settings as $setting) {
diff --git a/src/Wallabag/CoreBundle/Resources/views/base.html.twig b/src/Wallabag/CoreBundle/Resources/views/base.html.twig
index 1742b4aa..8ca21728 100644
--- a/src/Wallabag/CoreBundle/Resources/views/base.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/base.html.twig
@@ -71,5 +71,6 @@
71 <div id="warning_message"> 71 <div id="warning_message">
72 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> 72 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>
73 </div> 73 </div>
74 {{ piwik() }}
74 </body> 75 </body>
75</html> 76</html>
diff --git a/src/Wallabag/CoreBundle/Twig/WallabagPiwikExtension.php b/src/Wallabag/CoreBundle/Twig/WallabagPiwikExtension.php
new file mode 100644
index 00000000..7725cd80
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Twig/WallabagPiwikExtension.php
@@ -0,0 +1,14 @@
1<?php
2
3namespace Wallabag\CoreBundle\Twig;
4
5use Craue\ConfigBundle\Util\Config;
6use PiwikTwigExtension\PiwikTwigExtension;
7
8class WallabagPiwikExtension extends PiwikTwigExtension
9{
10 public function __construct(Config $craueConfig)
11 {
12 parent::__construct($craueConfig->get('piwik_host'), $craueConfig->get('piwik_site_id'), $craueConfig->get('piwik_enabled'));
13 }
14}