Commit 5b0b5b88 authored by Jerome Mariette's avatar Jerome Mariette
Browse files

update organism > tx_nG6_organism

parent 6ab977ce
...@@ -457,6 +457,7 @@ class tx_nG6_eid { ...@@ -457,6 +457,7 @@ class tx_nG6_eid {
// group search // group search
}else{ }else{
if ($col == "location" || $col == "organism") { $col = "tx_nG6_".$col; }
$res = tx_nG6_db::get_all_starts_with_in_group($name_start, $col); $res = tx_nG6_db::get_all_starts_with_in_group($name_start, $col);
} }
$json_res = json_encode($res); $json_res = json_encode($res);
......
...@@ -1730,7 +1730,7 @@ class tx_nG6_db { ...@@ -1730,7 +1730,7 @@ class tx_nG6_db {
*/ */
function get_all_names_starting_with($name_start, $user_col) { function get_all_names_starting_with($name_start, $user_col) {
$queryParts = Array( $queryParts = Array(
'SELECT' => 'fe_users.uid, fe_users.username, fe_users.last_name, fe_users.first_name, fe_users.password, fe_users.email, fe_users.cruser_id, fe_groups.title, fe_groups.organism, fe_groups.location', 'SELECT' => 'fe_users.uid, fe_users.username, fe_users.last_name, fe_users.first_name, fe_users.password, fe_users.email, fe_users.cruser_id, fe_groups.title, fe_groups.tx_nG6_organism, fe_groups.tx_nG6_location',
'FROM' => 'fe_users INNER JOIN fe_groups ON fe_users.usergroup=fe_groups.uid', 'FROM' => 'fe_users INNER JOIN fe_groups ON fe_users.usergroup=fe_groups.uid',
'WHERE' => 'fe_users.'.$user_col.' LIKE "'.$name_start.'%"', 'WHERE' => 'fe_users.'.$user_col.' LIKE "'.$name_start.'%"',
'GROUPBY' => '', 'GROUPBY' => '',
...@@ -1749,8 +1749,8 @@ class tx_nG6_db { ...@@ -1749,8 +1749,8 @@ class tx_nG6_db {
'email' => $res_row['email'], 'email' => $res_row['email'],
'title' => $res_row['title'], 'title' => $res_row['title'],
'cruser_id' => $res_row['cruser_id'], 'cruser_id' => $res_row['cruser_id'],
'organism' => $res_row['organism'], 'organism' => $res_row['tx_nG6_organism'],
'location' => $res_row['location'] 'location' => $res_row['tx_nG6_location']
); );
} }
...@@ -1782,14 +1782,14 @@ class tx_nG6_db { ...@@ -1782,14 +1782,14 @@ class tx_nG6_db {
$res_tab[] = array( $res_tab[] = array(
'uid' => $res_row['uid'], 'uid' => $res_row['uid'],
'title' => $res_row['title'], 'title' => $res_row['title'],
'organism' => $res_row['organism'], 'organism' => $res_row['tx_nG6_organism'],
'location' => $res_row['location'] 'location' => $res_row['tx_nG6_location']
); );
} else { } else {
if( !isset($distinct[$res_row[$col]]) ) { if( !isset($distinct[$res_row[$col]]) ) {
$res_tab[] = array( $res_tab[] = array(
'uid' => $res_row['uid'], 'uid' => $res_row['uid'],
$col => $res_row[$col] substr($col, 7) => $res_row[$col]
); );
$distinct[$res_row[$col]] = True ; $distinct[$res_row[$col]] = True ;
} }
...@@ -2083,16 +2083,16 @@ class tx_nG6_db { ...@@ -2083,16 +2083,16 @@ class tx_nG6_db {
// Create new user // Create new user
$group_datas = array( $group_datas = array(
'cruser_id' => $cruser_id, 'cruser_id' => $cruser_id,
'title' => $group_name, 'title' => $group_name,
'organism' => $organism, 'tx_nG6_organism' => $organism,
'location' => $location, 'tx_nG6_location' => $location,
'hidden' => 0, 'hidden' => 0,
'deleted' => 0, 'deleted' => 0,
'description' => '', 'description' => '',
'subgroup' => '', 'subgroup' => '',
'tstamp' => time(), 'tstamp' => time(),
'crdate' => time() 'crdate' => time()
); );
$GLOBALS['TYPO3_DB']->exec_INSERTquery('fe_groups', $group_datas); $GLOBALS['TYPO3_DB']->exec_INSERTquery('fe_groups', $group_datas);
......
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