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/08 20:44:45 UTC
airavata-php-gateway git commit: changing the file staging directory
generation issue
Repository: airavata-php-gateway
Updated Branches:
refs/heads/master 961aabc48 -> ae9ed4a38
changing the file staging directory 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/ae9ed4a3
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/ae9ed4a3
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/ae9ed4a3
Branch: refs/heads/master
Commit: ae9ed4a38d85adf6a123bfc14782ef4f70354fa0
Parents: 961aabc
Author: scnakandala <su...@gmail.com>
Authored: Fri Jan 8 14:44:42 2016 -0500
Committer: scnakandala <su...@gmail.com>
Committed: Fri Jan 8 14:44:42 2016 -0500
----------------------------------------------------------------------
app/libraries/ExperimentUtilities.php | 8 ++------
app/routes.php | 2 +-
2 files changed, 3 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/ae9ed4a3/app/libraries/ExperimentUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/ExperimentUtilities.php b/app/libraries/ExperimentUtilities.php
index 108a1c8..f19027f 100644
--- a/app/libraries/ExperimentUtilities.php
+++ b/app/libraries/ExperimentUtilities.php
@@ -360,10 +360,10 @@ class ExperimentUtilities
{
do {
ExperimentUtilities::$experimentPath = Config::get('pga_config.airavata')['experiment-data-absolute-path'] .
- "/" . str_replace(' ', '', Session::get('username')) . md5(rand() * time()) . '/';
+ "/" . Session::get('username') . "/" . md5(rand() * time()) . '/';
} while (is_dir(ExperimentUtilities::$experimentPath)); // if dir already exists, try again
// create upload directory
- if (!mkdir(ExperimentUtilities::$experimentPath)) {
+ if (!mkdir(ExperimentUtilities::$experimentPath, 0755, true)) {
CommonUtilities::print_error_message('<p>Error creating upload directory!
Please try again later or report a bug using the link in the Help menu.</p>');
$experimentAssemblySuccessful = false;
@@ -439,10 +439,6 @@ class ExperimentUtilities
$experimentInputs = $experiment->experimentInputs;
ExperimentUtilities::create_experiment_folder_path();
$hostName = $_SERVER['SERVER_NAME'];
- $expPathConstant = 'file://' . Config::get('pga_config.airavata')['ssh-user'] . '@' . $hostName . ':' . Config::get('pga_config.airavata')['experiment-data-absolute-path'];
- $outputDataDir = str_replace(Config::get('pga_config.airavata')['experiment-data-absolute-path'],
- $expPathConstant, ExperimentUtilities::$experimentPath);
- //$experiment->userConfigurationData->advanceOutputDataHandling->outputDataDir = $outputDataDir;
foreach ($experimentInputs as $experimentInput) {
if ($experimentInput->type == DataType::URI) {
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/ae9ed4a3/app/routes.php
----------------------------------------------------------------------
diff --git a/app/routes.php b/app/routes.php
index 63e0df0..0309614 100755
--- a/app/routes.php
+++ b/app/routes.php
@@ -89,7 +89,7 @@ Route::get("experiment/browse", "ExperimentController@browseView");
Route::post("experiment/browse", "ExperimentController@browseView");
Route::get("download/{exp_folder}/{exp_file}", function( $exp_folder, $exp_file){
- $downloadLink = Config::get('pga_config.airavata')['experiment-data-absolute-path'] . '/' . $exp_folder . '/' . $exp_file;
+ $downloadLink = Config::get('pga_config.airavata')['experiment-data-absolute-path'] . '/' . Session::get('username') . '/' . $exp_folder . '/' . $exp_file;
return Response::download( $downloadLink);
});
/*