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
|
||||
|
|
@ -10,9 +10,11 @@ namespace Piwik\CliMulti;
|
|||
use Piwik\CliMulti;
|
||||
use Piwik\Filesystem;
|
||||
|
||||
class Output {
|
||||
class Output
|
||||
{
|
||||
|
||||
private $tmpFile = '';
|
||||
private $outputId = null;
|
||||
|
||||
public function __construct($outputId)
|
||||
{
|
||||
|
|
@ -21,8 +23,15 @@ class Output {
|
|||
}
|
||||
|
||||
$dir = CliMulti::getTmpPath();
|
||||
Filesystem::mkdir($dir, true);
|
||||
$this->tmpFile = $dir . '/' . $outputId . '.output';
|
||||
Filesystem::mkdir($dir);
|
||||
|
||||
$this->tmpFile = $dir . '/' . $outputId . '.output';
|
||||
$this->outputId = $outputId;
|
||||
}
|
||||
|
||||
public function getOutputId()
|
||||
{
|
||||
return $this->outputId;
|
||||
}
|
||||
|
||||
public function write($content)
|
||||
|
|
@ -35,6 +44,13 @@ class Output {
|
|||
return $this->tmpFile;
|
||||
}
|
||||
|
||||
public function isAbnormal()
|
||||
{
|
||||
$size = Filesystem::getFileSize($this->tmpFile, 'MB');
|
||||
|
||||
return $size !== null && $size >= 100;
|
||||
}
|
||||
|
||||
public function exists()
|
||||
{
|
||||
return file_exists($this->tmpFile);
|
||||
|
|
@ -49,5 +65,4 @@ class Output {
|
|||
{
|
||||
Filesystem::deleteFileIfExists($this->tmpFile);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue