Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@gmail.com>2015-09-09 17:53:39 +0300
committerThomas Steur <thomas.steur@gmail.com>2015-10-07 14:42:28 +0300
commit10d482f1d3deb4c717fbb87f523428196634a326 (patch)
treefe4ba19fe7a69afed399812fdeed70e123e79579 /core
parent8d2e4b1d1ae867b8a1fedcc0d937ef2ad00431b0 (diff)
Left menu design
Diffstat (limited to 'core')
-rw-r--r--core/Menu/MenuAbstract.php11
-rw-r--r--core/Period.php1
-rw-r--r--core/Plugin/Controller.php1
-rw-r--r--core/Updates/2.15.0-b13.php45
4 files changed, 57 insertions, 1 deletions
diff --git a/core/Menu/MenuAbstract.php b/core/Menu/MenuAbstract.php
index 7651a1199d..a742df41ab 100644
--- a/core/Menu/MenuAbstract.php
+++ b/core/Menu/MenuAbstract.php
@@ -30,6 +30,7 @@ abstract class MenuAbstract extends Singleton
protected $edits = array();
protected $renames = array();
protected $orderingApplied = false;
+ protected $menuIcons = array();
protected static $menus = array();
/**
@@ -48,6 +49,11 @@ abstract class MenuAbstract extends Singleton
return $this->menu;
}
+ public function registerMenuIcon($menuName, $icon)
+ {
+ $this->menuIcons[$menuName] = $icon;
+ }
+
/**
* Returns a list of available plugin menu instances.
*
@@ -164,6 +170,11 @@ abstract class MenuAbstract extends Singleton
$this->menu[$menuName]['_order'] = $order;
$this->menu[$menuName]['_name'] = $menuName;
$this->menu[$menuName]['_tooltip'] = $tooltip;
+ if (!empty($this->menuIcons[$menuName])) {
+ $this->menu[$menuName]['_icon'] = $this->menuIcons[$menuName];
+ } else {
+ $this->menu[$menuName]['_icon'] = 'icon-arrow-right';
+ }
}
if (!empty($subMenuName)) {
$this->menu[$menuName][$subMenuName]['_url'] = $url;
diff --git a/core/Period.php b/core/Period.php
index 11ddb9c7c2..80dc9f6f21 100644
--- a/core/Period.php
+++ b/core/Period.php
@@ -104,6 +104,7 @@ abstract class Period
if (self::isMultiplePeriod($dateString, 'day')) {
return;
}
+
Date::factory($dateString);
}
diff --git a/core/Plugin/Controller.php b/core/Plugin/Controller.php
index 3aab8374fb..df56b4a8da 100644
--- a/core/Plugin/Controller.php
+++ b/core/Plugin/Controller.php
@@ -15,7 +15,6 @@ use Piwik\API\Request;
use Piwik\Common;
use Piwik\Config as PiwikConfig;
use Piwik\Config;
-use Piwik\Container\StaticContainer;
use Piwik\DataTable\Filter\CalculateEvolutionFilter;
use Piwik\Date;
use Piwik\Exception\NoPrivilegesException;
diff --git a/core/Updates/2.15.0-b13.php b/core/Updates/2.15.0-b13.php
new file mode 100644
index 0000000000..2420eeaecc
--- /dev/null
+++ b/core/Updates/2.15.0-b13.php
@@ -0,0 +1,45 @@
+<?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\Plugin\Manager;
+use Piwik\Updater;
+use Piwik\Updates;
+
+class Updates_2_15_0_b13 extends Updates
+{
+
+ public function doUpdate(Updater $updater)
+ {
+ $this->uninstallPlugin('LeftMenu');
+ $this->uninstallPlugin('ZenMode');
+ }
+
+ private function uninstallPlugin($plugin)
+ {
+ $pluginManager = Manager::getInstance();
+
+ if ($pluginManager->isPluginInstalled($plugin)) {
+ if ($pluginManager->isPluginActivated($plugin)) {
+ $pluginManager->deactivatePlugin($plugin);
+ }
+
+ $pluginManager->unloadPlugin($plugin);
+ $pluginManager->uninstallPlugin($plugin);
+ } else {
+ $this->makeSurePluginIsRemovedFromFilesystem($plugin);
+ }
+ }
+
+ private function makeSurePluginIsRemovedFromFilesystem($plugin)
+ {
+ Manager::deletePluginFromFilesystem($plugin);
+ }
+}