Commit 9e465248 authored by Jerome Mariette's avatar Jerome Mariette
Browse files

fixe a bug for unlogged users (hide and unhide shown)

parent 62a6d5c9
...@@ -191,7 +191,7 @@ class tx_nG6_pi1 extends tslib_pibase { ...@@ -191,7 +191,7 @@ class tx_nG6_pi1 extends tslib_pibase {
$content .= '<tr id="project_'.$project_values['id'].'">'; $content .= '<tr id="project_'.$project_values['id'].'">';
// projects updates possibility depends on projects rights (show checkboxes or not) // projects updates possibility depends on projects rights (show checkboxes or not)
if ( tx_nG6_db::is_super_user($GLOBALS['TSFE']->fe_user->user['usergroup'], 'project', $project_values['id']) ) { if ( $GLOBALS['TSFE']->loginUser && tx_nG6_db::is_super_user($GLOBALS['TSFE']->fe_user->user['usergroup'], 'project', $project_values['id']) ) {
$content .= '<td '.$hidden.'><center><input type="checkbox" name="opt_checkbox" value="project_'.$project_values['id'].'"></center></td>'; $content .= '<td '.$hidden.'><center><input type="checkbox" name="opt_checkbox" value="project_'.$project_values['id'].'"></center></td>';
} else { } else {
$content .= '<td name="empty_checkbox"></td>'; $content .= '<td name="empty_checkbox"></td>';
...@@ -310,7 +310,7 @@ class tx_nG6_pi1 extends tslib_pibase { ...@@ -310,7 +310,7 @@ class tx_nG6_pi1 extends tslib_pibase {
// Add the row information // Add the row information
$content .= '<tr id="run_'.$run_values["id"].'">'; $content .= '<tr id="run_'.$run_values["id"].'">';
// runs updates possibility depends on runs rights (show checkboxes or not) // runs updates possibility depends on runs rights (show checkboxes or not)
if ( tx_nG6_db::is_super_user($GLOBALS['TSFE']->fe_user->user['usergroup'], 'run', $run_values['id']) ) { if ( $GLOBALS['TSFE']->loginUser && tx_nG6_db::is_super_user($GLOBALS['TSFE']->fe_user->user['usergroup'], 'run', $run_values['id']) ) {
$content .= '<td '.$hidden.' ><center><input type="checkbox" name="opt_checkbox" value="run_'.$run_values["id"].'"></center></td>'; $content .= '<td '.$hidden.' ><center><input type="checkbox" name="opt_checkbox" value="run_'.$run_values["id"].'"></center></td>';
} else { } else {
$content .= '<td name="empty_checkbox"></td>'; $content .= '<td name="empty_checkbox"></td>';
...@@ -498,7 +498,7 @@ class tx_nG6_pi1 extends tslib_pibase { ...@@ -498,7 +498,7 @@ class tx_nG6_pi1 extends tslib_pibase {
$content .= '<tr id="analyze_'.$analyse_values["id"].'">'; $content .= '<tr id="analyze_'.$analyse_values["id"].'">';
// analyzes updates possibility depends on analyzes rights (show checkboxes or not) // analyzes updates possibility depends on analyzes rights (show checkboxes or not)
if ( tx_nG6_db::is_super_user($GLOBALS['TSFE']->fe_user->user['usergroup'], 'analyze', $analyse_values['id']) ) { if ( $GLOBALS['TSFE']->loginUser && tx_nG6_db::is_super_user($GLOBALS['TSFE']->fe_user->user['usergroup'], 'analyze', $analyse_values['id']) ) {
$content .= '<td '.$hidden.' ><center><input type="checkbox" name="opt_checkbox" value="analyze_'.$analyse_values["id"].'"></center></td>'; $content .= '<td '.$hidden.' ><center><input type="checkbox" name="opt_checkbox" value="analyze_'.$analyse_values["id"].'"></center></td>';
} else { } else {
$content .= '<td name="empty_checkbox"></td>'; $content .= '<td name="empty_checkbox"></td>';
...@@ -681,4 +681,4 @@ if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/nG6/pi1 ...@@ -681,4 +681,4 @@ if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/nG6/pi1
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/nG6/pi1/class.tx_nG6_pi1.php']); include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/nG6/pi1/class.tx_nG6_pi1.php']);
} }
?> ?>
\ 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