Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattab <matthieu.aubry@gmail.com>2013-09-14 04:38:59 +0400
committermattab <matthieu.aubry@gmail.com>2013-09-14 04:38:59 +0400
commite802eae2a2690a80f217bcc2952a1adb100a7a77 (patch)
tree8172f65273b2c08515ed77277c68268ccdc1fb14 /plugins/ImageGraph/API.php
parenta62732648844e330e0e33a2a8ecc04642fdf2d5e (diff)
Adding Filesystem class which contains file operations
And factored out code in ServerFilesGenerator.php
Diffstat (limited to 'plugins/ImageGraph/API.php')
-rw-r--r--plugins/ImageGraph/API.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/ImageGraph/API.php b/plugins/ImageGraph/API.php
index 6266bf9ed2..8cf9850ce1 100644
--- a/plugins/ImageGraph/API.php
+++ b/plugins/ImageGraph/API.php
@@ -11,12 +11,13 @@
namespace Piwik\Plugins\ImageGraph;
use Exception;
+use Piwik\Common;
+use Piwik\Filesystem;
use Piwik\Period;
use Piwik\Piwik;
-use Piwik\Common;
-use Piwik\Translate;
use Piwik\Plugins\API\API as MetaAPI;
use Piwik\Plugins\ImageGraph\StaticGraph;
+use Piwik\Translate;
/**
* The ImageGraph.get API call lets you generate beautiful static PNG Graphs for any existing Piwik report.
@@ -510,7 +511,7 @@ class API
$fileName = self::$DEFAULT_PARAMETERS[$graphType][self::FILENAME_KEY] . '_' . $apiModule . '_' . $apiAction . $idGoal . ' ' . str_replace(',', '-', $date) . ' ' . $idSite . '.png';
$fileName = str_replace(array(' ', '/'), '_', $fileName);
- if (!Common::isValidFilename($fileName)) {
+ if (!Filesystem::isValidFilename($fileName)) {
throw new Exception('Error: Image graph filename ' . $fileName . ' is not valid.');
}