Skip to content
GitLab
Menu
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
f7ee077c
Commit
f7ee077c
authored
Jan 15, 2020
by
Romain Therville
🐭
Browse files
Last fix for class.tx_nG6_eid.php
Same as last commit. issue
#151
parent
91738e64
Changes
1
Show whitespace changes
Inline
Side-by-side
ui/nG6/class.tx_nG6_eid.php
View file @
f7ee077c
...
@@ -78,7 +78,8 @@ class tx_nG6_eid {
...
@@ -78,7 +78,8 @@ class tx_nG6_eid {
print
$html_tree
;
print
$html_tree
;
// If the type of data requested is run
// If the type of data requested is run
}
else
if
(
$type
==
'run'
){
}
elseif
(
$type
==
'run'
){
$run_id
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'object_id'
));
$run_id
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'object_id'
));
// Select all analysis linked to the run and the run information
// Select all analysis linked to the run and the run information
$run_analysis
=
tx_nG6_db
::
get_user_run_analysis
(
$user_id
,
$run_id
,
'tx_nG6_analyze.name'
);
$run_analysis
=
tx_nG6_db
::
get_user_run_analysis
(
$user_id
,
$run_id
,
'tx_nG6_analyze.name'
);
...
@@ -93,7 +94,8 @@ class tx_nG6_eid {
...
@@ -93,7 +94,8 @@ class tx_nG6_eid {
print
$html_tree
;
print
$html_tree
;
// If asked to check a job status
// If asked to check a job status
}
else
if
(
$type
==
'check_status'
)
{
}
elseif
(
$type
==
'check_status'
)
{
$pid
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'pid'
));
$pid
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'pid'
));
$archive_path
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'archive_path'
));
$archive_path
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'archive_path'
));
$process
=
new
Process
();
$process
=
new
Process
();
...
@@ -107,7 +109,7 @@ class tx_nG6_eid {
...
@@ -107,7 +109,7 @@ class tx_nG6_eid {
}
}
// If asked to hide a {project/run}
// If asked to hide a {project/run}
}
else
if
(
$type
==
'hide'
)
{
}
elseif
(
$type
==
'hide'
)
{
$ids
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'ids'
));
$ids
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'ids'
));
// {project/run}_id to array (1;2;3;...) -> [1;2;3;...]
// {project/run}_id to array (1;2;3;...) -> [1;2;3;...]
...
@@ -118,18 +120,18 @@ class tx_nG6_eid {
...
@@ -118,18 +120,18 @@ class tx_nG6_eid {
foreach
(
$tab_ids
as
$id
=>
$value
)
{
foreach
(
$tab_ids
as
$id
=>
$value
)
{
tx_nG6_db
::
hide_project
(
$value
);
tx_nG6_db
::
hide_project
(
$value
);
}
}
}
else
if
(
$hide_level
==
'run'
)
{
}
elseif
(
$hide_level
==
'run'
)
{
foreach
(
$tab_ids
as
$id
=>
$value
)
{
foreach
(
$tab_ids
as
$id
=>
$value
)
{
tx_nG6_db
::
hide_run
(
$value
,
$user_id
);
tx_nG6_db
::
hide_run
(
$value
,
$user_id
);
}
}
}
else
if
(
$hide_level
==
'analysis'
)
{
}
elseif
(
$hide_level
==
'analysis'
)
{
foreach
(
$tab_ids
as
$id
=>
$value
)
{
foreach
(
$tab_ids
as
$id
=>
$value
)
{
tx_nG6_db
::
hide_analysis
(
$value
,
$user_id
);
tx_nG6_db
::
hide_analysis
(
$value
,
$user_id
);
}
}
}
}
// If asked to unhide a {project/run}
// If asked to unhide a {project/run}
}
else
if
(
$type
==
'unhide'
)
{
}
elseif
(
$type
==
'unhide'
)
{
$ids
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'ids'
));
$ids
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'ids'
));
// {project/run}_id to array (1;2;3;...) -> [1;2;3;...]
// {project/run}_id to array (1;2;3;...) -> [1;2;3;...]
...
@@ -140,18 +142,19 @@ class tx_nG6_eid {
...
@@ -140,18 +142,19 @@ class tx_nG6_eid {
foreach
(
$tab_ids
as
$id
=>
$value
)
{
foreach
(
$tab_ids
as
$id
=>
$value
)
{
tx_nG6_db
::
unhide_project
(
$value
);
tx_nG6_db
::
unhide_project
(
$value
);
}
}
}
else
if
(
$unhide_level
==
'run'
)
{
}
elseif
(
$unhide_level
==
'run'
)
{
foreach
(
$tab_ids
as
$id
=>
$value
)
{
foreach
(
$tab_ids
as
$id
=>
$value
)
{
tx_nG6_db
::
unhide_run
(
$value
,
true
);
tx_nG6_db
::
unhide_run
(
$value
,
true
);
}
}
}
else
if
(
$unhide_level
==
'analysis'
)
{
}
elseif
(
$unhide_level
==
'analysis'
)
{
foreach
(
$tab_ids
as
$id
=>
$value
)
{
foreach
(
$tab_ids
as
$id
=>
$value
)
{
tx_nG6_db
::
unhide_analysis
(
$value
,
true
);
tx_nG6_db
::
unhide_analysis
(
$value
,
true
);
}
}
}
}
// If asked to delete a {project/run/analyze}
// If asked to delete a {project/run/analyze}
}
else
if
(
$type
==
'delete'
)
{
}
elseif
(
$type
==
'delete'
)
{
$ids
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'ids'
));
$ids
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'ids'
));
// {project/run}_id to array (1;2;3;...) -> [1;2;3;...]
// {project/run}_id to array (1;2;3;...) -> [1;2;3;...]
...
@@ -178,12 +181,12 @@ class tx_nG6_eid {
...
@@ -178,12 +181,12 @@ class tx_nG6_eid {
$res
=
tx_nG6_db
::
delete_project
(
$value
,
$user_login
,
$user_pwd
,
$data_folder
);
$res
=
tx_nG6_db
::
delete_project
(
$value
,
$user_login
,
$user_pwd
,
$data_folder
);
if
(
$res
!=
0
)
{
break
;
}
if
(
$res
!=
0
)
{
break
;
}
}
}
}
else
if
(
$delete_level
==
'run'
)
{
}
elseif
(
$delete_level
==
'run'
)
{
foreach
(
$tab_ids
as
$id
=>
$value
)
{
foreach
(
$tab_ids
as
$id
=>
$value
)
{
$res
=
tx_nG6_db
::
delete_run
(
$value
,
$user_login
,
$user_pwd
,
$data_folder
);
$res
=
tx_nG6_db
::
delete_run
(
$value
,
$user_login
,
$user_pwd
,
$data_folder
);
if
(
$res
!=
0
)
{
break
;
}
if
(
$res
!=
0
)
{
break
;
}
}
}
}
else
if
(
$delete_level
==
'analysis'
)
{
}
elseif
(
$delete_level
==
'analysis'
)
{
foreach
(
$tab_ids
as
$id
=>
$value
)
{
foreach
(
$tab_ids
as
$id
=>
$value
)
{
$res
=
tx_nG6_db
::
delete_analysis
(
$value
,
$user_login
,
$user_pwd
,
$data_folder
);
$res
=
tx_nG6_db
::
delete_analysis
(
$value
,
$user_login
,
$user_pwd
,
$data_folder
);
if
(
$res
!=
0
)
{
break
;
}
if
(
$res
!=
0
)
{
break
;
}
...
@@ -193,7 +196,7 @@ class tx_nG6_eid {
...
@@ -193,7 +196,7 @@ class tx_nG6_eid {
print
$res
;
print
$res
;
// If asked to publish a project
// If asked to publish a project
}
else
if
(
$type
==
'publish'
)
{
}
elseif
(
$type
==
'publish'
)
{
$ids
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'ids'
));
$ids
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'ids'
));
// project_id to array (1;2;3;...) -> [1;2;3;...]
// project_id to array (1;2;3;...) -> [1;2;3;...]
...
@@ -203,7 +206,7 @@ class tx_nG6_eid {
...
@@ -203,7 +206,7 @@ class tx_nG6_eid {
}
}
// If asked to unpublish a project
// If asked to unpublish a project
}
else
if
(
$type
==
'unpublish'
)
{
}
elseif
(
$type
==
'unpublish'
)
{
$ids
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'ids'
));
$ids
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'ids'
));
// project_id to array (1;2;3;...) -> [1;2;3;...]
// project_id to array (1;2;3;...) -> [1;2;3;...]
...
@@ -213,7 +216,7 @@ class tx_nG6_eid {
...
@@ -213,7 +216,7 @@ class tx_nG6_eid {
}
}
// If asked the size
// If asked the size
}
else
if
(
$type
==
'get_size'
)
{
}
elseif
(
$type
==
'get_size'
)
{
$ids
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'ids'
));
$ids
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'ids'
));
$view
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'view'
));
$view
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'view'
));
$tab_ids
=
explode
(
","
,
$ids
);
$tab_ids
=
explode
(
","
,
$ids
);
...
@@ -221,14 +224,14 @@ class tx_nG6_eid {
...
@@ -221,14 +224,14 @@ class tx_nG6_eid {
foreach
(
$tab_ids
as
$id
=>
$value
)
{
foreach
(
$tab_ids
as
$id
=>
$value
)
{
if
(
$view
==
"run"
)
{
if
(
$view
==
"run"
)
{
$full_size
+=
tx_nG6_db
::
get_run_size
(
$value
,
true
);
$full_size
+=
tx_nG6_db
::
get_run_size
(
$value
,
true
);
}
else
if
(
$view
==
"project"
)
{
}
elseif
(
$view
==
"project"
)
{
$full_size
+=
tx_nG6_db
::
get_project_size
(
$value
,
true
);
$full_size
+=
tx_nG6_db
::
get_project_size
(
$value
,
true
);
}
}
}
}
print
tx_nG6_utils
::
get_octet_string_representation
(
$full_size
);
print
tx_nG6_utils
::
get_octet_string_representation
(
$full_size
);
// data size
// data size
}
else
if
(
$type
==
'get_data_size'
){
}
elseif
(
$type
==
'get_data_size'
){
$run_ids
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'run_ids'
));
$run_ids
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'run_ids'
));
$data_ids
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'data_ids'
));
$data_ids
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'data_ids'
));
$analysis_ids
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'analysis_ids'
));
$analysis_ids
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'analysis_ids'
));
...
@@ -255,7 +258,7 @@ class tx_nG6_eid {
...
@@ -255,7 +258,7 @@ class tx_nG6_eid {
print
$full_size
.
":::"
.
tx_nG6_utils
::
get_octet_string_representation
(
$full_size
);
print
$full_size
.
":::"
.
tx_nG6_utils
::
get_octet_string_representation
(
$full_size
);
// If update a field
// If update a field
}
else
if
(
$type
==
'update_db_field'
)
{
}
elseif
(
$type
==
'update_db_field'
)
{
//Retrieve infomation
//Retrieve infomation
$table
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'table'
));
$table
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'table'
));
...
@@ -279,7 +282,7 @@ class tx_nG6_eid {
...
@@ -279,7 +282,7 @@ class tx_nG6_eid {
}
}
// add comment
// add comment
else
if
(
$type
==
'add_comment'
)
{
elseif
(
$type
==
'add_comment'
)
{
$view
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'view'
));
$view
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'view'
));
$view_id
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'view_id'
));
// project_id or run_id or analyze_id
$view_id
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'view_id'
));
// project_id or run_id or analyze_id
$new_comment
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'new_comment'
));
$new_comment
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'new_comment'
));
...
@@ -301,7 +304,7 @@ class tx_nG6_eid {
...
@@ -301,7 +304,7 @@ class tx_nG6_eid {
print
$res
;
print
$res
;
}
}
//delete comment
//delete comment
else
if
(
$type
==
'delete_comment'
)
{
elseif
(
$type
==
'delete_comment'
)
{
$view
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'view'
));
$view
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'view'
));
$view_id
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'view_id'
));
// project_id or run_id or analyze_id
$view_id
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'view_id'
));
// project_id or run_id or analyze_id
$comment_id
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'comment_id'
));
$comment_id
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'comment_id'
));
...
@@ -318,7 +321,7 @@ class tx_nG6_eid {
...
@@ -318,7 +321,7 @@ class tx_nG6_eid {
print
$res
;
print
$res
;
}
}
//update comment
//update comment
else
if
(
$type
==
'update_comment'
)
{
elseif
(
$type
==
'update_comment'
)
{
$comment_id
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'comment_id'
));
$comment_id
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'comment_id'
));
$new_comment
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'new_comment'
));
$new_comment
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'new_comment'
));
$res
=
0
;
$res
=
0
;
...
@@ -327,7 +330,7 @@ class tx_nG6_eid {
...
@@ -327,7 +330,7 @@ class tx_nG6_eid {
print
$res
;
print
$res
;
// If asked the krona page
// If asked the krona page
}
else
if
(
$type
==
'get_krona'
)
{
}
elseif
(
$type
==
'get_krona'
)
{
$data_folder
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'data_folder'
));
$data_folder
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'data_folder'
));
$file_name
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'file_name'
));
$file_name
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'file_name'
));
...
@@ -443,7 +446,7 @@ class tx_nG6_eid {
...
@@ -443,7 +446,7 @@ class tx_nG6_eid {
$val
.
=
'</html>'
;
$val
.
=
'</html>'
;
print
$val
;
print
$val
;
}
else
if
(
$type
==
'delete_users'
)
{
}
elseif
(
$type
==
'delete_users'
)
{
$ids
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'ids'
));
$ids
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'ids'
));
// users_id to array (1;2;3;...) -> [1;2;3;...]
// users_id to array (1;2;3;...) -> [1;2;3;...]
...
@@ -487,7 +490,7 @@ class tx_nG6_eid {
...
@@ -487,7 +490,7 @@ class tx_nG6_eid {
}
}
// to change users' right on project
// to change users' right on project
}
else
if
(
$type
==
'change_right'
)
{
}
elseif
(
$type
==
'change_right'
)
{
$project_id
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'project_id'
));
$project_id
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'project_id'
));
$c_user_id
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'c_user_id'
));
$c_user_id
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'c_user_id'
));
...
@@ -496,7 +499,7 @@ class tx_nG6_eid {
...
@@ -496,7 +499,7 @@ class tx_nG6_eid {
tx_nG6_db
::
change_access_to_project
(
$c_user_id
,
$project_id
,
$right_id
);
tx_nG6_db
::
change_access_to_project
(
$c_user_id
,
$project_id
,
$right_id
);
// jquery autocomplete
// jquery autocomplete
}
else
if
(
$type
==
'autocomplete'
)
{
}
elseif
(
$type
==
'autocomplete'
)
{
$col
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'gender'
));
$col
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'gender'
));
$project_id
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'project_id'
));
$project_id
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'project_id'
));
...
@@ -523,7 +526,7 @@ class tx_nG6_eid {
...
@@ -523,7 +526,7 @@ class tx_nG6_eid {
print
$json_res
;
print
$json_res
;
// add a new member on project
// add a new member on project
}
else
if
(
$type
==
'add_user'
)
{
}
elseif
(
$type
==
'add_user'
)
{
$part
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'part'
));
$part
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'part'
));
$user_name
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'username'
));
$user_name
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'username'
));
...
@@ -581,14 +584,14 @@ class tx_nG6_eid {
...
@@ -581,14 +584,14 @@ class tx_nG6_eid {
mail
(
$email
,
$create_user_title
,
$message
,
"From: <"
.
$from_email
.
">"
);
mail
(
$email
,
$create_user_title
,
$message
,
"From: <"
.
$from_email
.
">"
);
}
}
print
'2'
;
// ok
print
'2'
;
// ok
}
else
if
(
$res_code
==
1
)
{
}
elseif
(
$res_code
==
1
)
{
print
'4'
;
// username exists
print
'4'
;
// username exists
}
else
if
(
$res_code
==
2
)
{
}
elseif
(
$res_code
==
2
)
{
print
'5'
;
// email exists
print
'5'
;
// email exists
}
}
// user exists in DB
// user exists in DB
}
else
if
(
$user
[
"username"
]
!=
$user_name
||
$user
[
"email"
]
!=
$email
||
$user
[
"first_name"
]
!=
$first_name
||
$user
[
"last_name"
]
!=
$last_name
)
{
}
elseif
(
$user
[
"username"
]
!=
$user_name
||
$user
[
"email"
]
!=
$email
||
$user
[
"first_name"
]
!=
$first_name
||
$user
[
"last_name"
]
!=
$last_name
)
{
// there is difference between information provided and the user account
// there is difference between information provided and the user account
print
'3'
;
print
'3'
;
}
else
{
}
else
{
...
@@ -622,7 +625,7 @@ class tx_nG6_eid {
...
@@ -622,7 +625,7 @@ class tx_nG6_eid {
}
}
}
}
else
if
(
$type
==
'check_ssh_user'
){
elseif
(
$type
==
'check_ssh_user'
){
$user_login
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'user_login'
));
$user_login
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'user_login'
));
$user_pwd
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'user_pwd'
));
$user_pwd
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'user_pwd'
));
$project_id
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'project_id'
));
$project_id
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'project_id'
));
...
@@ -638,7 +641,7 @@ class tx_nG6_eid {
...
@@ -638,7 +641,7 @@ class tx_nG6_eid {
if
(
!
$connection
)
{
if
(
!
$connection
)
{
//1st test, basic SSH connection
//1st test, basic SSH connection
$res
=
3
;
$res
=
3
;
}
else
if
(
!
ssh2_auth_password
(
$connection
,
$user_login
,
$user_pwd
)
){
}
elseif
(
!
ssh2_auth_password
(
$connection
,
$user_login
,
$user_pwd
)
){
//2nd test, SSH connection with user + pwd
//2nd test, SSH connection with user + pwd
$res
=
2
;
$res
=
2
;
}
else
{
}
else
{
...
@@ -669,25 +672,25 @@ class tx_nG6_eid {
...
@@ -669,25 +672,25 @@ class tx_nG6_eid {
}
}
else
if
(
$type
==
'add_to_ng6_admin'
){
elseif
(
$type
==
'add_to_ng6_admin'
){
$userid
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'userid'
));
$userid
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'userid'
));
tx_nG6_db
::
add_to_ng6_admin
(
$userid
);
tx_nG6_db
::
add_to_ng6_admin
(
$userid
);
}
}
else
if
(
$type
==
'delete_from_ng6_admin'
){
elseif
(
$type
==
'delete_from_ng6_admin'
){
$userids
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'userids'
));
$userids
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'userids'
));
$userids
=
explode
(
','
,
$userids
);
$userids
=
explode
(
','
,
$userids
);
tx_nG6_db
::
remove_from_ng6_admin
(
$userids
);
tx_nG6_db
::
remove_from_ng6_admin
(
$userids
);
}
}
else
if
(
$type
==
'add_to_ng6_superadmin'
){
elseif
(
$type
==
'add_to_ng6_superadmin'
){
$userid
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'userid'
));
$userid
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'userid'
));
tx_nG6_db
::
add_to_ng6_superadmin
(
$userid
);
tx_nG6_db
::
add_to_ng6_superadmin
(
$userid
);
}
}
else
if
(
$type
==
'delete_from_ng6_superadmin'
){
elseif
(
$type
==
'delete_from_ng6_superadmin'
){
$userids
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'userids'
));
$userids
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'userids'
));
$userids
=
explode
(
','
,
$userids
);
$userids
=
explode
(
','
,
$userids
);
tx_nG6_db
::
remove_from_ng6_superadmin
(
$userids
);
tx_nG6_db
::
remove_from_ng6_superadmin
(
$userids
);
}
}
else
if
(
$type
==
'update_user'
){
elseif
(
$type
==
'update_user'
){
$email
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'email'
));
$email
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'email'
));
$first_name
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'first_name'
));
$first_name
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'first_name'
));
$last_name
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'last_name'
));
$last_name
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'last_name'
));
...
@@ -735,7 +738,7 @@ class tx_nG6_eid {
...
@@ -735,7 +738,7 @@ class tx_nG6_eid {
print
$nb_updated
;
print
$nb_updated
;
}
}
else
if
(
$type
==
'get_user_group'
){
elseif
(
$type
==
'get_user_group'
){
$id
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'user_id'
));
$id
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'user_id'
));
print
json_encode
(
tx_nG6_db
::
get_group_informations
(
tx_nG6_db
::
get_user_usergroup
(
$id
)));
print
json_encode
(
tx_nG6_db
::
get_group_informations
(
tx_nG6_db
::
get_user_usergroup
(
$id
)));
}
}
...
@@ -767,7 +770,8 @@ class tx_nG6_eid {
...
@@ -767,7 +770,8 @@ class tx_nG6_eid {
$smarty
->
assign
(
'login_user'
,
$login_user
);
$smarty
->
assign
(
'login_user'
,
$login_user
);
print
$smarty
->
fetch
(
'run_table.tpl'
);
print
$smarty
->
fetch
(
'run_table.tpl'
);
}
elseif
(
$type
==
'projects_table'
)
{
}
elseif
(
$type
==
'projects_table'
)
{
$smarty
=
new
Smarty
();
$smarty
=
new
Smarty
();
$smarty
->
setTemplateDir
(
\
TYPO3\CMS\Core\Utility\ExtensionManagementUtility
::
extPath
(
'nG6'
)
.
'/pi1'
);
$smarty
->
setTemplateDir
(
\
TYPO3\CMS\Core\Utility\ExtensionManagementUtility
::
extPath
(
'nG6'
)
.
'/pi1'
);
$smarty
->
setCompileDir
(
\
TYPO3\CMS\Core\Utility\ExtensionManagementUtility
::
extPath
(
'nG6'
)
.
'/res/smarty/templates_c'
);
$smarty
->
setCompileDir
(
\
TYPO3\CMS\Core\Utility\ExtensionManagementUtility
::
extPath
(
'nG6'
)
.
'/res/smarty/templates_c'
);
...
@@ -923,6 +927,7 @@ class tx_nG6_eid {
...
@@ -923,6 +927,7 @@ class tx_nG6_eid {
$with_laboratories_id
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'with_lab'
));
$with_laboratories_id
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'with_lab'
));
$create_users
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'create_users'
));
$create_users
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'create_users'
));
//Change date format
//Change date format
//print ('test');
print
json_encode
(
tx_nG6_db
::
filter_list_retention_data_info
(
$filter_space
,
$max_retention_date
,
$create_users
,
$without_laboratories_id
,
$with_laboratories_id
));
print
json_encode
(
tx_nG6_db
::
filter_list_retention_data_info
(
$filter_space
,
$max_retention_date
,
$create_users
,
$without_laboratories_id
,
$with_laboratories_id
));
}
elseif
(
$type
==
'delete_purge_data'
)
{
}
elseif
(
$type
==
'delete_purge_data'
)
{
//Delete data link to the list of purge demand
//Delete data link to the list of purge demand
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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