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
7cd29580
Commit
7cd29580
authored
Apr 30, 2021
by
gsalin
Browse files
#202
parent
1637572b
Changes
2
Show whitespace changes
Inline
Side-by-side
ui/nG6/lib/class.tx_nG6_db.php
View file @
7cd29580
...
...
@@ -3696,59 +3696,6 @@ static function get_project_runs($project_id, $get_hidden=TRUE, $orderby='', $li
}
}
}
/*
* DB integrity functions
*------------------------------------------------------------*/
/**
* Check the integrity of 'fe_rights_levels' table.
*/
static
function
check_db_rights_level
(){
$queryParts
=
Array
(
'SELECT'
=>
'fe_rights_levels.right_level_id, fe_rights_levels.right_level_label '
,
'FROM'
=>
'fe_rights_levels '
,
'WHERE'
=>
''
,
'GROUPBY'
=>
''
,
'ORDERBY'
=>
''
,
'LIMIT'
=>
''
,
);
$res
=
$GLOBALS
[
'TYPO3_DB'
]
->
exec_SELECT_queryArray
(
$queryParts
);
$res_tab
=
array
();
while
(
$res_row
=
$GLOBALS
[
'TYPO3_DB'
]
->
sql_fetch_assoc
(
$res
))
{
$res_tab
=
array
(
'id'
=>
$res_row
[
'right_level_id'
],
'label'
=>
$res_row
[
'right_level_label'
]
);
}
// insert
if
(
!
in_array
(
'member'
,
array_values
(
$res_tab
))
){
$insert_rows
=
Array
(
'right_level_id'
=>
0
,
'right_level_label'
=>
'member'
);
$GLOBALS
[
'TYPO3_DB'
]
->
exec_INSERTquery
(
'fe_rights_levels'
,
$insert_rows
);
}
if
(
!
in_array
(
'manager'
,
array_values
(
$res_tab
))
){
$insert_rows
=
Array
(
'right_level_id'
=>
1
,
'right_level_label'
=>
'manager'
);
$GLOBALS
[
'TYPO3_DB'
]
->
exec_INSERTquery
(
'fe_rights_levels'
,
$insert_rows
);
}
if
(
!
in_array
(
'administrator'
,
array_values
(
$res_tab
))
){
$insert_rows
=
Array
(
'right_level_id'
=>
2
,
'right_level_label'
=>
'administrator'
);
$GLOBALS
[
'TYPO3_DB'
]
->
exec_INSERTquery
(
'fe_rights_levels'
,
$insert_rows
);
}
}
}
if
(
defined
(
'TYPO3_MODE'
)
&&
$TYPO3_CONF_VARS
[
TYPO3_MODE
][
'XCLASS'
][
'ext/nG6/class.tx_nG6_db.php'
])
{
...
...
ui/nG6/pi1/class.tx_nG6_pi1.php
View file @
7cd29580
...
...
@@ -84,8 +84,6 @@ class tx_nG6_pi1 extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin {
<link type="text/css" rel="stylesheet" media="screen" href="'
.
\
TYPO3\CMS\Core\Utility\PathUtility
::
stripPathSitePrefix
(
ExtensionManagementUtility
::
extPath
(
$this
->
extKey
))
.
'res/css/jflow.min.css"/>
<link type="text/css" rel="stylesheet" media="screen" href="'
.
\
TYPO3\CMS\Core\Utility\PathUtility
::
stripPathSitePrefix
(
ExtensionManagementUtility
::
extPath
(
$this
->
extKey
))
.
'res/css/tx_nG6.css"/>'
;
tx_nG6_db
::
check_db_rights_level
();
// if asked to upgrade to version 1.2
if
(
$this
->
piVars
[
'upgrade'
]){
$content
=
'<div class="sub-content sc-top">'
.
tx_nG6_upgrade
::
upgrade
(
$this
->
piVars
[
'upgrade'
],
$this
->
conf
[
"data"
])
.
'</div>'
;
...
...
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