Commit 7db07933 authored by Gerald Salin's avatar Gerald Salin
Browse files

rollback the previous commit, except sorting the project by name

parent d46d63ca
......@@ -47,11 +47,10 @@ class tx_nG6_db {
$projects = array();
// If the user is not logged on display demonstration project
$where = 'tx_nG6_project.hidden=0 AND ';
if (!$GLOBALS['TSFE']->loginUser) {
$where .= 'fe_group=0';
$where = 'fe_group=0';
} else {
$where .= 'fe_group IN ('.tx_nG6_db::get_user_groups($user_group).')';
$where = 'fe_group IN ('.tx_nG6_db::get_user_groups($user_group).')';
}
$orderby='tx_nG6_project.name ASC';
......@@ -143,7 +142,7 @@ class tx_nG6_db {
'tx_nG6_project.fe_group AS project_fe_group',
'FROM' => 'tx_nG6_project INNER JOIN ( tx_nG6_project_run INNER JOIN tx_nG6_run ON tx_nG6_project_run.run_id=tx_nG6_run.uid '.
' ) ON tx_nG6_project.uid=tx_nG6_project_run.project_id',
'WHERE' => 'tx_nG6_run.hidden=0 AND tx_nG6_project.uid='.$project_id,
'WHERE' => 'tx_nG6_project.uid='.$project_id,
'GROUPBY' => '',
'ORDERBY' => $orderby,
'LIMIT' => $limit
......@@ -263,7 +262,6 @@ class tx_nG6_db {
* @return table with all projects
*/
function select_all_user_runs($user_group, $orderby='', $limit='') {
// If the user is not logged on display demonstration project
if (!$GLOBALS['TSFE']->loginUser) {
$where = 'fe_group=0';
......
Markdown is supported
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