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
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@googlemail.com>2014-06-27 07:35:29 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-06-27 07:35:29 +0400
commitb76d9b34153369e56692041779a68ba1e5f05732 (patch)
treef3da2d782aaf2038f1de4f5a9e8ea92363ef6959
parent1790ae4d7b27e1356e5ad1b82d0aae5f7b6f0d31 (diff)
mention columns to update separately
-rw-r--r--lang/en.json1
-rw-r--r--plugins/CoreUpdater/Controller.php4
-rw-r--r--plugins/CoreUpdater/templates/runUpdaterAndExit_welcome.twig8
-rw-r--r--plugins/CoreUpdater/templates/runUpdaterAndExit_welcome_cli.twig7
4 files changed, 18 insertions, 2 deletions
diff --git a/lang/en.json b/lang/en.json
index b1937189e2..7726cbc9d5 100644
--- a/lang/en.json
+++ b/lang/en.json
@@ -380,6 +380,7 @@
"PluginDescription": "Piwik updating mechanism",
"ReadyToGo": "Ready to go?",
"TheFollowingPluginsWillBeUpgradedX": "The following plugins will be updated: %s.",
+ "TheFollowingDimensionsWillBeUpgradedX": "The following dimensions will be updated: %s.",
"ThereIsNewPluginVersionAvailableForUpdate": "Some plugins you use have been updated on the Marketplace:",
"ThereIsNewVersionAvailableForUpdate": "There is a new version of Piwik available for update",
"TheUpgradeProcessMayFailExecuteCommand": "If you have a large Piwik database, updates might take too long to run in the browser. In this situation, you can execute the updates from your command line: %s",
diff --git a/plugins/CoreUpdater/Controller.php b/plugins/CoreUpdater/Controller.php
index 413f9aa3c3..d586c50a51 100644
--- a/plugins/CoreUpdater/Controller.php
+++ b/plugins/CoreUpdater/Controller.php
@@ -379,6 +379,7 @@ class Controller extends \Piwik\Plugin\Controller
$view->new_piwik_version = Version::VERSION;
$view->commandUpgradePiwik = "<br /><code>php " . Filesystem::getPathToPiwikRoot() . "/console core:update </code>";
$pluginNamesToUpdate = array();
+ $dimensionsToUpdate = array();
$coreToUpdate = false;
// handle case of existing database with no tables
@@ -397,6 +398,8 @@ class Controller extends \Piwik\Plugin\Controller
foreach ($componentsWithUpdateFile as $name => $filenames) {
if ($name == 'core') {
$coreToUpdate = true;
+ } elseif (0 === strpos($name, 'log_')) {
+ $dimensionsToUpdate[] = $name;
} else {
$pluginNamesToUpdate[] = $name;
}
@@ -418,6 +421,7 @@ class Controller extends \Piwik\Plugin\Controller
$view->errorMessages = $this->errorMessages;
$view->current_piwik_version = $currentVersion;
$view->pluginNamesToUpdate = $pluginNamesToUpdate;
+ $view->dimensionsToUpdate = $dimensionsToUpdate;
$view->coreToUpdate = $coreToUpdate;
}
diff --git a/plugins/CoreUpdater/templates/runUpdaterAndExit_welcome.twig b/plugins/CoreUpdater/templates/runUpdaterAndExit_welcome.twig
index 098ffa387c..586689276d 100644
--- a/plugins/CoreUpdater/templates/runUpdaterAndExit_welcome.twig
+++ b/plugins/CoreUpdater/templates/runUpdaterAndExit_welcome.twig
@@ -23,7 +23,7 @@
</ul>
</p>
{% else %}
- {% if coreToUpdate or pluginNamesToUpdate|length > 0 %}
+ {% if coreToUpdate or pluginNamesToUpdate|length > 0 or dimensionsToUpdate|length > 0 %}
<p style='font-size:110%;padding-top:1em;'><strong id='titleUpdate'>{{ 'CoreUpdater_DatabaseUpgradeRequired'|translate }}</strong></p>
<p>{{ 'CoreUpdater_YourDatabaseIsOutOfDate'|translate }}</p>
{% if coreToUpdate %}
@@ -34,6 +34,12 @@
{% set listOfPlugins=pluginNamesToUpdate|join(', ') %}
<p>{{ 'CoreUpdater_TheFollowingPluginsWillBeUpgradedX'|translate(listOfPlugins) }}</p>
{% endif %}
+
+ {% if dimensionsToUpdate|length > 0 %}
+ {% set listOfDimensions=dimensionsToUpdate|join(', ') %}
+ <p>{{ 'CoreUpdater_TheFollowingDimensionsWillBeUpgradedX'|translate(listOfDimensions) }}</p>
+ {% endif %}
+
<h3 id='titleUpdate'>{{ 'CoreUpdater_NoteForLargePiwikInstances'|translate }}</h3>
{% if isMajor %}
<p class="warning normalFontSize">
diff --git a/plugins/CoreUpdater/templates/runUpdaterAndExit_welcome_cli.twig b/plugins/CoreUpdater/templates/runUpdaterAndExit_welcome_cli.twig
index b912632971..33c21a15e3 100644
--- a/plugins/CoreUpdater/templates/runUpdaterAndExit_welcome_cli.twig
+++ b/plugins/CoreUpdater/templates/runUpdaterAndExit_welcome_cli.twig
@@ -16,7 +16,7 @@
* {{ helpMessage }}
-{% elseif coreToUpdate or pluginNamesToUpdate|length > 0 %}
+{% elseif coreToUpdate or pluginNamesToUpdate|length > 0 or dimensionsToUpdate|length > 0 %}
{{ 'CoreUpdater_DatabaseUpgradeRequired'|translate }}
@@ -31,6 +31,11 @@
{{ 'CoreUpdater_TheFollowingPluginsWillBeUpgradedX'|translate( listOfPlugins) }}
{% endif %}
+{%- if dimensionsToUpdate|length > 0 %}
+ {%- set listOfDimensions %}{{ dimensionsToUpdate|implode(', ') }}{% endset %}
+ {{ 'CoreUpdater_TheFollowingDimensionsWillBeUpgradedX'|translate( listOfDimensions) }}
+{% endif %}
+
{# dry run #}
{% if queries is defined and queries is not empty %}
*** Note: this is a Dry Run ***