| <?php |
|
|
| |
| |
| |
| |
| |
| |
|
|
| namespace Piwik\View; |
|
|
| use Piwik\Common; |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| class OneClickDone |
| { |
| |
| |
| |
| private $tokenAuth; |
|
|
| |
| |
| |
| public $error = ''; |
|
|
| |
| |
| |
| public $feedbackMessages; |
|
|
| |
| |
| |
| |
| |
| public $httpsFail = false; |
|
|
| public function __construct( |
| #[\SensitiveParameter] |
| $tokenAuth |
| ) { |
| $this->tokenAuth = $tokenAuth; |
| } |
|
|
| |
| |
| |
| public function render() |
| { |
| |
| @Common::stripHeader('Pragma'); |
| @Common::stripHeader('Expires'); |
| @Common::sendHeader('Content-Type: text/html; charset=UTF-8'); |
| @Common::sendHeader('Cache-Control: no-store'); |
| @Common::sendHeader('X-Frame-Options: deny'); |
|
|
| $error = htmlspecialchars($this->error, ENT_QUOTES, 'UTF-8'); |
| $messages = htmlspecialchars(serialize($this->feedbackMessages), ENT_QUOTES, 'UTF-8'); |
| $tokenAuth = $this->tokenAuth; |
| $httpsFail = (int) $this->httpsFail; |
|
|
| |
| echo <<<END_OF_TEMPLATE |
| <!DOCTYPE html> |
| <html> |
| <head> |
| <meta name="robots" content="noindex,nofollow"> |
| <meta charset="utf-8"> |
| <title></title> |
| </head> |
| <body> |
| <form name="myform" method="post" action="?module=CoreUpdater&action=oneClickResults"> |
| <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> |
| </form> |
| <script type="text/javascript"> |
| document.myform.submit(); |
| </script> |
| </body> |
| </html> |
| END_OF_TEMPLATE; |
| } |
| } |
|
|