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 {
// group search
}else{
if ($col == "location" || $col == "organism") { $col = "tx_nG6_".$col; }
$res = tx_nG6_db::get_all_starts_with_in_group($name_start, $col);
}
$json_res = json_encode($res);
......
......@@ -1730,7 +1730,7 @@ class tx_nG6_db {
*/
function get_all_names_starting_with($name_start, $user_col) {
$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',
'WHERE' => 'fe_users.'.$user_col.' LIKE "'.$name_start.'%"',
'GROUPBY' => '',
......@@ -1749,8 +1749,8 @@ class tx_nG6_db {
'email' => $res_row['email'],
'title' => $res_row['title'],
'cruser_id' => $res_row['cruser_id'],
'organism' => $res_row['organism'],
'location' => $res_row['location']
'organism' => $res_row['tx_nG6_organism'],
'location' => $res_row['tx_nG6_location']
);
}
......@@ -1782,14 +1782,14 @@ class tx_nG6_db {
$res_tab[] = array(
'uid' => $res_row['uid'],
'title' => $res_row['title'],
'organism' => $res_row['organism'],
'location' => $res_row['location']
'organism' => $res_row['tx_nG6_organism'],
'location' => $res_row['tx_nG6_location']
);
} else {
if( !isset($distinct[$res_row[$col]]) ) {
$res_tab[] = array(
'uid' => $res_row['uid'],
$col => $res_row[$col]
substr($col, 7) => $res_row[$col]
);
$distinct[$res_row[$col]] = True ;
}
......@@ -2083,16 +2083,16 @@ class tx_nG6_db {
// Create new user
$group_datas = array(
'cruser_id' => $cruser_id,
'title' => $group_name,
'organism' => $organism,
'location' => $location,
'hidden' => 0,
'deleted' => 0,
'description' => '',
'subgroup' => '',
'tstamp' => time(),
'crdate' => time()
'cruser_id' => $cruser_id,
'title' => $group_name,
'tx_nG6_organism' => $organism,
'tx_nG6_location' => $location,
'hidden' => 0,
'deleted' => 0,
'description' => '',
'subgroup' => '',
'tstamp' => time(),
'crdate' => time()
);
$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