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/01/11 19:52:35 UTC

airavata-php-gateway git commit: fixing output path generation issue

Repository: airavata-php-gateway
Updated Branches:
  refs/heads/master 9949d78e6 -> 9b6f7f1ed


fixing output path generation issue


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/9b6f7f1e
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/9b6f7f1e
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/9b6f7f1e

Branch: refs/heads/master
Commit: 9b6f7f1ed670a2fca37eb194815c795f8e3f05a4
Parents: 9949d78
Author: scnakandala <su...@gmail.com>
Authored: Mon Jan 11 13:52:32 2016 -0500
Committer: scnakandala <su...@gmail.com>
Committed: Mon Jan 11 13:52:32 2016 -0500

----------------------------------------------------------------------
 app/config/pga_config.php.template    | 5 -----
 app/libraries/ExperimentUtilities.php | 8 ++------
 2 files changed, 2 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/9b6f7f1e/app/config/pga_config.php.template
----------------------------------------------------------------------
diff --git a/app/config/pga_config.php.template b/app/config/pga_config.php.template
index 2a11842..07520a4 100644
--- a/app/config/pga_config.php.template
+++ b/app/config/pga_config.php.template
@@ -109,11 +109,6 @@ return array(
         'server-allowed-file-size' => 64,
 
         /**
-         * directory in the web server where experiment data is staged. (relative to the PGA documents root)
-         */
-        'experiment-data-dir' => '/../experimentData',
-
-        /**
          * absolute path of the data dir
          */
         'experiment-data-absolute-path' => '/var/www/experimentData',

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/9b6f7f1e/app/libraries/ExperimentUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/ExperimentUtilities.php b/app/libraries/ExperimentUtilities.php
index dfa7e6d..74e4946 100644
--- a/app/libraries/ExperimentUtilities.php
+++ b/app/libraries/ExperimentUtilities.php
@@ -657,15 +657,11 @@ class ExperimentUtilities
         //print_r( $outputs); exit;
         foreach ((array)$outputs as $output) {
             if ($output->type == DataType::URI || $output->type == DataType::STDOUT || $output->type == DataType::STDERR) {
-                $explode = explode('/', $output->value);
-                //echo '<p>' . $output->key .  ': <a href="' . $output->value . '">' . $output->value . '</a></p>';
-                $outputPath = str_replace(Config::get('pga_config.airavata')['experiment-data-absolute-path'], Config::get('pga_config.airavata')['experiment-data-dir'], $output->value);
-                //print_r( $output->value); 
                 if(file_exists(str_replace('//','/',$output->value))){
-                    $outputPathArray = explode("/", $outputPath);
+                    $outputPathArray = explode("/", $output->value);
 
                     echo '<p>' . $output->name . ' : ' . '<a target="_blank"
-                            href="' . URL::to("/") . '/download/' . $outputPathArray[ count($outputPathArray)-2] . '/' . 
+                            href="' . URL::to("/") . '/download/' . $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>';
                 }