private function nexcloud::get_tagids in filedepot 7
Same name and namespace in other branches
- 6 nexcloud.class.php \nexcloud::get_tagids()
File
- ./
nexcloud.class.php, line 110 - nexcloud.class.php Tag Cloud class for the filedepot module
Class
- nexcloud
- @file nexcloud.class.php Tag Cloud class for the filedepot module
Code
private function get_tagids($tagwords) {
if (!empty($tagwords)) {
$tagwords = explode(',', $tagwords);
// Build a comma separated list of tagwords that we can use in a SQL statements below
$allTagWords = array();
foreach ($tagwords as $word) {
$tag = "'" . addslashes($word) . "'";
$allTagWords[] = $tag;
}
$tagwords = implode(',', $allTagWords);
// build a comma separated list of words
if (!empty($tagwords)) {
$query = db_query("SELECT id FROM {nextag_words} where tagword in ({$tagwords})");
$tagids = array();
while ($A = $query
->fetchAssoc()) {
$tagids[] = $A['id'];
}
return $tagids;
}
else {
return FALSE;
}
}
else {
return FALSE;
}
}