diff options
author | Matthieu Napoli <matthieu@mnapoli.fr> | 2015-03-14 09:33:54 +0300 |
---|---|---|
committer | Matthieu Napoli <matthieu@mnapoli.fr> | 2015-03-16 00:37:33 +0300 |
commit | a69a60587bf5776c98d8b8a94ac3f62e8b8ef823 (patch) | |
tree | 9a4fe09384fd54e43cd1a54736cb83c69e4f1a9a /core | |
parent | 3f2d8e0bdcd62887dfa800c5391954f26bb98871 (diff) |
ref #6441 When Piwik fails to update over HTTPS, offer the user the possibility to update over HTTP
Diffstat (limited to 'core')
-rw-r--r-- | core/View/OneClickDone.php | 13 |
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> |