update Piwik to version 2.16 (fixes #91)

This commit is contained in:
oliver 2016-04-10 18:55:57 +02:00
commit d885a4baa9
5833 changed files with 418860 additions and 226988 deletions

View file

@ -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
@ -29,27 +29,18 @@ class Html extends Renderer
*
* @param string $id
*/
function setTableId($id)
public function setTableId($id)
{
$this->tableId = str_replace('.', '_', $id);
}
/**
* Output HTTP Content-Type header
*/
protected function renderHeader()
{
@header('Content-Type: text/html; charset=utf-8');
}
/**
* Computes the dataTable output and returns the string/binary
*
* @return string
*/
function render()
public function render()
{
$this->renderHeader();
$this->tableStructure = array();
$this->allColumns = array();
$this->i = 0;
@ -57,18 +48,6 @@ class Html extends Renderer
return $this->renderTable($this->table);
}
/**
* Computes the exception output and returns the string/binary
*
* @return string
*/
function renderException()
{
$this->renderHeader();
$exceptionMessage = $this->getExceptionMessage();
return nl2br($exceptionMessage);
}
/**
* Computes the output for the given data table
*
@ -77,8 +56,9 @@ class Html extends Renderer
*/
protected function renderTable($table)
{
if (is_array($table)) // convert array to DataTable
{
if (is_array($table)) {
// convert array to DataTable
$table = DataTable::makeFromSimpleArray($table);
}
@ -88,8 +68,9 @@ class Html extends Renderer
$this->buildTableStructure($subtable, '_' . $table->getKeyName(), $date);
}
}
} else // Simple
{
} else {
// Simple
if ($table->getRowsCount()) {
$this->buildTableStructure($table);
}
@ -134,7 +115,9 @@ class Html extends Renderer
$metadata = array();
foreach ($row->getMetadata() as $name => $value) {
if (is_string($value)) $value = "'$value'";
if (is_string($value)) {
$value = "'$value'";
}
$metadata[] = "'$name' => $value";
}