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
3ed4821e
Commit
3ed4821e
authored
Sep 03, 2012
by
Jerome Mariette
Browse files
add analysis project
parent
68bef960
Changes
1
Hide whitespace changes
Inline
Side-by-side
ui/nG6/lib/class.tx_nG6_db.php
View file @
3ed4821e
...
...
@@ -125,7 +125,7 @@ class tx_nG6_db {
// get all runs the usergroup can access to
$queryParts
=
array
(
'SELECT'
=>
'tx_nG6_run.uid as run_id
, tx_nG6_run.name as name
'
,
'SELECT'
=>
'tx_nG6_run.uid as run_id'
,
'FROM'
=>
'tx_nG6_project '
.
' INNER JOIN tx_nG6_project_run ON tx_nG6_project.uid=tx_nG6_project_run.project_id '
.
' INNER JOIN tx_nG6_run ON tx_nG6_project_run.run_id=tx_nG6_run.uid '
,
...
...
@@ -134,11 +134,33 @@ class tx_nG6_db {
'ORDERBY'
=>
''
,
'LIMIT'
=>
''
);
$res
=
$GLOBALS
[
'TYPO3_DB'
]
->
exec_SELECT_queryArray
(
$queryParts
);
while
(
$res_row
=
$GLOBALS
[
'TYPO3_DB'
]
->
sql_fetch_assoc
(
$res
))
{
$current_size
+=
tx_nG6_db
::
get_run_size
(
$res_row
[
'run_id'
],
$data_folder
,
$get_analyzes
);
}
// get all project analysis the usergroup can access to
if
(
$get_analyzes
)
{
$queryParts
=
array
(
'SELECT'
=>
'tx_nG6_analyze.uid as analyze_id'
,
'FROM'
=>
'tx_nG6_project '
.
' INNER JOIN tx_nG6_project_analyze ON tx_nG6_project.uid=tx_nG6_project_analyze.project_id '
.
' INNER JOIN tx_nG6_analyze ON tx_nG6_project_analyze.analyze_id=tx_nG6_analyze.uid '
,
'WHERE'
=>
$where
,
'GROUPBY'
=>
''
,
'ORDERBY'
=>
''
,
'LIMIT'
=>
''
);
if
(
$usergroup
!=
"0"
)
{
$where
=
'tx_nG6_project.uid IN ('
.
implode
(
","
,
$project_list_final
)
.
') AND tx_nG6_analyze.date BETWEEN '
.
$date_cursors
.
' AND '
.
$date_cursore
;
}
else
{
$where
=
'tx_nG6_analyze.date BETWEEN '
.
$date_cursors
.
' AND '
.
$date_cursore
;
}
$res
=
$GLOBALS
[
'TYPO3_DB'
]
->
exec_SELECT_queryArray
(
$queryParts
);
while
(
$res_row
=
$GLOBALS
[
'TYPO3_DB'
]
->
sql_fetch_assoc
(
$res
))
{
$current_size
+=
tx_nG6_db
::
get_analysis_size
(
$res_row
[
'analyze_id'
],
$data_folder
);
}
}
$cumulated_size
+=
$current_size
;
if
(
$date_cursore
+
$total_day_count_tstamp
>
$date_end
)
{
...
...
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