Commit 567d5ee8 authored by Romain Therville's avatar Romain Therville 🐭

Merge branch 'issue#151' into 'master'

Merge branch issue #151 with master

See merge request !85
parents 5e80a4e0 b66ba910
......@@ -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
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
$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##
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_config = tx_nG6_utils::get_retention_policy_from_space_id($space_id);
$path_to_space_save_dir = '';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment