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/View
diff options
context:
space:
mode:
authorMatthieu Napoli <matthieu@mnapoli.fr>2015-03-14 09:33:54 +0300
committerMatthieu Napoli <matthieu@mnapoli.fr>2015-03-16 00:37:33 +0300
commita69a60587bf5776c98d8b8a94ac3f62e8b8ef823 (patch)
tree9a4fe09384fd54e43cd1a54736cb83c69e4f1a9a /core/View
parent3f2d8e0bdcd62887dfa800c5391954f26bb98871 (diff)
ref #6441 When Piwik fails to update over HTTPS, offer the user the possibility to update over HTTP
Diffstat (limited to 'core/View')
-rw-r--r--core/View/OneClickDone.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/core/View/OneClickDone.php b/core/View/OneClickDone.php
index e07c2c3bdd..1d8c8b809f 100644
--- a/core/View/OneClickDone.php
+++ b/core/View/OneClickDone.php
@@ -30,13 +30,20 @@ class OneClickDone
/**
* @var string
*/
- public $coreError;
+ public $error;
/**
* @var array
*/
public $feedbackMessages;
+ /**
+ * Did the download over HTTPS fail?
+ *
+ * @var bool
+ */
+ public $httpsFail = false;
+
public function __construct($tokenAuth)
{
$this->tokenAuth = $tokenAuth;
@@ -56,9 +63,10 @@ class OneClickDone
@header('Cache-Control: must-revalidate');
@header('X-Frame-Options: deny');
- $error = htmlspecialchars($this->coreError, ENT_QUOTES, 'UTF-8');
+ $error = htmlspecialchars($this->error, ENT_QUOTES, 'UTF-8');
$messages = htmlspecialchars(serialize($this->feedbackMessages), ENT_QUOTES, 'UTF-8');
$tokenAuth = $this->tokenAuth;
+ $httpsFail = (int) $this->httpsFail;
// use a heredoc instead of an external file
echo <<<END_OF_TEMPLATE
@@ -73,6 +81,7 @@ class OneClickDone
<input type="hidden" name="token_auth" value="$tokenAuth" />
<input type="hidden" name="error" value="$error" />
<input type="hidden" name="messages" value="$messages" />
+ <input type="hidden" name="httpsFail" value="$httpsFail" />
<noscript>
<button type="submit">Continue</button>
</noscript>