|
|
|
|
@ -2686,7 +2686,7 @@ class UserManager { |
|
|
|
|
* @return int returns 0 if fails otherwise the tag id |
|
|
|
|
*/ |
|
|
|
|
public static function get_tag_id($tag, $field_id) { |
|
|
|
|
$table_user_tag = Database::get_main_table(TABLE_MAIN_TAG); |
|
|
|
|
$table_user_tag = Database::get_main_table(TABLE_MAIN_TAG); |
|
|
|
|
$tag = Database::escape_string($tag); |
|
|
|
|
$field_id = intval($field_id); |
|
|
|
|
//with COLLATE latin1_bin to select query in a case sensitive mode |
|
|
|
|
@ -2732,12 +2732,12 @@ class UserManager { |
|
|
|
|
// database table definition |
|
|
|
|
$table_user_tag = Database::get_main_table(TABLE_MAIN_TAG); |
|
|
|
|
$table_user_tag_values = Database::get_main_table(TABLE_MAIN_USER_REL_TAG); |
|
|
|
|
$tag = Database::escape_string($tag); |
|
|
|
|
$tag = trim($tag); |
|
|
|
|
$tag = trim(Database::escape_string($tag)); |
|
|
|
|
$user_id = intval($user_id); |
|
|
|
|
$field_id = intval($field_id); |
|
|
|
|
|
|
|
|
|
$tag_id = UserManager::get_tag_id($tag,$field_id); |
|
|
|
|
$tag_id = UserManager::get_tag_id($tag, $field_id); |
|
|
|
|
var_dump($tag_id); |
|
|
|
|
|
|
|
|
|
/* IMPORTANT |
|
|
|
|
* @todo we don't create tags with numbers |
|
|
|
|
|