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>2015-03-16 02:22:50 +0300
committermattab <matthieu.aubry@gmail.com>2015-03-16 02:22:50 +0300
commit5c5b7c3077504c4716f9019697f4eac684e6002c (patch)
treef696fa389392c551a3a8c94b3e11c8a1f75a7e7f /plugins
parent7b12ff200826aece91a6407b60a8e9c485401e36 (diff)
Refs #7419 Make getDownloadToPath logic clear
Diffstat (limited to 'plugins')
-rw-r--r--plugins/CoreConsole/Commands/DevelopmentSyncUITestScreenshots.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/CoreConsole/Commands/DevelopmentSyncUITestScreenshots.php b/plugins/CoreConsole/Commands/DevelopmentSyncUITestScreenshots.php
index 8394d0d4ee..a8fa9a7a6c 100644
--- a/plugins/CoreConsole/Commands/DevelopmentSyncUITestScreenshots.php
+++ b/plugins/CoreConsole/Commands/DevelopmentSyncUITestScreenshots.php
@@ -128,20 +128,20 @@ cd ../../../../../\n\n";
protected function getDownloadToPath($plugin)
{
- $downloadTo = PIWIK_DOCUMENT_ROOT . "/";
if (empty($plugin)) {
- $downloadTo .= "tests/UI/expected-ui-screenshots/";
- } else {
- $downloadTo .= "plugins/$plugin/tests/UI/expected-ui-screenshots/";
+ return PIWIK_DOCUMENT_ROOT . "/tests/UI/expected-ui-screenshots/";
}
+
+ $downloadTo = PIWIK_DOCUMENT_ROOT . "/plugins/$plugin/tests/UI/expected-ui-screenshots/";
if(is_dir($downloadTo)) {
return $downloadTo;
}
+
+ // Maybe the plugin is using folder "Test/" instead of "tests/"
$downloadTo = str_replace("tests/", "Test/", $downloadTo);
if(is_dir($downloadTo)) {
return $downloadTo;
}
-
throw new \Exception("Download to path could not be found: $downloadTo");
}