diff options
author | mattab <matthieu.aubry@gmail.com> | 2016-02-02 06:32:19 +0300 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2016-02-02 06:32:19 +0300 |
commit | fd199c13e185c2721860024ad4b39b856bdd53d4 (patch) | |
tree | 73608ee592d209a5c765f8fc6af16298dd0ca81a | |
parent | 0498a13cfd5cb51e61b2a721fc36c818dcdcf46b (diff) |
Automatically enable PiwikPro plugin on update + minor tweaks
-rw-r--r-- | core/PiwikPro/Advertising.php | 8 | ||||
-rw-r--r-- | core/Updates/2.16.0-rc2.php | 25 | ||||
-rw-r--r-- | core/Version.php | 2 | ||||
-rw-r--r-- | plugins/PiwikPro/plugin.json | 2 | ||||
-rw-r--r-- | plugins/PiwikPro/templates/promoPiwikProWidget.twig | 2 |
5 files changed, 32 insertions, 7 deletions
diff --git a/core/PiwikPro/Advertising.php b/core/PiwikPro/Advertising.php index a827ebc85b..deea4fa9f3 100644 --- a/core/PiwikPro/Advertising.php +++ b/core/PiwikPro/Advertising.php @@ -44,10 +44,10 @@ class Advertising */ public function arePiwikProAdsEnabled() { - if ($this->pluginManager->isPluginInstalled('EnterpriseAdmin') - || $this->pluginManager->isPluginInstalled('LoginAdmin') - || $this->pluginManager->isPluginInstalled('CloudAdmin') - || $this->pluginManager->isPluginInstalled('WhiteLabel')) { + if ($this->pluginManager->isPluginActivated('EnterpriseAdmin') + || $this->pluginManager->isPluginActivated('LoginAdmin') + || $this->pluginManager->isPluginActivated('CloudAdmin') + || $this->pluginManager->isPluginActivated('WhiteLabel')) { return false; } diff --git a/core/Updates/2.16.0-rc2.php b/core/Updates/2.16.0-rc2.php new file mode 100644 index 0000000000..53265455bf --- /dev/null +++ b/core/Updates/2.16.0-rc2.php @@ -0,0 +1,25 @@ +<?php +/** + * Piwik - free/libre analytics platform + * + * @link http://piwik.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + */ + +namespace Piwik\Updates; + +use Piwik\Updater; +use Piwik\Updates; + +class Updates_2_16_0_rc2 extends Updates +{ + public function doUpdate(Updater $updater) + { + $pluginManager = \Piwik\Plugin\Manager::getInstance(); + + try { + $pluginManager->activatePlugin('PiwikPro'); + } catch (\Exception $e) { + } + } +}
\ No newline at end of file diff --git a/core/Version.php b/core/Version.php index cb523213d6..a616425c96 100644 --- a/core/Version.php +++ b/core/Version.php @@ -20,7 +20,7 @@ final class Version * The current Piwik version. * @var string */ - const VERSION = '2.16.0-rc1'; + const VERSION = '2.16.0-rc2'; public function isStableVersion($version) { diff --git a/plugins/PiwikPro/plugin.json b/plugins/PiwikPro/plugin.json index f7a302dafb..089dd4abf2 100644 --- a/plugins/PiwikPro/plugin.json +++ b/plugins/PiwikPro/plugin.json @@ -1,5 +1,5 @@ { "name": "PiwikPro", - "description": "Provides widgets to follow Piwik PRO blog and to see info about their products.", + "description": "Provides widgets to follow Piwik PRO blog and to see info about Piwik PRO services and products.", "theme": false }
\ No newline at end of file diff --git a/plugins/PiwikPro/templates/promoPiwikProWidget.twig b/plugins/PiwikPro/templates/promoPiwikProWidget.twig index dffb95ed4d..2864fa340f 100644 --- a/plugins/PiwikPro/templates/promoPiwikProWidget.twig +++ b/plugins/PiwikPro/templates/promoPiwikProWidget.twig @@ -1,6 +1,6 @@ <div class="promoWidget"> <div class="promo"> - <img class="icon" src="/plugins/PiwikPro/images/promo.png"> + <img class="icon" src="plugins/PiwikPro/images/promo.png"> <p class="text"> {{ ctaText }} <br /><br /> |