Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
genotoul-bioinfo
ng6
Commits
567d5ee8
Commit
567d5ee8
authored
Jan 15, 2020
by
Romain Therville
☕
Browse files
Merge branch 'issue#151' into 'master'
Merge branch issue
#151
with master See merge request
!85
parents
5e80a4e0
b66ba910
Changes
1
Hide whitespace changes
Inline
Side-by-side
ui/nG6/lib/class.tx_nG6_utils.php
View file @
567d5ee8
...
@@ -288,7 +288,7 @@ please have a look at our storage fees (<a href="###URL_PRICE###">###URL_PRICE##
...
@@ -288,7 +288,7 @@ please have a look at our storage fees (<a href="###URL_PRICE###">###URL_PRICE##
//Return a php array containing the section relative to the given space_id
//Return a php array containing the section relative to the given space_id
static
function
get_retention_policy_from_space_id
(
$space_id
=
"default"
){
static
function
get_retention_policy_from_space_id
(
$space_id
=
"default"
){
$config_file_content
=
tx_nG6_utils
::
get_config_content
(
"default"
);
$config_file_content
=
tx_nG6_utils
::
get_config_content
();
//To explode the file content by line, we use PHP_EOL
//To explode the file content by line, we use PHP_EOL
$array_config_content
=
explode
(
PHP_EOL
,
$config_file_content
);
$array_config_content
=
explode
(
PHP_EOL
,
$config_file_content
);
...
@@ -353,7 +353,30 @@ please have a look at our storage fees (<a href="###URL_PRICE###">###URL_PRICE##
...
@@ -353,7 +353,30 @@ please have a look at our storage fees (<a href="###URL_PRICE###">###URL_PRICE##
return
(
$return_text
);
return
(
$return_text
);
}
}
static
function
get_project_data_save_dir
(
$project_id
){
//Return a php array with array[space_name]=space_name, containing all available space_ids
static
function
get_available_space_ids
(){
$config_file_content
=
tx_nG6_utils
::
get_config_content
();
//To explode the file content by line, we use PHP_EOL
$array_config_content
=
explode
(
PHP_EOL
,
$config_file_content
);
$ret
=
array
();
foreach
(
$array_config_content
as
$line
=>
$line_content
){
//If the current line starts with "[space_"
if
(
strpos
(
$line_content
,
'[space_'
)
===
0
){
$space_id
=
str_replace
(
'[space_'
,
''
,
$line_content
);
$space_id
=
str_replace
(
']'
,
''
,
$space_id
);
$space_id
=
trim
(
$space_id
);
$ret
[
$space_id
]
=
$space_id
;
}
}
return
(
$ret
);
}
static
function
get_project_data_save_dir
(
$project_id
){
$space_id
=
tx_nG6_db
::
get_project_space_id
(
$project_id
);
$space_id
=
tx_nG6_db
::
get_project_space_id
(
$project_id
);
$space_config
=
tx_nG6_utils
::
get_retention_policy_from_space_id
(
$space_id
);
$space_config
=
tx_nG6_utils
::
get_retention_policy_from_space_id
(
$space_id
);
$path_to_space_save_dir
=
''
;
$path_to_space_save_dir
=
''
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment