Commit eb9dd0cb authored by Romain Therville's avatar Romain Therville
Browse files

Refactoring for the code.

Only useless parts have been removed.

Issue #129
parent 9887acd3
......@@ -622,7 +622,7 @@ class Analysis (Component):
file_name = os.path.basename(file)
else :
copyfile(file, os.path.join(self.__get_work_directory(), file_name))
return self.get_full_filepath(file_name, 'fileadmin')
return self.get_web_filepath(file_name, 'fileadmin')
def _save_files(self, files, gzip=False):
......@@ -752,18 +752,15 @@ class Analysis (Component):
t3mysql = t3MySQLdb()
t3mysql.update_fields('tx_nG6_analyze', str(, ['directory','retention_date'], [str("/"+new_relative_path),new_retention] )
old_dir_name = self.__get_save_directory()
new_dir_name = ng6conf.get_space_directory(space_id)
result_files = t3mysql.get_analysis_result_files(str(, 'fileadmin')
for result_file in result_files :
filename = os.path.basename(result_file['rvalue'])
new_filepath = self.get_full_filepath(filename)
new_filepath = self.get_web_filepath(filename)
t3mysql.update_fields('tx_nG6_result', str(result_file['uid']), ['rvalue'], [str(new_filepath)] )
return [retcode, str_cmd]
def get_full_filepath(self, file_name, base_filepath='fileadmin' ):
def get_web_filepath(self, file_name, base_filepath='fileadmin' ):
return base_filepath + os.path.join(, file_name)
\ No newline at end of file
Supports Markdown
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