You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sc...@apache.org on 2016/03/07 21:14:22 UTC
airavata-php-gateway git commit: fixing path generation issues
Repository: airavata-php-gateway
Updated Branches:
refs/heads/develop 19e4e6613 -> b231563b9
fixing path generation issues
Project: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/commit/b231563b
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/b231563b
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/b231563b
Branch: refs/heads/develop
Commit: b231563b9c80533ef1658a8e35b0ae19d1a60dd9
Parents: 19e4e66
Author: scnakandala <su...@gmail.com>
Authored: Mon Mar 7 15:14:19 2016 -0500
Committer: scnakandala <su...@gmail.com>
Committed: Mon Mar 7 15:14:19 2016 -0500
----------------------------------------------------------------------
app/libraries/ExperimentUtilities.php | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/b231563b/app/libraries/ExperimentUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/ExperimentUtilities.php b/app/libraries/ExperimentUtilities.php
index b8794e4..39acdb1 100644
--- a/app/libraries/ExperimentUtilities.php
+++ b/app/libraries/ExperimentUtilities.php
@@ -76,7 +76,7 @@ class ExperimentUtilities
if ($input->type == DataType::URI && empty($input->metaData)) {
$inputArray = explode('/', $input->value);
echo '<p><a target="_blank"
- href="' . URL::to("/") . '/download/' . $inputArray[ count($inputArray)-2] . '/' .
+ href="' . URL::to("/") . '/download/' . $inputArray[ count($inputArray)-3] . '/' .$inputArray[ count($inputArray)-2] . '/' .
$inputArray[ count($inputArray)-1] . '">' .
$inputArray[ count($inputArray)-1] . '
<span class="glyphicon glyphicon-new-window"></span></a></p>';
@@ -352,6 +352,7 @@ class ExperimentUtilities
{
do {
$projectId = substr($projectId, 0, -37);
+ $projectId = preg_replace('/[^a-zA-Z0-9]+/', '_', $projectId);
$experimentName = preg_replace('/[^a-zA-Z0-9]+/', '_', $experimentName);
ExperimentUtilities::$relativeExperimentDataDir = "/" . Session::get('username') . "/" . $projectId . "/"
@@ -655,7 +656,8 @@ class ExperimentUtilities
$outputPathArray = explode("/", $output->value);
echo '<p>' . $output->name . ' : ' . '<a target="_blank"
- href="' . URL::to("/") . '/download/' . $outputPathArray[ count($outputPathArray)-3] . "/" . $outputPathArray[ count($outputPathArray)-2] . '/' .
+ href="' . URL::to("/") . '/download/' . $outputPathArray[ count($outputPathArray)-4]
+ . "/" . $outputPathArray[ count($outputPathArray)-3] . "/" . $outputPathArray[ count($outputPathArray)-2] . '/' .
$outputPathArray[ count($outputPathArray)-1] . '">' .
$outputPathArray[sizeof($outputPathArray) - 1] . ' <span class="glyphicon glyphicon-new-window"></span></a></p>';
}