toDB($_GET['type'])))."' AND"; } if (isset($_GET['time']) && is_numeric($_GET['time'])) { $advanced_where .= " c.comment_datestamp ".($_GET['on'] == 'new' ? '>=' : '<=')." '".(time() - $_GET['time'])."' AND"; } if (isset($_GET['author']) && $_GET['author'] != '') { $advanced_where .= " c.comment_author_name LIKE '%".$tp -> toDB($_GET['author'])."%' AND"; } //basic $return_fields = 'c.comment_item_id, c.comment_author_id, comment_author_name, c.comment_datestamp, c.comment_comment, c.comment_type'; foreach($search_prefs['comments_handlers'] as $h_key => $value) { if(check_class($value['class'])) { if($value['dir'] == 'core') { $path = e_HANDLER . 'search/comments_' . $h_key . '.php'; } else { if(!e107::isInstalled($value['dir'])) { continue; } $path = e_PLUGIN . $value['dir'] . '/search/search_comments.php'; } $path = ($value['dir'] == 'core') ? e_HANDLER . 'search/comments_' . $h_key . '.php' : e_PLUGIN . $value['dir'] . '/search/search_comments.php'; if(is_readable($path)) // TODO Rework this to use e_search.php { require_once($path); $in[] = "'" . $value['id'] . "'"; $join[] = $comments_table[$h_key]; $return_fields .= ', ' . $comments_return[$h_key]; } } } $search_fields = array('c.comment_comment', 'c.comment_author_name'); $weights = array('1.2', '0.6'); $no_results = "