update Piwik to version 2.16 (fixes #91)
This commit is contained in:
parent
296343bf3b
commit
d885a4baa9
5833 changed files with 418860 additions and 226988 deletions
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - Open source web analytics
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
|
|
@ -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,15 +63,17 @@ 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
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta name="robots" content="noindex,nofollow">
|
||||
<meta charset="utf-8">
|
||||
<title></title>
|
||||
</head>
|
||||
|
|
@ -73,6 +82,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>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - Open source web analytics
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
|
|
@ -8,12 +8,11 @@
|
|||
*/
|
||||
namespace Piwik\View;
|
||||
|
||||
use Twig_Node_Expression_Array;
|
||||
use Twig_Node_Expression_MethodCall;
|
||||
use Twig_Node_Include;
|
||||
use Twig_Token;
|
||||
use Twig_TokenParser;
|
||||
use Twig_Node_Expression_MethodCall;
|
||||
use Twig_Node_Expression_Array;
|
||||
use Twig_Node_Include;
|
||||
use Exception;
|
||||
|
||||
/**
|
||||
* Defines a new Twig tag that will render a Piwik View.
|
||||
|
|
@ -42,7 +41,7 @@ class RenderTokenParser extends Twig_TokenParser
|
|||
$variablesOverride = new Twig_Node_Expression_Array(array(), $token->getLine());
|
||||
if ($stream->test(Twig_Token::NAME_TYPE, 'with')) {
|
||||
$stream->next();
|
||||
|
||||
|
||||
$variablesOverride->addElement($this->parser->getExpressionParser()->parseExpression());
|
||||
}
|
||||
|
||||
|
|
@ -80,4 +79,4 @@ class RenderTokenParser extends Twig_TokenParser
|
|||
{
|
||||
return 'render';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - Open source web analytics
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
|
|
@ -90,10 +90,10 @@ class ReportsByDimension extends View
|
|||
{
|
||||
/**
|
||||
* Triggered before rendering {@link ReportsByDimension} views.
|
||||
*
|
||||
*
|
||||
* Plugins can use this event to configure {@link ReportsByDimension} instances by
|
||||
* adding or removing reports to display.
|
||||
*
|
||||
*
|
||||
* @param ReportsByDimension $this The view instance.
|
||||
*/
|
||||
Piwik::postEvent('View.ReportsByDimension.render', array($this));
|
||||
|
|
@ -104,10 +104,10 @@ class ReportsByDimension extends View
|
|||
// display it initially
|
||||
$categories = $this->dimensionCategories;
|
||||
if (!empty($categories)) {
|
||||
$firstCategory = reset($categories);
|
||||
$firstCategory = reset($categories);
|
||||
$firstReportInfo = reset($firstCategory);
|
||||
|
||||
$oldGet = $_GET;
|
||||
$oldGet = $_GET;
|
||||
$oldPost = $_POST;
|
||||
|
||||
foreach ($firstReportInfo['params'] as $key => $value) {
|
||||
|
|
@ -120,7 +120,7 @@ class ReportsByDimension extends View
|
|||
$action = $firstReportInfo['params']['action'];
|
||||
$this->firstReport = FrontController::getInstance()->fetchDispatch($module, $action);
|
||||
|
||||
$_GET = $oldGet;
|
||||
$_GET = $oldGet;
|
||||
$_POST = $oldPost;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - Open source web analytics
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
|
|
@ -8,8 +8,8 @@
|
|||
*/
|
||||
namespace Piwik\View;
|
||||
|
||||
use Piwik\View;
|
||||
use Exception;
|
||||
use Piwik\View;
|
||||
|
||||
/**
|
||||
* Base type of UI controls.
|
||||
|
|
@ -59,6 +59,13 @@ class UIControl extends \Piwik\View
|
|||
*/
|
||||
public $cssClass = "";
|
||||
|
||||
/**
|
||||
* HTML Attributes for the root element
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $htmlAttributes = array();
|
||||
|
||||
/**
|
||||
* The inner view that renders the actual control content.
|
||||
*
|
||||
|
|
@ -125,6 +132,7 @@ class UIControl extends \Piwik\View
|
|||
$this->templateVars['cssIdentifier'] = $this->cssIdentifier;
|
||||
$this->templateVars['cssClass'] = $this->cssClass;
|
||||
$this->templateVars['jsClass'] = $this->jsClass;
|
||||
$this->templateVars['htmlAttributes'] = $this->htmlAttributes;
|
||||
$this->templateVars['jsNamespace'] = $this->jsNamespace;
|
||||
$this->templateVars['implOverride'] = $override;
|
||||
|
||||
|
|
@ -136,7 +144,6 @@ class UIControl extends \Piwik\View
|
|||
}
|
||||
|
||||
$this->templateVars['clientSideParameters'] = array();
|
||||
$clientSideParameters = $this->getClientSideParameters();
|
||||
foreach ($this->getClientSideParameters() as $name) {
|
||||
$this->templateVars['clientSideParameters'][$name] = $innerTemplateVars[$name];
|
||||
}
|
||||
|
|
@ -169,4 +176,4 @@ class UIControl extends \Piwik\View
|
|||
{
|
||||
return array();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - Open source web analytics
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
|
|
@ -21,5 +21,5 @@ interface ViewInterface
|
|||
*
|
||||
* @return string Serialized data, eg, (image, array, html...).
|
||||
*/
|
||||
function render();
|
||||
public function render();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue