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:
authorStefan Giehl <stefan@piwik.org>2018-06-07 01:28:15 +0300
committerdiosmosis <diosmosis@users.noreply.github.com>2018-06-07 01:28:15 +0300
commitd8c98711edd6eebc16f1be3b87dac798d118b78c (patch)
tree3f2c50f14e9e81f8c465164d068a9945200e37c7 /plugins/CoreUpdater
parentde942d0fa0b7b7d12c81873b0cb2152b5d38b32e (diff)
Show database update screen for non API calls to API module (#12985)
* Correct database required exeption in API results * Show database update screen for non API calls to API module
Diffstat (limited to 'plugins/CoreUpdater')
-rw-r--r--plugins/CoreUpdater/CoreUpdater.php4
-rw-r--r--plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessageCSV.txt2
-rw-r--r--plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessageJSON.txt2
-rw-r--r--plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessagePHP.txt2
-rw-r--r--plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessageTSV.txt2
-rw-r--r--plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessageXML.txt2
6 files changed, 7 insertions, 7 deletions
diff --git a/plugins/CoreUpdater/CoreUpdater.php b/plugins/CoreUpdater/CoreUpdater.php
index 7f6e062a66..16b7d2d911 100644
--- a/plugins/CoreUpdater/CoreUpdater.php
+++ b/plugins/CoreUpdater/CoreUpdater.php
@@ -75,11 +75,11 @@ class CoreUpdater extends \Piwik\Plugin
if (FrontController::shouldRethrowException()) {
throw new Exception("Piwik and/or some plugins have been upgraded to a new version. \n" .
"--> Please run the update process first. See documentation: https://matomo.org/docs/update/ \n");
- } elseif ($module === 'API') {
+ } elseif ($module === 'API' && ('' == $action || 'index' == $action)) {
$outputFormat = strtolower(Common::getRequestVar('format', 'xml', 'string', $_GET + $_POST));
$response = new ResponseBuilder($outputFormat);
- $e = new Exception('Database Upgrade Required. Your Piwik database is out-of-date, and must be upgraded before you can continue.');
+ $e = new Exception('Database Upgrade Required. Your Matomo database is out-of-date, and must be upgraded before you can continue.');
echo $response->getResponseException($e);
Common::sendResponseCode(503);
exit;
diff --git a/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessageCSV.txt b/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessageCSV.txt
index 9197a7572d..a4f8d8a550 100644
--- a/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessageCSV.txt
+++ b/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessageCSV.txt
@@ -1 +1 @@
-Error: Database Upgrade Required. Your Piwik database is out-of-date, and must be upgraded before you can continue. \ No newline at end of file
+Error: Database Upgrade Required. Your Matomo database is out-of-date, and must be upgraded before you can continue. \ No newline at end of file
diff --git a/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessageJSON.txt b/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessageJSON.txt
index 75d504da6a..6e19416113 100644
--- a/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessageJSON.txt
+++ b/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessageJSON.txt
@@ -1 +1 @@
-{"result":"error","message":"Database Upgrade Required. Your Piwik database is out-of-date, and must be upgraded before you can continue."} \ No newline at end of file
+{"result":"error","message":"Database Upgrade Required. Your Matomo database is out-of-date, and must be upgraded before you can continue."} \ No newline at end of file
diff --git a/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessagePHP.txt b/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessagePHP.txt
index 5834ed03de..afbf37c403 100644
--- a/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessagePHP.txt
+++ b/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessagePHP.txt
@@ -1 +1 @@
-a:2:{s:6:"result";s:5:"error";s:7:"message";s:108:"Database Upgrade Required. Your Piwik database is out-of-date, and must be upgraded before you can continue.";} \ No newline at end of file
+a:2:{s:6:"result";s:5:"error";s:7:"message";s:108:"Database Upgrade Required. Your Matomo database is out-of-date, and must be upgraded before you can continue.";} \ No newline at end of file
diff --git a/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessageTSV.txt b/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessageTSV.txt
index 9197a7572d..a4f8d8a550 100644
--- a/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessageTSV.txt
+++ b/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessageTSV.txt
@@ -1 +1 @@
-Error: Database Upgrade Required. Your Piwik database is out-of-date, and must be upgraded before you can continue. \ No newline at end of file
+Error: Database Upgrade Required. Your Matomo database is out-of-date, and must be upgraded before you can continue. \ No newline at end of file
diff --git a/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessageXML.txt b/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessageXML.txt
index b929a52c5b..3a0bbee837 100644
--- a/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessageXML.txt
+++ b/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessageXML.txt
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<result>
- <error message="Database Upgrade Required. Your Piwik database is out-of-date, and must be upgraded before you can continue." />
+ <error message="Database Upgrade Required. Your Matomo database is out-of-date, and must be upgraded before you can continue." />
</result> \ No newline at end of file