Skip to content

Commit

Permalink
Enable DevicesDetection plugin by default starting in 2.4.0-b6 refs m…
Browse files Browse the repository at this point in the history
  • Loading branch information
mattab committed Jun 10, 2014
1 parent 3a28d26 commit 32e2342
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 14 deletions.
1 change: 1 addition & 0 deletions config/global.ini.php
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,7 @@
Plugins[] = MultiSites
Plugins[] = Referrers
Plugins[] = UserSettings
Plugins[] = DevicesDetection
Plugins[] = Goals
Plugins[] = SEO
Plugins[] = Events
Expand Down
10 changes: 0 additions & 10 deletions core/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,16 +148,6 @@ public function setTestEnvironment($pathLocal = null, $pathGlobal = null, $pathC
// for unit tests, we set that no plugin is installed. This will force
// the test initialization to create the plugins tables, execute ALTER queries, etc.
$this->configCache['PluginsInstalled'] = array('PluginsInstalled' => array());

// DevicesDetection plugin is not yet enabled by default
if (isset($configGlobal['Plugins'])) {
$this->configCache['Plugins'] = $this->configGlobal['Plugins'];
$this->configCache['Plugins']['Plugins'][] = 'DevicesDetection';
}
if (isset($configGlobal['Plugins_Tracker'])) {
$this->configCache['Plugins_Tracker'] = $this->configGlobal['Plugins_Tracker'];
$this->configCache['Plugins_Tracker']['Plugins_Tracker'][] = 'DevicesDetection';
}
}

/**
Expand Down
1 change: 0 additions & 1 deletion core/Plugin/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ class Manager extends Singleton
// Plugins bundled with core package, disabled by default
protected $corePluginsDisabledByDefault = array(
'DBStats',
'DevicesDetection',
'ExampleCommand',
'ExampleSettingsPlugin',
'ExampleUI',
Expand Down
24 changes: 24 additions & 0 deletions core/Updates/2.4.0-b6.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?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\Updates;

class Updates_2_4_0_b6 extends Updates
{
public static function update()
{
$pluginManager = \Piwik\Plugin\Manager::getInstance();

try {
$pluginManager->activatePlugin('DevicesDetection');
} catch(\Exception $e) {
}
}
}
2 changes: 1 addition & 1 deletion core/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ final class Version
* The current Piwik version.
* @var string
*/
const VERSION = '2.4.0-b5';
const VERSION = '2.4.0-b6';
}
2 changes: 1 addition & 1 deletion plugins/CoreConsole/Commands/SyncUITestScreenshots.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$downloadTo = "plugins/$testPlugin/tests/UI/expected-ui-screenshots/$file";
}

$output->write("<info>Downloading $file to $downloadTo...</info>\n");
$output->write("<info>Downloading $file to $downloadTo...</info>\n");
Http::sendHttpRequest("$urlBase/processed-ui-screenshots/$file", $timeout = 60, $userAgent = null,
PIWIK_DOCUMENT_ROOT . "/" . $downloadTo);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/PHPUnit/UI
Submodule UI updated from 1624d2 to 4a97de

0 comments on commit 32e2342

Please sign in to comment.